mirror of
https://github.com/Cian-H/dotfiles.git
synced 2026-03-21 12:02:45 +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:
@@ -0,0 +1,11 @@
|
||||
# A command to flatten many levels by using recursion
|
||||
# by @jturner 2/10/21
|
||||
# Example: sys | flatter 3
|
||||
def flatter [levels:int] {
|
||||
let input = $in
|
||||
if $levels > 0 {
|
||||
$input | columns | reduce -f $input {|it acc| $acc | flatten $it } | flatter ($levels - 1)
|
||||
} else {
|
||||
$input
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user