Color-Scripts icon indicating copy to clipboard operation
Color-Scripts copied to clipboard

How to make all scripts execute randomly in fish shell?

Open GeorgeVivanov opened this issue 5 years ago • 2 comments

I'm using fish shell as a default shell, but i couldn't figure out how to link all executable files so that every time i open my terminal some of than to execute randomly.

GeorgeVivanov avatar Dec 09 '20 19:12 GeorgeVivanov

set -l splash (find ~/.config/fish/scripts/Color-Scripts/ -type f | shuf -n 1) && $splash This is what I did The command will execute a random script from the Color-Scripts directory Just put this command in your fish config file, and it will run a random script in each new terminal 😃

faedy2 avatar Dec 26 '20 03:12 faedy2

set -l splash (find ~/.config/fish/scripts/Color-Scripts/ -type f | shuf -n 1) && $splash This is what I did The command will execute a random script from the Color-Scripts directory Just put this command in your fish config file, and it will run a random script in each new terminal 😃

how to do it on zsh?

Sayan-Manna avatar Nov 04 '21 15:11 Sayan-Manna