From: Kurtis Rader <krader@skepticism.us>
To: Ray Andrews <rayandrews@eastlink.ca>
Cc: Bart Schaefer <schaefer@brasslantern.com>, Zsh Users <zsh-users@zsh.org>
Subject: Re: combining .histfiles
Date: Tue, 14 Oct 2014 18:09:27 -0700 [thread overview]
Message-ID: <CABx2=D8CkOYsuJYcyx+K+HX9whhvkGG7D8=x4k0OSzzcaNdC=w@mail.gmail.com> (raw)
In-Reply-To: <543DC7B8.7000306@eastlink.ca>
[-- Attachment #1: Type: text/plain, Size: 1854 bytes --]
For the benefit of anyone lurking on this thread who is confused why those
funky looking lines are syntactically legal (which probably doesn't include
Ray or Bart)... If you look carefully you'll see the format of the histfile
is
colon timestamp semicolon command
The leading colon is the null command which does nothing with its args and
returns a zero (success) exit status. The semicolon separates it from the
"real" command. So entering something like
: 1234:5 ; echo hello
is the same as just typing
echo hello
The colon command is mostly useful when you want the side effects from
parsing the rest of the args without running a command.
On Tue, Oct 14, 2014 at 6:02 PM, Ray Andrews <rayandrews@eastlink.ca> wrote:
> On 10/14/2014 04:55 PM, Bart Schaefer wrote:
>
>>
>> On Oct 14, 2014 3:24 PM, "Ray Andrews" <rayandrews@eastlink.ca <mailto:
>> rayandrews@eastlink.ca>> wrote:
>> >
>> > I could stop the command on each line individually, but not the
>> .histfile *itself*. Is there some way to
>> > to break out of it?
>>
>> As I said, Ctrl+c should do it. I just now manufactured a file with a
>> few hundred "cp largefile /dev/null" commands, read it with "." and was
>> able to end it with Ctrl+c before it made it all the way through.
>>
>> Hmmm, it didn't work here, I hit Ctrl+c a dozen times, it didn't break
> out. I'll try to figure out why.
>
>> On the other hand, you are the first person I've ever heard of make this
>> particular mistake. :-) :-/
>>
> Well then never mind. You can be sure I'll never do it again, that is for
> sure! What with the file format, all those leading numbers, it didn't look
> executable so the worst thing is that it was such a huge shock. Never
> more. But it does make me question what *isn't* executable.
>
>
--
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank
next prev parent reply other threads:[~2014-10-15 1:09 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-11 18:53 zsh 5.0.7 Ray Andrews
2014-10-11 20:10 ` Bart Schaefer
2014-10-11 21:46 ` Ray Andrews
2014-10-11 21:56 ` Axel Beckert
2014-10-11 22:43 ` Ray Andrews
2014-10-11 22:01 ` Bart Schaefer
2014-10-12 0:29 ` Ray Andrews
2014-10-13 19:02 ` Greg Klanderman
2014-10-13 22:04 ` Ray Andrews
2014-10-13 22:58 ` Greg Klanderman
2014-10-14 1:17 ` Ray Andrews
2014-10-14 20:12 ` Greg Klanderman
2014-10-14 20:33 ` Ray Andrews
2014-10-14 17:20 ` combining .histfiles Ray Andrews
2014-10-14 22:04 ` Bart Schaefer
2014-10-14 22:25 ` Ray Andrews
2014-10-14 23:55 ` Bart Schaefer
2014-10-15 1:02 ` Ray Andrews
2014-10-15 1:09 ` Kurtis Rader [this message]
2014-10-15 1:25 ` Ray Andrews
2014-10-23 2:58 ` c++ comments Ray Andrews
2014-10-23 4:41 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CABx2=D8CkOYsuJYcyx+K+HX9whhvkGG7D8=x4k0OSzzcaNdC=w@mail.gmail.com' \
--to=krader@skepticism.us \
--cc=rayandrews@eastlink.ca \
--cc=schaefer@brasslantern.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).