diff options
author | Ville Skyttä | 2014-11-15 21:36:04 +0100 |
---|---|---|
committer | Karel Zak | 2014-11-18 13:58:21 +0100 |
commit | 396a6d7df5a034ea39b7a1917c7a5f68b9d00a2b (patch) | |
tree | 168c116db08f9f5a22f5e47bc431b91eee171bb7 /bash-completion/findmnt | |
parent | ldattach: GSM0710 support, add intro modem command (diff) | |
download | kernel-qcow2-util-linux-396a6d7df5a034ea39b7a1917c7a5f68b9d00a2b.tar.gz kernel-qcow2-util-linux-396a6d7df5a034ea39b7a1917c7a5f68b9d00a2b.tar.xz kernel-qcow2-util-linux-396a6d7df5a034ea39b7a1917c7a5f68b9d00a2b.zip |
bash-completion: Invoke actual commands to be completed, not basenames
Addresses partially: http://bugs.debian.org/769462
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
Diffstat (limited to 'bash-completion/findmnt')
-rw-r--r-- | bash-completion/findmnt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bash-completion/findmnt b/bash-completion/findmnt index a7df4a0ed..cf66565c1 100644 --- a/bash-completion/findmnt +++ b/bash-completion/findmnt @@ -38,7 +38,7 @@ _findmnt_module() for I in ${TMP_ARR[@]}; do MNT_OPTS[$I]='1' done - done < <(findmnt -rno OPTIONS) + done < <($1 -rno OPTIONS) COMPREPLY=( $(compgen -W "${!MNT_OPTS[@]}" -- $cur) ) return 0 ;; @@ -67,13 +67,13 @@ _findmnt_module() ;; '-S'|'--source') local DEV_MPOINT - DEV_MPOINT=$(findmnt -rno SOURCE | grep ^/dev) + DEV_MPOINT=$($1 -rno SOURCE | grep ^/dev) COMPREPLY=( $(compgen -W "$DEV_MPOINT" -- $cur) ) return 0 ;; '-T'|'--target') local DEV_MPOINT - DEV_MPOINT=$(findmnt -rno TARGET) + DEV_MPOINT=$($1 -rno TARGET) COMPREPLY=( $(compgen -W "$DEV_MPOINT" -- $cur) ) return 0 ;; @@ -117,7 +117,7 @@ _findmnt_module() ;; esac local DEV_MPOINT - DEV_MPOINT=$(findmnt -rno TARGET,SOURCE) + DEV_MPOINT=$($1 -rno TARGET,SOURCE) COMPREPLY=( $(compgen -W "$DEV_MPOINT" -- $cur) ) return 0 } |