Skip to content

Commit 1dfb5f4

Browse files
feat: Lucky turtle and random defaults ( Fixes #363, Fixes #366 )
Carrying on id and title with multiple luckys
1 parent 01ecb8a commit 1dfb5f4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Types/Turtle/Lucky.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,9 @@ $luckyArgs = @(
3434
)
3535

3636
$id = $luckyArgs -join '-'
37-
$this | turtle id $id title $($luckyArgs -join ' ') @luckyArgs
37+
$title = $luckyArgs -join ' '
38+
if ($this.id -notmatch 'turtle-?\d+') {
39+
$id = $this.id, $id -join '-'
40+
$title = $this.title, $title -join ' '
41+
}
42+
$this | turtle id $id title $title @luckyArgs

0 commit comments

Comments
 (0)