5 ms·
Another common thing I had to learn when I switched to fish, is the basic for-loop construct. Luckily it's super simple, here is an example: for f in (ls -1
by ivan_ah 6y ago
Another common thing I had to learn when I switched to fish, is the basic for-loop construct. Luckily it's super simple, here is an example:
for f in (ls -1 *py); echo $f; end
One more thing to note is setting ENV var FOO to value bar is
set -x FOO bar
Note no equal sign. To delete an ENV var use `set -e FOO`.
If you want to set ENV vars permanently for your login shell, the file to edit is `~/.config/fish/config.fish` and the syntax is:
set -gx PATH $PATH /some/new/path
which means set var PATH to whatever PATH contained before with /some/new/path appended to it.