I didn’t know that. Do you want to push a change to this discussion?
pijul push danieleades@nest.pijul.com:pijul/pijul --to-channel :136
i would love to. As soon as I can get any release of pijul to clone, build, or install I will be happy to do so!
I got this far by using curl to download a tarball from crates.io
Can you use cargo install pijul --version 1.0.0-alpha.9
?
i had tried alphas 5-8, but it seems 9 was the magic number!
pijul record
)- it claims there’s a syntax error in the generated file when I try to save itany ideas?
incidentally, I can’t exit the file without saving either, I get stuck in a loop where I either have to kill the terminal or manually delete every line in the file before re-saving.
i see also that you have-
/// Unrecords all changes upto the given hash
#[clap(alias = "unrec", alias = "un")]
Unrecord(Unrecord),
would you consider instead using the Clap setting InferSubcommands
? I think this might do what you’re after
I’ve also noticed that pijul -h
, pijul --help
, and pijul help
don’t work in this release
i think this block here might be breaking it?-
for arg in std::env::args().skip(1) {
if cmd.is_empty() {
if app
.get_subcommands()
.any(|sub| sub.get_name() == arg || sub.get_all_aliases().any(|al| al == arg))
{
return Ok(false);
}
cmd.push_str("pijul-");
cmd.push_str(&arg)
} else {
args.push(arg)
}
}
also these app settings-
#[clap(version = crate_version!(), author = crate_authors!(),...]
shouldn’t be required, as these are each the default behaviour if they’re not supplied.
at least that’s the case with structopt
, i’ve not actually used the Clap beta, but I can’t imagine why they would have changed the behaviour.
I can’t confirm locally, since the help string seems to be broken
managed to record changes. now attempting to push them.
There was a problem with SSH keys, I just fixed it.
62XVBWPYCBULZ2IUWF36JVHAPMKCGQC53PQQ53AAGZGC2KT7VQRQC
Thanks! And sorry again about the hiccups of the Nest.
QRZF7GJM4ML4M3QN757F37F5E7XDD6GEJ2LZT4OZCZT7VG7W4ORAC
XJYD5MY2WVWSBCER53GOZ246HYTIAMM2PFG4LSYV3O7FC27WHGSQC
the “use ‘InferSubcommands’ instead of aliases” patch might be slightly controversial as this could interfere with external subcommands (depending on how this is being used)
Thanks! And sorry again about the hiccups of the Nest.
no, thankyou for the quick fixes! I think there’s a lot of us out here who really want this project to succeed.
It’s ok. If we let external subcommands use names that look like shortcuts to standard commands, things might be super confusing (I can already imagine some StackOverflow questions).
would you consider using the native external subcommand support instead of the hand-rolled one?
https://docs.rs/structopt/0.3.20/structopt/#external-subcommands
Yes, absolutely. I tried to look for this in Clap’s documentation, and couldn’t find it.
clap’s documentation is pretty terrible, but you can use the structopt docs as a reference
SNZ3OAMCPUGFYON5SZHQQQK46ZZMVMJECJYEUCMG657UVLY2PNBQC
Thanks!
i’ve got a feeling that the crate version and author are not pulled by default in Clap anymore. I think maybe you were right to add these manually…
Alright, I unrecorded the change (QRZ…
) from the main channel, but change XJY…
depended on it, so I had to unrecord it too.
Would you mind either:
XJY
and QRZ
(pijul unrec XJY QRZ
), recording again and pushingpijul unrec XJY
, and then pijul record --amend XJY
.DZ6NYEP7LNWY5V7BZWLTZOA4ZFJOWS6GR6RB5JUG73JI5P7IW2YQC
does that seem about right? still very new with these workflows!
Perfect! I’m testing it right now. We’re actually all new to these workflows ;-)
It complains about settings
, which should be setting
, actually.
UIQELRQ6QBZMTHPKKN2EMLXM3IOTIRX4SD5BL4JTDBFRWTKT774AC
UTDZKZGPHLL2MK5FFP6ANYCX2PZYTKXIQ2RNWBG2WGDJNVYLLWLQC
apologies. have amended the change
Thanks! I believe we can close this, feel free to reopen if not (people can still comment and push changes after the discussion is closed, it just doesn’t appear in the list anymore).
The
SubCommand
enum in themain.rs
file uses an attribute to name each command. Since Clap already converts the enum variant name to kebab case for the command name, this attribute is only required if a different name is required.There are no examples in this enum where the manually configured name doesn’t match the generated one.