15 ms·
Fish shell
- wodenokoto 11y agoLooks interesting and great timing. I got super annoyed today when I saw that the latest version of gnome terminal in Ubuntu stopped supporting changing tab titles via the GUI.
- Karunamon 11y agoFor crying out loud... another instance of the GNOME team's insistence that they know better than their users, no doubt.
- cookiecaper 11y agoI was just thinking about how no one even pretends GNOME Shell is a serious contender any more. Sad that they've squandered their installed base so thoroughly.
- digi_owl 11y agoBest i can tell, Gnome has lost respect for their users ever since they started doing usability testing for their interface. This because they consider any usage that deviate from their planning a indication that the user is an idiot...
- semi-extrinsic 11y agoThe shell is completely independent of the terminal emulator. Fish is the former, while you're complaining about an example of the latter. (My recommendation for a terminal emulator would be urxvt with the tabbedex extension. YMMV.)
- psibi 11y agoI have seen many people recommending urxvt. What is the advantage of it compared to gnome-terminal ? The last time I tried it, it's default font size was too small and I didn't like the font. Does it take some fiddling (configuration etc) with urxvt to bring it a minimal usable state ?
- gh02t 11y ago> Does it take some fiddling (configuration etc) with urxvt to bring it a minimal usable state Yes. urxvt is pretty minimal and will likely be rather ugly by default. However, you can customize pretty much everything via editing your Xresources file. In terms of advantages over gnome-terminal... it's lighter weight and considerably faster (though tbh, speed isn't that important for most people). It doesn't depend on any Gnome services/libraries, so it integrates better with e.g. a tiling WM. It's stable, in the sense of the developers won't cut <insert feature> out. The configuration is very flexible and it's extensible. However, to be honest it's not for everybody. I wouldn't even say it's for "power users", it's really mostly for minimalists and the default configuration is incredibly sparse. If you're dissatisfied with gnome-terminal, I'd probably recommend roxterm or lxterminal instead. IMO, urxvt is more one of those "I already know I want it and I know why I want it" kind of things. That said, I've been using it for a few years and I really like it.
- 0942v8653 11y agoSo far, gnome-terminal is the only one* I've seen that can rewrap text properly when the window width changes. Does urxvt do that? Is there something lighter (than gnome-terminal) that does? * not the only one, but I'm not sure finalterm is really ready to use yet, and it's certainly not lightweight.
- mixmastamyk 11y agoxfce4-terminal is a good choice. I like that it has an additional feature to gnome-term, in that it can highlight the text of a tab when it outputs text. It is nice that you'll know when to check up on long-running tasks. https://en.wikipedia.org/wiki/Terminal_%28Xfce%29 https://en.wikipedia.org/wiki/Terminal_%28Xfce%29
- MindTooth 11y agoBeen using it for almost two years I guess. Find it really nice. Would one day love to be more able to script with it; adding more features for my own needs. Give it a try at least :-)
- landr0id 11y agoThe autosuggestions looked pretty sweet! Here's something that enables similar functionality in zsh: https://github.com/tarruda/zsh-autosuggestions https://github.com/tarruda/zsh-autosuggestions
- Sphax 11y agoFish is great. I've been using it for close to 3 months now, was using zsh with prezto before. I find Fish to be simpler to use and more powerful by default. You can probably have a zsh or maybe even bash setup which does the same fish does, but I don't want to do that.
- distracteddev90 11y agoWould you mind expanding on what fish does out-of-the-box that prezto neglects or hides behind configuration? I am in a similar boat as you and was just wondering what I had to look forward to as a prezto user.
- jeffcox 11y agoThe biggest thing that swayed me to stick with (and optimize/customize) Prezto was the fact that most of the systems I work with have zsh, or a relatively modern version of it available in repos. Can't say the same for fish.
- distracteddev90 11y agoHrmmmm good point. Not one that applies to me particularly since if I'm on a server then I'm usually only running pre-written .sh scripts. (edit: this was a reply to the post below.. not sure how I messed that up.. gah.. such a noob)
- 11y ago
- distracteddev90 11y agoI can clearly see the difference between Fish and regular ol' bash, but struggling to see what value Fish adds above prezto/zsh. Could anyone help me out here?
- bentruyman 11y agoI used Fish for about of year. But I ended up recently switching back to zsh. Stock Fish is far more useful than stock zsh. However, the community around zsh is far more active and I found that most of the functionality that Fish contains and zsh lacks that there are plugins to achieve the same effects. I'd encourage you to check it out. The scripting language in Fish is the best I've ever used for a shell. But it's also incompatible with Bash/zsh.
- ufo 11y agoFish breaks compatibility with traditional shell languages. The syntax is a bit different, the variable expansion rules are a bit different, etc. It also gets rid of a bunch of features and configuration options, such history expansion ("$!!"). The positive side of this is that fish is very simple and has a very pleasant experience out of the box. And this is not just about having "good defaults" - its also about having a good design that encourages having one way to do things. That said, an interactive shell is a very personal thing. The only way to really get a good feeling is to install and check it out.
- lloeki 11y ago> what value Fish adds above prezto/zsh. Could anyone help me out here? - not assuming you're using an outdated terminal so doesn't waste a column when using a right-hand prompt? - lots of async calls, thus really fast.
- hndl 11y agoHow does this compare with zsh + ohmyzsh?
- 0942v8653 11y agoMuch faster, but much less configurable. If you have a decent config on ohmyzsh already, and it doesn't take too long to start up (you have an SSD), there is little point in switching to fish IMO. Especially if you use a lot of these things: https://github.com/fish-shell/fish-shell/issues?q=is%3Aissue+sort%3Acomments-desc+is%3Aopen https://github.com/fish-shell/fish-shell/issues?q=is%3Aissue...
- nirvdrum 11y agoI've been using fish for a while, but generally don't go crazy customizing my shell. What makes it less configurable? It'd be helpful to know what pitfalls to avoid.
- donatj 11y agoFish not being bash compliant was a deal breaker for me. I use zsh with https://github.com/zsh-users/zsh-syntax-highlighting https://github.com/zsh-users/zsh-syntax-highlighting zsh fish like syntax hilighting and am much more happy.
- ori_b 11y agoThe problem is that bash syntax for anything beyond the basics is awful and error prone. It's really hard to make significant progress while still being bash compliant.
- belovedeagle 11y agoI don't know specifically what you're referring to, but zsh has a bunch of extensions to bash syntax (or rather, takes advantage of a lot of "empty space" in the language) which make it possible to just ignore the bashisms and use more sane features when scripting specifically for zsh, while still being able to trivially convert scripts with most bashisms.
- saidajigumi 11y ago> Fish not being bash compliant was a deal breaker for me. Would you mind elaborating here? I'm very honestly curious how the deal gets broken for you. To explain my curiosity, I've long since come to the opinion that we're in the midst of a long, somewhat painful split caused by a design dissonance over improving the interactive shell UX versus creating a better environment for scripting. We've been building alternatives around the scripting problem for ages now, perhaps most notably starting with Perl's ascendance. That legacy continues with Python, Ruby, and now many other tools. I'll still reach for bash/zsh as a scripting tool, but only when the situation absolutely will not admit an extra dependency. In my experience, the pain factor goes up far more quickly with code complexity when it's all just gotta be done in POSIX/bash land. As for the interactive shell UX, fish is notable for simply putting its foot down and just saying "no" to the scripting side. It pushes out POSIX scripting compatibility as an external feature. Calling bash is now on the same level as calling out to {Perl, et. al.}. Whether or not fish is your cup of tea, it's inspired a bunch of competing work in the traditional interactive shells. At the current time, the above efforts are simply going in different directions. We have numerous better options for rich automation than POSIX shell scripting. Likewise, shell scripting just gets in the way of creating better, extensible developer/admin CLI environments. It has too many quirks (hi, quoting hell!) and limitations (real data structures, please) to work well for an extensibility platform.
- WD-42 11y agoFish is great. For those wondering what advantages is has over zsh+ohmyzsh, I can say is that by default it provides most the functionality you want without having to install/tweak anything. Git support is built in (you get a nice git prompt) there's syntax highlighting, amazing history completion, predictive commands, man page completions... and so on. To try it on linux, just install fish and then run "fish", to get back to to bash/zsh just "exit" Only problem is it's not POSIX so there is some weirdness in command substitution, logical operators and stuff. So you still script in sh.
- jasonmp85 11y agoThat was precisely my first question, so thanks for the answer, but I don't really see how that's enough to switch… I've been using this "cleaned up/opinionated" fork 'Prezto' for a while now: https://github.com/sorin-ionescu/prezto https://github.com/sorin-ionescu/prezto If I'm motivated enough to download and install a shell, why wouldn't I just clone Prezto and change one config file to turn on syntax highlighting and git support? Especially when it doesn't bring any "weirdness in command substitution" and I get the great zsh expansions and completions? Anyways, I'll try it out (why not?) but the benefit to me wasn't clear from the page, and even with your direct clarification here I'm seeing more downsides than zsh + Prezto and not a significant upside.
- nirvdrum 11y agoIt's been many years since I've use zsh, so I won't pretend to know what's state of the art with it. I will say that one of the reasons I use fish is it's incredibly easy to customize. My old bash config just came along with me from years of use. Some of it I understood, some of it was just culled from the Internet and kept working, so I kept around (see: prompt customization). But, other than simple aliases, env var setting, and the occasional function, I didn't bother much with shell customization. I find fish simple enough that I can write a new function or tab completion and not have to spend a day figuring out the bash syntax again. Writing tab completions in fish is really, really simple. It's the thing that initially sold me and it's kept me hooked. The history is more powerful than bash, too. Although I find it sometimes works against me. E.g., since it tries to guess your command, things you type in lowercase suddenly turn to uppercase until you manage to disambiguate from a previous command. If you're looking for plugins, there's oh-my-fish [1]. Years back, the term "fish-nuggets" was popular and you'll find repos named that on GitHub with other configuration. I use a couple plugins, but for the most part I don't need them. I think part of that is because fish is featureful out of the box and part of it is because customizing is so easy. I'll usually just add what I need myself rather than trying to find a general purpose plugin. Anyway, not a direct answer to your question -- apologies for that. Hopefully something in there is of use for you, however. [1] -- https://github.com/bpinto/oh-my-fish https://github.com/bpinto/oh-my-fish
- snnw 11y ago2.2 beta 1 was released last week. Testers welcome!
- aldanor 11y agoHas the bug with removing autoloaded functions been fixed yet?
- ridiculous_fish 11y agoIf you mean the fact that a removed autoloader function may be autoloaded again, then yup, that's fixed in 2.2. Here's the issue that tracked it: https://github.com/fish-shell/fish-shell/issues/213 https://github.com/fish-shell/fish-shell/issues/213
- aldanor 11y agoWhen is 2.2 planned?
- 0942v8653 11y agoI used to use fish, and emacs. But when I switched to vim, I had to switch away from fish as well because of its lack of vi bindings. It is a little disappointing to go back to using bash, but as long as bash-completion is working, it's not really a big issue. Of course, I do miss the syntax highlighting. (I would use zsh, but it provides little benefit over bash out of the box and is slower (oh-my-zsh is unbearably slow to start, too).) There are a few things that, while I understand why fish is missing them, I wish would be added: - vi-mode, obviously - Control+R. It is annoying to have to guess how much you must type before hitting the up arrow, instead of having it dynamically displayed. Same goes for zsh vi-mode's ? command. - Well more of a removal, but the backslash in single-quoted strings. I'm used to typing '\', and that's not possible with fish. Additionally, to get one backslash in any sort of regex (sed, grep), you need four backslashes. - Goes without saying, but bash-completion. Fish's completion is mostly history-based, which is great for repeatedly running the same command, but terrible for discoverability - "$()" and any non-splitting command substitution. Currently, it is impossible to pass a multi-line string from a command substitution as a single argument. Which, it may be argued, should be done by piping, but sometimes it is useful to have stdin. - More extensibility in general. I'd like to be able to customize my shell just as much as I can customize my WM. Probably more. Honestly, it was easier to go back to using bash than I thought it would be -- it was almost a relief. fish just feels more polished and clean, especially with regard to escaping, but it misses some very important features. Edit: I heard that there is a vi-mode now. Sounds interesting, but I don't really feel like installing it at the moment, and if I ever try another shell it'll probably be zsh.
- nextos 11y agoI run zsh barebones, and I've never been able to get some tab completions to work on bash as well as in zsh. But it's probably possible. E.g. on some patterns involving *. Care to share your setup?
- 0942v8653 11y agoNo, my bash is mostly the default that Debian provides (only semi-relevant option I have enabled is globstar, which is just the recursive globbing). I guess I didn't mean that zsh wasn't that much better, just that I didn't think it was that much better. I may switch to zsh eventually, but I just switched shells and I don't really want to do it again very soon.
- Alupis 11y agoSeems like their slogan might be a little limiting. > fish is a smart and user-friendly command line shell for OS X, Linux, and the rest of the family. I'd wager majority of OSX users are not going to be changing shells, but by specifically enumerating OSX as the first example use, it feels like the others are mere afterthoughts. Would be better put: > fish is a smart and user-friendly command line shell for the entire *nix family.
- cheese1756 11y agoWhile that wording is more precise, the current wording is better for promoting the software. Ordering by market share makes sense, and users who are quickly scanning the page for compatability information don't need to make the connection between OS X or Linux and *nix, and can instead recognize their current system easily. If this were documentation the change should be made, but it's probably not the right move on a website focused on promotion.
- mturmon 11y agoThe lead developer is on the Apple AppKit team.
- xbryanx 11y agoHyperpolyglot has a nice breakdown of the differences between bash, zsh, and fish. http://hyperpolyglot.org/unix-shells http://hyperpolyglot.org/unix-shells
- eevilspock 11y agoHyperpolyglot's typography, colors, layout and simplicity are beautiful.
- codychan 11y agoNice link.
- anonfunction 11y agoFun with fish, frogs and fortunes: https://gist.github.com/montanaflynn/04246fc5da998d15e713 https://gist.github.com/montanaflynn/04246fc5da998d15e713
- lmz 11y agoI don't get the logic behind a shell initialization file that tries to 'apt-get install' anything.
- qznc 11y agohttps://github.com/qznc/dot/blob/master/config/fish/config.fish#L152 https://github.com/qznc/dot/blob/master/config/fish/config.f... I use something similar: tux instead of frogs and a personal fortunes file. Mine also prints the current date, hostname and uptime.
- anonfunction 11y agoNice! I've actually adopted a minimal approach as of late: https://gist.github.com/montanaflynn/da1f0565c95a5a37b458 https://gist.github.com/montanaflynn/da1f0565c95a5a37b458
- tambourine_man 11y agoSince Apple seems forever stuck on an ancient Bash version (due to GPL 3, I believe), I keep hoping they switch to Fish (or a home built solution, à la Swift, which could be interesting) with every OS release.
- robin_reala 11y agoFish does feel very Appley to me. I wouldn’t be surprised.
- bjg 11y agoThat makes sense, the create of fish works at Apple: http://ridiculousfish.com/blog/about.html http://ridiculousfish.com/blog/about.html
- pooriaazimi 11y agoWell, "ridiculous_fish", the guy who sort of revived the fish shell is an engineer on the AppKit team at Apple: http://ridiculousfish.com http://ridiculousfish.com I remember installing and using fish 4 or 5 years ago; it was not a great experience -- but after he "took over", I switched and couldn't be happier with fish.
- serth 11y agoInteresting! My impression was that Apple engineers were prohibited from building anything outside of work.
- waterhouse 11y agoAccording to Wikipedia[0], fish was originally created by Axel Liljencrantz in 2005. The commit history from GitHub does go back that far (I imagine it was imported somehow), so I assume it's complete. The first commit from ridiculous_fish is in 2011. So if there is such a policy at Apple, I would expect that it doesn't prohibit contributing to already-public projects. [0] http://en.wikipedia.org/wiki/Friendly_interactive_shell http://en.wikipedia.org/wiki/Friendly_interactive_shell
- barosl 11y agoI definitely recommend fish to every newcomer to Unix. It has sane defaults, colorful output, and so many features that work out of the box. That said, there is a long-standing issue regarding inline environment variables.[1] Briefly speaking, fish does not recognize the `NAME=value command` form. So you should use `env` to work around this. This may not be a deal breaker, but I'm a bit annoyed, and migrated to zsh. I would call zsh the opposite to fish. It has insane defaults, is highly customizable, and has so many features that are initially disabled. After hours of configuring it, I loved it.[2] Since then whenever I set up a new Unix machine zsh has been the first thing to install. So, I would recommend zsh for the people who are used to Unix. If not, or you don't bother to customize it, there's always fish. There is no place for bash. [1] https://github.com/fish-shell/fish-shell/issues/438 https://github.com/fish-shell/fish-shell/issues/438 [2] https://github.com/barosl/baroslized-settings/blob/master/.zshrc https://github.com/barosl/baroslized-settings/blob/master/.z...
- nilved 11y agoUsing `env` is very much a feature, not a bug. It's part of fish's philosophy to use programs rather than builtins wherever possible. It's good practice to use `env` even when using other shells.
- ddoolin 11y agoJust to add to the first line, it also seems fairly well-commented in the code, at least the couple pieces I've looked at. This is really good for me as I often check the source first and helpful (or any) commenting is quite rare.
- themodelplumber 11y agoFish is great. I used it for a couple of years, right up until I had to install a software system that made extensive use of bash scripts that were incompatible with it. At the time I was in too much of a hurry to figure out how to tell the software to explicitly use bash, or something along those lines.
- eridius 11y ago
- ahmetmsft 11y agoFor those who like the autosuggestion feature of Fish but can't leave oh-my-zsh, there's a plugin for that: https://github.com/tarruda/zsh-autosuggestions https://github.com/tarruda/zsh-autosuggestions
- wldcordeiro 11y agoFor those who use antigen you can add this line to your .zshrc to install this. antigen bundle tarruda/zsh-autosuggestions
- kolev 11y agoFish is definitely good, but not great enough to justify a switch from Bash. I maintain tens of thousands of lines of Bash scripts and was considering switching to Fish once, but decided it wasn't worth it. When you compare the *nix shells to PowerShell, they feel prehistoric. We all use grep, sed, awk, and the likes, but don't you get tired of having to deal with unstructured data and gross limitations of the shell like basic data structures. Yes, the purpose of the shell is to be quick and dirty, but it doesn't take that much to add some programming sanity and some standards for structured data! There's a port of PowerShell to Mono, Pash [0], but it's so heavy in terms of requirements and has somewhat unclear future. Of course, there's also Xonsh [1] and Xiki [2], but they are pretty new. [0] https://pash-project.github.io/ https://pash-project.github.io/ [1] http://xonsh.org/ http://xonsh.org/ [2] http://xiki.org/ http://xiki.org/ P.S. One of my favorite Fish feature is Event Handling [3]. [3] http://fishshell.com/docs/current/#event http://fishshell.com/docs/current/#event
- mixmastamyk 11y agoUsing fish doesn't mean you have to stop using existing bash scripts.
- kolev 11y agoI understand that, but my point was that Fish is yet another big missed opportunity.
- mixmastamyk 11y agoI'm still not certain what you are missing from it? It's not perfect but good enough for an interactive shell at this point. Good to stick to .sh for deployed simple scripts on 'nix though. Fish won't become PowerShell, that's for sure. I like the idea of PowerShell, but it's a bit too ugly in person. I'm happy enough with cmd, cmder, and Python for scripting.
- joshkraemer 11y agoFish (like zsh) may leave a lot to be desired, but it is an enormous improvement over bash. I have been using fish for several years, and especially its autocompletion is indispensable to me. (However, I use it as an interactive shell only; TCL is my scripting language of choice.)
- jordanpg 11y agoI'll switch to one of these new-fangled shells if I ever master bash. In any case, bash -- in one of its many forms, colors, and sizes -- is what I usually find myself in front of.
- deleted 11y ago[deleted]
- shirro 11y agoI tried really hard to use Fish for awhile and if the shell was just history, completion and sane defaults (and it is for some people) it would have a very good case. But not being even remotely compatible with bash drove me nuts as the shell is my REPL.
- samspot 11y agoIs there a way to use this in the excellent Git Bash for Windows? Because Git Bash is amazing and I don't see myself going back to cygwin anytime soon. I understand how they could be very incompatible because of the way Git Bash is built.
- lamentspants 11y agoTheir shitty webpage still requires javascript, though!
- cabalamat 11y ago>Sane Scripting -- fish is fully scriptable, and its syntax is simple, clean, and consistent. You'll never write esac again. I can already do sane scripting, with Python. I suspect that as soon as I try to to anything slightly complicated, Python leaves fish scripting behind.
- _jomo 11y agoI've been using fish for at least a year now and I absolutely love it, altogether with oh-my-fish [0]. I don't mind the incompatibility to bash, but using "; and" instead of "&&" is a little annoying. Everything else is great. It actually auto-completes remote hosts and paths when you type ssh or scp commands! It also fuzzy-completes filenames when you're lazy (or have typos in them) and a bunch of other neat things. The up-key function after typing in parts of a command and ^F have probably saved me hours of time wasted in bash. 0: https://github.com/bpinto/oh-my-fish https://github.com/bpinto/oh-my-fish
- cbd1984 11y agoAnd their webpage is broken
- ridiculous_fish 11y agoHey, 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/ 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 https://www.youtube.com/watch?v=ncVWbT-jWAw - A redesigned theme and prompt chooser: http://fishshell.com/beta/assets/img/screenshots/web_config.png http://fishshell.com/beta/assets/img/screenshots/web_config.... - Tons of new tab completions!
- deleted 11y ago[deleted]
- ledbettj 11y agoCould you elaborate on 'the symlink problem?' I just installed 2.2 and symlinks seem to function as expected to me.
- ridiculous_fish 11y agoSome background: the "symlink problem" refers to this: http://fishshell.com/docs/current/faq.html#faq-cwd-symlink 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 https://github.com/fish-shell/fish-shell/issues/1957
- Aloha 11y agoThanks! 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.
- synthecypher 11y agoComes around once in awhile. It's good, but quite a few things are incompatible from what I remember after trying it a year ago.
- bajsejohannes 11y agoI've used fish shell for about a year and I love it. I recently stumbled upon the design document, which summarizes well why I like it so much: http://fishshell.com/docs/2.0/design.html http://fishshell.com/docs/2.0/design.html I actually think that design document could be a good start for a lot of projects.
- gizi 11y agoI do quite a bit of programming in bash. One construct in bash is absolutely super: process substitution. You can read the output of a program as if it were a file with the construct: <(myprogram). Bash is a fine tool, but it has a number of flaws that prevent me from using it for certain tasks. * Functions can only return a status number. Functions are always subshells. * The hashtable (associative array) syntax is unpalatable, unreadable, and a real abomination. I simply don't use it, because it gives me a headache. * I can never remember the horrible syntax for most string functions. * You cannot reasonably store an arbitrary json structure in memory. Embedded lists and hashtables are absolutely unwieldy. * Bash has no concept of FFI (Foreign-function interface). So, you cannot load an external library and invoke functions it it. These problems are not particularly impossible to solve, but the Bash authors will probably never do it. Therefore, the final reproach against bash is that they do not publish their source code in an environment similar to github, where users can file their issues and improvement requests. In other words, the bash authors are not in communion with their users. In what way can the fish shell address these problems?
- e12e 11y ago> One construct in bash is absolutely super: process substitution. You can read the output of a program as if it were a file with the construct: <(myprogram) Actually had to look that one up[1] -- unfortunately you're right, it's not posix (I don't think I would've tried it in a [ed: non-interactive] script, but I agree it is very nice). I wonder if you could make a function as a work-around, something like: r() { #r(first some args <(second other args)) # Use a fifo: ff=$(mktemp fifo) # might as well use that for parsing the commands... echo "$*" > $ff first=`sed -re 's/\((.*) <\(.*/\1/p' < ${ff}` echo "$*" > $ff second=`sed -re 's/\(.* <\((.*)\)/\1/p' < ${ff}` ${second} > $ff & ${first} < $ff } Adjust for parsing the direction of the <() vs >() etc... Not particularly robust, and the above is un-tested... Just an idea. I'm not convinced trying to parse shell command lines for macro functionality is a good idea in general... [1] http://mywiki.wooledge.org/Bashism http://mywiki.wooledge.org/Bashism
- unhammer 11y ago
- cbd1984 11y agoIf they can't write a page without useless frills, they can't write a shell without useless frills. Useless frills are buggy and slow.
- g8gggu89 11y agoYou should have called it the clamshell.
- BorisMelnik 11y agoI've been a Linux command line (bash) user for 20+ years now and I must say, I would really consider switching to this. I haven't even started to dig into the features yet, but the filename and parameter completion alone is enough to stop me from pulling my hair out. Filenames are getting very long w/ so many special characters, this is great. I also like the idea of having a web based config. I really won't miss wrestling with bashrc and bashconfig in vi. Definitely will try this.
- aerique 11y agoI've been using Unix (and mainly Linux) for 20+ years as well. First using bash, then zsh the last couple of years and I recently switched to fish. The switch was fairly effortless and it took maybe 2 days to not even notice the differences anymore. I do have to look up some things now and then but overall it has been an improvement. What I like about fish shell is the same why I use the i3 tiling window manager. It has sane defaults and it clicks with how expect things to work, how I would design them. Sane defaults mean a minimal config file so it's easy to look up problems and change things. I'd at least try it out if I were you.
- BorisMelnik 11y agohow long have you been using the i3 tiling window manager?
- qznc 11y agoYay, I am specifically waiting for "New `fish_preexec` and `fish_postexec` events are fired before and after job execution respectively" [0] It allows to implement something like undistract-me [1] for fish. [0] https://github.com/fish-shell/fish-shell/issues/1549 https://github.com/fish-shell/fish-shell/issues/1549 [1] http://mumak.net/undistract-me/ http://mumak.net/undistract-me/ edit: Just installed the beta and implemented it (status WorksForMe) https://github.com/qznc/dot/commit/8cf55564383ed93af148234d2e6b3826e7c6f325?diff=unified https://github.com/qznc/dot/commit/8cf55564383ed93af148234d2...
- talex5 11y agoI've been using fish for a few months now (switched from zsh). Really nice to have good defaults and minimal configuration, and the suggestions based on previously entered commands are great. The main issues I have compared to zsh are: - No bracketed paste mode. If I select multiple lines of text and middle-click-paste into zsh, it adds the whole lot as a multi-line input and lets me review the commands before pressing Return. fish just starts blindly executing them, which can cause accidents. - Chaining commands is harder. In zsh `foo |& less` pipes stdout and stderr. Also, fish's `foo; and bar` is longer than `foo && bar`. - Hashes in words start a comment in fish. e.g. `opam pin repo#branch` is treated as `opam pin repo`, pinning the wrong branch. zsh only treats # as a comment at the start of a new word. - While completion history and `set -U` are really useful, it sometimes forgets everything and I have to start again, which is quite annoying. On the whole, very happy with it though!
- black_knight 11y agoFish and zsh grew out of bash, which again was a free replacement of Bourne Shell — but from Bourne Shell there was another interesting development, namely rc[0]. rc was developed at Bell Labs as the successor of Bourne shell. I usually prefer its syntax to the bash derivatives when scripting. It has a much cleaner feel to it. [0] http://plan9.bell-labs.com/sys/doc/rc.html http://plan9.bell-labs.com/sys/doc/rc.html
- jwarren 11y agoI used fish for at least a year, maybe more. I eventually switched away to zsh. Whichever theme I used, rendering the status of git repos took ages, and the breaks from Bash syntax were just a bit too much. I loved the overall friendliness though, it was a genuine pleasure to use for the most part. I hope to use it as my default shell again some time in the future.
- bert_cwchang 11y ago> Whichever theme I used, rendering the status of git repos took ages I don't think this is fish's issue. In fact, this will happen in any shell (bash / zsh) if your git repo is big. The solution is either (0) speed up `git status`-like commands by enable git cache, or (1) use async showing git repo status just like prezto.
- dkns 11y agoWould you mind elaborating a bit? When I switched to zsh I started with oh-my-zsh but soon uninstalled it as it was too much for my needs. I started again with simple .zshrc file and I'm hesitant to going back to frameworks like prezto but working on a really big project in git slows down zsh noticeably.
- iagooar 11y ago3 years using Fish shell now, and wouldn't go back to anything else. The autocompletion (including fuzzy matching) feature is just so vastly better than in other shells. I must say I am not a huge shell wizard and use only a handful of custom functions, but I've found shell to be very pleasant to work with and would recommend it to any web developer who doesn't get "dirty" with shell scripting a lot. The only problem I had was that I had to explicitly set the shell used by vim in order to make vim plugins / configs work properly by using this line: set shell=/bin/bash
- unhammer 11y agoPretty flashy :-) I like how it told me to use () when I tried typing $(), and the autocompletion is quite impressive. However, how do you work around the lack of <() and >()? E.g. if I want to do the equivalent of $ diff <(xzcat foo.xz) <(xzcat bar.xz) ? EDIT: nevermind, I see the fish version is $ diff (xzcat foo.xz|psub) (xzcat bar.xz|psub) which actually does the mkfifo dance for you :-)