mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 00:02:25 +00:00
Merge pull request #5819 from edolstra/devshell-completion
Make bash completion for 'nix' work in a devshell
This commit is contained in:
commit
ddd7839154
@ -667,6 +667,9 @@
|
||||
PATH=$prefix/bin:$PATH
|
||||
unset PYTHONPATH
|
||||
export MANPATH=$out/share/man:$MANPATH
|
||||
|
||||
# Make bash completion work.
|
||||
XDG_DATA_DIRS+=:$out/share
|
||||
'';
|
||||
});
|
||||
|
||||
|
@ -13,7 +13,7 @@ function _complete_nix {
|
||||
else
|
||||
COMPREPLY+=("$completion")
|
||||
fi
|
||||
done < <(NIX_GET_COMPLETIONS=$cword "${words[@]}")
|
||||
done < <(NIX_GET_COMPLETIONS=$cword "${words[@]/#\~/$HOME}")
|
||||
__ltrim_colon_completions "$cur"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user