-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zsh-git-prompt: Init at 0.5 #25515
zsh-git-prompt: Init at 0.5 #25515
Conversation
# or | ||
# source ~/.nix-profile/share/zsh-git-prompt/zshrc.sh | ||
# or | ||
# source /nix/store/HASH-zsh-git-prompt-VER/share/zsh-git-prompt/zshrc.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also mention here:
{ #/etc/nixos/configuration.nix
programs.zsh.interactiveShellInit = ''
source ${pkgs.zsh-git-prompt}/share/zsh-git-prompt/zshrc.sh
'';
}
@Mic92 Good suggestion, incorporated that into an improved usage doc. |
prePatch = '' | ||
substituteInPlace zshrc.sh \ | ||
--replace ':-"python"' ':-"haskell"' \ | ||
--replace 'python ' '${python}/bin/python ' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${python.interpreter}
instead of ${python}/bin/python
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, incorporated that change into 7c185d4.
This is a plugin of sorts for your `.zshrc` that can add status information about the current git repository to your prompt. By default it uses a python script and is thus easy on the dependencies and not really worth packaging. But there's also a Haskell implementation. I set it up sometime back, but then it died when the libgmp version it was compiled with disappeared in a garbage collection. So I decided that the Haskell version of zsh-git-prompt might be worth packaging after all.
Motivation for this change
This is a plugin of sorts for your
.zshrc
that can add status information about the current git repository to your prompt. By default it uses a python script and is thus easy on the dependencies and not really worth packaging. But there's also a Haskell implementation. I set it up sometime back, but then it died when the libgmp version it was compiled with disappeared in a garbage collection. So I decided that the Haskell version of zsh-git-prompt might be worth packaging after all.Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)