by praash on 1/23/24, 6:47 AM with 147 comments
by pprotas on 1/23/24, 11:27 AM
by vorticalbox on 1/23/24, 9:19 AM
[0] https://github.com/romkatv/powerlevel10k [1] https://fishshell.com/
by cbarrick on 1/23/24, 2:03 PM
Zsh already has a module system (autoload), a prompt framework (promptinit), and Git integration (vcs_info) builtin.
I have a pretty extensive Zsh setup in vanilla Zsh: https://github.com/cbarrick/dotfiles
by yla92 on 1/23/24, 9:52 AM
Still wanting to try out fish and hopefully soon!
by radimm on 1/23/24, 10:12 AM
by Jackevansevo on 1/23/24, 10:28 AM
A lot of people will tell you this is slow and you've got to use X,Y,Z instead. If you're new, I'd strongly recommend just sticking with this, it's much easier to configure.
by enw on 1/23/24, 11:56 AM
setopt PROMPT_SUBST
HISTFILE=~/.zsh_history
HISTSIZE=100000
SAVEHIST=100000
PROMPT='%B%(?..%F{red}%?%f )%F{blue}%~ %F{green}%#%f%b '
RPROMPT='%B%F{red}$(git branch --show-current 2> /dev/null)%f%b'
And if you want autosuggestions: brew install zsh-autosuggestions
Then add the following to your ~/.zshrc: source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh
by msephton on 1/23/24, 9:24 AM
by Zizizizz on 1/23/24, 10:03 AM
Paired with zoxide and fzf for the zsh keyboard shortcuts are all I need to be very productive.
Starship.rs is very useful as well as a theme but pure and pl10k are also great.
by eigenvalue on 1/23/24, 1:57 PM
by wirrbel on 1/23/24, 11:02 AM
by sshine on 1/23/24, 2:42 PM
{
programs.starship = {
enable = true;
};
programs.zsh = {
enable = true;
enableCompletion = true;
enableBashCompletion = true;
enableGlobalCompInit = true;
syntaxHighlighting.enable = true;
syntaxHighlighting.highlighters = [ "main" "brackets" ];
histSize = 100000;
# See `man zshoptions` for more details.
setOptions = [
# Remove duplicates continuously from command history (preserve newest entry).
"HIST_IGNORE_DUPS"
# Instantly share command history between all active shells.
"SHARE_HISTORY" # Alternative to: "APPEND_HISTORY", "INC_APPEND_HISTORY",
# Disable ^S and ^Z for less accidental freezing.
"FLOW_CONTROL"
# Save timestamp and duration of each command in command history.
"EXTENDED_HISTORY"
];
shellAliases = {
rm = "rm -iv";
ls = "ls -F --color=auto";
gs = "git status";
gd = "git diff";
gdc = "git diff --cached";
gap = "git add -p";
gl = "git log";
gpr = "git pull --rebase";
};
interactiveShellInit = ''
bindkey '^[[7~' beginning-of-line
bindkey '^[[8~' end-of-line
bindkey '^R' history-incremental-search-backward
eval "$(starship init zsh)"
'';
};
}
My .zshrc used to be bigger, but I've slimmed it down to see what I actually use from it.by poochkoishi728 on 1/23/24, 11:49 AM
by KolenCh on 1/24/24, 3:24 AM
I think starting from Oh My Zsh or zprezto can be a good choice. Once you get a feel of what zsh can accomplish, eventually probably you’ll one day find it too slow and/or too complicated and then would switch to something like zim to only load the things you know is useful from then.
by highmastdon on 1/25/24, 7:02 PM
by joejag on 1/23/24, 1:51 PM
Main culprits were language switchers (nvm, jabba, pyenv). Which I moved to lazy loading.
If I drop the ohmyzsh plugins startup time is 11ms. But, I want some quality of life.
There's a nice benchmarking command in the article if you want to test yours:
for i in $(seq 1 10); do /usr/bin/time $SHELL -i -c exit; done
by dogmayor on 1/23/24, 8:15 PM
by MissTake on 1/23/24, 11:16 AM
Does fish support something similar? If so then I could be encouraged to give it a whirl.
by h4ch1 on 1/23/24, 10:36 AM
oh-my-fish is pretty much similar in capabilities and has a good assortment of themes.
All I used that came with zsh were git shortcuts like gc -m "comment", gst for git status which i just recreated in my fish config.
by firexcy on 1/24/24, 12:42 PM
by Charlie_32 on 1/23/24, 9:54 AM
by imdsm on 1/23/24, 9:29 AM
by peauc on 1/23/24, 10:33 AM
by flaxton on 1/23/24, 12:20 PM
by andirk on 1/23/24, 12:53 PM
by ivanhoe on 1/23/24, 11:46 AM
by alxndr13 on 1/23/24, 11:24 AM
Removing omz, adding antidote and starship. feels (and measureably is) faster and snappier.
by dsego on 1/23/24, 11:56 AM
by nunez on 1/23/24, 12:01 PM
by mbrumlow on 1/23/24, 5:10 PM