🐢 Should we go into completions directly, or do we have anything to update in the working scripts?
🐇 Starting with completions is better. One question I have is whether the completions work for subcommands as usual, like in the static completions.
🐢 Yes, they work. We need to add:
source <(COMPLETE=zsh xvc)
to .zshrc, though.
🐇 It looks like we can drop the xvc completions command. We’re just checking the COMPLETE environment variable, and there’s no need for a separate command in this case.
🐢 Yes, let’s remove that.
🐇 Maybe we can employ a completions module for all completion-related functionality. It’s a separate thing, you know.
🐢 Which completions do we need?
🐇 We can just mark them with TODOs now.
🐢 Yes, let’s check where we need completions and what.
🐇 I noticed we’re repeating options in XvcFileCLI, and some of the options are missing, e.g., --from-ref and --to-branch.
🐢 Because it can compile into a different binary, and global options don’t work that way. Maybe we can move all these binaries into different files under lib. We can have feature flags to turn off certain features and compile different binaries.
🦊 Let’s search for it; I haven’t seen it before: building different binaries with feature flags using cargo.
🐢 There is no clear-cut solution, but it looks like we can move all binaries to the root with the required-features field.
🐲 We can postpone this to another release.
🐇 Yes, let’s not spend time on this now.
🐢 Should we try making pipeline_name a global option? It’s repeating everywhere.
🐇 That will make it easier to maintain.
🐢 We’ll have to pass pipeline_name to subcommands, though.
🐇 I think we can have a set of global options that we can pass. For the time being, that’s only the pipeline_name.
🐢 Okay. Let’s do this.
🐇 A similar option is the step name for pipeline steps.
🐢 Dependencies will need a revamp in the next version anyway. So let’s keep it for now.
🐲 Also, the semantics of step-name are different for these commands. step new interprets it as a new name, while step dependency interprets it as an existing name. The first can be renamed to --name, and the second can be --to, as one of its aliases suggests.
🐢 Yes, let’s keep it for now, and we’ll continue to work on others.
🦊 I want to post a comment in the clap discussions.
🐢 Wrote it. Now let’s build it after changing the pipeline_name.
🐇 It compiles. Should we test it?
🐢 I think we’ll test after all this completion work is done.
🐇 We did most of the strum-related completion.
🐢 Didn’t test them yet, though.
🐇 This is Rust. It will work if it compiles, and it compiles.