Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Re: Completion services + xterm auto-margin revisited
- X-seq: zsh-workers 13534
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: PATCH: Re: Completion services + xterm auto-margin revisited
- Date: Mon, 26 Feb 2001 14:00:56 +0100 (MET)
- In-reply-to: Sven Wischnowsky's message of Thu, 22 Feb 2001 13:02:22 +0100 (MET)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
I wrote:
> I think I should go through all places still using $words[1] again at
> the weekend. Hooray.
Yes, there were some more functions that had been changed since I
first send the services-patch.
Bye
Sven
Index: Completion/Builtins/_fc
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_fc,v
retrieving revision 1.2
diff -u -r1.2 _fc
--- Completion/Builtins/_fc 2000/04/01 20:43:43 1.2
+++ Completion/Builtins/_fc 2001/02/26 12:55:29
@@ -13,7 +13,7 @@
'(-A -R -W -I -e)-D[print elapsed times]' \
'(-A -R -W -I)*::commands:_command_names -e' )
-if [[ $words[1] = *history ]]; then
+if [[ $service = *history ]]; then
_arguments -C -s "$fc_common[@]"
else
_arguments -C -s \
Index: Completion/Builtins/_hash
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_hash,v
retrieving revision 1.6
diff -u -r1.6 _hash
--- Completion/Builtins/_hash 2000/05/31 09:38:26 1.6
+++ Completion/Builtins/_hash 2001/02/26 12:55:29
@@ -7,7 +7,7 @@
'-d[use named directory hash table]' \
'(-r -m -v)-f[rebuild hash table]' )
-case ${words[1]} in
+case ${service} in
hash)
_arguments -C -s \
'(-f -m -v)-r[empty hash table]' \
Index: Completion/Builtins/_source
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_source,v
retrieving revision 1.1.1.5
diff -u -r1.1.1.5 _source
--- Completion/Builtins/_source 2000/03/13 16:57:38 1.1.1.5
+++ Completion/Builtins/_source 2001/02/26 12:55:29
@@ -6,7 +6,7 @@
else
if [[ -prefix */ && ! -o pathdirs ]]; then
_files
- elif [[ $words[1] = . ]]; then
+ elif [[ $service = . ]]; then
_files -W path
else
_files -W "(. $path)"
Index: Completion/Builtins/_which
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_which,v
retrieving revision 1.3
diff -u -r1.3 _which
--- Completion/Builtins/_which 2000/05/31 09:38:26 1.3
+++ Completion/Builtins/_which 2001/02/26 12:55:29
@@ -11,7 +11,7 @@
farg='-f[output contents of functions]'
aarg='-a[print all occurences in path]'
-case ${words[1]} in
+case ${service} in
whence)
_arguments -C -s \
'(-c -w)-v[verbose output]' \
Index: Completion/Builtins/_zftp
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_zftp,v
retrieving revision 1.3
diff -u -r1.3 _zftp
--- Completion/Builtins/_zftp 2000/04/11 07:57:56 1.3
+++ Completion/Builtins/_zftp 2001/02/26 12:55:29
@@ -11,7 +11,7 @@
local subcom expl curcontext="${curcontext}"
-if [[ $words[1] = zftp ]]; then
+if [[ $service = zftp ]]; then
if [[ $CURRENT -eq 2 ]]; then
_wanted commands expl sub-command \
compadd open params user login type ascii binary mode put \
@@ -22,7 +22,7 @@
subcom=$words[2]
curcontext="${curcontext/:zftp:/:zftp-${words[2]}:}"
else
- subcom=$words[1]
+ subcom=$service
fi
case $subcom in
Index: Completion/User/_man
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_man,v
retrieving revision 1.7
diff -u -r1.7 _man
--- Completion/User/_man 2000/10/06 13:01:53 1.7
+++ Completion/User/_man 2001/02/26 12:55:29
@@ -2,7 +2,7 @@
local rep expl star approx mrd
-if [[ $words[1] == man ]] && (( $words[(I)-l] + $words[(I)--local-file] )); then
+if [[ $service == man ]] && (( $words[(I)-l] + $words[(I)--local-file] )); then
_files || return 0
fi
Index: Completion/User/_nedit
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_nedit,v
retrieving revision 1.5
diff -u -r1.5 _nedit
--- Completion/User/_nedit 2000/05/10 14:27:04 1.5
+++ Completion/User/_nedit 2001/02/26 12:55:29
@@ -14,7 +14,7 @@
'*-xrm:resource:_x_resource' \
'*:file:_files' )
-if [[ $words[1] = *nc ]]; then
+if [[ $service = *nc ]]; then
_x_arguments -C \
'(-noask)-ask[prompt if no server found]' \
'(-ask)-noask[start a new server without asking if none found]' \
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author