nushell/crates/nu-cli/tests/commands
Jon Grythe Stødle 81a48d6d0e
Fix '/' and '..' not being valid mv targets (#1519)
* Fix '/' and '..' not being valid mv targets

If `/` or `../` is specified as the destination for `mv`, it will fail with an error message saying it's not a valid destination. This fixes it to account for the fact that `Path::file_name` return `None` when the file name evaluates to `/` or `..`. It will only take the slow(er) path if `Path::file_name` returns `None` in its initial check.

Fixes #1291

* Add test
2020-03-24 14:00:48 +13:00
..
append.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
calc.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
cd.rs Custom canonicalize method on Filesystem Shell. (#1485) 2020-03-16 19:28:18 +13:00
compact.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
cp.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
default.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
edit.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
enter.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
first.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
format.rs Columnpath support when passing fields for formatting. (#1472) 2020-03-10 01:55:03 -05:00
get.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
group_by.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
histogram.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
insert.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
last.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
lines.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
ls.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
mkdir.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
mod.rs Make sum plugin as internal command. (#1501) 2020-03-18 18:46:00 -05:00
mv.rs Fix '/' and '..' not being valid mv targets (#1519) 2020-03-24 14:00:48 +13:00
nth.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
open.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
parse.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
pick.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
prepend.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
range.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
rename.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
reverse.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
rm.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
save.rs Columnpath support when passing fields for formatting. (#1472) 2020-03-10 01:55:03 -05:00
sort_by.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
split_by.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
split_column.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
sum.rs Make sum plugin as internal command. (#1501) 2020-03-18 18:46:00 -05:00
touch.rs Move most of the root package into a subcrate. (#1445) 2020-03-04 13:58:20 -05:00
uniq.rs Fix whitespace and typos (#1481) 2020-03-14 06:23:41 +13:00
where_.rs Fix numeric comparison with nothing (#1508) 2020-03-21 11:02:49 +13:00
wrap.rs Make sum plugin as internal command. (#1501) 2020-03-18 18:46:00 -05:00