Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
cli/completion: change rad completion to completions
◌ CI pending Michael Uti committed 5 months ago
commit a7a574e71e98d64b074b2fefb5f77d3bb8a7d355
parent 737d59453352da7b8f25efa2a379ee560c9a65be
1 pending (1 total) View logs
3 files changed +11 -11
modified README.md
@@ -55,42 +55,42 @@ Or directly from our seed node:

## `rad` Shell Completions

-
A `rad completion` subcommand is provided to generate static completions for your favorite shell.
+
A `rad completions` subcommand is provided to generate static completions for your favorite shell.

### Bash

```
-
echo 'source <(rad completion bash)' >> ~/.bashrc
+
echo 'source <(rad completions bash)' >> ~/.bashrc
```

### Zsh

```
-
echo 'source <(rad completion zsh)' >> ~/.zshrc
+
echo 'source <(rad completions zsh)' >> ~/.zshrc
```

### Fish

```
-
rad completion fish > ~/.config/fish/completions/rad.fish
+
rad completions fish > ~/.config/fish/completions/rad.fish
```

### PowerShell

```
-
Add-Content $PROFILE "`nInvoke-Expression (rad completion powershell | Out-String)"
+
Add-Content $PROFILE "`nInvoke-Expression (rad completions powershell | Out-String)"
```

### Elvish

Add to `~/.elvish/rc.elv` (or `~/.config/elvish/rc.elv`)
```
-
eval (rad completion elvish | slurp)
+
eval (rad completions elvish | slurp)
```

Or save to a file and source it
```
-
rad completion elvish > ~/.elvish/lib/rad.elv
+
rad completions elvish > ~/.elvish/lib/rad.elv
echo 'use rad' >> ~/.elvish/rc.elv
```

modified crates/radicle-cli/examples/rad-help.md
@@ -41,7 +41,7 @@ Commands:
  unseed      Remove repository seeding policies
  watch       Wait for some state to be updated
  version     Print the version information of the CLI
-
  completion  Print static completion information for a given shell
+
  completions  Print static completions information for a given shell
  help        Print this message or the help of the given subcommand(s)

Options:
modified crates/radicle-cli/src/main.rs
@@ -98,8 +98,8 @@ enum Command {
        json: bool,
    },

-
    /// Print static completion information for a given shell
-
    Completion {
+
    /// Print static completions information for a given shell
+
    Completions {
        /// The type of shell to provide static completions for
        shell: clap_complete::Shell,
    },
@@ -182,7 +182,7 @@ fn run_command(command: Command, ctx: impl term::Context) -> Result<(), anyhow::
        Command::Unseed(args) => unseed::run(args, ctx),
        Command::Watch(args) => watch::run(args, ctx),
        Command::Version { json } => write_version(json),
-
        Command::Completion { shell } => {
+
        Command::Completions { shell } => {
            print_completions(shell, &mut CliArgs::command());
            Ok(())
        }