Skip to content

Commit bb3a343

Browse files
committed
Switch around PATTERN and PATH cli arguments
While this does break existing workflows, there are two main arguments for doing this: 1. it is a more a common workflow, that the path is kept constant while the query is iterated upon. Having the query as the last positional argument makes it easier to go up in history and edit the query. 2. it sets things up to for other interactive input methods for queries.
1 parent 3a50013 commit bb3a343

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cli.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub fn parse_arguments() -> Args {
4848
.help("Search pattern.")
4949
.long_help(help::PATTERN)
5050
.required(true)
51-
.index(1),
51+
.index(2),
5252
)
5353
.arg(
5454
Arg::new("p")
@@ -64,7 +64,7 @@ pub fn parse_arguments() -> Args {
6464
.help("A file or directory to search.")
6565
.long_help(help::PATH)
6666
.required(true)
67-
.index(2),
67+
.index(1),
6868
)
6969
.arg(
7070
Arg::new("v")

0 commit comments

Comments
 (0)