Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support using fzf to pick a previous directory via keybinding #95

Open
xster opened this issue Nov 26, 2020 · 1 comment
Open

Support using fzf to pick a previous directory via keybinding #95

xster opened this issue Nov 26, 2020 · 1 comment

Comments

@xster
Copy link

xster commented Nov 26, 2020

Similar to alt-k in https://github.com/gokulsoumya/f#keybindings

@mk12
Copy link

mk12 commented Nov 27, 2021

I implemented this in my own fish config:

function z --description "Jump around"
    set -g prev_z_argv $argv
    __z $argv
end

function zi --description "Like z, but choose with fzf"
    if test (count $argv) -ge 1
        set -g prev_z_argv $argv
    end
    if not set result (__z $prev_z_argv -l 2> /dev/null | fzf)
        return
    end
    cd (echo $result | sed -E 's/^[0-9.]+[ \t]+//')
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants