Skip to content

Commit 5ca259f

Browse files
StartAutomatingStartAutomating
authored andcommitted
feat: Lucky turtle and random defaults ( Fixes PoshWeb#363, Fixes PoshWeb#366 )
Carrying on id and title with multiple luckys
1 parent 1dfb5f4 commit 5ca259f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Turtle.types.ps1xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2475,7 +2475,12 @@ return $this
24752475
)
24762476

24772477
$id = $luckyArgs -join '-'
2478-
$this | turtle id $id title $($luckyArgs -join ' ') @luckyArgs
2478+
$title = $luckyArgs -join ' '
2479+
if ($this.id -notmatch 'turtle-?\d+') {
2480+
$id = $this.id, $id -join '-'
2481+
$title = $this.title, $title -join ' '
2482+
}
2483+
$this | turtle id $id title $title @luckyArgs
24792484

24802485
</Script>
24812486
</ScriptMethod>

0 commit comments

Comments
 (0)