-
Notifications
You must be signed in to change notification settings - Fork 34
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
Unable to use Invoke-FuzzyEdit to edit file with CLI text editor #242
Comments
I couldn't recreate the rendering issues you're seeing, but it might be a race condition where fzf hasn't been killed. I do have a fix for the path with spaces issue (#243) |
For more information, I am using Powershell 7.4.1 (just upgraded few days ago) + Windows Terminal 1.18.3181.0 + fzf 0.45.0 + nano 7.2-1 (from msys2) + PSReadLine 2.3.4 . |
I am now using Powershell 7.4.0.
I set the environment variable of
editor
to "nano" with$env:editor = "nano"
When I tried to use
Invoke-FuzzyEdit
/ by using the aliasfe
, not only that I cannot use nano to edit the file, but it also turn my terminal behave weird (shown as the following gif)This also happen if i modify the PSFzf.psm1 file to allow using another command-line text editor "micro" for the editor launch option for
Invoke-FuzzyEdit
*gif that showing the above weird behavior
![e](https://private-user-images.githubusercontent.com/76443690/295918527-b80320c7-8613-4c20-ac37-f21ebac038f2.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1Mzg3NzgsIm5iZiI6MTcyNDUzODQ3OCwicGF0aCI6Ii83NjQ0MzY5MC8yOTU5MTg1MjctYjgwMzIwYzctODYxMy00YzIwLWFjMzctZjIxZWJhYzAzOGYyLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI0VDIyMjc1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg5YjVmYTE2ZTc2MDViMGZhY2Q2YmUwZjAxOGEwMDczZWFhM2ZmMWExMWQ0YTNjNDMxMzE0YjdiNjY0ZGQ1ZWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.oo0us7XhzNqJNHNyPC4LEbV72rNmMH14jXNgNtY1BGs)
Furthermore, if the selected directory path from Invoke-FuzzyEdit contains spacing, the editor cannot open it successfully because of it.
![p](https://private-user-images.githubusercontent.com/76443690/295920133-3349f1d0-3b46-4e29-8059-5adbfb22313e.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1Mzg3NzgsIm5iZiI6MTcyNDUzODQ3OCwicGF0aCI6Ii83NjQ0MzY5MC8yOTU5MjAxMzMtMzM0OWYxZDAtM2I0Ni00ZTI5LTgwNTktNWFkYmZiMjIzMTNlLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI0VDIyMjc1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFkMTM3MTE3ZmZlZDYwNDkzMmRhYTU2NzMyNTM2OTk1YTIyYmQyODcwODdiMDA3ODY4NDQ4MjIzNWFjMzdhNjYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.v6L4rIGHL4IiAq4-1gfRlsIwDI6mXVNzDHhqaXmUV4I)
I guess the issue caused by path with spacing can be fixed by adding double quote to the path in
Get-EditorLaunch()
The text was updated successfully, but these errors were encountered: