Code Monkey home page Code Monkey logo

Comments (12)

babarot avatar babarot commented on May 17, 2024 1

Sorry for late response and I got it.

I'll investigate it and fix soon! Please wait a sec

from enhancd.

babarot avatar babarot commented on May 17, 2024

Did you install fzf? and did you specify export ENHANCD_FILTER=fzf in your rc file?

from enhancd.

ghostbuster91 avatar ghostbuster91 commented on May 17, 2024

Yes I have fzf installed. No I haven't specify ENHANCD_FILTER variable cause I noticed that it is set by default to fzy:fzf-tmux:fzf:peco:percol:gof:pick:icepick:sentaku:selecta.

Like I said it works when:
cd <enter>

But doesn't work when:
cd <tab>

@b4b4r07 Could you point me into some direction how can I change this behavior, so the completion will be listed on key, like it works in https://github.com/changyuheng/zsh-interactive-cd ?

from enhancd.

stale avatar stale commented on May 17, 2024

This has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

from enhancd.

babarot avatar babarot commented on May 17, 2024

@ghostbuster91

Sorry for late response and I got it.

I'll investigate it and fix soon! Please wait a sec

I finally understood your motivation and what you wanted to say!

I tried to use https://github.com/changyuheng/zsh-interactive-cd and I found its feature but enhancd doesn't have that feature. So,

So I noticed that it works when I press enter after typing cd, is this a desired behavior? Is there an option to change the action it to key?

I can answer this with yes for now.

@b4b4r07 Could you point me into some direction how can I change this behavior, so the completion will be listed on key, like it works in https://github.com/changyuheng/zsh-interactive-cd ?

But I can also answer with yes by implementing this feature. I'm interested in this feature, so I'll implement this soon. Please wait for a while!

from enhancd.

ghostbuster91 avatar ghostbuster91 commented on May 17, 2024

@b4b4r07 Great, thanks!

from enhancd.

babarot avatar babarot commented on May 17, 2024

Done. Please try it and give me feedbacks! Thank you.

from enhancd.

ghostbuster91 avatar ghostbuster91 commented on May 17, 2024

Hi @b4b4r07, I tried the latest version and it doesn't work as expected. Maybe we misunderstood each other ;)

But I know now how to show you more precisely what I have in mind.
If you change L136 in completion.zsh from
__enhancd::completion::complete ${tokens[2,${#tokens}]/#\~/$HOME}
to
__enhancd::sources::argument you will have almost the behavior I want. The issue with that is that when you hit enter after such completion the enhancd will fire again.

from enhancd.

babarot avatar babarot commented on May 17, 2024

@ghostbuster91

Ah, I forgot to mention how to enable this feature...

You need to set this before typing Tab key in your command line:

$ export ENHANCD_COMPLETION_BEHAVIOR=history

It defaults to default. It's previous behavior. If you want to use zsh-interactive-cd's one, please set it to history !

Is my understanding correct?

from enhancd.

eddyg avatar eddyg commented on May 17, 2024

I like the behavior when setting ENHANCD_COMPLETION_BEHAVIOR=history. Thanks!

The problem I'm running in to is with the zsh-auto-suggestions package, which I also really like.

Unfortunately, with the "history" completion behavior, the interactively-selected directory just gets inserted on the command line.

In other words, I type cd , and thanks to zsh-auto-suggestions, I see:

cd /usr/local/bin

(where "/usr/local/bin" is in light gray, as a suggestion, based on my history). At this point, I could press Ctrl-E to jump to the end and execute that command, if that's what I wanted.

But... if I press tab at this point to see a list of recent directories, and select, say, /home (via fzy), I end up with:

cd /home//usr/local/bin

and the suggestion portion has become part of the command.

Any idea how to avoid this behavior?

from enhancd.

ghostbuster91 avatar ghostbuster91 commented on May 17, 2024

For me it only looks like it is going to be appended to command but if you execute this cd command you will see that it worked as supposed (the appended path through auto-completion doesn't affect the command) at least for me. Although it would be great if hadn't been appended at the first place :)

from enhancd.

babarot avatar babarot commented on May 17, 2024

@eddyg

Thank you for using this app! I’m glad to hear that.

About your comment, I’m not sure how to avoid it now... Now I haven’t used zsh-auto-suggestions app. So I cannot say about it.. Anyway I’ll use it and then gonna reproduce your problem when I have time. Please let us know when you find some solutions or something. Thanks

from enhancd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.