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

Re: Suffix alias for README files



Am 19.04.2011 um 15:59 schrieb Anthony R Fletcher:

> I can use suffix aliases to display various .txt files. So
> 
> 	alias -s txt=less
> 	./x.txt
> 
> actually runs
> 
> 	less ./x.txt
> 
> Can I do a similar thing for README files? So the "command"
> 
> 	/some/path/README
> 
> will really run the command 
> 
> 	less /some/path/README

It doesn't really answer your question, but are you aware of nullcmd redirection?

  <x.txt

or

  </some/path/README

will call whatever pager or viewer is set in $READNULLCMD. In the first case it's even less characters to type :)


Sebastian


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