Skip to content

Commit e4ce3ac

Browse files
committed
feat: toggle rgj rgo by ctrl+shift+s
1 parent 3d7698b commit e4ce3ac

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

quickPSReadLine.psm1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,12 @@ $VaultSearchParameters = @{
4141
# WARN: First time I used ScriptBlock
4242
$process_string = {
4343
param($line)
44-
if ($line -match "^$searchFunction") {
44+
$matchesSearchFunction = "rgj|rgo"
45+
if ($line -match "^($matchesSearchFunction)") {
4546
# TODO: further enhanced by adding different flag at this point.
46-
$SearchWithQuery = "$line -w"
47+
if($line -notmatch "-w$"){$SearchWithQuery = "$line -w"}
48+
elseif($line -match "^rgj"){$SearchWithQuery = $line -replace "^rgj","rgo"}
49+
elseif($line -match "^rgo"){$SearchWithQuery = $line -replace "-w$",""}
4750
}
4851
else {
4952
$SearchWithQuery = "$searchFunction $line"

0 commit comments

Comments
 (0)