mirror of
https://github.com/nushell/nushell.git
synced 2025-01-08 23:40:17 +01:00
dff6268d66
# Description Closes: #14387 ~To make it happen, just need to added `-l` flag to `du`, and pass it to `DirBuilder`, `DirInfo`, `FileInfo` Then tweak `impl From<DirInfo> for Value` and `impl From<FileInfo> for Value` impl.~ --- Edit: this PR is going to: 1. Exclude directories and files columns by default 2. Added `-l/--long` flag to output directories and files columns 3. When running `du`, it will output the files as well. Previously it doesn't output the size of file. To make it happen, just need to added `-r` flag to `du`, and pass it to `DirBuilder`, `DirInfo`, `FileInfo` Then tweak `impl From<DirInfo> for Value` and `impl From<FileInfo> for Value` impl. And rename some variables. # User-Facing Changes `du` is no longer output `directories` and `file` columns by default, added `-r` flag will show `directories` column, `-f` flag will show `files` column. ```nushell > du nushell ╭───┬────────────────────────────────────┬──────────┬──────────╮ │ # │ path │ apparent │ physical │ ├───┼────────────────────────────────────┼──────────┼──────────┤ │ 0 │ /home/windsoilder/projects/nushell │ 34.6 GiB │ 34.7 GiB │ ├───┼────────────────────────────────────┼──────────┼──────────┤ │ # │ path │ apparent │ physical │ ╰───┴────────────────────────────────────┴──────────┴──────────╯ > du nushell --recursive --files # It outputs two more columns, `directories` and `files`, but the output is too long to paste here. ``` # Tests + Formatting Added 1 test # After Submitting NaN |
||
---|---|---|
.. | ||
src | ||
tests | ||
Cargo.toml | ||
LICENSE | ||
README.md |
This crate contains the majority of our commands
We allow ourselves to move some of the commands in nu-command
to nu-cmd-*
crates as needed.
Internal Nushell crate
This crate implements components of Nushell and is not designed to support plugin authors or other users directly.