Live data from Hacker News

Speeding up my ZSH shell

scottspence.com

121–130 of 133 posts

Re: Speeding up my ZSH shell

#124
I don't know if this is somehow particular to my setup, but on both macOS and Linux I find that simply running full `compinit` fails to update mtime on `~/.zcompdump` when nothing's changed. That causes this optimization to fail, for me, if my completions haven't changed within the last day.

This is fixed by adding an explicit `touch ~/.zcompdump` in the branch that runs a full `compinit`.

Re: Speeding up my ZSH shell

#126

Earlier quoted context omitted.

I noticed you're using `z-shell/F-Sy-H`, "Feature-rich Syntax Highlighting for Zsh". The `z-shell` github org has (or had) some ... bad vibes, I would personally not use any of their code. - https://recurse.social/@dylnuge/112224580867240812 - https://www.reddit.com/r/commandline/comments/1c3r7ck/zshell... - https://www.reddit.com/r/zsh/comments/1c3r5gn/zshellzi_users... You could use `zsh-users/zsh-syntax-highlighti…

Is this one better? https://github.com/zdharma/fast-syntax-highlighting

My understanding is zdharma removed their github account, then the name got squatted by the z-shell people.

So probably not.

Re: Speeding up my ZSH shell

#127

Earlier quoted context omitted.

The incompatible syntax of fish makes it a no go for me. As an SRE, at my day job I often need to copy/paste commands that are generated from a playbook. Our playbooks use Bash, and in practice Zsh is compatible. But a co-worker using fish often has to manually modify commands before running, and I'm not about that life. The problem with fish is mostly the different syntax for setting variables and lack of heredocs.…

SRE running copy pasted commands directly instead of a script or some automation solution? I don't think the problem is the shell...

Insinuating that my playbooks are bad or any other kind of incompetence without actually knowing anything about my service is simply being an asshole.

Re: Speeding up my ZSH shell

#128
post #88

Earlier quoted context omitted.

The incompatible syntax of fish makes it a no go for me. As an SRE, at my day job I often need to copy/paste commands that are generated from a playbook. Our playbooks use Bash, and in practice Zsh is compatible. But a co-worker using fish often has to manually modify commands before running, and I'm not about that life. The problem with fish is mostly the different syntax for setting variables and lack of heredocs.…

We have everything as scripts rather than one-liners so they work fine no matter which shell you're using.

In our case, we often have complex decision trees to diagnose issues before we get into the ops. Our playbooks are very thorough with details about all of these debugging techniques.

You can never completely automate the debugging step: it often requires human judgement to direct the investigation in ways that can't really be expressed in a script.

The friction of the shell comes up not in executing the ops, which we do in fact have heavy automation around, but in all the little pieces of debugging has to happen to tell you what ops need to be done.

(If you get paged and the solution is to skip the debugging step and run a script, then why didn't you automate the script so that you don't get paged in the first place?)

Re: Speeding up my ZSH shell

#129
post #88

Earlier quoted context omitted.

The incompatible syntax of fish makes it a no go for me. As an SRE, at my day job I often need to copy/paste commands that are generated from a playbook. Our playbooks use Bash, and in practice Zsh is compatible. But a co-worker using fish often has to manually modify commands before running, and I'm not about that life. The problem with fish is mostly the different syntax for setting variables and lack of heredocs.…

We have everything as scripts rather than one-liners so they work fine no matter which shell you're using.

[deleted]

Re: Speeding up my ZSH shell

#130

Earlier quoted context omitted.

I don't want to spend ages figuring out which knobs to turn to get a half decent shell. If there's an alternative to oh-my-zsh that looks halfway decent, has that nice fzf integrated, and the 'ghost text' history suggestions, then I welcome it!

Once you have everything figured out, you just keep using the config you have. It might be worth the investment. I stopped using oh-my-zsh when I realized it was what was causing multi-second delays on Raspberry Pis. I think auto suggestions and syntax highlighting plugins can be installed separately from oh-my-zsh. I use starship for a better prompt, and it works on more shells than just Zsh. I also have Atuin insta…

With atuin, do you face a delay when you first load after startup? It's so annoying. It takes a solid 30-minute lag before the history is loaded.

I am running my home on hdd, not ssd. But still do not see justification of this lag.

Post reply on HN