From fda59a8d1999ddc51489a9e693959f375dc2e9e5 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Thu, 5 Apr 2018 20:56:54 +0100 Subject: [PATCH] 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 --- bash-completion/eject | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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') -- 2.47.3