Skip to content

CD in a -Handler does not update my powershell prompt #29

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

Closed
dfinke opened this issue Sep 15, 2013 · 3 comments
Closed

CD in a -Handler does not update my powershell prompt #29

dfinke opened this issue Sep 15, 2013 · 3 comments
Labels
Issue-Enhancement It's a feature request.

Comments

@dfinke
Copy link

dfinke commented Sep 15, 2013

I have the latest from the zip.

After pressing the chord, my prompt does not show the new location. The set-location did execute correctly.

The next time I press enter the prompt updates.

Set-PSReadlineKeyHandler -Chord 'ctrl+c,ctrl+q' -BriefDescription 'quickgraph' -Handler { cd C:\posh\QuickGraph }
@lzybkr
Copy link
Contributor

lzybkr commented Sep 15, 2013

If the current input is empty, you call AcceptLine() - that would force the prompt to be revaluated.

If the current input is not empty, it seems best to preserve it, so I'll considering adding an API to for the prompt to be re-evaluated.

@dfinke
Copy link
Author

dfinke commented Sep 15, 2013

AcceptLine() works fine

@lzybkr
Copy link
Contributor

lzybkr commented Jan 4, 2014

I added a function that does what you want - InvokePrompt. d671045

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement It's a feature request.
Projects
None yet
Development

No branches or pull requests

2 participants