kamiyaa / joshuto

ranger-like terminal file manager written in Rust
https://crates.io/crates/joshuto
GNU Lesser General Public License v3.0
3.37k stars 148 forks source link

Add subcommands #418

Closed xrelkd closed 11 months ago

xrelkd commented 11 months ago

With this Pull Request, user can execute the following commands: Use the following command to show the current version of joshuto:

$ joshuto version # same as joshuto --version
joshuto-0.9.5

Use the following commands to show shell completions, this will be useful for package maintainers of Linux distributions.

$ joshuto completions bash  # show shell completion for bash
$ joshuto completions zsh  # show shell completion for zsh
$ joshuto completions fish  # show shell completion for fish
$ joshuto completions elvish  # show shell completion for elvish
$ joshuto completions powershell  # show shell completion for powershell

We replaced structopt with clap, because structopt is now in maintenance mode (https://github.com/TeXitoi/structopt#maintenance). All features of structopt are available in clap now.

kamiyaa commented 11 months ago

Wow, good stuff. I didn't realize structopt is maintanence mode now :+1:

xrelkd commented 11 months ago

@kamiyaa Thanks for the merging. We also updated the Nix Flake. The PR https://github.com/kamiyaa/joshuto/pull/421 installs the shell completions provided by clap-complete in Nix Flake.