3 ms·
fish is my preferred interactive shell (I have window 0 on screen set to be fish), I still write all the scripting I do in bash, because I know it's probably al
by Aloha 7y ago
fish is my preferred interactive shell (I have window 0 on screen set to be fish), I still write all the scripting I do in bash, because I know it's probably already installed out of the box.
Until you raised this point I didn't think if fish as something you'd script with.
- L0stLink 7y agoI really love the syntax and performance of fish shell, I had a few bash scripts that were used to manage the system volume notifications and power/battery information, as I use fish as my interactive shell, I ported them over to fish and tried to compare the performance, and to my surprise the fish variant was faster. I decided to rewrite the random wallpaper script for sway in fish too and it runs much faster then the original python snippet I got from swaywm's issues[0] (link to original python script[1]): #!/usr/bin/env fish swaymsg 'output "*" background ~/Pictures/Wallpaper/'(ls ~/Pictures/Wallpaper | shuf -n 1)' fill' I really love fish shell and find its multi-line input extremely valuable, I think it has a much saner syntax (I have no meaningful experience writing bash scripts), if you are like me in this regard I highly recommend writing your personal scripts in fish instead and if you are worried about posix compliance, it is not that different from a bash script with bashisms in that regard. [0] https://github.com/swaywm/sway/issues/1269#issuecomment-431671096 https://github.com/swaywm/sway/issues/1269#issuecomment-4316... [1] https://git.sr.ht/%7Esircmpwn/dotfiles/tree/master/bin/wallpaper https://git.sr.ht/%7Esircmpwn/dotfiles/tree/master/bin/wallp...