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

Re: echo-ing case insensitively



On Feb 12, 11:59pm, Eric Smith wrote:
>
> I do not use directories much - I prefer underscores in filenames.

I suspect I know what you mean, but it's really not clear what the
second clause has to do with the first.

> What I want to do though is give this function an argument like
> say - `draft' and I want to see:
> today_draft
> Draft.mail
> some_other_DRAFT

	se () {
	    setopt localoptions extendedglob noshwordsplit
	    if [[ -n $2 ]]
	    then print -l (#i)$1/*$2*
	    else print -l (#i)*$1*
	    fi
	} 

> I want to type `draft' at the prompt and press <tab> and then
> get all the options above to show as possible expansions.
> 
> How?

Which of compctl or compsys are you using?



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