Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xe-cli completion bugfixes #6166

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions ocaml/xe-cli/bash-completion
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ _xe()
IFS=$'\n,'
# Here we actually WANT file name completion, so using compgen is OK.
local comp_files=$(compgen -f "$value")
COMPREPLY=( "$comp_files" )
__xe_debug "triggering filename completion for the value:"
__xe_debug $(__tab_delimited_newline_array "$comp_files")
set_completions "$comp_files" "$value"
return 0
;;

Expand All @@ -156,7 +156,6 @@ _xe()
if [ "${OLDSTYLE_WORDS[1]}" == "pif-reconfigure-ip" ]; then
IFS=$'\n,'
suggested_modes="dhcp,static,none"
COMPREPLY=( $(compgen -W "dhcp ,static ,none" -- "$value") )
elif [ "${COMP_WORDS[1]}" == "pif-reconfigure-ipv6" ]; then
IFS=$'\n,'
suggested_modes="dhcp,static,none,autoconf"
Expand Down Expand Up @@ -675,7 +674,7 @@ description()

__process_params()
{
echo "$1" | cut -d: -f2- | egrep -v "^ $" | cut -c 2- | \
echo "$1" | cut -d: -f2- | grep -Ev "^ $" | cut -c 2- | \
sed -e 's/,/=,/g' -e 's/$/=/g' -e 's/:=/:/g' -e 's/-=/-/g' -e 's/ //g'
}

Expand Down
Loading