xonsh-autoxsh
February 23, 2021 ยท View on GitHub
Automatically execution of .autoxsh xonsh script after entering (cd-ing) into the directory.
Installation
pip install xonsh-autoxsh
# OR: pip install git+https://github.com/Granitas/xonsh-autoxsh
echo 'xontrib load autoxsh' >> ~/.xonshrc
Use cases
Run xonsh script after entering (cd-ing) into the directory
mkdir -p /tmp/dir
echo "print('it works!')" > /tmp/dir/.autoxsh
cd /tmp/dir
# Unauthorized ".autoxsh" file found in this directory. Authorize and invoke? (y/n/ignore): y
# it works!
cd /
cd /tmp/dir
# it works!
Activate Python virtual environment with vox
xontrib load vox
vox new myenv
mkdir -p /tmp/dir
echo "vox activate myenv" > /tmp/dir/.autoxsh
cd /tmp/dir
# Activated "myenv".
Links
- This package is the part of ergopack - the pack of ergonomic xontribs.
- This package was created with xontrib cookiecutter template.