From 4a8ebc07447cc0432641012ffa542d5aafa45d64 Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Tue, 14 Feb 2023 17:08:25 +0100 Subject: [PATCH] __fish_complete_path: Also use an empty command This removes a weird `ls` call (that just decorates directories), and makes it behave like normal path completion. (really, this should be a proper option to complete) Fixes #9285 --- share/functions/__fish_complete_path.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/functions/__fish_complete_path.fish b/share/functions/__fish_complete_path.fish index 03a13fd3e..7956abc6c 100644 --- a/share/functions/__fish_complete_path.fish +++ b/share/functions/__fish_complete_path.fish @@ -10,8 +10,8 @@ function __fish_complete_path --description "Complete using path" set target "$argv[1]" set description "$argv[2]" end - set -l targets "$target"* + set -l targets (complete -C"'' $target") if set -q targets[1] - printf "%s\t$description\n" (command ls -dp $targets) + printf "%s\n" $targets\t"$description" end end