nushell/crates/nu-command/tests
Wind 460a1c8f87
Allow ls works inside dir with [] brackets (#12625)
# Description
Fixes: #12429

To fix the issue, we need to pass the `input pattern` itself to
`glob_from` function, but currently on latest main, nushell pass
`expanded path of input pattern` to `glob_from` function.
It causes globbing failed if expanded path includes `[]` brackets.

It's a pity that I have to duplicate `nu_engine::glob_from` function
into `ls`, because `ls` might convert from `NuGlob::NotExpand` to
`NuGlob::Expand`, in that case, `nu_engine::glob_from` won't work if
user want to ls for a directory which includes tilde:
```
mkdir "~abc"
ls "~abc"
```
So I need to duplicate `glob_from` function and pass original
`expand_tilde` information.

# User-Facing Changes
Nan

# Tests + Formatting
Done

# After Submitting
Nan
2024-05-06 14:01:32 +08:00
..
commands Allow ls works inside dir with [] brackets (#12625) 2024-05-06 14:01:32 +08:00
format_conversions Avoid taking unnecessary ownership of intermediates (#12740) 2024-05-04 00:53:15 +00:00
main.rs ♻️ rework some help strings (#12306) 2024-03-27 08:41:02 -05:00