Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Ability to set HISTNO to a certain position from within zshrc
- X-seq: zsh-users 6566
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Ability to set HISTNO to a certain position from within zshrc
- Date: Thu, 11 Sep 2003 14:48:14 +0000
- In-reply-to: <20030911062120.80897.qmail@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20030911062120.80897.qmail@xxxxxxxxxxxxxxxxxxxxxxx>
On Sep 10, 11:21pm, Felix Rosencrantz wrote:
}
} Is there a way to start from a point in the primed history from my .zshrc?
Not exactly, but I think you can get the effect you want by doing:
print -s 'the first command in your sequence'
print -s 'the next command in your sequence'
print -s 'and so on'
print -s 'etc etc etc'
print -z 'the first command in your sequence'
If at this point you invoke accept-and-infer-next-history, you should end
up exactly where you want to be.
If the first command in your sequence is not unique among others in the
sequence, just make it so by doing
print -s ': BEGIN ; the first command in your sequence'
print -s ...
print -z ': BEGIN ; the first command in your sequence'
Rather than using 'print -s ...' you might consider placing the commands
in a file and loading them with 'fc -R'. Of course, you still need the
final 'print -z' to set up the interactive part.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author