Cannot run source activate with conda in Fish-shell

As of fish 2.6.0 conda 4.3.27: the following steps may change as issue is addressed update config Take note of your conda‘s location conda info –root /Users/mstreeter/anaconda # this is my <PATH_TO_ROOT> Add line to ~/.config/fish/config.fish source <PATH_TO_ROOT>/etc/fish/conf.d/conda.fish update convention Typically you’d run the following from bash source activate <environment> source deactivate <environment> Now you … Read more

Why & How fish does not support POSIX?

fish isn’t and never tried to be compatible with POSIX sh. This really just means that it’s a separate language (like Java, Python or Ruby) rather than an implementation or extension of sh (like Bash, Dash and Ksh). Obviously, just like you can’t copy-paste Java snippets into a Python program, you can’t copy-paste sh code … Read more

My fish is blind? (fish does not recognise any commands after setting it as default shell on Mac OS Big Sur, M1 Mac)

Here are the steps I used to setup the fish shell on my M1 MacBook Air. Per the comments on the question, the key to solving the Unknown Command issue is the fish_add_path: $ brew install fish ​ $ fish $ fish_add_path /opt/homebrew/bin $ echo “/opt/homebrew/bin/fish” | sudo tee -a /etc/shells $ chsh -s /opt/homebrew/bin/fish

How to access remaining arguments in a fish script

In fish, your arguments are contained in the $argv list. Use list slicing to access a range of elements, e.g. $argv[2..-1] returns all arguments from the second to the last. For example function loop –description “loop <count> <command>” for i in (seq 1 $argv[1]) eval $argv[2..-1] end end Usage $ loop 3 echo hello world … Read more

pipe both, stdout and stderr in the fish shell

That syntax works in fish too. A demo: $ function cmd1 echo “this is stdout” echo “this is stderr” >&2 end $ function cmd2 rev end $ cmd1 | cmd2 this is stderr tuodts si siht $ cmd1 &| cmd2 rredts si siht tuodts si siht Docs: https://fishshell.com/docs/current/language.html#redirects