
Zsh is a shell designed for interactive use and it is also a powerful scripting language.
My very simple .zshrc. Looking for suggestions how it can be improved
Help
I am a macOS user, and I use Zsh not because I really need its extensivetely and power (quite the opposite: I prefer to keep any configurations as barebone as possible), but simply because Zsh is a default macOS shell nowadays.
Here is my .zshrc. What you think about it? Did I miss really useful things that can be enabled by just few lines?
autoload -Uz compinit && compinit autoload -U colors && colors alias ls='ls -G' # history setopt share_history bindkey '^[[A' history-beginning-search-backward bindkey '^[[B' history-beginning-search-forward # globbing setopt extended_glob # zmv autoload -Uz zmv alias zcp='zmv -C' alias zln='zmv -L' # fewer keystrokes setopt auto_cd auto_pushd setopt menu_complete # fewer distractions unsetopt beep nomatch notify # $PATH path+=$HOME/bin # the end
Sort by:
Best
Open comment sort options
Best
Top
New
Controversial
Old
Q&A
Some more options you could consider, with docs links to send you down the rabbit hole https://olets.dev/posts/my-zshrc-zsh-configuration-annotated/
Hello, olets. (Sorry for the late reply.)
Is it correct that according to your
Run compinit here
section, the last line is assumed to beautoload -Uz compinit && compinit
? Or it should be somewhat different?Why don't you use
setopt extended_glob
? Isn't it that powerful globbing is one of the Zsh "selling points"?Mine is not super light, but not to many lines to setup :)
https://github.com/tedsteen/mbp-setup?tab=readme-ov-file#setup-the-terminal
I really like starship (I'm using the default install)
autosuggestions and autocomplete are must-haves for me since I started using them a few years ago
Have you considered upgrading to
wget2
?https://gitlab.com/gnuwget/wget2
On one machine, I used
compinstall
andzsh-newuser-install
, then added some minor things from that. Here it is in sections:compinstall
is mostly responsible for these lines:zsh-newuser-install
is responsible for these:I added the rest. These are things I think should be added to
compinstall
:And I think there should be a way for
zsh-newuser-install
to add:Finally, some personal preferences, take from this what you will:
zsh history
Use
eza
instead ofls
.