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_plugin_polars/src/dataframe/command/data/join.rs | crates/nu_plugin_polars/src/dataframe/command/data/join.rs | use crate::{
PolarsPlugin,
dataframe::values::{Column, NuDataFrame, NuExpression, NuLazyFrame},
values::{CustomValueSupport, PolarsPluginType},
};
use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand};
use nu_protocol::{
Category, Example, LabeledError, PipelineData, ShellError, Signature, Span... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/command/data/alias.rs | crates/nu_plugin_polars/src/dataframe/command/data/alias.rs | use crate::{PolarsPlugin, values::CustomValueSupport};
use crate::values::{NuExpression, PolarsPluginType};
use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand};
use nu_protocol::{
Category, Example, LabeledError, PipelineData, Signature, SyntaxShape, Value, record,
};
#[derive(Clone)]
pub struct ExprA... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/command/data/explode.rs | crates/nu_plugin_polars/src/dataframe/command/data/explode.rs | use std::sync::Arc;
use crate::PolarsPlugin;
use crate::dataframe::values::{Column, NuDataFrame, NuExpression, NuLazyFrame};
use crate::values::{CustomValueSupport, PolarsPluginObject, PolarsPluginType};
use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand};
use nu_protocol::{
Category, Example, LabeledE... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/command/data/cast.rs | crates/nu_plugin_polars/src/dataframe/command/data/cast.rs | use crate::{
PolarsPlugin,
dataframe::values::{NuExpression, NuLazyFrame, str_to_dtype},
values::{CustomValueSupport, PolarsPluginObject, PolarsPluginType, cant_convert_err},
};
use crate::values::NuDataFrame;
use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand};
use nu_protocol::{
Category, ... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/command/data/query_df.rs | crates/nu_plugin_polars/src/dataframe/command/data/query_df.rs | use super::sql_context::SQLContext;
use crate::PolarsPlugin;
use crate::dataframe::values::Column;
use crate::dataframe::values::NuLazyFrame;
use crate::values::CustomValueSupport;
use crate::values::NuDataFrame;
use crate::values::PolarsPluginType;
use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand};
use nu... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/command/data/qcut.rs | crates/nu_plugin_polars/src/dataframe/command/data/qcut.rs | use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand};
use nu_protocol::{Category, Example, PipelineData, ShellError, Signature, SyntaxShape};
use polars::prelude::PlSmallStr;
use crate::{
PolarsPlugin,
values::{CustomValueSupport, NuDataFrame, PolarsPluginType},
};
pub struct QCutSeries;
impl Plugi... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/command/data/cut.rs | crates/nu_plugin_polars/src/dataframe/command/data/cut.rs | use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand};
use nu_protocol::{Category, Example, PipelineData, ShellError, Signature, SyntaxShape};
use polars::prelude::PlSmallStr;
use crate::{
PolarsPlugin,
values::{CustomValueSupport, NuDataFrame, PolarsPluginType},
};
pub struct CutSeries;
impl Plugin... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/command/data/sample.rs | crates/nu_plugin_polars/src/dataframe/command/data/sample.rs | use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand};
use nu_protocol::{
Category, Example, LabeledError, PipelineData, ShellError, Signature, Span, Spanned,
SyntaxShape, Value,
};
use polars::prelude::NamedFrom;
use polars::series::Series;
use crate::{PolarsPlugin, values::CustomValueSupport};
use ... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/command/data/join_where.rs | crates/nu_plugin_polars/src/dataframe/command/data/join_where.rs | use crate::{
PolarsPlugin,
dataframe::values::{Column, NuDataFrame, NuExpression, NuLazyFrame},
values::{CustomValueSupport, PolarsPluginType},
};
use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand};
use nu_protocol::{
Category, Example, LabeledError, PipelineData, Signature, Span, SyntaxShap... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/command/data/with_column.rs | crates/nu_plugin_polars/src/dataframe/command/data/with_column.rs | use crate::values::{Column, NuDataFrame, PolarsPluginType};
use crate::{
PolarsPlugin,
dataframe::values::{NuExpression, NuLazyFrame},
values::{CustomValueSupport, PolarsPluginObject},
};
use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand};
use nu_protocol::{
Category, Example, LabeledError, ... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/command/data/len.rs | crates/nu_plugin_polars/src/dataframe/command/data/len.rs | use crate::{
PolarsPlugin,
values::{Column, CustomValueSupport, NuDataFrame, NuExpression, PolarsPluginType},
};
use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand};
use nu_protocol::{Category, Example, LabeledError, PipelineData, Signature, Span, Type, Value};
#[derive(Clone)]
pub struct ExprLen;
... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/command/data/col.rs | crates/nu_plugin_polars/src/dataframe/command/data/col.rs | use crate::{
PolarsPlugin,
dataframe::values::NuExpression,
values::{Column, CustomValueSupport, NuDataFrame, PolarsPluginType, str_to_dtype},
};
use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand};
use nu_protocol::{
Category, Example, LabeledError, PipelineData, ShellError, Signature, Span,... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/command/data/get.rs | crates/nu_plugin_polars/src/dataframe/command/data/get.rs | use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand};
use nu_protocol::{
Category, Example, LabeledError, PipelineData, ShellError, Signature, Span, SyntaxShape, Value,
};
use crate::{
PolarsPlugin, dataframe::values::utils::convert_columns_string, values::CustomValueSupport,
};
use crate::values::{... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/values/file_type.rs | crates/nu_plugin_polars/src/dataframe/values/file_type.rs | use nu_protocol::{ShellError, Span};
#[derive(Debug, Clone, PartialEq)]
pub enum PolarsFileType {
Csv,
Tsv,
Parquet,
Arrow,
Json,
Avro,
NdJson,
Unknown,
}
impl PolarsFileType {
pub fn build_unsupported_error(
extension: &str,
supported_types: &[PolarsFileType],
... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/values/utils.rs | crates/nu_plugin_polars/src/dataframe/values/utils.rs | use nu_protocol::{ShellError, Span, Spanned, Value};
// Default value used when selecting rows from dataframe
pub const DEFAULT_ROWS: usize = 5;
// Converts a Vec<Value> to a Vec<Spanned<String>> with a Span marking the whole
// location of the columns for error referencing
pub(crate) fn convert_columns(
columns:... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/values/mod.rs | crates/nu_plugin_polars/src/dataframe/values/mod.rs | mod file_type;
mod nu_dataframe;
mod nu_dtype;
mod nu_expression;
mod nu_lazyframe;
mod nu_lazygroupby;
mod nu_schema;
mod nu_when;
pub mod utils;
use crate::{Cacheable, PolarsPlugin};
use nu_dtype::custom_value::NuDataTypeCustomValue;
use nu_plugin::EngineInterface;
use nu_protocol::{
CustomValue, PipelineData, S... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/values/nu_expression/custom_value.rs | crates/nu_plugin_polars/src/dataframe/values/nu_expression/custom_value.rs | use crate::{
Cacheable, PolarsPlugin,
values::{CustomValueSupport, PolarsPluginCustomValue, PolarsPluginType},
};
use std::ops::{Add, Div, Mul, Rem, Sub};
use super::NuExpression;
use nu_plugin::EngineInterface;
use nu_protocol::{
CustomValue, ShellError, Span, Type, Value,
ast::{Boolean, Comparison, M... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/values/nu_expression/mod.rs | crates/nu_plugin_polars/src/dataframe/values/nu_expression/mod.rs | mod custom_value;
use nu_protocol::{ShellError, Span, Value, record};
use polars::{
chunked_array::cast::CastOptions,
prelude::{AggExpr, Expr, Literal, col},
};
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use uuid::Uuid;
use crate::{Cacheable, PolarsPlugin, values::NuDataFrame};
pub use se... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/values/nu_schema/custom_value.rs | crates/nu_plugin_polars/src/dataframe/values/nu_schema/custom_value.rs | use nu_protocol::{CustomValue, ShellError, Span, Value};
use serde::{Deserialize, Serialize};
use uuid::Uuid;
use crate::values::{CustomValueSupport, PolarsPluginCustomValue, PolarsPluginType};
use super::NuSchema;
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct NuSchemaCustomValue {
pub id: Uuid,
... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/values/nu_schema/mod.rs | crates/nu_plugin_polars/src/dataframe/values/nu_schema/mod.rs | pub mod custom_value;
use std::sync::Arc;
use custom_value::NuSchemaCustomValue;
use nu_protocol::{ShellError, Span, Value};
use polars::prelude::{DataType, Field, Schema, SchemaExt, SchemaRef};
use uuid::Uuid;
use crate::{Cacheable, PolarsPlugin};
use super::{
CustomValueSupport, NuDataType, PolarsPluginObject... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/values/nu_dtype/custom_value.rs | crates/nu_plugin_polars/src/dataframe/values/nu_dtype/custom_value.rs | use nu_protocol::{CustomValue, ShellError, Span, Value};
use serde::{Deserialize, Serialize};
use uuid::Uuid;
use crate::values::{CustomValueSupport, PolarsPluginCustomValue, PolarsPluginType};
use super::NuDataType;
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct NuDataTypeCustomValue {
pub id: Uuid,... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/values/nu_dtype/mod.rs | crates/nu_plugin_polars/src/dataframe/values/nu_dtype/mod.rs | pub mod custom_value;
use custom_value::NuDataTypeCustomValue;
use nu_protocol::{ShellError, Span, Value, record};
use polars::prelude::{DataType, Field, TimeUnit, UnknownKind};
use polars_compute::decimal::DEC128_MAX_PREC;
use uuid::Uuid;
use crate::{Cacheable, PolarsPlugin, command::datetime::timezone_from_str};
u... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/values/nu_lazyframe/custom_value.rs | crates/nu_plugin_polars/src/dataframe/values/nu_lazyframe/custom_value.rs | use std::cmp::Ordering;
use nu_plugin::EngineInterface;
use nu_protocol::{CustomValue, ShellError, Span, Value};
use polars::prelude::{col, nth};
use serde::{Deserialize, Serialize};
use uuid::Uuid;
use crate::{
Cacheable, PolarsPlugin,
values::{
CustomValueSupport, NuDataFrame, NuExpression, PolarsPl... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/values/nu_lazyframe/mod.rs | crates/nu_plugin_polars/src/dataframe/values/nu_lazyframe/mod.rs | mod custom_value;
use crate::{Cacheable, PolarsPlugin};
use super::{
CustomValueSupport, NuDataFrame, NuExpression, NuSchema, PolarsPluginObject, PolarsPluginType,
cant_convert_err,
};
use core::fmt;
use nu_protocol::{PipelineData, ShellError, Span, Value, record};
use polars::prelude::{Expr, IntoLazy, LazyFr... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/between_values.rs | crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/between_values.rs | use super::{NuDataFrame, operations::Axis};
use nu_protocol::{
ShellError, Span, Spanned, Value,
ast::{Boolean, Comparison, Math, Operator},
};
use num::Zero;
use polars::prelude::{
BooleanType, ChunkCompareEq, ChunkCompareIneq, ChunkedArray, DataType, Float64Type, Int64Type,
IntoSeries, NumOpsDispatchC... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | true |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/custom_value.rs | crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/custom_value.rs | use std::cmp::Ordering;
use nu_plugin::EngineInterface;
use nu_protocol::{CustomValue, ShellError, Span, Spanned, Value};
use serde::{Deserialize, Serialize};
use uuid::Uuid;
use crate::{
Cacheable, PolarsPlugin,
values::{CustomValueSupport, PolarsPluginCustomValue, PolarsPluginType},
};
use super::NuDataFra... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/conversion.rs | crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/conversion.rs | use std::collections::HashMap;
use std::ops::{Deref, DerefMut};
use std::sync::Arc;
use chrono::{DateTime, Duration, FixedOffset, NaiveDate, NaiveDateTime, NaiveTime, TimeZone, Utc};
use chrono_tz::Tz;
use indexmap::map::{Entry, IndexMap};
use polars::chunked_array::ChunkedArray;
use polars::chunked_array::builder::An... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | true |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/operations.rs | crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/operations.rs | use nu_protocol::{ShellError, Span, Spanned, Value, ast::Operator};
use polars::prelude::{Column as PolarsColumn, DataFrame};
use crate::PolarsPlugin;
use crate::values::CustomValueSupport;
use super::between_values::{
between_dataframes, compute_between_series, compute_series_single_value,
};
use super::NuDataF... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/mod.rs | crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/mod.rs | mod between_values;
mod conversion;
mod custom_value;
mod operations;
pub use conversion::{Column, ColumnMap};
pub use operations::Axis;
use indexmap::map::IndexMap;
use nu_protocol::{PipelineData, Record, ShellError, Span, Value, did_you_mean};
use polars::prelude::{
Column as PolarsColumn, DataFrame, DataType, ... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/values/nu_when/custom_value.rs | crates/nu_plugin_polars/src/dataframe/values/nu_when/custom_value.rs | use crate::values::{CustomValueSupport, PolarsPluginCustomValue, PolarsPluginType};
use super::NuWhen;
use nu_protocol::{CustomValue, ShellError, Span, Value};
use serde::{Deserialize, Serialize};
use uuid::Uuid;
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct NuWhenCustomValue {
pub id: uuid::Uuid,
... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/values/nu_when/mod.rs | crates/nu_plugin_polars/src/dataframe/values/nu_when/mod.rs | mod custom_value;
use core::fmt;
use nu_protocol::{ShellError, Span, Value};
use polars::prelude::{ChainedThen, Then};
use serde::{Serialize, Serializer};
use uuid::Uuid;
use crate::Cacheable;
pub use self::custom_value::NuWhenCustomValue;
use super::{CustomValueSupport, PolarsPluginObject, PolarsPluginType};
#[de... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/values/nu_lazygroupby/custom_value.rs | crates/nu_plugin_polars/src/dataframe/values/nu_lazygroupby/custom_value.rs | use crate::values::{CustomValueSupport, PolarsPluginCustomValue, PolarsPluginType};
use super::NuLazyGroupBy;
use nu_protocol::{CustomValue, ShellError, Span, Value};
use serde::{Deserialize, Serialize};
use uuid::Uuid;
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct NuLazyGroupByCustomValue {
pub id: ... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/dataframe/values/nu_lazygroupby/mod.rs | crates/nu_plugin_polars/src/dataframe/values/nu_lazygroupby/mod.rs | mod custom_value;
use core::fmt;
use nu_protocol::{ShellError, Span, Value, record};
use polars::prelude::LazyGroupBy;
use std::sync::Arc;
use uuid::Uuid;
use crate::Cacheable;
pub use self::custom_value::NuLazyGroupByCustomValue;
use super::{CustomValueSupport, NuSchema, PolarsPluginObject, PolarsPluginType};
// ... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/cloud/gcp.rs | crates/nu_plugin_polars/src/cloud/gcp.rs | use object_store::gcp::GoogleCloudStorageBuilder;
use polars_io::cloud::{CloudOptions, GoogleConfigKey};
struct GoogleOptionsBuilder {
builder: GoogleCloudStorageBuilder,
}
impl GoogleOptionsBuilder {
fn new() -> Self {
Self {
builder: GoogleCloudStorageBuilder::new(),
}
}
... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/cloud/aws.rs | crates/nu_plugin_polars/src/cloud/aws.rs | use std::error::Error;
use aws_config::{BehaviorVersion, SdkConfig};
use aws_credential_types::{Credentials, provider::ProvideCredentials};
use nu_protocol::ShellError;
use object_store::aws::AmazonS3ConfigKey;
use polars_io::cloud::CloudOptions;
use crate::PolarsPlugin;
async fn load_aws_config() -> SdkConfig {
... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/cloud/azure.rs | crates/nu_plugin_polars/src/cloud/azure.rs | use object_store::azure::MicrosoftAzureBuilder;
use polars_io::cloud::{AzureConfigKey, CloudOptions};
struct AzureOptionsBuilder {
builder: MicrosoftAzureBuilder,
}
impl AzureOptionsBuilder {
fn new() -> Self {
Self {
builder: MicrosoftAzureBuilder::new(),
}
}
fn get_confi... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_polars/src/cloud/mod.rs | crates/nu_plugin_polars/src/cloud/mod.rs | use nu_protocol::ShellError;
use polars::prelude::PlPath;
use polars_io::cloud::{CloudOptions, CloudType};
use crate::PolarsPlugin;
mod aws;
mod azure;
mod gcp;
pub(crate) fn build_cloud_options(
plugin: &PolarsPlugin,
path: &PlPath,
) -> Result<Option<CloudOptions>, ShellError> {
match path
.clo... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/lib.rs | crates/nu-explore/src/lib.rs | #![doc = include_str!("../README.md")]
mod default_context;
mod explore;
mod explore_config;
mod explore_regex;
pub use default_context::add_explore_context;
pub use explore::{Explore, ExploreConfig};
pub use explore_regex::ExploreRegex;
| rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/default_context.rs | crates/nu-explore/src/default_context.rs | use crate::explore::Explore;
use crate::explore_config::ExploreConfigCommand;
use crate::explore_regex::ExploreRegex;
use nu_protocol::engine::{EngineState, StateWorkingSet};
pub fn add_explore_context(mut engine_state: EngineState) -> EngineState {
let delta = {
let mut working_set = StateWorkingSet::new(... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/config.rs | crates/nu-explore/src/explore/config.rs | //! Configuration types for the explore command.
use crate::explore::nu_common::create_map;
use nu_ansi_term::{Color, Style};
use nu_color_config::get_color_map;
use nu_protocol::Config;
#[derive(Debug, Clone)]
pub struct ExploreConfig {
pub table: TableConfig,
pub selected_cell: Style,
pub status_info: S... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/command.rs | crates/nu-explore/src/explore/command.rs | //! The explore command implementation.
use crate::explore::config::ExploreConfig;
use crate::explore::nu_common::create_lscolors;
use crate::explore::pager::PagerConfig;
use crate::explore::run_pager;
use nu_ansi_term::Style;
use nu_color_config::StyleComputer;
use nu_engine::command_prelude::*;
/// A `less` like pr... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/mod.rs | crates/nu-explore/src/explore/mod.rs | //! The explore command module.
//!
//! This module contains the `explore` command implementation and all
//! its supporting infrastructure including views, pager, and internal commands.
mod command;
mod commands;
mod config;
mod nu_common;
mod pager;
mod registry;
mod views;
use anyhow::Result;
pub use command::Expl... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/commands/expand.rs | crates/nu-explore/src/explore/commands/expand.rs | use super::super::{
nu_common::{self, collect_input},
views::{Preview, ViewConfig},
};
use super::ViewCommand;
use anyhow::Result;
use nu_color_config::StyleComputer;
use nu_protocol::{
Value,
engine::{EngineState, Stack},
};
#[derive(Default, Clone)]
pub struct ExpandCmd;
impl ExpandCmd {
pub fn ... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/commands/nu.rs | crates/nu-explore/src/explore/commands/nu.rs | use super::super::{
config::ExploreConfig,
nu_common::{NuText, run_command_with_value},
pager::{
Frame, Transition, ViewInfo,
report::{Report, Severity},
},
views::{Layout, Orientation, Preview, RecordView, View, ViewConfig},
};
use super::ViewCommand;
use anyhow::Result;
use crosste... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/commands/help.rs | crates/nu-explore/src/explore/commands/help.rs | use super::super::views::{Preview, ViewConfig};
use super::ViewCommand;
use anyhow::Result;
use nu_ansi_term::Color;
use nu_protocol::{
Value,
engine::{EngineState, Stack},
};
use std::sync::LazyLock;
#[derive(Debug, Default, Clone)]
pub struct HelpCmd {}
impl HelpCmd {
pub const NAME: &'static str = "he... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/commands/table.rs | crates/nu-explore/src/explore/commands/table.rs | use super::super::{
nu_common::collect_input,
views::{Orientation, RecordView, ViewConfig},
};
use super::ViewCommand;
use anyhow::Result;
use nu_protocol::{
Value,
engine::{EngineState, Stack},
};
#[derive(Debug, Default, Clone)]
pub struct TableCmd {
// todo: add arguments to override config righ... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/commands/quit.rs | crates/nu-explore/src/explore/commands/quit.rs | use super::super::pager::{Pager, Transition};
use super::SimpleCommand;
use anyhow::Result;
use nu_protocol::{
Value,
engine::{EngineState, Stack},
};
#[derive(Default, Clone)]
pub struct QuitCmd;
impl QuitCmd {
pub const NAME: &'static str = "quit";
}
impl SimpleCommand for QuitCmd {
fn name(&self) ... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/commands/mod.rs | crates/nu-explore/src/explore/commands/mod.rs | use super::pager::{Pager, Transition};
use super::views::ViewConfig;
use anyhow::Result;
use nu_protocol::{
Value,
engine::{EngineState, Stack},
};
mod expand;
mod help;
mod nu;
mod quit;
mod table;
mod r#try;
pub use expand::ExpandCmd;
pub use help::HelpCmd;
pub use nu::NuCmd;
pub use quit::QuitCmd;
pub use ... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/commands/try.rs | crates/nu-explore/src/explore/commands/try.rs | use super::super::views::{TryView, ViewConfig};
use super::ViewCommand;
use anyhow::Result;
use nu_protocol::{
Value,
engine::{EngineState, Stack},
};
#[derive(Debug, Default, Clone)]
pub struct TryCmd {
command: String,
}
impl TryCmd {
pub fn new() -> Self {
Self {
command: String... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/views/colored_text_widget.rs | crates/nu-explore/src/explore/views/colored_text_widget.rs | use std::borrow::Cow;
use ansi_str::{AnsiStr, get_blocks};
use nu_table::{string_truncate, string_width};
use ratatui::{
layout::Rect,
style::{Color, Modifier, Style},
widgets::Widget,
};
/// A widget that represents a single line of text with ANSI styles.
pub struct ColoredTextWidget<'a> {
text: &'a ... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/views/util.rs | crates/nu-explore/src/explore/views/util.rs | use super::super::nu_common::{NuColor, NuStyle, NuText, truncate_str};
use nu_color_config::{Alignment, StyleComputer};
use nu_protocol::{ShellError, Value};
use nu_table::{TextStyle, string_width};
use ratatui::{
buffer::Buffer,
style::{Color, Modifier, Style},
text::Span,
};
use std::borrow::Cow;
pub fn ... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/views/mod.rs | crates/nu-explore/src/explore/views/mod.rs | mod binary;
mod colored_text_widget;
mod cursor;
mod preview;
mod record;
mod r#try;
pub mod util;
use super::{
config::ExploreConfig,
nu_common::{NuConfig, NuText},
pager::{Frame, Transition, ViewInfo},
};
use crossterm::event::KeyEvent;
use lscolors::LsColors;
use nu_color_config::StyleComputer;
use nu_p... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/views/try.rs | crates/nu-explore/src/explore/views/try.rs | use super::super::{
config::ExploreConfig,
nu_common::{collect_pipeline, run_command_with_value},
pager::{Frame, Transition, ViewInfo, report::Report},
};
use super::{Layout, Orientation, View, ViewConfig, record::RecordView, util::nu_style_to_tui};
use anyhow::Result;
use crossterm::event::{KeyCode, KeyEve... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/views/preview.rs | crates/nu-explore/src/explore/views/preview.rs | use super::super::{
nu_common::{NuSpan, NuText},
pager::{Frame, StatusTopOrEnd, Transition, ViewInfo, report::Report},
};
use super::{
Layout, View, ViewConfig, colored_text_widget::ColoredTextWidget, cursor::CursorMoveHandler,
cursor::WindowCursor2D,
};
use crossterm::event::KeyEvent;
use nu_color_conf... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/views/cursor/mod.rs | crates/nu-explore/src/explore/views/cursor/mod.rs | mod window_cursor;
mod window_cursor_2d;
use anyhow::{Result, bail};
pub use window_cursor::WindowCursor;
pub use window_cursor_2d::{CursorMoveHandler, Position, WindowCursor2D};
/// A 1-dimensional cursor to track a position from 0 to N
///
/// Say we have a cursor with size=9, at position 3:
/// 0 1 2 3 4 5 6... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/views/cursor/window_cursor.rs | crates/nu-explore/src/explore/views/cursor/window_cursor.rs | use std::cmp::min;
use super::Cursor;
use anyhow::{Ok, Result, bail};
/// WindowCursor provides a mechanism to navigate through a 1-dimensional range
/// using a smaller movable window within the view.
///
/// View: The larger context or total allowable range for navigation.
/// Window: The smaller, focused subset of... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/views/cursor/window_cursor_2d.rs | crates/nu-explore/src/explore/views/cursor/window_cursor_2d.rs | use super::super::super::pager::{StatusTopOrEnd, Transition};
use crossterm::event::{KeyCode, KeyEvent, KeyModifiers};
use super::WindowCursor;
use anyhow::Result;
/// `WindowCursor2D` manages a 2-dimensional "window" onto a grid of cells, with a cursor that can point to a specific cell.
/// For example, consider a 3... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/views/record/table_widget.rs | crates/nu-explore/src/explore/views/record/table_widget.rs | use super::super::super::{
config::TableConfig,
nu_common::{NuStyle, NuText, truncate_str},
};
use super::super::util::{nu_style_to_tui, text_style_to_tui_style};
use super::Layout;
use nu_color_config::{Alignment, StyleComputer, TextStyle};
use nu_protocol::Value;
use nu_table::string_width;
use ratatui::{
... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/views/record/mod.rs | crates/nu-explore/src/explore/views/record/mod.rs | mod table_widget;
use self::table_widget::{TableWidget, TableWidgetState};
use super::super::{
config::ExploreConfig,
nu_common::{NuSpan, NuText, collect_input, lscolorize},
pager::{
Frame, Transition, ViewInfo,
report::{Report, Severity},
},
};
use super::{
ElementInfo, Layout, Vie... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/views/binary/binary_widget.rs | crates/nu-explore/src/explore/views/binary/binary_widget.rs | use nu_color_config::TextStyle;
use nu_pretty_hex::categorize_byte;
use ratatui::{
buffer::Buffer,
layout::Rect,
text::Span,
widgets::{Paragraph, Widget},
};
use super::super::super::nu_common::NuStyle;
use super::super::util::{nu_style_to_tui, text_style_to_tui_style};
/// Padding between segments in... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/views/binary/mod.rs | crates/nu-explore/src/explore/views/binary/mod.rs | // todo: 3 cursor modes one for section
mod binary_widget;
use crossterm::event::KeyEvent;
use nu_protocol::{
Value,
engine::{EngineState, Stack},
};
use ratatui::layout::Rect;
use super::super::{
config::ExploreConfig,
nu_common::NuText,
pager::{
Frame, Transition, ViewInfo,
repo... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/pager/report.rs | crates/nu-explore/src/explore/pager/report.rs | #[derive(Debug, Clone)]
pub struct Report {
pub message: String,
pub level: Severity,
pub context1: String,
pub context2: String,
pub context3: String,
}
impl Report {
pub fn new(message: String, level: Severity, ctx1: String, ctx2: String, ctx3: String) -> Self {
Self {
mes... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/pager/status_bar.rs | crates/nu-explore/src/explore/pager/status_bar.rs | use ratatui::{
buffer::Buffer,
layout::Rect,
style::{Modifier, Style},
widgets::{Block, Widget},
};
use super::super::{
nu_common::{NuStyle, string_width},
views::util::{nu_style_to_tui, set_span},
};
pub struct StatusBar {
text: (String, Style),
ctx1: (String, Style),
ctx2: (Strin... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/pager/command_bar.rs | crates/nu-explore/src/explore/pager/command_bar.rs | use ratatui::{
buffer::Buffer,
layout::Rect,
style::{Modifier, Style},
widgets::{Block, Widget},
};
use super::super::{
nu_common::{NuStyle, string_width},
views::util::{nu_style_to_tui, set_span},
};
#[derive(Debug)]
pub struct CommandBar<'a> {
text: &'a str,
information: &'a str,
... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/pager/title_bar.rs | crates/nu-explore/src/explore/pager/title_bar.rs | use ratatui::{
buffer::Buffer,
layout::Rect,
style::{Modifier, Style},
widgets::{Block, Widget},
};
use super::super::{
nu_common::{NuStyle, string_width},
views::util::{nu_style_to_tui, set_span},
};
/// A title bar widget displayed at the top of the explore view
pub struct TitleBar {
tit... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/pager/mod.rs | crates/nu-explore/src/explore/pager/mod.rs | mod command_bar;
mod events;
pub mod report;
mod status_bar;
mod title_bar;
use self::{
command_bar::CommandBar,
report::{Report, Severity},
status_bar::StatusBar,
title_bar::TitleBar,
};
use super::{
config::ExploreConfig,
nu_common::{NuColor, NuConfig, NuStyle},
registry::{Command, Comman... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/pager/events.rs | crates/nu-explore/src/explore/pager/events.rs | use std::{
io::Result,
time::{Duration, Instant},
};
use crossterm::event::{Event, KeyEvent, KeyEventKind, poll, read};
pub struct UIEvents {
tick_rate: Duration,
}
pub struct Cfg {
pub tick_rate: Duration,
}
impl Default for Cfg {
fn default() -> Cfg {
Cfg {
tick_rate: Durat... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/nu_common/command.rs | crates/nu-explore/src/explore/nu_common/command.rs | use nu_engine::eval_block;
use nu_parser::parse;
use nu_protocol::{
OutDest, PipelineData, ShellError, Value,
debugger::WithoutDebug,
engine::{EngineState, Redirection, Stack, StateWorkingSet},
};
use std::sync::Arc;
pub fn run_command_with_value(
command: &str,
input: &Value,
engine_state: &En... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/nu_common/string.rs | crates/nu-explore/src/explore/nu_common/string.rs | use nu_table::string_truncate;
pub use nu_table::string_width;
pub fn truncate_str(text: &mut String, width: usize) {
if width == 0 {
text.clear();
} else {
if string_width(text) < width {
return;
}
*text = string_truncate(text, width - 1);
text.push('…');
... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/nu_common/value.rs | crates/nu-explore/src/explore/nu_common/value.rs | use super::NuSpan;
use anyhow::Result;
use nu_engine::get_columns;
use nu_protocol::{ByteStream, ListStream, PipelineData, PipelineMetadata, Value, record};
use std::collections::HashMap;
pub fn collect_pipeline(input: PipelineData) -> Result<(Vec<String>, Vec<Vec<Value>>)> {
match input {
PipelineData::Em... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/nu_common/table.rs | crates/nu-explore/src/explore/nu_common/table.rs | use super::NuConfig;
use nu_color_config::StyleComputer;
use nu_protocol::{Record, Signals, Value};
use nu_table::{
ExpandedTable, TableOpts,
common::{nu_value_to_string, nu_value_to_string_clean},
};
pub fn try_build_table(
value: Value,
signals: &Signals,
config: &NuConfig,
style_computer: St... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/nu_common/lscolor.rs | crates/nu-explore/src/explore/nu_common/lscolor.rs | use std::path::Path;
use super::NuText;
use lscolors::LsColors;
use nu_ansi_term::{Color, Style};
use nu_engine::env_to_string;
use nu_path::{expand_path_with, expand_to_real_path};
use nu_protocol::engine::{EngineState, Stack};
use nu_utils::get_ls_colors;
pub fn create_lscolors(engine_state: &EngineState, stack: &S... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/nu_common/mod.rs | crates/nu-explore/src/explore/nu_common/mod.rs | mod command;
mod lscolor;
mod string;
mod table;
mod value;
use nu_color_config::TextStyle;
use nu_protocol::Value;
pub use nu_ansi_term::{Color as NuColor, Style as NuStyle};
pub use nu_protocol::{Config as NuConfig, Span as NuSpan};
pub type NuText = (String, TextStyle);
pub use command::run_command_with_value;
p... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/registry/command.rs | crates/nu-explore/src/explore/registry/command.rs | use super::super::{
commands::{SimpleCommand, ViewCommand},
views::{View, ViewConfig},
};
use anyhow::Result;
#[derive(Clone)]
pub enum Command {
Reactive(Box<dyn SCommand>),
View {
cmd: Box<dyn VCommand>,
stackable: bool,
},
}
impl Command {
pub fn view<C>(command: C, stackabl... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore/registry/mod.rs | crates/nu-explore/src/explore/registry/mod.rs | mod command;
use super::{
commands::{SimpleCommand, ViewCommand},
views::View,
};
use anyhow::Result;
use std::borrow::Cow;
use std::collections::HashMap;
pub use command::Command;
#[derive(Default, Clone)]
pub struct CommandRegistry {
commands: HashMap<Cow<'static, str>, Command>,
aliases: HashMap<C... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore_regex/app.rs | crates/nu-explore/src/explore_regex/app.rs | //! Application state and logic for the regex explorer.
use crate::explore_regex::colors;
use crate::explore_regex::quick_ref::{QuickRefEntry, get_flattened_entries};
use fancy_regex::Regex;
use ratatui::{
style::Style,
text::{Line, Span, Text},
};
use tui_textarea::{CursorMove, TextArea};
/// Which pane curr... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore_regex/command.rs | crates/nu-explore/src/explore_regex/command.rs | //! The explore regex command implementation.
// Borrowed from the ut project and tweaked. Thanks!
// https://github.com/ksdme/ut
// Below is the ut license:
// MIT License
//
// Copyright (c) 2025 Kilari Teja
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and as... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore_regex/mod.rs | crates/nu-explore/src/explore_regex/mod.rs | //! Explore regex TUI - an interactive regular expression explorer.
//!
//! This module provides the `explore regex` command which launches a TUI
//! for creating and testing regular expressions interactively.
mod app;
mod colors;
mod command;
pub mod quick_ref;
mod ui;
pub use command::ExploreRegex;
| rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore_regex/ui.rs | crates/nu-explore/src/explore_regex/ui.rs | //! UI drawing functions and application loop for the regex explorer.
use crate::explore_regex::app::{App, InputFocus};
use crate::explore_regex::colors::styles;
use crate::explore_regex::quick_ref::QuickRefEntry;
use ratatui::{
Terminal,
backend::CrosstermBackend,
crossterm::event::{self, Event, KeyCode, ... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore_regex/quick_ref.rs | crates/nu-explore/src/explore_regex/quick_ref.rs | //! Quick reference data for the regex explorer.
//!
//! This module provides categorized regex patterns compatible with the
//! fancy-regex crate, similar to regex101.com's quick reference panel.
/// A single quick reference item
#[derive(Clone)]
pub struct QuickRefItem {
/// The pattern syntax to display (e.g., ... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore_regex/colors.rs | crates/nu-explore/src/explore_regex/colors.rs | //! Color scheme and style helpers for the regex explorer UI.
use ratatui::style::{Color, Modifier, Style, Stylize};
// UI colors - using standard ANSI colors that adapt to terminal theme
pub const ACCENT: Color = Color::Cyan;
pub const SUCCESS: Color = Color::Green;
pub const ERROR: Color = Color::Red;
pub const WAR... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore_config/app.rs | crates/nu-explore/src/explore_config/app.rs | //! Application state and drawing logic for the explore config TUI.
use crate::explore_config::syntax_highlight::highlight_nushell_content;
use crate::explore_config::tree::{
build_tree_items, filter_tree_items, get_value_at_path, set_value_at_path,
};
use crate::explore_config::types::{
App, EditorMode, Focus... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore_config/command.rs | crates/nu-explore/src/explore_config/command.rs | //! Command definition for the `explore config` command.
use crate::explore_config::conversion::{
build_nu_type_map, build_original_value_map, json_to_nu_value_with_types, nu_value_to_json,
parse_config_documentation,
};
use crate::explore_config::example_data::get_example_json;
use crate::explore_config::tree... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore_config/tree.rs | crates/nu-explore/src/explore_config/tree.rs | //! Tree building, path operations, and CLI tree printing utilities.
use crate::explore_config::types::{NodeInfo, NuValueType, ValueType};
use serde_json::Value;
use std::collections::HashMap;
use tui_tree_widget::TreeItem;
/// Check if a JSON value is a leaf node (not an object or array)
pub fn is_leaf(value: &Value... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore_config/conversion.rs | crates/nu-explore/src/explore_config/conversion.rs | //! Conversion utilities between Nu values and JSON, and config documentation parsing.
use crate::explore_config::types::NuValueType;
use nu_protocol::ShellError;
use nu_protocol::engine::EngineState;
use nu_utils::ConfigFileKind;
use serde_json::Value;
use std::collections::HashMap;
use std::error::Error;
/// Conver... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore_config/types.rs | crates/nu-explore/src/explore_config/types.rs | //! Type definitions for the explore config TUI application.
use nu_protocol::engine::{EngineState, Stack};
use ratatui::style::Color;
use serde_json::Value;
use std::collections::HashMap;
use std::sync::Arc;
/// Path through the JSON tree represented as a vector of keys/indices
pub type NodePath = Vec<String>;
/// ... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore_config/example_data.rs | crates/nu-explore/src/explore_config/example_data.rs | //! Example JSON data for testing the explore config TUI.
use serde_json::Value;
/// Example JSON data for testing (nushell config)
#[allow(dead_code)]
pub fn get_example_json() -> Value {
let json_str = r##"{
"filesize": {
"unit": "B",
"show_unit": false,
"precision": 2
},
"table": {
"mode"... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore_config/mod.rs | crates/nu-explore/src/explore_config/mod.rs | //! Explore config TUI - an interactive configuration viewer and editor.
//!
//! This module provides the `explore config` command which launches a TUI
//! for viewing and editing nushell configuration interactively.
mod app;
mod command;
mod conversion;
mod example_data;
mod input;
mod syntax_highlight;
mod tree;
mod... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore_config/syntax_highlight.rs | crates/nu-explore/src/explore_config/syntax_highlight.rs | //! Syntax highlighting for nushell code in the explore config TUI.
//!
//! This module provides syntax highlighting functionality that converts nushell code
//! into ANSI-styled text that can be rendered in the TUI.
use nu_ansi_term::Style;
use nu_color_config::get_shape_color;
use nu_parser::{flatten_block, parse};
... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore_config/tui.rs | crates/nu-explore/src/explore_config/tui.rs | //! TUI runtime functions for running the explore config application.
use crate::explore_config::input::{
handle_editor_editing_input, handle_editor_normal_input, handle_search_input, handle_tree_input,
};
use crate::explore_config::types::{App, AppResult, EditorMode, Focus, NuValueType};
use crossterm::event::{
... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-explore/src/explore_config/input.rs | crates/nu-explore/src/explore_config/input.rs | //! Keyboard input handling for the explore config TUI.
use crate::explore_config::types::{
App, AppResult, EditorMode, Focus, ValueType, calculate_cursor_position,
};
use crossterm::event::{KeyCode, KeyModifiers};
/// Handle keyboard input when search mode is active
pub fn handle_search_input(app: &mut App, key:... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-std/src/lib.rs | crates/nu-std/src/lib.rs | #![doc = include_str!("../README.md")]
use log::trace;
use nu_parser::parse;
use nu_protocol::{
VirtualPathId,
engine::{FileStack, StateWorkingSet, VirtualPath},
report_parse_error,
};
use std::path::PathBuf;
fn create_virt_file(working_set: &mut StateWorkingSet, name: &str, content: &str) -> VirtualPathId... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_gstat/src/lib.rs | crates/nu_plugin_gstat/src/lib.rs | mod gstat;
mod nu;
pub use gstat::GStat;
pub use nu::GStatPlugin;
| rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_gstat/src/main.rs | crates/nu_plugin_gstat/src/main.rs | use nu_plugin::{MsgPackSerializer, serve_plugin};
use nu_plugin_gstat::GStatPlugin;
fn main() {
serve_plugin(&GStatPlugin, MsgPackSerializer {})
}
| rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_gstat/src/gstat.rs | crates/nu_plugin_gstat/src/gstat.rs | use git2::{Branch, BranchType, DescribeOptions, Repository};
use nu_protocol::{IntoSpanned, LabeledError, Span, Spanned, Value, record};
use std::{fmt::Write, ops::BitAnd, path::Path};
// git status
// https://github.com/git/git/blob/9875c515535860450bafd1a177f64f0a478900fa/Documentation/git-status.txt
// git status ... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu_plugin_gstat/src/nu/mod.rs | crates/nu_plugin_gstat/src/nu/mod.rs | use crate::GStat;
use nu_plugin::{EngineInterface, EvaluatedCall, Plugin, PluginCommand, SimplePluginCommand};
use nu_protocol::{Category, LabeledError, Signature, Spanned, SyntaxShape, Value};
pub struct GStatPlugin;
impl Plugin for GStatPlugin {
fn version(&self) -> String {
env!("CARGO_PKG_VERSION").in... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-base/src/lib.rs | crates/nu-cmd-base/src/lib.rs | #![doc = include_str!("../README.md")]
pub mod formats;
pub mod hook;
pub mod input_handler;
pub mod util;
mod wrap_call;
pub use wrap_call::*;
| rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-base/src/input_handler.rs | crates/nu-cmd-base/src/input_handler.rs | use nu_protocol::{PipelineData, ShellError, Signals, Span, Value, ast::CellPath};
use std::sync::Arc;
pub trait CmdArgument {
fn take_cell_paths(&mut self) -> Option<Vec<CellPath>>;
}
/// Arguments with only cell_path.
///
/// If commands is going to use `operate` function, and it only required optional cell_path... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-base/src/hook.rs | crates/nu-cmd-base/src/hook.rs | use miette::Result;
use nu_engine::{eval_block, eval_block_with_early_return, redirect_env};
use nu_parser::parse;
use nu_protocol::{
PipelineData, PositionalArg, ShellError, Span, Type, Value, VarId,
debugger::WithoutDebug,
engine::{Closure, EngineState, Stack, StateWorkingSet},
report_error::{report_p... | rust | MIT | 6d3cb27fa40b324a1168c577aee7f3532a5e157e | 2026-01-04T15:32:17.606688Z | false |
nushell/nushell | https://github.com/nushell/nushell/blob/6d3cb27fa40b324a1168c577aee7f3532a5e157e/crates/nu-cmd-base/src/util.rs | crates/nu-cmd-base/src/util.rs | use nu_protocol::{
Range, ShellError, Span, Value,
engine::{EngineState, Stack},
};
use std::ops::Bound;
type MakeRangeError = fn(&str, Span) -> ShellError;
/// Returns a inclusive pair of boundary in given `range`.
pub fn process_range(range: &Range) -> Result<(isize, isize), MakeRangeError> {
match rang... | 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.