From e4a1d8e240c18f363f9f91003d01ee07be24ee21 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 16 Dec 2015 10:38:19 +0100 Subject: [PATCH] allow fall back to default completion This allows a fall back to the default completion, which completes possible paths/files, if nothing can be generated from the PVE completion handler ($print_bash_completion) or if the user starts to entry a path. This is especially useful for restore or create commands which can take an archive file as argument. The bash-completions get generated at each package build through the respective Makefile, so to let this change come in effect the package needs to be rebuild and installed (and the respective file from /usr/share/bash-completion/completions/ needs to be sourced again (or simply open a new terminal)) Signed-off-by: Thomas Lamprecht --- src/PVE/CLIHandler.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index f973bdc..1493537 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -337,7 +337,7 @@ sub generate_bash_completions { # this modifies global var, but I found no better way COMP_WORDBREAKS=\${COMP_WORDBREAKS//:} -complete -C '$exename bashcomplete' $exename +complete -o default -C '$exename bashcomplete' $exename __EOD__ } -- 2.39.2