Convert Figma logo to code with AI

wting logoautojump

A cd command that learns - easily navigate directories from the command line

16,172
705
16,172
220

Top Related Projects

16,285

z - jump around

5,894

Command-line productivity booster, offers quick access to files and directories, inspired by autojump, z and v.

21,562

A smarter cd command. Supports all major shells.

63,665

:cherry_blossom: A command-line fuzzy finder

33,285

A simple, fast and user-friendly alternative to 'find'

2,967

:zap: A new cd command that helps you navigate faster by learning your habits.

Quick Overview

Autojump is a faster way to navigate your filesystem. It works by maintaining a database of the directories you use the most from the command line and allows you to "jump" to frequently used directories by typing a command followed by a partial name of the directory.

Pros

  • Significantly speeds up navigation in the command line
  • Works across multiple shells (bash, zsh, fish)
  • Learns your habits and improves over time
  • Lightweight and easy to install

Cons

  • Requires some time to build up an effective database of frequently used directories
  • May occasionally jump to unexpected directories if partial names are ambiguous
  • Requires users to change their navigation habits to fully benefit from the tool
  • Can be confusing for users who are not familiar with the concept

Getting Started

  1. Install autojump using your package manager:

    # On macOS with Homebrew
    brew install autojump
    
    # On Ubuntu/Debian
    sudo apt-get install autojump
    
  2. Add the following to your shell configuration file (e.g., .bashrc, .zshrc):

    # For bash
    [[ -s /usr/share/autojump/autojump.sh ]] && . /usr/share/autojump/autojump.sh
    
    # For zsh
    [[ -s /usr/share/autojump/autojump.zsh ]] && . /usr/share/autojump/autojump.zsh
    
  3. Restart your shell or source your configuration file:

    source ~/.bashrc  # or ~/.zshrc
    
  4. Start using autojump by navigating to directories as usual. After building up some usage data, you can start jumping:

    j partial_name_of_directory
    

Competitor Comparisons

16,285

z - jump around

Pros of z

  • Faster performance, especially with large directory histories
  • Simpler installation process (single file script)
  • More lightweight and less resource-intensive

Cons of z

  • Less customization options and features
  • Not as actively maintained (last update in 2018)
  • Lacks multi-language support

Code Comparison

z:

z foo       # cd to most frecent dir matching foo
z foo bar   # cd to most frecent dir matching foo and bar
z -r foo    # cd to highest ranked dir matching foo
z -t foo    # cd to most recently accessed dir matching foo
z -l foo    # list matches instead of cd

autojump:

j foo       # Jump to a directory that contains foo
jc bar      # Jump to a child directory
jo music    # Open the directory in file manager
jco images  # Open the child directory in file manager

Both tools aim to improve navigation in the command line by learning from user behavior. z focuses on simplicity and speed, while autojump offers more features and customization options. z uses a single shell script, making it easier to install and maintain, but autojump's Python-based implementation allows for more advanced functionality and better cross-platform support. The choice between the two depends on individual needs and preferences for speed versus features.

5,894

Command-line productivity booster, offers quick access to files and directories, inspired by autojump, z and v.

Pros of fasd

  • Offers more versatile matching algorithms, including fuzzy matching
  • Supports multiple shells (bash, zsh, fish) out of the box
  • Provides a wider range of command-line options for customization

Cons of fasd

  • May have a steeper learning curve due to more complex functionality
  • Less actively maintained compared to autojump (last update in 2015)

Code Comparison

autojump:

def match(path, pattern):
    return pattern.lower() in path.lower()

fasd:

_fasd_preexec() {
    { eval "fasd --proc $(fasd --sanitize $1)"; } >> "/dev/null" 2>&1
}

Both projects aim to improve command-line navigation, but they differ in implementation and features. autojump focuses on directory jumping using a simpler matching algorithm, while fasd offers more advanced matching and supports various command-line tools.

autojump is written primarily in Python, making it easier for Python developers to contribute or modify. fasd, on the other hand, is implemented in shell script, which may be more familiar to system administrators and shell enthusiasts.

While autojump has seen more recent updates and active maintenance, fasd offers a broader range of features that may appeal to power users who require more flexibility in their command-line navigation tools.

