nushell/crates/nu-command/src/filesystem
Access e5ff72120a
check if is homedir first when rm (#9117)
I don't want to rm my home again.. sadly..


# Description
<!--
Thank you for improving Nushell. Please, check our [contributing
guide](../CONTRIBUTING.md) and talk to the core team before making major
changes.

Description of your pull request goes here. **Provide examples and/or
screenshots** if your changes affect the user experience.
-->

check if there is unique argument

# User-Facing Changes
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->

user will not easily rm their home

# Tests + Formatting
<!--
Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A
clippy::needless_collect -A clippy::result_large_err` to check that
you're using the standard code style
- `cargo test --workspace` to check that all tests pass
- `cargo run -- crates/nu-std/tests/run.nu` to run the tests for the
standard library

> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```
-->

# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->

---------

Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
2023-05-25 09:45:50 -05:00
..
cd_query.rs Fix typos by codespell (#7600) 2022-12-26 02:31:26 -05:00
cd.rs REFACTOR: remove the shell commands (#8415) 2023-05-13 12:40:11 -05:00
cp.rs add -u flag to cp, mv command (#9214) 2023-05-20 09:48:57 -07:00
glob.rs add a negation glob option to the glob command (#9153) 2023-05-10 06:31:34 -05:00
ls.rs update nu-glob based on latest glob 0.3.1 changes (#9099) 2023-05-08 09:07:01 -05:00
mkdir.rs Document and critically review ShellError variants - Ep. 2 (#8326) 2023-03-06 11:31:07 +01:00
mod.rs move BufferedReader out of nu-command (#7697) 2023-01-06 15:22:17 -08:00
mv.rs add -u flag to cp, mv command (#9214) 2023-05-20 09:48:57 -07:00
open.rs Add rest and glob support to 'open' (#8506) 2023-03-18 08:51:39 +13:00
rm.rs check if is homedir first when rm (#9117) 2023-05-25 09:45:50 -05:00
save.rs Box ShellError in Value::Error (#8375) 2023-03-12 09:57:27 +01:00
start.rs docs: Add missing space in Filesystem/start's usage (#8458) 2023-03-15 07:16:41 -05:00
touch.rs Document and critically review ShellError variants - Ep. 2 (#8326) 2023-03-06 11:31:07 +01:00
util.rs add -u flag to cp, mv command (#9214) 2023-05-20 09:48:57 -07:00
watch.rs Update some help examples (#8759) 2023-04-05 18:36:00 -05:00