From 2406cdeed3aef38a36769e69839d0afc572fdcdd Mon Sep 17 00:00:00 2001 From: Jesse Gardner Date: Tue, 30 Mar 2021 17:36:48 -0700 Subject: [PATCH] Completion script now reverts to completing filepaths if word starts with ./ or / --- qq2clone.completion | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qq2clone.completion b/qq2clone.completion index 7f1e1f0..f730eb1 100755 --- a/qq2clone.completion +++ b/qq2clone.completion @@ -34,6 +34,9 @@ THIS_ARG="${COMP_WORDS[$COMP_CWORD]}" set_coms="connect|destroy|exec|resume|rm|rm\-shred|rm\-wipe|save|save\-rm|" set_coms="${set_coms}start|suspend|restore" +[[ "$THIS_ARG" =~ ^('./'|'/') ]] && + { read -ra COMPREPLY < <(compgen -f "$THIS_ARG" | tr "\n" " " ); return 0; } + declare -a suggestions if [[ "$THIS_ARG" =~ ^\-\- ]]; then