Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
convert spaces to tabs, start on shortcut stuff for deleting NT_CONSO…
…LE_PROPS
- Loading branch information
1 parent
b195e22
commit 39a4965
Showing
17 changed files
with
305 additions
and
287 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
function command_files { | ||
gci ("$psscriptroot\..\libexec") | where { $_.name.endswith('.ps1') } | ||
gci ("$psscriptroot\..\libexec") | where { $_.name.endswith('.ps1') } | ||
} | ||
|
||
function commands { | ||
command_files | % { command_name $_ } | ||
command_files | % { command_name $_ } | ||
} | ||
|
||
function command_name($filename) { $filename.name -replace '\.ps1$', '' } | ||
|
||
function exec($cmd, $arguments) { | ||
& ("$psscriptroot\..\libexec\$cmd.ps1") @arguments | ||
& ("$psscriptroot\..\libexec\$cmd.ps1") @arguments | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
function usage($text) { | ||
$text | sls '(?m)^# Usage: ([^\n]*)$' | % { "usage: " + $_.matches[0].groups[1].value } | ||
$text | sls '(?m)^# Usage: ([^\n]*)$' | % { "usage: " + $_.matches[0].groups[1].value } | ||
} | ||
|
||
function summary($text) { | ||
$text | sls '(?m)^# Summary: ([^\n]*)$' | % { $_.matches[0].groups[1].value } | ||
$text | sls '(?m)^# Summary: ([^\n]*)$' | % { $_.matches[0].groups[1].value } | ||
} | ||
|
||
function help($text) { | ||
$help_lines = $text | sls '(?ms)^# Help:(.(?!^[^#]))*' | % { $_.matches[0].value; } | ||
$help_lines -replace '(?ms)^#\s?(Help: )?', '' | ||
$help_lines = $text | sls '(?ms)^# Help:(.(?!^[^#]))*' | % { $_.matches[0].value; } | ||
$help_lines -replace '(?ms)^#\s?(Help: )?', '' | ||
} | ||
|
||
function my_usage { # gets usage for the calling script | ||
usage (gc $myInvocation.PSCommandPath -raw) | ||
usage (gc $myInvocation.PSCommandPath -raw) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
function linksto($path, $target) { | ||
if(!(test-path $path)) { return $false } | ||
if($path -notmatch '\.lnk$') { return $false } | ||
|
||
$path = "$(resolve-path $path)" | ||
|
||
$shell = new-object -com wscript.shell -strict | ||
$shortcut = $shell.createshortcut($path) | ||
|
||
return $shortcut.targetpath -eq $target | ||
} |
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
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
Oops, something went wrong.