Live data from Hacker News

Zsh Tricks to Blow Your Mind

twilio.com

101–110 of 218 posts

Re: Zsh Tricks to Blow Your Mind

#103

Earlier quoted context omitted.

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?

Bash licensing (GPL)

To be precise - Apple was stuck on the last GPL 2 version of bash and finally gave up and moved to zsh which doesn’t have the GPL 3 license but is bash compatible and they can keep it updated.

Apple really doesn’t like GPL 3.

Re: Zsh Tricks to Blow Your Mind

#104
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 just have both installed. Fish for interacting and bash for scripting.

Re: Zsh Tricks to Blow Your Mind

#105
post #40

Earlier quoted context omitted.

I wouldn't be surprised if this was coerced by the marketing department, trying to imbue that "ooh, look at me, I'm a bit crazy, so creative" vibe for a bloody shopping list.

I have no comments about this particular font. But if your marketing department has any say in your terminal fonts, you should quit this creepy place as soon as possible!

That would be almost as unlikely as someone using that horrid colorscheme, but they might have a say about the blog layout and content.

Re: Zsh Tricks to Blow Your Mind

#106
post #36

Earlier quoted context omitted.

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.

defaults matter.

And the default shell on all my machines is bash ;)

Re: Zsh Tricks to Blow Your Mind

#107

None 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.

Ugrep instead of ripgrep. Otherwise great selection.

Re: Zsh Tricks to Blow Your Mind

#108
post #7

would like to chime in a faster theme written in rust: https://starship.rs/

That's crazy. People actually write whole programs to print a whole, ugly, slow, kitsch prompt? What happened of the elegant PS1='; ' ?

Tacky indeed - but the main issue it's that it takes precious space for information that you don't need to look again and again after each command.

Instead you can have a 1-letter command to print out a slew of useful info only when you want.

Re: Zsh Tricks to Blow Your Mind

#109

My company is fond of putting source code under very deep directory structures, so I quite like Z: https://github.com/agkozak/zsh-z Not ZSH specific, but it's also handy to load project-specific environment variables automatically on entering directories: https://direnv.net/ .

Direnv has made it a lot easier to source Bash-styled environment variable in a fisd shell and has `use nix` built in for using the Nix package manager for projects and getting a shell environment with all of your local project dependencies.

Re: Zsh Tricks to Blow Your Mind

#110

Earlier 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.

> Just a little shortcut but REPLs like Python's take a while to spin up, so it's pretty convenient.

Really? Loading python takes basically 0 seconds for me... the slowest I could get running `time python3` and hitting ctrl-d (to exit) is like 0m0.104s.

Post reply on HN