Skip to main content

Jump to used before directory by part of the path. Lightweight zero-dependency implementation of autojump or zoxide projects functionality.

Project description

Jump to used before directory by part of the path in xonsh shell.
Lightweight zero-dependency implementation of autojump or zoxide projects functionality.

If you like the idea click ⭐ on the repo and tweet.

Note

This xontrib is using xonsh sqlite history backend to get statistics by directories you're used to run commands.

Installation

To install use pip:

xpip install xontrib-jump-to-dir
# OR: xpip install -U git+https://github.com/anki-code/xontrib-jump-to-dir

Usage

# Check that you're using sqlite history in ~/.xonshrc
$XONSH_HISTORY_BACKEND = 'sqlite'

xontrib load jump_to_dir

mkdir -p /tmp/hello /tmp/world
cd /tmp/hello
echo 1
echo 2
echo 3
cd /tmp/world
echo 1
cd /

j           # Jump to most frequent directory i.e. `/tmp/hello` because 3 `echo` commands were executed
j wor       # Jump to directory with `*wor*` in path i.e. `/tmp/world`
j t he      # Jump to directory with `*t*he*` in path i.e. `/tmp/hello`

Custom shortcut:

$XONTRIB_JUMP_TO_DIR_SHORTCUT = 'z'
xontrib load jump_to_dir
z tm  # Jump to `*tm*`

Credits

This package was created with xontrib template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xontrib-jump-to-dir-0.1.0.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

xontrib_jump_to_dir-0.1.0-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page