News for hackers. Stuff that matters.
Re:Fish shell by ridiculous_fish on Monday May 18, 2015 @08:26PM (#9567588)
Hey, I'm the lead dev of the fish shell. There's some great discussion in this thread!

For those who are interested, the fish shell is about to release version 2.2, a very significant release that wraps up eighteen months of development. You can try the beta now: http://fishshell.com/beta/

A sampling of new features:

- vi mode (yay!)

- Abbreviations, fish's take on aliases. They expand as you type them.

- A new "inline" pager, inspired by zsh. It's searchable and supports progressive disclosure. See it in action: https://www.youtube.com/watch?v=ncVWbT-jWAw

- A redesigned theme and prompt chooser: http://fishshell.com/beta/assets/img/screenshots/web_config....

- Tons of new tab completions!

Re:Fish shell by codychan on Monday May 18, 2015 @09:38PM (#9567756)
BTW, you should mention https://github.com/fish-shell/fish-shell/wiki/Nightly-builds after "You can try the beta now", because I cannot get beta at http://fishshell.com/beta/
Re:Fish shell by codychan on Tuesday May 19, 2015 @03:15AM (#9568498)
Unless you want to install it from the tar.gz file
Re:Fish shell by iagooar on Tuesday May 19, 2015 @06:20AM (#9568997)
Amazing stuff! Thanks to all the Fish team for your amazing work. I've been a Fish user for 3 years and wouldn't use anything else. The vi mode is a killer feature for me, so cool!

I couldn't find any information about the team though, maybe it would be a good idea to include some kudos on the website / on github just to show that real people are involved in this project. Personally, it always makes me be grateful.

Cheers!

Re:Fish shell by codychan on Monday May 18, 2015 @10:00PM (#9567806)
After updating to v2.2b1 using instructions at https://launchpad.net/~fish-shell/+archive/ubuntu/beta-2, these occurs to me in my original conf.fish file:

========================================================

# count the number of the files in the dir(not sub.), use tree | wc -l for subdirs # alias lsc ls:command not found ~/.config/fish/config.fish (line 67): # alias lah 'la --color=yes --sort=time -lh | head' # count the number of the files in the dir(not sub.), use tree | wc -l for subdirs # alias lsc 'ls -all | wc -l' ^ in function 'fish_prompt' called on standard input

in command substitution called on standard input

Warning: Identity file

alias cp cp not accessible: No such file or directory.

Warning: Identity file

alias mv mv not accessible: No such file or directory.

Warning: Identity file

alias rcp rsync not accessible: No such file or directory.

unknown option -- -

usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]

           [-D [bind_address:]port] [-E log_file] [-e escape_char]

           [-F configfile] [-I pkcs11] [-i identity_file]

           [-L [bind_address:]port:host:hostport] [-l login_name] [-m mac_spec]

           [-O ctl_cmd] [-o option] [-p port]

           [-Q cipher | cipher-auth | mac | kex | key]

           [-R [bind_address:]port:host:hostport] [-S ctl_path] [-W host:port]

           [-w local_tun[:remote_tun]] [user@]hostname [command]
>

========================================================

Re:Fish shell by ridiculous_fish on Monday May 18, 2015 @10:45PM (#9567929)
Yikes! I'll open an issue and make sure this is addressed for the 2.2 release. Can you please post your config.fish in a gist?
Re:Fish shell by codychan on Monday May 18, 2015 @11:34PM (#9568021)
Re:Fish shell by ridiculous_fish on Tuesday May 19, 2015 @03:46AM (#9568584)
Thanks, I opened an issue at https://github.com/fish-shell/fish-shell/issues/2073 . I wasn't able to reproduce any problems with your config.fish, so if you feel up for chiming in that would be great.
Re:Fish shell by codychan on Tuesday May 19, 2015 @05:16AM (#9568810)
I haven't pushed my local conf.fish file to Github for months (but I think it is no big difference), I'll test the v2.2-beta later at home in my local.fish and push it to Github, maybe you can test it then.
[deleted]
Re:Fish shell by ridiculous_fish on Monday May 18, 2015 @09:24PM (#9567721)
Some background: the "symlink problem" refers to this: http://fishshell.com/docs/current/faq.html#faq-cwd-symlink

In bash, if you cd into a symlink and then cd .., you get back to where you started. But fish will resolve the symlink, and so it will take you to the destination's parent.

The price bash pays is inconsistencies between external commands and builtins. For example, `ls ..` can output something different than `cd .. && ls`. This is because the kernel maintains the cwd as an inode, not a path.

I don't know of anyone who is wedded to the existing behavior. If you feel strongly about it or have ideas for how it ought to work, please comment in the issue! https://github.com/fish-shell/fish-shell/issues/1957

Re:Fish shell by ledbettj on Monday May 18, 2015 @08:47PM (#9567646)
Could you elaborate on 'the symlink problem?' I just installed 2.2 and symlinks seem to function as expected to me.
Re:Fish shell by codychan on Monday May 18, 2015 @09:20PM (#9567716)
It sounds amazing.

Hey, since you are the lead dev of the fish shell, a serious problem occurred to me weeks ago, I was compiling a QT client in fish, and there is already an environment value called `LD_LIBRARY_PATH` (including other values the compilation needs) defined in /etc/ld.so.conf.d/ and /etc/profile.d/ but fish cannot find them, if I use `set -g ...` to set it in fish shell prompt and then do the compilation, it will work, it took me a lot time to figure it out that this is the problem of fish-shell, the weird thing is, there is already one line `#!/bin/sh` at the beginning of the compilation script (it is a bash script called build.sh), so it should be executed under sh which is bash in my CentOS.

Re:Fish shell by ridiculous_fish on Monday May 18, 2015 @11:16PM (#9567992)
Thanks for sharing this. The files in the *.d directories are bourne-syntax, and so fish can't understand them; that's why fish doesn't read them (excepting /etc/paths.d).

bash only reads the files in /etc/profile.d when launched interactively, so those files won't be read for #!/bin/sh scripts. Of course, if you launch the script from an interactive bash session, the script will inherit the variables that the profile.d files set up.

As an aside, this zoo of configuration files is something that fish tries to avoid. fish reads its config files unconditionally, and leaves it up to the file to branch on whether the session is interactive.

Re:Fish shell by TheGrassyKnoll on Tuesday May 19, 2015 @03:47PM (#9572639)
/bin/sh isn't BASH always ?? I'm on a Debian derived Linux:

$ ls -l /bin/sh lrwxrwxrwx 1 root root 4 Feb 19 17:51 /bin/sh -> dash

Re:Fish shell by amortizedcost on Monday May 18, 2015 @09:18PM (#9567710)
Any chance that we'll be able to have fish not resolve symlinks in the future? This is the only problem keeping many people from using it.
Re:Fish shell by Aloha on Monday May 18, 2015 @08:44PM (#9567640)
Thanks!

I used fish years (2006/7 era) ago as my default shell, and I really appreciated the functionality in helping to make unix easier to use.

Re:Fish shell by zyxley on Monday May 18, 2015 @10:21PM (#9567860)
I'm curious - how does the theme stuff interact with choosing different ANSI colors in a terminal emulator? Is it using ANSI colors at all for those complex themes, or specifying RGB colors instead?
Re:Fish shell by ridiculous_fish on Monday May 18, 2015 @10:42PM (#9567918)
The themes are specified with RGB colors, and fish tries to pick the closest color supported by the terminal. It can do the 14 ANSI colors and the xterm 256 colors. fish 2.2 adds support for 24 bit color, which a few terminals can do (Konsole, iTerm2).

fish has a set_color builtin which accepts RGB hex. This makes colored output easy: `set_color 69F; echo 'I am light purple!'`

Re:Fish shell by bojo on Tuesday May 19, 2015 @12:59AM (#9568207)
Seriously looking forward to this release! Been an avid user for over a year now and absolutely love this shell. Still get the odd strange look when I mention what I use though :)
Re:Fish shell by cbd1984 on Tuesday May 19, 2015 @04:06PM (#9572764)
Can you explain why your website requires JS?
Re:Fish shell by humility on Tuesday May 19, 2015 @01:28AM (#9568268)
Great work!!
Re:Fish shell by PSeitz on Tuesday May 19, 2015 @04:12AM (#9568656)
Hi, can you tell how it competes to cmder and iterm? I use these currently in windows and osx
Re:Fish shell by sspiff on Tuesday May 19, 2015 @04:31AM (#9568708)
Not sure about this (I haven't used either, just looked at their sites), but I believe those are terminal emulators. They're the thing that displays the shell and handle input and copy/paste etc.

The shell is what actually handles key presses and produces the output (handling commands, input/output redirection, etc).

They're not the same thing - I bet you could use fish inside cmder or iterm.

Re:Fish shell by PSeitz on Tuesday May 19, 2015 @04:47AM (#9568750)
Ah okay now I get it, so it's comparable to bash or zsh
Re:Fish shell by tokenizerrr on Tuesday May 19, 2015 @04:33AM (#9568714)
I'd say it doesn't since neither of those are shells. They're both terminal emulators that run a shell within them, usually bash for linux/mac or cmd for windows.