From: Karel Zak Date: Thu, 19 Mar 2026 10:06:20 +0000 (+0100) Subject: bash-completion: (unshare) remove embedded tabs from option strings X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa912c28d6659b85fb7afd249c3be41644b87667;p=thirdparty%2Futil-linux.git bash-completion: (unshare) remove embedded tabs from option strings Line continuations in the option string assignments preserved the leading tab (code indentation) from continuation lines, embedding literal tab characters into the variable values. This broke regex matching in the offset-detection loop for --mount-proc (OPTARGOPTS), --map-groups (REQARGOPTS), and --map-subids (NOARGOPTS). Addresses: https://github.com/util-linux/util-linux/pull/4084 Signed-off-by: Karel Zak --- diff --git a/bash-completion/unshare b/bash-completion/unshare index 75fe07eda..be026a9a5 100644 --- a/bash-completion/unshare +++ b/bash-completion/unshare @@ -4,21 +4,17 @@ _unshare_module() local OPTS NOARGOPTS OPTARGOPTS REQARGOPTS REQARGOPTS_SHORT NOARGOPTS_SHORT _init_completion -n = -- "$@" || return - OPTARGOPTS="--mount=|--uts=|--ipc=|--net=|--pid=|--user=|--cgroup=|--time=|--kill-child=|\ - --mount-proc=|--mount-binfmt=" + OPTARGOPTS="--mount=|--uts=|--ipc=|--net=|--pid=|--user=|--cgroup=|--time=|--kill-child=|--mount-proc=|--mount-binfmt=" - REQARGOPTS="--owner|--propagation|--setgroups|--root|--wd|--load-interp|--map-group|\ - --map-groups|--map-user|--map-users|--monotonic|--boottime|--setuid|--setgid" + REQARGOPTS="--owner|--propagation|--setgroups|--root|--wd|--load-interp|--map-group|--map-groups|--map-user|--map-users|--monotonic|--boottime|--setuid|--setgid" REQARGOPTS_SHORT="-l|-R|-w|-S|-G" - NOARGOPTS="--fork|--forward-signals|--map-root-user|--map-current-user|--map-auto|\ - --map-subids|--keep-caps|--help|--version|${OPTARGOPTS//=/}" + NOARGOPTS="--fork|--forward-signals|--map-root-user|--map-current-user|--map-auto|--map-subids|--keep-caps|--help|--version|${OPTARGOPTS//=/}" NOARGOPTS_SHORT="-r|-f|-c|-h|-V|-m|-u|-i|-n|-p|-U|-C|-T" - OPTS="${NOARGOPTS//[|]/ } ${NOARGOPTS_SHORT//[|]/ } ${OPTARGOPTS//[|]/ }\ - ${REQARGOPTS//[|]/ } ${REQARGOPTS_SHORT//[|]/ }" + OPTS="${NOARGOPTS//[|]/ } ${NOARGOPTS_SHORT//[|]/ } ${OPTARGOPTS//[|]/ } ${REQARGOPTS//[|]/ } ${REQARGOPTS_SHORT//[|]/ }" # Check if we are still completing unshare(1) and set # the offset so that it points to the command that is