Live data from Hacker News

Zsh Tricks to Blow Your Mind

twilio.com

81–90 of 218 posts

Re: Zsh Tricks to Blow Your Mind

#82
post #12
post #7

would 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?

[deleted]

Re: Zsh Tricks to Blow Your Mind

#84
post #11

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.

> 5. `qalc` from libqalculate: https://github.com/Qalculate/libqalculate Or, you know, any REPL available.

my favourite is pari/gp, that can be used as a simple calculator, but also has quite fancy math at your fingertips. For example, it is the easiest way to compute entire series: you type "exp(sin(x))" and you get "1+x+1/2*x^2-1/8*x^4-1/15*x^5 ..."

Re: Zsh Tricks to Blow Your Mind

#87

I've been using Fish instead and it's much much simpler than configuring ZSH to my liking. It's already good out of the box, without having to carry around any kind of configuration. The only stuff I usually do is to setup `powerline-go` as prompt, and voilà, that's pretty much it.

I rather liked Fish's zero config approach but I found their handling of the PATH very hard to work with day to day. Perhaps it was just my familiarity with having a bunch of statements to alter the PATH in a config file but it felt very opaque, I always had to look up how to add stuff to the PATH and I had great trouble trying to remove stuff from the PATH.

It's easy once you understand universal global and local variables.

Re: Zsh Tricks to Blow Your Mind

#88
post #51

I've been using Fish instead and it's much much simpler than configuring ZSH to my liking. It's already good out of the box, without having to carry around any kind of configuration. The only stuff I usually do is to setup `powerline-go` as prompt, and voilà, that's pretty much it.

The main drawback for fish is that is not compatible with bash scripting. If you need help with something specific, you can throw out almost all help available online.

I've been thinking about a more fluid way to hybridize these different shells.

I'd like a way to get all the benefits without the cost or any extra required effort for the user.

Some painless master shell program. No epiphanies yet though.

Post reply on HN