|
|
Subscribe / Log in / New account

Fish shell 2.1

Fish shell 2.1

Posted Nov 28, 2013 19:57 UTC (Thu) by ballombe (subscriber, #9523)
Parent article: Fish shell 2.1

> In subsequent years, it is clear that fish has had an influence on other shells, as older projects like Bash have added and enhanced their own takes on some of those features.

The article reads like the author has never heard of Zsh (one of the older shells). Most shell (especially bash) newer features were already in Zsh 10 years ago.


to post comments

Fish shell 2.1

Posted Nov 29, 2013 3:08 UTC (Fri) by giraffedata (guest, #1954) [Link] (1 responses)

Also, most of the features described are in Bash.

I think every one of the command completion features except the one where you don't have to type tab has been in Bash since about 2005. Bash' command completion facility is fully programmable, so some of the more esoteric things, such as completing a username for 'su', require downloading additional software.

The commmand completion in Bash is really from the Readline library. I often write programs with command shells, and I always use Readline and get all that command completion stuff. I have to write code for the completions that make sense in the particular environment (e.g. the set of command verbs the program recognizes), but it's nice having TAB do what my fingers expect no matter what kind of prompt I'm facing.

Except for the friendly variable name, I thought the status codes for process terminations were standard Bourne shell. They do seem to be identical to Bash. What would be nice is if the information weren't delivered in code at all - have a variable for whose value is "terminated by signal" if the process was terminated by a signal, and another called $signal_number that tells you what class of signal it was.

As far as I know, nothing like the coloring described exists in Bash.

Fish shell 2.1

Posted Dec 1, 2013 12:27 UTC (Sun) by zanchey (guest, #94250) [Link]

$status is of course just a different (arguably better) name for $? from the POSIX shells and you are right about them being 'standard' values. The exit values for the cases of signal termination, inability to find a command and inability to execute a program are defined by SUS and there is no good reason for fish to use different values.

I think the assertion in the article that 0 is success and 1 is error is not quite precise enough; the convention across *nix AFAIK is that non-zero is error, and the exact error code will often have different meanings depending on the program being executed.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds