Giter Club home page Giter Club logo

Comments (5)

mrkaarel avatar mrkaarel commented on June 12, 2024 2

The suggestions you are seeing as you type, are not provided by posh-git but by PowerShell PSReadLine module. These work in all directories, not only inside git repositories.

When you press tab key, you are getting posh-git autocompletion. When you press right arrow, you'll get PSReadLine autocompletion.

If this is confusing, you can turn off PSReadLine inline suggestions. Maybe sometimes in the future posh-git will have a auto-completion plugin that is compatible with PSReadLine.

from posh-git.

matys1 avatar matys1 commented on June 12, 2024

@mrkaarel Thank you very much, you've given me enough information to make the changes I needed. I ended up moving PSReadLine's AcceptSuggestion to Tab and AcceptNextSuggestionWord to RightArrow in effect overriding posh-git's tab completion completely as my preference was to use PSReadLine. Not sure if there's a proper way to disable posh-git's tab completion via ps1 profile settings though? Either way this works for me now.

from posh-git.

vegar avatar vegar commented on June 12, 2024

@matys1 , Be aware, though, that PSReadLine's suggestions comes from your history, not from the current context. So while it will suggest co to be commit, it will not be able to suggest what file to add based on your modified files. I'll also question how useful history based auto suggestion is for 'git commit' - how often do you reuse the same commit message?

from posh-git.

vito-mohagheghian avatar vito-mohagheghian commented on June 12, 2024

The suggestions you are seeing as you type, are not provided by posh-git but by PowerShell PSReadLine module. These work in all directories, not only inside git repositories.

When you press tab key, you are getting posh-git autocompletion. When you press right arrow, you'll get PSReadLine autocompletion.

If this is confusing, you can turn off PSReadLine inline suggestions. Maybe sometimes in the future posh-git will have a auto-completion plugin that is compatible with PSReadLine.

how can we change the inline suggestion from arrow right to tab?

from posh-git.

vegar avatar vegar commented on June 12, 2024

Take a look at the readme for PSReadLine:

To view the current key bindings:

Get-PSReadLineKeyHandler

To set your own custom keybindings, use the cmdlet Set-PSReadLineKeyHandler. For example, for a better history experience, try:

Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward

If you combinde that with @matys1 reply a little further up, I'm sure you'll reach your goal :-)

from posh-git.

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.