mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-11-07 05:53:37 +01:00
Fixed previous commit
This commit is contained in:
parent
3c89e9d88d
commit
0aed20f53a
@ -189,18 +189,17 @@ _qp_Complete()
|
|||||||
esac;;
|
esac;;
|
||||||
set_file)
|
set_file)
|
||||||
# Array to store directory names
|
# Array to store directory names
|
||||||
dirs=()
|
dirs=""
|
||||||
|
|
||||||
# Find directories containing "ezfio/.version" file recursively
|
# Find directories containing "ezfio/.version" file recursively
|
||||||
for i in $(find . -name ezfio | sed 's/ezfio$/.version/')
|
for i in $(find . -name ezfio | sed 's/ezfio$/.version/')
|
||||||
do
|
do
|
||||||
dir_name=${i%/.version} # Remove the ".version" suffix
|
dir_name=${i%/.version} # Remove the ".version" suffix
|
||||||
dir_name=${dir_name#./} # Remove the leading "./" if present
|
dir_name=${dir_name#./} # Remove the leading "./"
|
||||||
dirs+=("$dir_name")
|
dirs+="./$dir_name "
|
||||||
done
|
done
|
||||||
|
|
||||||
# Output the directory names for completion
|
COMPREPLY=( $(compgen -W "$dirs" -- ${cur} ) )
|
||||||
COMPREPLY=("${dirs[@]/#/.\/}") # Prefix each directory name with "./"
|
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
plugins)
|
plugins)
|
||||||
|
Loading…
Reference in New Issue
Block a user