Fish 2.0 shell beta
ridiculousfish.com
ridiculousfish.com
For me, the as-you-type suggestions and syntax highlighting make fish feel active and responsive, providing instant feedback. I've also had a great response from casual command line users, who love that features like git tab completions just work, with nothing to configure.
It's going to be a fantastic option for command line users. Meanwhile the action is on the github page at http://github.com/fish-shell/fish-shell/
deb http://download.opensuse.org/repositories/home:/siteshwar/Ub... ./
So for e.g. if you're on Ubuntu 12.10 use :
deb http://download.opensuse.org/repositories/home:/siteshwar/Ub... ./
I'm only slightly unhappy about fish requiring python (actually python2 in Arch Linux). AFAIK, this is needed for the web server configuration interface. It'd be much better if fish could be built with this as an addon or optional dependency.
Once I get my shells .rc file converted (I think it's just a few variables & calls to other scripts I'm missing) I'll switch over completely.
Looking forward to the future releases, but looking brilliant so far :)
edit: Jokes aside, this is a nice shell, there are no videos of youtube for it though, I should go through the doc's and record one.
edit2: OK I just tried playing around with the shell. It's got some really nice features, but then I said to myself "hey, lets try doing some work with this, I'd like to get rid of fedora 18's neutered package management GUI and replace it with yumex."
ok easy enough, whoops I forgot to use sudo.
sudo !!
ghoti@localhost ~/Videos> sudo !!
[sudo] password for ghoti:
sudo: !!: command not found
ghoti@localhost ~/Videos [1]>
oh... ok... docs?here it is, right at the very end of the documentation.
"Because history substitution is an awkward interface that was invented
before interactive line editing was even possible. Fish drops it in favor of
perfecting the interactive history recall interface. Switching requires a small
change of habits: if you want to modify an old line/word, first recall it, then
edit. E.g. don't type "sudo !!" - first press Up, then Home, then type "sudo "."
.... WHAT?!ridiculousFish, you arn't kidding around with that name are you?
For an overview of the features in *fishfish*, see the
Which I took as the official name of the shell, before I later realized it was some kind of wierd typo. my name is pronounced fish-fish. I was drawing attention to this https://en.wikipedia.org/wiki/Ghoti . I hate English, you see.The spelling otoh: Yes, that one is broken.
It's for entertainment purposes. Provides harmless amusement to native speakers of languages that have it, especially when English (or Chinese, or whatever underfeatured language) speakers fumble the genders of tables, forks, cars, etc.
More fun than a barrel of monkeys. Also good for poets, makes their work more difficult, thus rarer and better smelling when burnt.
For example, Lojban uses a method of saying phonemes to describe words, like Hebrew, so the number 100,508,290 is just an utterance rather than a sentence.
panono k'io munobi k'io resono
Rather than One hundred million, five hundred and eight thousand, two hundred and ninety.
consistent, simple, fast, unambiguous. numbers are a common occurrence, so they should be fast to speak, So when the extremely common occurrence of me forgetting to include sudo for a command that requires escalated privileges, I expect that task made easier.As an alternative, think of it like this. the specific operation of "put the whole previous command in this place surrounded by new text" is actually a common idiom in calculation programs. Commonly called "ans". Mathmatica actually marks the results of all its computations with a tag (I think t[n]) so you can recall arbitrarily.
That's not to say I'm a stick in the mud, if "sudo !!" sucks, make it better!
How about something that turns a command into a postfix command? Or actually having a hotkey recall the previous command? Maybe a hotkey that looks at the text in the argument then searches up the history to replace? so if I type sudo rm^U it takes 'rm' and searches up history, replacing it with the first match, "sudo rm -rf ~/opt/java"? Lots of possibilities!
Up and ctrl A are independent key strokes. They precede typing sudo, which is a logical train of thought ("Oh I forgot sudo, i should of typed sudo and then x").
! is a commonly used key in English language, and pressing it twice is fast, where as getting two desperate keys is not.
After the proposed action, you end up here:
sudo |something fishy
as opposed to here: sudo something fishy|
which prevents you from writing an addendum to that command.This sounds small, but I was doing what you suggested before I found out I could say "sudo !!" I immediately switched when I found out, and it's now a very common idiom for me. I switched from "up home sudo space" to "sudo space bang bang" for all the reasons described above.
function sudo!!
eval sudo $history[1]
end
[1]: https://github.com/fish-shell/fish-shell/issues/288#issuecom... The law of orthogonality
The law of minimalism
Configurability is the root of all evil
The law of user focus
The law of discoverability
http://ridiculousfish.com/shell/user_doc/html/design.htmlOne drawback is keeping your aliases in sync, but once done it is not much work.
I switched to fish about six months ago and have been very happy with it. I spend a lot of my working day in the command line, though not doing anything exotic, and find it very pleasant to use.
Aliases - in .bashrc - unfortunately will need to be replaced by Fish functions; defined in the "~/.config/fish/config.fish" file by default.
The only real thing that keeps tripping me up with Fish is that it doesn't support shortcuts like "!$ ". I keep on typing that in, but due to the nature of Fish, it can't (or won't) recognise it. But the excellent history functionality does make up for this a fair bit.
Having said that, Fish is by far the best shell I've tried. I gave zsh a go for about half a year and got fed up with the autocompletion and general slowness. As a shell, Fish just behaves quickly and fairly naturally, with few exceptions (!$ ...).
I highly recommend it as an improvement over bash.
I was interested in this comment so I looked into the documentation to find out why this is. Here's a link to the FAQ for anyone else interested:
http://ridiculousfish.com/shell/user_doc/html/faq.html#faq-h... (last question)
I made a slight variation (and also posted it there):
function .runsudo --description 'Run current command line as root'
set cursor_pos (echo (commandline -C) + 5 | bc)
commandline -C 0
commandline -i 'sudo '
commandline -C "$cursor_pos"
end
bind \es ".runsudo"
Instead of outright `execute`ing the command, the above would save the cursor position. You can (theoretically) bind `\cs` so control-s adds the sudo (instead of option-s), but I couldn't get it to work.It's a step backwards. Which I'm fine with, as long as you step forward again, in some way.
For example the exit code of the previous command, instead of POSIX $?, you can get it as $status.
"Betta (pron.: /ˈbɛtə/) is a large genus of small, often colorful, freshwater ray-finned fishes"
Tried posting this to the fish mailinglist, but moderation pending for weeks now.
Instantly switched to fish. Never looked back.
I know it's hard with a CLI, but still if it's colorful better show the baby...
For anyone else having problems finding native packages for Linux, I am building packages for several Linux distros at http://download.opensuse.org/repositories/home:/siteshwar/