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

Re: Fix up the history upon "fg"



That's a pretty useful function.  I guess I would sort of also like the inverse
function, you type a command, and if the same command line is already running
(including same CWD) the shell does a fg rather than run the command.

This sort of command would be useful for a wrapper around something like vim or
other commands that don't like you having multiple instances running for the
same file (or other resource.)

Also, it wouldn't be too hard to make getjobs() also print an appropriate "cd"
to the command if the CWD is not the same.

I guess I would like a way to add attributes to history.  I tend to use
pushd/popd and ~1,~2 etc.  But when I look back at history it can be impossible
to tell what directory I was in at the time the command was run. It would be
nice if zsh could store the CWD information along with the history.  Of course,
this could require a lot more memory usage.   It would be useful if this
information was kept like the time data, where it is printed only when wanted.

-FR.

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/



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