Commit a6776cca authored by Olivier van Helden's avatar Olivier van Helden

bash completion: fix pattern used even if no match, leading to showing .ini the current folder

parent 71642c8e
......@@ -12,7 +12,7 @@ _opensim()
*)
case ${COMP_WORDS[1]} in
start|stop|restart)
COMPREPLY=( $(compgen -W "$(for folder in /etc/opensim/*.d /opt/opensim/etc/*.d; do cd $folder/; ls *.ini | cut -d . -f 1; done 2>/dev/null | tr [:upper:] [:lower:] | sort -u)" -- "$cur" -W) )
COMPREPLY=( $(compgen -W "$(for folder in $(ls -d /etc/opensim/*.d /opt/opensim/etc/*.d); do cd $folder/; ls *.ini | cut -d . -f 1; done 2>/dev/null | tr [:upper:] [:lower:] | sort -u)" -- "$cur" -W) )
;;
esac
;;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment