-
Notifications
You must be signed in to change notification settings - Fork 81
Update PowerShell (to YAML and to PS3/4 syntax) #21
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
Conversation
Make it work for PowerShell 3 (and 4), fix MOST of the test cases
Fix variable highlighting
(It's still not quite 100%, but it'll work for me) Fix syntax highlighting! (It's still not quite 100%, but it'll work for me)
You should take a look at the |
I'm confused. Are you guys working on ST2? |
I'm not usually working on ST2, but when I needed to fix the PowerShell syntax, I (re)installed 2 so I could use AAAPackageDev to work with the JSON/YAML format rather than edit the tmLanguage file xml which I've never bothered groking (especially since that's how this syntax was obviously done originally). Is there some other option that works on ST3? |
PackageDev will at some point be ST3 compatible, hopefully within the next few weeks. I don't know of any other plugin that does the syntax thing. |
So I'm confused -- is there anything preventing this being merged? |
@Jaykul No, it's just me. This will be merged when I find the time. @FichteFoll Actually, it might be a good idea to start porting AAAPackageDev bit by bit? I might take a look at making the syntax translations work in ST3. So basically it'd be two tasks: silencing errors in ST3, making the syntax translations work and ensuring that everything keeps working in ST2. Ok, three tasks :) |
"bit by bit" is a thing ... well, it shouldn't actually be much work, I just need to find some time in my schedule. I'll see if I can do this tomorrow. Also, there are some weird issues with relative imports in newer ST3 builds that might be a problem. I could work around it by hardcoding |
Yeah, I tried getting it working in ST3 based on changes someone else made |
Any chance we'll see an updated PS3 version anytime soon? There are plenty of people like me who don't post here, but been waiting months for an update.. |
I definitely want it (I'm the original author), but I don't have the time to look into it for now. Perhaps in a few weeks. |
I don't know all of the ins and outs of all the above that's mentioned above. I just installed @Jaykul's fork in ST3 3047 portable on x64 Windows 8.1 and for the basic PowerShell needs I use it for it appears to be working for me. |
Sorry, I know this is the wrong place to ask, but curious if anyone here uses Bracket Highlighter? If so, has anyone updated it to recognize Powershell comment blocks? i.e., <# comments go here #> |
@Jaykul Do I need to have 'ConEmu' installed to work with your most recent commits? (I'd prefer not) |
You shouldn't need ConEmu -- those changes are isolated in their own file, and it's just a couple of commands (which you'd have to associate a keystroke or something before they do anything) I'll probably make a separate ConEmu addon ... it's just as useful with Python (or bash, or anything else that runs in ConEmu) as PowerShell... |
@gwojan (or anyone), which ST package currently has more complete Powershell Version 3/4 support? I'm currently using Jaykul's version, labeled "Powershell v2" |
@mkanet I'm not really sure at this point. The stposh package seems pretty full featured at this point. I only recently found @Jaykul 's updates which I haven't had a chance to 'build' since I'm still struggling with Sublime. If I have a chance to fit it in in the next few days I'll report my findings back here. |
@guillermooo any updates about this pull request? I'd like to help with adding support for PowerShell v5. Should I use @Jaykul 's fork as a baseline? Areas that I want to address:
|
It will probably take me some more time to merge this. But if someone can verify it could be merged without further review, that'd be great. Thanks for your interest, BTW! |
Great! I will help with merging this request. Thank you for a quick response :) |
@@ -1,591 +1,588 @@ | |||
# encoding: utf-8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, use original CRLF line terminators so changes can be reviewed more easily.
name='PowerShell', | ||
version=PACKAGE_VERSION, | ||
description='PowerShell support for Sublime Text.', | ||
author='Joel Bennett', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, preserve original authors as well
@Jaykul thank you, good work! I left few comments inlined. I didn't test .ps1 build scripts, although. Please, reduce the size of PR with preserving original ending (CLRF) in files that I mentioned. We may convert them to unix-style later, as a separate checkin. Now, it prevents effective reviewing. |
I can do all of that. The ConEmu changes, honestly, I did not mean to include in this PR, I just forgot to make a branch. I'm on vacation this week (and have a late night tonight) but adding PS5 support has been on my todo list for this vacation, so since there's movement over here, I'll try to at least fix the changes tomorrow night :-) |
OK, my deepest apologies to anyone who was tracking my fork (@vors), but ... the simplest thing was to just revert and |
I've tried this briefly and everything seems to be ok. This is one of the first syntax defs I created, so we'll probably need to revisit many things, but that can wait. Thanks JayKul (and sorry for the long wait)! |
Update PowerShell (to YAML and to PS3/4 syntax)
Sweet |
Great! 👍 |
Not much to say here, just a long overdue push request to get this updated to PowerShell 3
NOTE: there's no WorkFlow or DSC syntax here -- just straight PowerShell.