small update

This commit is contained in:
arcan1s 2014-07-18 00:05:10 +04:00
parent 75a95661f8
commit 9c0dcfe621
2 changed files with 6 additions and 4 deletions

View File

@ -23,4 +23,4 @@ configure_file (${SUBPROJECT_MAN_IN} ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_MA
install (FILES ${SUBPROJECT}.desktop DESTINATION share/applications/) install (FILES ${SUBPROJECT}.desktop DESTINATION share/applications/)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_MAN} DESTINATION share/man/man1/) install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_MAN} DESTINATION share/man/man1/)
install (FILES bash-completions DESTINATION share/bash-completion/completions/ RENAME _${SUBPROJECT}) install (FILES bash-completions DESTINATION share/bash-completion/completions/ RENAME _${SUBPROJECT})
install (FILES zsh-completions DESTINATION share/zsh/site-functions/ RENAME _${SUBPROJECT}) install (FILES zsh-completions DESTINATION share/zsh/site-functions/ RENAME ${SUBPROJECT})

View File

@ -68,7 +68,9 @@ _netctl_gui_tabs=(
'3' '3'
) )
_netctl_profiles=($(find /etc/netctl -maxdepth 1 -type f -printf "%f\n")) _netctl_profiles() {
echo $(find /etc/netctl -maxdepth 1 -type f -printf "%f\n")
}
# work block # work block
@ -79,12 +81,12 @@ _netctl_gui() {
wantsettings='-@(-set-opts)' wantsettings='-@(-set-opts)'
wantstring='-@(e|-essid)' wantstring='-@(e|-essid)'
wanttabs='-@(t|-tab)' wanttabs='-@(t|-tab)'
_get_comp_words_by_ref cur prev _get_comp_words_by_ref cur prev words cword
if [[ $prev = $wantfiles ]]; then if [[ $prev = $wantfiles ]]; then
_filedir _filedir
elif [[ $prev = $wantprofiles ]]; then elif [[ $prev = $wantprofiles ]]; then
COMPREPLY=($(compgen -W '${_netctl_profiles[@]}' -- "$cur")) COMPREPLY=($(compgen -W '$(_netctl_profiles)' -- "$cur"))
elif [[ $prev = $wantsettings ]]; then elif [[ $prev = $wantsettings ]]; then
COMPREPLY=($(compgen -S ',' -W '${_netctl_gui_settings[@]}' -- "$cur")) COMPREPLY=($(compgen -S ',' -W '${_netctl_gui_settings[@]}' -- "$cur"))
elif [[ $prev = $wantstring ]]; then elif [[ $prev = $wantstring ]]; then