From c30e4ee961e72640cc55cbd500475a03308de1b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 04:22:44 +0200 Subject: Adding upstream version 252.25. Signed-off-by: Daniel Baumann --- shell-completion/bash/machinectl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'shell-completion/bash') diff --git a/shell-completion/bash/machinectl b/shell-completion/bash/machinectl index b28769b..6e89a3c 100644 --- a/shell-completion/bash/machinectl +++ b/shell-completion/bash/machinectl @@ -106,8 +106,12 @@ _machinectl() { comps=$( __get_machines ) elif __contains_word "$verb" ${VERBS[FILE]}; then - comps=$(compgen -f -- "cur") - compopt -o filenames + if (( COMP_CWORD == i + 1 )); then # first argument after verb + comps=$(compgen -f -- "$cur") + compopt -o filenames + else + comps='' + fi fi COMPREPLY=( $(compgen -W '$comps' -- "$cur") ) -- cgit v1.2.3