Live data from Hacker News

Speeding up my ZSH shell

scottspence.com

111–120 of 133 posts

Re: Speeding up my ZSH shell

#111
I was an OMZ user pretty much since I adopted ZSH many years ago. I never really experienced much of the slowdown(s) that people tend to complain about. Even still, getting my dotfiles set up on a new machine was always a little bit of pain. I'd try to install OMZ from my OS' package manager, remember that that rarely worked perfectly, gone back to OMZ's webpage and copied the cURL command... the fought with FZF shell integration for about an hour. Finally one Saturday I just stripped it all out. I went with raw ZSH and Antigen for the few plugins I care about. Spinning up new machine is now painless. And I always like simplifying things.

Re: Speeding up my ZSH shell

#112

I was an OMZ user pretty much since I adopted ZSH many years ago. I never really experienced much of the slowdown(s) that people tend to complain about. Even still, getting my dotfiles set up on a new machine was always a little bit of pain. I'd try to install OMZ from my OS' package manager, remember that that rarely worked perfectly, gone back to OMZ's webpage and copied the cURL command... the fought with FZF shel…

Thing is, a lot of how OMZ affects your zsh usage is based on usage patterns. For instance, I usually have zsh running in a terminal that is always open and running. Now, if I close my terminal and restart, then I notice that OMZ is kinda slow and it irritates me, even if it's only for a second. But that almost never happens.

Anyway, I'm going to be revisiting my zsh config soon and I'll be looking for ways to make sure I'm only using plugins that I absolutely do need. My principle in the past with workflows in zsh and Neovim is that I only add crucial plugins and try to keep my config minimal. Maybe I've gotten away from that a bit and need to regroup, so I find threads like this one useful to keep up with what's current.

Re: Speeding up my ZSH shell

#114
post #100

Earlier quoted context omitted.

No shell does, I am using computers since 1986 and I don't these "pimp my shell" kind of stuff with rainbows and virtual pets. CLI is for stuff that GUIs and IDEs for whatever reason don't support, or REPL like interactions.

The main thing I use the pimpshells for (and all I can honestly say is KNOW I’m using from omZ) is the colored/fancy prompts. I’ve used colored informative prompts since DOS and having production servers be brilliantly red and dev servers a different color is quite helpful.

You don't need oh my zsh for colorful prompts though.

Re: Speeding up my ZSH shell

#115

I do find myself running into problems with NVM slowing things down in zsh; anyone else experiencing this?

I got tired of nvm being incredibly slow and recently switched to fnm, which has been much faster and has drop-in compatibility with the .nvmrc files that nvm used

Re: Speeding up my ZSH shell

#117

Earlier quoted context omitted.

The main thing I use the pimpshells for (and all I can honestly say is KNOW I’m using from omZ) is the colored/fancy prompts. I’ve used colored informative prompts since DOS and having production servers be brilliantly red and dev servers a different color is quite helpful.

You don't need oh my zsh for colorful prompts though.

Yeah it's literally ANSI escapes.

Re: Speeding up my ZSH shell

#118

Earlier quoted context omitted.

You should try fish shell. Great user experience out of the box, including history suggestions. https://fishshell.com

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

Re: Speeding up my ZSH shell

#119

I don't have anything against ZSH or similar shells. I think they are great, but they are not my thing. Latency is a deal-breaker for me, and this is where autocompletion engines generally introduce surprising user-interactive pauses. I've generally settled with using mksh (or OpenBSD's KSH depending on the environment) with little configuration outside of aliases, variables, and few local functions. I'm not left wit…

oksh and set -o vi have made it virtually impossible for me to type commands into other people computers.

I get bewildered looks when i hit v and edit my commands in vim from the youth but whatever, they’ll learn someday :))

Re: Speeding up my ZSH shell

#120
post #72

Earlier quoted context omitted.

I'm definitely not an expert, but I configure zsh manually with those fzf and "ghost text". I took some notes in my repo, just copy the relevant portions if you actually want to try this: https://github.com/bbkane/dotfiles/tree/master/zsh I tweak it occasionally, but for the most part I set it and forget it.

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

Post reply on HN