代码拉取完成,页面将自动刷新
同步操作将从 anolis/keentuned 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# keentune(1) completion
_keentune()
{
COMPREPLY=()
local commands="--help init param profile sensitize rollbackall migrate --version -v"
local cur=${COMP_WORDS[COMP_CWORD]};
local cmd=${COMP_WORDS[COMP_CWORD-1]};
case $cmd in
'keentune')
COMPREPLY=( $(compgen -W '$commands' -- $cur) ) ;;
'param')
COMPREPLY=( $(compgen -W 'delete dump jobs list rollback stop tune' -- $cur) ) ;;
'tune' | 'dump')
COMPREPLY=( $(compgen -W '--job' -- $cur) ) ;;
'profile')
COMPREPLY=( $(compgen -W 'delete generate info list rollback set' -- $cur) ) ;;
'generate' | 'info')
COMPREPLY=( $(compgen -W '--name' -- $cur) ) ;;
'sensitize')
COMPREPLY=( $(compgen -W 'delete jobs stop train' -- $cur) ) ;;
'train')
COMPREPLY=( $(compgen -W '--data' -- $cur) ) ;;
'set')
COMPREPLY=( $(compgen -W '--group1' -- $cur) ) ;;
'migrate')
COMPREPLY=( $(compgen -W '--dir' --$cur) );;
esac
#profile set command
if [[ ( "${COMP_WORDS[2]}" == "set" && "${COMP_WORDS[3]}" == "--group1" ) || ( "${COMP_WORDS[2]}" == "info" && "${COMP_WORDS[3]}" == "--name" ) ]]; then
COMPREPLY=( $(compgen -W "$(command find /etc/keentune/profile /var/keentune/profile -type f -printf "%f\n")" -- "$cur" ) )
fi
#profile delete command
if [[ "${COMP_WORDS[2]}" == "delete" && "${COMP_WORDS[3]}" == "--name" ]]; then
local pro=($(pwd))
cd /var/keentune/profile
compopt -o nospace
COMPREPLY=($(compgen -d -f -- $cur))
cd $pro
fi
#param/profile/sensitize delete command
if [[ "$cmd" == "delete" && ( "${COMP_WORDS[1]}" == "sensitize" || "${COMP_WORDS[1]}" == "param" )]]; then
COMPREPLY=( $(compgen -W '--job' -- $cur) )
elif [[ "$cmd" == "delete" && "${COMP_WORDS[1]}" == "profile" ]]; then
COMPREPLY=( $(compgen -W '--name' -- $cur) )
fi
#migrate --dir command
if [[ "${COMP_WORDS[1]}" == "migrate" && "${COMP_WORDS[2]}" == "--dir" ]]; then
local pro=($(pwd))
cd /usr/lib/tuned
compopt -o nospace
COMPREPLY=($(compgen -d -f -- $cur))
cd $pro
fi
return 0
}
complete -F _keentune keentune
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。