psyinfra / onyo

text-based inventory system on top of git
ISC License
3 stars 5 forks source link

Sourcing shell completion outside of onyo repo results in `command not found: _onyo_dir` #585

Open nhjjr opened 4 months ago

nhjjr commented 4 months ago

(eval):1: command not found: _onyo_dir

If you run source <(onyo shell-completion) before initializing an onyo repository (or perhaps when doing so outside of an onyo repository) it will return the above error/warning when attempting tab completion, even if at that point you're in a valid onyo repository.

nhjjr commented 4 months ago

Today I made sure to cd into my onyo inventory and activate the virtual environment containing onyo's install before I sourced onyo's shell completion, yet still got the same eval error/warning upon attempting to use tab completion. Note that the root of my onyo inventory contains no assets, only a folder that has assets inside of it (in case that matters for reproducibility).