mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 06:30:08 +02:00
Remove dir-s/ectories/ectories-support features (#3647)
This commit is contained in:
@ -40,8 +40,8 @@ crossterm = { version = "0.19.0", optional = true }
|
||||
csv = "1.1.3"
|
||||
ctrlc = { version = "3.1.7", optional = true }
|
||||
derive-new = "0.5.8"
|
||||
directories-next = { version = "2.0.0", optional = true }
|
||||
dirs-next = { version = "2.0.0", optional = true }
|
||||
directories-next = "2.0.0"
|
||||
dirs-next = "2.0.0"
|
||||
dtparse = "1.2.0"
|
||||
dunce = "1.0.1"
|
||||
eml-parser = "0.1.0"
|
||||
@ -133,7 +133,5 @@ clipboard-cli = ["arboard"]
|
||||
rustyline-support = ["rustyline"]
|
||||
stable = []
|
||||
trash-support = ["trash"]
|
||||
directories = ["directories-next"]
|
||||
dirs = ["dirs-next"]
|
||||
table-pager = ["minus", "crossterm"]
|
||||
dataframe = ["nu-protocol/dataframe", "polars"]
|
||||
|
@ -105,18 +105,7 @@ fn run_with_stdin(
|
||||
let process_args = command_args
|
||||
.iter()
|
||||
.map(|(arg, _is_literal)| {
|
||||
let home_dir;
|
||||
|
||||
#[cfg(feature = "dirs")]
|
||||
{
|
||||
home_dir = dirs_next::home_dir;
|
||||
}
|
||||
#[cfg(not(feature = "dirs"))]
|
||||
{
|
||||
home_dir = || Some(std::path::PathBuf::from("/"));
|
||||
}
|
||||
|
||||
let arg = expand_tilde(arg.deref(), home_dir);
|
||||
let arg = expand_tilde(arg.deref(), dirs_next::home_dir);
|
||||
|
||||
#[cfg(not(windows))]
|
||||
{
|
||||
|
@ -1,6 +1,5 @@
|
||||
use super::{operate, PathSubcommandArguments};
|
||||
use crate::prelude::*;
|
||||
#[cfg(feature = "dirs")]
|
||||
use nu_engine::filesystem::path::expand_tilde;
|
||||
use nu_engine::filesystem::path::resolve_dots;
|
||||
use nu_engine::WholeStreamCommand;
|
||||
@ -104,7 +103,6 @@ fn action(path: &Path, tag: Tag, args: &PathExpandArguments) -> Value {
|
||||
))
|
||||
} else {
|
||||
// "best effort" mode, just expand tilde and resolve single/double dots
|
||||
#[cfg(feature = "dirs")]
|
||||
let path = match expand_tilde(path) {
|
||||
Some(expanded) => expanded,
|
||||
None => path.into(),
|
||||
|
@ -189,16 +189,6 @@ fn features_enabled() -> Vec<String> {
|
||||
names.push("ctrlc".to_string());
|
||||
}
|
||||
|
||||
#[cfg(feature = "dirs")]
|
||||
{
|
||||
names.push("dirs".to_string());
|
||||
}
|
||||
|
||||
#[cfg(feature = "directories")]
|
||||
{
|
||||
names.push("directories".to_string());
|
||||
}
|
||||
|
||||
#[cfg(feature = "ptree")]
|
||||
{
|
||||
names.push("ptree".to_string());
|
||||
|
@ -127,7 +127,6 @@ fn filesystem_change_current_directory_to_parent_directory_after_delete_cwd() {
|
||||
})
|
||||
}
|
||||
|
||||
#[cfg(feature = "dirs")]
|
||||
#[test]
|
||||
fn filesystem_change_to_home_directory() {
|
||||
Playground::setup("cd_test_8", |dirs, _| {
|
||||
|
Reference in New Issue
Block a user