nushell/crates/nu-command/src/filesystem
默可思 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
..
cd_query.rs Add hooks to cli/repl (#5479) 2022-05-09 07:28:39 +12:00
cd.rs enable cd to work with directory abbreviations (#5452) 2022-05-06 07:58:32 -05:00
cp.rs Fix cp bug (#5642) 2022-05-31 18:24:33 -05:00
glob.rs feat: add search terms to date (#5306) 2022-04-23 08:54:03 -05:00
ls.rs Add --directory (-D) flag to ls, list the directory itself instead of its contents (#5970) 2022-07-08 14:15:34 -05:00
mkdir.rs feat: add search terms to date (#5306) 2022-04-23 08:54:03 -05:00
mod.rs enable cd to work with directory abbreviations (#5452) 2022-05-06 07:58:32 -05:00
mv.rs make ls works better with glob (#5691) 2022-05-30 19:13:27 -05:00
open.rs Overlays (#5375) 2022-05-08 07:39:22 +12:00
rm.rs make ls works better with glob (#5691) 2022-05-30 19:13:27 -05:00
save.rs Improve internal documentation of save command (#5704) 2022-06-03 11:35:31 +02:00
touch.rs feat: add search terms to date (#5306) 2022-04-23 08:54:03 -05:00
util.rs cp, mv, and rm commands need to support -i flag (#5523) 2022-05-18 09:53:46 -05:00
watch.rs add -e flag to print, to print the value to stderr (#5935) 2022-07-02 09:54:49 -05:00