OrkoHunter / keep

A Meta CLI toolkit : Personal shell command keeper and snippets manager
MIT License
599 stars 54 forks source link

A simple cd is not working #75

Closed Sanix-Darker closed 1 year ago

Sanix-Darker commented 4 years ago

I tried keep with a cd command but got nothing...

Screenshot from 2020-11-01 20-09-46

OrkoHunter commented 4 years ago

Hey @Sanix-Darker ! Thanks for reporting. Yes, this seems like a bug based on how keep is implemented right now.

keep run uses Python's os.system method to execute a new command. os.system executes a command in a sub-shell. So, it does not have access or control over the origin/parent shell. A command like cd modifies the current working directory and needs access to the parent shell.

Running commands from keep also do not save them to the shell history because of the same reason. But it will be nice to have that feature, and will be fixed by having a new way to execute keep run. I will leave this issue open.

As a protip, I use z to jump around directories.