Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: documentation for new accounts completion



Here's the promised documentation.  Hope it's OK.  Also a tiny
tweak to _other_accounts.

Index: Completion/User/_other_accounts
===================================================================
RCS file: /usr/local/cvsroot/zsh/Completion/User/_other_accounts,v
retrieving revision 1.1
diff -u -r1.1 _other_accounts
--- Completion/User/_other_accounts	1999/09/26 13:50:53	1.1
+++ Completion/User/_other_accounts	1999/09/27 01:43:32
@@ -1,4 +1,4 @@
-#compdef ytalk finger
+#compdef talk ntalk ytalk finger
 
 local expl nm="$compstate[nmatches]"
 local accounts_users_hosts
Index: Doc/Zsh/compsys.yo
===================================================================
RCS file: /usr/local/cvsroot/zsh/Doc/Zsh/compsys.yo,v
retrieving revision 1.4
diff -u -r1.4 compsys.yo
--- Doc/Zsh/compsys.yo	1999/09/27 01:36:37	1.4
+++ Doc/Zsh/compsys.yo	1999/09/27 01:47:45
@@ -1252,6 +1252,30 @@
 not set by the user, it will be set to a list of the service names
 from `tt(/etc/services)'.
 )
+item(tt(my_accounts))(
+This array is used for completion of usernames and hostnames for many
+commands, including the tt(ssh) and tt(rlogin) family. It should
+contain elements of the form `var(host)tt(:)var(user)', corresponding
+to the user's own accounts. These pairs will be used to complete names
+of hosts and usernames depending on the information already on the
+line, so that if, for example, the username is already typed, only
+those hostnames will be completed for which pairs with the username
+from the line exist.
+)
+item(tt(other_accounts))(
+Like tt(my_accounts), except that it should contain the usernames and
+hostnames of other people's accounts, for use with commands such as
+tt(talk), tt(ytalk) and tt(finger).
+)
+item(var(command)tt(_accounts))(
+Any of the commands which use the above tt(my_accounts) and
+tt(other_accounts) arrays can have this behaviour overridden by
+specifying a username/hostname array unique to that command.
+For example, if you wanted tt(rcp) to complete usernames and hostnames
+from a different set of accounts, you could set the array
+tt(rcp_accounts) with username/hostname pairs in the same format as
+tt(my_accounts).
+)
 item(tt(telnet_hosts_ports_users))(
 This array is used by the completion function for tt(telnet). It
 should contain elements of the form



Messages sorted by: Reverse Date, Date, Thread, Author