summaryrefslogtreecommitdiff
path: root/completions/ypmatch
diff options
context:
space:
mode:
Diffstat (limited to 'completions/ypmatch')
-rw-r--r--completions/ypmatch5
1 files changed, 3 insertions, 2 deletions
diff --git a/completions/ypmatch b/completions/ypmatch
index a93a9ebf..1b46e41c 100644
--- a/completions/ypmatch
+++ b/completions/ypmatch
@@ -12,12 +12,13 @@ _ypmatch()
if [[ $cmd == ypmatch && $cword -eq 1 && ${#words[@]} -eq 3 ]]; then
map=${words[2]}
- COMPREPLY=( $( compgen -W '$( ypcat $map | \
+ COMPREPLY=( $( compgen -W '$( ypcat $map 2>/dev/null | \
cut -d':' -f 1 )' -- "$cur") )
else
[[ $cmd == ypmatch && $cword -ne 2 ]] && return 0
COMPREPLY=( $( compgen -W \
- '$( printf "%s\n" $(ypcat -x | cut -d"\"" -f 2) )' -- "$cur"))
+ '$( printf "%s\n" $(ypcat -x 2>/dev/null | \
+ cut -d"\"" -f 2) )' -- "$cur") )
fi
return 0