Skip to content

Provides practical directory navigation, such as browser history

License

Notifications You must be signed in to change notification settings

0xTadash1/dirstax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 

Repository files navigation

dirstax

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

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

Tip

In macOS, ⌘ command 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.

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

If after loading the plugin, you need to reapply the key bindings.

.dirstax.bind_widgets

License

MIT

About

Provides practical directory navigation, such as browser history

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages