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

Re: Ex-bash script for optimisation



On Mar 10,  7:42pm, Meino Christian Cramer wrote:
} Subject: Re: Ex-bash script for optimisation

Please start a new message with a new subject if you're asking a new
question, rather than replying to an unrelated discussion re-using a
misleading subject.  Thank you.

}  I want to limit the expand function (that one called when pressing
}  TAB after entering for example "cd")

It's important to know whether you really mean "expansion" or whether
(as I suspect) you're asking about "completion".

"Expansion" means you have something like a glob pattern, for example
a*e, and you want the shell to replace it with file names that match
the pattern, for example ankle apple argue.  In general, expansion is
not context-sensitive.

"Completion" means you've typed part of a word -- usually a prefix --
and you want the shell to supply the rest of the word in a way that
fits the context where the word appears.  For example, directory names
in the arguments of cd.

}  to file of the current working directory or in other words I want to
}  switch off the global search for expansion possibilities...

This question is a bit mystifying because there normally is no "global
search."  One possibility is that you need to "unset cdpath", but it
would help if you explained more about (1) whether you use "compinit"
to set up completion or are using the built-in defaults, and (2) what
happens when you press TAB that makes you think a "global" search is
being done.



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