Coder Social home page Coder Social logo

dirstax's Introduction

dirstax

Provides simple and practical directory navigation, such as browser history, using the built-in $dirstack feature of Zsh.

  • shift+alt+ to go backwads to the previous directory
  • shift+alt+ to go forwards in the directory history
  • shift+alt+ to go upwards to the parent directory

Tip

In macOS, ⌥ option is assigned instead of alt.

Note

Designed to utilize Zsh’s built-in $dirstack, this plugin turns on AUTO_PUSHD internally. (This Zsh option is off by default)

Enabling this option should have no impact unless using $dirstack-dependent plugins or features.

Usage

dirstax works out of the box. The default key bindings are activated immediately after the script is sourced.

Installation

git clone https://github.com/0xTadash1/dirstax, and Edit .zshrc:

source path/to/dirstax.plugin.zsh

with zinit

Install with Zsh plugin manager zinit:

zinit wait lucid light-mode for @0xTadash1/dirstax

Settings

The key bindings of dirstax can be changed as follows.

Please note that the environment variables should be set before loading dirstax.plugin.zsh.

# Use alt (or ⌥ option in macOS) as the modifier key instead of alt+shift
typeset -Ax dirstax
dirstax[keybind_upward]='^[[1;3A'    # alt + ↑
dirstax[keybind_forward]='^[[1;3C'   # alt + →
dirstax[keybind_backward]='^[[1;3D'  # alt + ←

License

MIT

dirstax's People

Contributors

0xtadash1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.