21,562

A smarter cd command. Supports all major shells.

Pros of zoxide

  • Written in Rust, offering better performance and memory safety
  • Supports multiple shells (Bash, Zsh, Fish, PowerShell) out of the box
  • Provides a more intuitive ranking algorithm based on frecency

Cons of zoxide

  • Relatively newer project with a smaller community compared to autojump
  • May require additional setup for some advanced features

Code Comparison

zoxide:

pub fn add(&mut self, path: &Path) -> Result<()> {
    let canonical = path.canonicalize()?;
    let now = SystemTime::now().duration_since(UNIX_EPOCH)?.as_secs();
    self.paths.insert(canonical, now);
    Ok(())
}

autojump:

def add(self, path, weight=10):
    """
    Add a new path or increment an existing one.
    """
    path = unicode(path, 'utf-8')
    if path == '/':
        return

    data = self.data[path] if path in self.data else [0, 0]
    data[0] += weight
    data[1] = time.time()
    self.data[path] = data

Both code snippets show the core functionality of adding a new path to the database. zoxide uses Rust's type system and error handling, while autojump relies on Python's dynamic typing and exception handling.

63,665

:cherry_blossom: A command-line fuzzy finder

Pros of fzf

  • More versatile, can be used for fuzzy finding in various contexts (files, command history, etc.)
  • Highly customizable with extensive configuration options
  • Faster performance, especially for large datasets

Cons of fzf

  • Steeper learning curve due to more complex setup and usage
  • Requires manual integration with shell and other tools
  • May be overkill for users who only need directory navigation

Code Comparison

autojump:

j music

fzf:

cd $(find . -type d | fzf)

Key Differences

autojump focuses specifically on directory navigation, learning from your usage patterns. It's simpler to set up and use but has limited functionality beyond changing directories.

fzf is a general-purpose fuzzy finder that can be used for various tasks, including directory navigation. It offers more power and flexibility but requires more setup and integration with other tools.

Use Cases

autojump is ideal for users who primarily want quick directory navigation based on frecency (frequency and recency).

fzf is better suited for power users who want a versatile fuzzy finding tool for multiple purposes, including file search, command history, and more.

Performance

fzf generally offers better performance, especially with large datasets, due to its efficient fuzzy matching algorithm. autojump may slow down with very large directory structures but is typically fast enough for most users.

33,285

A simple, fast and user-friendly alternative to 'find'

Pros of fd

  • Faster performance for file searching, especially on large directories
  • More intuitive and user-friendly syntax for search patterns
  • Built-in color output and smart case sensitivity by default

Cons of fd

  • Limited to file and directory searching, lacks autojump's directory navigation features
  • Requires manual installation, while autojump can be installed via package managers on many systems
  • Does not learn from user behavior or maintain a database of frequently accessed directories

Code Comparison

fd:

fd pattern
fd -e txt
fd -x command {} \;

autojump:

j pattern
jc pattern
jo pattern

Summary

fd and autojump serve different primary purposes. fd is a modern alternative to the find command, focusing on fast and user-friendly file and directory searching. autojump, on the other hand, is a smart directory navigation tool that learns from user behavior to quickly jump to frequently accessed directories.

While fd excels in search performance and intuitive syntax, it lacks the intelligent directory navigation features of autojump. autojump's strength lies in its ability to learn and adapt to user habits, making it more efficient for navigating complex directory structures over time.

The choice between the two depends on the user's specific needs: fd for efficient file searching, or autojump for smart directory navigation.

2,967

:zap: A new cd command that helps you navigate faster by learning your habits.

Pros of z.lua

  • Written in Lua, which is faster and more lightweight than Python
  • Supports both Lua and LuaJIT for improved performance
  • Offers more customization options and features, such as interactive selection

Cons of z.lua

  • Requires Lua to be installed on the system
  • May have a steeper learning curve due to additional features and options

Code Comparison

autojump:

def match(path, pattern):
    return fnmatch.fnmatch(path.lower(), '*' + pattern.lower() + '*')

z.lua:

local function match(path, pattern)
    return path:lower():find(pattern:lower(), 1, true) ~= nil
end

