News for hackers. Stuff that matters.
Re:The fish shell is amazing by Macha on Thursday November 25, 2021 @11:50AM (#29342821)
Interestingly I moved from such a zsh setup to fish a couple of years back. Zsh with add-ons was noticeably slow compared to fish and syncing the config to all the devices I used.
Re:The fish shell is amazing by ulzeraj on Thursday November 25, 2021 @01:19PM (#29343622)
ZSH plus oh-my-zsh cd’ing into a git repo with large LFS files will hang your shell even on very fast NVME storage.
Re:The fish shell is amazing by adrusi on Thursday November 25, 2021 @03:20PM (#29344660)
You can get reasonable version control integration from zsh without any kind of wild oh-my-zsh config. Most distributed versions of zsh are compiled with vcs_info enabled.

    autoload -Uz vcs_info
    zstyle ':vcs_info:*' enable git hg
    zstyle ':vcs_info:*' check-for-changes true
    zstyle ':vcs_info:git*' formats "%{$fg[cyan]%}(%{$fg[green]%}%s %{$fg[blue]%}%r%{$fg[cyan]%}:%{$fg[green]%}%b%{$fg[yellow]%}%m%u%c%{$fg[cyan]%})%{$reset_color%} "

    setopt prompt_subst
    export PROMPT="%{$fg_bold[red]%}%n%{$reset_color$fg[white]%}@%{$fg_bold[green]%}%m%{$reset_color$fg[white]%}:%{$fg[cyan]%}%1~ \${vcs_info_msg_0_}%{$fg_bold[white]%}%(#.#.\$) %{$reset_color%}"
Re:The fish shell is amazing by ivank on Thursday November 25, 2021 @03:56PM (#29344914)
I found that all I really wanted to show was the current branch, which I do with https://gist.github.com/ivan/79de5e87210e8cf21e305bb4c30c436...
Re:The fish shell is amazing by tekknik on Friday November 26, 2021 @12:08PM (#29351975)
You can do this in fish with a direct call to git branch, and it’s not slow and doesn’t require catting files:

  set -l git_branch (git branch 2>/dev/null | sed -n '/\* /s///p')
  if test -n "$git_branch"
    echo -n -s (set_color yellow) "<$git_branch>" (set_color normal) " "
  end
Re:The fish shell is amazing by xondono on Thursday November 25, 2021 @03:20PM (#29344653)
That’s the git plugin doing it’s thing. You can fix it in config but I admit is an annoying default.