mirror of
https://github.com/Cian-H/dotfiles.git
synced 2026-02-24 00:48:06 +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,18 @@
|
||||
# Convert a Nushell value to a list
|
||||
#
|
||||
# Primary useful for range-to-list,
|
||||
# but other types are accepted as well.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# 1..10 | into list
|
||||
export def "into list" []: any -> list {
|
||||
let input = $in
|
||||
let type = ($input | describe --detailed | get type)
|
||||
match $type {
|
||||
range => {$input | each {||}}
|
||||
list => $input
|
||||
table => $input
|
||||
_ => [ $input ]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export use ./into.nu *
|
||||
Reference in New Issue
Block a user