aboutsummaryrefslogtreecommitdiff
path: root/misc/bash
diff options
context:
space:
mode:
authorNaïm Favier <n@monade.li>2021-12-22 12:37:59 +0100
committerNaïm Favier <n@monade.li>2021-12-22 16:17:01 +0100
commit1da1b2b345ccf32220a2628622ee8b170d9d521a (patch)
tree800a607ba075453c97525994a510fa1e1e4c6efc /misc/bash
parent6e6e998930f0d7361d64644eb37d9134e74e8501 (diff)
Don't insert spaces when completing attribute paths
Diffstat (limited to 'misc/bash')
-rw-r--r--misc/bash/completion.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/misc/bash/completion.sh b/misc/bash/completion.sh
index bea2a40bc..3eb44dfa6 100644
--- a/misc/bash/completion.sh
+++ b/misc/bash/completion.sh
@@ -7,8 +7,10 @@ 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")