NixOS / nixos

OBSOLETE (go to NixOS/nixpkgs) - NixOS, a Linux distribution based on the Nix package manager - OBSOLETE (go to NixOS/nixpkgs)
MIT License
176 stars 102 forks source link

git completion #302

Closed Zimmi48 closed 8 years ago

Zimmi48 commented 8 years ago

Hello,

I do not have git completion in my bash terminal.

After doing a bit of search, I see that:

  1. bash completion is looking for additional files to source in $NIX_PROFILES sub-directories (basically /run/current-system/sw/etc/ in my case): https://github.com/NixOS/nixos/blob/master/modules/programs/bash/bash.nix#L22
  2. but git's package installs the bash completion file in /nix/store/a9ki9gd63brkm4i9zrchdwrfdn31k8b6-git-2.7.4/bin/git/etc/bash_completion.d/ (in my case at least, but this seems to be what the package is describing https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/version-management/git-and-tools/git/default.nix#L83)

So, naturally, git's bash completion file is never sourced. Is it just me or is it the same for everyone? And what is the right way to fix that? Change where bash looks for completion files to source or change where git installs its bash completion file?

Thanks!

domenkozar commented 8 years ago

If you're on nixos:

programs.bash.enableCompletion = true;

Note this repository is obsolete, use github.com/NixOS/nixpkgs

domenkozar commented 8 years ago

Please open an issue at https://github.com/NixOS/nixpkgs/issues if my recommendation doesn't help you.

Zimmi48 commented 8 years ago

Thanks!