From: Iain Patterson Date: Mon, 14 Jan 2008 17:32:59 +0000 (+0000) Subject: Use OS.bashrc variables. X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=ba8e8ba49ac7d26a21537f55af435119dcb510de;p=profile.git Use OS.bashrc variables. git-svn-id: https://svn.cambridge.iain.cx/profile/trunk@90 6be0d1a5-5cfe-0310-89b6-964be062b18b --- diff --git a/.profile.d/completion.bashrc b/.profile.d/completion.bashrc index cf77c15..90db89c 100644 --- a/.profile.d/completion.bashrc +++ b/.profile.d/completion.bashrc @@ -30,8 +30,7 @@ function _process() { function _known_hosts() { cur=${COMP_WORDS[COMP_CWORD]} - HOSTS=$(sed 's/[ ].*//;s/,/\ -/' ~/.ssh/known_hosts) + HOSTS=$(sed 's/[ ].*//;s/,/\n/' ~/.ssh/known_hosts) COMPREPLY=($(compgen -W "$HOSTS" -- "$cur")) return 0 @@ -86,7 +85,7 @@ function _modprobe() { COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} - ver=$(uname -r) + ver=$KERNEL MODULES="$(find /lib/modules/$ver -name \*.ko | sed -n 's@^.*/\([^/]*\).ko$@\1@p')" COMPREPLY=($(compgen -W "$MODULES" -- "$cur"))