jj/src
Martin von Zweigbergk 788831fed3 cli: allow alias after global args, and recursive aliases
Our support for aliases is very naively implemented; it assumes the
alias is the first argument in argv. It therefore fails to resolve
aliases after global arguments such as `--at-op`.

This patch fixes that by modifying the command defintion to have an
"external subcommand" in the list of available commands. That makes
`clap` give us the remainder of the arguments when it runs into an
unknown command. The first in the list will then be an alias or simply
an unknown command. Thanks to @epage for the suggestion on in
clap-rs/clap#3672.

With the new structure, it was easy to handle recursive alias
definitions, so I added support for that too.

Closes #292.
2022-05-12 06:30:27 -07:00
..
commands.rs cli: allow alias after global args, and recursive aliases 2022-05-12 06:30:27 -07:00
config.rs cli: respect $VISUAL, overriding $EDITOR 2022-05-10 10:39:59 -07:00
diff_edit.rs cleanup: fix some cargo clippy warnings 2022-05-02 21:49:01 -07:00
formatter.rs cli: jj branch can accept any number of branches 2022-05-02 21:33:58 -07:00
graphlog.rs graphlog: don't de-indent multi-line text at end of chain 2022-05-11 04:42:44 -07:00
lib.rs cli: move config-reading to new config module 2022-05-10 10:21:22 -07:00
main.rs cli: allow config in ~/.jjconfig.toml 2022-05-10 10:21:22 -07:00
template.pest import commit 0f15be02bf4012c116636913562691a0aaa7aed2 from my hg repo 2020-12-12 00:23:38 -08:00
template_parser.rs cli: indicate each workspace's checkout in log (#13) 2022-02-02 21:36:14 -08:00
templater.rs cli: indicate each workspace's checkout in log (#13) 2022-02-02 21:36:14 -08:00
ui.rs cli: jj branch can accept any number of branches 2022-05-02 21:33:58 -07:00