mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 06:37:46 +00:00
refactor git-v2#agree
with input list
(#496)
Co-authored-by: agent <agent@nuc>
This commit is contained in:
parent
b6ecfe3680
commit
08b7ccf84e
1 changed files with 3 additions and 3 deletions
|
@ -1,10 +1,10 @@
|
|||
def agree [prompt] {
|
||||
let prompt = if ($prompt | str ends-with '!') {
|
||||
$'(ansi red)($prompt)(ansi reset) '
|
||||
$'(ansi red)($prompt)(ansi reset)'
|
||||
} else {
|
||||
$'($prompt) '
|
||||
$'($prompt)'
|
||||
}
|
||||
(input $prompt | str downcase) in ['y', 'yes', 'ok', 't', 'true', '1']
|
||||
([yes no] | input list $prompt) in [yes]
|
||||
}
|
||||
|
||||
# git status and stash
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue