Giter VIP home page Giter VIP logo

Comments (14)

eggbean avatar eggbean commented on June 9, 2024 1

Sorry, I'll get back to you soon once I figure out what I meant.

from clink-completions.

chrisant996 avatar chrisant996 commented on June 9, 2024

hub is deprecated and replaced by gh. I'll explore cost/feasibility of adding completions for gh.

from clink-completions.

eggbean avatar eggbean commented on June 9, 2024

I came here hoping to find a gh completion file for clink. I tried getting a lua specialised GPT to translate the zsh _gh file into lua, but it said that it was too complicated.

https://chat.openai.com/share/99a47c73-72bc-49a2-b1a2-9d86b9c60da1

from clink-completions.

chrisant996 avatar chrisant996 commented on June 9, 2024

I have a prototype script for gh completions. I haven't had time to test it or fill in the gaps.

Would you like to mess around with testing it and filling in stuff, or at least filing issues for what's missing or wrong?

I can make a topic branch for working on the gh completions, if you'd like.

from clink-completions.

chrisant996 avatar chrisant996 commented on June 9, 2024

I created a gh_completions topic branch.

It has gh.lua which is the prototype script.

from clink-completions.

eggbean avatar eggbean commented on June 9, 2024

Would you like to mess around with testing it and filling in stuff, or at least filing issues for what's missing or wrong?

Sure. I'll start using it and see if I come across any problems.

from clink-completions.

chrisant996 avatar chrisant996 commented on June 9, 2024

@eggbean How have the gh completions been working for you? Any feedback, things to fix or improve?

from clink-completions.

eggbean avatar eggbean commented on June 9, 2024

Yes, it's been working well for me, thanks. I have not encountered any bugs or problems.

I haven't tried every subcommand extensively, but I have been using a few subcommands that I had never used before, as I didn't know they even existed until using these completions.

(I still haven't been able to combine these completion suggestions with the repeated tab cycling, in a similar way that is possible in zsh, though)

from clink-completions.

chrisant996 avatar chrisant996 commented on June 9, 2024

(I still haven't been able to combine these completion suggestions with the repeated tab cycling, in a similar way that is possible in zsh, though)

@eggbean Can you give an example?

from clink-completions.

chrisant996 avatar chrisant996 commented on June 9, 2024

(I still haven't been able to combine these completion suggestions with the repeated tab cycling, in a similar way that is possible in zsh, though)

@eggbean I don't understand what is meant by that. Can you give an example? I can probably explain or show how.

Everything I've tried has worked great.

from clink-completions.

chrisant996 avatar chrisant996 commented on June 9, 2024

(I still haven't been able to combine these completion suggestions with the repeated tab cycling, in a similar way that is possible in zsh, though)

@eggbean Maybe you meant one of these?

  • Do you want the dark gray "auto suggestion" text to only show suggestions from available completions and never from history? clink set autosuggest.strategy completion (that would be pretty non-useful though; it might be better to just turn off autosuggest entirely in that case).
  • Do you want Tab to cycle through completions? Either set Clink to use Windows key bindings instead of Bash key bindings (clink set clink.default_bindings windows) or set up bindings in your .inputrc file such as:
    "\C-I":    old-menu-complete
    "\e[Z":    old-menu-complete-backward

from clink-completions.

chrisant996 avatar chrisant996 commented on June 9, 2024

@eggbean Oh, I think what you're looking for ("in a similar way that is possible in zsh") might be bash's show-all-if-ambiguous config variable.

In the .inputrc file:

# Show matches if there's more than one (in complete, menu-complete, old-menu-complete).
set show-all-if-ambiguous    on
# Bind TAB to either menu-complete or old-menu-complete, depending on your preference.
"\C-I":    menu-complete
"\e[Z":    menu-complete-backward

But trying to figure out what you're referring to led me to find that in Clink the menu-complete commands weren't updated to respect the completion-auto-query-items config variable. So a fix for that is coming in v1.6.14 (probably in a week or two).

from clink-completions.

chrisant996 avatar chrisant996 commented on June 9, 2024

@eggbean I think that the outstanding issue about "combine these completion suggestions with the repeated tab cycling, in a similar way that is possible in zsh" is not about the gh argmatcher, and is instead about how to configure the tab completion command(s) to behave similarly to zsh for all completion in general.

I'm going to go ahead and publish a new release for the clink-completions repo.

from clink-completions.

chrisant996 avatar chrisant996 commented on June 9, 2024

Completions for gh were added in commit 651b979.

from clink-completions.

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.