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

Re: [[ -x =command ]]



On Wed, 17 Oct 2007, Richard Hartmann wrote:

The canonical way to do this according to 'From Bash to Z Shell' (hi Peter) is to use whence -p foo. Apparently, whence is what zsh uses internally, anyway. If you are concerned about cluttering your $PAGER, basename $(whence ls) is an option.
====================

taking it a step further into zsh-ization...
	PAGER=${$(whence -p most):t}

aesthetic issues aside, is there any reason not to include the full path of the pager in PAGER? the only reason i can think of is if it's defined in one zshrc used on multiple systems ("/usr/bin/most" or "/usr/local/bin/most"?) but if it's assigned dynamically, it should be safe with a full path.


--
        ...atom

 ________________________
 http://atom.smasher.org/
 762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
 -------------------------------------------------

	"Most peoples' idea of individuality is to find a
	 subculture or clique and conform to that."
		-- Kevin Tulppo




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