E.g. ctrl-l and ctrl-r
Zsh Tricks to Blow Your Mind
41–50 of 218 posts
Re: Zsh Tricks to Blow Your Mind
#42If you’re on 10.15 (Catalina) there’s no need to install zsh, it is the default shell. If you’ve upgraded and are still using bash, just do ‘chsh -s /bin/zsh’ to set the default to zsh.
What was the reason for them doing this do you know? From my experience with it over the last year, zsh is slightly worse at autocomplete than bash, with no advantages. Is there something I'm missing, like a good default .zshrc?
Re: Zsh Tricks to Blow Your Mind
#43fish shell has a lot of this built-in.
Re: Zsh Tricks to Blow Your Mind
#44A lot of these can be easily done in Bash, too! 1. `mkcdir () { mkdir -- "$1" && cd -- "$1"; }` 2a. `bind '"\e[A":history-search-backward'; bind '"\e[B":history-search-forward'` 2b. Default behavior for Bash. 3. `shopt -s autocd` 4. `mmv`, `perl-rename` 5. `qalc` from libqalculate: https://github.com/Qalculate/libqalculate 8. Default behavior for Bash. 9. Default behavior for Bash.
This is always my complaint about posts like this. I read them looking for the killer feature to make me consider switching from bash and it's always stuff bash does natively or with a one line alias.
Re: Zsh Tricks to Blow Your Mind
#45Re: Zsh Tricks to Blow Your Mind
#46Re: Zsh Tricks to Blow Your Mind
#47None of these blew my mind. If you like terminal productivity I recommend: fzf, Facebook path picker (aka fpp), fd, ripgrep, lf, tig. Some honorable mentions: tokei, hyperfine, lazydocker, ctop, ncspot.
Solid selection. I'd also add nnn as the fastest tool to navigate directories I've ever seen.
Re: Zsh Tricks to Blow Your Mind
#48A lot of these can be easily done in Bash, too! 1. `mkcdir () { mkdir -- "$1" && cd -- "$1"; }` 2a. `bind '"\e[A":history-search-backward'; bind '"\e[B":history-search-forward'` 2b. Default behavior for Bash. 3. `shopt -s autocd` 4. `mmv`, `perl-rename` 5. `qalc` from libqalculate: https://github.com/Qalculate/libqalculate 8. Default behavior for Bash. 9. Default behavior for Bash.
Bash supports at least a subset of emacs motion keys. 7. C-a C-k C-y # to park a command
Re: Zsh Tricks to Blow Your Mind
#49If you’re on 10.15 (Catalina) there’s no need to install zsh, it is the default shell. If you’ve upgraded and are still using bash, just do ‘chsh -s /bin/zsh’ to set the default to zsh.
What was the reason for them doing this do you know? From my experience with it over the last year, zsh is slightly worse at autocomplete than bash, with no advantages. Is there something I'm missing, like a good default .zshrc?
Re: Zsh Tricks to Blow Your Mind
#50Not ZSH specific, but it's also handy to load project-specific environment variables automatically on entering directories: https://direnv.net/.