News for hackers. Stuff that matters.
Re:Use Zsh by mathieuh on Friday September 28, 2012 @11:45AM (#4586085)
Any one else using Fish?
Re:Use Zsh by nagisa on Friday September 28, 2012 @11:49AM (#4586117)
Me. Just came to tell, that it's even better than zsh, but ultimately it's a matter of preference.
Re:Use Zsh by slurgfest on Friday September 28, 2012 @11:52AM (#4586131)
What are your top reasons to use fish over zsh? (Bearing in mind, of course, that it's ultimately a matter of preference...)
Re:Use Zsh by shadowfiend on Friday September 28, 2012 @12:00PM (#4586175)
Syntax. 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).
Re:Use Zsh by slurgfest on Friday September 28, 2012 @12:14PM (#4586259)
Ah, so a lot of it is that you like the config language better! That would not have occurred to me. Thank you for your reply.
Re:Use Zsh by cutie on Friday September 28, 2012 @01:09PM (#4586571)
The biggest draw of fish is the syntax highlighting at the command line. I still write scripts in bash though.