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

fg jobs info



hypothetical example....

% jobs
[1]    suspended  sleep 30
[2]    suspended  sleep 31
[3]    suspended  sleep 32
[4]    suspended  sleep 33
[5]  - suspended  sleep 34
[6]  + suspended  sleep 35

now, if i run 'fg' or 'fg %n', how can i make the command name (sleep xx) available to the shell?

why i want this: i've tweaked my ~/.zshrc file to fill in the tabs of mrxvt (and the windowlist in screen) with the current command name (and some other goodies, i'll post the rc file if there's interest). ie; i can quickly find the 'emacs somefile' tab (or screen) because the tab (or screen) says "emacs somefile". cool. but if i suspend the command, then bring it back with 'fg', the tab (or screen) now says "fg". not cool.

there are some hacks to get around this, but they're not pretty. i'm not sure if this can be done elegantly, without requesting a new feature that puts the ~real~ foreground command into an environment var, and/or a 4th argument to preexec.

unless there's a way to simulate the fg command (ie; a "-n" dry run argument) i think the best way to handle this (ideally) would be a 4th argument to preexec that contains what fg is bringing to the foreground.

any other thoughts?

thanks...


--
        ...atom

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

	"Do not wait; the time will never be 'just right.'
	 Start where you stand, and work with whatever
	 tools you may have at your command, and better
	 tools will be found as you go along."
		-- Napoleon Hill




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