3 ms·
Me. Just came to tell, that it's even better than zsh, but ultimately it's a matter of preference.
by nagisa 14y ago
Me. Just came to tell, that it's even better than zsh, but ultimately it's a matter of preference.
- slurgfest 14y agoWhat are your top reasons to use fish over zsh? (Bearing in mind, of course, that it's ultimately a matter of preference...)
- shadowfiend 14y agoSyntax. I much prefer the fish syntax, even though the fact that it's different from bash can occasionally cause headaches. When I'm mucking with my shell, I'd rather not be remembering [[ -z ]], because I don't do it often. Basically most shells are designed around power, which is fine. Fish is designed around ease-of-use, which I consider to be a better idea since there's already a ton of power in the UNIX tools that are on the system. That's not to say fish isn't powerful, mind you. Just that you detect a different emphasis when using it. Consider setting colors in a prompt, for example. zsh and bash use PS1=$'\e[0;31m$ \e[0m'. Ouch. More recent versions of zsh do let you do PS1="%{$fg[red]%}%n" type stuff, I'll confess. For fish, setting up a colored prompt or whatever: function fish_prompt -d "Write out the prompt" printf '%s%s@%s%s' (set_color brown) (whoami) (hostname|cut -d . -f 1) (set_color normal) # Color writeable dirs green, read-only dirs red printf ' %s%s' (set_color green) (prompt_pwd) # Print git branch if test -d ".git" printf ' %s%s/%s' (set_color normal) (set_color blue) (parse_git_branch) end printf '%s> ' (set_color normal) end It's stuff you already know how to do. It's not an environment variable, it's a function. Commands you use normally. Invoking other regular fish functions/commands. Etc etc. It just feels cleaner (to me).