From 07df800a88635084476c242354736fd4c1f695d6 Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Tue, 3 Jun 2025 22:08:04 +0900 Subject: [PATCH] bash-completion: use "command ls" instead of "\ls" The backslash quoting can be used to bypass aliases, but it cannot be used to bypass shell functions for interactive uses defined by the users. We can use "command ls" instead to bypass both aliases and shell functions. --- bash-completion/blkid | 2 +- bash-completion/mount | 2 +- bash-completion/umount | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bash-completion/blkid b/bash-completion/blkid index 175f1746d..a7e4ef5da 100644 --- a/bash-completion/blkid +++ b/bash-completion/blkid @@ -46,7 +46,7 @@ _blkid_module() '-n'|'--match-types') OUTPUT_ALL=" $(command awk '{print $NF}' /proc/filesystems) - $(\ls /lib/modules/$(command uname -r)/kernel/fs) + $(command ls /lib/modules/$(command uname -r)/kernel/fs) " ;; '-h'|'--help'|'-V'|'--version') diff --git a/bash-completion/mount b/bash-completion/mount index 268aa3c79..6175527d8 100644 --- a/bash-completion/mount +++ b/bash-completion/mount @@ -8,7 +8,7 @@ _mount_module() '-t'|'--types') local prefix realcur TYPES TYPES=" - $(\ls /lib/modules/$(command uname -r)/kernel/fs | command awk '{print $1, "no" $1}') + $(command ls /lib/modules/$(command uname -r)/kernel/fs | command awk '{print $1, "no" $1}') $(command awk '{print $NF, "no" $NF}' /proc/filesystems) " realcur="${cur##*,}" diff --git a/bash-completion/umount b/bash-completion/umount index 3b358d0fc..35e86d909 100644 --- a/bash-completion/umount +++ b/bash-completion/umount @@ -42,7 +42,7 @@ _umount_module() '-t'|'--types') local TYPES TYPES=" - $(\ls /lib/modules/$(command uname -r)/kernel/fs | command awk '{print $1, "no" $1}') + $(command ls /lib/modules/$(command uname -r)/kernel/fs | command awk '{print $1, "no" $1}') $(command awk '{print $NF, "no" $NF}' /proc/filesystems) " COMPREPLY=( $(compgen -W "$TYPES" -- $cur) ) -- 2.47.2