Earlier quoted context omitted.
>There is no place for bash. Just curious, why do you say this? I've used bash for years for basic command line things and now it sounds like I've been missing out on great features that other shells have.
Sorry if my words were too strong. I said that because I like tools that do a particular job well. bash might be a middle ground tool that has moderately sane defaults and features. However, in other words, bash is inferior to fish with regard to easiness, and is worse than zsh with regard to feature set. I'm not a fan of such a tool. I believe the world could have been a better place if they adopted fish as a defaul…
Fish shell
171–180 of 188 posts
Re: Fish shell
#172However, how do you work around the lack of ()? E.g. if I want to do the equivalent of
$ diff
?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 :-)Re: Fish shell
#173I 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: 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, u…
> 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: 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 a…
Re: Fish shell
#174Fish 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…
Is there a simple, sane introduction to PowerShell? I've read through a dozen PowerShell scripts in the last week and find them incomprehensible compared to Bash scripts. I know I learned Bash 15 years ago, but it's not just familiarity that's causing the confusion
Re: Fish shell
#175Earlier quoted context omitted.
Using fish doesn't mean you have to stop using existing bash scripts.
I understand that, but my point was that Fish is yet another big missed opportunity.
On the other hand, Fish is mostly focused on being a powerful interactive shell. Its all about having good auto completion (fueled by parsing manpages), history search, etc.
I do believe that its very hard to have a shell language thats good at these two domains at the same time and that we are better off having separate languages for each. Trying to solve both these problems at once is what made bash into the mess it is now in the first place.
Re: Fish shell
#176Earlier quoted context omitted.
Fish does feel very Appley to me. I wouldn’t be surprised.
Well, "ridiculous_fish", the guy who sort of revived the fish shell is an engineer on the AppKit team at Apple: 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.
Re: Fish shell
#177Earlier quoted context omitted.
> vi-mode, obviously As you said at the end, Fish does have this. I don't know if it's full-featured enough for you though. > 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 When you start typing a command-line in Fish that matches a previously-typed command, it automatically shows the rest of the line as an available completion…
> When you start typing a command-line in Fish that matches a previously-typed command, it automatically shows the rest of the line as an available completion, and pressing ^F or the right arrow will complete it for you. ^R is more powerful, though; it matches at any point in previous commands, not just at the beginning. > The lack of this functionality actually really kills my ability to use any other shell. You can…
No you can't. What I specifically described was the autocomplete of the line, not the ability to search history (which is manual complete instead of autocomplete).
Re: Fish shell
#178Earlier quoted context omitted.
That's a different problem, though. /bin/sh must point to a sh-compatible shell. fish is not a sh-compatible shell. Therefore, any script using /bin/sh will never attempt to run as fish (as /bin/sh will never point to fish). The reason I'm having a hard time imagining how a scripting system that relies on bash would fail with fish is because I can't imagine how one would actually write a script that is executed with…
There's just one scenario: a completely absent #! line. It's an easy fix, just add the line, otherwise 0755 scripts with no #! do execute using the current shell.
> cat foo
echo wat
> ./foo
Failed to execute process './foo'. Reason:
exec: Exec format error
The file './foo' is marked as an executable but could not be run by the operating system.
It does however work in Bash. So this appears to be a bash-ism, rather than an OS feature.Re: Fish shell
#179Earlier quoted context omitted.
Are you on a mac by chance? I ran into a really weird problem on OSX, still happens as of the latest Yosemite beta, where if you have a lot of system logs laying around, the shell takes an inordinately long time to start (10+ seconds) and do autocompletes. If you clear out your logfiles by trashing /private/var/log/asl/*.asl, there's a pretty decent speedup.
A permanent fix for this is to create a file called .hushlogin in your home directory. I do it on all my machines.
Do you have any insight as to why this happens? It smells like some kind of log parsing to present messages on login, but I've never received any such messages, and a quick vgrep of the various profile/rc's never turned anything up.
Re: Fish shell
#180Earlier quoted context omitted.
I've tried to use and get comfortable with Powershell but it's insistence on types and overly heavy syntax just get in the way for my primary use case for shell scripting. (e.g. quick and dirty hacks) I don't in fact get tired of unstructured data and the limitations of the shell like basic data structures because nine times out of 10 the data I have to work with in a shell is exactly that. Unstructured and basic. No…
PS> echo foo,bar,baz | ? { $_ -ne "foo" } The sed command is not a shell. You can use sed in PowerShell.