nushell/crates/nu-engine/src
默可思 221f36ca65
Add --directory (-D) flag to ls, list the directory itself instead of its contents (#5970)
* Avoid extending the directory without globs in `nu_engine::glob_from`

* avoid joining a `*` to the directory without globs

* remove checks on directory permission and whether it is empty

The previous implemention of `nu_engine::glob_from` will extend the
given directory even if it containes no glob pattern. This commit
overcomes lack of consistency with the function `nu_glob::glob`.

* Add flag -D to ls, to list the directory itself instead of its contents

* add --directory (-d) flag to ls

* correct the difference between the given path and the cwd

* set default path to `.` instead of `./*` when --directory (-d) flag is true

* add comments

* add an example

* add tests

* fmt
2022-07-08 14:15:34 -05:00
..
call_ext.rs Track call arguments in a single list (#5125) 2022-04-09 14:55:02 +12:00
column.rs More nuon tests, fix table print (#4762) 2022-03-07 08:39:02 -05:00
documentation.rs ensure required positionals don't show up as optional when help (#5916) 2022-07-01 05:51:41 +12:00
env.rs feat: Add sensitive flag to get, fix #4295 (#5685) 2022-06-01 08:34:42 -05:00
eval.rs Add bit operator: bit-xor (#5940) 2022-07-03 06:45:20 -05:00
glob_from.rs Add --directory (-D) flag to ls, list the directory itself instead of its contents (#5970) 2022-07-08 14:15:34 -05:00
lib.rs nu-cli/completions: added completion for $nu (#5303) 2022-04-23 11:49:17 +12:00