A 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.
Zsh Tricks to Blow Your Mind
21–30 of 218 posts
Re: Zsh Tricks to Blow Your Mind
#22A 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
(since it invokes your editor, and you can configure it to be emacs)
Re: Zsh Tricks to Blow Your Mind
#23A 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.
Re: Zsh Tricks to Blow Your Mind
#24Earlier quoted context omitted.
> 5. `qalc` from libqalculate: https://github.com/Qalculate/libqalculate Or, you know, any REPL available.
Or a simple `=() { bc -l Just a little shortcut but REPLs like Python's take a while to spin up, so it's pretty convenient.
Maybe without lower scale and with the semicolon:
= () { bc -l
"Stealing" the equals sign for this purpose feels a bit risky, but maybe it isn't.Re: Zsh Tricks to Blow Your Mind
#25did twilio suddenly become medium? why are they posting zsh tricks blogspam
They always had "developer tips" even on their YouTube
Sometimes it’s well executed (see Realm’s) sometimes it’s not.
Re: Zsh Tricks to Blow Your Mind
#26https://github.com/natethinks/jog/ I'm not sure why this isn't a part of zsh already, but if you want to see the last few commands you ran in the current directory, that little utility will do that for you. Great for reminding yourself what you did last time you were in a directory.
Wow jog is tiny: grep -a "${PWD} " ~/.zsh_history_ext | cat | cut -f1 -d"|" | tail
Re: Zsh Tricks to Blow Your Mind
#27 cl() { cd "$@" && ls; }
It's wonderfully simple and saves me so much time by giving me an instant refresher of what's in the directory I just changed to.Re: Zsh Tricks to Blow Your Mind
#28https://github.com/natethinks/jog/ I'm not sure why this isn't a part of zsh already, but if you want to see the last few commands you ran in the current directory, that little utility will do that for you. Great for reminding yourself what you did last time you were in a directory.
Re: Zsh Tricks to Blow Your Mind
#29If 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.
Re: Zsh Tricks to Blow Your Mind
#30None 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.
lf is also fast but has ranger's look and feel.