7 ms·
Fish: Finally, a command line shell for the 90s
- ch0wn 14y agoI didn't get this right from the start, but this is a fork of fish(shell), which has been around for quite a while: http://fishshell.com/ http://fishshell.com/
- 0x0 14y agoWhy did they pick the exact same name?
- aaronsw 14y agoPresumably because fish hasn't been updated since 2009 and they expect their fork to become the new standard version. http://ridiculousfish.com/shell/beta.html http://ridiculousfish.com/shell/beta.html "Welcome to our fork of the fish shell, a command line shell like bash. Its working name is fishfish, but I hope eventually it will just be fish!"
- bazzargh 14y agoObvious joke is obvious, but he could have called it the Unno Fish Shell? Looks interesting. I expect my fingers will be even more confused than ever switching machines now (they've never learned that Alt-3 isn't # on linux or that middle-click isn't paste in Putty)
- andrewaylett 14y agoThere's no reason middle-click shouldn't be paste on PuTTY -- it's a configuration option.
- bazzargh 14y agoThat one always bites me at other people's desks; I'd figure out how to reconfigure it if it was mine. But there's always something jarring like that when you switch between similar-but-not-quite-the-same environments.
- adavies42 14y agoi've gotten to the point where i can subconciously key off the window chrome to know how to paste. (half my coworkers use xterm, the other half putty.)
- kryptiskt 14y agoIt's not called that yet: "Its working name is fishfish, but I hope eventually it will just be fish!" The ambition is quite reasonable as work on the fish shell itself has petered out, there was a recent dead cat bounce after a long fallow period, but it seems to be back to stasis there.
- x1 14y agoWell.. they do have quite a list of possibilities to piggy back off ( http://en.wikipedia.org/wiki/List_of_common_fish_names http://en.wikipedia.org/wiki/List_of_common_fish_names ) that could reduce confusion but still maintain similarity.
- ch0wn 14y agoI don't believe that's an option for the author as he's known as "fish" around the web. :) http://ridiculousfish.com/blog/about.html http://ridiculousfish.com/blog/about.html
- Someone 14y ago"ghoti" would be a perfect name for a ridiculous fish, though (http://en.wikipedia.org/wiki/Ghoti http://en.wikipedia.org/wiki/Ghoti)
- mixmastamyk 14y agoI'm on the fish mailing list and it has been well received by current contribs and the original author. I expect that the two forks will be one at some point.
- mhansen 14y agoI use fish (http://fishshell.com/ http://fishshell.com/), and it's amazing. However, they're missing the most important feature from their front page: Syntax highlighting! Valid executables are colored green, as you type. Invalid commands are red, as you type. Valid files are underlined, as you type. Like the carpenter who can feels the feedback of the grain of the wood through the handle of his plane can adjust his technique as he planes, fish shell lets me 'feel' the programs and files I'm working with through the shell. And that makes me happy.
- StavrosK 14y agoI stopped using fish a while ago, when it would crash whenever I opened a console session (so I couldn't do anything when X didn't start). I switched to zsh with fish emulation, but lately I realized I have a shell that takes much longer to start up and basically does everything fish does, and nothing more. If fishfish is more stable, I'll switch in a heartbeat.
- div 14y agoI'd been using fish for a year or two before switching to zsh too. The main reason for me to give it up is because I could not get it to work smoothly with rvm. I've gotten quite used to zsh by now, and I have to say, I don't feel much for having another go at fish just to run into the same limitations again.
- msluyter 14y agoI just downloaded it and while it looks awesome, I see the rvm problem. I haven't used zsh but I'm assuming from your comment that zsh is compatible with RVM. Seems like it shouldn't be too hard to write a fish version of the script that sets up your rvm environment, but if you've gone down that path and it proved too painful I won't bother. However, perhaps fish + rbenv works. Has anyone tried that?
- roryokane 14y agoYes, I switched from rvm to rbenv because rvm didn’t work with fish. rbenv did work with fish. I switched away from fish after that because go (a directory-jumping tool) required bash to install (http://code.google.com/p/go-tool/wiki/InstallNotes http://code.google.com/p/go-tool/wiki/InstallNotes). I didn’t know how to port that bash code to fish, since I don’t know bash scripting, and I also anticipated that I would keep finding cool programs that didn’t work with fish.
- mapleoin 14y agoLooks like the author is trying to replace the old fish (http://fishshell.com/ http://fishshell.com/) Welcome to our fork of the fish shell, a command line shell like bash. Its working name is fishfish, but I hope eventually it will just be fish! (http://ridiculousfish.com/shell/beta.html http://ridiculousfish.com/shell/beta.html)
- shin_lao 14y agoI wonder if there is a modern shell with csh like syntax. I know this may sound anal retentive, but I prefer the csh syntax to the sh syntax.
- jameswyse 14y agoI've installed this on my Mac, love it!
- bstpierre 14y agoThey need to update the slogan? "A command line shell for the 90s" doesn't really draw me in. What I want to know: 1. In what specific ways is it better than zsh? 2. Is it absolutely, rock-solid stable?
- icarus127 14y agoI'm wondering about the answer to #1 as well. After trying this out for a bit there's nothing obvious and there are definitely things I miss.
- ash 14y ago1. No need to mess with configs. Works out of the box. 2. Breaking Bourne Shell compatibility. Personally I find Bourne syntax hard to learn and hard to read. Fish syntax is much better. [1, 2] [1]: http://en.wikipedia.org/wiki/Friendly_interactive_shell http://en.wikipedia.org/wiki/Friendly_interactive_shell [2]: http://ridiculousfish.com/shell/user_doc/html/index.html http://ridiculousfish.com/shell/user_doc/html/index.html
- bstpierre 14y agoSounds like there's no reason for me to switch. I've already messed with configs and everything is stable now, so that's a sunk cost. I already know bourne-style syntax, so learning fish (even if it's easier) is an added cost, not to mention the fact that I have to work on various boxes that I can't install fish on so it's easier to have my fingers know how to operate a single shell (zsh) that's generally backwards-compatible with bash (which is ubiquitous).
- kator 14y agoFunny I was about to say the same thing about installing on systems. When you're a systems person or work with many different customers you can't ask them to install a custom shell. Try explaining to the CIO at a major bank why all his linux boxes need fish shell installed. So we get stuck back at the minimal set of SH syntax that I learned to master some 25 years ago.
- happyfreud 14y agoI really like what I see, but I don't understand their reasoning for leaving out history substitution (see http://ridiculousfish.com/shell/user_doc/html/faq.html#faq-history http://ridiculousfish.com/shell/user_doc/html/faq.html#faq-h...). Why can't a better interactive history go hand in hand with something like "sudo !!"?
- ash 14y agoThe law of orthogonality http://ridiculousfish.com/shell/user_doc/html/design.html#ortho http://ridiculousfish.com/shell/user_doc/html/design.html#or...
- llambda 14y agoI've been using the original fish[1] for years. I'm very biased, I love fish for many reasons and despite the claims that zsh can do the same things I've never had cause to switch from it. Now it was quite disappointing to see the original fish project seemingly halted. So this isn't simply great news, in the sense that development has been picked back up in the fishfish fork, some great improvements have been made at the same time! * autosuggestion (this actually has a great amount of utility for me. it complements tab-completion quite well!) * optional web-based config (great for quickly editing your config settings) * speed improvements (although I never suffered from much lag with fish to begin with) Overall I think the usability and utility of fish is greatly improved in this fork. Also it's worth pointing out that in terms of out-of-box functionality, some of fishfish features would be very hard to match. Things like autocompletion and simple history scrollback based one partial string matching set fish apart from the pack imo. So far, I'm quite impressed and I hope that more people adopt fishfish as the de facto replacement for fish. [1] http://fishshell.com/ http://fishshell.com/
- g3orge 14y agocan zsh autocomplete man pages?
- jeekl 14y agoYes it can. Add something like this to your zsh config: zstyle ':completion:*:manuals' separate-sections true zstyle ':completion:*:manuals.*' insert-sections true zstyle ':completion:*:man:*' menu yes select
- trebuch3t 14y agoThat's it. This thread sold me. Installing zsh now!
- AnthonBerg 14y agoTried fish yet? I prefer it to zsh ...
- Paul_S 14y agoThis is missing the point of a shell by a mile. Extra features are nice. As an extra. Preferably on top of a rock solid platform that works everywhere, on everything, under any conditions. Same reason your PC boots in 16 bit real mode. I'm quite happy living in the 80s.
- archangel_one 14y agoIsn't this entire shell an extra? I wouldn't replace bash with it, it seems more like a nicer interactive frontend but you could always drop down to bash if it didn't work for something. Sort of like KDE being a more fully-featured frontend to X, but you can drop back to Fluxbox if you want to test X without all the gizmos.
- jff 14y agoYour PC boots in 16 bit real mode because Intel is too locked into x86 to get rid of legacy modes and instructions. A proper architecture starts in its intended mode. But I agree, adding all this fluff to a shell is a bit much. I use bash and keep ls colors disabled.
- gurraman 14y agoIt gives me great joy every time a new command-line-related project is released (or, as in this case, gets a major update). I will dedicate a few hours of my weekend to take this for a thorough spin!
- eru 14y agoI tried fish a few years ago, but stopped for some reason that I can't remember. I will try again, and will either keep using it, or will remember why I stopped in the first place.
- christiangenco 14y agoI'm so glad I'm not the only one that does this.
- xwowsersx 14y agoWhere's the bash_profile or bashrc equivalent?
- fceccon 14y ago~/.config/fish/config.fish http://ridiculousfish.com/shell/user_doc/html/index.html#initialization http://ridiculousfish.com/shell/user_doc/html/index.html#ini...
- xwowsersx 14y agoI don't see that there...
- siteshwar 14y agoIt should be there if you've installed fishfish, if you feel it's a bug please consider opening an issue on github : https://github.com/ridiculousfish/fishfish/issues https://github.com/ridiculousfish/fishfish/issues
- borkabrak 14y agoThe directory ~/.config/fish should be there. However, you'll have to create the file config.fish inside that directory, if you want to use it. I'd hazard a guess that fish_config may do that for you.
- amix 14y agoIf you run chsh and get error "/usr/local/bin/fish: non-standard shell" simply add /usr/local/bin/fish to /etc/shells. Just to save you a Google search :)
- ralfd 14y agoA bit more context: Ridiculous Fish is an Apple Engineer on the AppKit team. He also has a nice hex editor for the Mac (Hex Fiend) and an interesting programming Blog: http://ridiculousfish.com/blog/ http://ridiculousfish.com/blog/
- Uchikoma 14y ago"Watch out, Netscape Navigator 4.0!"
- pcsanwald 14y agoHard to tell from docs if fish has vi mode? vi mode is the main thing I love about bash.
- fceccon 14y agoUnder missing features[1] you can find "Complete vi-mode key bindings", so I think it doesn't have it yet. [1] http://ridiculousfish.com/shell/user_doc/html/index.html#todo http://ridiculousfish.com/shell/user_doc/html/index.html#tod...
- buster 14y agoAhhh, finally. I used to use fish for many months, but after i figured that there is no development anymore, i switched back to bash... Now it's time to change to fishfish and decide what's best suited for me! :) edit: Also, i am disappointed that the ASCII-art fish on the frontpage is actually a picture and not ascii :(
- nickpresta 14y agoThe package doesn't work on Debian testing/unstable/experimental: fish: /lib/i386-linux-gnu/i686/cmov/libc.so.6: version `GLIBC_2.15' not found (required by fish) (I am running GLIB 2.13). I tried compiling from source, but I am clearly missing dependencies. So far, I had to install: libncurses5-dev, gettext, xsel, libxt-dev (alternatively, I could use --without-xsel and ignore these last two depends). You may want to add this to the project somewhere. At any rate, I am looking forward to giving this a try.
- maw 14y agoMaybe you already know this, but glibc and glib are two entirely different libraries. (The similarity in their names is unfortunate.) So be precise when asking for help.
- amix 14y agoWhen using auto-completion is there a way not to use arrow keys? Especially when completing a match it seems like I need to use the right arrow key. I would prefer not to use arrow keys at all, but use something like CTRL+(HJKL).
- robwgibbons 14y agoI love a bit of tasteful sarcasm in marketing.
- rplnt 14y agoUnfortunately I can't try this right now, but do suggestions support something like taking only part of the suggestion? I.e. move left/right from cursor into the suggestion instead of writing. Shift+Arrow would work as expected, thus allowing quickly using part of the suggestion and writing the rest out if needed. It seems to be a better solution than deleting things from the end.
- sontek 14y agoWho doesn't package an RPM? >:|
- pnathan 14y agoAhaha. I like the sense of humor. I shall have to give it a try!
- neves 14y agoAnyone managed to make it run in cygwin? Bash completion in cygwin makes the shell very slooooow to start.
- kubov 14y agoIs there any possibility to provide vi mode? Like 'set -o vi' in bash.
- q_revert 14y agoyou could always put "set editing-mode vi" in your ~/.inputrc .. this has the advantage of affecting all programs which use readline, gnuplot, python shell, mysql etc.. I also put "\e[A": history-search-backward "\e[B": history-search-forward in the ~/.inputrc which maps arrow up/down to history search.. more tips here http://vim.wikia.com/wiki/Use_vi_shortcuts_in_terminal http://vim.wikia.com/wiki/Use_vi_shortcuts_in_terminal zsh has a better vi-mode than most of the shells I've tried, although I can't say I've made a serious attempt at using fish.. the color syntax highlighting implemented in zsh is much slower than the fish equivalent though, and can be quite laggy ime
- albertzeyer 14y agoDoesn't seem to be in Homebrew yet (I mean this fork; the original Fish is there). That brings me to the question: What is different in this fork? Is it worth to use this fork or should I stick to the original?
- TazeTSchnitzel 14y agoThe features mentioned on the homepage were added to this fork.
- desireco42 14y agoI just tried it out, I use zsh and don't really look for replacement, but my first impression is that things are much more snappy and significantly faster in fish. I liked how help opened browser, even though I was startled a little bit.
- mrgreenfur 14y agoWhoa. Just installed it and it's beautiful. I'm most surprised by fish_config which fires up a webserver to set config information -- awesome, really awesome.
- fenprace 14y agoI've been used it. I think lazy people will love it.
- rcthompson 14y agoSo, is this new fish fully compatible with sh syntax? IIRC the original one was not.
- mixmastamyk 14y agoNo. I prefer its syntax, but since it is different from anything else I find it hard to remember. So I write my scripts in bash but use fish at the command line. Best of both.
- deleted 14y ago[deleted]
- rcthompson 14y agoI guess for a sh-compatible version you could use fizsh (http://sourceforge.net/projects/fizsh/ http://sourceforge.net/projects/fizsh/) but it doesn't seem as mature in other areas.
- deleted 14y ago[deleted]
- scribblemacher 14y agoI've never used anything besides bash before. I use a terminal a lot, but don't really do anything fancy so I thought switching would be a waste of time. Reading the features in fish though made me want to give it a whirl.
- Indianburger42 14y ago'cutting edge technology called threads' oh wow
- deleted 14y ago[deleted]
- AnthonBerg 14y ago:) I'm sure you know that that's a joke ... ?
- deleted 14y ago[deleted]
- amjith 14y agoCan you add custom completions? I don't see proper completion for tmux sub-commands or git sub-commands.
- shadowfiend 14y agoSome instructions here: http://ridiculousfish.com/shell/user_doc/html/index.html#completion http://ridiculousfish.com/shell/user_doc/html/index.html#com... You can put this stuff in your ~/.config/fish/config.fish . There's a useful set of completions and utilities at https://github.com/zmalltalker/fish-nuggets https://github.com/zmalltalker/fish-nuggets with a variety of forks that add and remove various things. If nothing else, it's a pretty solid starting point.
- zedshaw 14y agoMan, I used to use fish. It was great. It was like all the things people eventually make zsh do but in one convenient binary. I think my favorite feature was that history was instantly shared among all your open fish instances.
- ethereal 14y agozsh used to do this for me (back when I used it; switched back to bash about a year ago now), and it was the most _annoying_ thing it ever did. My typical workflow (when working on a software project) involves a pair of terminals for compiling and execution, an editor window (whether gvim or kate/kile/kdevelop etc.), and a documentation terminal for manpages. Oftentimes my execution lines are somewhat long -- enabling/disable debugging info in certain sections of the program while tracing programs, etc, and I'd not want to type them out continuously. As a result I'd use the command history a lot, muscle memory would automatically hit CTRL-P once I switched to one of my execution terminals. If I'd visited something in the documentation terminal in the meantime, I'd be staring at 'man 2 timer_create' instead of my expected './aesalon --set listen=6421 --set ::debug-shm --set ::debug-interaction'. The third-second or so I'd need to do a sanity check would seriously interrupt my train of thought. It's neat, and I can see why people like it. But for my particular one use-case of terminals/shells, it was annoying. Took me about a week before I realized just how much it was slowing me down and disabled it. [I probably should have just set up another zsh configuration for those particular terminals, but enough years with bash have trained me, I guess, to not expect it from my shell.]
- entropie 14y agoYou could have simply turned history sharing off...
- adambyrtek 14y agoI prefer a middle ground, in which entries from multiple sessions are interleaved in the history file, but individual in-memory histories don't reflect what happened in other sessions in the meantime. For future reference, I use the following Zsh history options: setopt incappendhistory setopt extendedhistory setopt histignorespace setopt histignoredups
- herdrick 14y agoWhy does xargs under fish not accept {} as a replstr like it does with bash? find . | xargs -I {} grep pat {} On OS X fish this gives "xargs: replstr may not be empty" and on Linux fish I get "xargs: command too long". Using % as the replstr for example does work though.
- nickburlett 14y agoFish does brace expansion, even for empty braces. In order to actually pass braces to xargs, do: find . | xargs -I \{\} grep pat \{\}
- herdrick 14y agoOK, thanks.
- AnthonBerg 14y agoThe beauty of fish is that it handles lists much better than bash - it kind of has xargs "baked in". If I understand the example correctly, it finds every file under the current directory and greps for "pat" in each file. In fish you could do this: grep pat (find .) ... or this: for i in (find .) grep pat $i end The first example would work correctly in fish, but AFAIK it wouldn't work in bash. The is because every line from the command substitution is automatically escaped and quoted in fish. The small drawback is that a symbol-heavy commandline sometimes needs a few extra \ escapes - the power to handle lists of lines (i.e. lines from stdin or from command substitution) is bought for a little extra escaping. And it's a good deal IMO. And the for loop in fish is so elegant and convenient that it's worth using for small random stuff. (Everything I say is pending that I understand the find/xargs/grep example!)
- herdrick 14y agoYep, you understood it fine. ('pat' was short for 'pattern'. It was just an example) Wow, that 'autoescaping the commands in parens' syntax is great. But it doesn't seem to be list related. For example: grep pattern (echo "foo.txt") just passes the result from the echo to grep. It's grep which is doing the right thing with a list, right? Still this is interesting. So fish stuff isn't necessarily written left to right and joined with pipes, instead it's written in nested form like in a more modern langauge. Alas you still need to use the "find | grep" technique in fish because of the argument size limit. For example: grep pattern (find .) results in: Failed to execute process '/usr/bin/grep'. Reason: The total size of the argument and environment lists 34kB exceeds the operating system limit of 34kB. Try running the command again with fewer arguments. The equivalent in bash gives you: -bash: /usr/bin/grep: Argument list too long
- herdrick 14y agoUnder the known bugs and issues: History file should apply some kind of maximum history length Fine, but the default needs to be large, like 100MB. Disks are big now. I hope ridiculousfish agrees.
- james4k 14y agoDisks are big, but I think 100MB is maybe a bit excessive...even 10MB gives you 40k lines of history, at 256 bytes per line, and that is a conservative estimate.
- herdrick 14y ago400k lines sounds like less than a lifetime at the terminal. So maybe 200MB would be safer - thanks for the reminder! ;)
- oofabz 14y ago100 MB is indeed small but there are privacy concerns with storing hundreds of thousands of lines of history. Do you really want every command you've typed for the last several years to be visible to anyone with physical access to your box? It could contain clear-text passwords to other machines. I'd be happy with 100 MB as a maximum size but there should also be time-based limits, like remove anything from history that is older than a few months.
- pooriaazimi 14y agoJust FYI, You can hide sensitive commands (like those that require you to type your password in plain!) in bash, by simply adding an space at the beginning (after adding `export HISTCONTROL=ignorespace` in your bash_profile, of course). I don't know about fish yet. more: http://www.linuxjournal.com/content/using-bash-history-more-efficiently-histcontrol http://www.linuxjournal.com/content/using-bash-history-more-...
- herdrick 14y agoDo you really want every command you've typed for the last several years Yes. visible to anyone with physical access to your box Maybe not. That's an auth problem, not a reason to throw away your archives. I keep all my email even though there's probably something in there embarrassing to me given some audience.
- egonschiele 14y agoVery poor support for alias: batman@batman ~/D/S/rails> alias foo="cd ~/" fish: Could not expand string '$tmp[2]' /usr/local/share/fish/functions/alias.fish (line 19): set body $tmp[2] ^ in function 'alias', called on standard input, with parameter list 'foo=cd ~/' Makes me wonder what else I'll have to relearn to use fish. Can someone tell me if it's worth the effort? Edit: didn't take me long to find something worse. I defined my aliases as functions, but apparently fish executes all functions when it sources the file? By putting this function in: function foo cd ~/ end I was able to send fish into an infinite loop.
- AnthonBerg 14y agoI never use alias in fish, just functions - see the Fish design document, law of orthogonality: http://fishshell.com/user_doc/design.html#ortho http://fishshell.com/user_doc/design.html#ortho That infinite loop thing is a bug for sure, it shouldn't do that! I have defined that type of function to jump to the directories of current projects - that should work.
- egonschiele 14y ago> I have defined that type of function to jump to the directories of current projects - that should work. What do you mean? Even if I define a function like so: function foo; cd /var; end It shouldn't automatically execute the function and cd into /var.
- AnthonBerg 14y agoNo, exactly, for me it wouldn't. For example, I'd type something like this: function gogogo cd ~/src/teh_project end funcsave gogogo Then the "gogogo" function is available in all shells and loaded on startup - but not executed until I do so myself. From what I understand you wish to have the same functionality, and are doing the same thing, but are getting totally weird results. Explicitly: No, it definitely shouldn't try to run functions right away. Bug! FWIW I haven't tried the fishfish fork/update, just used the original version for a number of years. It'd be greatly appreciated if you could spare a moment to send a bug report! (I'm not a dev by any means, just a fish lover ...)
- herdrick 14y agoCan you make this work in fish? http://www.developerzen.com/2011/01/10/show-the-current-git-branch-in-your-command-prompt/ http://www.developerzen.com/2011/01/10/show-the-current-git-...
- eru 14y agoDon't see why not.
- herdrick 14y agoRight, but I meant, "Tell me how". I figured it out and dashed off a quick post: http://herdrick.tumblr.com/post/24563032599/display-git-branch-and-dirty-status-in-command-shell http://herdrick.tumblr.com/post/24563032599/display-git-bran...
- eru 14y agoYou can also find `how' on the Arch-Linux Wiki (https://wiki.archlinux.org/index.php/Fish#Configuration_Suggestions https://wiki.archlinux.org/index.php/Fish#Configuration_Sugg...). Also judging by your blog you might like something like PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ; }"'echo $$ $USER \ "$(pwd) $(history 1)" >> ~/.bash_eternal_history' in your .bashrc, so that you don't have to abuse the bash-history for keeping a lifetime of commands around.
- jmathes 14y agoI just tried fish for the first time, and it couldn't do the very first thing I tried to do, which was source my .zshrc. It doesn't have 'export', has some kind of nonstandard syntax for 'alias', and that was enough to get me to give up. Since there are many fish fanboys here, and since it seems like it would be cool if it worked, I'm hoping someone can tell me the simple obvious thing I should have done. Can you help?
- gammarator 14y agoShell rc files aren't interoperable. .bashrc, .cshrc, and .zshrc work only with the shells named on the tin.
- Ideka 14y agoI tried fish some time ago. I thought it was pretty cool, but I didn't end up using it because it lacked Vi(m) key bindings.
- danbmil99 14y agoPlease, some budding genius, get fish to work with Cygwin! Then I can rule the world as fate intends.
- fersho311 14y agoHow to I remove it? I set fish as default, but I realized that none of my scripts in .bash_profile worked... and it's too much work to rewrite everything again.