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-cli/src/completions/directory_completions.rs | crates/nu-cli/src/completions/directory_completions.rs | use crate::completions::{
Completer, CompletionOptions,
completion_common::{AdjustView, adjust_if_intermediate, complete_item},
};
use nu_protocol::{
Span, SuggestionKind,
engine::{EngineState, Stack, StateWorkingSet},
};
use reedline::Suggestion;
use std::path::Path;
use super::{SemanticSuggestion, co... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/completions/dotnu_completions.rs | crates/nu-cli/src/completions/dotnu_completions.rs | use crate::completions::{
Completer, CompletionOptions, SemanticSuggestion, completion_common::FileSuggestion,
completion_options::NuMatcher,
};
use nu_path::expand_tilde;
use nu_protocol::{
Span, SuggestionKind,
engine::{Stack, StateWorkingSet, VirtualPath},
};
use reedline::Suggestion;
use std::collec... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/completions/base.rs | crates/nu-cli/src/completions/base.rs | use crate::completions::CompletionOptions;
use nu_protocol::{
DynamicSuggestion, Span, SuggestionKind,
engine::{Stack, StateWorkingSet},
};
use reedline::Suggestion;
pub trait Completer {
/// Fetch, filter, and sort completions
#[allow(clippy::too_many_arguments)]
fn fetch(
&mut self,
... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/completions/variable_completions.rs | crates/nu-cli/src/completions/variable_completions.rs | use std::collections::HashMap;
use crate::completions::{Completer, CompletionOptions, SemanticSuggestion};
use nu_protocol::{
ENV_VARIABLE_ID, IN_VARIABLE_ID, NU_VARIABLE_ID, Span, SuggestionKind,
engine::{Stack, StateWorkingSet},
};
use reedline::Suggestion;
use super::completion_options::NuMatcher;
pub str... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/completions/file_completions.rs | crates/nu-cli/src/completions/file_completions.rs | use crate::completions::{
Completer, CompletionOptions,
completion_common::{AdjustView, adjust_if_intermediate, complete_item},
};
use nu_protocol::{
Span, SuggestionKind,
engine::{Stack, StateWorkingSet},
};
use reedline::Suggestion;
use std::path::Path;
use super::SemanticSuggestion;
pub struct File... | 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_options.rs | crates/nu-cli/src/completions/completion_options.rs | use nu_protocol::{CompletionAlgorithm, CompletionSort};
use nu_utils::IgnoreCaseExt;
use nucleo_matcher::{
Config, Matcher, Utf32Str,
pattern::{Atom, AtomKind, CaseMatching, Normalization},
};
use std::{borrow::Cow, fmt::Display};
use unicode_segmentation::UnicodeSegmentation;
use super::SemanticSuggestion;
/... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/completions/flag_completions.rs | crates/nu-cli/src/completions/flag_completions.rs | use crate::completions::{
Completer, CompletionOptions, SemanticSuggestion, completion_options::NuMatcher,
};
use nu_protocol::{
DeclId, Span, SuggestionKind,
engine::{Stack, StateWorkingSet},
};
use reedline::Suggestion;
#[derive(Clone)]
pub struct FlagCompletion {
pub decl_id: DeclId,
}
impl Complet... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/completions/mod.rs | crates/nu-cli/src/completions/mod.rs | mod arg_value_completion;
mod attribute_completions;
mod base;
mod cell_path_completions;
mod command_completions;
mod completer;
mod completion_common;
mod completion_options;
mod custom_completions;
mod directory_completions;
mod dotnu_completions;
mod exportable_completions;
mod file_completions;
mod flag_completion... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/completions/command_completions.rs | crates/nu-cli/src/completions/command_completions.rs | use std::collections::HashSet;
use crate::completions::{Completer, CompletionOptions};
use nu_protocol::{
Category, Span, SuggestionKind,
engine::{CommandType, Stack, StateWorkingSet},
};
use reedline::Suggestion;
use super::{SemanticSuggestion, completion_options::NuMatcher};
// TODO: Add a toggle for quoti... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/completions/attribute_completions.rs | crates/nu-cli/src/completions/attribute_completions.rs | use super::{SemanticSuggestion, completion_options::NuMatcher};
use crate::completions::{Completer, CompletionOptions};
use nu_protocol::{
Span, SuggestionKind,
engine::{Stack, StateWorkingSet},
};
use reedline::Suggestion;
pub struct AttributeCompletion;
pub struct AttributableCompletion;
impl Completer for ... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/completions/cell_path_completions.rs | crates/nu-cli/src/completions/cell_path_completions.rs | use std::borrow::Cow;
use crate::completions::{Completer, CompletionOptions, SemanticSuggestion};
use nu_engine::{column::get_columns, eval_variable};
use nu_protocol::{
ShellError, Span, SuggestionKind, Value,
ast::{Expr, Expression, FullCellPath, PathMember},
engine::{Stack, StateWorkingSet},
eval_co... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/completions/completer.rs | crates/nu-cli/src/completions/completer.rs | use crate::completions::{
ArgValueCompletion, AttributableCompletion, AttributeCompletion, CellPathCompletion,
CommandCompletion, Completer, CompletionOptions, CustomCompletion, FileCompletion,
FlagCompletion, OperatorCompletion, VariableCompletion, base::SemanticSuggestion,
};
use nu_parser::parse;
use nu_... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | true |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/completions/custom_completions.rs | crates/nu-cli/src/completions/custom_completions.rs | use crate::completions::{Completer, CompletionOptions, MatchAlgorithm, SemanticSuggestion};
use nu_color_config::{color_record_to_nustyle, lookup_ansi_color_style};
use nu_engine::{compile, eval_call};
use nu_parser::flatten_expression;
use nu_protocol::{
BlockId, DeclId, GetSpan, IntoSpanned, PipelineData, Record,... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/completions/exportable_completions.rs | crates/nu-cli/src/completions/exportable_completions.rs | use crate::completions::{
Completer, CompletionOptions, SemanticSuggestion, completion_common::surround_remove,
completion_options::NuMatcher,
};
use nu_protocol::{
ModuleId, Span, SuggestionKind,
engine::{Stack, StateWorkingSet},
};
use reedline::Suggestion;
pub struct ExportableCompletion<'a> {
p... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/completions/static_completions.rs | crates/nu-cli/src/completions/static_completions.rs | use crate::completions::{Completer, CompletionOptions, SemanticSuggestion};
use nu_protocol::{
Span, SuggestionKind,
engine::{Stack, StateWorkingSet},
};
use nu_utils::NuCow;
use reedline::Suggestion;
use super::completion_options::NuMatcher;
pub struct StaticCompletion {
options: NuCow<&'static [&'static... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/completions/operator_completions.rs | crates/nu-cli/src/completions/operator_completions.rs | use crate::completions::{
Completer, CompletionOptions, SemanticSuggestion, completion_options::NuMatcher,
};
use nu_protocol::{
ENV_VARIABLE_ID, Span, SuggestionKind, Type, Value,
ast::{self, Comparison, Expr, Expression},
engine::{Stack, StateWorkingSet},
};
use reedline::Suggestion;
use strum::{EnumM... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/completions/arg_value_completion.rs | crates/nu-cli/src/completions/arg_value_completion.rs | use crate::{
FileCompletion, NuCompleter,
completions::{
CommandCompletion, Completer, CompletionOptions, DirectoryCompletion, DotNuCompletion,
ExportableCompletion, SemanticSuggestion, completer::Context,
completion_options::NuMatcher,
},
};
use nu_parser::parse_module_file_or_dir;
... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/menus/help_completions.rs | crates/nu-cli/src/menus/help_completions.rs | use nu_engine::documentation::{FormatterValue, HelpStyle, get_flags_section};
use nu_protocol::{Config, engine::EngineState, levenshtein_distance};
use nu_utils::IgnoreCaseExt;
use reedline::{Completer, Suggestion};
use std::{fmt::Write, sync::Arc};
pub struct NuHelpCompleter {
engine_state: Arc<EngineState>,
... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/menus/mod.rs | crates/nu-cli/src/menus/mod.rs | mod help_completions;
mod menu_completions;
pub use help_completions::NuHelpCompleter;
pub use menu_completions::NuMenuCompleter;
| rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/src/menus/menu_completions.rs | crates/nu-cli/src/menus/menu_completions.rs | use nu_engine::eval_block;
use nu_protocol::{
BlockId, IntoPipelineData, Span, Value,
debugger::WithoutDebug,
engine::{EngineState, Stack},
};
use reedline::{Completer, Suggestion, menu_functions::parse_selection_char};
use std::sync::Arc;
const SELECTION_CHAR: char = '!';
pub struct NuMenuCompleter {
... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/tests/main.rs | crates/nu-cli/tests/main.rs | mod commands;
mod completions;
| rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/tests/commands/history_import.rs | crates/nu-cli/tests/commands/history_import.rs | use nu_protocol::HistoryFileFormat;
use nu_test_support::{Outcome, nu};
use reedline::{
FileBackedHistory, History, HistoryItem, HistoryItemId, ReedlineError, SearchQuery,
SqliteBackedHistory,
};
use rstest::rstest;
use tempfile::TempDir;
struct Test {
cfg_dir: TempDir,
}
impl Test {
fn new(history_fo... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/tests/commands/mod.rs | crates/nu-cli/tests/commands/mod.rs | mod keybindings_list;
mod nu_highlight;
#[cfg(feature = "sqlite")]
mod history_import;
| rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/tests/commands/nu_highlight.rs | crates/nu-cli/tests/commands/nu_highlight.rs | use nu_test_support::nu;
#[test]
fn nu_highlight_not_expr() {
let actual = nu!("'not false' | nu-highlight | ansi strip");
assert_eq!(actual.out, "not false");
}
#[test]
fn nu_highlight_where_row_condition() {
let actual = nu!("'ls | where a b 12345(' | nu-highlight | ansi strip");
assert_eq!(actual.o... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/tests/commands/keybindings_list.rs | crates/nu-cli/tests/commands/keybindings_list.rs | use nu_test_support::nu;
#[test]
fn not_empty() {
let result = nu!("keybindings list | is-not-empty");
assert_eq!(result.out, "true");
}
| rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/tests/completions/mod.rs | crates/nu-cli/tests/completions/mod.rs | pub mod support;
use std::{
fs::{FileType, ReadDir, read_dir},
path::{MAIN_SEPARATOR, PathBuf},
sync::Arc,
};
use nu_cli::NuCompleter;
use nu_engine::eval_block;
use nu_parser::parse;
use nu_path::{AbsolutePathBuf, expand_tilde};
use nu_protocol::{
Config, ParseError, PipelineData, debugger::WithoutDe... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | true |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/tests/completions/support/mod.rs | crates/nu-cli/tests/completions/support/mod.rs | pub mod completions_helpers;
pub use completions_helpers::{
file, folder, match_suggestions, match_suggestions_by_string, merge_input, new_engine,
};
| rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cli/tests/completions/support/completions_helpers.rs | crates/nu-cli/tests/completions/support/completions_helpers.rs | use nu_engine::eval_block;
use nu_parser::parse;
use nu_path::{AbsolutePathBuf, PathBuf};
use nu_protocol::{
DynamicCompletionCallRef, DynamicSuggestion, PipelineData, ShellError, Signature, Span,
SyntaxShape, Value,
debugger::WithoutDebug,
engine::{ArgType, Command, EngineState, Stack, StateWorkingSet}... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_stress_internals/src/main.rs | crates/nu_plugin_stress_internals/src/main.rs | use std::{
error::Error,
ffi::OsStr,
io::{BufRead, BufReader, Write},
};
use interprocess::local_socket::{
self, GenericFilePath, GenericNamespaced, ToFsName, ToNsName, traits::Stream,
};
use serde::Deserialize;
use serde_json::{Value, json};
#[derive(Debug)]
struct Options {
refuse_local_socket: ... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-engine/src/documentation.rs | crates/nu-engine/src/documentation.rs | use crate::eval_call;
use fancy_regex::{Captures, Regex};
use nu_protocol::{
Category, Config, IntoPipelineData, PipelineData, PositionalArg, Signature, Span, SpanId,
Spanned, SyntaxShape, Type, Value,
ast::{Argument, Call, Expr, Expression, RecordItem},
debugger::WithoutDebug,
engine::CommandType,
... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-engine/src/eval_ir.rs | crates/nu-engine/src/eval_ir.rs | use std::{borrow::Cow, fs::File, sync::Arc};
use nu_path::{expand_path, expand_path_with};
#[cfg(feature = "os")]
use nu_protocol::process::check_exit_status_future;
use nu_protocol::{
DeclId, ENV_VARIABLE_ID, Flag, IntoPipelineData, IntoSpanned, ListStream, OutDest,
PipelineData, PipelineExecutionData, Positi... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | true |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-engine/src/lib.rs | crates/nu-engine/src/lib.rs | #![doc = include_str!("../README.md")]
mod call_ext;
mod closure_eval;
pub mod column;
pub mod command_prelude;
mod compile;
pub mod documentation;
pub mod env;
mod eval;
mod eval_helpers;
mod eval_ir;
pub mod exit;
mod glob_from;
pub mod scope;
pub use call_ext::CallExt;
pub use closure_eval::*;
pub use column::get_c... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-engine/src/column.rs | crates/nu-engine/src/column.rs | use nu_protocol::Value;
use std::collections::HashSet;
pub fn get_columns(input: &[Value]) -> Vec<String> {
let mut column_set = HashSet::new();
let mut columns = Vec::new();
for item in input {
let Value::Record { val, .. } = item else {
return vec![];
};
for col in va... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-engine/src/call_ext.rs | crates/nu-engine/src/call_ext.rs | use crate::eval_expression;
use nu_protocol::{
FromValue, ShellError, Span, Value, ast,
debugger::WithoutDebug,
engine::{self, EngineState, Stack, StateWorkingSet},
eval_const::eval_constant,
ir,
};
pub trait CallExt {
/// Check if a boolean flag is set (i.e. `--bool` or `--bool=true`)
fn h... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-engine/src/env.rs | crates/nu-engine/src/env.rs | use crate::ClosureEvalOnce;
use nu_path::canonicalize_with;
use nu_protocol::{
ShellError, Span, Type, Value, VarId,
ast::Expr,
engine::{Call, EngineState, Stack, StateWorkingSet},
shell_error::io::{IoError, IoErrorExt, NotFound},
};
use std::{
collections::HashMap,
path::{Path, PathBuf},
sy... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-engine/src/scope.rs | crates/nu-engine/src/scope.rs | use nu_protocol::{
CommandWideCompleter, DeclId, ModuleId, Signature, Span, Type, Value, VarId,
ast::Expr,
engine::{Command, EngineState, Stack, Visibility},
record,
};
use std::{cmp::Ordering, collections::HashMap};
pub struct ScopeData<'e, 's> {
engine_state: &'e EngineState,
stack: &'s Stack... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-engine/src/closure_eval.rs | crates/nu-engine/src/closure_eval.rs | use crate::{
EvalBlockWithEarlyReturnFn, eval_block_with_early_return, get_eval_block_with_early_return,
};
use nu_protocol::{
IntoPipelineData, PipelineData, ShellError, Value,
ast::Block,
debugger::{WithDebug, WithoutDebug},
engine::{Closure, EngineState, EnvVars, Stack},
};
use std::{
borrow:... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-engine/src/eval_helpers.rs | crates/nu-engine/src/eval_helpers.rs | use crate::{
eval_block, eval_block_with_early_return, eval_expression, eval_expression_with_input,
eval_ir_block, eval_subexpression,
};
use nu_protocol::{
PipelineData, PipelineExecutionData, ShellError, Value,
ast::{Block, Expression},
debugger::{WithDebug, WithoutDebug},
engine::{EngineState... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-engine/src/command_prelude.rs | crates/nu-engine/src/command_prelude.rs | pub use crate::CallExt;
pub use nu_protocol::{
ByteStream, ByteStreamType, Category, Completion, ErrSpan, Example, Flag,
IntoInterruptiblePipelineData, IntoPipelineData, IntoSpanned, IntoValue, PipelineData,
PositionalArg, Record, ShellError, ShellWarning, Signature, Span, Spanned, SyntaxShape, Type,
Va... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-engine/src/eval.rs | crates/nu-engine/src/eval.rs | use crate::eval_ir::eval_ir_block;
#[allow(deprecated)]
use crate::get_full_help;
use nu_protocol::{
BlockId, Config, ENV_VARIABLE_ID, IntoPipelineData, PipelineData, PipelineExecutionData,
ShellError, Span, Value, VarId,
ast::{Assignment, Block, Call, Expr, Expression, ExternalArgument, PathMember},
de... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-engine/src/glob_from.rs | crates/nu-engine/src/glob_from.rs | use nu_glob::MatchOptions;
use nu_path::{canonicalize_with, expand_path_with};
use nu_protocol::{NuGlob, ShellError, Signals, Span, Spanned, shell_error::io::IoError};
use std::{
fs,
path::{Component, Path, PathBuf},
};
/// This function is like `nu_glob::glob` from the `glob` crate, except it is relative to a... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-engine/src/exit.rs | crates/nu-engine/src/exit.rs | use std::sync::atomic::Ordering;
use nu_protocol::engine::EngineState;
/// Exit the process or clean jobs if appropriate.
///
/// Drops `tag` and exits the current process if there are no running jobs, or if `exit_warning_given` is true.
/// When running in an interactive session, warns the user if there
/// were job... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-engine/src/compile/builder.rs | crates/nu-engine/src/compile/builder.rs | use nu_protocol::{
CompileError, IntoSpanned, RegId, Span, Spanned,
ast::Pattern,
ir::{DataSlice, Instruction, IrAstRef, IrBlock, Literal},
};
/// A label identifier. Only exists while building code. Replaced with the actual target.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub(crate) struct LabelId(pub... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-engine/src/compile/call.rs | crates/nu-engine/src/compile/call.rs | use std::sync::Arc;
use nu_protocol::{
IntoSpanned, RegId, Span, Spanned,
ast::{Argument, Call, Expression, ExternalArgument},
engine::{ENV_VARIABLE_ID, IN_VARIABLE_ID, NU_VARIABLE_ID, StateWorkingSet},
ir::{Instruction, IrAstRef, Literal},
};
use super::{BlockBuilder, CompileError, RedirectModes, com... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-engine/src/compile/redirect.rs | crates/nu-engine/src/compile/redirect.rs | use nu_protocol::{
IntoSpanned, OutDest, RegId, Span, Spanned,
ast::{Expression, RedirectionTarget},
engine::StateWorkingSet,
ir::{Instruction, RedirectMode},
};
use super::{BlockBuilder, CompileError, compile_expression};
#[derive(Default, Clone)]
pub(crate) struct RedirectModes {
pub(crate) out:... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-engine/src/compile/keyword.rs | crates/nu-engine/src/compile/keyword.rs | use nu_protocol::{
IntoSpanned, RegId, Type, VarId,
ast::{Block, Call, Expr, Expression},
engine::StateWorkingSet,
ir::Instruction,
};
use super::{BlockBuilder, CompileError, RedirectModes, compile_block, compile_expression};
/// Compile a call to `if` as a branch-if
pub(crate) fn compile_if(
work... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-engine/src/compile/expression.rs | crates/nu-engine/src/compile/expression.rs | use super::{
BlockBuilder, CompileError, RedirectModes, compile_binary_op, compile_block, compile_call,
compile_external_call, compile_load_env,
};
use nu_protocol::{
ENV_VARIABLE_ID, IntoSpanned, RegId, Span, Value,
ast::{CellPath, Expr, Expression, ListItem, RecordItem, ValueWithUnit},
engine::St... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-engine/src/compile/operator.rs | crates/nu-engine/src/compile/operator.rs | use nu_protocol::{
ENV_VARIABLE_ID, IntoSpanned, RegId, Span, Spanned, Value,
ast::{Assignment, Boolean, CellPath, Expr, Expression, Math, Operator, PathMember, Pattern},
engine::StateWorkingSet,
ir::{Instruction, Literal},
};
use nu_utils::IgnoreCaseExt;
use super::{BlockBuilder, CompileError, Redirec... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-engine/src/compile/mod.rs | crates/nu-engine/src/compile/mod.rs | use nu_protocol::{
CompileError, IntoSpanned, RegId, Span,
ast::{Block, Expr, Pipeline, PipelineRedirection, RedirectionSource, RedirectionTarget},
engine::StateWorkingSet,
ir::{Instruction, IrBlock, RedirectMode},
};
mod builder;
mod call;
mod expression;
mod keyword;
mod operator;
mod redirect;
use ... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_example/src/lib.rs | crates/nu_plugin_example/src/lib.rs | use nu_plugin::{Plugin, PluginCommand};
mod commands;
mod example;
pub use commands::*;
pub use example::ExamplePlugin;
impl Plugin for ExamplePlugin {
fn version(&self) -> String {
env!("CARGO_PKG_VERSION").into()
}
fn commands(&self) -> Vec<Box<dyn PluginCommand<Plugin = Self>>> {
// T... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_example/src/example.rs | crates/nu_plugin_example/src/example.rs | use nu_plugin::EvaluatedCall;
use nu_protocol::{LabeledError, Value};
pub struct ExamplePlugin;
impl ExamplePlugin {
pub fn print_values(
&self,
index: u32,
call: &EvaluatedCall,
input: &Value,
) -> Result<(), LabeledError> {
// Note. When debugging your plugin, you may... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_example/src/main.rs | crates/nu_plugin_example/src/main.rs | use nu_plugin::{MsgPackSerializer, serve_plugin};
use nu_plugin_example::ExamplePlugin;
fn main() {
// When defining your plugin, you can select the Serializer that could be
// used to encode and decode the messages. The available options are
// MsgPackSerializer and JsonSerializer. Both are defined in the... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_example/src/commands/config.rs | crates/nu_plugin_example/src/commands/config.rs | use std::path::PathBuf;
use nu_plugin::{EngineInterface, EvaluatedCall, SimplePluginCommand};
use nu_protocol::{Category, FromValue, LabeledError, Signature, Spanned, Type, Value};
use crate::ExamplePlugin;
pub struct Config;
/// Example config struct.
///
/// Using the `FromValue` derive macro, structs can be easi... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_example/src/commands/view_span.rs | crates/nu_plugin_example/src/commands/view_span.rs | use nu_plugin::{EngineInterface, EvaluatedCall, SimplePluginCommand};
use nu_protocol::{Category, Example, LabeledError, Signature, Type, Value};
use crate::ExamplePlugin;
/// `<value> | example view span`
pub struct ViewSpan;
impl SimplePluginCommand for ViewSpan {
type Plugin = ExamplePlugin;
fn name(&sel... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_example/src/commands/one.rs | crates/nu_plugin_example/src/commands/one.rs | use nu_plugin::{EngineInterface, EvaluatedCall, SimplePluginCommand};
use nu_protocol::{Category, Example, LabeledError, Signature, SyntaxShape, Value};
use crate::ExamplePlugin;
pub struct One;
impl SimplePluginCommand for One {
type Plugin = ExamplePlugin;
fn name(&self) -> &str {
"example one"
... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_example/src/commands/for_each.rs | crates/nu_plugin_example/src/commands/for_each.rs | use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand};
use nu_protocol::{Category, Example, LabeledError, PipelineData, Signature, SyntaxShape, Type};
use crate::ExamplePlugin;
/// `<list> | example for-each { |value| ... }`
pub struct ForEach;
impl PluginCommand for ForEach {
type Plugin = ExamplePlugi... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_example/src/commands/collect_bytes.rs | crates/nu_plugin_example/src/commands/collect_bytes.rs | use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand};
use nu_protocol::{
ByteStream, ByteStreamType, Category, Example, LabeledError, PipelineData, Signals, Signature,
Type, Value,
};
use crate::ExamplePlugin;
/// `<list<string>> | example collect-bytes`
pub struct CollectBytes;
impl PluginCommand ... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_example/src/commands/disable_gc.rs | crates/nu_plugin_example/src/commands/disable_gc.rs | use nu_plugin::{EngineInterface, EvaluatedCall, SimplePluginCommand};
use nu_protocol::{Category, LabeledError, Signature, Value};
use crate::ExamplePlugin;
pub struct DisableGc;
impl SimplePluginCommand for DisableGc {
type Plugin = ExamplePlugin;
fn name(&self) -> &str {
"example disable-gc"
}... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_example/src/commands/three.rs | crates/nu_plugin_example/src/commands/three.rs | use nu_plugin::{EngineInterface, EvaluatedCall, SimplePluginCommand};
use nu_protocol::{Category, LabeledError, Signature, SyntaxShape, Value};
use crate::ExamplePlugin;
pub struct Three;
impl SimplePluginCommand for Three {
type Plugin = ExamplePlugin;
fn name(&self) -> &str {
"example three"
}... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_example/src/commands/env.rs | crates/nu_plugin_example/src/commands/env.rs | use nu_plugin::{EngineInterface, EvaluatedCall, SimplePluginCommand};
use nu_protocol::{Category, LabeledError, Signature, SyntaxShape, Type, Value};
use crate::ExamplePlugin;
pub struct Env;
impl SimplePluginCommand for Env {
type Plugin = ExamplePlugin;
fn name(&self) -> &str {
"example env"
}... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_example/src/commands/sum.rs | crates/nu_plugin_example/src/commands/sum.rs | use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand};
use nu_protocol::{Category, Example, LabeledError, PipelineData, Signature, Span, Type, Value};
use crate::ExamplePlugin;
/// `<list> | example sum`
pub struct Sum;
impl PluginCommand for Sum {
type Plugin = ExamplePlugin;
fn name(&self) -> &st... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_example/src/commands/echo.rs | crates/nu_plugin_example/src/commands/echo.rs | use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand};
use nu_protocol::{Category, Example, LabeledError, PipelineData, Signature, Type, Value};
use crate::ExamplePlugin;
/// `<list> | example echo`
pub struct Echo;
impl PluginCommand for Echo {
type Plugin = ExamplePlugin;
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_plugin_example/src/commands/mod.rs | crates/nu_plugin_example/src/commands/mod.rs | // `example` command - just suggests to call --help
mod main;
pub use main::Main;
// Basic demos
mod one;
mod three;
mod two;
pub use one::One;
pub use three::Three;
pub use two::Two;
// Engine interface demos
mod call_decl;
mod config;
mod ctrlc;
mod disable_gc;
mod env;
mod view_span;
pub use call_decl::CallDecl... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_example/src/commands/arg_completion.rs | crates/nu_plugin_example/src/commands/arg_completion.rs | use nu_plugin::{DynamicCompletionCall, EngineInterface, EvaluatedCall, PluginCommand};
use nu_protocol::{
Category, DynamicSuggestion, Example, LabeledError, PipelineData, Signature, Span, SyntaxShape,
engine::ArgType,
};
use std::time::{SystemTime, UNIX_EPOCH};
use crate::ExamplePlugin;
/// `<list> | example... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_example/src/commands/main.rs | crates/nu_plugin_example/src/commands/main.rs | use nu_plugin::{EngineInterface, EvaluatedCall, SimplePluginCommand};
use nu_protocol::{Category, LabeledError, Signature, Value};
use crate::ExamplePlugin;
pub struct Main;
impl SimplePluginCommand for Main {
type Plugin = ExamplePlugin;
fn name(&self) -> &str {
"example"
}
fn description(... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_example/src/commands/call_decl.rs | crates/nu_plugin_example/src/commands/call_decl.rs | use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand};
use nu_protocol::{
IntoSpanned, LabeledError, PipelineData, Record, Signature, Spanned, SyntaxShape, Value,
};
use crate::ExamplePlugin;
pub struct CallDecl;
impl PluginCommand for CallDecl {
type Plugin = ExamplePlugin;
fn name(&self) -> &... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_example/src/commands/seq.rs | crates/nu_plugin_example/src/commands/seq.rs | use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand};
use nu_protocol::{
Category, Example, LabeledError, ListStream, PipelineData, Signals, Signature, SyntaxShape,
Type, Value,
};
use crate::ExamplePlugin;
/// `example seq <first> <last>`
pub struct Seq;
impl PluginCommand for Seq {
type Plugi... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_example/src/commands/ctrlc.rs | crates/nu_plugin_example/src/commands/ctrlc.rs | use std::sync::mpsc;
use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand};
use nu_protocol::{Category, LabeledError, PipelineData, Signature};
use crate::ExamplePlugin;
/// `example ctrlc`
pub struct Ctrlc;
impl PluginCommand for Ctrlc {
type Plugin = ExamplePlugin;
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_plugin_example/src/commands/two.rs | crates/nu_plugin_example/src/commands/two.rs | use nu_plugin::{EngineInterface, EvaluatedCall, SimplePluginCommand};
use nu_protocol::{Category, IntoValue, LabeledError, Signature, SyntaxShape, Value};
use crate::ExamplePlugin;
pub struct Two;
impl SimplePluginCommand for Two {
type Plugin = ExamplePlugin;
fn name(&self) -> &str {
"example two"
... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_example/src/commands/generate.rs | crates/nu_plugin_example/src/commands/generate.rs | use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand};
use nu_protocol::{
Category, Example, IntoInterruptiblePipelineData, LabeledError, PipelineData, Signals,
Signature, SyntaxShape, Type, Value,
};
use crate::ExamplePlugin;
/// `example generate <initial> { |previous| {out: ..., next: ...} }`
pub ... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/build.rs | crates/nu-cmd-lang/build.rs | use std::process::Command;
fn main() {
// Look up the current Git commit ourselves instead of relying on shadow_rs,
// because shadow_rs does it in a really slow-to-compile way (it builds libgit2)
// Allow overriding it with `NU_COMMIT_HASH` from outside, such as with nix.
let hash = get_git_hash().unw... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/lib.rs | crates/nu-cmd-lang/src/lib.rs | #![cfg_attr(not(feature = "os"), allow(unused))]
#![doc = include_str!("../README.md")]
mod core_commands;
mod default_context;
pub mod example_support;
mod example_test;
#[cfg(test)]
mod parse_const_test;
pub use core_commands::*;
pub use default_context::*;
pub use example_support::*;
#[cfg(test)]
pub use example_te... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/parse_const_test.rs | crates/nu-cmd-lang/src/parse_const_test.rs | use nu_protocol::{Span, engine::StateWorkingSet};
use quickcheck_macros::quickcheck;
#[quickcheck]
fn quickcheck_parse(data: String) -> bool {
let (tokens, err) = nu_parser::lex(data.as_bytes(), 0, b"", b"", true);
if err.is_none() {
let context = crate::create_default_context();
{
... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/default_context.rs | crates/nu-cmd-lang/src/default_context.rs | use crate::*;
use nu_protocol::engine::{EngineState, StateWorkingSet};
pub fn create_default_context() -> EngineState {
let engine_state = EngineState::new();
add_default_context(engine_state)
}
pub fn add_default_context(mut engine_state: EngineState) -> EngineState {
let delta = {
let mut workin... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/example_support.rs | crates/nu-cmd-lang/src/example_support.rs | use itertools::Itertools;
use nu_engine::{command_prelude::*, compile};
use nu_protocol::{
Range, ast::Block, debugger::WithoutDebug, engine::StateWorkingSet, report_shell_error,
};
use std::{
sync::Arc,
{collections::HashSet, ops::Bound},
};
pub fn check_example_input_and_output_types_match_command_signat... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/example_test.rs | crates/nu-cmd-lang/src/example_test.rs | #[cfg(test)]
use nu_protocol::engine::Command;
#[cfg(test)]
pub fn test_examples(cmd: impl Command + 'static) {
test_examples::test_examples(cmd);
}
#[cfg(test)]
mod test_examples {
use crate::example_support::{
check_all_signature_input_output_types_entries_have_examples,
check_example_evalua... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/core_commands/ignore.rs | crates/nu-cmd-lang/src/core_commands/ignore.rs | use nu_engine::command_prelude::*;
use nu_protocol::{ByteStreamSource, OutDest, engine::StateWorkingSet};
#[derive(Clone)]
pub struct Ignore;
impl Command for Ignore {
fn name(&self) -> &str {
"ignore"
}
fn description(&self) -> &str {
"Ignore the output of the previous command in the pip... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/core_commands/break_.rs | crates/nu-cmd-lang/src/core_commands/break_.rs | use nu_engine::command_prelude::*;
use nu_protocol::engine::CommandType;
#[derive(Clone)]
pub struct Break;
impl Command for Break {
fn name(&self) -> &str {
"break"
}
fn description(&self) -> &str {
"Break a loop."
}
fn signature(&self) -> nu_protocol::Signature {
Signat... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/core_commands/if_.rs | crates/nu-cmd-lang/src/core_commands/if_.rs | use nu_engine::command_prelude::*;
use nu_protocol::{
engine::{CommandType, StateWorkingSet},
eval_const::{eval_const_subexpression, eval_constant, eval_constant_with_input},
};
#[derive(Clone)]
pub struct If;
impl Command for If {
fn name(&self) -> &str {
"if"
}
fn description(&self) -> ... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/core_commands/use_.rs | crates/nu-cmd-lang/src/core_commands/use_.rs | use nu_engine::{
command_prelude::*, find_in_dirs_env, get_dirs_var_from_call, get_eval_block, redirect_env,
};
use nu_protocol::{
ast::{Expr, Expression},
engine::CommandType,
};
#[derive(Clone)]
pub struct Use;
impl Command for Use {
fn name(&self) -> &str {
"use"
}
fn description(&... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/core_commands/match_.rs | crates/nu-cmd-lang/src/core_commands/match_.rs | use nu_engine::command_prelude::*;
use nu_protocol::engine::CommandType;
#[derive(Clone)]
pub struct Match;
impl Command for Match {
fn name(&self) -> &str {
"match"
}
fn description(&self) -> &str {
"Conditionally run a block on a matched value."
}
fn signature(&self) -> nu_prot... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/core_commands/extern_.rs | crates/nu-cmd-lang/src/core_commands/extern_.rs | use nu_engine::command_prelude::*;
use nu_protocol::engine::CommandType;
#[derive(Clone)]
pub struct Extern;
impl Command for Extern {
fn name(&self) -> &str {
"extern"
}
fn description(&self) -> &str {
"Define a signature for an external command."
}
fn signature(&self) -> nu_pro... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/core_commands/export_def.rs | crates/nu-cmd-lang/src/core_commands/export_def.rs | use nu_engine::command_prelude::*;
use nu_protocol::engine::CommandType;
#[derive(Clone)]
pub struct ExportDef;
impl Command for ExportDef {
fn name(&self) -> &str {
"export def"
}
fn description(&self) -> &str {
"Define a custom command and export it from a module."
}
fn signatu... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/core_commands/export_module.rs | crates/nu-cmd-lang/src/core_commands/export_module.rs | use nu_engine::command_prelude::*;
use nu_protocol::engine::CommandType;
#[derive(Clone)]
pub struct ExportModule;
impl Command for ExportModule {
fn name(&self) -> &str {
"export module"
}
fn description(&self) -> &str {
"Export a custom module from a module."
}
fn signature(&se... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/core_commands/export_const.rs | crates/nu-cmd-lang/src/core_commands/export_const.rs | use nu_engine::command_prelude::*;
use nu_protocol::engine::CommandType;
#[derive(Clone)]
pub struct ExportConst;
impl Command for ExportConst {
fn name(&self) -> &str {
"export const"
}
fn description(&self) -> &str {
"Use parse-time constant from a module and export them from this modul... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/core_commands/hide_env.rs | crates/nu-cmd-lang/src/core_commands/hide_env.rs | use nu_engine::command_prelude::*;
use nu_protocol::did_you_mean;
#[derive(Clone)]
pub struct HideEnv;
impl Command for HideEnv {
fn name(&self) -> &str {
"hide-env"
}
fn signature(&self) -> nu_protocol::Signature {
Signature::build("hide-env")
.input_output_types(vec![(Type::... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/core_commands/return_.rs | crates/nu-cmd-lang/src/core_commands/return_.rs | use nu_engine::command_prelude::*;
use nu_protocol::engine::CommandType;
#[derive(Clone)]
pub struct Return;
impl Command for Return {
fn name(&self) -> &str {
"return"
}
fn description(&self) -> &str {
"Return early from a custom command."
}
fn signature(&self) -> nu_protocol::S... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/core_commands/version.rs | crates/nu-cmd-lang/src/core_commands/version.rs | use std::{borrow::Cow, sync::OnceLock};
use itertools::Itertools;
use nu_engine::command_prelude::*;
use nu_protocol::engine::StateWorkingSet;
use shadow_rs::shadow;
shadow!(build);
/// Static container for the cargo features used by the `version` command.
///
/// This `OnceLock` holds the features from `nu`.
/// Wh... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/core_commands/mut_.rs | crates/nu-cmd-lang/src/core_commands/mut_.rs | use nu_engine::command_prelude::*;
use nu_protocol::engine::CommandType;
#[derive(Clone)]
pub struct Mut;
impl Command for Mut {
fn name(&self) -> &str {
"mut"
}
fn description(&self) -> &str {
"Create a mutable variable and give it a value."
}
fn signature(&self) -> nu_protocol:... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/core_commands/do_.rs | crates/nu-cmd-lang/src/core_commands/do_.rs | use nu_engine::{command_prelude::*, get_eval_block_with_early_return, redirect_env};
#[cfg(feature = "os")]
use nu_protocol::process::{ChildPipe, ChildProcess};
use nu_protocol::{
ByteStream, ByteStreamSource, OutDest, engine::Closure, shell_error::io::IoError,
};
use std::{
io::{Cursor, Read},
thread,
};
... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/core_commands/collect.rs | crates/nu-cmd-lang/src/core_commands/collect.rs | use nu_engine::{command_prelude::*, get_eval_block, redirect_env};
use nu_protocol::engine::Closure;
#[derive(Clone)]
pub struct Collect;
impl Command for Collect {
fn name(&self) -> &str {
"collect"
}
fn signature(&self) -> Signature {
Signature::build("collect")
.input_outpu... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/core_commands/module.rs | crates/nu-cmd-lang/src/core_commands/module.rs | use nu_engine::command_prelude::*;
use nu_protocol::engine::CommandType;
#[derive(Clone)]
pub struct Module;
impl Command for Module {
fn name(&self) -> &str {
"module"
}
fn description(&self) -> &str {
"Define a custom module."
}
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-cmd-lang/src/core_commands/hide.rs | crates/nu-cmd-lang/src/core_commands/hide.rs | use nu_engine::command_prelude::*;
use nu_protocol::engine::CommandType;
#[derive(Clone)]
pub struct Hide;
impl Command for Hide {
fn name(&self) -> &str {
"hide"
}
fn signature(&self) -> nu_protocol::Signature {
Signature::build("hide")
.input_output_types(vec![(Type::Nothing... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/core_commands/try_.rs | crates/nu-cmd-lang/src/core_commands/try_.rs | use nu_engine::command_prelude::*;
use nu_protocol::engine::CommandType;
#[derive(Clone)]
pub struct Try;
impl Command for Try {
fn name(&self) -> &str {
"try"
}
fn description(&self) -> &str {
"Try to run a block, if it fails optionally run a catch closure."
}
fn signature(&self... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/core_commands/export_alias.rs | crates/nu-cmd-lang/src/core_commands/export_alias.rs | use nu_engine::command_prelude::*;
use nu_protocol::engine::CommandType;
#[derive(Clone)]
pub struct ExportAlias;
impl Command for ExportAlias {
fn name(&self) -> &str {
"export alias"
}
fn description(&self) -> &str {
"Alias a command (with optional flags) to a new name and export it fro... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/core_commands/error_make.rs | crates/nu-cmd-lang/src/core_commands/error_make.rs | use nu_engine::command_prelude::*;
use nu_protocol::{ErrorLabel, ErrorSource, FromValue, IntoValue, LabeledError};
#[derive(Clone)]
pub struct ErrorMake;
impl Command for ErrorMake {
fn name(&self) -> &str {
"error make"
}
fn signature(&self) -> Signature {
Signature::build("error make")
... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/core_commands/echo.rs | crates/nu-cmd-lang/src/core_commands/echo.rs | use nu_engine::command_prelude::*;
#[derive(Clone)]
pub struct Echo;
impl Command for Echo {
fn name(&self) -> &str {
"echo"
}
fn description(&self) -> &str {
"Returns its arguments, ignoring the piped-in value."
}
fn signature(&self) -> Signature {
Signature::build("echo... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/core_commands/error.rs | crates/nu-cmd-lang/src/core_commands/error.rs | use nu_engine::{command_prelude::*, get_full_help};
#[derive(Clone)]
pub struct Error;
impl Command for Error {
fn name(&self) -> &str {
"error"
}
fn signature(&self) -> Signature {
Signature::build("error")
.category(Category::Core)
.input_output_types(vec![(Type:... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/core_commands/describe.rs | crates/nu-cmd-lang/src/core_commands/describe.rs | use nu_engine::command_prelude::*;
use nu_protocol::{
BlockId, ByteStreamSource, Category, PipelineMetadata, Signature,
engine::{Closure, StateWorkingSet},
};
use std::any::type_name;
#[derive(Clone)]
pub struct Describe;
impl Command for Describe {
fn name(&self) -> &str {
"describe"
}
fn... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-lang/src/core_commands/let_.rs | crates/nu-cmd-lang/src/core_commands/let_.rs | use nu_engine::command_prelude::*;
use nu_protocol::engine::CommandType;
#[derive(Clone)]
pub struct Let;
impl Command for Let {
fn name(&self) -> &str {
"let"
}
fn description(&self) -> &str {
"Create a variable and give it a value."
}
fn signature(&self) -> nu_protocol::Signatu... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.