mirror of
https://github.com/Cian-H/dotfiles.git
synced 2026-01-06 00:51:57 +00:00
Changed . token to _dot
This change allows the dotfiles to work with chezmoi (e.g: on windows) and improves grepability with neovim/telescope
This commit is contained in:
11
dot_config/nushell/nu_scripts/modules/recursion/countdown.nu
Normal file
11
dot_config/nushell/nu_scripts/modules/recursion/countdown.nu
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
# Simple countdown counter from some number n to 0. Returns 0 at end
|
||||
# Designed to be used with the tramp module to avoid stack overflows via the
|
||||
# use of the Trampoline method.
|
||||
def countdown [n: int] -> int {
|
||||
if $n == 0 {
|
||||
0
|
||||
} else {
|
||||
{|| countdown ($n - 1) }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user