diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2022-03-10 16:20:01 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2022-03-10 16:20:01 +0000 |
commit | 938650700fafe76e3755982d670855fed3db35c6 (patch) | |
tree | 7a6ac217f87cad07bb963ec658bd60625b868466 /misc/bash/completion.sh | |
parent | 195daa82995b43b3cbd552735a678afb85f4ae28 (diff) | |
parent | 8ba089597fa19bfd49ba5f22a5e821740ca4eb5d (diff) |
Merge branch 'path-info' into ca-drv-exotic
Diffstat (limited to 'misc/bash/completion.sh')
-rw-r--r-- | misc/bash/completion.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/misc/bash/completion.sh b/misc/bash/completion.sh index bea2a40bc..045053dee 100644 --- a/misc/bash/completion.sh +++ b/misc/bash/completion.sh @@ -7,13 +7,15 @@ function _complete_nix { local completion=${line%% *} if [[ -z $have_type ]]; then have_type=1 - if [[ $completion = filenames ]]; then + if [[ $completion == filenames ]]; then compopt -o filenames + elif [[ $completion == attrs ]]; then + compopt -o nospace fi else COMPREPLY+=("$completion") fi - done < <(NIX_GET_COMPLETIONS=$cword "${words[@]}") + done < <(NIX_GET_COMPLETIONS=$cword "${words[@]/#\~/$HOME}" 2>/dev/null) __ltrim_colon_completions "$cur" } |