6 ms·
Zsh: The last shell you will ever need
- biafra 17y agozsh can even tab-complete remote paths when typing your ssh command line. (You should have an ssh-agent running or else you might be prompted for the password when hitting tab) zsh might not be the last shell you ever need. Have a look at the friendly interactive shell: http://fishshell.org/ http://fishshell.org/ It looks really nice. But I too, have not yet replaced my beloved zsh.
- viraptor 17y agore: completion. Also useful for developers - it will auto-complete svn and other vcs links with information from the remote hosts. (no more `svn ls ...`)
- likpok 17y agoFish is zsh, but with reasonable defaults and worse customization. If you want to build/find a good zshrc, zsh is a good choice. Otherwise, fish is probably a better choice.
- astine 17y agoNot really, Fish's command language breaks compatibility with other POSIX shells in order to be cleaner and more consistent. So, you can't run sh or bash scripts with it. This isn't a huge issue, but definitely sets it apart from Zsh.
- krakensden 17y agoit's also REALLY slow, especially on startup.
- astine 17y agoNot in my experience.
- hiteshiitk 17y agoBash can also auto-complete remote paths, if appropriate keys are set.
- mrinterweb 17y agoFor some very nice tools to extend your ZSH experience, I would recommend http://github.com/robbyrussell/oh-my-zsh http://github.com/robbyrussell/oh-my-zsh. As a bonus, Oh My ZSH has some extra nice features for those who use Rails.
- sev 17y agoOk, You Convinced Me. I've started using zsh on my Mac. Thank you in advance for saving me a whole lot of typing and time.
- markmywords 17y agoHaha, same here. I was on the edge for a long time. There goes my Sunday now ;)
- xster 17y agoI just started playing with it on Mac and now I'm wondering why does GUI exist. Here goes my final...
- derefr 17y agoHave any of the projects to make a language REPL/shell hybrid gotten to a useful point yet? For instance, I'd love to be able to type regular commands with tab completion et al, but have anything in parens be a lisp expression. I'm holding off on learning ZSH because that seems like such a better solution, yet a good one hasn't materialized as of yet.
- astine 17y agoEshell(http://www.emacswiki.org/emacs/CategoryEshell http://www.emacswiki.org/emacs/CategoryEshell) seems to come closest to your specs, though it doesn't do input redirection.
- r11t 17y agoOn a related note I have decided to post zsh related links/tips that I discover on twitter via @zshtips http://twitter.com/zshtips http://twitter.com/zshtips
- jcsalterego 17y ago@bashtips is pretty excellent as well.
- sundarurfriend 17y agoIt is, but the frequency of tips has drastically come down these days. :( For the interested and lazy, here's the link: http://twitter.com/bashtips http://twitter.com/bashtips
- hyyypr 17y agoI think delicious would be a better place to share articles about ZSH. Like: http://delicious.com/tag/zsh+tips http://delicious.com/tag/zsh+tips . But I'm interested in the point of view of people thinking that twitter would be a better place to share that kind of stuff.
- deleted 17y ago[deleted]
- hyyypr 17y agoThis site (http://grml.org/zsh/zsh-lovers.html http://grml.org/zsh/zsh-lovers.html) contains loads of zsh tricks. Very useful.
- keyist 17y agoTFA mentions shared history across sessions as a ZSH feature, but it is available in bash as well. For those who're staying with bash, stick this in your .bashrc: shopt -s histappend export PROMPT_COMMAND='history -a' The histappend option appends to history instead of overwriting. PROMPT_COMMAND is run before bash displays a prompt -- this will save each command right after you issue it, instead of when you exit the session. Now that your history is about to get a lot larger, you'd probably want to override the defaults for HISTSIZE and HISTFILESIZE. Somewhat OT, but since I mentioned PROMPT_COMMAND: One very useful piece of info to have in your prompt is the exit status of your last command. You can do that with export PROMPT_COMMAND='ERRVAL=$?; history -a' Then just include ${ERRVAL} in your PS1.
- litewulf 17y agoI believe that this will cause your history ordering to go a bit wonky. Hitting up to get the last item will almost always get the command you last typed into the current window (as it should be, imo), but if you hit enter a few times after you run a given command it will be something else (sucked in from the surroundings I guess) Every so often this really bites me, but the usefulness far outstrips the quirks.
- timf 17y agoConsidering the number of shells I have open, that would be very weird. A coherent "local" history is very useful not just for the up key but also for referring to history items by number (like "!123"). My solution for my laptop has helped me on countless occasions. I've been doing this for about three years. 1. Compile bash with the syslogger patch. Each command will generate one line with timestamp, username, terminal PID, and command. 2. Configure syslog to pipe all bash commands to a special file. 3. Run a cronjob every night that takes all the bash commands from the day and saves them off to a day specific file. 4. Need to find that command you ran 6 months ago to get package XYZ to work in way ABC? Use "grep -R" to find every single invocation you ever made to that program. If you actually needs a particular shell's local history, pipe grep through a grep for the PID (I find I almost never need that). I work with so many different technologies for such brief times that this is just absolutely invaluable. It also helps you narrow down dates of events sometimes. For installation, use google etc. but here: http://blog.rootshell.be/2009/02/28/bash-history-to-syslog/ http://blog.rootshell.be/2009/02/28/bash-history-to-syslog/ Gentoo users can reinstall with the 'bashlogger' USE flag.
- herdrick 17y agoCan you use your existing bash configuration files with zsh? It looks like zsh isn't picking up my .profile file on my OS X box, or that it doesn't care about what it found there. The bigger question is, what is the switching cost?
- abentspoon 17y agoI've been using zsh with my old 300 line bashrc for several months now. If you haven't already, try copying your .profile to .zshrc (just to see if it works); only your login shell reads your .profile.
- sandGorgon 17y agoHere is a zshrc with almost zero switching cost - especially with the esc-backspace behavior for path deletes, setenv declarations and integration with Ubuntu's command-not-found. Additionally, it displays the version-control information of a directory (works for svn, git, etc.) http://sandeep.wordpress.com/zshrc/ http://sandeep.wordpress.com/zshrc/
- jacquesm 17y agozsh uses .zprofile, .zshrc and so on, if you're going to use the same contents you could simply symlink them.
- irrelative 17y agoShells are the web frameworks of 10 years ago. Good programmers will create them fairly easily, they're all pretty similar, most people learn one and get good with them. Also just like web frameworks, everyone's convinced that their shell is superior and that they couldn't get any work done if they used yours.
- siong1987 17y agoif you really want to migrate to zsh, you should try this out: http://github.com/robbyrussell/oh-my-zsh http://github.com/robbyrussell/oh-my-zsh
- tednaleid 17y agoI did something similar a little while ago and shared my zshrc setup/config with a basic set of files that people can use as a default and override. http://naleid.com/blog/2009/05/13/shared-zshrc-file/ http://naleid.com/blog/2009/05/13/shared-zshrc-file/ The repo to clone is on bitbucket: http://bitbucket.org/tednaleid/shared-zshrc/ http://bitbucket.org/tednaleid/shared-zshrc/
- deleted 17y ago[deleted]
- 10ren 17y agomy bash, GNU bash, version 3.1.17(1), does (3)(2) kill job-completion; and (3)(3) ls option-completion (but no description). So it's partway there.
- billswift 17y agoQuestion: Can the automatic paging of output interfere with piping or redirecting output? Or does it maybe work only in output going to the screen?
- pyre 17y agoI don't think that people would be using it if it interfered with piping.
- tome 17y agoI used bash on Linux for 8 years because it was the default on Debian. I wish I'd been persuaded to change to zsh 9 years ago! The 1 year that I have been using it, I've really appreciated it.
- ax0n 17y agoI've been meaning to try zsh. Maybe now's the time. Thanks for sharing and reminding me about it!
- tome 17y agoI definitely, definitely, definitely can't recommend it enough. I really wish someone had said exactly that sentence to me ten years ago!
- bistro539 17y agoIs there an equivalent to history-search-backward in zsh? In Bash, this is the search that looks for commands that start with whatever is to the left of the cursor.
- oscardelben 17y agoadd this to your .zshrc: bindkey '^r' history-incremental-search-backward I suggest to look for a .zshrc file, the article has a good one linked.
- pyre 17y agoYou can do some really neat prompts using z-shell: http://aperiodic.net/phil/prompt/ http://aperiodic.net/phil/prompt/
- kennu 17y agoA zsh article from 2007? Come on! I even commented on it before realizing it's ancient stuff.
- JulianMorrison 17y agoI can see how a programmable shell was the best thing since sliced bread in the era before ubiquitous Perl, Ruby, etc, but I find myself using the shell for only three things. To set up common environment variables, to script one-liners that are too simple to bother with a more powerful language, and to start programs. (Additionally, the OS tends to use "sh" where it wants to guarantee code will run without dependencies outside /bin. But I don't write that myself.) Honestly I'd like to see a shell with less programming features, not more. It should be hella tuned for command line usability, but I don't give a damn if it has a while loop.