News for hackers. Stuff that matters.
Re:Fish shell 2.1 by leokun on Monday October 28, 2013 @09:26AM (#6626715)
I like the idea of fish, but I've had issues with other programs assuming things about my shell. Like vim and I think even other programs. There's something fish doesn't do, that other shells like bash and zsh do, that breaks other programs. I can't remember the specifics, but fish breaks stuff for me when I tried it, and I tried it pretty recently.
Re:Fish shell 2.1 by Eiwatah4 on Monday October 28, 2013 @10:01AM (#6626938)
I had similar problems, and found a work around that works great for me:

bash is configured as my default shell. So every program that runs my default shell and just assumes it can use POSIX syntax, gets what it wants (even though it should really just use /bin/sh).

My terminal on the other hand is configured to ignore my default shell and run fish instead.

I also have a line in my .bash_profile (meaning it only runs for login shells) that checks whether it's running in a virtual terminal and in that case exec's fish in a new tmux (because tmux is a terminal emulator, which means that any bash instances within it won't know they are in a virtual terminal and behave like a normal bash).

Re:Fish shell 2.1 by desireco42 on Monday October 28, 2013 @10:08AM (#6626981)
Thank you, this is really good strategy, I had similar reservations about fish and I think this both makes sense and resolves them.
Re:Fish shell 2.1 by adisbladis on Monday October 28, 2013 @09:59AM (#6626926)
Yes, fish is not bourne shell compatible and never will be.

Fish is as the name (Friendly Interactive SHell) suggests an interactive shell. You should just set vim/emacs/whatever to use a bourne-compatible shell. It's one line of vim config: set shell=/bin/sh

Re:Fish shell 2.1 by splawn on Monday October 28, 2013 @05:49PM (#6630082)
actually fish works with ansi-term under emacs without issue
Re:Fish shell 2.1 by IanCal on Monday October 28, 2013 @09:31AM (#6626754)
Anything I have issues with I simply run under bash. I've had very few problems, and use it on my work machine (where I live in tmux and vim).

Edit: I'm running a pre-release of 2.0.0, which I modified to time every command. I was extremely impressed at how simple it was for me to add (not my usual language).

Re:Fish shell 2.1 by siteshwar on Monday October 28, 2013 @09:35AM (#6626770)
fish's syntax is not POSIX compliant (because fish tries to simplify syntax), so at times it breaks other programs which depends on POSIX syntax. But you can always find workarounds for those problems. For e.g. see the discussion at https://github.com/fish-shell/fish-shell/issues/921 . Let us know your problem and we can help you with migrating.
Re:Fish shell 2.1 by dz0ny on Monday October 28, 2013 @09:31AM (#6626755)
Exporting environment variables is pain, i don't know why some apps pick env others don. Android sdk is problematic for example, go compiler too.
Re:Fish shell 2.1 by izietto on Monday October 28, 2013 @09:38AM (#6626794)
Exporting variables is simple: set -x #{NAME} #{value}; setting Go environment is simple too:

  set -x GOPATH $HOME/go
  set -x PATH $GOPATH/bin $PATH
Re:Fish shell 2.1 by gecko on Monday October 28, 2013 @10:20AM (#6627055)
I actually have an even more complete version of this which allows changing the Go shell cleanly. Dump https://gist.github.com/bpollack/7197532 in your .config/fish/functions directory and you should be good to go.
Re:Fish shell 2.1 by dz0ny on Monday October 28, 2013 @10:39AM (#6627170)
sweet :) thx
Re:Fish shell 2.1 by daniel02216 on Monday October 28, 2013 @10:14PM (#6631456)
For vim at least you can put 'set shell=bash' in your .vimrc and it will use bash instead.
Re:Fish shell 2.1 by chimeracoder on Monday October 28, 2013 @09:38AM (#6626793)
There are two problems I've found that prevent me from using fish more:

1. <strike>Fish syntax breaks virtualenv</strike> (Edit: Okay, apparently this isn't actually a problem).

2. Fish does not have the equivalent of 'disown' in bash. This is fine if you exit the parent shell normally, but not if you send SIGKILL, which my window manager (wmii and i3) does.

Re:Fish shell 2.1 by vially on Monday October 28, 2013 @09:47AM (#6626858)
1. Fish syntax breaks virtualenv

You might want to try virtualfish [1]

[1] - https://github.com/adambrenecki/virtualfish

Re:Fish shell 2.1 by siteshwar on Monday October 28, 2013 @09:51AM (#6626878)
What problems are you facing while using virtualenv ? I use fish with virtualenv and everything seems fine.( You need to source activate.fish to activate virtualenv on fish. )
Re:Fish shell 2.1 by frewsxcv on Monday October 28, 2013 @11:19AM (#6627447)

  . bin/activate.fish
Re:Fish shell 2.1 by reledi on Tuesday October 29, 2013 @05:09AM (#6632770)
Just so people know where to find this in case they forget, it's in the header of `env/bin/activate.fish`.

# This file must be used with ". bin/activate.fish" from fish (http://fishshell.org)*