Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: fg jobs info
- X-seq: zsh-users 11801
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: fg jobs info
- Date: Sun, 02 Sep 2007 10:59:53 -0700
- In-reply-to: <20070902154306.35880.qmail@xxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20070902154306.35880.qmail@xxxxxxxxxxx>
On Sep 3, 3:43am, Atom Smasher wrote:
}
} 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.
Have a look at the variables jobdirs, jobtexts, and jobstates in the
zsh/parameter module. Or there's a lazier way out:
} unless there's a way to simulate the fg command (ie; a "-n" dry run
} argument)
The "jobs" command should accept all the same job-identifier patterns
as "fg", and in recent zsh "jobs" doesn't lose track of the job list
when run in a subshell, so you can do things like
fg() {
# Obviously this needs error handling added, etc.
typeset -g fgjob=$(jobs $*)
builtin fg $*
}
and then stuff the title bar (or whatever) with the something parsed
out of $fgjob.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author