diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-04-25 15:43:45 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-04-25 15:43:45 +0000 |
commit | e8eb43fc308acb3f1a8ebada7633c097e5050e46 (patch) | |
tree | 2df36ef3c7709c7d4d3b7bdcb5761f98649859bf /Functions/Zftp/zfinit | |
parent | e74702b467171dbdafb56dfe354794a212e020d9 (diff) | |
download | zsh-e8eb43fc308acb3f1a8ebada7633c097e5050e46.tar.gz zsh-e8eb43fc308acb3f1a8ebada7633c097e5050e46.tar.xz zsh-e8eb43fc308acb3f1a8ebada7633c097e5050e46.zip |
Initial revision
Diffstat (limited to 'Functions/Zftp/zfinit')
-rw-r--r-- | Functions/Zftp/zfinit | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Functions/Zftp/zfinit b/Functions/Zftp/zfinit new file mode 100644 index 000000000..be827c6ac --- /dev/null +++ b/Functions/Zftp/zfinit @@ -0,0 +1,28 @@ +[[ $1 = -n ]] || zmodload -ia zftp + +alias zfcd='noglob zfcd' +alias zfget='noglob zfget' +alias zfls='noglob zfls' +alias zfdir='noglob zfdir' +alias zfuget='noglob zfuget' + +# only way of getting that noglob out of the way: this is unnecessary with +# widget-based completion and can be commented out. +setopt completealiases + +# +# zftp completions: only use these if new-style completion is not +# active. +# +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 + close quit)' - \ + 'w[1,cd][1,ls][1,dir][1,rmdir]' -K zfcd_match -S/ -q - \ + 'W[1,get*]' -K zfget_match - 'w[1,delete][1,remote]' -K zfget_match - \ + 'w[1,open][1,params]' -k hosts -- zftp + compctl -K zfcd_match -S/ -q zfcd zfdir zfls + compctl -K zfget_match zfget zfgcp zfuget zfcget + compctl -k hosts zfanon zfopen zfparams +fi |