split lftp completion
This commit is contained in:
parent
aeaa1af920
commit
8226742c71
@ -3969,25 +3969,6 @@ _openssl()
|
||||
complete -F _openssl $default openssl
|
||||
}
|
||||
|
||||
# lftp(1) bookmark completion
|
||||
#
|
||||
have lftp &&
|
||||
_lftp()
|
||||
{
|
||||
local cur
|
||||
|
||||
COMPREPLY=()
|
||||
cur=`_get_cword`
|
||||
|
||||
if [ $COMP_CWORD -eq 1 ] && [ -f ~/.lftp/bookmarks ]; then
|
||||
COMPREPLY=( $( compgen -W '$( sed -ne "s/^\(.*\)'$'\t''.*$/\1/p" \
|
||||
~/.lftp/bookmarks )' -- $cur ) )
|
||||
fi
|
||||
|
||||
return 0
|
||||
} &&
|
||||
complete -F _lftp $default lftp
|
||||
|
||||
# gdb(1) completion
|
||||
#
|
||||
have gdb &&
|
||||
|
21
contrib/lftp
Normal file
21
contrib/lftp
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 lftp
|
||||
|
||||
have lftp &&
|
||||
_lftp()
|
||||
{
|
||||
local cur
|
||||
|
||||
COMPREPLY=()
|
||||
cur=`_get_cword`
|
||||
|
||||
if [ $COMP_CWORD -eq 1 ] && [ -f ~/.lftp/bookmarks ]; then
|
||||
COMPREPLY=( $( compgen -W '$( sed -ne "s/^\(.*\)'$'\t''.*$/\1/p" \
|
||||
~/.lftp/bookmarks )' -- $cur ) )
|
||||
fi
|
||||
|
||||
return 0
|
||||
} &&
|
||||
complete -F _lftp $default lftp
|
Loading…
x
Reference in New Issue
Block a user