Key Differences

  • Language: autojump is written in Python, while z.lua is written in Lua
  • Performance: z.lua generally offers better performance due to Lua's speed
  • Features: z.lua provides more advanced features and customization options
  • Installation: autojump has simpler installation, while z.lua requires Lua
  • User Base: autojump has a larger user base and longer history

Use Cases

  • autojump: Better for users who prefer simplicity and wide platform support
  • z.lua: Ideal for users who want faster performance and more advanced features

Community and Support

  • autojump: Larger community, more third-party integrations
  • z.lua: Smaller but active community, frequent updates

Both projects aim to improve directory navigation in the command line, but they cater to slightly different user preferences and system requirements.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

NAME

autojump - a faster way to navigate your filesystem

DESCRIPTION

autojump is a faster way to navigate your filesystem. It works by maintaining a database of the directories you use the most from the command line.

Directories must be visited first before they can be jumped to.

USAGE

j is a convenience wrapper function around autojump. Any option that can be used with autojump can be used with j and vice versa.

  • Jump To A Directory That Contains foo:

    j foo
    
  • Jump To A Child Directory:

    Sometimes it's convenient to jump to a child directory (sub-directory of current directory) rather than typing out the full name.

    jc bar
    
  • Open File Manager To Directories (instead of jumping):

    Instead of jumping to a directory, you can open a file explorer window (Mac Finder, Windows Explorer, GNOME Nautilus, etc.) to the directory instead.

    jo music
    

    Opening a file manager to a child directory is also supported:

    jco images
    
  • Using Multiple Arguments:

    Let's assume the following database:

    30   /home/user/mail/inbox
    10   /home/user/work/inbox
    

    j in would jump into /home/user/mail/inbox as the higher weighted entry. However you can pass multiple arguments to autojump to prefer a different entry. In the above example, j w in would then change directory to /home/user/work/inbox.

For more options refer to help:

autojump --help

INSTALLATION

REQUIREMENTS

  • Python v2.6+ or Python v3.3+
  • Supported shells
    • bash - first class support
    • zsh - first class support
    • fish - community supported
    • tcsh - community supported
    • clink - community supported
  • Supported platforms
    • Linux - first class support
    • OS X - first class support
    • Windows - community supported
    • BSD - community supported
  • Supported installation methods
    • source code - first class support
    • Debian and derivatives - first class support
    • ArchLinux / Gentoo / openSUSE / RedHat and derivatives - community supported
    • Homebrew / MacPorts - community supported

Due to limited time and resources, only "first class support" items will be maintained by the primary committers. All "community supported" items will be updated based on pull requests submitted by the general public.

Please continue opening issues and providing feedback for community supported items since consolidating information helps other users troubleshoot and submit enhancements and fixes.

MANUAL

Grab a copy of autojump:

git clone git://github.com/wting/autojump.git

Run the installation script and follow on screen instructions.

cd autojump
./install.py or ./uninstall.py

AUTOMATIC

Linux

autojump is included in the following distro repositories, please use relevant package management utilities to install (e.g. apt-get, yum, pacman, etc):

  • Debian, Ubuntu, Linux Mint

    All Debian-derived distros require manual activation for policy reasons, please see /usr/share/doc/autojump/README.Debian.

  • RedHat, Fedora, CentOS

    Install autojump-zsh for zsh, autojump-fish for fish, etc.

  • ArchLinux

  • Gentoo

  • Frugalware

  • Slackware

OS X

Homebrew is the recommended installation method for Mac OS X:

brew install autojump

MacPorts is also available:

port install autojump

Windows

Windows support is enabled by clink which should be installed prior to installing autojump.

KNOWN ISSUES

  • autojump does not support directories that begin with -.

  • For bash users, autojump keeps track of directories by modifying $PROMPT_COMMAND. Do not overwrite $PROMPT_COMMAND:

    export PROMPT_COMMAND="history -a"
    

    Instead append to the end of the existing $PROMPT_COMMAND:

    export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ;} history -a"
    

REPORTING BUGS

For any questions or issues please visit:

https://github.com/wting/autojump/issues

AUTHORS

autojump was originally written by Joël Schaerer, and currently maintained by William Ting. More contributors can be found in AUTHORS.

COPYRIGHT

Copyright © 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.