aboutsummaryrefslogtreecommitdiff
path: root/Functions
diff options
context:
space:
mode:
Diffstat (limited to 'Functions')
-rw-r--r--Functions/Makefile.in16
-rw-r--r--Functions/Zftp/.distfiles2
-rw-r--r--Functions/Zftp/zfgoto0
-rw-r--r--Functions/Zftp/zfinit14
-rw-r--r--Functions/Zftp/zfmark0
-rw-r--r--Functions/Zftp/zftp_chpwd1
6 files changed, 29 insertions, 4 deletions
diff --git a/Functions/Makefile.in b/Functions/Makefile.in
index d6344dd62..75ec418a0 100644
--- a/Functions/Makefile.in
+++ b/Functions/Makefile.in
@@ -55,7 +55,14 @@ install.fns:
$(sdir_top)/mkinstalldirs $(fndir) || exit 1; \
for file in $(FUNCTIONS_INSTALL); do \
if test -f $$file; then \
- $(INSTALL_DATA) $$file $(fndir) || exit 1; \
+ if test x$(FUNCTIONS_SUBDIRS) != x -a \
+ x$(FUNCTIONS_SUBDIRS) != xno; then \
+ subdir="`echo $$file | sed -e 's%/.*%%'`"; \
+ $(sdir_top)/mkinstalldirs $(fndir)/$$subdir || exit 1; \
+ $(INSTALL_DATA) $$file $(fndir)/$$subdir || exit 1; \
+ else \
+ $(INSTALL_DATA) $$file $(fndir) || exit 1; \
+ fi; \
fi; \
done; \
fi; \
@@ -65,7 +72,12 @@ uninstall.fns:
if test x$(fndir) != x && test x$(fndir) != xno; then \
for file in $(FUNCTIONS_INSTALL); do \
if test -f $$file; then \
- rm -f "$(fndir)/`echo $$file | sed -e 's%^.*/%%'`"; \
+ if test x$(FUNCTIONS_SUBDIRS) != x -a \
+ x$(FUNCTIONS_SUBDIRS) != xno; then \
+ rm -f $(fndir)/$$file; \
+ else \
+ rm -f "$(fndir)/`echo $$file | sed -e 's%^.*/%%'`"; \
+ fi; \
fi; \
done; \
fi; \
diff --git a/Functions/Zftp/.distfiles b/Functions/Zftp/.distfiles
index c45e8d1c8..e5aad61ea 100644
--- a/Functions/Zftp/.distfiles
+++ b/Functions/Zftp/.distfiles
@@ -1,7 +1,7 @@
DISTFILES_SRC='
.distfiles
zfanon zfautocheck zfcd zfcd_match zfcget zfclose zfcput zfdir
- zfgcp zfget zfget_match zfhere zfinit zfls zfopen zfparams
+ zfgcp zfget zfget_match zfgoto zfhere zfinit zfls zfmark zfopen zfparams
zfpcp zfput zfrglob zfrtime zfstat zftp_chpwd zftp_progress
zftype zfuget zfuput
'
diff --git a/Functions/Zftp/zfgoto b/Functions/Zftp/zfgoto
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Functions/Zftp/zfgoto
diff --git a/Functions/Zftp/zfinit b/Functions/Zftp/zfinit
index be827c6ac..fbe6c5979 100644
--- a/Functions/Zftp/zfinit
+++ b/Functions/Zftp/zfinit
@@ -1,3 +1,5 @@
+emulate -L zsh
+
[[ $1 = -n ]] || zmodload -ia zftp
alias zfcd='noglob zfcd'
@@ -6,6 +8,11 @@ alias zfls='noglob zfls'
alias zfdir='noglob zfdir'
alias zfuget='noglob zfuget'
+autoload -U zfanon zfautocheck zfcd zfcd_match zfcget zfclose zfcput
+autoload -U zfdir zfgcp zfget zfget_match zfgoto zfhere zfinit zfls
+autoload -U zfmark zfopen zfparams zfpcp zfput zfrglob zfrtime zfstat
+autoload -U zftp_chpwd zftp_progress zftype zfuget zfuput
+
# only way of getting that noglob out of the way: this is unnecessary with
# widget-based completion and can be commented out.
setopt completealiases
@@ -14,7 +21,7 @@ setopt completealiases
# zftp completions: only use these if new-style completion is not
# active.
#
-if [[ ${#patcomps} -eq 0 || ${patcomps[(i)zf*]} -gt ${#patcomps} ]]; then
+if [[ ${#_patcomps} -eq 0 || ${_patcomps[(i)zf*]} -gt ${#_patcomps} ]]; then
compctl -f -x 'p[1]' \
-k '(open params user login type ascii binary mode put putat
get getat append appendat ls dir local remote mkdir rmdir delete
@@ -25,4 +32,9 @@ if [[ ${#patcomps} -eq 0 || ${patcomps[(i)zf*]} -gt ${#patcomps} ]]; then
compctl -K zfcd_match -S/ -q zfcd zfdir zfls
compctl -K zfget_match zfget zfgcp zfuget zfcget
compctl -k hosts zfanon zfopen zfparams
+ compctl -s \
+ '$(awk '\''{print $1}'\'' ${ZFTP_BMFILE:-${ZDOTDIR:-$HOME}/.zfbkmarks})' \
+ -x 'W[1,-*n*]' \
+ -s '$(awk -F, '\''NR > 2 { print $1 }'\'' ~/.ncftp/bookmarks)' -- \
+ zfgoto zfmark
fi
diff --git a/Functions/Zftp/zfmark b/Functions/Zftp/zfmark
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Functions/Zftp/zfmark
diff --git a/Functions/Zftp/zftp_chpwd b/Functions/Zftp/zftp_chpwd
index 0df199cfb..f1c2d5311 100644
--- a/Functions/Zftp/zftp_chpwd
+++ b/Functions/Zftp/zftp_chpwd
@@ -24,6 +24,7 @@ if [[ -z $ZFTP_USER ]]; then
else
[[ -n $ZFTP_PWD ]] && zflastdir=$ZFTP_PWD
zflastsession="$ZFTP_HOST:$ZFTP_PWD"
+ zflastuser="$ZFTP_USER"
local args
if [[ -t 1 && -t 2 ]]; then
local str=$zflastsession