Re:The most useful thing in bash
by sourpoi on Wednesday April 17, 2013 @06:50PM
(#5567846)
I don't use fish for shell scripting, but I'm enjoying it as my primary environment after making these adjustments..
Status codes and argument lists:
$status # replaces $?
$argv # replaces $@
Aliases are just functions (configure your startup in
~/.config/fish/config.fish):
# alias ls="ls -lrth"
function lr; ls -lrth $argv; end
For-loops are familiar:
# for n in one two three; do echo $n; done
for n in one two three; echo $n; end
The lack of '!$' confounded my hard-wired fingers until I settled on Alt-u to avoid up-arrows (see /usr/share/fish/functions/fish_default_key_bindings.fish):
The remaining price for fish's pseudo-telepathic assistance is the occasional frustration with applications that rely on the value of a user's default shell (/etc/passwd).
Status codes and argument lists:
Aliases are just functions (configure your startup in ~/.config/fish/config.fish): For-loops are familiar: The lack of '!$' confounded my hard-wired fingers until I settled on Alt-u to avoid up-arrows (see /usr/share/fish/functions/fish_default_key_bindings.fish): The remaining price for fish's pseudo-telepathic assistance is the occasional frustration with applications that rely on the value of a user's default shell (/etc/passwd).