Last active
March 10, 2022 05:32
-
-
Save AnthonyMastrean/6189382 to your computer and use it in GitHub Desktop.
PowerShell tab completion for Rake tasks via PowerTab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS> rake -T | |
rake build # build all of the solution configurations | |
rake build_installers # build the installers | |
rake build_no_reports # build the solution without reports | |
rake build_reports # build the repots only | |
rake build_sharepoint # build the SharePoint website | |
rake package # package the websites for all publish profiles | |
rake package_staging # package the websites for staging | |
rake package_test # package the websites for test | |
rake package_web # package the websites for production | |
rake test # run the regular unit tests and db installer tests | |
rake version # version all of the assemblies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(Test-Path Function:Register-TabExpansion) { | |
Register-TabExpansion -Name 'rake' -Type Command -Handler { | |
rake -T | %{ $_ -match '(^rake)(?<task>.*)(#.*)' } | %{ $matches['task'] } | %{ $_.Trim() } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reference
-match
doesn't do what you think it does