为什么我的set命令出现的全是各种函数代码,和env的那种不一样?
为什么我的set命令出现的全是各种函数代码,和env的那种不一样?
_yum_helper ()
{
local IFS='
';
COMPREPLY+=($(
/usr/share/yum-cli/completion-helper.py -d 0 -C "$@" 2>/dev/null ))
}
_yum_list ()
{
[[ $2 == */* || $2 == [.~-]* ]] && return;
_yum_helper list "$@"
}
_yum_plugins ()
{
local val;
[[ $1 -eq 1 ]] && val='\(1\|yes\|true\|on\)' || val='\(0\|no\|false\|off\)';
COMPREPLY+=($( compgen -W '$( command grep -il "^\s*enabled\s*=\s*$val" \
/etc/yum/pluginconf.d/*.conf 2>/dev/null \
| sed -ne "s|^.*/\([^/]\{1,\}\)\.conf$|\1|p" )' -- "$2" ))
}
_yum_transactions ()
{
COMPREPLY+=($( compgen -W "$( $yum -d 0 -C history 2>/dev/null | sed -ne 's/^[[:space:]]*\([0-9]\{1,\}\).*/\1/p' )" -- "$cur" ))
}
dequote ()
{
eval printf %s "$1" 2> /dev/null
}
quote ()
{
local quoted=${1//\'/\'\\\'\'};
printf "'%s'" "$quoted"
}
quote_readline ()
{
local quoted;
_quote_readline_by_ref "$1" ret;
printf %s "$ret"
}