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

Remove ".exe" suffix from PowerTab integration #606

Merged
merged 2 commits into from
Nov 30, 2019

Conversation

bradrn
Copy link
Contributor

@bradrn bradrn commented Aug 18, 2018

This small change was necessary to get it working on my system.

@rkeithhill
Copy link
Collaborator

rkeithhill commented Aug 18, 2018

What error are you getting or do you just not get tab-completion? I'm curious why removing the extension makes this work. Are you on a non-Windows OS?

@dahlbyk
Copy link
Owner

dahlbyk commented Aug 18, 2018

@bradrn what does Get-Command git show for you? I'm wondering if this is a difference between an Application in PATH vs an Alias.

Note the original implementation (b35085d via #63) used git.cmd, but was switched to git.exe in #66.

cc @jasonmarcher

@rkeithhill
Copy link
Collaborator

rkeithhill commented Aug 18, 2018

I'm not sure if PowerTab works on PSCore on Linux/macOS but if it does, git there will have no extension at all. Maybe that's what @bradrn is running into.

@bradrn
Copy link
Contributor Author

bradrn commented Aug 19, 2018

@rkeithhill:

@dahlbyk: Get-Command git shows the following:

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Application     git.exe                                            2.10.1.1   C:\Program Files\Git\cmd\git.exe

@dahlbyk
Copy link
Owner

dahlbyk commented Aug 19, 2018

Hrm... I was going to try this myself, but the PowerTab install failed. Will try to try again soon, if better guidance doesn't come along first.

@bradrn
Copy link
Contributor Author

bradrn commented Aug 19, 2018

Thank you @dahlbyk. I do know that I ran into this problem when I tried to install PowerTab - I eventually fixed it by doing this.

@rkeithhill
Copy link
Collaborator

I took a peek at the PowerTab Register-TabExpansion impl. It looks like if git.exe was already registered, the new handler is not added. PowerTab uses the already registered handler. Also, all of the examples I see specify the extension: ssh.exe, netsh.exe, robocopy.exe. I do see that Register-TabExpansion has a -Force parameter. What happens if you put it back to git.exe but add the -Force parameter?

@bradrn
Copy link
Contributor Author

bradrn commented Oct 16, 2018

@rkeithhill It still doesn't work if I add -Force.

(I'm not actually using PowerTab anymore, so this issue doesn't really affect me anymore. But it would still be nice to get this working...)

Copy link
Collaborator

@rkeithhill rkeithhill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering this only impacts PowerTab tab completion, this looks good to me.

@bradrn
Copy link
Contributor Author

bradrn commented Feb 15, 2019

Thank you!

@rkeithhill rkeithhill merged commit bac9b9f into dahlbyk:master Nov 30, 2019
@dahlbyk dahlbyk added this to the v1.0 milestone Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants