zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh workers <zsh-workers@zsh.org>
Subject: Re: Finding the first history event of the current instance
Date: Sun, 31 May 2015 16:59:42 -0700	[thread overview]
Message-ID: <150531165942.ZM13040@torch.brasslantern.com> (raw)
In-Reply-To: <12467.1433064564@thecus.kiddle.eu>

On May 31, 11:29am, Oliver Kiddle wrote:
} Subject: Re: Finding the first history event of the current instance
}
} > The options -N (new), -O (old), and -F (foreign) are all currently unused
} > by "fc" if we wanted to add multiple filterings.
} 
} I think I'd favour +L for foreign (i.e. not local). It's easier to
} remember that way.

That'd be fine by me, but read on.

} I'm not sure how the option parser works but that may
} change the meaning of fc + which isn't ideal.

I don't think it'll affect that at all.  However, it will mean that
"fc +l" has the same meaning as "fc -l", unless we do a lot of special
processing.  (Same for +r/-r etc.)  So maybe we don't want that.

} For new/old, one option would be to have a special token such as "-",
} ".", "^" or "0" that can be used to indicate the history number
} when the shell started.

What if someone loads (or reloads) history with "fc -R"?  Ought those
be considered "new" in the current shell?

} Admittedly, this doesn't allow you to get a history entry matching a
} pattern from the old entries.

You can use -m with a range:

schaefer<502> fc -l -m echo\* 101 200
fc: no matching events found
schaefer<503> fc -l -m echo\* 201 300
  250  echo $CPATH



  reply	other threads:[~2015-05-31 23:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87r3q7nzkr.fsf@gmail.com>
     [not found] ` <150529171657.ZM15077@torch.brasslantern.com>
     [not found]   ` <150530154236.ZM17511@torch.brasslantern.com>
2015-05-31  9:29     ` Oliver Kiddle
2015-05-31 23:59       ` Bart Schaefer [this message]
2015-06-01  1:50         ` Mikael Magnusson
2015-06-01  4:02           ` Bart Schaefer
     [not found] ` <150529171657.ZM15077__24226.5334389687$1432945137$gmane$org@torch.brasslantern.com>
2015-06-05  8:47   ` Christian Neukirchen
2015-06-06 16:54     ` 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=150531165942.ZM13040@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@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).