20 ms·
Fish shell
- WalterGR 5y agoPreviously: https://hn.algolia.com/?dateRange=all&page=0&prefix=false&query=Fish%20Shell&sort=byPopularity&type=story https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...
- justusthane 5y agoThis shouldn't be downvoted. I don't think that this person is necessarily complaining that it was reposted; rather it's sometimes nice to be able to go back and see previous discussions.
- WalterGR 5y agoExactly, thanks. There's plenty of gold in those old threads.
- mehdix 5y agoI did myself a favour, and instead of learning a new shell read through grymoire's POSIX shell tutorial: https://www.grymoire.com/Unix/Sh.html https://www.grymoire.com/Unix/Sh.html.
- dividedbyzero 5y agoI'm a fish user for over 10 years now; for me a big part of the appeal of fish was (and still is) that I could get a much better quality of life without having to train myself to wizard-level with the less ergonomic but ubiquitous bash. I'm sure any black belt bash wizard will leave me in the dust on every metric, but that's fine, I don't need my shell environment to be super optimized for maximum effectiveness, it just has to be good enough to do my work and get out of my way. Fish does that very well for me.
- smoldesu 5y ago+1 for this. Fish is kinda like the Emacs of terminal editors in my mind: it's more dependent on keybindings than it is command invocations.
- superasn 5y agoI definitely agree with you, it's just not worth struggling with something you don't like. For me this was vim. After struggling for many years with this ancient and difficult text editor peddled as the holy grail of productivity one day i just said fuck it and switched to a more sane text editor called nano. My life became instantly better and I've never looked back. I really wish I made the switch earlier instead of suffering through the never ending annoyance of vim because i at the time I thought i was still learning it and one day it will all be worth it.
- mehdix 5y agoI'm glad that you are happy with your setup. Every one of us is so special that there could be no one size fits all solution. The reason I started going back to bash and to some extent POSIX shell is a simple question which I nowadays ask myself: do I know why I am using this? or: do I _really_ need this? When I lack a strong reason for picking up something, I drop it, and when I can live without learning a new tool, I do it.
- Confiks 5y agoIn case you were wondering, here are some people who are either slightly amused or just as confused [1]. [1] https://twitter.com/search?q=a%20command%20line%20shell%20for%20the%2090s%20&src=typed_query&f=live https://twitter.com/search?q=a%20command%20line%20shell%20fo...
- bitcharmer 5y agoMost of them were unable to voice any concerns beyond mocking the outdated motto. It seems like these people are clueless.
- cies 5y agoTried it, liked it, but the incompatibility with copy-pastable scripts online made me switch back. If those little copy-paste sh/bash scripts would have worked, I'd still be on Fish.
- FriedrichN 5y agoThe problem with these alternative shells (to me) is that you'll have to install the shell on other machines before you can use the script you wrote. Bash being present on just about all Linux distros makes it useful, even if the scripting is quite terrible. And if I'll have to do something more complicated I'll use a proper scripting language like Python instead of learning another shell language. It would be great if bash was a little less crap though.
- hak8or 5y agoI switched all my home machines' shell to fish, and my work computer also to fish, and it has been an amazing productivity boost for myself. The extremely ergonomic way it represents history (old commands) is what does it for me. If I need to script something, I always do it in bash (which is easy to transition to from bash). I don't use the fish language for any scripting because of incompatability, but as a command line interface to my systems it has been a massive boom to my quality of life. I could not reccomend it more.
- dividedbyzero 5y ago> I always do it in bash (which is easy to transition to from bash) Did you mean dash?
- e3bc54b2 5y agoNit: Fish Shell is a bit redundant, as Fish stands for "Friendly Interactive Shell". Now that's out of my system, fish is fantastic and made me realise importance of sensible defaults. I tried zsh but configuration took longer than I would have liked, and oh-my-zsh is too bloated to start instantly. Compared to that, I have practically 0 modifications in my Fish config, apart from few aliases. I don't use fish for more than one-liners, and I never intend to. It is a very nice very fast and very lightweight way to interact with my system, which I believe was the original point of Shells in general. Either way, glad to see it on frontpage.
- t3chguy 5y agoI could not agree more, I'm sure zsh can do everything fish can and a lot more, but getting it to that stage would take me more time than I'll spend interacting with fish for the next few months
- s_dev 5y ago> Nit: Fish Shell is a bit redundant, as Fish stands for "Friendly Interactive Shell". Isn't this a common trope with software e.g. "WINE is not an emulator" or people saying "ATM Machine".
- cnity 5y agoYour first example is a recursive acronym (actually a backronym in this case), and is deliberate. That's the trope. Redundancy is usually just incorrect but common use of natural language. Edit: I'm wrong about WINE being a backronym, but it is a recursive acronym.
- cassepipe 5y agoAnyone using fish in Vim mode? Does it work well? Last time I tried I had not such a good time. Would love to see a tutorial on how to use it efficiently.
- urxvtcd 5y agoI always wondered why anyone would do this. IMHO modality and shells just don't get along well. Besides that, readline-like bindings are both good enough and you're likely to encounter them in the wild when working with ssh, database prompts, and so on.
- karlicoss 5y agoYep, what kind of issues you had? Works well for me. Not sure what do you mean by efficiently -- but my tip is pressing alt-e to edit the command in external editor when it's multiline (although it's not limited to vi mode in fish)
- __jem 5y agoIt interacts pretty poorly with, e.g., terminals in IDEs, but is essential for my day to day in my regular terminal emulator. Worth noting I'm not a vim power user, but I could live without vim keybindings for moving around, it just feels more naturally.
- iamevn 5y agoI have tried vim mode in fish and I didn't like it. I find I don't really need vim bindings in the shell because I'm almost never editing. Alt+e to open the current command line in my editor works really well for me when I do want vim.
- ddek 5y agoSo the massive drawback of fish is it's incompatible with bash (and other shells people use). If you're in fish, this is easily remedied because almost every machine has bash too. However, you can't expect another machine to have fish. However, I just really like fish. I also live out of my own shell, and I don't spend much of my life remote-ing into other machines. When I do, my mind flips into bash just as easily as I flit from TypeScript to C#. To me, this is largely a non-issue, aside from when I need to work out how to set the `$SHELL` variable for a program that expects bash.
- xvolter 5y agoI agree entirely. I've tried zsh and other replacements, but I keep coming back to Fish. It's intelligent, loaded with features, and ohmyfish adds a lot. No other machine I connect to has fish, but for my own machines, it's my top choice. Still, I write a lot of utility scripts in bash for the compatibility and it can be annoying when I copy a command and I know it won't work because it uses some unsupported syntax in fish. Every now and then, and it is rare, I switch to bash locally to run something.
- mxcrossr 5y ago> However, you can't expect another machine to have fish. I can, because whenever I get access to a new machine I download and compile it!
- CRConrad 5y agoWell lucky you, that you always get download-and-compile rights on any machine you access. Not everyone is so lucky.
- mattgreenrocks 5y agoAbout 98% of common POSIX shell usage is covered by fish, right down to identical syntax. (Not everything is.) Biggest tip for fish switchers: set fish as your terminal's shell instead of changing your login shell.
- 5y ago
- anentropic 5y agoWell, I guess it's a fish shell
- nofunsir 5y agoMy FISh setup: Fish + oh-my-fish + theme-bobthefish + powerline modified fonts One of Fish’s features I like the most is a per-directory command history stack, on top of the normal history stack.
- divbzero 5y ago> a per-directory command history stack I’ve used Fish for years and always suspected it offered command history by directory. Fish really “just works” so I never felt the urge to investigate and verify my suspicion.
- nofunsir 5y agoIt also seems to have a type of per-command history. As you begin to type the command, you can tab through and auto-complete other similar commands you’ve done.
- onebike 5y agoI love Fish, pairing it with Starship prompt (https://starship.rs https://starship.rs) makes a truly powerful combo with almost no extra config necessary.
- khaledh 5y agoI love Fish. Here's my list of essential plugins: - jorgebucaran/fisher (plugin manager) - IlanCosman/tide (prompt) - jhillyerd/plugin-git (git abbreviations) - PatrickF1/fzf.fish (history finder, and other autocompletion) - jethrokuan/z (directory jumping) - jorgebucaran/autopair.fish (auto-complete quotes) The auto-complete experience is what I like most about Fish, followed by abbreviations (not aliases) auto-expansion.
- lbhdc 5y agoI switched to fish in the last ~6mo, after bash for years. I feel like its made me more productive, especially the auto complete. I have read a number of opinions concerned about the portability of fish. Perhaps, my own use case is different, but I have experienced very few compatibility problems. The most common compatibility problem for me is copy pasting a shell command with `$(...)` in it. Switching to bash and re-pasting is pretty effortless, but this doesn't happen often.
- dashezup 5y agoFish is fast but the thing which stops me from keep using it is that fish is not POSIX compliant. so I just use zsh for interactive shell and dash for scripting (and use bash when dash is not enough). It's easy to configure zsh to be mostly like fish. Here is my zsh setup, I don't use any zsh framework, just install them with my package manager and source related plugins in $HOME/.zshrc.local (except powerlevel10k which I need to clone the repo and source powerlevel10k.zsh-theme) - grml-zsh-config[1]. lots of useful base stuff - zsh-completions - zsh-autosuggestions. fish-like autosuggestions - zsh-syntax-highlighting. syntax colors - fzf-key-bindings.zsh / skim-key-bindbings.zsh. fuzzy file/history search - powerlevel10k. fancy prompt [1] https://grml.org/zsh/ https://grml.org/zsh/
- gfiorav 5y agoI've been using fish for a year. I don't bash much, so that's a data point. I really enjoy it. Faster than zsh once it's loaded with all the plugins that make it behave like default fish.
- mattgreenrocks 5y ago> Faster than zsh Definitely, and it's noticeable. > once it's loaded with all the plugins that make it behave like default fish Fish also feels more cohesive in this situation; a case of built-in features being more refined due to being under the purview of maintainers and shipped to everyone.
- s_dev 5y ago>Definitely, and it's noticeable. I've heard people say the same about zsh vs bash but when macOS updated I never even noticed.
- apatheticonion 5y agoI tried it on my mac but all the paths are underlined like hyperlinks and it's strange. I'm using iterm2
- Symmetry 5y agoI've been using fish for years and adding fish bindings to ROS remains my biggest open source contribution. It's a joy to use.
- notadev 5y agoUnrelated but the logo reminded me of some Internet culture. Way back in the AOL days where phishing was coined, hackers referred to phished accounts as <><. The little programs that spammed "I'm from AOL what is your password?" messages were called phishers or baiters and the programs that held hacked accounts and their password, or <><, were called phish tanks.
- thinkyfish 5y agoI really like fish shell. After ditching bash and picking up ksh for its much nicer array notation, I needed a frontend shell, and it really fits the bill. Its defaults are really friendly, and it is very configurable.
- alberth 5y ago>” Finally, a command line shell for the 90s” I had a good laugh when I read the title of the website praising to be modern 31 years ago.
- chromatin 5y agoIn case others don’t know, I recently learned that Python virtual environments will install an activate.fish script :)
- adelarsq 5y agoFor Shell Scripts use F# ;) https://twitter.com/adelarsq/status/1390459435194241025 https://twitter.com/adelarsq/status/1390459435194241025
- spoiler 5y agoI've been using fish for about seven or so years now. I've read a lot of people complain about the POSIX incompatibilities, and while I agree that that used to be a relatively annoying issue at first, most of it is not a problem in newer versions of fish (missing && was annoying, for example). The fact the syntax diverges from bash/zsh is IMO a great boon to fish. I've enjoyed writing fish scripts much more than zsh/bash scripts. At work I write both for things that runs on dev machines, since I converted a lot of colleagues to fish, and writing the bash/zsh ones is usually not that much effort to write. Sure, it's a bit of a maintenance burden in theory, but it's not become a problem in practice yet. A few times I had to wonder "how do I sensibly do this in bash/zsh" when it was pretty friction-less in fish, but it hasn't happened often. Another thing regarding compatibility: I've never had it be a major problem when things _truly_ were incompatible, since as others in the thread mentioned, I could just do `bash`, run the script and then CTRL-C.
- deleted 5y ago[deleted]
- ElijahLynn 5y agoFavorite feature of Fish shell is `abbr` abbreviate. Which expands the abbreviations after <enter> or <space> allowing it to reveal the magic behind it, for screensharing/observability and for modification. I use it with --long-options too so the abbreviations are more self-documenting. e.g. `abbr --add --universal -- gg 'git log --graph --oneline --all'`
- spacefiish 5y agoI love Fish, I've found it super easy to write small helper utilites for working with virtualenvs or opening Sublime projects. The barrier to scripting is so low and the language so approachable that if I have an idea for a new function I'd like to write, I can get it working in < 10 minutes almost every time. +1 to all the comments about `abbr` for abbreviations, makes working with Git great since I can still tweak the command before if I need to before it runs, plus it helps me remember what the command actually is instead of just setting & forgetting like with an alias.
- cuddlybacon 5y ago+1 for scripting. I wrote so many more small scripts for myself. Since I didn't need to consult a syntax manual every, the friction was low.
- pyuser583 5y agoPersonally, my favorite shells are Ipython, Ammonite, and JShell.
- iamevn 5y agoI think my biggest annoyance using fish daily for years is with certain string subcommands just barely not having enough power to replace sed/grep/awk usage in bash scripts but that's been improving. I find it so much easier to quickly throw together a function or a script for whatever random task I want to do in fish than in bash and actually have confidence that it'll work without tons of trial and error and needing to look up syntax.