mirror of
https://github.com/Cian-H/dotfiles.git
synced 2026-05-08 06:41:42 +01: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,26 @@
|
||||
use ./row-indices.nu *
|
||||
|
||||
# Selects one or more rows while keeping
|
||||
# the original indices.
|
||||
#
|
||||
# Example - Selects the first, fifth, and
|
||||
# sixth rows from the table:
|
||||
#
|
||||
# ls / | select ranges 0 4..5
|
||||
#
|
||||
# Example - Select the 5th row:
|
||||
#
|
||||
# ls / | select 5
|
||||
#
|
||||
# Example - Select the 4th row.
|
||||
# Note that the difference beteen this
|
||||
# and `select 3` is that the index (#)
|
||||
# column shows the *original* (pre-select)
|
||||
# position in the table.
|
||||
#
|
||||
# ls | select ranges 3
|
||||
export def "select ranges" [ ...ranges ] {
|
||||
enumerate
|
||||
| flatten
|
||||
| select ...(row-indices ...$ranges)
|
||||
}
|
||||
Reference in New Issue
Block a user