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

Bug with the "PowerShell: Expand Alias" feature #714

Closed
pcgeek86 opened this issue May 6, 2017 · 8 comments
Closed

Bug with the "PowerShell: Expand Alias" feature #714

pcgeek86 opened this issue May 6, 2017 · 8 comments
Labels
Issue-Bug A bug to squash.

Comments

@pcgeek86
Copy link
Collaborator

pcgeek86 commented May 6, 2017

System Details

  • Operating system name and version: Mac OS Sierra
  • VS Code version:
  • PowerShell extension version:
  • Output from $PSVersionTable:
PS > code -v
1.12.1
f6868fce3eeb16663840eb82123369dec6077a9b
PS > $pseditor.EditorServicesVersion
PS > code --list-extensions --show-versions
Alexander.theme-sublime-oceanicnext@0.0.3
Nuuf.theme-hackershaze@1.3.1
PeterJausovec.vscode-docker@0.0.13
abusaidm.html-snippets@0.1.0
akamud.vscode-theme-onedark@1.3.2
arcticicestudio.nord-visual-studio-code@0.1.1
aws-scripting-guy.cform@0.0.9
azemoh.one-monokai@0.2.4
christian-kohler.npm-intellisense@1.3.0
dlech.chmod@1.0.0
donjayamanne.python@0.6.4
ecmel.vscode-html-css@0.1.2
eg2.vscode-npm-script@0.1.9
fknop.vscode-npm@3.3.0
jakeboone02.mediawiki@2.1.0
jprestidge.theme-material-theme@1.0.1
mrcrowl.hg@1.0.4
ms-vscode.cpptools@0.11.0
ms-vscode.csharp@1.9.0
ms-vscode.PowerShell@0.12.2
searKing.preview-vscode@1.1.5

Issue Description

I'm seeing some bugs when I try to use the PowerShell: Expand Alias VSCode command. The first time I tried to use it, I received an exception saying the "sequence contains no elements," but now that I've restarted the PowerShell session, it's just prompting over and over, without actually doing anything.

All I've typed is: gps followed by ALT / OPTION + SHIFT + E to invoke Expand Alias.

screen shot 2017-05-06 at 2 08 55 pm

Attached Logs

Follow the instructions in the README
about capturing and sending logs.

@rkeithhill
Copy link
Collaborator

Interesting. I see one more prompt string appear after exansion (with no linebreak like you're seeing).

@daviwil
Copy link
Contributor

daviwil commented May 8, 2017

I think it shows multiple times in his screenshot because he's run Expand Aliases a bunch of times. Looks like the way we're running that command in the session isn't properly causing a newline to be written. Also, I'm betting that the expansion is actually happening but there's just nothing in the file to expand. If you use gci in the file, does it get expanded?

@daviwil daviwil added the Issue-Bug A bug to squash. label May 8, 2017
@daviwil daviwil added this to the May 2017 milestone May 8, 2017
@rkeithhill
Copy link
Collaborator

I should have mentioned that all the aliases I tested were expanded but then again, I'm testing on Windows / Windows PowerShell.

@pcgeek86
Copy link
Collaborator Author

pcgeek86 commented May 8, 2017

@daviwil @rkeithhill That's the weird thing, expansion isn't actually occurring for me. I tried both gci and gps. Will send logs over.

@daviwil
Copy link
Contributor

daviwil commented May 8, 2017

Thanks a lot!

@pcgeek86
Copy link
Collaborator Author

pcgeek86 commented May 8, 2017

This line is getting printed repeatedly in the EditorServices.log file. Also e-mailed you the full log.

The term 'Sort' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

@daviwil
Copy link
Contributor

daviwil commented May 8, 2017

Thanks Trevor! I think the alias for Sort-Object may not be available on Linux/macOS, just need to update the logic for the alias expansion command.

@SydneyhSmith
Copy link
Collaborator

Closing as this should be resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug A bug to squash.
Projects
None yet
Development

No branches or pull requests

5 participants