Neither.
I use fish.
It has everything a shell should have. Automatically suggests command from history, color syntax, everything you expect from something made later than the 90's.
If you decide to give it a try (Please, do), you're free to use my config.fish file!
Fish is the "Friendliy Interactive SHell. The idea is that it's a shell with good defaults that helps you with a few smart features - autocompletion and suggestion (which also draws from command history), syntax highlighting (especially marking a command if it doesn't exist, but this also ties in to the completion system). It's also not bound to POSIX or other standards so it is free to change the scripting language in a few ways (there's no "$@" or "$*", it's "$argv", word-splitting is much saner than bash)
Basically, bash is the old dinosaur, not actually bad, but lacking in a few features (not as many as people think) and it needs configuration to be usable.
Zsh.... is rather powerful, but bound to POSIX and when I last tried it my zshrc was even larger than my bashrc before I considered it usable (e.g. disabling autocorrection).
Some things I think are of note:
> But this is a CLI app which a) I run an absolute maximum of once every few seconds
I have a usecase where mercurial's startup is actually prohibitively slow:
For vcs integration (branch display and such) in shell prompts. For fish, I've actually written fish code to figure out if the current directory is inside an hg repo instead of relying on hg root
or similar, because just calling that takes ~150ms - which you'd pay on every single prompt. The script takes under a millisecond.
I'd love to rely on hg directly instead, because I'm not quite sure there isn't some weird edge-case where my script fails, but as it stands that script has allowed us to activate hg integration by default.
Switch statement docs here, with relevant information:
>Note that fish does not fall through on case statements. Only the first matching case is executed.
I use Fish which is configured out of the box with a lot of convenience stuff (colours, autocomplete, inline history searching).
The only potential downside is that it's not bash compatible, though I've never had that be an issue.
Since it's so well configured (for me) out of the box, all my config.fish (.bashrc equivalent) contains is a few aliases.
Pro Git is really good! If you're new to git, or you know some commands but don't really understand how they work, devote an evening to reading this book, and you'll have a solid understanding by the time you reach the halfway point. It will pay big dividends over time.
I noticed there's new sections on git in bash/zsh/Powershell. Would you be interested in adding a section on git in the fish shell? I'd be happy to contribute it.
Disclaimer: I'm a fish shell maintainer!
I don't understand why someone would switch from zsh to fish unless they found zsh too confusing. Fish lives up to it's name.. it's a friendly shell. Fairly simple and has a few nice features (syntax highlighting, history substring search, auto-suggestions, etc. all of which zsh has plugins for). It's not POSIX compliant and doesn't like having configuration options.
See this ("Configurability is the root of all evil"). One of the most ridiculous things I've read lately.
"Every configuration option in a program is a place where the program is too stupid to figure out for itself what the user really wants, and should be considered a failiure of both the program and the programmer who implemented it." Vim (well, essentially most all software according to this guy) is basically a terrible program for not presuming to know what the user wants. Not being able to set your history size is a feature!
The performance is noticeably worse than its macOS competitors (Terminal.app, iTerm2, and even HyperTerm, I guess) when doing something as simple as editing a file in Vim. Far, far, far more input lag.
It also doesn't use shells in a conventional way. It's definitely more of an 'IDE', as they describe it.
For instance, I use <code>fish</code>, but Black Screen seems to completely ignore $SHELL
, and do its own thing. You can sort of open a subshell, but it's very awkward. Even if I chsh
to sh
, it still does nothing.
Ironically, I installed it using brew
, but I can't even access brew
. It doesn't seem to source /usr/local/bin
at all (only /usr/bin
?).
Zero clue how to configure anything - I'm not sure you even can (other than open the Electron dev tools and poke around).
I have no idea why it is so seemingly popular on GitHub. I suppose it works, and probably appeals to those who have little experience sitting at a prompt - but it's pretty far removed from your typical terminal emulator experience.
I switched to fish last year and I absolutely love it. The main feature for me is contextual autocomplete. It does a fantastic job of giving completion hints for commands based on the location. It also has really nice highlighting and much cleaner scripting.
In your fish configuration files, when you are setting your variables are you exporting them as well? I.e. with
set foo hello set -x bar world # long form: # set --export bar world
then $bar
is visible to subprocesses, but $foo
is not [ref].
I can play Bioshock Infinite, Borderlands 2, HL2 and derivatives, and more.
I have a bash shell (I prefer fish); with BSD coreutils; UNIX permissions; multiple desktops (GNOME Shell does it better); Chrome and Firefox; graphics compositing years before Vista; native VNC, SSH, and FDE; PDF output (OMG!); and an update system that doesn't take 2 days and 5 reboots after a fresh install.
OS X is no modern Linux distro, but it blows the pants off of Windows.
This part of the FAQ might be useful for you: http://fishshell.com/docs/current/fish_for_bash_users.html#fish-for-bash-users
The most common interactive usage of !! is when doing sudo !!
In Fish, you can use Alt-s
in order to do precisely this. See http://fishshell.com/docs/current/faq.html#why-doesn-t-history-substitution-etc-work
Moving about the command line can be made faster too, if you want to for example replace one of the middle arguments in a previous commands. You can jump back and forwards full words at a time with Ctrl-right
and Ctrl-left
, or if you prefer emacs style shortcuts, Alt-b
and Alt-f
. Ctrl-W
or Alt-backspace
deletes a full word to the left.
With these shortcuts I find myself rarely needing to use !!
at all. In scripts I rarely find it useful and the Alt-s
shortcut makes up for all my sudo-prepending uses.
Edit: If you actually need to use it in a script, you can of course access it through $history[1]
.
See goals 1, 2, and 3 here: http://fishshell.com/docs/current/design.html
Goal 3 is to be POSIX like, but explicitly not at the expense of goals 1 and 2. Read another way: no, fish will not be fully POSIX compliant because that would be against the primary goal of the project.
The only thing one needs to know about fish is:
> stdin and stdout can be redirected via the familiar < and >. Unlike other shells, stderr is redirected with a caret ^
This is from tutorial. Every single shell uses <, >, and 2>. Fish had to choose something else.
I actually find that since Fish is so insanely good at searching previous commands as you type, I rarely get more that 5 characters into a frequent command (no matter how complicated) before it finds a match that can be auto completed.
Sort of like this example from the Fish website.
fish shell logo Fish shell logo is pretty sweet, but you have to be willing to embrace change. Highly recommend as a drop in replacement for a Macintosh 🖥. You need to install with “home brew” and replace default shell line in Mac OS X.
Oh, I use them too. I can get rid of coderay (because syntax highlighing in shell is not very helpful), but not coolline. About coolline I have some plans btw. For example, it would be great to add autosuggestions there (like in fish http://fishshell.com/assets/img/screenshots/autosuggestion.png ).
There is, though what exactly depends on what you mean by "that". If you want the difference between yaourt and cower, well the latter is written in C and doesn't actually do the building part.
If you want the difference between yaourt and whatever my crappy thing is... well, mine's a fish function and yaourt is famous for being the maximalist AUR helper - it does everything including wrapping pacman proper.
I used to use cower, but with the git-based aur downloading and updating can be done via git clone
and git pull
(which also gives you the benefits of git, including a log of what has changed in the package and a way of storing local changes), so the only thing I needed was searching (since I didn't want to open up a browser all the time). After I got searching working, I thought "maybe I could also make it print the link I need to give to git clone
", so I did that. Then I thought "maybe I could just let it do the clone". So I did that. Then I let it also clone the AUR dependencies. And then I noticed it did a fair bit of what cower does, so I posted this.
You don't have to use ctrl+r if you're using fish:
http://fishshell.com/
https://github.com/fish-shell/fish-shell#fish---the-friendly-interactive-shell-
With autosuggestions as you type... So much better
Forgive me if this is too obvious, but have you tried removing your config.fish file?
A common noob mistake is thinking that you have to have a config.fish file and that you should do PATH surgery in it. This is how you have to do things in bash (or zsh or sh) so it is natural to assume fish would be the same; it isn't. Unfortunately the fish documentation does not well advertise this idea.
The best way to change your PATH from what is inherited from the system is to define fish_user_paths as shown in the tutorial. Your fish_user_path gets prepended to the system PATH so those directories take priority. They also note:
>The advantage is that you don't have to go mucking around in files: just run this once at the command line, and it will affect the current session and all future instances too. (Note: you should NOT add this line to config.fish. If you do, the variable will get longer each time you run fish!)
My config.fish is empty and fish is the interactive shell I use for everything.
In no particular order and varying degrees of competence:
funced
uses $EDITOR by default, which is emacs, so I installed fish-mode to do it right.In fish you don't have to make all your changes in the config.fish file. Instead many of the customizations that you would put in rc file with zsh or bash, in fish you can instead set them as "universal" variables, which persist across all fish instances even after a reboot. http://fishshell.com/docs/current/tutorial.html#tut_universal You have to change your mental model a bit if you are more used to dot files in bash.
The fish prompt is actually just a function. It is usually stored in ~/.config/fish/functions/fish_prompt.fish and you can edit it there.
You don't need to edit anything in you config.fish file in order to change the prompt, just modify the prompt function.
How often do you reach loop ~~24~~ 27, which is the first loop where maggots have more than ~~6~~ 7 HP (which is how much Gamma Guts can save you from without Scarier Face while moving)?
(calculated with this fish script: set hp 2; set i 0; while true; set i (math $i + 1); echo "Loop $i"; set hp (math $hp \* 1.05); echo "HP $hp"; end
)
> Has it any merit interactively?
No, in my opinion. A few years ago I decided I was sick of using GNU Bash and started trying out alternative shells, and one of them was es. I thought it was interesting but wasn't convinced that it was worth the switch. Eventually I settled on Fish as my shell, but for shell scripts I use scsh.
You can use any terminal you want (as long as it supports colour, anyway) and change your shell from bash
to fish
so that fish
can provide the syntax highligting and auto suggestions (both for commands and arguments).
You can see some documentation on how to use fish
here, and a quick guide on how to set it as the default shell here (note that the Arch wiki recommends against setting it as your default shell since it may lead to various scripts trying to run in the wrong shell and not working properly since fish
uses slightly different syntax from bash
).
The fish shell.
Here is the website (yes, for the 90's-and still nothing more user friendly has come along): http://fishshell.com/
It works out of the box, needs no configuration, has intelligent completion (scans man-pages and stuff).
It is much more beginner friendly than bash and sh, and has a smaller and nicer scripting syntax than the other shells (with the disadvantage of not being POSIX compatible, but do you really care about that?). It has a nice and clean syntax: "end" for the end of blocks,
I can't imagine of a better shell for the beginning.
"sudo !!" repeats the previous typed command with a preceding "sudo" added, in fish you'd need to press the up arrow, go to the first character and then type sudo yourself.
Fish has not adapted this feature because of their guidelines.
I'm currently using fish myself, but the handling of variables is grinding my gears and the incompatibility to all bashrc things and the fact, that most applications expect POSIX compatibility makes me want to switch back to ZSH again.
EDIT: I'm back to zhs because fish was easier to setup, but much harder to maintain
As /u/usernameliteral has pointed out, most of these "tips" aren't bash-specific.
And for those that are, fish shell offers the same functionality without any fancy configuration, in an easier-to-use package. For example, "bashmarking" is as simple as pressing Alt+Left Arrow...
You should look into fish. They've removed a lot of the nastiness of (ba)sh, while keeping enough that it's intuitive. A lot of my really simple scripts are in fish, and anything more complex moves to Python.
Here's some examples:
Bash:
if [[ $var -gt 3 ]] then ... fi
Fish:
if test $var -gt 3 ... end
One syntax for subshells (and it's nestable): echo "Current Dir:" (pwd)
Math-y things are nice too: test (math "5 + 3") -eq 8
It's just a less painful bash, with tons of other useful features. Just make sure to get Fish > 2.0.
For me it's: hello fish
goodbye zsh
:)
Fish shell comes with the best defaults compare to Bash and Zsh. To get a git-prompt for example, all you need to do is to type fish_config
and change the prompt in the upcoming browser window. The fish documentation is good, and short. The design principles of fish are great, thats how it should be IMHO.
>Autosuggestions
> fish
suggests commands as you type based on history and completions, just like a web browser. Watch out, Netscape Navigator 4.0!
There's some sort of "prediction" feature for zsh
: http://zsh.sourceforge.net/Doc/Release/User-Contributions.html#index-predict_002don
And BASH has ctrl+r
: http://www.lornajane.net/posts/2011/navigating-bash-history-with-ctrlr
Losedge is right, but check out the Fish Shell FAQ anyway. It includes the answer to you question and many more.
I'm a bit of an outsider and use the somewhat unusual shell fish, so my configs are formatted a little different, but I think you'll get the hint:
# Global aliases alias c 'cd ..' # Up one foler alias - 'cd -' # Last folder alias bc 'bc -ql' # No welcome message, improved functions alias iftop 'iftop -B' # Measure in Bytes instead of Bits alias ping 'ping -c3' # Default to 3 attemps instead of unlimited alias tmux 'tmux -2' # Force 256 colors alias :e 'vim' # Launch vim with ":e" alias crontab 'crontab -i' # No accidental removals
function please # Sudo last command eval sudo $history[1] end
As you can see, they're pretty simple and rather straight forward.
If you haven't tried fish yet, I definitely think you should.
You'll find my config file here: http://stefanpersson.eu/bin/config.fish
Fish intentionally doesn't support history substitution
http://fishshell.com/docs/current/faq.html#faq-history
Instead it encourages you to access history interactively with the arrow keys and other keyboard shortcuts.
I use yakuake (quake like terminal, which I trigger with ctrl-') and for the shell, it's fishshell. It's very easy to use, completes commands very well, it's very fast and has a very sane set of functions.
https://github.com/eduardoHoefel/FishLogin it's written on fish http://fishshell.com/ I tried to move to normal shell (.sh), but it was not working. Anyway, it's a better language than sh, in my opinion.
I use SublimeGit as well, though only for blaming the current file, really. It's not really a GUI though (as in clicky thing with buttons), you still type in commands.
Pro tip: If you use a fancy shell (such as fish) you don't need to write full commands, either ;)
DOS was never really useful. It started badly designed and got worse as time went on. It's probably deliberate: Microsoft's way of telling people "look guys, this is what it's like to run Linux, there's no way you'll enjoy it" (meanwhile, fish proves otherwise). As it is, DOS is there, and it's merely (barely) adequate for when it is needed.
... and it's still better than the Windows GUI tools for networking stuff.
I started using fish shell recently and wanted to see if there was a quick premade function for it to extract files from any sort of compression, so I googled "fish extract" and was confused for a second as why I was staring at food.
It's what fish does, and I took a liking to it while using fish. The wildcard idea is neat though. I'll have to look into that.
> also it only shortens if the path is longer than some minimum
As does mine.
Not a lot of activity going on in the Fish channel, so I am posting here instead. This is a fish port of Spark. ▂▃▇▃▂▃▁
Fish has its own syntax. You can still use your bash scripts if you wish though. IMO fish is just nicer to use and write scripts for.
It really all depends on what you want to do and learn honestly. You could learn how to use a text editor efficiently such as vim. You can learn about repositories, what they do and why they make Linux great. Honestly the best way is to just start trying to do stuff and remember google is your best friend. Setup a streaming service for your media to stream from ubuntu to your phone or something (miniDLNA, Upnp). You could setup fish shell (http://fishshell.com/) it's amazing for new users, hell anyone honestly. There honestly is a lot out there to play with that will help you learn Linux and be fun at the same time. Sorry if my thoughts seems scattered here I'm currently at work and a bit distracted, haha.
This can be of help: http://i.imgur.com/1c9y0.png
Im om mobile so i cant do proper links. So here http://fishshell.com/
This is fish, I love it and its in the official repo's of everything. Its very user friendly and it requires no extra configs out of the box!
Edit: just realized you said "terminal" not shell....
I dont have any preferences here yet, only recently got back into Arch, so im only now getting into specifics...
I guess bash has most of these down by now, zsh had them earlier.
What are the cool kids using nowadays? fish(fishshell.com) looked promising for a while, it seems dead now (netcraft confirms it)
Is it any better than fish?
Fish also has explanations, plus built-in pager to show long lists of completions, also it gives hints by coloring to show you if you got a command right or not. And the binary is quite a lot smaller than zsh.
I've written several programs using wchar_t. The method I use is:
All that conversion may sound inefficient, but a most well written program will still have to deal with different narrow character encodings anyway, so you'd like end up doing many of those conversions anyway.
One of the programs I've written this way is an open source command line shell, available here. You can check out the source code if you'd like- the wchar\t_t wrappers really aren't taking up a noticable part of the program code.
I don't know if it's my favourite, but Fish shell rocks pretty hard. It's not a true shell, tasks like pipelines, functions and loops are implemented using so called subshells -- but from a learning standpoint it helped me grow way more comfortable with Bash.
Looking over this thread, I may give Zsh a shot.
which shell are you using? do: echo $SHELL
If you are using bash then there are plugins like https://ohmybash.nntoan.com/ or you could switch to a differnt shell like zsh with https://ohmyz.sh/ or use fish shell http://fishshell.com/
Is Fish Shell immune to this by default?
From the docs:
"for which fish enables "Bracketed Paste Mode", so it can tell a paste from manually entered text"
http://fishshell.com/docs/current/index.html#copy-and-paste-kill-ring
Warning, there is a misunderstanding in the use of fish variable ARRAYS!
You used set a (cat agree)
and created an ARRAY containing each line of file agree
This is important for you using fish: echo $a
will print each element of the array with a " " source character as seperator.
Try this instead: set -S a
. (Whatch out: set
takes the variable name a
, not its content $a
)
So, how to output the content of ARRAY a
?
One choice is echo $a\n
which places a newline char after each ARRAY element. But WHY does this even happen?
ARRAYS make fish
easier and - if not understood properly - complicated. It is in the documentation at the section "Variable Expansion", but THIS precisely is in the following section Cartesian Product
Another way to output the content of agree
by looping over the content of a
by for line in $a ; echo $line ; end
The difference to the solution given before is that there the whole content will be in in $a
which is the same as $a[1]
where YOUR initial approach stores every line into $a[1]
to $a[n]
with n
=line count.
What is best for you, I do not know. But I know that it can be hard to understand stuff like echo $a\n
and that you most likely have overlooked it.
Just remember to try set -S <var name without $>
if variables and strings happen to be ... weird.
The line editor in fish is namer "Command line editor" in the docs.
You can add a handler for the fish_command_not_found event, see the --on-event option of the function builtin.
I'm just commenting on the few ones I know:
> June 18, 2012, 6 years ago.
That's pretty remarkable considering fish shell is, per its own website, a command line shell for the 90s.
That means with its implementation today, you'll have it in the 90s. Bust out some pump-up sneakers and run to your nearest CompUSA to check it out.
While it's probably not enough for serious work, I managed to create the alias I was looking for: (syntax is fish, using nixpkgs-mozilla)
function cargo-nightly -w cargo --description 'Runs the nightly version of Cargo.' nix-shell -p rustChannels.nightly.rust --run cargo\ $argv; end
[EDIT] Stopped working somehow. Can't seem to get argv to be passed to cargo rather than nix-shell.
Sane defaults means for example, that:
The history size is set to a big value in fish and I can find mostly anything ever inserted (in contrary to bash or zsh which come with a way to low default value).
That the keywords fish shell uses make sense and can be combined in a meaningful way. E.g. functions #list all functions
, funced [my_func_name] #create or update function
, funcsave [my_func_name] #save function changes
, $argv
to get all arguments instead of $@
in bash, $argv[1]
to get the first argument instead of $1
... the list goes on.
Changing the prompt (if you ever want) is easy in fish, just fish_config
go to the prompt section and select one, or funced fish_promt
(the name makes sense), for bash or zsh you have to google to understand the weird syntax.
In the end fish does the same as zsh or bash, but with much less hassle.
I was going for: http://fishshell.com/
What does 'fsh' stand for? I assume the sh is shell, but not sure about f. Is that the proper shorthand for fish shell? I always called it 'fish' when discussing it.
Haha, opened this in a tab and it took me a while to get back to it.
Out of context, it was really confusing at first.
I was somewhat disappointed because I'm still kind of a novice in this area, and wouldn't have minded a good alternative shell to explore. :)
Turns out it was fish user shell causing the issue, I think because fish shell uses & instead of &&, or some other issue, I didn't test.
Changed my shell back to the default bash, rebooted, re-ran the command and sure enough it worked. Thanks guys.
I'm guessing (and this is a real guess, I wasn't there when fish was invented, I'm barely involved now), that it's because of "The LAW OF DISCOVERABILITY" (and a few other points in that design document).
Once you know set
, you can get help for it like for all other builtin commands - via tab-completion and the "--help" option, and you can then find out all the things you can do with setting variables (exporting, erasing, local vs global variables). In bash or zsh with "VARIABLE=VALUE", that only does the one thing, and you need to know bash's "declare" or "export" or "local" too.
In general, fish favors "commands" over "syntax", and being able to go "count --help" or "set --help" is quite nice.
Though this (and "env VARIABLE=VALUE command", and no "sudo !!") is one of the more controversial decisions.
It's not really much of a problem because fish ships with nice (though certainly not perfect) documentation and it's not a 100% departure from POSIX scripting
command1 $variable | command2 > file
still works (though $variable is given to command1 as as many values as it has entries as a list, i.e. if it only has one value, even if it contains spaces, command1 will get it as one, so you don't need to quote).
It's mostly some rather easy-to-learn differences. It's not
while SOMETHING; do command done
but
while SOMETHING command end
and not
VARIABLE=VALUE
but
set VARIABLE VALUE1 VALUE2....
Or in other words, 90% of what you know from bash will transfer, and most of the 10% is unlearning workarounds for spaces in e.g. filenames.
Ah, I always type /user when I'm meaning to type /usr! ... I must've ran "chsh -s /us*e*r/local/bin/fish" when installing. Otherwise I don't know how I messed it up.
Tried to uninstall per their FAQ page for a reinstall to fix it I ran:
bash sudo rm -Rf /usr/local/etc/fish /usr/local/share/fish ~/.config/fish sudo rm /usr/local/share/man/man1/fish*.1 cd /usr/local/bin sudo rm -f fish mimedb fishd fish_indent
Then:
sudo apt-get remove fish sudo apt-get auto-remove sudo reboot
And everything seemed to uninstall correctly after I booted back up. But then I tried installing again with:
sudo apt-get install fish sudo apt-get update
Ran the command to change the default shell again and still got, this time making sure to type /usr not /user:
Cannot execute /us*e*r/bin/fish: No such file or directory
Now I'm really confused... Did the uninstallation I did not fully remove fish somehow?
I type just "chsh -s /usr/local/bin/fish" (again, correctly) and get:
chsh: /usr/local/bin/fish is an invalid shell
Tried:
sudo chsh -s /usr/local/bin/fish
And got:
chsh: PAM: Authentication failure
No need to, I will stay with fish for now. (also I don't want to lose all my customization either).
By the way the "!!" etc. are deliberate non-features of fish.
A fresh VM with the latest Ubuntu LTS. Install sublime text and load my personal config file, which I store in my Dropbox. Create a Github ssh key. Install fish, ipython, and pytest.
Heaven.
P.S. I know it's not python related but seriously everyone should use fish. Free yourselves from the tyranny of the POSIX shell and its devil spawn! Switching from bash to fish is like switching from Perl to Python: everything is fun again.
Huh. Nice to know. Though I have gotten used to the normal fish way of doing it...
For what it's worth, the fish documentation gives reasons for why they haven't implemented it.
I'm using fish, but the thing is that I'm looking for a terminal that supports separated IO out-of-the-box, rather than hacking Terminal or iTerm2. Though it seems such doesn't exist.
Beyond the differences built into ZSH, bash, etc., what seems to make ZSH stand out at this point is the sheer number of plugins, scripts, and other extensions available for creating productive shell setups and workflows.
oh-my-zsh is mentioned everywhere, but better yet is antigen which provides bundle management for all of your favorite ZSH scripts/plugins (including all of the goodies found in oh-my-zsh).
Don't get me wrong... something like fish appeals to my obsessive desire for more intuitive tools, but there's still just so many good scripts that have been created for ZSH, I have yet to find myself thinking twice about switching away.
<Tab> but it will work only in zsh (have fixed lists of help messages for commands and their arguments) and fish shell (can parse that data from the manpages)
i personally prefer the latter (less configurations needed to have rich setup out of the box): http://fishshell.com/
before I forget: Make sure you are using at least version 2.0 - I remember finding a really old version of Fish in the Debian repos when I went to install it last time so I had to use a PPA from http://fishshell.com/ instead...
I’m afraid they might have removed it due to lack of demand? :-/ Complete guess though, I thought it’s in there because I can vividly remember csh scripts (but maybe I’m just confused).
Considered trying fish? :) I completely agree that ksh-descendants aren’t in any way acceptable technology.
I'll look like a salesman, but you could take a look at fish, it was a lighter alternative zsh + OMZ for me and it launched faster on OS X. However, it has a lot of the functionalities of zsh + OMZ, the only one I really miss being the intelligent file completion for git add/rm
.
As another alternative, I'd also recommend fish shell with oh my fish (for the glorious themes).
It really feels fast for me, whether on my work box or on my FreeBSD VPS.
This is the fish shell function I use to invoke the swift compiler:
# Swift
function swiftc begin; set -lx DEVELOPER_DIR /Applications/Xcode6-Beta.app/Contents/Developer/; xcrun swift $argv; end end
I also forgot to mention that fish shell has stable releases and I use it on a daily basis so I can vouch that it is indeed stable (I haven't tried advanced scripting though). See http://fishshell.com/
Also Pidgin already supports OTR but it's rather pointless because, according to USE OTR's presentation at FOSDEM 2014, Pidgin is by no means secure software - it has 300,000+ lines of poorly audited C code, a lot of which is dealing with parsing binary data. It should be fairly trivially exploitable, and once exploited the attacker could simply siphon out the cleartext and private keys.
Security seems to be improving with the upcoming Pidgin 3.0, but it's not going to be perfect. And given how widespread low-level (Intel Management Engine, UEFI) exploits and backdoors are nowadays, I doubt there's such thing as computation security anymore, unless you're a security expert willing to go really paranoid and using only a barebones setup of something like OpenBSD or Genode on clusters of OpenRISC CPUs, obviously without any internet connection.
If you want to get really fancy, you could use ZSH. People seem to like it for a bunch of reasons, but my main interest is that it does autocompletion pretty well. I used to use fish for a while, and it is pretty neat (the linked page lists its main features), but its syntax is pretty different from BASH, which can get kind of annoying.
Have a brief look through the tutorial on the homepage, it'll definitely help you get started on understanding the basic concepts. It's fairly short too and doesn't take more than a couple of minutes to read through. GL! :)
Yes you can't. Fish syntax is a bit weird(er) than Bash, ZSH or any other *sh. For example, to configure path, instead of using export PATH=/new/path/to/bin:$PATH
you have to use:
set PATH /new/path/to/bin $PATH
From my understanding everything in Fish is a function, to create alias, you can simply create new function in ~/.config/fish/functions/
, e.g. I want to setup lh
as an alias to ls -alh
, this is what I would put in ~/.config/fish/functions/lh.fish
:
function lh ls -alh end
There's a little bit of magic involved to make lh
function expose to shell (instead of local function) which I'm not sure how it works, but saving the file with the same name as function you want to export (e.g. lh.fish
for lh
) seems to work.
To run bash-syntax scripts, things might get a bit harder. The easiest way I've seen people use around this is to create function to run the script under Bash via bash -c
e.g. to call somecommand
defined in somescript.sh
you might need to do:
function somescript bash -c 'source ~/.dotfiles/scripts/somescript.sh; somecommand "$@"' end
...which seems to work pretty well as long as it's self-contained.
I've switched to Fish for about a week, it take a bit of time to get used to but I do like it in the end. :) Command documentation is a pretty good place to get started.
I think you might want to look at: http://fishshell.com/user_doc/faq.html#faq-history
For your first question: It seems that ALT+Up recalls previously used arguments, and for your second question: Up recalls previously called commands.