Skip to main content

portable autojump

Project description

autojmp

An autojump implementation applicable to any shell and any OS by restoring Xython/rtpy.

Keep things simple and portable, do not fuck your brain.

Common Configurations

export AUTOJMP_MAX_CACHE=999
export AUTOJMP_WORD_ANA_LEN=3 # 3-gram is precise enough!

Zsh

Firstly install autojmp: pip install autojmp.

Then, append the following contents to your ~/.zshrc:

autoload -U add-zsh-hook

add-zsh-hook -Uz chpwd (){
  emulate -L zsh
  ajmp update "$pwd"
}

j(){
  cd "$(ajmp complete $@)"
} 

Using it in this way:

github> j desk git
github> pwd
/c/Users/<USER>/Desktop/github
github> j git
github> pwd
/c/Users/<USER>/github

Powerh Shell

function cd() {
  Set-Location "$@" || return
  ajmp update "$pwd"
}

function j() {
    Set-Location $(ajmp complete "$@")
}

Motivation

Currently I have to work on Windows and I do need zsh. This leads me to MSYS2. However, autojump installation does not work for MSYS2. Hence I restored my own autojump implementation made years ago.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

autojmp-0.2.0-py3-none-any.whl (4.4 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