From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH] lei: -d (--dir) and -O (only) shortcuts
Date: Thu, 14 Oct 2021 09:54:54 +0000 [thread overview]
Message-ID: <20211014095454.5732-1-e@80x24.org> (raw)
`-d' seems like a non-brainer for --dir with inspect.
I find myself using `--only' a bit, too, and `-O' seems like
a reasonable shortcut for it.
---
Documentation/lei-q.pod | 2 ++
lib/PublicInbox/LEI.pm | 9 +++++----
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/Documentation/lei-q.pod b/Documentation/lei-q.pod
index e1e3666d797a..574c12eb9d3a 100644
--- a/Documentation/lei-q.pod
+++ b/Documentation/lei-q.pod
@@ -164,6 +164,8 @@ multiple times.
=item --only=LOCATION
+=item -O LOCATION
+
Use only the specified external for search. This option may be given
multiple times, in which case the search uses only the specified set.
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm
index 145af7e2cb59..9620e2642213 100644
--- a/lib/PublicInbox/LEI.pm
+++ b/lib/PublicInbox/LEI.pm
@@ -148,7 +148,7 @@ sub index_opt {
my @c_opt = qw(c=s@ C=s@ quiet|q);
my @net_opt = (qw(no-torsocks torsocks=s), PublicInbox::LeiQuery::curl_opt());
-my @lxs_opt = qw(remote! local! external! include|I=s@ exclude=s@ only=s@
+my @lxs_opt = qw(remote! local! external! include|I=s@ exclude=s@ only|O=s@
import-remote!);
# we don't support -C as an alias for --find-copies since it's already
@@ -284,7 +284,7 @@ our %CMD = ( # sorted in order of importance/use:
}, qw(config-file|system|global|file|f=s), # for conflict detection
qw(edit|e c=s@ C=s@), pass_through('git config') ],
'inspect' => [ 'ITEMS...|--stdin', 'inspect lei/store and/or local external',
- qw(stdin| pretty ascii dir=s), @c_opt ],
+ qw(stdin| pretty ascii dir|d=s), @c_opt ],
'init' => [ '[DIRNAME]', sub {
"initialize storage, default: ".store_path($_[0]);
@@ -337,7 +337,8 @@ my %OPTDESC = (
'path-a|a=s' => 'pre-image pathname associated with OID',
'path-b|b=s' => 'post-image pathname associated with OID',
'git-dir=s@' => 'additional git repository to scan',
-'dir=s inspect' => 'specify a inboxdir, extindex topdir or Xapian shard',
+'dir|d=s inspect' =>
+ 'specify a inboxdir, extindex topdir or Xapian shard',
'proxy=s' => [ 'PROTO://HOST[:PORT]', # shared with curl(1)
"proxy for (e.g. `socks5h://0:9050')" ],
'torsocks=s' => ['VAL|auto|no|yes',
@@ -395,7 +396,7 @@ my %OPTDESC = (
'exclude specified external(s) from search' ],
'include|I=s@ q' => [ 'LOCATION',
'include specified external(s) in search' ],
-'only=s@ q' => [ 'LOCATION',
+'only|O=s@ q' => [ 'LOCATION',
'only use specified external(s) for search' ],
'jobs=s q' => [ '[SEARCH_JOBS][,WRITER_JOBS]',
'control number of search and writer jobs' ],
reply other threads:[~2021-10-14 9:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211014095454.5732-1-e@80x24.org \
--to=e@80x24.org \
--cc=meta@public-inbox.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://80x24.org/public-inbox.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).