mirror of
https://github.com/nushell/nu_scripts.git
synced 2024-10-26 22:08:03 +03:00
7b2856ddff
The documentation states that the flag `-c`/`--column` now takes a record as argument instead of an array: https://www.nushell.sh/commands/docs/rename.html#flags. I have made the change, and you can check in a nu prompt that it works as intended: ```nu let input = (^lsof +c 0xFFFF -i -n -P) let header = ($input | lines | take 1 | each { str downcase | str replace ' name$' ' name state' }) let body = ($input | lines | skip 1 | each { str replace '([^)])$' '$1 (NONE)' | str replace ' \((.+)\)$' ' $1' }) [$header] | append $body | to text | detect columns | upsert 'pid' { |r| $r.pid | into int } | rename --column { name: connection } ``` |
||
---|---|---|
.. | ||
remoting | ||
sockets | ||
ssh.nu |