mirror of
https://github.com/Cian-H/dotfiles.git
synced 2026-01-02 15:31:56 +00:00
This change allows the dotfiles to work with chezmoi (e.g: on windows) and improves grepability with neovim/telescope
13 lines
302 B
Nu
13 lines
302 B
Nu
# An attempt at trying to put ls into a paging mode
|
|
export def ls-less [
|
|
--dir(-d):any # The directory you want to list
|
|
] {
|
|
let is_empty = ($dir | is-empty)
|
|
if $is_empty {
|
|
nu -c 'ls' | less -r
|
|
} else {
|
|
let command = $"ls ($dir)"
|
|
nu -c $command | less -r
|
|
}
|
|
}
|