diff options
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/User/.distfiles | 2 | ||||
-rw-r--r-- | Completion/User/_lftp | 5 | ||||
-rw-r--r-- | Completion/User/_ncftp | 11 |
3 files changed, 8 insertions, 10 deletions
diff --git a/Completion/User/.distfiles b/Completion/User/.distfiles index 34ca2c391..4411fb28e 100644 --- a/Completion/User/.distfiles +++ b/Completion/User/.distfiles @@ -6,7 +6,7 @@ DISTFILES_SRC=' _enscript _find _finger _fakeroot _fetchmail _flex _gcc _gdb _getconf _gprof _grep _groups _gs _gv _gzip _hosts _imagemagick _iconv _init_d _ispell - _java _joe _killall _lftp _look _lp _ls _lynx _lzop + _java _joe _killall _look _lp _ls _lynx _lzop _mailboxes _make _man _mere _mh _mount _mutt _my_accounts _mysql_utils _ncftp _nedit _netscape _newsgroups _nslookup _other_accounts _pack _patch _pbm _pdf _perl _perl_basepods _perl_builtin_funcs diff --git a/Completion/User/_lftp b/Completion/User/_lftp deleted file mode 100644 index 610f6991a..000000000 --- a/Completion/User/_lftp +++ /dev/null @@ -1,5 +0,0 @@ -#compdef lftp -if [[ -f ~/.lftp/bookmarks ]]; then - _wanted bookmarks expl bookmark \ - compadd - $(cut -f1 ~/.lftp/bookmarks) && return 0 -fi diff --git a/Completion/User/_ncftp b/Completion/User/_ncftp index e760b3536..64f2aee31 100644 --- a/Completion/User/_ncftp +++ b/Completion/User/_ncftp @@ -1,8 +1,11 @@ -#compdef ncftp +#compdef ncftp lftp -if [[ -f ~/.ncftp/bookmarks ]]; then - _wanted bookmarks expl bookmark \ - compadd - $(awk -F, 'NR > 2 { print $1 }' ~/.ncftp/bookmarks) && return 0 +local bookmarks=$HOME/.$service/bookmarks + +if [[ -f $bookmarks ]]; then + bookmarks=(${"${(f)$(<$bookmarks)}"%%[[:space:],]*}) + [[ $service == ncftp ]] && shift 2 bookmarks + _wanted bookmarks expl bookmark compadd -a bookmarks && return 0 fi _hosts |