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

Re: Three questions about a completer



On Sep 14,  9:22am, Jesper Nygards wrote:
}
} I am getting closer: the problem with numeric is now solved with your
} suggestions, as well as turning off the listing of alternatives. However
} I still have trouble reversing the menu completion direction.

I think all you need is this:

    _list-result() {
	compadd -M 'l:|=* m:{[:lower:]}={[:upper:]}' -f ${__lsdir:-HOME}/*
	# Even if there are multiple matches, don't list them out
	compstate[list]=''
	# In case we are already in the middle of a menu completion,
	# ignore the compadd above and continue in the current menu
	compstate[insert]='menu'
    } 

It may be necessary in some edge cases to examine $compstate[insert]
and update it differently; read the doc and experiment with what the
state of $compstate[insert] is upon entry to _list-result.



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