3 ms·
Anyone know any good references for transitioning from bash to zsh? Particularly thinking about converting .bash_aliases, .bash_profile, and .bashrc. What are
by SkyMarshal 14y ago
Anyone know any good references for transitioning from bash to zsh? Particularly thinking about converting .bash_aliases, .bash_profile, and .bashrc. What are the ZSH equivalents?
Also I get the impression the poster uses ZSH, Tmux, and Vim. I use Vim and Tmux too, but unfortunately not at the same time if I can help it. There are one or two Vim commands that don't work in Tmux because of a key mapping conflict. Been so long since I've tried that I can't remember exactly what the conflict is, but does anyone know what I'm talking about and know of a solution?
Edit: Thanks everyone, very helpful. Also, in case anyone else wondering, after a little research, it appears the syntax for aliases are the same for .bashrc/.bash_aliases, .profile, and .zshrc.
So I moved all my aliases to .aliases and sourced that file .bash_aliases, .zshrc, (and .profile but I don't think it's needed here. also didn't seem to work when I sourced it in .profile only and not the other two).
- gcv 14y agoI recommend a book called "From Bash to Z Shell" (http://www.bash2zsh.com/ http://www.bash2zsh.com/). It favors zsh, but teaches tons of bash tricks, too. The files you're describing are just startup files, read by bash as it starts up in various modes. I put my configuration into .zshrc. It will take some effort to understand your new shell's default behaviors and how to customize them.
- Ogre 14y agoI'm an emacs user, not vim, but I have some idea. My tmux.conf reads like this: unbind C-b set -g prefix ` bind-key ` send-prefix This removes Ctrl-b as the tmux prefix, sets it to ` (backquote) instead, and makes pressing ` twice insert an actual `. It really doesn't take very long to get used to typing `` when you mean `.
- SkyMarshal 14y agoGood call, been using it tonight, dig it, thanks!
- slurgfest 14y agoAll the zsh man pages are in `man zshall`. See the section STARTUP/SHUTDOWN FILES to see what is used instead of the files you mentioned. instead of .bash_profile you want .zprofile and instead of .bashrc you want .zshrc. Put your zsh aliases wherever you want (.zshrc will work fine). Tmux uses Ctrl-B as its prefix by default, which is a commonly used key in vim. You can choose whatever prefix you want in .tmux.conf, maybe something which doesn't conflict with anything you use in vim, or you can rebind the one key with the conflict in vim's very flexible system. Also, Tmux will let you send through a prefix key literally (like Ctrl-B Ctrl-B).
- deleted 14y ago[deleted]