mirror of
https://github.com/Cian-H/dotfiles.git
synced 2026-01-15 05:01:56 +00:00
This change allows the dotfiles to work with chezmoi (e.g: on windows) and improves grepability with neovim/telescope
10 lines
291 B
Nu
10 lines
291 B
Nu
export def main [...rest] {
|
|
let stdin = $in
|
|
if ($rest | length ) > 0 {
|
|
^wc $rest | lines | parse -r '^\s*(?<lines>\d+)\s*(?<words>\d+)\s*(?<bytes>\d+)\s*(?<file>.*)$'
|
|
} else {
|
|
$stdin | ^wc | lines | parse -r '^\s*(?<lines>\d+)\s*(?<words>\d+)\s*(?<bytes>\d+)\s*$'
|
|
|
|
}
|
|
}
|