From 1da1b2b345ccf32220a2628622ee8b170d9d521a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Wed, 22 Dec 2021 12:37:59 +0100 Subject: Don't insert spaces when completing attribute paths --- misc/bash/completion.sh | 4 +++- misc/fish/completion.fish | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'misc') 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") diff --git a/misc/fish/completion.fish b/misc/fish/completion.fish index bedbefaf8..c6b8ef16a 100644 --- a/misc/fish/completion.fish +++ b/misc/fish/completion.fish @@ -19,7 +19,6 @@ end function _nix_accepts_files set -l response (_nix_complete) - # First line is either filenames or no-filenames. test $response[1] = 'filenames' end -- cgit v1.2.3