默可思 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
..
2022-05-23 09:59:34 -07:00
2022-05-18 06:18:21 -05:00
2022-06-21 23:27:58 -04:00
2022-06-21 12:14:29 -05:00
2022-04-08 08:49:28 +12:00
2022-02-07 14:54:06 -05:00
2022-02-07 14:54:06 -05:00
2022-02-07 14:54:06 -05:00
2022-05-31 18:24:33 -05:00
2022-02-22 11:32:29 -05:00
2022-02-07 14:54:06 -05:00
2022-06-29 20:01:34 -05:00
2022-03-18 12:35:28 -05:00
2022-02-17 06:40:24 -05:00
2022-02-07 14:54:06 -05:00
2022-02-07 14:54:06 -05:00
2022-02-16 12:24:45 -06:00
2022-05-18 20:47:26 -05:00
2022-03-19 10:12:54 +13:00
2022-07-04 06:31:50 +12:00
2022-02-07 14:54:06 -05:00
2022-02-07 14:54:06 -05:00
2022-04-24 10:29:21 +01:00
2022-05-13 06:47:11 -05:00
2022-02-07 14:54:06 -05:00
2022-03-07 20:17:33 -05:00
2022-05-18 06:20:26 -05:00
2022-02-07 14:54:06 -05:00
2022-03-18 12:35:28 -05:00
2022-05-07 06:23:49 -05:00
2022-02-07 14:54:06 -05:00
2022-02-07 14:54:06 -05:00
2022-04-07 06:44:05 -05:00
2022-03-19 10:12:54 +13:00
2022-03-18 06:55:02 +13:00
2022-02-25 13:03:39 -05:00
2022-03-24 16:42:41 +13:00
2022-02-22 11:32:29 -05:00
2022-05-15 16:44:32 -05:00