X-Git-Url: http://git.iain.cx/?p=profile.git;a=blobdiff_plain;f=.profile.d%2Fcompletion.bashrc;h=68b1c9d7b01f03a66839a1a92995b8eefb50185c;hp=633c86c9b774d60b6d83b35783d506f5be54dc7b;hb=a7ded21407292fd479e8eedd8d9f640d5f386a06;hpb=7ff1edff9e3b22a1fd1f7798a634538d7ed94c54 diff --git a/.profile.d/completion.bashrc b/.profile.d/completion.bashrc index 633c86c..68b1c9d 100644 --- a/.profile.d/completion.bashrc +++ b/.profile.d/completion.bashrc @@ -1,3 +1,4 @@ +# $Id$ # Helper! export COMPLETION_DIR_SSH=~/.ssh/hosts export COMPLETION_DIR_TELNET=~/.telnet/hosts @@ -9,7 +10,7 @@ function _generic_completion() { COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} - HOSTS="$(find $COMPLETION_DIR -type f -perm -100 | sed 's@.*/@@')" + HOSTS="$(find $COMPLETION_DIR -type f -perm -100 2>/dev/null | sed 's@.*/@@')" COMPREPLY=($(compgen -W "$HOSTS" -- "$cur")) return 0 @@ -29,7 +30,7 @@ function _process() { function _pid() { cur=${COMP_WORDS[COMP_CWORD]} - PROCESSES="$(find /proc -name '[0-9]*' -maxdepth 1 | sed 's@.*/@@')" + PROCESSES="$(find /proc -name '[0-9]*' -maxdepth 1 2>/dev/null | sed 's@.*/@@')" COMPREPLY=($(compgen -W "$PROCESSES" -- "$cur")) return 0