From: Sami Kerola Date: Thu, 5 Apr 2018 19:56:54 +0000 (+0100) Subject: bash-completion: do not print eject --cdspeed error messages X-Git-Tag: v2.33-rc1~328 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fda59a8d1999ddc51489a9e693959f375dc2e9e5;p=thirdparty%2Futil-linux.git 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 --- diff --git a/bash-completion/eject b/bash-completion/eject index 123829ea25..327ef1b713 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')