split ncftp completion
This commit is contained in:
parent
abaec12fb6
commit
aeaa1af920
@ -3988,25 +3988,6 @@ _lftp()
|
||||
} &&
|
||||
complete -F _lftp $default lftp
|
||||
|
||||
# ncftp(1) bookmark completion
|
||||
#
|
||||
have ncftp &&
|
||||
_ncftp()
|
||||
{
|
||||
local cur
|
||||
|
||||
COMPREPLY=()
|
||||
cur=`_get_cword`
|
||||
|
||||
if [ $COMP_CWORD -eq 1 ] && [ -f ~/.ncftp/bookmarks ]; then
|
||||
COMPREPLY=( $( compgen -W '$( sed -ne "s/^\([^,]\{1,\}\),.*$/\1/p" \
|
||||
~/.ncftp/bookmarks )' -- $cur ) )
|
||||
fi
|
||||
|
||||
return 0
|
||||
} &&
|
||||
complete -F _ncftp $default ncftp
|
||||
|
||||
# gdb(1) completion
|
||||
#
|
||||
have gdb &&
|
||||
|
21
contrib/ncftp
Normal file
21
contrib/ncftp
Normal file
@ -0,0 +1,21 @@
|
||||
# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*-
|
||||
# ex: ts=8 sw=8 noet filetype=sh
|
||||
#
|
||||
# bash completion for ncftp
|
||||
|
||||
have ncftp &&
|
||||
_ncftp()
|
||||
{
|
||||
local cur
|
||||
|
||||
COMPREPLY=()
|
||||
cur=`_get_cword`
|
||||
|
||||
if [ $COMP_CWORD -eq 1 ] && [ -f ~/.ncftp/bookmarks ]; then
|
||||
COMPREPLY=( $( compgen -W '$( sed -ne "s/^\([^,]\{1,\}\),.*$/\1/p" \
|
||||
~/.ncftp/bookmarks )' -- $cur ) )
|
||||
fi
|
||||
|
||||
return 0
|
||||
} &&
|
||||
complete -F _ncftp $default ncftp
|
Loading…
x
Reference in New Issue
Block a user