repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/move_/column.rs
crates/nu-command/tests/commands/move_/column.rs
use nu_test_support::nu; #[test] fn moves_a_column_before() { let sample = r#"[ [column1 column2 column3 ... column98 column99 column100]; [------- ------- ------- --- -------- " A " ---------], [------- ------- ------- --- -------- " N " ---------], [------- ------- ---...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/move_/umv.rs
crates/nu-command/tests/commands/move_/umv.rs
use nu_test_support::fs::{Stub::EmptyFile, Stub::FileWithContent, files_exist_at}; use nu_test_support::nu; use nu_test_support::playground::Playground; use rstest::rstest; #[test] fn moves_a_file() { Playground::setup("umv_test_1", |dirs, sandbox| { sandbox .with_files(&[EmptyFile("andres.txt"...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/move_/mod.rs
crates/nu-command/tests/commands/move_/mod.rs
mod column; mod umv;
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/path/expand.rs
crates/nu-command/tests/commands/path/expand.rs
use nu_path::Path; use nu_test_support::fs::Stub::EmptyFile; use nu_test_support::nu; use nu_test_support::playground::Playground; #[test] fn expands_path_with_dot() { Playground::setup("path_expand_1", |dirs, sandbox| { sandbox.within("menu").with_files(&[EmptyFile("spam.txt")]); let actual = nu!...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/path/type_.rs
crates/nu-command/tests/commands/path/type_.rs
use nu_test_support::fs::Stub::EmptyFile; use nu_test_support::nu; use nu_test_support::playground::Playground; #[test] fn returns_type_of_missing_file() { let actual = nu!(cwd: "tests", r#" echo "spam.txt" | path type "#); assert_eq!(actual.out, ""); } #[test] fn returns_type_of_existing...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/path/parse.rs
crates/nu-command/tests/commands/path/parse.rs
use nu_test_support::nu; #[cfg(windows)] #[test] fn parses_single_path_prefix() { let actual = nu!(cwd: "tests", r" echo 'C:\users\viking\spam.txt' | path parse | get prefix "); assert_eq!(actual.out, "C:"); } #[test] fn parses_single_path_parent() { let actual = nu!(cwd: "tes...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/path/exists.rs
crates/nu-command/tests/commands/path/exists.rs
use nu_test_support::fs::Stub::EmptyFile; use nu_test_support::nu; use nu_test_support::playground::Playground; #[test] fn checks_if_existing_file_exists() { Playground::setup("path_exists_1", |dirs, sandbox| { sandbox.with_files(&[EmptyFile("spam.txt")]); let actual = nu!( cwd: dirs.t...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/path/mod.rs
crates/nu-command/tests/commands/path/mod.rs
mod basename; mod dirname; mod exists; mod expand; mod join; mod parse; mod self_; mod split; mod type_; use nu_test_support::nu; use std::path::MAIN_SEPARATOR; /// Helper function that joins string literals with '/' or '\', based on host OS fn join_path_sep(pieces: &[&str]) -> String { let sep_string = String::f...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/path/dirname.rs
crates/nu-command/tests/commands/path/dirname.rs
use nu_test_support::nu; use super::join_path_sep; #[test] fn returns_dirname_of_empty_input() { let actual = nu!(cwd: "tests", r#" echo "" | path dirname "#); assert_eq!(actual.out, ""); } #[test] fn replaces_dirname_of_empty_input() { let actual = nu!(cwd: "tests", r#" echo...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/path/join.rs
crates/nu-command/tests/commands/path/join.rs
use nu_test_support::nu; use super::join_path_sep; #[test] fn returns_path_joined_from_list() { let actual = nu!(cwd: "tests", r#" echo [ home viking spam.txt ] | path join "#); let expected = join_path_sep(&["home", "viking", "spam.txt"]); assert_eq!(actual.out, expected); } #[test]...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/path/basename.rs
crates/nu-command/tests/commands/path/basename.rs
use nu_test_support::nu; use super::join_path_sep; #[test] fn returns_basename_of_empty_input() { let actual = nu!(cwd: "tests", r#" echo "" | path basename "#); assert_eq!(actual.out, ""); } #[test] fn replaces_basename_of_empty_input() { let actual = nu!(cwd: "tests", r#" e...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/path/self_.rs
crates/nu-command/tests/commands/path/self_.rs
use std::path::Path; use itertools::Itertools; use nu_test_support::{fs::Stub, nu, playground::Playground}; #[test] fn self_path_const() { Playground::setup("path_self_const", |dirs, sandbox| { sandbox .within("scripts") .with_files(&[Stub::FileWithContentToBeTrimmed( ...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/path/split.rs
crates/nu-command/tests/commands/path/split.rs
use nu_test_support::nu; #[test] fn splits_empty_path() { let actual = nu!(cwd: "tests", r#" echo '' | path split | is-empty "#); assert_eq!(actual.out, "true"); } #[test] fn splits_correctly_single_path() { let actual = nu!(cwd: "tests", r#" 'home/viking/spam.txt' | path spli...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/random/dice.rs
crates/nu-command/tests/commands/random/dice.rs
use nu_test_support::nu; #[test] fn rolls_4_roll() { let actual = nu!(r#" random dice --dice 4 --sides 10 | length "#); assert_eq!(actual.out, "4"); }
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/random/chars.rs
crates/nu-command/tests/commands/random/chars.rs
use nu_test_support::nu; #[test] fn generates_chars_of_specified_length() { let actual = nu!(r#" random chars --length 15 | str stats | get chars "#); let result = actual.out; assert_eq!(result, "15"); } #[test] fn generates_chars_of_specified_filesize() { let actual = nu!(r#" ...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/random/bool.rs
crates/nu-command/tests/commands/random/bool.rs
use nu_test_support::nu; #[test] fn generates_a_bool() { let actual = nu!("random bool"); let output = actual.out; let is_boolean_output = output == "true" || output == "false"; assert!(is_boolean_output); }
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/random/mod.rs
crates/nu-command/tests/commands/random/mod.rs
mod binary; mod bool; mod chars; mod dice; mod float; mod int; mod uuid;
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/random/binary.rs
crates/nu-command/tests/commands/random/binary.rs
use nu_test_support::nu; #[test] fn generates_bytes_of_specified_length() { let actual = nu!(r#" random binary 16 | bytes length "#); let result = actual.out; assert_eq!(result, "16"); } #[test] fn generates_bytes_of_specified_filesize() { let actual = nu!(r#" random binary 1k...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/random/float.rs
crates/nu-command/tests/commands/random/float.rs
use nu_test_support::nu; #[test] fn generates_a_float() { let actual = nu!("random float 42..43"); // Attention: this relies on the string output assert!(actual.out.starts_with("42") || actual.out.starts_with("43")); let actual = nu!("random float 42..43 | describe"); assert_eq!(actual.out, "floa...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/random/int.rs
crates/nu-command/tests/commands/random/int.rs
use nu_test_support::nu; #[test] fn generates_an_integer() { let actual = nu!("random int 42..43"); assert!(actual.out.contains("42") || actual.out.contains("43")); } #[test] fn generates_55() { let actual = nu!("random int 55..55"); assert!(actual.out.contains("55")); } #[test] fn generates_0() { ...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/random/uuid.rs
crates/nu-command/tests/commands/random/uuid.rs
use nu_test_support::nu; use uuid::Uuid; #[test] fn generates_valid_uuid4_by_default() { let actual = nu!("random uuid"); let result = Uuid::parse_str(actual.out.as_str()); assert!(result.is_ok()); if let Ok(uuid) = result { assert_eq!(uuid.get_version_num(), 4); } } #[test] fn generates_...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/platform/ansi_.rs
crates/nu-command/tests/commands/platform/ansi_.rs
use nu_test_support::nu; #[test] fn test_ansi_shows_error_on_escape() { let actual = nu!(r"ansi --escape \"); assert!(actual.err.contains("no need for escape characters")) } #[test] fn test_ansi_list_outputs_table() { let actual = nu!("ansi --list | length"); assert_eq!(actual.out, "440"); } #[test...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/platform/kill.rs
crates/nu-command/tests/commands/platform/kill.rs
use nu_test_support::nu; #[test] fn test_kill_invalid_pid() { let pid = i32::MAX; let actual = nu!(format!("kill {pid}")); assert!(actual.err.contains("process didn't terminate successfully")); }
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/platform/mod.rs
crates/nu-command/tests/commands/platform/mod.rs
mod ansi_; mod char_; mod kill;
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/platform/char_.rs
crates/nu-command/tests/commands/platform/char_.rs
use nu_test_support::nu; #[test] fn test_char_list_outputs_table() { let actual = nu!(r#" char --list | length "#); assert_eq!(actual.out, "113"); } #[test] fn test_char_eol() { let actual = nu!(r#" let expected = if ($nu.os-info.name == 'windows') { "\r\n" } else { "\n" } ((c...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/debug/timeit.rs
crates/nu-command/tests/commands/debug/timeit.rs
use nu_test_support::nu; #[test] fn timeit_show_stdout() { let actual = nu!("let t = timeit { nu --testbin cococo abcdefg }"); assert_eq!(actual.out, "abcdefg"); } #[test] fn timeit_show_stderr() { let actual = nu!( " with-env {FOO: bar, FOO2: baz} { let t = timeit { nu --testbin echo_env_mixed ou...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/debug/mod.rs
crates/nu-command/tests/commands/debug/mod.rs
mod metadata_set; mod timeit;
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/commands/debug/metadata_set.rs
crates/nu-command/tests/commands/debug/metadata_set.rs
use nu_test_support::nu; #[test] fn errors_on_conflicting_metadata_flags() { let actual = nu!(r#" echo "foo" | metadata set --datasource-filepath foo.txt --datasource-ls "#); assert!(actual.err.contains("cannot use `--datasource-filepath`")); assert!(actual.err.contains("with `--datasource-ls`"));...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/format_conversions/xlsx.rs
crates/nu-command/tests/format_conversions/xlsx.rs
use nu_test_support::nu; #[test] fn from_excel_file_to_table() { let actual = nu!(cwd: "tests/fixtures/formats", r#" open sample_data.xlsx | get SalesOrders | get 4 | get column2 "#); assert_eq!(actual.out, "Gill"); } #[test] fn from_excel_file_to_table_select_sheet() { ...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/format_conversions/nuon.rs
crates/nu-command/tests/format_conversions/nuon.rs
use nu_test_support::nu; #[test] fn to_nuon_correct_compaction() { let actual = nu!(cwd: "tests/fixtures/formats", r#" open appveyor.yml | to nuon | str length | $in > 500 "#); assert_eq!(actual.out, "true"); } #[test] fn to_nuon_list_of_numbers() { let actual = nu!(r#...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/format_conversions/msgpack.rs
crates/nu-command/tests/format_conversions/msgpack.rs
use nu_test_support::{nu, playground::Playground}; use pretty_assertions::assert_eq; fn msgpack_test(fixture_name: &str, commands: Option<&str>) -> nu_test_support::Outcome { let path_to_generate_nu = nu_test_support::fs::fixtures() .join("formats") .join("msgpack") .join("generate.nu"); ...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/format_conversions/html.rs
crates/nu-command/tests/format_conversions/html.rs
use nu_test_support::nu; #[test] fn out_html_simple() { let actual = nu!(r#" echo 3 | to html "#); assert_eq!( actual.out, r"<html><style>body { background-color:white;color:black; }</style><body>3</body></html>" ); } #[test] fn out_html_metadata() { let actual = nu!(r#" ...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/format_conversions/ods.rs
crates/nu-command/tests/format_conversions/ods.rs
use nu_test_support::nu; #[test] fn from_ods_file_to_table() { let actual = nu!(cwd: "tests/fixtures/formats", r#" open sample_data.ods | get SalesOrders | get 4 | get column2 "#); assert_eq!(actual.out, "Gill"); } #[test] fn from_ods_file_to_table_select_sheet() { let...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/format_conversions/json.rs
crates/nu-command/tests/format_conversions/json.rs
use nu_test_support::fs::Stub::FileWithContentToBeTrimmed; use nu_test_support::nu; use nu_test_support::playground::Playground; #[test] fn table_to_json_text_and_from_json_text_back_into_table() { let actual = nu!(cwd: "tests/fixtures/formats", r#" open sgml_description.json | to json | fr...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/format_conversions/url.rs
crates/nu-command/tests/format_conversions/url.rs
use nu_test_support::nu; #[test] fn can_encode_and_decode_urlencoding() { let actual = nu!(cwd: "tests/fixtures/formats", r#" open sample.url | url build-query | from url | get cheese "#); assert_eq!(actual.out, "comté"); }
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/format_conversions/xml.rs
crates/nu-command/tests/format_conversions/xml.rs
use nu_test_support::nu; #[test] fn table_to_xml_text_and_from_xml_text_back_into_table() { let actual = nu!(cwd: "tests/fixtures/formats", r#" open jt.xml | to xml | from xml | get content | where tag == channel | get content | flatten | where tag ==...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/format_conversions/msgpackz.rs
crates/nu-command/tests/format_conversions/msgpackz.rs
use nu_test_support::nu; use pretty_assertions::assert_eq; #[test] fn sample_roundtrip() { let path_to_sample_nuon = nu_test_support::fs::fixtures() .join("formats") .join("msgpack") .join("sample.nuon"); let sample_nuon = std::fs::read_to_string(&path_to_sample_nuon).expect("f...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/format_conversions/tsv.rs
crates/nu-command/tests/format_conversions/tsv.rs
use nu_test_support::fs::Stub::FileWithContentToBeTrimmed; use nu_test_support::nu; use nu_test_support::playground::Playground; #[test] fn table_to_tsv_text_and_from_tsv_text_back_into_table() { let actual = nu!( cwd: "tests/fixtures/formats", "open caco3_plastics.tsv | to tsv | from tsv | first |...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/format_conversions/markdown.rs
crates/nu-command/tests/format_conversions/markdown.rs
use nu_test_support::nu; #[test] fn md_empty() { let actual = nu!(r#" echo [[]; []] | from json | to md "#); assert_eq!(actual.out, ""); } #[test] fn md_empty_pretty() { let actual = nu!(r#" echo "{}" | from json | to md -p "#); assert_eq!(actual.out, ""); } ...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/format_conversions/mod.rs
crates/nu-command/tests/format_conversions/mod.rs
mod csv; mod html; mod json; mod markdown; mod msgpack; mod msgpackz; mod nuon; mod ods; mod ssv; mod toml; mod tsv; mod url; mod xlsx; mod xml; mod yaml;
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/format_conversions/yaml.rs
crates/nu-command/tests/format_conversions/yaml.rs
use nu_test_support::nu; #[test] fn table_to_yaml_text_and_from_yaml_text_back_into_table() { let actual = nu!(cwd: "tests/fixtures/formats", r#" open appveyor.yml | to yaml | from yaml | get environment.global.PROJECT_NAME "#); assert_eq!(actual.out, "nushell"); } #[test]...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/format_conversions/csv.rs
crates/nu-command/tests/format_conversions/csv.rs
use nu_test_support::fs::Stub::FileWithContentToBeTrimmed; use nu_test_support::nu; use nu_test_support::playground::Playground; #[test] fn table_to_csv_text_and_from_csv_text_back_into_table() { let actual = nu!( cwd: "tests/fixtures/formats", "open caco3_plastics.csv | to csv | from csv | first |...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/format_conversions/ssv.rs
crates/nu-command/tests/format_conversions/ssv.rs
use nu_test_support::fs::Stub::FileWithContentToBeTrimmed; use nu_test_support::nu; use nu_test_support::playground::Playground; #[test] fn from_ssv_text_to_table() { Playground::setup("filter_from_ssv_test_1", |dirs, sandbox| { sandbox.with_files(&[FileWithContentToBeTrimmed( "oc_get_svc.txt",...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-command/tests/format_conversions/toml.rs
crates/nu-command/tests/format_conversions/toml.rs
use nu_test_support::nu; #[test] fn record_map_to_toml() { let actual = nu!(r#" {a: 1 b: 2 c: 'qwe'} | to toml | from toml | $in == {a: 1 b: 2 c: 'qwe'} "#); assert_eq!(actual.out, "true"); } #[test] fn nested_records_to_toml() { let actual = nu!(r#" {a: {a: a...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-plugin-core/src/lib.rs
crates/nu-plugin-core/src/lib.rs
//! Functionality and types shared between the plugin and the engine, other than protocol types. //! //! If you are writing a plugin, you probably don't need this crate. We will make fewer guarantees //! for the stability of the interface of this crate than for `nu_plugin`. pub mod util; mod communication_mode; mod i...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-plugin-core/src/util/with_custom_values_in.rs
crates/nu-plugin-core/src/util/with_custom_values_in.rs
use nu_protocol::{CustomValue, IntoSpanned, ShellError, Spanned, Value}; #[allow(unused_imports)] // both are definitely used use nu_protocol::{BlockId, VarId}; /// Do something with all [`CustomValue`]s recursively within a `Value`. This is not limited to /// plugin custom values. pub fn with_custom_values_in<E>( ...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-plugin-core/src/util/waitable.rs
crates/nu-plugin-core/src/util/waitable.rs
use std::sync::{ Arc, Condvar, Mutex, MutexGuard, PoisonError, atomic::{AtomicBool, Ordering}, }; use nu_protocol::ShellError; /// A shared container that may be empty, and allows threads to block until it has a value. /// /// This side is read-only - use [`WaitableMut`] on threads that might write a value. #...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-plugin-core/src/util/mod.rs
crates/nu-plugin-core/src/util/mod.rs
mod waitable; mod with_custom_values_in; pub use waitable::*; pub use with_custom_values_in::with_custom_values_in;
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-plugin-core/src/serializers/msgpack.rs
crates/nu-plugin-core/src/serializers/msgpack.rs
use std::io::ErrorKind; use nu_plugin_protocol::{PluginInput, PluginOutput}; use nu_protocol::{ ShellError, shell_error::{self, io::IoError}, }; use serde::Deserialize; use crate::{Encoder, PluginEncoder}; /// A `PluginEncoder` that enables the plugin to communicate with Nushell with MsgPack /// serialized d...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-plugin-core/src/serializers/tests.rs
crates/nu-plugin-core/src/serializers/tests.rs
macro_rules! generate_tests { ($encoder:expr) => { use nu_plugin_protocol::{ CallInfo, CustomValueOp, EvaluatedCall, PipelineDataHeader, PluginCall, PluginCallResponse, PluginCustomValue, PluginInput, PluginOption, PluginOutput, StreamData, }; use nu_proto...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-plugin-core/src/serializers/json.rs
crates/nu-plugin-core/src/serializers/json.rs
use nu_plugin_protocol::{PluginInput, PluginOutput}; use nu_protocol::{ ShellError, location, shell_error::{self, io::IoError}, }; use serde::Deserialize; use crate::{Encoder, PluginEncoder}; /// A `PluginEncoder` that enables the plugin to communicate with Nushell with JSON /// serialized data. /// /// Each ...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-plugin-core/src/serializers/mod.rs
crates/nu-plugin-core/src/serializers/mod.rs
use nu_plugin_protocol::{PluginInput, PluginOutput}; use nu_protocol::ShellError; pub mod json; pub mod msgpack; #[cfg(test)] mod tests; /// Encoder for a specific message type. Usually implemented on [`PluginInput`] /// and [`PluginOutput`]. pub trait Encoder<T>: Clone + Send + Sync { /// Serialize a value in t...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-plugin-core/src/interface/tests.rs
crates/nu-plugin-core/src/interface/tests.rs
use super::{ Interface, InterfaceManager, PluginRead, PluginWrite, stream::{StreamManager, StreamManagerHandle}, test_util::TestCase, }; use nu_plugin_protocol::{ ByteStreamInfo, ListStreamInfo, PipelineDataHeader, PluginInput, PluginOutput, StreamData, StreamMessage, }; use nu_protocol::{ ByteS...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-plugin-core/src/interface/test_util.rs
crates/nu-plugin-core/src/interface/test_util.rs
use nu_protocol::ShellError; use std::{ collections::VecDeque, sync::{Arc, Mutex}, }; use crate::{PluginRead, PluginWrite}; const FAILED: &str = "failed to lock TestCase"; /// Mock read/write helper for the engine and plugin interfaces. #[derive(Debug, Clone)] pub struct TestCase<I, O> { r#in: Arc<Mutex<...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-plugin-core/src/interface/mod.rs
crates/nu-plugin-core/src/interface/mod.rs
//! Implements the stream multiplexing interface for both the plugin side and the engine side. use nu_plugin_protocol::{ByteStreamInfo, ListStreamInfo, PipelineDataHeader, StreamMessage}; use nu_protocol::{ ByteStream, ListStream, PipelineData, Reader, ShellError, Signals, engine::Sequence, shell_error::io::Io...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-plugin-core/src/interface/stream/tests.rs
crates/nu-plugin-core/src/interface/stream/tests.rs
use std::{ sync::{ Arc, atomic::{AtomicBool, Ordering::Relaxed}, mpsc, }, time::{Duration, Instant}, }; use super::{StreamManager, StreamReader, StreamWriter, StreamWriterSignal, WriteStreamMessage}; use nu_plugin_protocol::{StreamData, StreamMessage}; use nu_protocol::{ShellError, ...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-plugin-core/src/interface/stream/mod.rs
crates/nu-plugin-core/src/interface/stream/mod.rs
use nu_plugin_protocol::{StreamData, StreamId, StreamMessage}; use nu_protocol::{ShellError, Span, Value}; use std::{ collections::{BTreeMap, btree_map}, iter::FusedIterator, marker::PhantomData, sync::{Arc, Condvar, Mutex, MutexGuard, Weak, mpsc}, }; #[cfg(test)] mod tests; /// Receives messages from...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-plugin-core/src/communication_mode/mod.rs
crates/nu-plugin-core/src/communication_mode/mod.rs
use std::ffi::OsStr; use std::io::{Stdin, Stdout}; use std::process::{Child, ChildStdin, ChildStdout, Command, Stdio}; use nu_protocol::ShellError; #[cfg(feature = "local-socket")] // unused without that feature use nu_protocol::shell_error::io::IoError; #[cfg(feature = "local-socket")] mod local_socket; #[cfg(featu...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-plugin-core/src/communication_mode/local_socket/tests.rs
crates/nu-plugin-core/src/communication_mode/local_socket/tests.rs
use super::make_local_socket_name; #[test] fn local_socket_path_contains_pid() { let name = make_local_socket_name("test-string") .to_string_lossy() .into_owned(); println!("{name}"); assert!(name.to_string().contains(&std::process::id().to_string())); } #[test] fn local_socket_path_contai...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-plugin-core/src/communication_mode/local_socket/mod.rs
crates/nu-plugin-core/src/communication_mode/local_socket/mod.rs
use std::ffi::{OsStr, OsString}; #[cfg(test)] pub(crate) mod tests; /// Generate a name to be used for a local socket specific to this `nu` process, described by the /// given `unique_id`, which should be unique to the purpose of the socket. /// /// On Unix, this is a path, which should generally be 100 characters or...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_formats/src/lib.rs
crates/nu_plugin_formats/src/lib.rs
mod from; mod to; use nu_plugin::{Plugin, PluginCommand}; use from::eml::FromEml; use from::ics::FromIcs; use from::ini::FromIni; use from::plist::FromPlist; use from::vcf::FromVcf; use to::plist::IntoPlist; pub struct FormatCmdsPlugin; impl Plugin for FormatCmdsPlugin { fn version(&self) -> String { en...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_formats/src/main.rs
crates/nu_plugin_formats/src/main.rs
use nu_plugin::{MsgPackSerializer, serve_plugin}; use nu_plugin_formats::FormatCmdsPlugin; fn main() { serve_plugin(&FormatCmdsPlugin, MsgPackSerializer {}) }
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_formats/src/from/vcf.rs
crates/nu_plugin_formats/src/from/vcf.rs
use crate::FormatCmdsPlugin; use ical::{parser::vcard::component::*, property::Property}; use indexmap::IndexMap; use nu_plugin::{EngineInterface, EvaluatedCall, SimplePluginCommand}; use nu_protocol::{ Category, Example, LabeledError, ShellError, Signature, Span, Type, Value, record, }; pub struct FromVcf; impl...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_formats/src/from/ics.rs
crates/nu_plugin_formats/src/from/ics.rs
use crate::FormatCmdsPlugin; use ical::{parser::ical::component::*, property::Property}; use indexmap::IndexMap; use nu_plugin::{EngineInterface, EvaluatedCall, SimplePluginCommand}; use nu_protocol::{ Category, Example, LabeledError, ShellError, Signature, Span, Type, Value, record, }; use std::io::BufReader; pu...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_formats/src/from/ini.rs
crates/nu_plugin_formats/src/from/ini.rs
use crate::FormatCmdsPlugin; use nu_plugin::{EngineInterface, EvaluatedCall, SimplePluginCommand}; use nu_protocol::{ Category, Example, LabeledError, Record, ShellError, Signature, Type, Value, record, }; pub struct FromIni; impl SimplePluginCommand for FromIni { type Plugin = FormatCmdsPlugin; fn name...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_formats/src/from/mod.rs
crates/nu_plugin_formats/src/from/mod.rs
pub(crate) mod eml; pub(crate) mod ics; pub(crate) mod ini; pub(crate) mod plist; pub(crate) mod vcf;
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_formats/src/from/plist.rs
crates/nu_plugin_formats/src/from/plist.rs
use std::time::SystemTime; use chrono::{DateTime, FixedOffset, Offset, Utc}; use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand, SimplePluginCommand}; use nu_protocol::{ Category, Example, LabeledError, Record, Signature, Span, Value as NuValue, record, }; use plist::{Date as PlistDate, Dictionary, Valu...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_formats/src/from/eml.rs
crates/nu_plugin_formats/src/from/eml.rs
use crate::FormatCmdsPlugin; use eml_parser::EmlParser; use eml_parser::eml::*; use indexmap::IndexMap; use nu_plugin::{EngineInterface, EvaluatedCall, SimplePluginCommand}; use nu_protocol::{ Category, Example, LabeledError, ShellError, Signature, Span, SyntaxShape, Type, Value, record, }; const DEFAULT_BODY_PREV...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_formats/src/to/mod.rs
crates/nu_plugin_formats/src/to/mod.rs
pub(crate) mod plist;
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_formats/src/to/plist.rs
crates/nu_plugin_formats/src/to/plist.rs
use crate::FormatCmdsPlugin; use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand, SimplePluginCommand}; use nu_protocol::{Category, Example, LabeledError, Record, Signature, Span, Value as NuValue}; use plist::Value as PlistValue; use std::time::SystemTime; pub(crate) struct IntoPlist; impl SimplePluginComm...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/config_files.rs
crates/nu-cli/src/config_files.rs
use crate::util::eval_source; #[cfg(feature = "plugin")] use nu_path::canonicalize_with; #[cfg(feature = "plugin")] use nu_protocol::{ParseError, PluginRegistryFile, Spanned, engine::StateWorkingSet}; use nu_protocol::{ PipelineData, engine::{EngineState, Stack}, report_shell_error, }; #[cfg(feature = "plug...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/prompt_update.rs
crates/nu-cli/src/prompt_update.rs
use crate::NushellPrompt; use log::{trace, warn}; use nu_engine::ClosureEvalOnce; use nu_protocol::{ Config, PipelineData, Value, engine::{EngineState, Stack}, report_shell_error, }; use reedline::Prompt; // Name of environment variable where the prompt could be stored pub(crate) const PROMPT_COMMAND: &str...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/lib.rs
crates/nu-cli/src/lib.rs
#![doc = include_str!("../README.md")] mod commands; mod completions; mod config_files; mod eval_cmds; mod eval_file; mod menus; mod nu_highlight; mod print; mod prompt; mod prompt_update; mod reedline_config; mod repl; mod syntax_highlight; mod util; mod validation; pub use commands::add_cli_context; pub use completi...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/repl.rs
crates/nu-cli/src/repl.rs
use crate::prompt_update::{ POST_EXECUTION_MARKER_PREFIX, POST_EXECUTION_MARKER_SUFFIX, PRE_EXECUTION_MARKER, RESET_APPLICATION_MODE, VSCODE_COMMANDLINE_MARKER_PREFIX, VSCODE_COMMANDLINE_MARKER_SUFFIX, VSCODE_CWD_PROPERTY_MARKER_PREFIX, VSCODE_CWD_PROPERTY_MARKER_SUFFIX, VSCODE_POST_EXECUTION_MARKER_PRE...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
true
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/reedline_config.rs
crates/nu-cli/src/reedline_config.rs
use crate::{NuHelpCompleter, menus::NuMenuCompleter}; use crossterm::event::{KeyCode, KeyModifiers}; use nu_ansi_term::Style; use nu_color_config::{color_record_to_nustyle, lookup_ansi_color_style}; use nu_engine::eval_block; use nu_parser::parse; use nu_protocol::{ Config, EditBindings, FromValue, ParsedKeybinding...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
true
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/validation.rs
crates/nu-cli/src/validation.rs
use nu_parser::parse; use nu_protocol::{ ParseError, engine::{EngineState, StateWorkingSet}, }; use reedline::{ValidationResult, Validator}; use std::sync::Arc; pub struct NuValidator { pub engine_state: Arc<EngineState>, } impl Validator for NuValidator { fn validate(&self, line: &str) -> ValidationR...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/util.rs
crates/nu-cli/src/util.rs
#![allow(clippy::byte_char_slices)] use nu_cmd_base::hook::eval_hook; use nu_engine::{eval_block, eval_block_with_early_return}; use nu_parser::{Token, TokenContents, lex, parse, unescape_unquote_string}; use nu_protocol::{ PipelineData, ShellError, Span, Value, debugger::WithoutDebug, engine::{EngineState...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/prompt.rs
crates/nu-cli/src/prompt.rs
use crate::prompt_update::{ POST_PROMPT_MARKER, PRE_PROMPT_MARKER, VSCODE_POST_PROMPT_MARKER, VSCODE_PRE_PROMPT_MARKER, }; use nu_protocol::engine::{EngineState, Stack}; #[cfg(windows)] use nu_utils::enable_vt_processing; use reedline::{ DefaultPrompt, Prompt, PromptEditMode, PromptHistorySearch, PromptHistoryS...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/nu_highlight.rs
crates/nu-cli/src/nu_highlight.rs
use std::sync::Arc; use nu_engine::command_prelude::*; use reedline::{Highlighter, StyledText}; use crate::syntax_highlight::highlight_syntax; #[derive(Clone)] pub struct NuHighlight; impl Command for NuHighlight { fn name(&self) -> &str { "nu-highlight" } fn signature(&self) -> Signature { ...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/eval_file.rs
crates/nu-cli/src/eval_file.rs
use crate::util::{eval_source, print_pipeline}; use log::{info, trace}; use nu_engine::eval_block; use nu_parser::parse; use nu_path::canonicalize_with; use nu_protocol::{ PipelineData, ShellError, Span, Value, debugger::WithoutDebug, engine::{EngineState, Stack, StateWorkingSet}, report_error::report_c...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/eval_cmds.rs
crates/nu-cli/src/eval_cmds.rs
use log::info; use nu_engine::eval_block; use nu_parser::parse; use nu_protocol::{ PipelineData, ShellError, Spanned, Value, debugger::WithoutDebug, engine::{EngineState, Stack, StateWorkingSet}, process::check_exit_status_future, report_error::report_compile_error, report_parse_error, report_pa...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/syntax_highlight.rs
crates/nu-cli/src/syntax_highlight.rs
use log::trace; use nu_ansi_term::Style; use nu_color_config::{get_matching_brackets_style, get_shape_color}; use nu_engine::env; use nu_parser::{FlatShape, flatten_block, parse}; use nu_protocol::{ Span, ast::{Block, Expr, Expression, PipelineRedirection, RecordItem}, engine::{EngineState, Stack, StateWork...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/print.rs
crates/nu-cli/src/print.rs
use nu_engine::command_prelude::*; use nu_protocol::ByteStreamSource; #[derive(Clone)] pub struct Print; impl Command for Print { fn name(&self) -> &str { "print" } fn signature(&self) -> Signature { Signature::build("print") .input_output_types(vec![ (Type::No...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/commands/keybindings.rs
crates/nu-cli/src/commands/keybindings.rs
use nu_engine::{command_prelude::*, get_full_help}; #[derive(Clone)] pub struct Keybindings; impl Command for Keybindings { fn name(&self) -> &str { "keybindings" } fn signature(&self) -> Signature { Signature::build(self.name()) .category(Category::Platform) .inpu...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/commands/default_context.rs
crates/nu-cli/src/commands/default_context.rs
use crate::commands::*; use nu_protocol::engine::{EngineState, StateWorkingSet}; pub fn add_cli_context(mut engine_state: EngineState) -> EngineState { let delta = { let mut working_set = StateWorkingSet::new(&engine_state); macro_rules! bind_command { ( $( $command:expr ),* $(,)? ) =>...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/commands/keybindings_default.rs
crates/nu-cli/src/commands/keybindings_default.rs
use nu_engine::command_prelude::*; use reedline::get_reedline_default_keybindings; #[derive(Clone)] pub struct KeybindingsDefault; impl Command for KeybindingsDefault { fn name(&self) -> &str { "keybindings default" } fn signature(&self) -> Signature { Signature::build(self.name()) ...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/commands/mod.rs
crates/nu-cli/src/commands/mod.rs
mod commandline; mod default_context; mod history; mod keybindings; mod keybindings_default; mod keybindings_list; mod keybindings_listen; pub use commandline::{Commandline, CommandlineEdit, CommandlineGetCursor, CommandlineSetCursor}; pub use history::*; pub use keybindings::Keybindings; pub use keybindings_default::...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/commands/keybindings_listen.rs
crates/nu-cli/src/commands/keybindings_listen.rs
use crossterm::{ QueueableCommand, event::Event, event::KeyCode, event::KeyEvent, execute, terminal, }; use nu_engine::command_prelude::*; use nu_protocol::{Config, shell_error::io::IoError}; use std::io::{Write, stdout}; #[derive(Clone)] pub struct KeybindingsListen; impl Command for KeybindingsListen { fn n...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/commands/keybindings_list.rs
crates/nu-cli/src/commands/keybindings_list.rs
use nu_engine::command_prelude::*; use reedline::{ get_reedline_edit_commands, get_reedline_keybinding_modifiers, get_reedline_keycodes, get_reedline_prompt_edit_modes, get_reedline_reedline_events, }; #[derive(Clone)] pub struct KeybindingsList; impl Command for KeybindingsList { fn name(&self) -> &str {...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/commands/history/history_import.rs
crates/nu-cli/src/commands/history/history_import.rs
use std::path::{Path, PathBuf}; use nu_engine::command_prelude::*; use nu_protocol::{ HistoryFileFormat, shell_error::{self, io::IoError}, }; use reedline::{ FileBackedHistory, History, HistoryItem, ReedlineError, SearchQuery, SqliteBackedHistory, }; use super::fields; #[derive(Clone)] pub struct Histor...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/commands/history/fields.rs
crates/nu-cli/src/commands/history/fields.rs
// Each const is named after a HistoryItem field, and the value is the field name to be displayed to // the user (or accept during import). pub const COMMAND_LINE: &str = "command"; #[cfg_attr(not(feature = "sqlite"), allow(dead_code))] mod sqlite_only_fields { pub const START_TIMESTAMP: &str = "start_timestamp"; ...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/commands/history/mod.rs
crates/nu-cli/src/commands/history/mod.rs
mod fields; mod history_; pub use history_::History; // if more history formats are added, will need to reconsider this #[cfg(feature = "sqlite")] mod history_import; #[cfg(feature = "sqlite")] mod history_session; #[cfg(feature = "sqlite")] pub use history_import::HistoryImport; #[cfg(feature = "sqlite")] pub use h...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/commands/history/history_.rs
crates/nu-cli/src/commands/history/history_.rs
use nu_engine::command_prelude::*; use nu_protocol::{ HistoryFileFormat, shell_error::{self, io::IoError}, }; use reedline::{FileBackedHistory, History as ReedlineHistory, SearchDirection, SearchQuery}; #[cfg(feature = "sqlite")] use reedline::{HistoryItem, SqliteBackedHistory}; use super::fields; #[derive(Cl...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/commands/history/history_session.rs
crates/nu-cli/src/commands/history/history_session.rs
use nu_engine::command_prelude::*; #[derive(Clone)] pub struct HistorySession; impl Command for HistorySession { fn name(&self) -> &str { "history session" } fn description(&self) -> &str { "Get the command history session." } fn signature(&self) -> nu_protocol::Signature { ...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/commands/commandline/commandline_.rs
crates/nu-cli/src/commands/commandline/commandline_.rs
use nu_engine::command_prelude::*; #[derive(Clone)] pub struct Commandline; impl Command for Commandline { fn name(&self) -> &str { "commandline" } fn signature(&self) -> Signature { Signature::build("commandline") .input_output_types(vec![(Type::Nothing, Type::String)]) ...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/commands/commandline/set_cursor.rs
crates/nu-cli/src/commands/commandline/set_cursor.rs
use nu_engine::command_prelude::*; use unicode_segmentation::UnicodeSegmentation; #[derive(Clone)] pub struct CommandlineSetCursor; impl Command for CommandlineSetCursor { fn name(&self) -> &str { "commandline set-cursor" } fn signature(&self) -> Signature { Signature::build(self.name())...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/commands/commandline/mod.rs
crates/nu-cli/src/commands/commandline/mod.rs
mod commandline_; mod edit; mod get_cursor; mod set_cursor; pub use commandline_::Commandline; pub use edit::CommandlineEdit; pub use get_cursor::CommandlineGetCursor; pub use set_cursor::CommandlineSetCursor;
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/commands/commandline/edit.rs
crates/nu-cli/src/commands/commandline/edit.rs
use nu_engine::command_prelude::*; #[derive(Clone)] pub struct CommandlineEdit; impl Command for CommandlineEdit { fn name(&self) -> &str { "commandline edit" } fn signature(&self) -> Signature { Signature::build(self.name()) .input_output_types(vec![(Type::Nothing, Type::Noth...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/commands/commandline/get_cursor.rs
crates/nu-cli/src/commands/commandline/get_cursor.rs
use nu_engine::command_prelude::*; use unicode_segmentation::UnicodeSegmentation; #[derive(Clone)] pub struct CommandlineGetCursor; impl Command for CommandlineGetCursor { fn name(&self) -> &str { "commandline get-cursor" } fn signature(&self) -> Signature { Signature::build(self.name()) ...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false
nushell/nushell
https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/completions/completion_common.rs
crates/nu-cli/src/completions/completion_common.rs
use super::{MatchAlgorithm, completion_options::NuMatcher}; use crate::completions::CompletionOptions; use nu_ansi_term::Style; use nu_engine::env_to_string; use nu_path::dots::expand_ndots; use nu_path::{expand_to_real_path, home_dir}; use nu_protocol::{ Span, engine::{EngineState, Stack, StateWorkingSet}, }; ...
rust
MIT
6d3cb27fa40b324a1168c577aee7f3532a5e157e
2026-01-04T15:32:17.606688Z
false