Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Fix up the history upon "fg"
- X-seq: zsh-users 3814
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers <zsh-users@xxxxxxxxxxxxxx>
- Subject: Re: Fix up the history upon "fg"
- Date: Tue, 10 Apr 2001 07:48:45 +0000
- In-reply-to: <20010410044321.3457.qmail@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20010410044321.3457.qmail@xxxxxxxxxxxxxxxxxxxxxxx>
On Apr 9, 9:43pm, Felix Rosencrantz wrote:
} Subject: 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.
A slightly extended version of `setopt auto_resume'.
You'd need to have preexec stash the command line for you somewhere, so
that you could compare against $jobtexts inside the wrapper function. You
need the alias-expanded command line (see Wayne's recent patch in 13933).
} It would be nice if zsh could store the CWD information along with the
} history.
Cutesy trick:
precmd() {
local bufstack
read -z bufstack && print -z "$bufstack" || print -z ": $PWD; "
}
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author