U2E3VFKJD5BWNNOIZ2OIHQDYCENG3PRC7T5ZCZGQPLCVEE54ITHQC
export def smt [
type: string
msg: string
name?: string = "pijul"
] {
let message = if $target != null { $"($type)\(($target)\): ($msg)" } else { $"($type): ($msg)" }
match $name {
"pijul" => { pijul record -m $"($message)" }
"git" => { git commit -m $"($message)" }
}
}
"test" => { echo $message }
--target (-t): string
#!/usr/bin/env nu
#!/usr/bin/env nu
export def smt [
type: string
target?: string
--message (-m): string
--name (-n): string = "pijul"
] {
let msg = if $target != null { $"($type)\(($target)\): ($message)" } else { $"($type): ($message)" }
match $name {
"pijul" => { pijul record -m $"($msg)" }
"git" => { git commit -m $"($msg)" }
_ => { echo $msg }
}
}