astral-sh / rye

a Hassle-Free Python Experience
https://rye.astral.sh
MIT License
13.88k stars 467 forks source link

Usability: Expected rye sync to change to the directory after rye init #985

Open willingc opened 8 months ago

willingc commented 8 months ago

Thanks for the project. For new users (which will benefit from the rye/uv combo), it would be a nice convenience after rye init to cd into the project directory. Alternatively, add clarification in CLI message to change directory before rye sync.

Screenshot 2024-04-02 at 10 08 09 AM
bluss commented 8 months ago

in bash or zsh, the shell, we have

❯ type cd                                 
cd is a shell builtin
❯ type rye
rye is /home/user/.rye/shims/rye

cd is a special builtin - it can change the directory of the current shell while regular executables can't do that, so rye can't do that. Because rye init says it's time to rye sync, that message should really be reformulated to make this more clear, the user has to change directory - rye init can change its message depending on if the current directory or a new directory was initialized.