1) it's a drop in replacement for bash. All those scripts you have around have #!/bin/bash at the top, they will still work exactly as they always have.
2) You can selectively go back through your command history. You can arrow-up to go to previous commands just like in bash. But if you start a command (say, ssh) and then arrow-up you will then be cycling back through the last ways you entered that command. Super convenient.
> You can arrow-up to go to previous commands just like in bash. But if you start a command (say, ssh) and then arrow-up you will then be cycling back through the last ways you entered that command.
Or, if you'd like to do this in Bash, and any program that uses readline: In ~/.inputrc
# Bind the up arrow to history search, instead of history step
"\e[A": history-search-backward
# And the reverse (down)
"\e[B": history-search-forward
If you don't want to use it, I don't see how that is any of my business. I was just trying to help out somebody who does, so there's hardly any reason to be an ass.
To be honest, I tried it years back and liked it, but forgot about it and didn't miss it. I may try it again sometime.
All I'm saying is that most people won't like something that offers no immediate major benefit and has annoying defaults that they have to find an obscure setting to fix. This is probably why so few use emacs, even though it is awesome :)
Excuse the nitpick, but what you meant to say is "All those scripts having #!/bin/bash at the top, they will still work exactly as they always have if you change the line to read #!/bin/zsh"... and it's not quite clear why you would want to do that if the script is already working as intended, hence this clarification.
Of course, a script that has #!/bin/bash at the top will keep working regardless of which shell you execute it on anyway, even a shell with a completely different syntax such as tcsh, because that shebang line will tell the OS to always use bash to execute the script--no matter what shell you're using to invoke the script.
It's different when you source a script (usually done using the eponymous shell built-in) since then the shebang line will be treated as a comment and ignored, and all other lines in the script will be executed in the context of the current shell.
Me too; I actually use up arrow for history-search-backward and also bindkey -v, so ESC-k gives me a non-search history (like the default up arrow behaviour).
1) it's a drop in replacement for bash. All those scripts you have around have #!/bin/bash at the top, they will still work exactly as they always have.
2) You can selectively go back through your command history. You can arrow-up to go to previous commands just like in bash. But if you start a command (say, ssh) and then arrow-up you will then be cycling back through the last ways you entered that command. Super convenient.