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

PATCH: Re: Names in the parameters module



Bart Schaefer wrote:

> I'd like to suggest that:
> 
> The "dis" parameters all become "dis_" parameters.
> 
> raliases becomes aliases.

Thanks for saying that... I was tempted to do that anyway.

Bye
 Sven

diff -u -r oldsrc/Modules/parameter.c Src/Modules/parameter.c
--- oldsrc/Modules/parameter.c	Wed Nov  3 10:25:58 1999
+++ Src/Modules/parameter.c	Wed Nov  3 11:51:55 1999
@@ -1808,7 +1808,7 @@
     { "functions", 0,
       getpmfunction, scanpmfunctions, setpmfunctions,
       NULL, NULL, stdunsetfn, NULL },
-    { "disfunctions", 0,
+    { "dis_functions", 0,
       getpmdisfunction, scanpmdisfunctions, setpmdisfunctions,
       NULL, NULL, stdunsetfn, NULL },
     { "funcstack", PM_ARRAY|PM_SPECIAL|PM_READONLY,
@@ -1817,13 +1817,13 @@
     { "builtins", PM_READONLY,
       getpmbuiltin, scanpmbuiltins, hashsetfn,
       NULL, NULL, stdunsetfn, NULL },
-    { "disbuiltins", PM_READONLY,
+    { "dis_builtins", PM_READONLY,
       getpmdisbuiltin, scanpmdisbuiltins, hashsetfn,
       NULL, NULL, stdunsetfn, NULL },
     { "reswords", PM_ARRAY|PM_SPECIAL|PM_READONLY,
       NULL, NULL, NULL,
       arrsetfn, reswordsgetfn, stdunsetfn, NULL },
-    { "disreswords", PM_ARRAY|PM_SPECIAL|PM_READONLY,
+    { "dis_reswords", PM_ARRAY|PM_SPECIAL|PM_READONLY,
       NULL, NULL, NULL,
       arrsetfn, disreswordsgetfn, stdunsetfn, NULL },
     { "options", 0,
@@ -1853,16 +1853,16 @@
     { "userdirs", PM_READONLY,
       getpmuserdir, scanpmuserdirs, hashsetfn,
       NULL, NULL, stdunsetfn, NULL },
-    { "raliases", 0,
+    { "aliases", 0,
       getpmralias, scanpmraliases, setpmraliases,
       NULL, NULL, stdunsetfn, NULL },
     { "galiases", 0,
       getpmgalias, scanpmgaliases, setpmgaliases,
       NULL, NULL, stdunsetfn, NULL },
-    { "disraliases", 0,
+    { "dis_aliases", 0,
       getpmdisralias, scanpmdisraliases, setpmdisraliases,
       NULL, NULL, stdunsetfn, NULL },
-    { "disgaliases", 0,
+    { "dis_galiases", 0,
       getpmdisgalias, scanpmdisgaliases, setpmdisgaliases,
       NULL, NULL, stdunsetfn, NULL },
     { NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
diff -u -r oldsrc/Modules/parameter.mdd Src/Modules/parameter.mdd
--- oldsrc/Modules/parameter.mdd	Wed Nov  3 11:49:47 1999
+++ Src/Modules/parameter.mdd	Wed Nov  3 11:52:14 1999
@@ -1,3 +1,3 @@
-autoparams="parameters commands functions disfunctions funcstack builtins disbuiltins reswords disreswords options modules dirstack history historywords jobtexts jobstates nameddirs userdirs raliases disraliases galiases disgaliases"
+autoparams="parameters commands functions dis_functions funcstack builtins dis_builtins reswords dis_reswords options modules dirstack history historywords jobtexts jobstates nameddirs userdirs aliases dis_aliases galiases dis_galiases"
 
 objects="parameter.o"
diff -u -r oldcompletion/Base/_command_names Completion/Base/_command_names
--- oldcompletion/Base/_command_names	Wed Nov  3 11:48:41 1999
+++ Completion/Base/_command_names	Wed Nov  3 11:55:38 1999
@@ -28,7 +28,7 @@
   _description expl 'shell function'
   compadd "$expl[@]" "$@" - "${(k@)functions}" && ret=0
   _description expl 'alias'
-  compadd "$expl[@]" "$@" - "${(k@)raliases}" && ret=0
+  compadd "$expl[@]" "$@" - "${(k@)aliases}" && ret=0
   _description expl 'reserved word'
   compadd "$expl[@]" "$@" - "${(k@)reswords}" && ret=0
 fi
diff -u -r oldcompletion/Builtins/_aliases Completion/Builtins/_aliases
--- oldcompletion/Builtins/_aliases	Wed Nov  3 11:48:43 1999
+++ Completion/Builtins/_aliases	Wed Nov  3 11:56:07 1999
@@ -3,6 +3,6 @@
 local expl
 
 _description expl 'regular alias'
-compadd "$expl[@]" - "${(@k)raliases}"
+compadd "$expl[@]" - "${(@k)aliases}"
 _description expl 'global alias'
 compadd "$expl[@]" - "${(@k)galiases}"
diff -u -r oldcompletion/Builtins/_enable Completion/Builtins/_enable
--- oldcompletion/Builtins/_enable	Wed Nov  3 11:48:44 1999
+++ Completion/Builtins/_enable	Wed Nov  3 11:54:05 1999
@@ -4,19 +4,19 @@
 
 if [[ "$prev" = -*a* ]]; then
   _description expl alias
-  compadd "$expl[@]" "$@" - "${(k@)disaliases}" && ret=0
+  compadd "$expl[@]" "$@" - "${(k@)dis_aliases}" "${(k@)dis_galiases}" && ret=0
 fi
 if [[ "$prev" = -*f* ]]; then
   _description expl 'shell function'
-  compadd "$expl[@]" "$@" - "${(k@)disfunctions}" && ret=0
+  compadd "$expl[@]" "$@" - "${(k@)dis_functions}" && ret=0
 fi
 if [[ "$prev" = -*r* ]]; then
   _description expl 'reserved word'
-  compadd "$expl[@]" "$@" - "${(k@)disreswords}" && ret=0
+  compadd "$expl[@]" "$@" - "${(k@)dis_reswords}" && ret=0
 fi
 if [[ "$prev" != -* ]]; then
   _description expl 'builtin command'
-  compadd "$expl[@]" "$@" - "${(k@)disbuiltins}" && ret=0
+  compadd "$expl[@]" "$@" - "${(k@)dis_builtins}" && ret=0
 fi
 
 return ret
diff -u -r oldcompletion/Builtins/_unhash Completion/Builtins/_unhash
--- oldcompletion/Builtins/_unhash	Wed Nov  3 11:48:45 1999
+++ Completion/Builtins/_unhash	Wed Nov  3 11:54:50 1999
@@ -8,11 +8,12 @@
 fi
 if [[ "$fl" = -*a* ]]; then
   _description expl alias
-  compadd "$expl[@]" - "${(@k)aliases}" "${(@k)disaliases}" && ret=0
+  compadd "$expl[@]" - "${(@k)aliases}" "${(@k)dis_aliases}" \
+                       "${(@k)galiases}" "${(@k)dis_galiases}" && ret=0
 fi
 if [[ "$fl" = -*f* ]]; then
   _description expl 'shell function'
-  compadd "$expl[@]" - "${(@k)functions}" "${(@k)disfunctions}" && ret=0
+  compadd "$expl[@]" - "${(@k)functions}" "${(@k)dis_functions}" && ret=0
 fi
 if [[ "$fl" != -* ]]; then
   _command_names -e && ret=0
diff -u -r oldcompletion/Builtins/_which Completion/Builtins/_which
--- oldcompletion/Builtins/_which	Wed Nov  3 11:48:45 1999
+++ Completion/Builtins/_which	Wed Nov  3 11:56:47 1999
@@ -9,6 +9,6 @@
 _description expl 'shell function'
 compadd "$expl[@]" "$@" - "${(k@)functions}" && ret=0
 _description expl 'alias'
-compadd "$expl[@]" "$@" - "${(k@)raliases}" && ret=0
+compadd "$expl[@]" "$@" - "${(k@)aliases}" && ret=0
 _description expl 'reserved word'
 compadd "$expl[@]" "$@" - "${(k@)reswords}" && ret=0
diff -u olddoc/Zsh/builtins.yo Doc/Zsh/builtins.yo
--- olddoc/Zsh/builtins.yo	Wed Nov  3 10:26:21 1999
+++ Doc/Zsh/builtins.yo	Wed Nov  3 10:38:26 1999
@@ -1400,10 +1400,10 @@
 enditem()
 
 In a shell without dynamic loading only the tt(-e) option is
-supported. In such a shell the return status of tt(zmodload) without
-arguments or options is one whereas in a shell with dynamic loading
-the return status without arguments or options is always zero. This
-can be used to test if the shell supports dynamic loading of modules
-or not.
+supported and the tt(-i) option is ignored. In such a shell the return
+status of tt(zmodload) without arguments or options is one whereas in
+a shell with dynamic loading the return status without arguments or
+options is always zero. This can be used to test if the shell supports
+dynamic loading of modules or not.
 )
 enditem()
diff -u olddoc/Zsh/mod_parameter.yo Doc/Zsh/mod_parameter.yo
--- olddoc/Zsh/mod_parameter.yo	Wed Nov  3 10:26:23 1999
+++ Doc/Zsh/mod_parameter.yo	Wed Nov  3 11:52:58 1999
@@ -32,8 +32,8 @@
 name given by the key and the body given by the value. Unsetting a key
 removes the definition for the function named by the key.
 )
-vindex(disfunctions)
-item(tt(disfunctions))(
+vindex(dis_functions)
+item(tt(dis_functions))(
 Like tt(functions) but for disabled functions.
 )
 vindex(builtins)
@@ -44,33 +44,33 @@
 automatically be loaded from a module if invoked or `tt(defined)' for
 builtin commands that are already loaded.
 )
-vindex(disbuiltins)
-item(tt(disbuiltins))(
+vindex(dis_builtins)
+item(tt(dis_builtins))(
 Like tt(builtins) but for disabled builtin commands.
 )
 vindex(reswords)
 item(tt(reswords))(
 This array contains the enabled reserved words.
 )
-vindex(disreswords)
-item(tt(disreswords))(
+vindex(dis_reswords)
+item(tt(dis_reswords))(
 Like tt(reswords) but for disabled reserved words.
 )
-vindex(raliases)
-item(tt(raliases))(
+vindex(aliases)
+item(tt(aliases))(
 This maps the names of the regular aliases currently enabled to their
 expansions.
 )
-vindex(disraliases)
-item(tt(disraliases))(
+vindex(dis_aliases)
+item(tt(dis_aliases))(
 Like tt(raliases) but for disabled regular aliases.
 )
 vindex(galiases)
 item(tt(galiases))(
 Like tt(raliases), but for global aliases.
 )
-vindex(disgaliases)
-item(tt(disgaliases))(
+vindex(dis_galiases)
+item(tt(dis_galiases))(
 Like tt(galiases) but for disabled global aliases.
 )
 vindex(parameters)

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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