Fixed previous commit

This commit is contained in:
Anthony Scemama 2023-07-12 12:04:42 +02:00
parent 3c89e9d88d
commit 0aed20f53a
1 changed files with 4 additions and 5 deletions

View File

@ -189,18 +189,17 @@ _qp_Complete()
esac;;
set_file)
# Array to store directory names
dirs=()
dirs=""
# Find directories containing "ezfio/.version" file recursively
for i in $(find . -name ezfio | sed 's/ezfio$/.version/')
do
dir_name=${i%/.version} # Remove the ".version" suffix
dir_name=${dir_name#./} # Remove the leading "./" if present
dirs+=("$dir_name")
dir_name=${dir_name#./} # Remove the leading "./"
dirs+="./$dir_name "
done
# Output the directory names for completion
COMPREPLY=("${dirs[@]/#/.\/}") # Prefix each directory name with "./"
COMPREPLY=( $(compgen -W "$dirs" -- ${cur} ) )
return 0
;;
plugins)