rye icon indicating copy to clipboard operation
rye copied to clipboard

Add shell completion

Open cnpryer opened this issue 2 years ago • 2 comments

Closes #90

cnpryer avatar May 02 '23 22:05 cnpryer

I've been using fish lately (new to it). I don't think I tested this right.

cnpryer avatar May 03 '23 17:05 cnpryer

  • https://github.com/clap-rs/clap/issues/3166

It works in a bash shell.

bash-3.2$ rye 
--help     -h         build      help       install    make-req   remove     self       show       toolchain  
--version  add        fetch      init       lock       pin        run        shell      sync       uninstall

Maybe my fish setup is wrong, but whenever I tab for the first time share/doc/fish/index.html opens up from my brew install. Otherwise:

chrispryer@Chriss-MacBook-Pro ~> rye 
add                           (Adds a Python package to this project)
build                             (Builds a package for distribution)
completion                (Generates a completion script for a shell)
fetch            (Fetches a Python interpreter for the local machine)
help      (Print this message or the help of the given subcommand(s))
init                                   (Creates a new python project)
install                           (Installs a package as global tool)
lock          (Updates the lockfiles without installing dependencies)
make-req  (Builds and prints a PEP 508 requirement string from parts)
pin                           (Pins a Python version to this project)
remove                          (Removes a package from this project)
run                      (Runs a command installed into this package)
self                                            (Rye self management)
shell                  (Spawns a shell with the virtualenv activated)
show                        (Prints the current state of the project)
sync             (Updates the virtualenv based on the pyproject.toml)
toolchain                (Helper utility to manage Python toolchains)

Up to you if you want to merge.

cnpryer avatar May 03 '23 20:05 cnpryer