https://github.com/0xtadash1/dirstax
Provides practical directory navigation, such as browser history
https://github.com/0xtadash1/dirstax
shell zsh zsh-plugin
Last synced: 4 months ago
JSON representation
Provides practical directory navigation, such as browser history
- Host: GitHub
- URL: https://github.com/0xtadash1/dirstax
- Owner: 0xTadash1
- License: mit
- Created: 2024-05-05T17:37:01.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-12T16:12:03.000Z (5 months ago)
- Last Synced: 2025-01-12T16:34:11.425Z (5 months ago)
- Topics: shell, zsh, zsh-plugin
- Language: Shell
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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 enables
> [`AUTO_PUSHD`](https://zsh.sourceforge.io/Doc/Release/Options.html#Changing-Directories)
> and disables [`PUSHD_IGNORE_DUPS`](https://zsh.sourceforge.io/Doc/Release/Options.html#Changing-Directories) internally.
> (These Zsh options are disabled by default)
>
> These changes *should not have any effect* unless you are using plugins or features that depend on `$dirstack`.## 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`:
```sh
source path/to/dirstax.plugin.zsh
```#### with zinit
Install with Zsh plugin manager [zinit](https://github.com/zdharma-continuum/zinit):
```sh
zinit wait lucid light-mode for @0xTadash1/dirstax
```### Settings
The key bindings of dirstax can be changed as follows.
```sh
# 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.
```sh
.dirstax.bind_widgets
```## License
[MIT](./LICENSE)