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

[enhancement] interactive select directory stack when '-' is the second word prefix #559

Open
ioperations opened this issue Apr 25, 2023 · 1 comment

Comments

@ioperations
Copy link

bash and zsh support directory stack in one session.
when hit z - , directory stack could be prompted for user

Screen Shot 2023-04-25 at 15 03 44 PM

In above image, when hit tab after '-', /home/tablinux/Github and /home/tablinux/ could be the candidates

@ioperations
Copy link
Author

I have change the zoxide init zsh's output and It seems work as expected
Screenshot 2023-04-25 at 20 53 59

## patch 
        if [[ "${words[-1]}" == '-' ]]; then
            local item
            local n=0
            for i in $(dirs -l); do 
                echo "$n $i"
                n=$(expr $n   1)
            done | fzf | read item ; 
            local result=$(echo -${(q)item} | awk '{print $1}')
            _arguments $result
            return 0;
        fi
 

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

1 participant