mirror of
https://github.com/Cian-H/dotfiles.git
synced 2026-03-02 03:28:04 +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:
9
dot_config/nushell/nu_scripts/modules/wc/wc.nu
Normal file
9
dot_config/nushell/nu_scripts/modules/wc/wc.nu
Normal file
@@ -0,0 +1,9 @@
|
||||
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*$'
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user