mirror of
https://github.com/Llewellynvdm/zoxide.git
synced 2024-12-29 12:32:40 +00:00
Add fish integration
This commit is contained in:
parent
bb72e14d23
commit
e593051625
13
README.md
13
README.md
@ -4,6 +4,13 @@
|
|||||||
|
|
||||||
A cd command that learns your habits
|
A cd command that learns your habits
|
||||||
|
|
||||||
|
## Table of contents
|
||||||
|
|
||||||
|
- [Installing `zoxide`](#installing-zoxide)
|
||||||
|
- [Adding `zoxide` to your shell](#adding-zoxide-to-your-shell)
|
||||||
|
+ [zsh](#zsh)
|
||||||
|
+ [fish](#fish)
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
`zoxide` is a new `cd` alternative inspired by [`z`](https://github.com/rupa/z) and [`z.lua`](https://github.com/skywind3000/z.lua). It keeps track of the directories you use most frequently, and uses a ranking algorithm to navigate to the best match.
|
`zoxide` is a new `cd` alternative inspired by [`z`](https://github.com/rupa/z) and [`z.lua`](https://github.com/skywind3000/z.lua). It keeps track of the directories you use most frequently, and uses a ranking algorithm to navigate to the best match.
|
||||||
@ -78,6 +85,12 @@ alias zq="zoxide query"
|
|||||||
alias zr="zoxide remove"
|
alias zr="zoxide remove"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### fish
|
||||||
|
Using [fisher](https://github.com/jorgebucaran/fisher):
|
||||||
|
```sh
|
||||||
|
fisher add ajeetdsouza/zoxide
|
||||||
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
### Environment variables
|
### Environment variables
|
||||||
|
12
functions/z.fish
Normal file
12
functions/z.fish
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
function z
|
||||||
|
if test (count $argv) -gt 0
|
||||||
|
set _Z_RESULT (zoxide query $argv)
|
||||||
|
switch "$_Z_RESULT"
|
||||||
|
case 'query: *'
|
||||||
|
cd (string sub -s 8 -- "$_Z_RESULT")
|
||||||
|
case '*'
|
||||||
|
echo "$_Z_RESULT"
|
||||||
|
end
|
||||||
|
commandline -f repaint
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user