summaryrefslogtreecommitdiff
path: root/completions/lftp
diff options
context:
space:
mode:
Diffstat (limited to 'completions/lftp')
-rw-r--r--completions/lftp11
1 files changed, 5 insertions, 6 deletions
diff --git a/completions/lftp b/completions/lftp
index 41fb1356..72dedb42 100644
--- a/completions/lftp
+++ b/completions/lftp
@@ -10,20 +10,19 @@ _lftp()
_filedir
return
;;
- --help|--version|-!(-*)[chveups])
+ --help | --version | -!(-*)[chveups])
return
;;
esac
- if [[ "$cur" == -* ]]; then
- COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") )
+ if [[ $cur == -* ]]; then
+ COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
return
fi
- COMPREPLY=( $(compgen -W \
- '$(cut -f 1 -s ~/.lftp/bookmarks ${XDG_DATA_HOME:-$HOME/.local/share}/lftp/bookmarks 2>/dev/null)' -- "$cur") )
+ COMPREPLY=($(compgen -W '$("$1" -c "bookmark list" 2>/dev/null)' -- "$cur"))
_known_hosts_real -- "$cur"
} &&
-complete -F _lftp lftp
+ complete -F _lftp lftp
# ex: filetype=sh