From 3338a34d6aaf4597302fbea5de24efa2cb800d46 Mon Sep 17 00:00:00 2001 From: TNeitzel Date: Fri, 7 Jan 2022 07:02:14 +0100 Subject: [PATCH] Improve completion script Add gadget name completion for --gadget-name argument. --- resources/bash_completion.d/rmg | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/bash_completion.d/rmg b/resources/bash_completion.d/rmg index 21e5e75a..b6e4cf26 100644 --- a/resources/bash_completion.d/rmg +++ b/resources/bash_completion.d/rmg @@ -42,9 +42,12 @@ function _rmg() { _filedir return 0 - elif _comp_contains "--ssrf-response --bind-objid --gadget-name --gadget-cmd" $prev; then + elif _comp_contains "--ssrf-response --bind-objid --gadget-cmd" $prev; then return 0 + elif _comp_contains "--gadget-name" $prev; then + opts="$gadgets" + elif [[ $cur == -* ]] || [[ $args -ge 8 ]]; then opts="--help" opts="$opts --gopher"