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

Re: question about parameter expansion



On Sep 26,  2:11pm, Ray Andrews wrote:
}
} Where is this sort of thing discussed in the manual?

Under "Parameter Expansion".

Perhaps unfortunately, you need to get familar with shell language
terminology.  The strings $1, $2, etc. are referred to as "positional
parameters" whereas $a, $foo, $PATH, etc. are "named parameters".
The signifier "$" is said to introduce an expansion.  (It used to
be that it only introduced a parameter expansion, and parts of the
doc still talk about it that way, but now it also introduces other
expansions like command substitution and arithmetic.)

The word "variable" is usually a synonym for "named parameter," but
might also refer to named strings in the process environment, which
can be referenced as if they were named parameters.

} In any case looking for 'parameter expansion' in the index is no help.

This is a thing about the yodl/info documentation model that I don't
like.  I think all the (sub)section headings should be in the index.
Instead the section headings are in "menus" (which don't show up at all
in the manpage-formatted documentation) and you can't find them with an
index search.

In this specific case, though, "parameter expansion" does appear in the
index, along with "parameter expansion flags", "parameter modifiers",
etc.  How were you searching the index?

} 'Variable' doesn't exist in the index at all

??

* variables:                             Parameters.         (line    6)
* variables, environment:                Parameters.         (line   25)

Again, exactly how are you searching what index?  Have you tried always
searching case-insensitively?



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