diff options
author | Naïm Favier <n@monade.li> | 2022-02-19 14:26:34 +0100 |
---|---|---|
committer | Naïm Favier <n@monade.li> | 2022-03-07 12:01:54 +0100 |
commit | 55c6906701ee7fc7e915f7889fea86957b020f94 (patch) | |
tree | 6cb5da6e1fb9f55ad0197fd28ade86a0c1db31df /misc/bash | |
parent | 5461ff532d6169be86af703b15cfb49569732cbb (diff) |
Perform tilde expansion when completing flake fragments
Allows completing `nix build ~/flake#<Tab>`.
We can implement expansion for `~user` later if needed.
Not using wordexp(3) since that expands way too much.
Diffstat (limited to 'misc/bash')
-rw-r--r-- | misc/bash/completion.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/bash/completion.sh b/misc/bash/completion.sh index 045053dee..9af695f5a 100644 --- a/misc/bash/completion.sh +++ b/misc/bash/completion.sh @@ -15,7 +15,7 @@ function _complete_nix { else COMPREPLY+=("$completion") fi - done < <(NIX_GET_COMPLETIONS=$cword "${words[@]/#\~/$HOME}" 2>/dev/null) + done < <(NIX_GET_COMPLETIONS=$cword "${words[@]}" 2>/dev/null) __ltrim_colon_completions "$cur" } |