Skip to content
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

tig: add zsh completion #43402

Merged
merged 2 commits into from Jul 12, 2018
Merged

tig: add zsh completion #43402

merged 2 commits into from Jul 12, 2018

Conversation

teto
Copy link
Member

@teto teto commented Jul 12, 2018

along with contrib/vim.tigrc config in case users want to use it.

Motivation for this change

I wanted to configure tig with vim bindings, through the contrib/vim.tigrc upstream file so that I can do in home-manager:
home.file."${config.xdg.configHome}/tig/tigrc".text = "${pkgs.tig}/etc/vim.tigrc";
I added zsh completion while at it.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

along with contrib/vim.tigrc config in case users want to use it.
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: tig

Partial log (click to expand)

rm doc/tigmanual.7.xml doc/tig.1.xml doc/tigrc.5.xml
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/afa4dv4imkrwagqylz9j5b07pv99b25i-tig-2.3.3
shrinking /nix/store/afa4dv4imkrwagqylz9j5b07pv99b25i-tig-2.3.3/bin/.tig-wrapped
gzipping man pages under /nix/store/afa4dv4imkrwagqylz9j5b07pv99b25i-tig-2.3.3/share/man/
strip is /nix/store/4qvrxzxa535y8304mk195x50b6p9607d-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/afa4dv4imkrwagqylz9j5b07pv99b25i-tig-2.3.3/bin
patching script interpreter paths in /nix/store/afa4dv4imkrwagqylz9j5b07pv99b25i-tig-2.3.3
checking for references to /build in /nix/store/afa4dv4imkrwagqylz9j5b07pv99b25i-tig-2.3.3...
/nix/store/afa4dv4imkrwagqylz9j5b07pv99b25i-tig-2.3.3

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: tig

Partial log (click to expand)

rm doc/tigmanual.7.xml doc/tig.1.xml doc/tigrc.5.xml
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/sfbgp80xrrymricldixcldxh87v47wzg-tig-2.3.3
shrinking /nix/store/sfbgp80xrrymricldixcldxh87v47wzg-tig-2.3.3/bin/.tig-wrapped
gzipping man pages under /nix/store/sfbgp80xrrymricldixcldxh87v47wzg-tig-2.3.3/share/man/
strip is /nix/store/0pjsgkxz0rp5baycq5sp2s72lrr5q9sg-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/sfbgp80xrrymricldixcldxh87v47wzg-tig-2.3.3/bin
patching script interpreter paths in /nix/store/sfbgp80xrrymricldixcldxh87v47wzg-tig-2.3.3
checking for references to /build in /nix/store/sfbgp80xrrymricldixcldxh87v47wzg-tig-2.3.3...
/nix/store/sfbgp80xrrymricldixcldxh87v47wzg-tig-2.3.3

@@ -33,6 +33,9 @@ stdenv.mkDerivation rec {
make install-doc
mkdir -p $out/etc/bash_completion.d/
cp contrib/tig-completion.bash $out/etc/bash_completion.d/
mkdir -p $out/share/zsh/site-functions
cp contrib/tig-completion.zsh $out/share/zsh/site-functions/
Copy link
Member

@Mic92 Mic92 Jul 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reading the comment in the file it should be named _tig:

install -D  contrib/tig-completion.zsh $out/share/zsh/site-functions/_tig

mkdir is also not needed in this case.

@teto
Copy link
Member Author

teto commented Jul 13, 2018

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants