22 lines
424 B
Bash
22 lines
424 B
Bash
# -*- 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
|