Return to the most recently used directory when starting the xonsh shell.
Project description
Return to the most recently used directory when starting the xonsh shell.
If you like the idea click ⭐ on the repo and and tweet.
Installation
To install use pip:
xpip install xontrib-back2dir
# or: xpip install -U git+https://github.com/anki-code/xontrib-back2dir
echo "xontrib load back2dir" > ~/.xonshrc
Usage
No additional actions needed. The xontrib just saves the latest directory and uses it when xonsh starts:
bash ~ $ xonsh
xonsh ~ $ cd /etc
xonsh /etc $ exit # the latest directory is /etc
bash ~ $ xonsh
xonsh /etc $ # the latest directory
If you run xonsh not from the $HOME
directory the latest directory will be ignored:
bash ~ $ cd /tmp
bash /tmp $ xonsh
xonsh /tmp $ # latest directory ignored
Links
- This package is the part of rc-awesome - awesome snippets of code for xonshrc in xonsh shell.
- This package is the part of ergopack - the pack of ergonomic xontribs.
- This package was created with xontrib cookiecutter template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file xontrib_back2dir-0.1.3.tar.gz
.
File metadata
- Download URL: xontrib_back2dir-0.1.3.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 288adbf8918ac4604c65d5e9dcf8787044d6fd917fec0b628c0f9ff510ff71a2 |
|
MD5 | 22bd96e72db8a6c7a91ce5787b8f3284 |
|
BLAKE2b-256 | 91cc6b452a0f83af0700265c78574fff4cfab9c5f74cae190c6e7fb310751fce |
File details
Details for the file xontrib_back2dir-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: xontrib_back2dir-0.1.3-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 014aa8f8ec8965e720ff8fd40664fb17e57fb7243078b8d5fc6d29a2f74f1ce5 |
|
MD5 | ca630294cf1b7d8a3f09b43a3bbd9ce3 |
|
BLAKE2b-256 | 21792b148597419b80f72312c5b69fc34535764ddaf8a47ccbe2e3558f9b3d5a |