summaryrefslogtreecommitdiffstats
path: root/bash-completion
diff options
context:
space:
mode:
authorSami Kerola2018-04-05 21:56:54 +0200
committerKarel Zak2018-04-06 13:03:38 +0200
commitfda59a8d1999ddc51489a9e693959f375dc2e9e5 (patch)
treee97afee4ed99746167f7853bfe2e9219c0dd5bcb /bash-completion
parentbash-completion: fix few bash set -u issues (diff)
downloadkernel-qcow2-util-linux-fda59a8d1999ddc51489a9e693959f375dc2e9e5.tar.gz
kernel-qcow2-util-linux-fda59a8d1999ddc51489a9e693959f375dc2e9e5.tar.xz
kernel-qcow2-util-linux-fda59a8d1999ddc51489a9e693959f375dc2e9e5.zip
bash-completion: do not print eject --cdspeed error messages
Bash completion is proposing --cdspeed option argument from 'eject --listspeed /dev/cdrom' output. Nowadays it is common not to have such device, and this results to an unwanted error message to stderr merely messing up command line. Lets stop that. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'bash-completion')
-rw-r--r--bash-completion/eject2
1 files changed, 1 insertions, 1 deletions
diff --git a/bash-completion/eject b/bash-completion/eject
index 123829ea2..327ef1b71 100644
--- a/bash-completion/eject
+++ b/bash-completion/eject
@@ -15,7 +15,7 @@ _eject_module()
return 0
;;
'-x'|'--cdspeed')
- COMPREPLY=( $(compgen -W "$($1 -X)" -- $cur) )
+ COMPREPLY=( $(compgen -W "$(eject --listspeed 2>/dev/null)" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')