Zsh Tricks to Blow Your Mind
111–120 of 218 posts
Re: Zsh Tricks to Blow Your Mind
#112Re: Zsh Tricks to Blow Your Mind
#113would like to chime in a faster theme written in rust: https://starship.rs/
Last time I checked it was slower than https://github.com/romkatv/powerlevel10k , because it doesn't decouple the rendering of the prompt from the background processes collecting status information. Ergo no instant prompt. Also, some other cool tricks w.r.t. prompt vs. backscroll. Has that changed?
Re: Zsh Tricks to Blow Your Mind
#114If 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
#115A 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.
I didn't have this on my system. I like the article because this was a command I've needed many times without realizing it.
Re: Zsh Tricks to Blow Your Mind
#116> If you've typed or pasted a long command and decide you need to edit it before running, ctrl-x-e opens it in an editor Jeez, this is great!
Re: Zsh Tricks to Blow Your Mind
#117Re: Zsh Tricks to Blow Your Mind
#118I'm more amazed how that page is unreadable, starting from typography up to color scheme.
the kerning in the screenshots is "hilarious"
or as recently discussed Comic Mono: https://news.ycombinator.com/item?id=25520510 https://dtinth.github.io/comic-mono-font/
Re: Zsh Tricks to Blow Your Mind
#119A 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.
Do you know why "bash does [these things] natively"? Because zsh had them 20 years ago when bash was barebones and people were envious and over time bash started copying these features over. Sometimes poorly.
And for the "one line alias", in a bunch of cases it's with additional commands, which are not always available, the most famous example being rename.
Which rename? The binutils one (I think) or the Perl one (which has more features)?
Does your distro even package both?
Things can be a lot more complex than they seem.
Re: Zsh Tricks to Blow Your Mind
#120The `take` command doesn't seem to have anything to do with vanilla zsh.. I don't have that on my linux system in zsh.