This repository has been archived on 2026-11-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
dotfiles/config/nushell/scripts/git/common.nu
T
2026-07-26 11:45:34 +02:00

16 lines
356 B
Nu

export def agree [
prompt
--default-not (-n)
] {
let prompt = if ($prompt | str ends-with '!') {
$'(ansi red)($prompt)(ansi reset)'
} else {
$'($prompt)'
}
(if $default_not { [no yes] } else { [yes no] } | input list $prompt) == 'yes'
}
export def tips [msg] {
print -e $"(ansi light_gray)($msg)(ansi reset)"
}