From 90b46ce354f90ce7486648cce611e4ff60c68b0a Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Mon, 23 Dec 2024 07:47:52 +0800 Subject: [PATCH] Refresh Nu command docs for v0.101 (#1687) * Refresh Nu command docs for v0.101 * Refresh Nu command docs for v0.101 --------- Co-authored-by: sholderbach --- .../configs/sidebar/command_categories.ts | 1 + commands/categories/deprecated.md | 2 +- commands/docs/alias.md | 2 +- commands/docs/all.md | 2 +- commands/docs/ansi.md | 2 +- commands/docs/ansi_gradient.md | 2 +- commands/docs/ansi_link.md | 2 +- commands/docs/ansi_strip.md | 2 +- commands/docs/any.md | 2 +- commands/docs/append.md | 2 +- commands/docs/ast.md | 67 ++++- commands/docs/banner.md | 2 +- commands/docs/bits.md | 2 +- commands/docs/bits_and.md | 2 +- commands/docs/bits_not.md | 2 +- commands/docs/bits_or.md | 2 +- commands/docs/bits_rol.md | 2 +- commands/docs/bits_ror.md | 2 +- commands/docs/bits_shl.md | 2 +- commands/docs/bits_shr.md | 2 +- commands/docs/bits_xor.md | 2 +- commands/docs/break.md | 2 +- commands/docs/bytes.md | 2 +- commands/docs/bytes_add.md | 2 +- commands/docs/bytes_at.md | 2 +- commands/docs/bytes_build.md | 2 +- commands/docs/bytes_collect.md | 2 +- commands/docs/bytes_ends-with.md | 2 +- commands/docs/bytes_index-of.md | 2 +- commands/docs/bytes_length.md | 2 +- commands/docs/bytes_remove.md | 2 +- commands/docs/bytes_replace.md | 2 +- commands/docs/bytes_reverse.md | 2 +- commands/docs/bytes_starts-with.md | 2 +- commands/docs/cal.md | 2 +- commands/docs/cd.md | 2 +- commands/docs/char.md | 2 +- commands/docs/chunk-by.md | 100 ++++++++ commands/docs/chunks.md | 2 +- commands/docs/clear.md | 2 +- commands/docs/collect.md | 2 +- commands/docs/columns.md | 2 +- commands/docs/commandline.md | 2 +- commands/docs/commandline_edit.md | 2 +- commands/docs/commandline_get-cursor.md | 2 +- commands/docs/commandline_set-cursor.md | 2 +- commands/docs/compact.md | 2 +- commands/docs/complete.md | 2 +- commands/docs/config.md | 13 +- commands/docs/config_env.md | 15 +- commands/docs/config_flatten.md | 34 +++ commands/docs/config_nu.md | 15 +- commands/docs/config_reset.md | 2 +- commands/docs/const.md | 2 +- commands/docs/continue.md | 2 +- commands/docs/cp.md | 2 +- commands/docs/date.md | 2 +- commands/docs/date_format.md | 2 +- commands/docs/date_humanize.md | 2 +- commands/docs/date_list-timezone.md | 2 +- commands/docs/date_now.md | 2 +- commands/docs/date_to-record.md | 8 +- commands/docs/date_to-table.md | 8 +- commands/docs/date_to-timezone.md | 2 +- commands/docs/debug.md | 2 +- commands/docs/debug_info.md | 2 +- commands/docs/debug_profile.md | 67 +++-- commands/docs/decode.md | 2 +- commands/docs/decode_base32.md | 2 +- commands/docs/decode_base32hex.md | 2 +- commands/docs/decode_base64.md | 2 +- commands/docs/decode_hex.md | 2 +- commands/docs/def.md | 2 +- commands/docs/default.md | 2 +- commands/docs/describe.md | 2 +- commands/docs/detect_columns.md | 2 +- commands/docs/do.md | 14 +- commands/docs/drop.md | 2 +- commands/docs/drop_column.md | 2 +- commands/docs/drop_nth.md | 2 +- commands/docs/du.md | 4 +- commands/docs/each.md | 2 +- commands/docs/each_while.md | 2 +- commands/docs/echo.md | 2 +- commands/docs/encode.md | 2 +- commands/docs/encode_base32.md | 2 +- commands/docs/encode_base32hex.md | 2 +- commands/docs/encode_base64.md | 2 +- commands/docs/encode_hex.md | 2 +- commands/docs/enumerate.md | 2 +- commands/docs/error_make.md | 2 +- commands/docs/every.md | 2 +- commands/docs/exec.md | 2 +- commands/docs/exit.md | 2 +- commands/docs/explain.md | 2 +- commands/docs/explore.md | 2 +- commands/docs/export-env.md | 2 +- commands/docs/export.md | 2 +- commands/docs/export_alias.md | 2 +- commands/docs/export_const.md | 2 +- commands/docs/export_def.md | 2 +- commands/docs/export_extern.md | 2 +- commands/docs/export_module.md | 2 +- commands/docs/export_use.md | 2 +- commands/docs/extern.md | 2 +- commands/docs/fill.md | 2 +- commands/docs/filter.md | 2 +- commands/docs/find.md | 2 +- commands/docs/first.md | 2 +- commands/docs/flatten.md | 2 +- commands/docs/fmt.md | 2 +- commands/docs/for.md | 2 +- commands/docs/format.md | 2 +- commands/docs/format_date.md | 2 +- commands/docs/format_duration.md | 2 +- commands/docs/format_filesize.md | 2 +- commands/docs/format_pattern.md | 2 +- commands/docs/from.md | 2 +- commands/docs/from_csv.md | 18 +- commands/docs/from_eml.md | 2 +- commands/docs/from_ics.md | 13 +- commands/docs/from_ini.md | 2 +- commands/docs/from_json.md | 2 +- commands/docs/from_msgpack.md | 2 +- commands/docs/from_msgpackz.md | 2 +- commands/docs/from_nuon.md | 2 +- commands/docs/from_ods.md | 2 +- commands/docs/from_plist.md | 2 +- commands/docs/from_ssv.md | 2 +- commands/docs/from_toml.md | 2 +- commands/docs/from_tsv.md | 15 +- commands/docs/from_url.md | 2 +- commands/docs/from_vcf.md | 2 +- commands/docs/from_xlsx.md | 2 +- commands/docs/from_xml.md | 2 +- commands/docs/from_yaml.md | 2 +- commands/docs/from_yml.md | 2 +- commands/docs/generate.md | 2 +- commands/docs/get.md | 2 +- commands/docs/glob.md | 2 +- commands/docs/grid.md | 2 +- commands/docs/group-by.md | 69 +++++- commands/docs/gstat.md | 2 +- commands/docs/hash.md | 2 +- commands/docs/hash_md5.md | 2 +- commands/docs/hash_sha256.md | 2 +- commands/docs/headers.md | 2 +- commands/docs/help.md | 2 +- commands/docs/help_aliases.md | 2 +- commands/docs/help_commands.md | 2 +- commands/docs/help_escapes.md | 2 +- commands/docs/help_externs.md | 2 +- commands/docs/help_modules.md | 2 +- commands/docs/help_operators.md | 2 +- commands/docs/hide-env.md | 2 +- commands/docs/hide.md | 2 +- commands/docs/histogram.md | 14 +- commands/docs/history.md | 2 +- commands/docs/history_import.md | 2 +- commands/docs/history_session.md | 2 +- commands/docs/http.md | 2 +- commands/docs/http_delete.md | 2 +- commands/docs/http_get.md | 2 +- commands/docs/http_head.md | 2 +- commands/docs/http_options.md | 2 +- commands/docs/http_patch.md | 2 +- commands/docs/http_post.md | 2 +- commands/docs/http_put.md | 2 +- commands/docs/if.md | 2 +- commands/docs/ignore.md | 2 +- commands/docs/inc.md | 2 +- commands/docs/input.md | 9 +- commands/docs/input_list.md | 2 +- commands/docs/input_listen.md | 2 +- commands/docs/insert.md | 2 +- commands/docs/inspect.md | 2 +- commands/docs/interleave.md | 2 +- commands/docs/into.md | 2 +- commands/docs/into_binary.md | 2 +- commands/docs/into_bits.md | 2 +- commands/docs/into_bool.md | 2 +- commands/docs/into_cell-path.md | 2 +- commands/docs/into_datetime.md | 4 +- commands/docs/into_duration.md | 2 +- commands/docs/into_filesize.md | 2 +- commands/docs/into_float.md | 2 +- commands/docs/into_glob.md | 2 +- commands/docs/into_int.md | 2 +- commands/docs/into_record.md | 8 +- commands/docs/into_sqlite.md | 2 +- commands/docs/into_string.md | 2 +- commands/docs/into_value.md | 2 +- commands/docs/is-admin.md | 2 +- commands/docs/is-empty.md | 2 +- commands/docs/is-not-empty.md | 2 +- commands/docs/is-terminal.md | 2 +- commands/docs/items.md | 2 +- commands/docs/join.md | 2 +- commands/docs/keybindings.md | 2 +- commands/docs/keybindings_default.md | 2 +- commands/docs/keybindings_list.md | 2 +- commands/docs/keybindings_listen.md | 2 +- commands/docs/kill.md | 2 +- commands/docs/last.md | 2 +- commands/docs/length.md | 9 +- commands/docs/let-env.md | 2 +- commands/docs/let.md | 2 +- commands/docs/lines.md | 2 +- commands/docs/load-env.md | 2 +- commands/docs/loop.md | 2 +- commands/docs/ls.md | 2 +- commands/docs/match.md | 2 +- commands/docs/math.md | 2 +- commands/docs/math_abs.md | 2 +- commands/docs/math_arccos.md | 2 +- commands/docs/math_arccosh.md | 2 +- commands/docs/math_arcsin.md | 2 +- commands/docs/math_arcsinh.md | 2 +- commands/docs/math_arctan.md | 2 +- commands/docs/math_arctanh.md | 2 +- commands/docs/math_avg.md | 2 +- commands/docs/math_ceil.md | 2 +- commands/docs/math_cos.md | 2 +- commands/docs/math_cosh.md | 2 +- commands/docs/math_exp.md | 2 +- commands/docs/math_floor.md | 2 +- commands/docs/math_ln.md | 2 +- commands/docs/math_log.md | 2 +- commands/docs/math_max.md | 2 +- commands/docs/math_median.md | 2 +- commands/docs/math_min.md | 2 +- commands/docs/math_mode.md | 2 +- commands/docs/math_product.md | 2 +- commands/docs/math_round.md | 2 +- commands/docs/math_sin.md | 2 +- commands/docs/math_sinh.md | 2 +- commands/docs/math_sqrt.md | 2 +- commands/docs/math_stddev.md | 2 +- commands/docs/math_sum.md | 2 +- commands/docs/math_tan.md | 2 +- commands/docs/math_tanh.md | 2 +- commands/docs/math_variance.md | 2 +- commands/docs/merge.md | 10 +- commands/docs/merge_deep.md | 103 ++++++++ commands/docs/metadata.md | 2 +- commands/docs/metadata_access.md | 2 +- commands/docs/metadata_set.md | 2 +- commands/docs/mkdir.md | 2 +- commands/docs/mktemp.md | 2 +- commands/docs/module.md | 2 +- commands/docs/move.md | 2 +- commands/docs/mut.md | 2 +- commands/docs/mv.md | 2 +- commands/docs/nu-check.md | 2 +- commands/docs/nu-highlight.md | 2 +- commands/docs/open.md | 2 +- commands/docs/overlay.md | 2 +- commands/docs/overlay_hide.md | 2 +- commands/docs/overlay_list.md | 2 +- commands/docs/overlay_new.md | 2 +- commands/docs/overlay_use.md | 2 +- commands/docs/panic.md | 2 +- commands/docs/par-each.md | 2 +- commands/docs/parse.md | 2 +- commands/docs/path.md | 25 +- commands/docs/path_basename.md | 2 +- commands/docs/path_dirname.md | 2 +- commands/docs/path_exists.md | 2 +- commands/docs/path_expand.md | 2 +- commands/docs/path_join.md | 2 +- commands/docs/path_parse.md | 2 +- commands/docs/path_relative-to.md | 2 +- commands/docs/path_self.md | 50 ++++ commands/docs/path_split.md | 2 +- commands/docs/path_type.md | 2 +- commands/docs/plugin.md | 2 +- commands/docs/plugin_add.md | 2 +- commands/docs/plugin_list.md | 4 +- commands/docs/plugin_rm.md | 2 +- commands/docs/plugin_stop.md | 2 +- commands/docs/plugin_use.md | 2 +- commands/docs/polars.md | 234 +++++++++--------- commands/docs/polars_agg-groups.md | 4 +- commands/docs/polars_agg.md | 2 +- commands/docs/polars_all-false.md | 2 +- commands/docs/polars_all-true.md | 2 +- commands/docs/polars_append.md | 2 +- commands/docs/polars_arg-max.md | 2 +- commands/docs/polars_arg-min.md | 2 +- commands/docs/polars_arg-sort.md | 2 +- commands/docs/polars_arg-true.md | 2 +- commands/docs/polars_arg-unique.md | 2 +- commands/docs/polars_arg-where.md | 2 +- commands/docs/polars_as-date.md | 2 +- commands/docs/polars_as-datetime.md | 2 +- commands/docs/polars_as.md | 2 +- commands/docs/polars_cache.md | 2 +- commands/docs/polars_cast.md | 2 +- commands/docs/polars_col.md | 2 +- commands/docs/polars_collect.md | 2 +- commands/docs/polars_columns.md | 2 +- commands/docs/polars_concat-str.md | 2 +- commands/docs/polars_concat.md | 2 +- commands/docs/polars_contains.md | 2 +- commands/docs/polars_count-null.md | 2 +- commands/docs/polars_count.md | 2 +- commands/docs/polars_cumulative.md | 2 +- commands/docs/polars_datepart.md | 12 +- commands/docs/polars_decimal.md | 2 +- commands/docs/polars_drop-duplicates.md | 2 +- commands/docs/polars_drop-nulls.md | 2 +- commands/docs/polars_drop.md | 2 +- commands/docs/polars_dummies.md | 2 +- commands/docs/polars_explode.md | 2 +- commands/docs/polars_expr-not.md | 2 +- commands/docs/polars_fetch.md | 2 +- commands/docs/polars_fill-nan.md | 2 +- commands/docs/polars_fill-null.md | 2 +- commands/docs/polars_filter-with.md | 2 +- commands/docs/polars_filter.md | 2 +- commands/docs/polars_first.md | 2 +- commands/docs/polars_flatten.md | 2 +- commands/docs/polars_get-day.md | 2 +- commands/docs/polars_get-hour.md | 2 +- commands/docs/polars_get-minute.md | 2 +- commands/docs/polars_get-month.md | 2 +- commands/docs/polars_get-nanosecond.md | 2 +- commands/docs/polars_get-ordinal.md | 2 +- commands/docs/polars_get-second.md | 2 +- commands/docs/polars_get-week.md | 2 +- commands/docs/polars_get-weekday.md | 2 +- commands/docs/polars_get-year.md | 2 +- commands/docs/polars_get.md | 2 +- commands/docs/polars_group-by.md | 2 +- commands/docs/polars_implode.md | 2 +- commands/docs/polars_integer.md | 2 +- commands/docs/polars_into-df.md | 2 +- commands/docs/polars_into-lazy.md | 2 +- commands/docs/polars_into-nu.md | 2 +- commands/docs/polars_is-duplicated.md | 2 +- commands/docs/polars_is-in.md | 2 +- commands/docs/polars_is-not-null.md | 2 +- commands/docs/polars_is-null.md | 2 +- commands/docs/polars_is-unique.md | 2 +- commands/docs/polars_join.md | 44 +++- commands/docs/polars_last.md | 2 +- commands/docs/polars_len.md | 2 +- commands/docs/polars_lit.md | 2 +- commands/docs/polars_lowercase.md | 2 +- commands/docs/polars_max.md | 2 +- commands/docs/polars_mean.md | 2 +- commands/docs/polars_median.md | 2 +- commands/docs/polars_min.md | 2 +- commands/docs/polars_n-unique.md | 2 +- commands/docs/polars_not.md | 2 +- commands/docs/polars_open.md | 2 +- commands/docs/polars_otherwise.md | 2 +- commands/docs/polars_pivot.md | 2 +- commands/docs/polars_profile.md | 17 +- commands/docs/polars_quantile.md | 2 +- commands/docs/polars_query.md | 2 +- commands/docs/polars_rename.md | 2 +- commands/docs/polars_replace-all.md | 2 +- commands/docs/polars_replace.md | 2 +- commands/docs/polars_reverse.md | 2 +- commands/docs/polars_rolling.md | 2 +- commands/docs/polars_sample.md | 2 +- commands/docs/polars_save.md | 2 +- commands/docs/polars_schema.md | 2 +- commands/docs/polars_select.md | 2 +- commands/docs/polars_set-with-idx.md | 2 +- commands/docs/polars_set.md | 2 +- commands/docs/polars_shape.md | 2 +- commands/docs/polars_shift.md | 2 +- commands/docs/polars_slice.md | 2 +- commands/docs/polars_sort-by.md | 2 +- commands/docs/polars_std.md | 2 +- commands/docs/polars_store-get.md | 2 +- commands/docs/polars_store-ls.md | 2 +- commands/docs/polars_store-rm.md | 2 +- commands/docs/polars_str-join.md | 2 +- commands/docs/polars_str-lengths.md | 2 +- commands/docs/polars_str-slice.md | 2 +- commands/docs/polars_strftime.md | 2 +- commands/docs/polars_sum.md | 2 +- commands/docs/polars_summary.md | 2 +- commands/docs/polars_take.md | 2 +- commands/docs/polars_unique.md | 2 +- commands/docs/polars_unnest.md | 2 +- commands/docs/polars_unpivot.md | 2 +- commands/docs/polars_uppercase.md | 2 +- commands/docs/polars_value-counts.md | 4 +- commands/docs/polars_var.md | 2 +- commands/docs/polars_when.md | 2 +- commands/docs/polars_with-column.md | 4 +- commands/docs/port.md | 2 +- commands/docs/prepend.md | 2 +- commands/docs/print.md | 2 +- commands/docs/ps.md | 2 +- commands/docs/pwd.md | 2 +- commands/docs/query.md | 2 +- commands/docs/query_db.md | 2 +- commands/docs/query_json.md | 2 +- commands/docs/query_web.md | 2 +- commands/docs/query_webpage-info.md | 2 +- commands/docs/query_xml.md | 2 +- commands/docs/random.md | 2 +- commands/docs/random_binary.md | 2 +- commands/docs/random_bool.md | 2 +- commands/docs/random_chars.md | 2 +- commands/docs/random_dice.md | 4 +- commands/docs/random_float.md | 2 +- commands/docs/random_int.md | 2 +- commands/docs/random_uuid.md | 2 +- commands/docs/range.md | 2 +- commands/docs/reduce.md | 12 +- commands/docs/registry_query.md | 2 +- commands/docs/reject.md | 2 +- commands/docs/rename.md | 2 +- commands/docs/return.md | 2 +- commands/docs/reverse.md | 2 +- commands/docs/rm.md | 2 +- commands/docs/roll.md | 2 +- commands/docs/roll_down.md | 2 +- commands/docs/roll_left.md | 2 +- commands/docs/roll_right.md | 2 +- commands/docs/roll_up.md | 2 +- commands/docs/rotate.md | 2 +- commands/docs/run-external.md | 2 +- commands/docs/save.md | 2 +- commands/docs/schema.md | 2 +- commands/docs/scope.md | 2 +- commands/docs/scope_aliases.md | 2 +- commands/docs/scope_commands.md | 2 +- commands/docs/scope_engine-stats.md | 2 +- commands/docs/scope_externs.md | 2 +- commands/docs/scope_modules.md | 2 +- commands/docs/scope_variables.md | 2 +- commands/docs/select.md | 2 +- commands/docs/seq.md | 2 +- commands/docs/seq_char.md | 4 +- commands/docs/seq_date.md | 2 +- commands/docs/shuffle.md | 2 +- commands/docs/skip.md | 2 +- commands/docs/skip_until.md | 2 +- commands/docs/skip_while.md | 2 +- commands/docs/sleep.md | 6 +- commands/docs/sort-by.md | 2 +- commands/docs/sort.md | 2 +- commands/docs/source-env.md | 2 +- commands/docs/source.md | 2 +- commands/docs/split-by.md | 8 +- commands/docs/split.md | 2 +- commands/docs/split_cell-path.md | 2 +- commands/docs/split_chars.md | 2 +- commands/docs/split_column.md | 2 +- commands/docs/split_list.md | 2 +- commands/docs/split_row.md | 2 +- commands/docs/split_words.md | 2 +- commands/docs/start.md | 2 +- commands/docs/stor.md | 2 +- commands/docs/stor_create.md | 2 +- commands/docs/stor_delete.md | 2 +- commands/docs/stor_export.md | 2 +- commands/docs/stor_import.md | 2 +- commands/docs/stor_insert.md | 2 +- commands/docs/stor_open.md | 2 +- commands/docs/stor_reset.md | 2 +- commands/docs/stor_update.md | 2 +- commands/docs/str.md | 2 +- commands/docs/str_camel-case.md | 2 +- commands/docs/str_capitalize.md | 2 +- commands/docs/str_contains.md | 2 +- commands/docs/str_distance.md | 2 +- commands/docs/str_downcase.md | 2 +- commands/docs/str_ends-with.md | 2 +- commands/docs/str_expand.md | 2 +- commands/docs/str_index-of.md | 2 +- commands/docs/str_join.md | 2 +- commands/docs/str_kebab-case.md | 2 +- commands/docs/str_length.md | 2 +- commands/docs/str_pascal-case.md | 2 +- commands/docs/str_replace.md | 2 +- commands/docs/str_reverse.md | 2 +- commands/docs/str_screaming-snake-case.md | 2 +- commands/docs/str_snake-case.md | 2 +- commands/docs/str_starts-with.md | 2 +- commands/docs/str_stats.md | 2 +- commands/docs/str_substring.md | 2 +- commands/docs/str_title-case.md | 2 +- commands/docs/str_trim.md | 2 +- commands/docs/str_upcase.md | 2 +- commands/docs/sys.md | 2 +- commands/docs/sys_cpu.md | 6 +- commands/docs/sys_disks.md | 2 +- commands/docs/sys_host.md | 2 +- commands/docs/sys_mem.md | 2 +- commands/docs/sys_net.md | 2 +- commands/docs/sys_temp.md | 2 +- commands/docs/sys_users.md | 2 +- commands/docs/table.md | 2 +- commands/docs/take.md | 2 +- commands/docs/take_until.md | 2 +- commands/docs/take_while.md | 2 +- commands/docs/tee.md | 2 +- commands/docs/term.md | 36 +++ commands/docs/term_query.md | 73 ++++++ commands/docs/term_size.md | 2 +- commands/docs/timeit.md | 31 ++- commands/docs/to.md | 2 +- commands/docs/to_csv.md | 2 +- commands/docs/to_html.md | 2 +- commands/docs/to_json.md | 2 +- commands/docs/to_md.md | 2 +- commands/docs/to_msgpack.md | 2 +- commands/docs/to_msgpackz.md | 2 +- commands/docs/to_nuon.md | 2 +- commands/docs/to_plist.md | 2 +- commands/docs/to_text.md | 2 +- commands/docs/to_toml.md | 2 +- commands/docs/to_tsv.md | 2 +- commands/docs/to_xml.md | 2 +- commands/docs/to_yaml.md | 2 +- commands/docs/touch.md | 2 +- commands/docs/transpose.md | 2 +- commands/docs/try.md | 2 +- commands/docs/tutor.md | 2 +- commands/docs/ulimit.md | 11 +- commands/docs/uname.md | 2 +- commands/docs/uniq-by.md | 2 +- commands/docs/uniq.md | 2 +- commands/docs/update.md | 2 +- commands/docs/update_cells.md | 22 +- commands/docs/upsert.md | 2 +- commands/docs/url.md | 2 +- commands/docs/url_build-query.md | 2 +- commands/docs/url_decode.md | 2 +- commands/docs/url_encode.md | 2 +- commands/docs/url_join.md | 2 +- commands/docs/url_parse.md | 2 +- commands/docs/url_split-query.md | 2 +- commands/docs/use.md | 2 +- commands/docs/utouch.md | 90 +++++++ commands/docs/values.md | 2 +- commands/docs/version.md | 2 +- commands/docs/view.md | 15 +- commands/docs/view_blocks.md | 37 +++ commands/docs/view_files.md | 2 +- commands/docs/view_ir.md | 2 +- commands/docs/view_source.md | 2 +- commands/docs/view_span.md | 2 +- commands/docs/watch.md | 2 +- commands/docs/where.md | 2 +- commands/docs/which.md | 2 +- commands/docs/while.md | 2 +- commands/docs/whoami.md | 2 +- commands/docs/window.md | 2 +- commands/docs/with-env.md | 2 +- commands/docs/wrap.md | 2 +- commands/docs/zip.md | 2 +- 560 files changed, 1575 insertions(+), 822 deletions(-) create mode 100644 commands/docs/chunk-by.md create mode 100644 commands/docs/config_flatten.md create mode 100644 commands/docs/merge_deep.md create mode 100644 commands/docs/path_self.md create mode 100644 commands/docs/term.md create mode 100644 commands/docs/term_query.md create mode 100644 commands/docs/utouch.md create mode 100644 commands/docs/view_blocks.md diff --git a/.vuepress/configs/sidebar/command_categories.ts b/.vuepress/configs/sidebar/command_categories.ts index b396886c265..53b047a60d4 100644 --- a/.vuepress/configs/sidebar/command_categories.ts +++ b/.vuepress/configs/sidebar/command_categories.ts @@ -10,6 +10,7 @@ export const commandCategories = [ '/commands/categories/date.md', '/commands/categories/debug.md', '/commands/categories/default.md', + '/commands/categories/deprecated.md', '/commands/categories/env.md', '/commands/categories/expression.md', '/commands/categories/filesystem.md', diff --git a/commands/categories/deprecated.md b/commands/categories/deprecated.md index 4b84bb96793..319829d2e33 100644 --- a/commands/categories/deprecated.md +++ b/commands/categories/deprecated.md @@ -20,7 +20,7 @@ Description - {{ command.title }} + {{ command.title }} {{ command.frontmatter.usage }} diff --git a/commands/docs/alias.md b/commands/docs/alias.md index a58b552b7f5..ee85622e5aa 100644 --- a/commands/docs/alias.md +++ b/commands/docs/alias.md @@ -2,7 +2,7 @@ title: alias categories: | core -version: 0.100.0 +version: 0.101.0 core: | Alias a command (with optional flags) to a new name. usage: | diff --git a/commands/docs/all.md b/commands/docs/all.md index 993074a8489..d0ab69f2b9a 100644 --- a/commands/docs/all.md +++ b/commands/docs/all.md @@ -2,7 +2,7 @@ title: all categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Test if every element of the input fulfills a predicate expression. usage: | diff --git a/commands/docs/ansi.md b/commands/docs/ansi.md index 43c0fdc8640..58c2c1ef01b 100644 --- a/commands/docs/ansi.md +++ b/commands/docs/ansi.md @@ -2,7 +2,7 @@ title: ansi categories: | platform -version: 0.100.0 +version: 0.101.0 platform: | Output ANSI codes to change color and style of text. usage: | diff --git a/commands/docs/ansi_gradient.md b/commands/docs/ansi_gradient.md index 2256cb053d8..2093ee2010f 100644 --- a/commands/docs/ansi_gradient.md +++ b/commands/docs/ansi_gradient.md @@ -2,7 +2,7 @@ title: ansi gradient categories: | platform -version: 0.100.0 +version: 0.101.0 platform: | Add a color gradient (using ANSI color codes) to the given string. usage: | diff --git a/commands/docs/ansi_link.md b/commands/docs/ansi_link.md index a95d214f98d..6f7b6e65bfa 100644 --- a/commands/docs/ansi_link.md +++ b/commands/docs/ansi_link.md @@ -2,7 +2,7 @@ title: ansi link categories: | platform -version: 0.100.0 +version: 0.101.0 platform: | Add a link (using OSC 8 escape sequence) to the given string. usage: | diff --git a/commands/docs/ansi_strip.md b/commands/docs/ansi_strip.md index 3b4b9e2690e..b46d68d5006 100644 --- a/commands/docs/ansi_strip.md +++ b/commands/docs/ansi_strip.md @@ -2,7 +2,7 @@ title: ansi strip categories: | platform -version: 0.100.0 +version: 0.101.0 platform: | Strip ANSI escape sequences from a string. usage: | diff --git a/commands/docs/any.md b/commands/docs/any.md index bf1c678d623..c6d1eabbde7 100644 --- a/commands/docs/any.md +++ b/commands/docs/any.md @@ -2,7 +2,7 @@ title: any categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Tests if any element of the input fulfills a predicate expression. usage: | diff --git a/commands/docs/append.md b/commands/docs/append.md index b32c52c6066..bffc303d928 100644 --- a/commands/docs/append.md +++ b/commands/docs/append.md @@ -2,7 +2,7 @@ title: append categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Append any number of rows to a table. usage: | diff --git a/commands/docs/ast.md b/commands/docs/ast.md index 40af81cc5a7..e9fb5be7c8f 100644 --- a/commands/docs/ast.md +++ b/commands/docs/ast.md @@ -2,7 +2,7 @@ title: ast categories: | debug -version: 0.100.0 +version: 0.101.0 debug: | Print the abstract syntax tree (ast) for a pipeline. usage: | @@ -20,8 +20,9 @@ usage: | ## Flags - - `--json, -j`: serialize to json - - `--minify, -m`: minify the nuon or json output + - `--json, -j`: Serialize to json + - `--minify, -m`: Minify the nuon or json output + - `--flatten, -f`: An easier to read version of the ast ## Parameters @@ -30,9 +31,9 @@ usage: | ## Input/output types: -| input | output | -| ------ | ------ | -| string | record | +| input | output | +| ------- | ------ | +| nothing | table | ## Examples @@ -65,3 +66,57 @@ Print the ast of a pipeline with an error, as json, minified > ast 'for x in 1..10 { echo $x ' --json --minify ``` + +Print the ast of a string flattened +```nu +> ast "'hello'" --flatten +╭───┬─────────┬──────────────┬───────────────╮ +│ # │ content │ shape │ span │ +├───┼─────────┼──────────────┼───────────────┤ +│ 0 │ 'hello' │ shape_string │ ╭───────┬───╮ │ +│ │ │ │ │ start │ 0 │ │ +│ │ │ │ │ end │ 7 │ │ +│ │ │ │ ╰───────┴───╯ │ +╰───┴─────────┴──────────────┴───────────────╯ + +``` + +Print the ast of a string flattened, as json, minified +```nu +> ast "'hello'" --flatten --json --minify +[{"content":"'hello'","shape":"shape_string","span":{"start":0,"end":7}}] +``` + +Print the ast of a pipeline flattened +```nu +> ast 'ls | sort-by type name -i' --flatten +╭───┬─────────┬────────────────────┬────────────────╮ +│ # │ content │ shape │ span │ +├───┼─────────┼────────────────────┼────────────────┤ +│ 0 │ ls │ shape_external │ ╭───────┬───╮ │ +│ │ │ │ │ start │ 0 │ │ +│ │ │ │ │ end │ 2 │ │ +│ │ │ │ ╰───────┴───╯ │ +│ 1 │ | │ shape_pipe │ ╭───────┬───╮ │ +│ │ │ │ │ start │ 3 │ │ +│ │ │ │ │ end │ 4 │ │ +│ │ │ │ ╰───────┴───╯ │ +│ 2 │ sort-by │ shape_internalcall │ ╭───────┬────╮ │ +│ │ │ │ │ start │ 5 │ │ +│ │ │ │ │ end │ 12 │ │ +│ │ │ │ ╰───────┴────╯ │ +│ 3 │ type │ shape_string │ ╭───────┬────╮ │ +│ │ │ │ │ start │ 13 │ │ +│ │ │ │ │ end │ 17 │ │ +│ │ │ │ ╰───────┴────╯ │ +│ 4 │ name │ shape_string │ ╭───────┬────╮ │ +│ │ │ │ │ start │ 18 │ │ +│ │ │ │ │ end │ 22 │ │ +│ │ │ │ ╰───────┴────╯ │ +│ 5 │ -i │ shape_flag │ ╭───────┬────╮ │ +│ │ │ │ │ start │ 23 │ │ +│ │ │ │ │ end │ 25 │ │ +│ │ │ │ ╰───────┴────╯ │ +╰───┴─────────┴────────────────────┴────────────────╯ + +``` diff --git a/commands/docs/banner.md b/commands/docs/banner.md index 6dcd3b91415..b54a6e11850 100644 --- a/commands/docs/banner.md +++ b/commands/docs/banner.md @@ -2,7 +2,7 @@ title: banner categories: | default -version: 0.100.0 +version: 0.101.0 default: | Print a banner for nushell with information about the project usage: | diff --git a/commands/docs/bits.md b/commands/docs/bits.md index f3469586383..aa2240eb104 100644 --- a/commands/docs/bits.md +++ b/commands/docs/bits.md @@ -2,7 +2,7 @@ title: bits categories: | bits -version: 0.100.0 +version: 0.101.0 bits: | Various commands for working with bits. usage: | diff --git a/commands/docs/bits_and.md b/commands/docs/bits_and.md index 1439677d720..b5e0ba2dcca 100644 --- a/commands/docs/bits_and.md +++ b/commands/docs/bits_and.md @@ -2,7 +2,7 @@ title: bits and categories: | bits -version: 0.100.0 +version: 0.101.0 bits: | Performs bitwise and for ints or binary values. usage: | diff --git a/commands/docs/bits_not.md b/commands/docs/bits_not.md index a831d9c6787..bd757353683 100644 --- a/commands/docs/bits_not.md +++ b/commands/docs/bits_not.md @@ -2,7 +2,7 @@ title: bits not categories: | bits -version: 0.100.0 +version: 0.101.0 bits: | Performs logical negation on each bit. usage: | diff --git a/commands/docs/bits_or.md b/commands/docs/bits_or.md index eb1cc9e3422..e18e24e2d95 100644 --- a/commands/docs/bits_or.md +++ b/commands/docs/bits_or.md @@ -2,7 +2,7 @@ title: bits or categories: | bits -version: 0.100.0 +version: 0.101.0 bits: | Performs bitwise or for ints or binary values. usage: | diff --git a/commands/docs/bits_rol.md b/commands/docs/bits_rol.md index 415f923260e..d843612d59b 100644 --- a/commands/docs/bits_rol.md +++ b/commands/docs/bits_rol.md @@ -2,7 +2,7 @@ title: bits rol categories: | bits -version: 0.100.0 +version: 0.101.0 bits: | Bitwise rotate left for ints or binary values. usage: | diff --git a/commands/docs/bits_ror.md b/commands/docs/bits_ror.md index e0eeb0af15f..f404fd08603 100644 --- a/commands/docs/bits_ror.md +++ b/commands/docs/bits_ror.md @@ -2,7 +2,7 @@ title: bits ror categories: | bits -version: 0.100.0 +version: 0.101.0 bits: | Bitwise rotate right for ints or binary values. usage: | diff --git a/commands/docs/bits_shl.md b/commands/docs/bits_shl.md index da16546e0f1..4d1b86c4693 100644 --- a/commands/docs/bits_shl.md +++ b/commands/docs/bits_shl.md @@ -2,7 +2,7 @@ title: bits shl categories: | bits -version: 0.100.0 +version: 0.101.0 bits: | Bitwise shift left for ints or binary values. usage: | diff --git a/commands/docs/bits_shr.md b/commands/docs/bits_shr.md index 4321e5ba3e1..1d9d5763003 100644 --- a/commands/docs/bits_shr.md +++ b/commands/docs/bits_shr.md @@ -2,7 +2,7 @@ title: bits shr categories: | bits -version: 0.100.0 +version: 0.101.0 bits: | Bitwise shift right for ints or binary values. usage: | diff --git a/commands/docs/bits_xor.md b/commands/docs/bits_xor.md index 42016a3494f..2f826d0091a 100644 --- a/commands/docs/bits_xor.md +++ b/commands/docs/bits_xor.md @@ -2,7 +2,7 @@ title: bits xor categories: | bits -version: 0.100.0 +version: 0.101.0 bits: | Performs bitwise xor for ints or binary values. usage: | diff --git a/commands/docs/break.md b/commands/docs/break.md index d630e2054c9..6e062109b04 100644 --- a/commands/docs/break.md +++ b/commands/docs/break.md @@ -2,7 +2,7 @@ title: break categories: | core -version: 0.100.0 +version: 0.101.0 core: | Break a loop. usage: | diff --git a/commands/docs/bytes.md b/commands/docs/bytes.md index ebd408ea84b..7dd6e90bb81 100644 --- a/commands/docs/bytes.md +++ b/commands/docs/bytes.md @@ -2,7 +2,7 @@ title: bytes categories: | bytes -version: 0.100.0 +version: 0.101.0 bytes: | Various commands for working with byte data. usage: | diff --git a/commands/docs/bytes_add.md b/commands/docs/bytes_add.md index f89d7f3f824..f46f6a4f347 100644 --- a/commands/docs/bytes_add.md +++ b/commands/docs/bytes_add.md @@ -2,7 +2,7 @@ title: bytes add categories: | bytes -version: 0.100.0 +version: 0.101.0 bytes: | Add specified bytes to the input. usage: | diff --git a/commands/docs/bytes_at.md b/commands/docs/bytes_at.md index 868980a3762..dba6cf4e297 100644 --- a/commands/docs/bytes_at.md +++ b/commands/docs/bytes_at.md @@ -2,7 +2,7 @@ title: bytes at categories: | bytes -version: 0.100.0 +version: 0.101.0 bytes: | Get bytes defined by a range. usage: | diff --git a/commands/docs/bytes_build.md b/commands/docs/bytes_build.md index 8b8c926cf0d..ced3e56713d 100644 --- a/commands/docs/bytes_build.md +++ b/commands/docs/bytes_build.md @@ -2,7 +2,7 @@ title: bytes build categories: | bytes -version: 0.100.0 +version: 0.101.0 bytes: | Create bytes from the arguments. usage: | diff --git a/commands/docs/bytes_collect.md b/commands/docs/bytes_collect.md index ddfb4d97455..f1f20656e82 100644 --- a/commands/docs/bytes_collect.md +++ b/commands/docs/bytes_collect.md @@ -2,7 +2,7 @@ title: bytes collect categories: | bytes -version: 0.100.0 +version: 0.101.0 bytes: | Concatenate multiple binary into a single binary, with an optional separator between each. usage: | diff --git a/commands/docs/bytes_ends-with.md b/commands/docs/bytes_ends-with.md index 98c945d7160..01edfcbd9a4 100644 --- a/commands/docs/bytes_ends-with.md +++ b/commands/docs/bytes_ends-with.md @@ -2,7 +2,7 @@ title: bytes ends-with categories: | bytes -version: 0.100.0 +version: 0.101.0 bytes: | Check if bytes ends with a pattern. usage: | diff --git a/commands/docs/bytes_index-of.md b/commands/docs/bytes_index-of.md index 34ba4e41777..5c2f7641729 100644 --- a/commands/docs/bytes_index-of.md +++ b/commands/docs/bytes_index-of.md @@ -2,7 +2,7 @@ title: bytes index-of categories: | bytes -version: 0.100.0 +version: 0.101.0 bytes: | Returns start index of first occurrence of pattern in bytes, or -1 if no match. usage: | diff --git a/commands/docs/bytes_length.md b/commands/docs/bytes_length.md index 13bf8eae557..c952be7a7e1 100644 --- a/commands/docs/bytes_length.md +++ b/commands/docs/bytes_length.md @@ -2,7 +2,7 @@ title: bytes length categories: | bytes -version: 0.100.0 +version: 0.101.0 bytes: | Output the length of any bytes in the pipeline. usage: | diff --git a/commands/docs/bytes_remove.md b/commands/docs/bytes_remove.md index f25f5ad88fa..94c2a490e1c 100644 --- a/commands/docs/bytes_remove.md +++ b/commands/docs/bytes_remove.md @@ -2,7 +2,7 @@ title: bytes remove categories: | bytes -version: 0.100.0 +version: 0.101.0 bytes: | Remove bytes. usage: | diff --git a/commands/docs/bytes_replace.md b/commands/docs/bytes_replace.md index 080fef8ffef..9dce8d457be 100644 --- a/commands/docs/bytes_replace.md +++ b/commands/docs/bytes_replace.md @@ -2,7 +2,7 @@ title: bytes replace categories: | bytes -version: 0.100.0 +version: 0.101.0 bytes: | Find and replace binary. usage: | diff --git a/commands/docs/bytes_reverse.md b/commands/docs/bytes_reverse.md index 40efe4b0e63..f27cbd6e316 100644 --- a/commands/docs/bytes_reverse.md +++ b/commands/docs/bytes_reverse.md @@ -2,7 +2,7 @@ title: bytes reverse categories: | bytes -version: 0.100.0 +version: 0.101.0 bytes: | Reverse the bytes in the pipeline. usage: | diff --git a/commands/docs/bytes_starts-with.md b/commands/docs/bytes_starts-with.md index f0f74925239..3a519ddf3b6 100644 --- a/commands/docs/bytes_starts-with.md +++ b/commands/docs/bytes_starts-with.md @@ -2,7 +2,7 @@ title: bytes starts-with categories: | bytes -version: 0.100.0 +version: 0.101.0 bytes: | Check if bytes starts with a pattern. usage: | diff --git a/commands/docs/cal.md b/commands/docs/cal.md index 13621891594..f9aaf2d233e 100644 --- a/commands/docs/cal.md +++ b/commands/docs/cal.md @@ -2,7 +2,7 @@ title: cal categories: | generators -version: 0.100.0 +version: 0.101.0 generators: | Display a calendar. usage: | diff --git a/commands/docs/cd.md b/commands/docs/cd.md index 34e3c44d3e4..4058d201b2e 100644 --- a/commands/docs/cd.md +++ b/commands/docs/cd.md @@ -2,7 +2,7 @@ title: cd categories: | filesystem -version: 0.100.0 +version: 0.101.0 filesystem: | Change directory. usage: | diff --git a/commands/docs/char.md b/commands/docs/char.md index 865510e4db6..c70fb1ff223 100644 --- a/commands/docs/char.md +++ b/commands/docs/char.md @@ -2,7 +2,7 @@ title: char categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Output special characters (e.g., 'newline'). usage: | diff --git a/commands/docs/chunk-by.md b/commands/docs/chunk-by.md new file mode 100644 index 00000000000..ef387833504 --- /dev/null +++ b/commands/docs/chunk-by.md @@ -0,0 +1,100 @@ +--- +title: chunk-by +categories: | + filters +version: 0.101.0 +filters: | + Divides a sequence into sub-sequences based on a closure. +usage: | + Divides a sequence into sub-sequences based on a closure. +--- + + +# `chunk-by` for [filters](/commands/categories/filters.md) + +
Divides a sequence into sub-sequences based on a closure.
+ +## Signature + +```> chunk-by {flags} (closure)``` + +## Parameters + + - `closure`: The closure to run. + + +## Input/output types: + +| input | output | +| --------- | --------------- | +| list\ | list\\> | +| range | list\\> | +## Examples + +Chunk data into runs of larger than zero or not. +```nu +> [1, 3, -2, -2, 0, 1, 2] | chunk-by {|it| $it >= 0 } +╭───┬────────────╮ +│ 0 │ ╭───┬───╮ │ +│ │ │ 0 │ 1 │ │ +│ │ │ 1 │ 3 │ │ +│ │ ╰───┴───╯ │ +│ 1 │ ╭───┬────╮ │ +│ │ │ 0 │ -2 │ │ +│ │ │ 1 │ -2 │ │ +│ │ ╰───┴────╯ │ +│ 2 │ ╭───┬───╮ │ +│ │ │ 0 │ 0 │ │ +│ │ │ 1 │ 1 │ │ +│ │ │ 2 │ 2 │ │ +│ │ ╰───┴───╯ │ +╰───┴────────────╯ + +``` + +Identify repetitions in a string +```nu +> [a b b c c c] | chunk-by { |it| $it } +╭───┬───────────╮ +│ 0 │ ╭───┬───╮ │ +│ │ │ 0 │ a │ │ +│ │ ╰───┴───╯ │ +│ 1 │ ╭───┬───╮ │ +│ │ │ 0 │ b │ │ +│ │ │ 1 │ b │ │ +│ │ ╰───┴───╯ │ +│ 2 │ ╭───┬───╮ │ +│ │ │ 0 │ c │ │ +│ │ │ 1 │ c │ │ +│ │ │ 2 │ c │ │ +│ │ ╰───┴───╯ │ +╰───┴───────────╯ + +``` + +Chunk values of range by predicate +```nu +> (0..8) | chunk-by { |it| $it // 3 } +╭───┬───────────╮ +│ 0 │ ╭───┬───╮ │ +│ │ │ 0 │ 0 │ │ +│ │ │ 1 │ 1 │ │ +│ │ │ 2 │ 2 │ │ +│ │ ╰───┴───╯ │ +│ 1 │ ╭───┬───╮ │ +│ │ │ 0 │ 3 │ │ +│ │ │ 1 │ 4 │ │ +│ │ │ 2 │ 5 │ │ +│ │ ╰───┴───╯ │ +│ 2 │ ╭───┬───╮ │ +│ │ │ 0 │ 6 │ │ +│ │ │ 1 │ 7 │ │ +│ │ │ 2 │ 8 │ │ +│ │ ╰───┴───╯ │ +╰───┴───────────╯ + +``` + +## Notes +chunk-by applies the given closure to each value of the input list, and groups +consecutive elements that share the same closure result value into lists. \ No newline at end of file diff --git a/commands/docs/chunks.md b/commands/docs/chunks.md index 6ab137c24e3..b1687781991 100644 --- a/commands/docs/chunks.md +++ b/commands/docs/chunks.md @@ -2,7 +2,7 @@ title: chunks categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Divide a list or table into chunks of `chunk_size`. usage: | diff --git a/commands/docs/clear.md b/commands/docs/clear.md index eb5e9a7aa92..1d4f612820f 100644 --- a/commands/docs/clear.md +++ b/commands/docs/clear.md @@ -2,7 +2,7 @@ title: clear categories: | platform -version: 0.100.0 +version: 0.101.0 platform: | Clear the terminal. usage: | diff --git a/commands/docs/collect.md b/commands/docs/collect.md index 0a819b37bc3..17f2f8cc483 100644 --- a/commands/docs/collect.md +++ b/commands/docs/collect.md @@ -2,7 +2,7 @@ title: collect categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Collect a stream into a value. usage: | diff --git a/commands/docs/columns.md b/commands/docs/columns.md index 421b97bc866..bdac3d5b6c0 100644 --- a/commands/docs/columns.md +++ b/commands/docs/columns.md @@ -2,7 +2,7 @@ title: columns categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Given a record or table, produce a list of its columns' names. usage: | diff --git a/commands/docs/commandline.md b/commands/docs/commandline.md index 78b905be71e..f090105e7c6 100644 --- a/commands/docs/commandline.md +++ b/commands/docs/commandline.md @@ -2,7 +2,7 @@ title: commandline categories: | core -version: 0.100.0 +version: 0.101.0 core: | View the current command line input buffer. usage: | diff --git a/commands/docs/commandline_edit.md b/commands/docs/commandline_edit.md index 4b6af4e6c03..96799c21ce9 100644 --- a/commands/docs/commandline_edit.md +++ b/commands/docs/commandline_edit.md @@ -2,7 +2,7 @@ title: commandline edit categories: | core -version: 0.100.0 +version: 0.101.0 core: | Modify the current command line input buffer. usage: | diff --git a/commands/docs/commandline_get-cursor.md b/commands/docs/commandline_get-cursor.md index ec034b46ae3..e7338f8df14 100644 --- a/commands/docs/commandline_get-cursor.md +++ b/commands/docs/commandline_get-cursor.md @@ -2,7 +2,7 @@ title: commandline get-cursor categories: | core -version: 0.100.0 +version: 0.101.0 core: | Get the current cursor position. usage: | diff --git a/commands/docs/commandline_set-cursor.md b/commands/docs/commandline_set-cursor.md index 79ca112d031..5138904a249 100644 --- a/commands/docs/commandline_set-cursor.md +++ b/commands/docs/commandline_set-cursor.md @@ -2,7 +2,7 @@ title: commandline set-cursor categories: | core -version: 0.100.0 +version: 0.101.0 core: | Set the current cursor position. usage: | diff --git a/commands/docs/compact.md b/commands/docs/compact.md index fc724340cb6..025d7089614 100644 --- a/commands/docs/compact.md +++ b/commands/docs/compact.md @@ -2,7 +2,7 @@ title: compact categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Creates a table with non-empty rows. usage: | diff --git a/commands/docs/complete.md b/commands/docs/complete.md index e9803fe1a22..dd0939952de 100644 --- a/commands/docs/complete.md +++ b/commands/docs/complete.md @@ -2,7 +2,7 @@ title: complete categories: | system -version: 0.100.0 +version: 0.101.0 system: | Capture the outputs and exit code from an external piped in command in a nushell table. usage: | diff --git a/commands/docs/config.md b/commands/docs/config.md index 9723bd9948c..891223287ad 100644 --- a/commands/docs/config.md +++ b/commands/docs/config.md @@ -2,7 +2,7 @@ title: config categories: | env -version: 0.100.0 +version: 0.101.0 env: | Edit nushell configuration files. usage: | @@ -30,8 +30,9 @@ You must use one of the following subcommands. Using this command as-is will onl ## Subcommands: -| name | description | type | -| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| [`config env`](/commands/docs/config_env.md) | Edit nu environment configurations. | built-in | -| [`config nu`](/commands/docs/config_nu.md) | Edit nu configurations. | built-in | -| [`config reset`](/commands/docs/config_reset.md) | Reset nushell environment configurations to default, and saves old config files in the config location as oldconfig.nu and oldenv.nu. | built-in | \ No newline at end of file +| name | description | type | +| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | -------- | +| [`config env`](/commands/docs/config_env.md) | Edit nu environment configurations. | built-in | +| [`config flatten`](/commands/docs/config_flatten.md) | Show the current configuration in a flattened form. | built-in | +| [`config nu`](/commands/docs/config_nu.md) | Edit nu configurations. | built-in | +| [`config reset`](/commands/docs/config_reset.md) | Reset nushell environment configurations to default, and saves old config files in the config location as oldconfig.nu and oldenv.nu. | built-in | \ No newline at end of file diff --git a/commands/docs/config_env.md b/commands/docs/config_env.md index 702733469c9..aa4f3a7436c 100644 --- a/commands/docs/config_env.md +++ b/commands/docs/config_env.md @@ -2,7 +2,7 @@ title: config env categories: | env -version: 0.100.0 +version: 0.101.0 env: | Edit nu environment configurations. usage: | @@ -20,7 +20,8 @@ usage: | ## Flags - - `--default, -d`: Print default `env.nu` file instead. + - `--default, -d`: Print the internal default `env.nu` file instead. + - `--doc, -s`: Print a commented `env.nu` with documentation instead. ## Input/output types: @@ -31,20 +32,20 @@ usage: | ## Examples -allow user to open and update nu env +open user's env.nu in the default editor ```nu > config env ``` -allow user to print default `env.nu` file +pretty-print a commented `env.nu` that explains common settings ```nu -> config env --default, +> config env --doc | nu-highlight, ``` -allow saving the default `env.nu` locally +pretty-print the internal `env.nu` file which is loaded before the user's environment ```nu -> config env --default | save -f ~/.config/nushell/default_env.nu +> config env --default | nu-highlight, ``` diff --git a/commands/docs/config_flatten.md b/commands/docs/config_flatten.md new file mode 100644 index 00000000000..fc5044f2e23 --- /dev/null +++ b/commands/docs/config_flatten.md @@ -0,0 +1,34 @@ +--- +title: config flatten +categories: | + debug +version: 0.101.0 +debug: | + Show the current configuration in a flattened form. +usage: | + Show the current configuration in a flattened form. +--- + + +# `config flatten` for [debug](/commands/categories/debug.md) + +
Show the current configuration in a flattened form.
+ +## Signature + +```> config flatten {flags} ``` + + +## Input/output types: + +| input | output | +| ------- | ------ | +| nothing | record | + +## Examples + +Show the current configuration in a flattened form +```nu +> config flatten + +``` diff --git a/commands/docs/config_nu.md b/commands/docs/config_nu.md index 7a094149259..4bb092b1c15 100644 --- a/commands/docs/config_nu.md +++ b/commands/docs/config_nu.md @@ -2,7 +2,7 @@ title: config nu categories: | env -version: 0.100.0 +version: 0.101.0 env: | Edit nu configurations. usage: | @@ -20,7 +20,8 @@ usage: | ## Flags - - `--default, -d`: Print default `config.nu` file instead. + - `--default, -d`: Print the internal default `config.nu` file instead. + - `--doc, -s`: Print a commented `config.nu` with documentation instead. ## Input/output types: @@ -31,20 +32,20 @@ usage: | ## Examples -allow user to open and update nu config +open user's config.nu in the default editor ```nu > config nu ``` -allow user to print default `config.nu` file +pretty-print a commented `config.nu` that explains common settings ```nu -> config nu --default, +> config nu --doc | nu-highlight ``` -allow saving the default `config.nu` locally +pretty-print the internal `config.nu` file which is loaded before user's config ```nu -> config nu --default | save -f ~/.config/nushell/default_config.nu +> config nu --default | nu-highlight ``` diff --git a/commands/docs/config_reset.md b/commands/docs/config_reset.md index 2ff16613291..426df0258df 100644 --- a/commands/docs/config_reset.md +++ b/commands/docs/config_reset.md @@ -2,7 +2,7 @@ title: config reset categories: | env -version: 0.100.0 +version: 0.101.0 env: | Reset nushell environment configurations to default, and saves old config files in the config location as oldconfig.nu and oldenv.nu. usage: | diff --git a/commands/docs/const.md b/commands/docs/const.md index 1fbfb874ecd..f83d391d5a3 100644 --- a/commands/docs/const.md +++ b/commands/docs/const.md @@ -2,7 +2,7 @@ title: const categories: | core -version: 0.100.0 +version: 0.101.0 core: | Create a parse-time constant. usage: | diff --git a/commands/docs/continue.md b/commands/docs/continue.md index 632f22db41f..d9f9d56ae1a 100644 --- a/commands/docs/continue.md +++ b/commands/docs/continue.md @@ -2,7 +2,7 @@ title: continue categories: | core -version: 0.100.0 +version: 0.101.0 core: | Continue a loop from the next iteration. usage: | diff --git a/commands/docs/cp.md b/commands/docs/cp.md index c09563fb015..ed40d38b646 100644 --- a/commands/docs/cp.md +++ b/commands/docs/cp.md @@ -2,7 +2,7 @@ title: cp categories: | filesystem -version: 0.100.0 +version: 0.101.0 filesystem: | Copy files using uutils/coreutils cp. usage: | diff --git a/commands/docs/date.md b/commands/docs/date.md index 021a8faaab5..096af90519a 100644 --- a/commands/docs/date.md +++ b/commands/docs/date.md @@ -2,7 +2,7 @@ title: date categories: | date -version: 0.100.0 +version: 0.101.0 date: | Date-related commands. usage: | diff --git a/commands/docs/date_format.md b/commands/docs/date_format.md index af01cf2bf48..3b35bdda10b 100644 --- a/commands/docs/date_format.md +++ b/commands/docs/date_format.md @@ -2,7 +2,7 @@ title: date format categories: | removed -version: 0.100.0 +version: 0.101.0 removed: | Removed command: use `format date` instead. usage: | diff --git a/commands/docs/date_humanize.md b/commands/docs/date_humanize.md index c4d57acbf59..367fe975384 100644 --- a/commands/docs/date_humanize.md +++ b/commands/docs/date_humanize.md @@ -2,7 +2,7 @@ title: date humanize categories: | date -version: 0.100.0 +version: 0.101.0 date: | Print a 'humanized' format for the date, relative to now. usage: | diff --git a/commands/docs/date_list-timezone.md b/commands/docs/date_list-timezone.md index 91c4c2cccc7..b7118f443aa 100644 --- a/commands/docs/date_list-timezone.md +++ b/commands/docs/date_list-timezone.md @@ -2,7 +2,7 @@ title: date list-timezone categories: | date -version: 0.100.0 +version: 0.101.0 date: | List supported time zones. usage: | diff --git a/commands/docs/date_now.md b/commands/docs/date_now.md index 4fa1063e7d9..666b26bb37c 100644 --- a/commands/docs/date_now.md +++ b/commands/docs/date_now.md @@ -2,7 +2,7 @@ title: date now categories: | date -version: 0.100.0 +version: 0.101.0 date: | Get the current date. usage: | diff --git a/commands/docs/date_to-record.md b/commands/docs/date_to-record.md index 37782090823..7dd9203bfcb 100644 --- a/commands/docs/date_to-record.md +++ b/commands/docs/date_to-record.md @@ -1,16 +1,16 @@ --- title: date to-record categories: | - date -version: 0.100.0 -date: | + deprecated +version: 0.101.0 +deprecated: | Convert the date into a record. usage: | Convert the date into a record. --- -# `date to-record` for [date](/commands/categories/date.md) +# `date to-record` for [deprecated](/commands/categories/deprecated.md)
Convert the date into a record.
diff --git a/commands/docs/date_to-table.md b/commands/docs/date_to-table.md index 342d72af2a5..c2821dde697 100644 --- a/commands/docs/date_to-table.md +++ b/commands/docs/date_to-table.md @@ -1,16 +1,16 @@ --- title: date to-table categories: | - date -version: 0.100.0 -date: | + deprecated +version: 0.101.0 +deprecated: | Convert the date into a structured table. usage: | Convert the date into a structured table. --- -# `date to-table` for [date](/commands/categories/date.md) +# `date to-table` for [deprecated](/commands/categories/deprecated.md)
Convert the date into a structured table.
diff --git a/commands/docs/date_to-timezone.md b/commands/docs/date_to-timezone.md index 16e7a086ccf..9aa8ad7fdfb 100644 --- a/commands/docs/date_to-timezone.md +++ b/commands/docs/date_to-timezone.md @@ -2,7 +2,7 @@ title: date to-timezone categories: | date -version: 0.100.0 +version: 0.101.0 date: | Convert a date to a given time zone. usage: | diff --git a/commands/docs/debug.md b/commands/docs/debug.md index 2aaf312c6d7..c5616045cff 100644 --- a/commands/docs/debug.md +++ b/commands/docs/debug.md @@ -2,7 +2,7 @@ title: debug categories: | debug -version: 0.100.0 +version: 0.101.0 debug: | Debug print the value(s) piped in. usage: | diff --git a/commands/docs/debug_info.md b/commands/docs/debug_info.md index cad605f8b85..5bcfb6e9f49 100644 --- a/commands/docs/debug_info.md +++ b/commands/docs/debug_info.md @@ -2,7 +2,7 @@ title: debug info categories: | debug -version: 0.100.0 +version: 0.101.0 debug: | View process memory info. usage: | diff --git a/commands/docs/debug_profile.md b/commands/docs/debug_profile.md index bd8b1448f2f..21597429c56 100644 --- a/commands/docs/debug_profile.md +++ b/commands/docs/debug_profile.md @@ -2,7 +2,7 @@ title: debug profile categories: | debug -version: 0.100.0 +version: 0.101.0 debug: | Profile pipeline elements in a closure. usage: | @@ -23,8 +23,6 @@ usage: | - `--spans, -s`: Collect spans of profiled elements - `--expand-source, -e`: Collect full source fragments of profiled elements - `--values, -v`: Collect pipeline element output values - - `--expr, -x`: Collect expression types - - `--instructions, -i`: Collect IR instructions - `--lines, -l`: Collect line numbers - `--max-depth, -m {int}`: How many blocks/closures deep to step into (default 2) @@ -54,36 +52,51 @@ Profile config evaluation with more granularity ``` ## Notes -The profiler profiles every evaluated pipeline element inside a closure, stepping into all +The profiler profiles every evaluated instruction inside a closure, stepping into all commands calls and other blocks/closures. The output can be heavily customized. By default, the following columns are included: -- depth : Depth of the pipeline element. Each entered block adds one level of depth. How many +- depth : Depth of the instruction. Each entered block adds one level of depth. How many blocks deep to step into is controlled with the --max-depth option. -- id : ID of the pipeline element -- parent_id : ID of the parent element -- source : Source code of the pipeline element. If the element has multiple lines, only the - first line is used and `...` is appended to the end. Full source code can be shown - with the --expand-source flag. -- duration_ms : How long it took to run the pipeline element in milliseconds. -- (optional) span : Span of the element. Can be viewed via the `view span` command. Enabled with - the --spans flag. -- (optional) expr : The type of expression of the pipeline element. Enabled with the --expr flag. -- (optional) output : The output value of the pipeline element. Enabled with the --values flag. - -To illustrate the depth and IDs, consider `debug profile { if true { echo 'spam' } }`. There are -three pipeline elements: - -depth id parent_id - 0 0 0 debug profile { do { if true { 'spam' } } } - 1 1 0 if true { 'spam' } - 2 2 1 'spam' +- id : ID of the instruction +- parent_id : ID of the instruction that created the parent scope +- source : Source code that generated the instruction. If the source code has multiple lines, + only the first line is used and `...` is appended to the end. Full source code can + be shown with the --expand-source flag. +- pc : The index of the instruction within the block. +- instruction : The pretty printed instruction being evaluated. +- duration_ms : How long it took to run the instruction in milliseconds. +- (optional) span : Span associated with the instruction. Can be viewed via the `view span` + command. Enabled with the --spans flag. +- (optional) output : The output value of the instruction. Enabled with the --values flag. + +To illustrate the depth and IDs, consider `debug profile { do { if true { echo 'spam' } } }`. A unique ID is generated each time an instruction is executed, and there are two levels of depth: + +``` +depth id parent_id source pc instruction + 0 0 0 debug profile { do { if true { 'spam' } } } 0 + 1 1 0 { if true { 'spam' } } 0 load-literal %1, closure(2164) + 1 2 0 { if true { 'spam' } } 1 push-positional %1 + 1 3 0 { do { if true { 'spam' } } } 2 redirect-out caller + 1 4 0 { do { if true { 'spam' } } } 3 redirect-err caller + 1 5 0 do 4 call decl 7 "do", %0 + 2 6 5 true 0 load-literal %1, bool(true) + 2 7 5 if 1 not %1 + 2 8 5 if 2 branch-if %1, 5 + 2 9 5 'spam' 3 load-literal %0, string("spam") + 2 10 5 if 4 jump 6 + 2 11 5 { if true { 'spam' } } 6 return %0 + 1 12 0 { do { if true { 'spam' } } } 5 return %0 +``` Each block entered increments depth by 1 and each block left decrements it by one. This way you can -control the profiling granularity. Passing --max-depth=1 to the above would stop at -`if true { 'spam' }`. The id is used to identify each element. The parent_id tells you that 'spam' -was spawned from `if true { 'spam' }` which was spawned from the root `debug profile { ... }`. +control the profiling granularity. Passing --max-depth=1 to the above would stop inside the `do` +at `if true { 'spam' }`. The id is used to identify each element. The parent_id tells you that the +instructions inside the block are being executed because of `do` (5), which in turn was spawned from +the root `debug profile { ... }`. + +For a better understanding of how instructions map to source code, see the `view ir` command. -Note: In some cases, the ordering of piepeline elements might not be intuitive. For example, +Note: In some cases, the ordering of pipeline elements might not be intuitive. For example, `[ a bb cc ] | each { $in | str length }` involves some implicit collects and lazy evaluation confusing the id/parent_id hierarchy. The --expr flag is helpful for investigating these issues. \ No newline at end of file diff --git a/commands/docs/decode.md b/commands/docs/decode.md index 63ddf56eed6..86be670b732 100644 --- a/commands/docs/decode.md +++ b/commands/docs/decode.md @@ -2,7 +2,7 @@ title: decode categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Decode bytes into a string. usage: | diff --git a/commands/docs/decode_base32.md b/commands/docs/decode_base32.md index b7b78e90283..4420c1232b6 100644 --- a/commands/docs/decode_base32.md +++ b/commands/docs/decode_base32.md @@ -2,7 +2,7 @@ title: decode base32 categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Decode a Base32 value. usage: | diff --git a/commands/docs/decode_base32hex.md b/commands/docs/decode_base32hex.md index 5acb5a1793b..ad2d13d7b16 100644 --- a/commands/docs/decode_base32hex.md +++ b/commands/docs/decode_base32hex.md @@ -2,7 +2,7 @@ title: decode base32hex categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Encode a base32hex value. usage: | diff --git a/commands/docs/decode_base64.md b/commands/docs/decode_base64.md index 527ef3e20ac..aff61e69d0b 100644 --- a/commands/docs/decode_base64.md +++ b/commands/docs/decode_base64.md @@ -2,7 +2,7 @@ title: decode base64 categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Decode a Base64 value. usage: | diff --git a/commands/docs/decode_hex.md b/commands/docs/decode_hex.md index 437c911da72..a7c08c83dbe 100644 --- a/commands/docs/decode_hex.md +++ b/commands/docs/decode_hex.md @@ -2,7 +2,7 @@ title: decode hex categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Hex decode a value. usage: | diff --git a/commands/docs/def.md b/commands/docs/def.md index c7a31648101..1f4096bd64a 100644 --- a/commands/docs/def.md +++ b/commands/docs/def.md @@ -2,7 +2,7 @@ title: def categories: | core -version: 0.100.0 +version: 0.101.0 core: | Define a custom command. usage: | diff --git a/commands/docs/default.md b/commands/docs/default.md index 01ee90aef65..1f0090e6f37 100644 --- a/commands/docs/default.md +++ b/commands/docs/default.md @@ -2,7 +2,7 @@ title: default categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Sets a default value if a row's column is missing or null. usage: | diff --git a/commands/docs/describe.md b/commands/docs/describe.md index a2f297bcb96..a617a93bc52 100644 --- a/commands/docs/describe.md +++ b/commands/docs/describe.md @@ -2,7 +2,7 @@ title: describe categories: | core -version: 0.100.0 +version: 0.101.0 core: | Describe the type and structure of the value(s) piped in. usage: | diff --git a/commands/docs/detect_columns.md b/commands/docs/detect_columns.md index 9aed04aa6b9..529bda3a18e 100644 --- a/commands/docs/detect_columns.md +++ b/commands/docs/detect_columns.md @@ -2,7 +2,7 @@ title: detect columns categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Attempt to automatically split text into multiple columns. usage: | diff --git a/commands/docs/do.md b/commands/docs/do.md index cf4303b46fa..1ee8caa8cd8 100644 --- a/commands/docs/do.md +++ b/commands/docs/do.md @@ -2,7 +2,7 @@ title: do categories: | core -version: 0.100.0 +version: 0.101.0 core: | Run a closure, providing it with the pipeline input. usage: | @@ -58,18 +58,6 @@ Run the closure and ignore both shell and external program errors ``` -Run the closure and ignore shell errors -```nu -> do --ignore-shell-errors { thisisnotarealcommand } - -``` - -Run the closure and ignore external program errors -```nu -> do --ignore-program-errors { nu --commands 'exit 1' }; echo "I'll still run" - -``` - Abort the pipeline if a program returns a non-zero exit code ```nu > do --capture-errors { nu --commands 'exit 1' } | myscarycommand diff --git a/commands/docs/drop.md b/commands/docs/drop.md index f6eb534f7c2..981e33a0223 100644 --- a/commands/docs/drop.md +++ b/commands/docs/drop.md @@ -2,7 +2,7 @@ title: drop categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Remove items/rows from the end of the input list/table. Counterpart of `skip`. Opposite of `last`. usage: | diff --git a/commands/docs/drop_column.md b/commands/docs/drop_column.md index 17b9f3ad7e9..2d3a5045715 100644 --- a/commands/docs/drop_column.md +++ b/commands/docs/drop_column.md @@ -2,7 +2,7 @@ title: drop column categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Remove N columns at the right-hand end of the input table. To remove columns by name, use `reject`. usage: | diff --git a/commands/docs/drop_nth.md b/commands/docs/drop_nth.md index 8bbde9d7883..28f1bc9f6f0 100644 --- a/commands/docs/drop_nth.md +++ b/commands/docs/drop_nth.md @@ -2,7 +2,7 @@ title: drop nth categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Drop the selected rows. usage: | diff --git a/commands/docs/du.md b/commands/docs/du.md index 6a7cdea7ed7..3fa7438f081 100644 --- a/commands/docs/du.md +++ b/commands/docs/du.md @@ -2,7 +2,7 @@ title: du categories: | filesystem -version: 0.100.0 +version: 0.101.0 filesystem: | Find disk usage sizes of specified items. usage: | @@ -20,8 +20,8 @@ usage: | ## Flags - - `--all, -a`: Output file sizes as well as directory sizes - `--deref, -r`: Dereference symlinks to their targets for size + - `--long, -l`: Get underlying directories and files for each entry - `--exclude, -x {glob}`: Exclude these file names - `--max-depth, -d {int}`: Directory recursion limit - `--min-size, -m {int}`: Exclude files below this size diff --git a/commands/docs/each.md b/commands/docs/each.md index c9ee7a7aacf..dfc55f71134 100644 --- a/commands/docs/each.md +++ b/commands/docs/each.md @@ -2,7 +2,7 @@ title: each categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Run a closure on each row of the input list, creating a new list with the results. usage: | diff --git a/commands/docs/each_while.md b/commands/docs/each_while.md index cbab4cbf3ec..cbdd7fc4550 100644 --- a/commands/docs/each_while.md +++ b/commands/docs/each_while.md @@ -2,7 +2,7 @@ title: each while categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Run a closure on each row of the input list until a null is found, then create a new list with the results. usage: | diff --git a/commands/docs/echo.md b/commands/docs/echo.md index a910a94e4d4..5fc6273df9d 100644 --- a/commands/docs/echo.md +++ b/commands/docs/echo.md @@ -2,7 +2,7 @@ title: echo categories: | core -version: 0.100.0 +version: 0.101.0 core: | Returns its arguments, ignoring the piped-in value. usage: | diff --git a/commands/docs/encode.md b/commands/docs/encode.md index 643067a30f0..433d1b302b3 100644 --- a/commands/docs/encode.md +++ b/commands/docs/encode.md @@ -2,7 +2,7 @@ title: encode categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Encode a string into bytes. usage: | diff --git a/commands/docs/encode_base32.md b/commands/docs/encode_base32.md index d848b53b711..9c756eefd05 100644 --- a/commands/docs/encode_base32.md +++ b/commands/docs/encode_base32.md @@ -2,7 +2,7 @@ title: encode base32 categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Encode a string or binary value using Base32. usage: | diff --git a/commands/docs/encode_base32hex.md b/commands/docs/encode_base32hex.md index 1cc0ea90a0b..1c4f17534e1 100644 --- a/commands/docs/encode_base32hex.md +++ b/commands/docs/encode_base32hex.md @@ -2,7 +2,7 @@ title: encode base32hex categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Encode a binary value or a string using base32hex. usage: | diff --git a/commands/docs/encode_base64.md b/commands/docs/encode_base64.md index 81950becce4..0dd9615bfa9 100644 --- a/commands/docs/encode_base64.md +++ b/commands/docs/encode_base64.md @@ -2,7 +2,7 @@ title: encode base64 categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Encode a string or binary value using Base64. usage: | diff --git a/commands/docs/encode_hex.md b/commands/docs/encode_hex.md index 5c06c5586cc..db14dbefade 100644 --- a/commands/docs/encode_hex.md +++ b/commands/docs/encode_hex.md @@ -2,7 +2,7 @@ title: encode hex categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Hex encode a binary value or a string. usage: | diff --git a/commands/docs/enumerate.md b/commands/docs/enumerate.md index 7ee7791b565..68594e84275 100644 --- a/commands/docs/enumerate.md +++ b/commands/docs/enumerate.md @@ -2,7 +2,7 @@ title: enumerate categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Enumerate the elements in a stream. usage: | diff --git a/commands/docs/error_make.md b/commands/docs/error_make.md index 7f54558377c..5cfb1141365 100644 --- a/commands/docs/error_make.md +++ b/commands/docs/error_make.md @@ -2,7 +2,7 @@ title: error make categories: | core -version: 0.100.0 +version: 0.101.0 core: | Create an error. usage: | diff --git a/commands/docs/every.md b/commands/docs/every.md index c12ffb335b0..ad3e5eff424 100644 --- a/commands/docs/every.md +++ b/commands/docs/every.md @@ -2,7 +2,7 @@ title: every categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Show (or skip) every n-th row, starting from the first one. usage: | diff --git a/commands/docs/exec.md b/commands/docs/exec.md index b67c4fbc0cf..867e1a5d1a7 100644 --- a/commands/docs/exec.md +++ b/commands/docs/exec.md @@ -2,7 +2,7 @@ title: exec categories: | system -version: 0.100.0 +version: 0.101.0 system: | Execute a command, replacing or exiting the current process, depending on platform. usage: | diff --git a/commands/docs/exit.md b/commands/docs/exit.md index 28175f5106f..77bd8969734 100644 --- a/commands/docs/exit.md +++ b/commands/docs/exit.md @@ -2,7 +2,7 @@ title: exit categories: | shells -version: 0.100.0 +version: 0.101.0 shells: | Exit Nu. usage: | diff --git a/commands/docs/explain.md b/commands/docs/explain.md index 8e44289597b..98123679999 100644 --- a/commands/docs/explain.md +++ b/commands/docs/explain.md @@ -2,7 +2,7 @@ title: explain categories: | debug -version: 0.100.0 +version: 0.101.0 debug: | Explain closure contents. usage: | diff --git a/commands/docs/explore.md b/commands/docs/explore.md index 04ae758c730..a30179479ae 100644 --- a/commands/docs/explore.md +++ b/commands/docs/explore.md @@ -2,7 +2,7 @@ title: explore categories: | viewers -version: 0.100.0 +version: 0.101.0 viewers: | Explore acts as a table pager, just like `less` does for text. usage: | diff --git a/commands/docs/export-env.md b/commands/docs/export-env.md index 92dc1667972..eb0990afbe0 100644 --- a/commands/docs/export-env.md +++ b/commands/docs/export-env.md @@ -2,7 +2,7 @@ title: export-env categories: | env -version: 0.100.0 +version: 0.101.0 env: | Run a block and preserve its environment in a current scope. usage: | diff --git a/commands/docs/export.md b/commands/docs/export.md index 339ce917c54..c139e170978 100644 --- a/commands/docs/export.md +++ b/commands/docs/export.md @@ -2,7 +2,7 @@ title: export categories: | core -version: 0.100.0 +version: 0.101.0 core: | Export definitions or environment variables from a module. usage: | diff --git a/commands/docs/export_alias.md b/commands/docs/export_alias.md index 4ca61793527..a69308229f5 100644 --- a/commands/docs/export_alias.md +++ b/commands/docs/export_alias.md @@ -2,7 +2,7 @@ title: export alias categories: | core -version: 0.100.0 +version: 0.101.0 core: | Alias a command (with optional flags) to a new name and export it from a module. usage: | diff --git a/commands/docs/export_const.md b/commands/docs/export_const.md index 5709aadc08d..427da289eaa 100644 --- a/commands/docs/export_const.md +++ b/commands/docs/export_const.md @@ -2,7 +2,7 @@ title: export const categories: | core -version: 0.100.0 +version: 0.101.0 core: | Use parse-time constant from a module and export them from this module. usage: | diff --git a/commands/docs/export_def.md b/commands/docs/export_def.md index f51ecb981ec..d049b9631b8 100644 --- a/commands/docs/export_def.md +++ b/commands/docs/export_def.md @@ -2,7 +2,7 @@ title: export def categories: | core -version: 0.100.0 +version: 0.101.0 core: | Define a custom command and export it from a module. usage: | diff --git a/commands/docs/export_extern.md b/commands/docs/export_extern.md index 6a2bb3bc60d..34e641b6e48 100644 --- a/commands/docs/export_extern.md +++ b/commands/docs/export_extern.md @@ -2,7 +2,7 @@ title: export extern categories: | core -version: 0.100.0 +version: 0.101.0 core: | Define an extern and export it from a module. usage: | diff --git a/commands/docs/export_module.md b/commands/docs/export_module.md index d05274e680a..8e0c6e29c2e 100644 --- a/commands/docs/export_module.md +++ b/commands/docs/export_module.md @@ -2,7 +2,7 @@ title: export module categories: | core -version: 0.100.0 +version: 0.101.0 core: | Export a custom module from a module. usage: | diff --git a/commands/docs/export_use.md b/commands/docs/export_use.md index b96a62eb805..fce5a1fa523 100644 --- a/commands/docs/export_use.md +++ b/commands/docs/export_use.md @@ -2,7 +2,7 @@ title: export use categories: | core -version: 0.100.0 +version: 0.101.0 core: | Use definitions from a module and export them from this module. usage: | diff --git a/commands/docs/extern.md b/commands/docs/extern.md index 8b811253ddb..7662d01f416 100644 --- a/commands/docs/extern.md +++ b/commands/docs/extern.md @@ -2,7 +2,7 @@ title: extern categories: | core -version: 0.100.0 +version: 0.101.0 core: | Define a signature for an external command. usage: | diff --git a/commands/docs/fill.md b/commands/docs/fill.md index 2c2205a69e0..9cfae812689 100644 --- a/commands/docs/fill.md +++ b/commands/docs/fill.md @@ -2,7 +2,7 @@ title: fill categories: | conversions -version: 0.100.0 +version: 0.101.0 conversions: | Fill and Align. usage: | diff --git a/commands/docs/filter.md b/commands/docs/filter.md index 3863600828a..ae036c29e1b 100644 --- a/commands/docs/filter.md +++ b/commands/docs/filter.md @@ -2,7 +2,7 @@ title: filter categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Filter values based on a predicate closure. usage: | diff --git a/commands/docs/find.md b/commands/docs/find.md index 56ab27dae32..0ad57f710b8 100644 --- a/commands/docs/find.md +++ b/commands/docs/find.md @@ -2,7 +2,7 @@ title: find categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Searches terms in the input. usage: | diff --git a/commands/docs/first.md b/commands/docs/first.md index 1642f3081ec..d0473284b22 100644 --- a/commands/docs/first.md +++ b/commands/docs/first.md @@ -2,7 +2,7 @@ title: first categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Return only the first several rows of the input. Counterpart of `last`. Opposite of `skip`. usage: | diff --git a/commands/docs/flatten.md b/commands/docs/flatten.md index 14d6f998065..a6667bb323e 100644 --- a/commands/docs/flatten.md +++ b/commands/docs/flatten.md @@ -2,7 +2,7 @@ title: flatten categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Flatten the table. usage: | diff --git a/commands/docs/fmt.md b/commands/docs/fmt.md index 089270075bf..9329b9bf617 100644 --- a/commands/docs/fmt.md +++ b/commands/docs/fmt.md @@ -2,7 +2,7 @@ title: fmt categories: | conversions -version: 0.100.0 +version: 0.101.0 conversions: | Format a number. usage: | diff --git a/commands/docs/for.md b/commands/docs/for.md index db3e9bbcb83..f33121ab49b 100644 --- a/commands/docs/for.md +++ b/commands/docs/for.md @@ -2,7 +2,7 @@ title: for categories: | core -version: 0.100.0 +version: 0.101.0 core: | Loop over a range. usage: | diff --git a/commands/docs/format.md b/commands/docs/format.md index 478173d1ccb..fd1244627cc 100644 --- a/commands/docs/format.md +++ b/commands/docs/format.md @@ -2,7 +2,7 @@ title: format categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Various commands for formatting data. usage: | diff --git a/commands/docs/format_date.md b/commands/docs/format_date.md index 2d91a457cb7..5ca26eeec05 100644 --- a/commands/docs/format_date.md +++ b/commands/docs/format_date.md @@ -2,7 +2,7 @@ title: format date categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Format a given date using a format string. usage: | diff --git a/commands/docs/format_duration.md b/commands/docs/format_duration.md index 5d812fad934..192b7821c27 100644 --- a/commands/docs/format_duration.md +++ b/commands/docs/format_duration.md @@ -2,7 +2,7 @@ title: format duration categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Outputs duration with a specified unit of time. usage: | diff --git a/commands/docs/format_filesize.md b/commands/docs/format_filesize.md index 333495e7533..02579dbb3d1 100644 --- a/commands/docs/format_filesize.md +++ b/commands/docs/format_filesize.md @@ -2,7 +2,7 @@ title: format filesize categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Converts a column of filesizes to some specified format. usage: | diff --git a/commands/docs/format_pattern.md b/commands/docs/format_pattern.md index 144cacd360e..1a653e349f0 100644 --- a/commands/docs/format_pattern.md +++ b/commands/docs/format_pattern.md @@ -2,7 +2,7 @@ title: format pattern categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Format columns into a string using a simple pattern. usage: | diff --git a/commands/docs/from.md b/commands/docs/from.md index 060341caac8..e34cabab790 100644 --- a/commands/docs/from.md +++ b/commands/docs/from.md @@ -2,7 +2,7 @@ title: from categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Parse a string or binary data into structured data. usage: | diff --git a/commands/docs/from_csv.md b/commands/docs/from_csv.md index 2581535eb34..892e585bd7a 100644 --- a/commands/docs/from_csv.md +++ b/commands/docs/from_csv.md @@ -2,7 +2,7 @@ title: from csv categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Parse text as .csv and create table. usage: | @@ -50,6 +50,22 @@ Convert comma-separated data to a table ``` +Convert comma-separated data to a table, allowing variable number of columns per row +```nu +> "ColA,ColB +1,2 +3,4,5 +6" | from csv --flexible +╭───┬──────┬──────┬─────────╮ +│ # │ ColA │ ColB │ column2 │ +├───┼──────┼──────┼─────────┤ +│ 0 │ 1 │ 2 │ ❎ │ +│ 1 │ 3 │ 4 │ 5 │ +│ 2 │ 6 │ ❎ │ ❎ │ +╰───┴──────┴──────┴─────────╯ + +``` + Convert comma-separated data to a table, ignoring headers ```nu > open data.txt | from csv --noheaders diff --git a/commands/docs/from_eml.md b/commands/docs/from_eml.md index 86fd5ffca33..a8555aee9a6 100644 --- a/commands/docs/from_eml.md +++ b/commands/docs/from_eml.md @@ -2,7 +2,7 @@ title: from eml categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Parse text as .eml and create record. usage: | diff --git a/commands/docs/from_ics.md b/commands/docs/from_ics.md index 579ae12564b..6736c3480e5 100644 --- a/commands/docs/from_ics.md +++ b/commands/docs/from_ics.md @@ -2,7 +2,7 @@ title: from ics categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Parse text as .ics and create table. usage: | @@ -38,10 +38,11 @@ Converts ics formatted string to table ```nu > 'BEGIN:VCALENDAR END:VCALENDAR' | from ics -╭───┬────────────────┬────────────────┬────────────────┬────────────────┬────────────────┬────────────────┬────────────────╮ -│ # │ properties │ events │ alarms │ to-Dos │ journals │ free-busys │ timezones │ -├───┼────────────────┼────────────────┼────────────────┼────────────────┼────────────────┼────────────────┼────────────────┤ -│ 0 │ [list 0 items] │ [list 0 items] │ [list 0 items] │ [list 0 items] │ [list 0 items] │ [list 0 items] │ [list 0 items] │ -╰───┴────────────────┴────────────────┴────────────────┴────────────────┴────────────────┴────────────────┴────────────────╯ +╭───┬────────────────┬────────────────┬────────────────┬────────────────┬────────────────┬────────────────┬───────────╮ +│ # │ properties │ events │ alarms │ to-Dos │ journals │ free-busys │ timezones │ +├───┼────────────────┼────────────────┼────────────────┼────────────────┼────────────────┼────────────────┼───────────┤ +│ 0 │ [list 0 items] │ [list 0 items] │ [list 0 items] │ [list 0 items] │ [list 0 items] │ [list 0 items] │ [list 0 │ +│ │ │ │ │ │ │ │ items] │ +╰───┴────────────────┴────────────────┴────────────────┴────────────────┴────────────────┴────────────────┴───────────╯ ``` diff --git a/commands/docs/from_ini.md b/commands/docs/from_ini.md index e601c85dc52..f862e6d791a 100644 --- a/commands/docs/from_ini.md +++ b/commands/docs/from_ini.md @@ -2,7 +2,7 @@ title: from ini categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Parse text as .ini and create table. usage: | diff --git a/commands/docs/from_json.md b/commands/docs/from_json.md index ca4bc24591f..76771e178c7 100644 --- a/commands/docs/from_json.md +++ b/commands/docs/from_json.md @@ -2,7 +2,7 @@ title: from json categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Convert from json to structured data. usage: | diff --git a/commands/docs/from_msgpack.md b/commands/docs/from_msgpack.md index 5f58a5a0c0a..33122c59cf9 100644 --- a/commands/docs/from_msgpack.md +++ b/commands/docs/from_msgpack.md @@ -2,7 +2,7 @@ title: from msgpack categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Convert MessagePack data into Nu values. usage: | diff --git a/commands/docs/from_msgpackz.md b/commands/docs/from_msgpackz.md index 43a53a476d4..000070bee98 100644 --- a/commands/docs/from_msgpackz.md +++ b/commands/docs/from_msgpackz.md @@ -2,7 +2,7 @@ title: from msgpackz categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Convert brotli-compressed MessagePack data into Nu values. usage: | diff --git a/commands/docs/from_nuon.md b/commands/docs/from_nuon.md index 9fbfd98a9fc..ffa7d5d1ae6 100644 --- a/commands/docs/from_nuon.md +++ b/commands/docs/from_nuon.md @@ -2,7 +2,7 @@ title: from nuon categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Convert from nuon to structured data. usage: | diff --git a/commands/docs/from_ods.md b/commands/docs/from_ods.md index 8f890ad773e..624e11cacd1 100644 --- a/commands/docs/from_ods.md +++ b/commands/docs/from_ods.md @@ -2,7 +2,7 @@ title: from ods categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Parse OpenDocument Spreadsheet(.ods) data and create table. usage: | diff --git a/commands/docs/from_plist.md b/commands/docs/from_plist.md index 5d68671780f..252cf9713c7 100644 --- a/commands/docs/from_plist.md +++ b/commands/docs/from_plist.md @@ -2,7 +2,7 @@ title: from plist categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Convert plist to Nushell values usage: | diff --git a/commands/docs/from_ssv.md b/commands/docs/from_ssv.md index 0551715962a..66106c58935 100644 --- a/commands/docs/from_ssv.md +++ b/commands/docs/from_ssv.md @@ -2,7 +2,7 @@ title: from ssv categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Parse text as space-separated values and create a table. The default minimum number of spaces counted as a separator is 2. usage: | diff --git a/commands/docs/from_toml.md b/commands/docs/from_toml.md index 141dc9ade1a..5cf95a43687 100644 --- a/commands/docs/from_toml.md +++ b/commands/docs/from_toml.md @@ -2,7 +2,7 @@ title: from toml categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Parse text as .toml and create record. usage: | diff --git a/commands/docs/from_tsv.md b/commands/docs/from_tsv.md index 67e4cd5fa00..54ca102e91f 100644 --- a/commands/docs/from_tsv.md +++ b/commands/docs/from_tsv.md @@ -2,7 +2,7 @@ title: from tsv categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Parse text as .tsv and create table. usage: | @@ -49,6 +49,19 @@ Convert tab-separated data to a table ``` +Convert comma-separated data to a table, allowing variable number of columns per row and ignoring headers +```nu +> "value 1 +value 2 description 2" | from tsv --flexible --noheaders +╭───┬─────────┬───────────────╮ +│ # │ column0 │ column1 │ +├───┼─────────┼───────────────┤ +│ 0 │ value 1 │ ❎ │ +│ 1 │ value 2 │ description 2 │ +╰───┴─────────┴───────────────╯ + +``` + Create a tsv file with header columns and open it ```nu > $'c1(char tab)c2(char tab)c3(char nl)1(char tab)2(char tab)3' | save tsv-data | open tsv-data | from tsv diff --git a/commands/docs/from_url.md b/commands/docs/from_url.md index 4e6c19e9728..65daad1d6ee 100644 --- a/commands/docs/from_url.md +++ b/commands/docs/from_url.md @@ -2,7 +2,7 @@ title: from url categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Parse url-encoded string as a record. usage: | diff --git a/commands/docs/from_vcf.md b/commands/docs/from_vcf.md index a9ca8377f55..8036363b456 100644 --- a/commands/docs/from_vcf.md +++ b/commands/docs/from_vcf.md @@ -2,7 +2,7 @@ title: from vcf categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Parse text as .vcf and create table. usage: | diff --git a/commands/docs/from_xlsx.md b/commands/docs/from_xlsx.md index 24247f4965d..2bf8b2f0cda 100644 --- a/commands/docs/from_xlsx.md +++ b/commands/docs/from_xlsx.md @@ -2,7 +2,7 @@ title: from xlsx categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Parse binary Excel(.xlsx) data and create table. usage: | diff --git a/commands/docs/from_xml.md b/commands/docs/from_xml.md index 971cdfca8d0..615e5b1b898 100644 --- a/commands/docs/from_xml.md +++ b/commands/docs/from_xml.md @@ -2,7 +2,7 @@ title: from xml categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Parse text as .xml and create record. usage: | diff --git a/commands/docs/from_yaml.md b/commands/docs/from_yaml.md index cf985c2a10d..0d9553736db 100644 --- a/commands/docs/from_yaml.md +++ b/commands/docs/from_yaml.md @@ -2,7 +2,7 @@ title: from yaml categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Parse text as .yaml/.yml and create table. usage: | diff --git a/commands/docs/from_yml.md b/commands/docs/from_yml.md index 2545d95c038..ddabb80c6dd 100644 --- a/commands/docs/from_yml.md +++ b/commands/docs/from_yml.md @@ -2,7 +2,7 @@ title: from yml categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Parse text as .yaml/.yml and create table. usage: | diff --git a/commands/docs/generate.md b/commands/docs/generate.md index 84bdef8fb7b..80f8a02fa76 100644 --- a/commands/docs/generate.md +++ b/commands/docs/generate.md @@ -2,7 +2,7 @@ title: generate categories: | generators -version: 0.100.0 +version: 0.101.0 generators: | Generate a list of values by successively invoking a closure. usage: | diff --git a/commands/docs/get.md b/commands/docs/get.md index b86a38afbc8..bec6b2eb949 100644 --- a/commands/docs/get.md +++ b/commands/docs/get.md @@ -2,7 +2,7 @@ title: get categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Extract data using a cell path. usage: | diff --git a/commands/docs/glob.md b/commands/docs/glob.md index 7c1f6686ec7..4640d8ad17a 100644 --- a/commands/docs/glob.md +++ b/commands/docs/glob.md @@ -2,7 +2,7 @@ title: glob categories: | filesystem -version: 0.100.0 +version: 0.101.0 filesystem: | Creates a list of files and/or folders based on the glob pattern provided. usage: | diff --git a/commands/docs/grid.md b/commands/docs/grid.md index 2ddb16cd237..be41a206706 100644 --- a/commands/docs/grid.md +++ b/commands/docs/grid.md @@ -2,7 +2,7 @@ title: grid categories: | viewers -version: 0.100.0 +version: 0.101.0 viewers: | Renders the output to a textual terminal grid. usage: | diff --git a/commands/docs/group-by.md b/commands/docs/group-by.md index bf8892fa102..aef6ee9fe38 100644 --- a/commands/docs/group-by.md +++ b/commands/docs/group-by.md @@ -2,7 +2,7 @@ title: group-by categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Splits a list or table into groups, and returns a record containing those groups. usage: | @@ -16,7 +16,7 @@ usage: | ## Signature -```> group-by {flags} (grouper)``` +```> group-by {flags} ...rest``` ## Flags @@ -24,7 +24,7 @@ usage: | ## Parameters - - `grouper`: The path to the column to group on. + - `...rest`: The path to the column to group on. ## Input/output types: @@ -119,6 +119,69 @@ Group bools, whether they are strings or actual bools ╰───────┴───────────────╯ ``` +Group items by multiple columns' values +```nu +> [ + [name, lang, year]; + [andres, rb, "2019"], + [jt, rs, "2019"], + [storm, rs, "2021"] + ] + | group-by lang year +╭────┬─────────────────────────────────────────╮ +│ │ ╭──────┬──────────────────────────────╮ │ +│ rb │ │ │ ╭───┬────────┬──────┬──────╮ │ │ +│ │ │ 2019 │ │ # │ name │ lang │ year │ │ │ +│ │ │ │ ├───┼────────┼──────┼──────┤ │ │ +│ │ │ │ │ 0 │ andres │ rb │ 2019 │ │ │ +│ │ │ │ ╰───┴────────┴──────┴──────╯ │ │ +│ │ ╰──────┴──────────────────────────────╯ │ +│ │ ╭──────┬─────────────────────────────╮ │ +│ rs │ │ │ ╭───┬──────┬──────┬──────╮ │ │ +│ │ │ 2019 │ │ # │ name │ lang │ year │ │ │ +│ │ │ │ ├───┼──────┼──────┼──────┤ │ │ +│ │ │ │ │ 0 │ jt │ rs │ 2019 │ │ │ +│ │ │ │ ╰───┴──────┴──────┴──────╯ │ │ +│ │ │ │ ╭───┬───────┬──────┬──────╮ │ │ +│ │ │ 2021 │ │ # │ name │ lang │ year │ │ │ +│ │ │ │ ├───┼───────┼──────┼──────┤ │ │ +│ │ │ │ │ 0 │ storm │ rs │ 2021 │ │ │ +│ │ │ │ ╰───┴───────┴──────┴──────╯ │ │ +│ │ ╰──────┴─────────────────────────────╯ │ +╰────┴─────────────────────────────────────────╯ +``` + +Group items by multiple columns' values +```nu +> [ + [name, lang, year]; + [andres, rb, "2019"], + [jt, rs, "2019"], + [storm, rs, "2021"] + ] + | group-by lang year --to-table +╭───┬──────┬──────┬──────────────────────────────╮ +│ # │ lang │ year │ items │ +├───┼──────┼──────┼──────────────────────────────┤ +│ 0 │ rb │ 2019 │ ╭───┬────────┬──────┬──────╮ │ +│ │ │ │ │ # │ name │ lang │ year │ │ +│ │ │ │ ├───┼────────┼──────┼──────┤ │ +│ │ │ │ │ 0 │ andres │ rb │ 2019 │ │ +│ │ │ │ ╰───┴────────┴──────┴──────╯ │ +│ 1 │ rs │ 2019 │ ╭───┬──────┬──────┬──────╮ │ +│ │ │ │ │ # │ name │ lang │ year │ │ +│ │ │ │ ├───┼──────┼──────┼──────┤ │ +│ │ │ │ │ 0 │ jt │ rs │ 2019 │ │ +│ │ │ │ ╰───┴──────┴──────┴──────╯ │ +│ 2 │ rs │ 2021 │ ╭───┬───────┬──────┬──────╮ │ +│ │ │ │ │ # │ name │ lang │ year │ │ +│ │ │ │ ├───┼───────┼──────┼──────┤ │ +│ │ │ │ │ 0 │ storm │ rs │ 2021 │ │ +│ │ │ │ ╰───┴───────┴──────┴──────╯ │ +╰───┴──────┴──────┴──────────────────────────────╯ + +``` + ## Notes the group-by command makes some assumptions: - if the input data is not a string, the grouper will convert the key to string but the values will remain in their original format. e.g. with bools, "true" and true would be in the same group (see example). diff --git a/commands/docs/gstat.md b/commands/docs/gstat.md index ac1a47ea74d..6d24c9c3015 100644 --- a/commands/docs/gstat.md +++ b/commands/docs/gstat.md @@ -2,7 +2,7 @@ title: gstat categories: | prompt -version: 0.100.0 +version: 0.101.0 prompt: | Get the git status of a repo usage: | diff --git a/commands/docs/hash.md b/commands/docs/hash.md index 5f77dd5581e..c8d26f84883 100644 --- a/commands/docs/hash.md +++ b/commands/docs/hash.md @@ -2,7 +2,7 @@ title: hash categories: | hash -version: 0.100.0 +version: 0.101.0 hash: | Apply hash function. usage: | diff --git a/commands/docs/hash_md5.md b/commands/docs/hash_md5.md index 4165a47d796..06705ab72a8 100644 --- a/commands/docs/hash_md5.md +++ b/commands/docs/hash_md5.md @@ -2,7 +2,7 @@ title: hash md5 categories: | hash -version: 0.100.0 +version: 0.101.0 hash: | Hash a value using the md5 hash algorithm. usage: | diff --git a/commands/docs/hash_sha256.md b/commands/docs/hash_sha256.md index a59d8bc2760..5c9dadec383 100644 --- a/commands/docs/hash_sha256.md +++ b/commands/docs/hash_sha256.md @@ -2,7 +2,7 @@ title: hash sha256 categories: | hash -version: 0.100.0 +version: 0.101.0 hash: | Hash a value using the sha256 hash algorithm. usage: | diff --git a/commands/docs/headers.md b/commands/docs/headers.md index c8fc61fdb05..21214f9f1fc 100644 --- a/commands/docs/headers.md +++ b/commands/docs/headers.md @@ -2,7 +2,7 @@ title: headers categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Use the first row of the table as column names. usage: | diff --git a/commands/docs/help.md b/commands/docs/help.md index 0d394cd6c1b..632fb33e270 100644 --- a/commands/docs/help.md +++ b/commands/docs/help.md @@ -2,7 +2,7 @@ title: help categories: | core -version: 0.100.0 +version: 0.101.0 core: | Display help information about different parts of Nushell. usage: | diff --git a/commands/docs/help_aliases.md b/commands/docs/help_aliases.md index 3930f1fc971..39d2d0ffb23 100644 --- a/commands/docs/help_aliases.md +++ b/commands/docs/help_aliases.md @@ -2,7 +2,7 @@ title: help aliases categories: | core -version: 0.100.0 +version: 0.101.0 core: | Show help on nushell aliases. usage: | diff --git a/commands/docs/help_commands.md b/commands/docs/help_commands.md index 8f2711cf7c2..4a43b109ac0 100644 --- a/commands/docs/help_commands.md +++ b/commands/docs/help_commands.md @@ -2,7 +2,7 @@ title: help commands categories: | core -version: 0.100.0 +version: 0.101.0 core: | Show help on nushell commands. usage: | diff --git a/commands/docs/help_escapes.md b/commands/docs/help_escapes.md index e0c31440987..35384799aab 100644 --- a/commands/docs/help_escapes.md +++ b/commands/docs/help_escapes.md @@ -2,7 +2,7 @@ title: help escapes categories: | core -version: 0.100.0 +version: 0.101.0 core: | Show help on nushell string escapes. usage: | diff --git a/commands/docs/help_externs.md b/commands/docs/help_externs.md index 63b62d999de..796154775da 100644 --- a/commands/docs/help_externs.md +++ b/commands/docs/help_externs.md @@ -2,7 +2,7 @@ title: help externs categories: | core -version: 0.100.0 +version: 0.101.0 core: | Show help on nushell externs. usage: | diff --git a/commands/docs/help_modules.md b/commands/docs/help_modules.md index 4524a7fa4aa..64cc1f87e5f 100644 --- a/commands/docs/help_modules.md +++ b/commands/docs/help_modules.md @@ -2,7 +2,7 @@ title: help modules categories: | core -version: 0.100.0 +version: 0.101.0 core: | Show help on nushell modules. usage: | diff --git a/commands/docs/help_operators.md b/commands/docs/help_operators.md index fe25ec4b234..065a6b3f916 100644 --- a/commands/docs/help_operators.md +++ b/commands/docs/help_operators.md @@ -2,7 +2,7 @@ title: help operators categories: | core -version: 0.100.0 +version: 0.101.0 core: | Show help on nushell operators. usage: | diff --git a/commands/docs/hide-env.md b/commands/docs/hide-env.md index 206fde8ae6c..8a0459b8178 100644 --- a/commands/docs/hide-env.md +++ b/commands/docs/hide-env.md @@ -2,7 +2,7 @@ title: hide-env categories: | core -version: 0.100.0 +version: 0.101.0 core: | Hide environment variables in the current scope. usage: | diff --git a/commands/docs/hide.md b/commands/docs/hide.md index 7ed8f5d7fdd..a3e5b69f5e6 100644 --- a/commands/docs/hide.md +++ b/commands/docs/hide.md @@ -2,7 +2,7 @@ title: hide categories: | core -version: 0.100.0 +version: 0.101.0 core: | Hide definitions in the current scope. usage: | diff --git a/commands/docs/histogram.md b/commands/docs/histogram.md index 933c896f416..79f1fcc7b5e 100644 --- a/commands/docs/histogram.md +++ b/commands/docs/histogram.md @@ -2,7 +2,7 @@ title: histogram categories: | chart -version: 0.100.0 +version: 0.101.0 chart: | Creates a new table with a histogram based on the column name passed in. usage: | @@ -51,12 +51,12 @@ Compute a histogram for the types of files, with frequency column named freq Compute a histogram for a list of numbers ```nu > [1 2 1] | histogram -╭───┬───────┬───────┬──────────┬────────────┬────────────────────────────────────────────────────────────────────╮ -│ # │ value │ count │ quantile │ percentage │ frequency │ -├───┼───────┼───────┼──────────┼────────────┼────────────────────────────────────────────────────────────────────┤ -│ 0 │ 1 │ 2 │ 0.67 │ 66.67% │ ****************************************************************** │ -│ 1 │ 2 │ 1 │ 0.33 │ 33.33% │ ********************************* │ -╰───┴───────┴───────┴──────────┴────────────┴────────────────────────────────────────────────────────────────────╯ +╭────┬────────┬────────┬───────────┬─────────────┬────────────────────────────────────────────────────────────────────╮ +│ # │ value │ count │ quantile │ percentage │ frequency │ +├────┼────────┼────────┼───────────┼─────────────┼────────────────────────────────────────────────────────────────────┤ +│ 0 │ 1 │ 2 │ 0.67 │ 66.67% │ ****************************************************************** │ +│ 1 │ 2 │ 1 │ 0.33 │ 33.33% │ ********************************* │ +╰────┴────────┴────────┴───────────┴─────────────┴────────────────────────────────────────────────────────────────────╯ ``` diff --git a/commands/docs/history.md b/commands/docs/history.md index b323645fd5f..50eb3c7d828 100644 --- a/commands/docs/history.md +++ b/commands/docs/history.md @@ -2,7 +2,7 @@ title: history categories: | history -version: 0.100.0 +version: 0.101.0 history: | Get the command history. usage: | diff --git a/commands/docs/history_import.md b/commands/docs/history_import.md index 59bb8235790..d40ae02e9fe 100644 --- a/commands/docs/history_import.md +++ b/commands/docs/history_import.md @@ -2,7 +2,7 @@ title: history import categories: | history -version: 0.100.0 +version: 0.101.0 history: | Import command line history usage: | diff --git a/commands/docs/history_session.md b/commands/docs/history_session.md index 959a0615fdf..9ca309b765e 100644 --- a/commands/docs/history_session.md +++ b/commands/docs/history_session.md @@ -2,7 +2,7 @@ title: history session categories: | history -version: 0.100.0 +version: 0.101.0 history: | Get the command history session. usage: | diff --git a/commands/docs/http.md b/commands/docs/http.md index 27ab349c23e..18184768243 100644 --- a/commands/docs/http.md +++ b/commands/docs/http.md @@ -2,7 +2,7 @@ title: http categories: | network -version: 0.100.0 +version: 0.101.0 network: | Various commands for working with http methods. usage: | diff --git a/commands/docs/http_delete.md b/commands/docs/http_delete.md index e8b827ee9c9..31f5fa3aa1a 100644 --- a/commands/docs/http_delete.md +++ b/commands/docs/http_delete.md @@ -2,7 +2,7 @@ title: http delete categories: | network -version: 0.100.0 +version: 0.101.0 network: | Delete the specified resource. usage: | diff --git a/commands/docs/http_get.md b/commands/docs/http_get.md index c5afcbe4628..28816ddefef 100644 --- a/commands/docs/http_get.md +++ b/commands/docs/http_get.md @@ -2,7 +2,7 @@ title: http get categories: | network -version: 0.100.0 +version: 0.101.0 network: | Fetch the contents from a URL. usage: | diff --git a/commands/docs/http_head.md b/commands/docs/http_head.md index 222a65ce089..983cd343bbd 100644 --- a/commands/docs/http_head.md +++ b/commands/docs/http_head.md @@ -2,7 +2,7 @@ title: http head categories: | network -version: 0.100.0 +version: 0.101.0 network: | Get the headers from a URL. usage: | diff --git a/commands/docs/http_options.md b/commands/docs/http_options.md index 239a3739895..8991ae1c195 100644 --- a/commands/docs/http_options.md +++ b/commands/docs/http_options.md @@ -2,7 +2,7 @@ title: http options categories: | network -version: 0.100.0 +version: 0.101.0 network: | Requests permitted communication options for a given URL. usage: | diff --git a/commands/docs/http_patch.md b/commands/docs/http_patch.md index e4b1760a730..3dcacb05711 100644 --- a/commands/docs/http_patch.md +++ b/commands/docs/http_patch.md @@ -2,7 +2,7 @@ title: http patch categories: | network -version: 0.100.0 +version: 0.101.0 network: | Patch a body to a URL. usage: | diff --git a/commands/docs/http_post.md b/commands/docs/http_post.md index 956a00b8397..88c011ace86 100644 --- a/commands/docs/http_post.md +++ b/commands/docs/http_post.md @@ -2,7 +2,7 @@ title: http post categories: | network -version: 0.100.0 +version: 0.101.0 network: | Post a body to a URL. usage: | diff --git a/commands/docs/http_put.md b/commands/docs/http_put.md index a21fba77170..cecbd92445b 100644 --- a/commands/docs/http_put.md +++ b/commands/docs/http_put.md @@ -2,7 +2,7 @@ title: http put categories: | network -version: 0.100.0 +version: 0.101.0 network: | Put a body to a URL. usage: | diff --git a/commands/docs/if.md b/commands/docs/if.md index fa22e74f75f..0c164cc932a 100644 --- a/commands/docs/if.md +++ b/commands/docs/if.md @@ -2,7 +2,7 @@ title: if categories: | core -version: 0.100.0 +version: 0.101.0 core: | Conditionally run a block. usage: | diff --git a/commands/docs/ignore.md b/commands/docs/ignore.md index edf574a81e2..023a84bc4ad 100644 --- a/commands/docs/ignore.md +++ b/commands/docs/ignore.md @@ -2,7 +2,7 @@ title: ignore categories: | core -version: 0.100.0 +version: 0.101.0 core: | Ignore the output of the previous command in the pipeline. usage: | diff --git a/commands/docs/inc.md b/commands/docs/inc.md index 9ef4866f248..1a144fb5bae 100644 --- a/commands/docs/inc.md +++ b/commands/docs/inc.md @@ -2,7 +2,7 @@ title: inc categories: | default -version: 0.100.0 +version: 0.101.0 default: | Increment a value or version. Optionally use the column of a table. usage: | diff --git a/commands/docs/input.md b/commands/docs/input.md index 972f8ec082e..e40a16d8b35 100644 --- a/commands/docs/input.md +++ b/commands/docs/input.md @@ -2,7 +2,7 @@ title: input categories: | platform -version: 0.100.0 +version: 0.101.0 platform: | Get input from the user. usage: | @@ -22,6 +22,7 @@ usage: | - `--bytes-until-any, -u {string}`: read bytes (not text) until any of the given stop bytes is seen - `--numchar, -n {int}`: number of characters to read; suppresses output + - `--default, -d {string}`: default value if no input is provided - `--suppress-output, -s`: don't print keystroke values ## Parameters @@ -49,6 +50,12 @@ Get two characters from the user, and assign to a variable ``` +Get input from the user with default value, and assign to a variable +```nu +> let user_input = (input --default 10) + +``` + ## Subcommands: diff --git a/commands/docs/input_list.md b/commands/docs/input_list.md index 5c040345c9f..8cc55a5dbe3 100644 --- a/commands/docs/input_list.md +++ b/commands/docs/input_list.md @@ -2,7 +2,7 @@ title: input list categories: | platform -version: 0.100.0 +version: 0.101.0 platform: | Interactive list selection. usage: | diff --git a/commands/docs/input_listen.md b/commands/docs/input_listen.md index 64b6552b140..90096561f4d 100644 --- a/commands/docs/input_listen.md +++ b/commands/docs/input_listen.md @@ -2,7 +2,7 @@ title: input listen categories: | platform -version: 0.100.0 +version: 0.101.0 platform: | Listen for user interface event. usage: | diff --git a/commands/docs/insert.md b/commands/docs/insert.md index 9bf972661ba..e28db6bc541 100644 --- a/commands/docs/insert.md +++ b/commands/docs/insert.md @@ -2,7 +2,7 @@ title: insert categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Insert a new column, using an expression or closure to create each row's values. usage: | diff --git a/commands/docs/inspect.md b/commands/docs/inspect.md index 36fae946880..30a7a23c080 100644 --- a/commands/docs/inspect.md +++ b/commands/docs/inspect.md @@ -2,7 +2,7 @@ title: inspect categories: | debug -version: 0.100.0 +version: 0.101.0 debug: | Inspect pipeline results while running a pipeline. usage: | diff --git a/commands/docs/interleave.md b/commands/docs/interleave.md index c58c391fc5f..4c3804acb13 100644 --- a/commands/docs/interleave.md +++ b/commands/docs/interleave.md @@ -2,7 +2,7 @@ title: interleave categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Read multiple streams in parallel and combine them into one stream. usage: | diff --git a/commands/docs/into.md b/commands/docs/into.md index 8a354458a22..2e2359a3143 100644 --- a/commands/docs/into.md +++ b/commands/docs/into.md @@ -2,7 +2,7 @@ title: into categories: | conversions -version: 0.100.0 +version: 0.101.0 conversions: | Commands to convert data from one type to another. usage: | diff --git a/commands/docs/into_binary.md b/commands/docs/into_binary.md index fcb09578239..edbbb9137a8 100644 --- a/commands/docs/into_binary.md +++ b/commands/docs/into_binary.md @@ -2,7 +2,7 @@ title: into binary categories: | conversions -version: 0.100.0 +version: 0.101.0 conversions: | Convert value to a binary primitive. usage: | diff --git a/commands/docs/into_bits.md b/commands/docs/into_bits.md index a115812ff5d..f369af29205 100644 --- a/commands/docs/into_bits.md +++ b/commands/docs/into_bits.md @@ -2,7 +2,7 @@ title: into bits categories: | conversions -version: 0.100.0 +version: 0.101.0 conversions: | Convert value to a binary primitive. usage: | diff --git a/commands/docs/into_bool.md b/commands/docs/into_bool.md index 5a5b84b94e8..0e18be908da 100644 --- a/commands/docs/into_bool.md +++ b/commands/docs/into_bool.md @@ -2,7 +2,7 @@ title: into bool categories: | conversions -version: 0.100.0 +version: 0.101.0 conversions: | Convert value to boolean. usage: | diff --git a/commands/docs/into_cell-path.md b/commands/docs/into_cell-path.md index 9a698006947..7006a964d1e 100644 --- a/commands/docs/into_cell-path.md +++ b/commands/docs/into_cell-path.md @@ -2,7 +2,7 @@ title: into cell-path categories: | conversions -version: 0.100.0 +version: 0.101.0 conversions: | Convert value to a cell-path. usage: | diff --git a/commands/docs/into_datetime.md b/commands/docs/into_datetime.md index 21191d626b3..68d94d877ea 100644 --- a/commands/docs/into_datetime.md +++ b/commands/docs/into_datetime.md @@ -2,7 +2,7 @@ title: into datetime categories: | conversions -version: 0.100.0 +version: 0.101.0 conversions: | Convert text or timestamp into a datetime. usage: | @@ -63,7 +63,7 @@ Sat, 27 Feb 2021 13:55:40 +0000 (3 years ago) Convert non-standard timestamp string, without timezone offset, to datetime with custom formatting ```nu > '16.11.1984 8:00 am' | into datetime --format '%d.%m.%Y %H:%M %P' -Fri, 16 Nov 1984 08:00:00 +0000 (40 years ago) +Fri, 16 Nov 1984 08:00:00 +0800 (40 years ago) ``` Convert nanosecond-precision unix timestamp to a datetime with offset from UTC diff --git a/commands/docs/into_duration.md b/commands/docs/into_duration.md index b1311931f1d..32e22c9b38d 100644 --- a/commands/docs/into_duration.md +++ b/commands/docs/into_duration.md @@ -2,7 +2,7 @@ title: into duration categories: | conversions -version: 0.100.0 +version: 0.101.0 conversions: | Convert value to duration. usage: | diff --git a/commands/docs/into_filesize.md b/commands/docs/into_filesize.md index 5ab10a439fe..32d5550b168 100644 --- a/commands/docs/into_filesize.md +++ b/commands/docs/into_filesize.md @@ -2,7 +2,7 @@ title: into filesize categories: | conversions -version: 0.100.0 +version: 0.101.0 conversions: | Convert value to filesize. usage: | diff --git a/commands/docs/into_float.md b/commands/docs/into_float.md index ae28d6cdb39..4bee3b1fee5 100644 --- a/commands/docs/into_float.md +++ b/commands/docs/into_float.md @@ -2,7 +2,7 @@ title: into float categories: | conversions -version: 0.100.0 +version: 0.101.0 conversions: | Convert data into floating point number. usage: | diff --git a/commands/docs/into_glob.md b/commands/docs/into_glob.md index db2bd705fc3..db0f18c6275 100644 --- a/commands/docs/into_glob.md +++ b/commands/docs/into_glob.md @@ -2,7 +2,7 @@ title: into glob categories: | conversions -version: 0.100.0 +version: 0.101.0 conversions: | Convert value to glob. usage: | diff --git a/commands/docs/into_int.md b/commands/docs/into_int.md index 7c7b6391435..133ad0ed533 100644 --- a/commands/docs/into_int.md +++ b/commands/docs/into_int.md @@ -2,7 +2,7 @@ title: into int categories: | conversions -version: 0.100.0 +version: 0.101.0 conversions: | Convert value to integer. usage: | diff --git a/commands/docs/into_record.md b/commands/docs/into_record.md index c72fa7127e9..0123ad2d302 100644 --- a/commands/docs/into_record.md +++ b/commands/docs/into_record.md @@ -2,7 +2,7 @@ title: into record categories: | conversions -version: 0.100.0 +version: 0.101.0 conversions: | Convert value to record. usage: | @@ -92,3 +92,9 @@ convert date to record │ timezone │ +02:00 │ ╰─────────────┴────────╯ ``` + +convert date components to table columns +```nu +> 2020-04-12T22:10:57+02:00 | into record | transpose | transpose -r + +``` diff --git a/commands/docs/into_sqlite.md b/commands/docs/into_sqlite.md index 25a79705b3e..99ce2b3bddc 100644 --- a/commands/docs/into_sqlite.md +++ b/commands/docs/into_sqlite.md @@ -2,7 +2,7 @@ title: into sqlite categories: | conversions -version: 0.100.0 +version: 0.101.0 conversions: | Convert table into a SQLite database. usage: | diff --git a/commands/docs/into_string.md b/commands/docs/into_string.md index f2bac1f4a92..0e744d84601 100644 --- a/commands/docs/into_string.md +++ b/commands/docs/into_string.md @@ -2,7 +2,7 @@ title: into string categories: | conversions -version: 0.100.0 +version: 0.101.0 conversions: | Convert value to string. usage: | diff --git a/commands/docs/into_value.md b/commands/docs/into_value.md index 8061d830fa6..824817523ba 100644 --- a/commands/docs/into_value.md +++ b/commands/docs/into_value.md @@ -2,7 +2,7 @@ title: into value categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Infer Nushell datatype for each cell. usage: | diff --git a/commands/docs/is-admin.md b/commands/docs/is-admin.md index 3e0f050d249..30a9e825a8f 100644 --- a/commands/docs/is-admin.md +++ b/commands/docs/is-admin.md @@ -2,7 +2,7 @@ title: is-admin categories: | core -version: 0.100.0 +version: 0.101.0 core: | Check if nushell is running with administrator or root privileges. usage: | diff --git a/commands/docs/is-empty.md b/commands/docs/is-empty.md index a0df2a68185..d92383b3dc4 100644 --- a/commands/docs/is-empty.md +++ b/commands/docs/is-empty.md @@ -2,7 +2,7 @@ title: is-empty categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Check for empty values. usage: | diff --git a/commands/docs/is-not-empty.md b/commands/docs/is-not-empty.md index 980825d7324..a6ab6adadb9 100644 --- a/commands/docs/is-not-empty.md +++ b/commands/docs/is-not-empty.md @@ -2,7 +2,7 @@ title: is-not-empty categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Check for non-empty values. usage: | diff --git a/commands/docs/is-terminal.md b/commands/docs/is-terminal.md index ed21f91c528..d718f8091ab 100644 --- a/commands/docs/is-terminal.md +++ b/commands/docs/is-terminal.md @@ -2,7 +2,7 @@ title: is-terminal categories: | platform -version: 0.100.0 +version: 0.101.0 platform: | Check if stdin, stdout, or stderr is a terminal. usage: | diff --git a/commands/docs/items.md b/commands/docs/items.md index 16c0c07f77d..f8cd65c3a78 100644 --- a/commands/docs/items.md +++ b/commands/docs/items.md @@ -2,7 +2,7 @@ title: items categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Given a record, iterate on each pair of column name and associated value. usage: | diff --git a/commands/docs/join.md b/commands/docs/join.md index a95b2aca207..a50242af8f7 100644 --- a/commands/docs/join.md +++ b/commands/docs/join.md @@ -2,7 +2,7 @@ title: join categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Join two tables. usage: | diff --git a/commands/docs/keybindings.md b/commands/docs/keybindings.md index ad4000b9ed8..d24215817b2 100644 --- a/commands/docs/keybindings.md +++ b/commands/docs/keybindings.md @@ -2,7 +2,7 @@ title: keybindings categories: | platform -version: 0.100.0 +version: 0.101.0 platform: | Keybindings related commands. usage: | diff --git a/commands/docs/keybindings_default.md b/commands/docs/keybindings_default.md index d28062eb52d..86d8e3a7804 100644 --- a/commands/docs/keybindings_default.md +++ b/commands/docs/keybindings_default.md @@ -2,7 +2,7 @@ title: keybindings default categories: | platform -version: 0.100.0 +version: 0.101.0 platform: | List default keybindings. usage: | diff --git a/commands/docs/keybindings_list.md b/commands/docs/keybindings_list.md index 1007213f0f9..6df7f13a8bb 100644 --- a/commands/docs/keybindings_list.md +++ b/commands/docs/keybindings_list.md @@ -2,7 +2,7 @@ title: keybindings list categories: | platform -version: 0.100.0 +version: 0.101.0 platform: | List available options that can be used to create keybindings. usage: | diff --git a/commands/docs/keybindings_listen.md b/commands/docs/keybindings_listen.md index 0f3c601a578..efdd297d185 100644 --- a/commands/docs/keybindings_listen.md +++ b/commands/docs/keybindings_listen.md @@ -2,7 +2,7 @@ title: keybindings listen categories: | platform -version: 0.100.0 +version: 0.101.0 platform: | Get input from the user. usage: | diff --git a/commands/docs/kill.md b/commands/docs/kill.md index 4267aef7176..4639c7d67b5 100644 --- a/commands/docs/kill.md +++ b/commands/docs/kill.md @@ -2,7 +2,7 @@ title: kill categories: | platform -version: 0.100.0 +version: 0.101.0 platform: | Kill a process using the process id. usage: | diff --git a/commands/docs/last.md b/commands/docs/last.md index e8ebb93504c..211647ee676 100644 --- a/commands/docs/last.md +++ b/commands/docs/last.md @@ -2,7 +2,7 @@ title: last categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Return only the last several rows of the input. Counterpart of `first`. Opposite of `drop`. usage: | diff --git a/commands/docs/length.md b/commands/docs/length.md index 2776c1740a3..9f4bd3aacc6 100644 --- a/commands/docs/length.md +++ b/commands/docs/length.md @@ -2,7 +2,7 @@ title: length categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Count the number of items in an input list, rows in a table, or bytes in binary data. usage: | @@ -25,6 +25,7 @@ usage: | | --------- | ------ | | binary | int | | list\ | int | +| nothing | int | ## Examples Count the number of items in a list @@ -44,3 +45,9 @@ Count the number of bytes in binary data > 0x[01 02] | length 2 ``` + +Count the length a null value +```nu +> null | length +0 +``` diff --git a/commands/docs/let-env.md b/commands/docs/let-env.md index 2127b1b3d11..e7a3f646f0c 100644 --- a/commands/docs/let-env.md +++ b/commands/docs/let-env.md @@ -2,7 +2,7 @@ title: let-env categories: | removed -version: 0.100.0 +version: 0.101.0 removed: | `let-env FOO = ...` has been removed, use `$env.FOO = ...` instead. usage: | diff --git a/commands/docs/let.md b/commands/docs/let.md index 372016ef54b..c3496136c0b 100644 --- a/commands/docs/let.md +++ b/commands/docs/let.md @@ -2,7 +2,7 @@ title: let categories: | core -version: 0.100.0 +version: 0.101.0 core: | Create a variable and give it a value. usage: | diff --git a/commands/docs/lines.md b/commands/docs/lines.md index bb3e3ff497d..866130bc750 100644 --- a/commands/docs/lines.md +++ b/commands/docs/lines.md @@ -2,7 +2,7 @@ title: lines categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Converts input to lines. usage: | diff --git a/commands/docs/load-env.md b/commands/docs/load-env.md index fde2ab55e44..bde70d3a4fc 100644 --- a/commands/docs/load-env.md +++ b/commands/docs/load-env.md @@ -2,7 +2,7 @@ title: load-env categories: | filesystem -version: 0.100.0 +version: 0.101.0 filesystem: | Loads an environment update from a record. usage: | diff --git a/commands/docs/loop.md b/commands/docs/loop.md index b86227a3948..6ba3b67eaf9 100644 --- a/commands/docs/loop.md +++ b/commands/docs/loop.md @@ -2,7 +2,7 @@ title: loop categories: | core -version: 0.100.0 +version: 0.101.0 core: | Run a block in a loop. usage: | diff --git a/commands/docs/ls.md b/commands/docs/ls.md index 0d76cf1fdce..8e0798e9972 100644 --- a/commands/docs/ls.md +++ b/commands/docs/ls.md @@ -2,7 +2,7 @@ title: ls categories: | filesystem -version: 0.100.0 +version: 0.101.0 filesystem: | List the filenames, sizes, and modification times of items in a directory. usage: | diff --git a/commands/docs/match.md b/commands/docs/match.md index cbf54d7d423..889666bfa51 100644 --- a/commands/docs/match.md +++ b/commands/docs/match.md @@ -2,7 +2,7 @@ title: match categories: | core -version: 0.100.0 +version: 0.101.0 core: | Conditionally run a block on a matched value. usage: | diff --git a/commands/docs/math.md b/commands/docs/math.md index d4b1f8e2027..6bbf5955d31 100644 --- a/commands/docs/math.md +++ b/commands/docs/math.md @@ -2,7 +2,7 @@ title: math categories: | math -version: 0.100.0 +version: 0.101.0 math: | Use mathematical functions as aggregate functions on a list of numbers or tables. usage: | diff --git a/commands/docs/math_abs.md b/commands/docs/math_abs.md index 9817f6c2543..8140977bf1d 100644 --- a/commands/docs/math_abs.md +++ b/commands/docs/math_abs.md @@ -2,7 +2,7 @@ title: math abs categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the absolute value of a number. usage: | diff --git a/commands/docs/math_arccos.md b/commands/docs/math_arccos.md index 900fde5585a..bbd1897845e 100644 --- a/commands/docs/math_arccos.md +++ b/commands/docs/math_arccos.md @@ -2,7 +2,7 @@ title: math arccos categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the arccosine of the number. usage: | diff --git a/commands/docs/math_arccosh.md b/commands/docs/math_arccosh.md index ee48a73fff2..ef5b467baff 100644 --- a/commands/docs/math_arccosh.md +++ b/commands/docs/math_arccosh.md @@ -2,7 +2,7 @@ title: math arccosh categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the inverse of the hyperbolic cosine function. usage: | diff --git a/commands/docs/math_arcsin.md b/commands/docs/math_arcsin.md index f82a70f27df..5716cfdbef0 100644 --- a/commands/docs/math_arcsin.md +++ b/commands/docs/math_arcsin.md @@ -2,7 +2,7 @@ title: math arcsin categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the arcsine of the number. usage: | diff --git a/commands/docs/math_arcsinh.md b/commands/docs/math_arcsinh.md index c3ed1ad0a59..ce386c7e58f 100644 --- a/commands/docs/math_arcsinh.md +++ b/commands/docs/math_arcsinh.md @@ -2,7 +2,7 @@ title: math arcsinh categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the inverse of the hyperbolic sine function. usage: | diff --git a/commands/docs/math_arctan.md b/commands/docs/math_arctan.md index a0b6659ffc0..54c7f39ad49 100644 --- a/commands/docs/math_arctan.md +++ b/commands/docs/math_arctan.md @@ -2,7 +2,7 @@ title: math arctan categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the arctangent of the number. usage: | diff --git a/commands/docs/math_arctanh.md b/commands/docs/math_arctanh.md index bc344682ac9..0564b16f73c 100644 --- a/commands/docs/math_arctanh.md +++ b/commands/docs/math_arctanh.md @@ -2,7 +2,7 @@ title: math arctanh categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the inverse of the hyperbolic tangent function. usage: | diff --git a/commands/docs/math_avg.md b/commands/docs/math_avg.md index 6ef2f6e20ae..5a3a81b2717 100644 --- a/commands/docs/math_avg.md +++ b/commands/docs/math_avg.md @@ -2,7 +2,7 @@ title: math avg categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the average of a list of numbers. usage: | diff --git a/commands/docs/math_ceil.md b/commands/docs/math_ceil.md index c5357239dc9..804be7d5f48 100644 --- a/commands/docs/math_ceil.md +++ b/commands/docs/math_ceil.md @@ -2,7 +2,7 @@ title: math ceil categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the ceil of a number (smallest integer greater than or equal to that number). usage: | diff --git a/commands/docs/math_cos.md b/commands/docs/math_cos.md index 5203f78e58e..bcba7ba6970 100644 --- a/commands/docs/math_cos.md +++ b/commands/docs/math_cos.md @@ -2,7 +2,7 @@ title: math cos categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the cosine of the number. usage: | diff --git a/commands/docs/math_cosh.md b/commands/docs/math_cosh.md index be0a5cd5084..bf9006174a8 100644 --- a/commands/docs/math_cosh.md +++ b/commands/docs/math_cosh.md @@ -2,7 +2,7 @@ title: math cosh categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the hyperbolic cosine of the number. usage: | diff --git a/commands/docs/math_exp.md b/commands/docs/math_exp.md index 2f0064a5963..3fb426f64e4 100644 --- a/commands/docs/math_exp.md +++ b/commands/docs/math_exp.md @@ -2,7 +2,7 @@ title: math exp categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns e raised to the power of x. usage: | diff --git a/commands/docs/math_floor.md b/commands/docs/math_floor.md index 5655e0182b8..d5f7cb30a4b 100644 --- a/commands/docs/math_floor.md +++ b/commands/docs/math_floor.md @@ -2,7 +2,7 @@ title: math floor categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the floor of a number (largest integer less than or equal to that number). usage: | diff --git a/commands/docs/math_ln.md b/commands/docs/math_ln.md index f1e36bb74a0..4f825ed609f 100644 --- a/commands/docs/math_ln.md +++ b/commands/docs/math_ln.md @@ -2,7 +2,7 @@ title: math ln categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the natural logarithm. Base: (math e). usage: | diff --git a/commands/docs/math_log.md b/commands/docs/math_log.md index 719e4d88c76..6b3b0a4af78 100644 --- a/commands/docs/math_log.md +++ b/commands/docs/math_log.md @@ -2,7 +2,7 @@ title: math log categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the logarithm for an arbitrary base. usage: | diff --git a/commands/docs/math_max.md b/commands/docs/math_max.md index 73b2ac00e1c..635bc6db3de 100644 --- a/commands/docs/math_max.md +++ b/commands/docs/math_max.md @@ -2,7 +2,7 @@ title: math max categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the maximum of a list of values, or of columns in a table. usage: | diff --git a/commands/docs/math_median.md b/commands/docs/math_median.md index a38bed5079f..4883728aae4 100644 --- a/commands/docs/math_median.md +++ b/commands/docs/math_median.md @@ -2,7 +2,7 @@ title: math median categories: | math -version: 0.100.0 +version: 0.101.0 math: | Computes the median of a list of numbers. usage: | diff --git a/commands/docs/math_min.md b/commands/docs/math_min.md index 8980693a54a..95fe633fd3f 100644 --- a/commands/docs/math_min.md +++ b/commands/docs/math_min.md @@ -2,7 +2,7 @@ title: math min categories: | math -version: 0.100.0 +version: 0.101.0 math: | Finds the minimum within a list of values or tables. usage: | diff --git a/commands/docs/math_mode.md b/commands/docs/math_mode.md index 5d8d61bd0e1..1ae7c55d6f5 100644 --- a/commands/docs/math_mode.md +++ b/commands/docs/math_mode.md @@ -2,7 +2,7 @@ title: math mode categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the most frequent element(s) from a list of numbers or tables. usage: | diff --git a/commands/docs/math_product.md b/commands/docs/math_product.md index da1fb43a023..b8851e5f764 100644 --- a/commands/docs/math_product.md +++ b/commands/docs/math_product.md @@ -2,7 +2,7 @@ title: math product categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the product of a list of numbers or the products of each column of a table. usage: | diff --git a/commands/docs/math_round.md b/commands/docs/math_round.md index c7bfcdeb019..17f1677a2d2 100644 --- a/commands/docs/math_round.md +++ b/commands/docs/math_round.md @@ -2,7 +2,7 @@ title: math round categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the input number rounded to the specified precision. usage: | diff --git a/commands/docs/math_sin.md b/commands/docs/math_sin.md index 9358683285c..65cdd67567a 100644 --- a/commands/docs/math_sin.md +++ b/commands/docs/math_sin.md @@ -2,7 +2,7 @@ title: math sin categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the sine of the number. usage: | diff --git a/commands/docs/math_sinh.md b/commands/docs/math_sinh.md index cc855e73163..a0b676ee104 100644 --- a/commands/docs/math_sinh.md +++ b/commands/docs/math_sinh.md @@ -2,7 +2,7 @@ title: math sinh categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the hyperbolic sine of the number. usage: | diff --git a/commands/docs/math_sqrt.md b/commands/docs/math_sqrt.md index 1eda85fcfa7..112e01c4cf8 100644 --- a/commands/docs/math_sqrt.md +++ b/commands/docs/math_sqrt.md @@ -2,7 +2,7 @@ title: math sqrt categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the square root of the input number. usage: | diff --git a/commands/docs/math_stddev.md b/commands/docs/math_stddev.md index f069744fdcf..b689c5d232e 100644 --- a/commands/docs/math_stddev.md +++ b/commands/docs/math_stddev.md @@ -2,7 +2,7 @@ title: math stddev categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the standard deviation of a list of numbers, or of each column in a table. usage: | diff --git a/commands/docs/math_sum.md b/commands/docs/math_sum.md index 14391e1591e..d58a2e45f2b 100644 --- a/commands/docs/math_sum.md +++ b/commands/docs/math_sum.md @@ -2,7 +2,7 @@ title: math sum categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the sum of a list of numbers or of each column in a table. usage: | diff --git a/commands/docs/math_tan.md b/commands/docs/math_tan.md index a58f92048d0..6cac18fbeaa 100644 --- a/commands/docs/math_tan.md +++ b/commands/docs/math_tan.md @@ -2,7 +2,7 @@ title: math tan categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the tangent of the number. usage: | diff --git a/commands/docs/math_tanh.md b/commands/docs/math_tanh.md index 93019fc14df..e7de8550621 100644 --- a/commands/docs/math_tanh.md +++ b/commands/docs/math_tanh.md @@ -2,7 +2,7 @@ title: math tanh categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the hyperbolic tangent of the number. usage: | diff --git a/commands/docs/math_variance.md b/commands/docs/math_variance.md index fad23a35261..adc8de7e0b0 100644 --- a/commands/docs/math_variance.md +++ b/commands/docs/math_variance.md @@ -2,7 +2,7 @@ title: math variance categories: | math -version: 0.100.0 +version: 0.101.0 math: | Returns the variance of a list of numbers or of each column in a table. usage: | diff --git a/commands/docs/merge.md b/commands/docs/merge.md index 105dccdc1c5..ea0fb044fe4 100644 --- a/commands/docs/merge.md +++ b/commands/docs/merge.md @@ -2,7 +2,7 @@ title: merge categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Merge the input with a record or table, overwriting values in matching columns. usage: | @@ -70,4 +70,10 @@ You may provide a column structure to merge When merging tables, row 0 of the input table is overwritten with values from row 0 of the provided table, then -repeating this process with row 1, and so on. \ No newline at end of file +repeating this process with row 1, and so on. + +## Subcommands: + +| name | description | type | +| -------------------------------------------- | --------------------------------------------------------------------------------------- | -------- | +| [`merge deep`](/commands/docs/merge_deep.md) | Merge the input with a record or table, recursively merging values in matching columns. | built-in | diff --git a/commands/docs/merge_deep.md b/commands/docs/merge_deep.md new file mode 100644 index 00000000000..fbba9a79064 --- /dev/null +++ b/commands/docs/merge_deep.md @@ -0,0 +1,103 @@ +--- +title: merge deep +categories: | + filters +version: 0.101.0 +filters: | + Merge the input with a record or table, recursively merging values in matching columns. +usage: | + Merge the input with a record or table, recursively merging values in matching columns. +--- + + +# `merge deep` for [filters](/commands/categories/filters.md) + +
Merge the input with a record or table, recursively merging values in matching columns.
+ +## Signature + +```> merge deep {flags} (value)``` + +## Flags + + - `--strategy, -s {string}`: The list merging strategy to use. One of: table (default), overwrite, append, prepend + +## Parameters + + - `value`: The new value to merge with. + + +## Input/output types: + +| input | output | +| ------ | ------ | +| record | record | +| table | table | +## Examples + +Merge two records recursively +```nu +> {a: 1, b: {c: 2, d: 3}} | merge deep {b: {d: 4, e: 5}} +╭───┬───────────╮ +│ a │ 1 │ +│ │ ╭───┬───╮ │ +│ b │ │ c │ 2 │ │ +│ │ │ d │ 4 │ │ +│ │ │ e │ 5 │ │ +│ │ ╰───┴───╯ │ +╰───┴───────────╯ +``` + +Merge two tables +```nu +> [{columnA: 0, columnB: [{B1: 1}]}] | merge deep [{columnB: [{B2: 2}]}] +╭───┬─────────┬─────────────────╮ +│ # │ columnA │ columnB │ +├───┼─────────┼─────────────────┤ +│ 0 │ 0 │ ╭───┬────┬────╮ │ +│ │ │ │ # │ B1 │ B2 │ │ +│ │ │ ├───┼────┼────┤ │ +│ │ │ │ 0 │ 1 │ 2 │ │ +│ │ │ ╰───┴────┴────╯ │ +╰───┴─────────┴─────────────────╯ + +``` + +Merge two records and their inner tables +```nu +> {inner: [{a: 1}, {b: 2}]} | merge deep {inner: [{c: 3}]} +╭───────┬──────────────────────╮ +│ │ ╭───┬────┬────┬────╮ │ +│ inner │ │ # │ a │ c │ b │ │ +│ │ ├───┼────┼────┼────┤ │ +│ │ │ 0 │ 1 │ 3 │ ❎ │ │ +│ │ │ 1 │ ❎ │ ❎ │ 2 │ │ +│ │ ╰───┴────┴────┴────╯ │ +╰───────┴──────────────────────╯ +``` + +Merge two records, appending their inner tables +```nu +> {inner: [{a: 1}, {b: 2}]} | merge deep {inner: [{c: 3}]} --strategy=append +╭───────┬──────────────────────╮ +│ │ ╭───┬────┬────┬────╮ │ +│ inner │ │ # │ a │ b │ c │ │ +│ │ ├───┼────┼────┼────┤ │ +│ │ │ 0 │ 1 │ ❎ │ ❎ │ │ +│ │ │ 1 │ ❎ │ 2 │ ❎ │ │ +│ │ │ 2 │ ❎ │ ❎ │ 3 │ │ +│ │ ╰───┴────┴────┴────╯ │ +╰───────┴──────────────────────╯ +``` + +## Notes +The way that key-value pairs which exist in both the input and the argument are merged depends on their types. + +Scalar values (like numbers and strings) in the input are overwritten by the corresponding value from the argument. +Records in the input are merged similarly to the merge command, but recursing rather than overwriting inner records. + +The way lists and tables are merged is controlled by the `--strategy` flag: + - table: Merges tables element-wise, similarly to the merge command. Non-table lists are overwritten. + - overwrite: Lists and tables are overwritten with their corresponding value from the argument, similarly to scalars. + - append: Lists and tables in the input are appended with the corresponding list from the argument. + - prepend: Lists and tables in the input are prepended with the corresponding list from the argument. \ No newline at end of file diff --git a/commands/docs/metadata.md b/commands/docs/metadata.md index 06a03f74ee0..ac98882913a 100644 --- a/commands/docs/metadata.md +++ b/commands/docs/metadata.md @@ -2,7 +2,7 @@ title: metadata categories: | debug -version: 0.100.0 +version: 0.101.0 debug: | Get the metadata for items in the stream. usage: | diff --git a/commands/docs/metadata_access.md b/commands/docs/metadata_access.md index eab15c9b532..7d5e52378ac 100644 --- a/commands/docs/metadata_access.md +++ b/commands/docs/metadata_access.md @@ -2,7 +2,7 @@ title: metadata access categories: | debug -version: 0.100.0 +version: 0.101.0 debug: | Access the metadata for the input stream within a closure. usage: | diff --git a/commands/docs/metadata_set.md b/commands/docs/metadata_set.md index 0e7d614b2b4..0762e9aef2e 100644 --- a/commands/docs/metadata_set.md +++ b/commands/docs/metadata_set.md @@ -2,7 +2,7 @@ title: metadata set categories: | debug -version: 0.100.0 +version: 0.101.0 debug: | Set the metadata for items in the stream. usage: | diff --git a/commands/docs/mkdir.md b/commands/docs/mkdir.md index 18e09bb9d7a..c12398c8228 100644 --- a/commands/docs/mkdir.md +++ b/commands/docs/mkdir.md @@ -2,7 +2,7 @@ title: mkdir categories: | filesystem -version: 0.100.0 +version: 0.101.0 filesystem: | Create directories, with intermediary directories if required using uutils/coreutils mkdir. usage: | diff --git a/commands/docs/mktemp.md b/commands/docs/mktemp.md index 867ea2857b9..030b2d5fc88 100644 --- a/commands/docs/mktemp.md +++ b/commands/docs/mktemp.md @@ -2,7 +2,7 @@ title: mktemp categories: | filesystem -version: 0.100.0 +version: 0.101.0 filesystem: | Create temporary files or directories using uutils/coreutils mktemp. usage: | diff --git a/commands/docs/module.md b/commands/docs/module.md index b89b9cde094..0b10a054087 100644 --- a/commands/docs/module.md +++ b/commands/docs/module.md @@ -2,7 +2,7 @@ title: module categories: | core -version: 0.100.0 +version: 0.101.0 core: | Define a custom module. usage: | diff --git a/commands/docs/move.md b/commands/docs/move.md index 849449c7035..82d3c956d57 100644 --- a/commands/docs/move.md +++ b/commands/docs/move.md @@ -2,7 +2,7 @@ title: move categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Move columns before or after other columns. usage: | diff --git a/commands/docs/mut.md b/commands/docs/mut.md index 401a5c15851..a587f71e6d2 100644 --- a/commands/docs/mut.md +++ b/commands/docs/mut.md @@ -2,7 +2,7 @@ title: mut categories: | core -version: 0.100.0 +version: 0.101.0 core: | Create a mutable variable and give it a value. usage: | diff --git a/commands/docs/mv.md b/commands/docs/mv.md index 653c0370fef..f4680276e2c 100644 --- a/commands/docs/mv.md +++ b/commands/docs/mv.md @@ -2,7 +2,7 @@ title: mv categories: | filesystem -version: 0.100.0 +version: 0.101.0 filesystem: | Move files or directories using uutils/coreutils mv. usage: | diff --git a/commands/docs/nu-check.md b/commands/docs/nu-check.md index 82e866feadc..fda1d13e0a4 100644 --- a/commands/docs/nu-check.md +++ b/commands/docs/nu-check.md @@ -2,7 +2,7 @@ title: nu-check categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Validate and parse input content. usage: | diff --git a/commands/docs/nu-highlight.md b/commands/docs/nu-highlight.md index ce06671aae6..6d8e19a8a3b 100644 --- a/commands/docs/nu-highlight.md +++ b/commands/docs/nu-highlight.md @@ -2,7 +2,7 @@ title: nu-highlight categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Syntax highlight the input string. usage: | diff --git a/commands/docs/open.md b/commands/docs/open.md index 75f893e3548..e4399ddc58e 100644 --- a/commands/docs/open.md +++ b/commands/docs/open.md @@ -2,7 +2,7 @@ title: open categories: | filesystem -version: 0.100.0 +version: 0.101.0 filesystem: | Load a file into a cell, converting to table if possible (avoid by appending '--raw'). usage: | diff --git a/commands/docs/overlay.md b/commands/docs/overlay.md index d6c1325721b..73937d70d62 100644 --- a/commands/docs/overlay.md +++ b/commands/docs/overlay.md @@ -2,7 +2,7 @@ title: overlay categories: | core -version: 0.100.0 +version: 0.101.0 core: | Commands for manipulating overlays. usage: | diff --git a/commands/docs/overlay_hide.md b/commands/docs/overlay_hide.md index 31e34c132d7..3b78b62b493 100644 --- a/commands/docs/overlay_hide.md +++ b/commands/docs/overlay_hide.md @@ -2,7 +2,7 @@ title: overlay hide categories: | core -version: 0.100.0 +version: 0.101.0 core: | Hide an active overlay. usage: | diff --git a/commands/docs/overlay_list.md b/commands/docs/overlay_list.md index ee81ea373a1..e4a68bc55bb 100644 --- a/commands/docs/overlay_list.md +++ b/commands/docs/overlay_list.md @@ -2,7 +2,7 @@ title: overlay list categories: | core -version: 0.100.0 +version: 0.101.0 core: | List all active overlays. usage: | diff --git a/commands/docs/overlay_new.md b/commands/docs/overlay_new.md index a42d40372e9..ea02970408c 100644 --- a/commands/docs/overlay_new.md +++ b/commands/docs/overlay_new.md @@ -2,7 +2,7 @@ title: overlay new categories: | core -version: 0.100.0 +version: 0.101.0 core: | Create an empty overlay. usage: | diff --git a/commands/docs/overlay_use.md b/commands/docs/overlay_use.md index f26fd2147db..23faab65a93 100644 --- a/commands/docs/overlay_use.md +++ b/commands/docs/overlay_use.md @@ -2,7 +2,7 @@ title: overlay use categories: | core -version: 0.100.0 +version: 0.101.0 core: | Use definitions from a module as an overlay. usage: | diff --git a/commands/docs/panic.md b/commands/docs/panic.md index 67cdcce2bb0..2c01741ec1a 100644 --- a/commands/docs/panic.md +++ b/commands/docs/panic.md @@ -2,7 +2,7 @@ title: panic categories: | debug -version: 0.100.0 +version: 0.101.0 debug: | Causes nushell to panic. usage: | diff --git a/commands/docs/par-each.md b/commands/docs/par-each.md index fbc9dbe9033..05ce604e53b 100644 --- a/commands/docs/par-each.md +++ b/commands/docs/par-each.md @@ -2,7 +2,7 @@ title: par-each categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Run a closure on each row of the input list in parallel, creating a new list with the results. usage: | diff --git a/commands/docs/parse.md b/commands/docs/parse.md index 32059b230b8..775dc312b95 100644 --- a/commands/docs/parse.md +++ b/commands/docs/parse.md @@ -2,7 +2,7 @@ title: parse categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Parse columns from string data using a simple pattern or a supplied regular expression. usage: | diff --git a/commands/docs/path.md b/commands/docs/path.md index bffb2de15a5..89fe9500e93 100644 --- a/commands/docs/path.md +++ b/commands/docs/path.md @@ -2,7 +2,7 @@ title: path categories: | path -version: 0.100.0 +version: 0.101.0 path: | Explore and manipulate paths. usage: | @@ -43,14 +43,15 @@ the path literal. ## Subcommands: -| name | description | type | -| -------------------------------------------------------- | ----------------------------------------------------------------------- | -------- | -| [`path basename`](/commands/docs/path_basename.md) | Get the final component of a path. | built-in | -| [`path dirname`](/commands/docs/path_dirname.md) | Get the parent directory of a path. | built-in | -| [`path exists`](/commands/docs/path_exists.md) | Check whether a path exists. | built-in | -| [`path expand`](/commands/docs/path_expand.md) | Try to expand a path to its absolute form. | built-in | -| [`path join`](/commands/docs/path_join.md) | Join a structured path or a list of path parts. | built-in | -| [`path parse`](/commands/docs/path_parse.md) | Convert a path into structured data. | built-in | -| [`path relative-to`](/commands/docs/path_relative-to.md) | Express a path as relative to another path. | built-in | -| [`path split`](/commands/docs/path_split.md) | Split a path into a list based on the system's path separator. | built-in | -| [`path type`](/commands/docs/path_type.md) | Get the type of the object a path refers to (e.g., file, dir, symlink). | built-in | \ No newline at end of file +| name | description | type | +| -------------------------------------------------------- | ------------------------------------------------------------------------------------ | -------- | +| [`path basename`](/commands/docs/path_basename.md) | Get the final component of a path. | built-in | +| [`path dirname`](/commands/docs/path_dirname.md) | Get the parent directory of a path. | built-in | +| [`path exists`](/commands/docs/path_exists.md) | Check whether a path exists. | built-in | +| [`path expand`](/commands/docs/path_expand.md) | Try to expand a path to its absolute form. | built-in | +| [`path join`](/commands/docs/path_join.md) | Join a structured path or a list of path parts. | built-in | +| [`path parse`](/commands/docs/path_parse.md) | Convert a path into structured data. | built-in | +| [`path relative-to`](/commands/docs/path_relative-to.md) | Express a path as relative to another path. | built-in | +| [`path self`](/commands/docs/path_self.md) | Get the absolute path of the script or module containing this command at parse time. | built-in | +| [`path split`](/commands/docs/path_split.md) | Split a path into a list based on the system's path separator. | built-in | +| [`path type`](/commands/docs/path_type.md) | Get the type of the object a path refers to (e.g., file, dir, symlink). | built-in | \ No newline at end of file diff --git a/commands/docs/path_basename.md b/commands/docs/path_basename.md index b34d8a8ef6c..57a83e622db 100644 --- a/commands/docs/path_basename.md +++ b/commands/docs/path_basename.md @@ -2,7 +2,7 @@ title: path basename categories: | path -version: 0.100.0 +version: 0.101.0 path: | Get the final component of a path. usage: | diff --git a/commands/docs/path_dirname.md b/commands/docs/path_dirname.md index 194524fba6c..d0ab9b07bd4 100644 --- a/commands/docs/path_dirname.md +++ b/commands/docs/path_dirname.md @@ -2,7 +2,7 @@ title: path dirname categories: | path -version: 0.100.0 +version: 0.101.0 path: | Get the parent directory of a path. usage: | diff --git a/commands/docs/path_exists.md b/commands/docs/path_exists.md index bdc32303b0a..770764f4dca 100644 --- a/commands/docs/path_exists.md +++ b/commands/docs/path_exists.md @@ -2,7 +2,7 @@ title: path exists categories: | path -version: 0.100.0 +version: 0.101.0 path: | Check whether a path exists. usage: | diff --git a/commands/docs/path_expand.md b/commands/docs/path_expand.md index 2d80ee1f2e2..a4cabcb7fc2 100644 --- a/commands/docs/path_expand.md +++ b/commands/docs/path_expand.md @@ -2,7 +2,7 @@ title: path expand categories: | path -version: 0.100.0 +version: 0.101.0 path: | Try to expand a path to its absolute form. usage: | diff --git a/commands/docs/path_join.md b/commands/docs/path_join.md index 962f6ce3c47..e645de22ee0 100644 --- a/commands/docs/path_join.md +++ b/commands/docs/path_join.md @@ -2,7 +2,7 @@ title: path join categories: | path -version: 0.100.0 +version: 0.101.0 path: | Join a structured path or a list of path parts. usage: | diff --git a/commands/docs/path_parse.md b/commands/docs/path_parse.md index 7af164c8690..ed80700b373 100644 --- a/commands/docs/path_parse.md +++ b/commands/docs/path_parse.md @@ -2,7 +2,7 @@ title: path parse categories: | path -version: 0.100.0 +version: 0.101.0 path: | Convert a path into structured data. usage: | diff --git a/commands/docs/path_relative-to.md b/commands/docs/path_relative-to.md index 99a0c0b70ca..037c4390a58 100644 --- a/commands/docs/path_relative-to.md +++ b/commands/docs/path_relative-to.md @@ -2,7 +2,7 @@ title: path relative-to categories: | path -version: 0.100.0 +version: 0.101.0 path: | Express a path as relative to another path. usage: | diff --git a/commands/docs/path_self.md b/commands/docs/path_self.md new file mode 100644 index 00000000000..4c8e8b2247e --- /dev/null +++ b/commands/docs/path_self.md @@ -0,0 +1,50 @@ +--- +title: path self +categories: | + path +version: 0.101.0 +path: | + Get the absolute path of the script or module containing this command at parse time. +usage: | + Get the absolute path of the script or module containing this command at parse time. +--- + + +# `path self` for [path](/commands/categories/path.md) + +
Get the absolute path of the script or module containing this command at parse time.
+ +## Signature + +```> path self {flags} (path)``` + +## Parameters + + - `path`: Path to get instead of the current file. + + +## Input/output types: + +| input | output | +| ------- | ------ | +| nothing | string | + +## Examples + +Get the path of the current file +```nu +> const current_file = path self + +``` + +Get the path of the directory containing the current file +```nu +> const current_file = path self . + +``` + +Get the absolute form of a path relative to the current file +```nu +> const current_file = path self ../foo + +``` diff --git a/commands/docs/path_split.md b/commands/docs/path_split.md index 2480acd84ed..26049d399ce 100644 --- a/commands/docs/path_split.md +++ b/commands/docs/path_split.md @@ -2,7 +2,7 @@ title: path split categories: | path -version: 0.100.0 +version: 0.101.0 path: | Split a path into a list based on the system's path separator. usage: | diff --git a/commands/docs/path_type.md b/commands/docs/path_type.md index b3ac0d35a0a..50cf26d5fd6 100644 --- a/commands/docs/path_type.md +++ b/commands/docs/path_type.md @@ -2,7 +2,7 @@ title: path type categories: | path -version: 0.100.0 +version: 0.101.0 path: | Get the type of the object a path refers to (e.g., file, dir, symlink). usage: | diff --git a/commands/docs/plugin.md b/commands/docs/plugin.md index 864269bd5dc..01546dbd18c 100644 --- a/commands/docs/plugin.md +++ b/commands/docs/plugin.md @@ -2,7 +2,7 @@ title: plugin categories: | plugin -version: 0.100.0 +version: 0.101.0 plugin: | Commands for managing plugins. usage: | diff --git a/commands/docs/plugin_add.md b/commands/docs/plugin_add.md index a1138f0e984..2757f33617f 100644 --- a/commands/docs/plugin_add.md +++ b/commands/docs/plugin_add.md @@ -2,7 +2,7 @@ title: plugin add categories: | plugin -version: 0.100.0 +version: 0.101.0 plugin: | Add a plugin to the plugin registry file. usage: | diff --git a/commands/docs/plugin_list.md b/commands/docs/plugin_list.md index 7acd9eba370..68c2793430f 100644 --- a/commands/docs/plugin_list.md +++ b/commands/docs/plugin_list.md @@ -2,7 +2,7 @@ title: plugin list categories: | plugin -version: 0.100.0 +version: 0.101.0 plugin: | List loaded and installed plugins. usage: | @@ -39,7 +39,7 @@ List installed plugins. ╭───┬──────┬─────────┬─────────┬────────┬───────────────────────────────┬───────┬─────────────╮ │ # │ name │ version │ status │ pid │ filename │ shell │ commands │ ├───┼──────┼─────────┼─────────┼────────┼───────────────────────────────┼───────┼─────────────┤ -│ 0 │ inc │ 0.100.0 │ running │ 106480 │ /opt/nu/plugins/nu_plugin_inc │ │ ╭───┬─────╮ │ +│ 0 │ inc │ 0.100.1 │ running │ 106480 │ /opt/nu/plugins/nu_plugin_inc │ │ ╭───┬─────╮ │ │ │ │ │ │ │ │ │ │ 0 │ inc │ │ │ │ │ │ │ │ │ │ ╰───┴─────╯ │ ╰───┴──────┴─────────┴─────────┴────────┴───────────────────────────────┴───────┴─────────────╯ diff --git a/commands/docs/plugin_rm.md b/commands/docs/plugin_rm.md index ee103685aff..71ce141b514 100644 --- a/commands/docs/plugin_rm.md +++ b/commands/docs/plugin_rm.md @@ -2,7 +2,7 @@ title: plugin rm categories: | plugin -version: 0.100.0 +version: 0.101.0 plugin: | Remove a plugin from the plugin registry file. usage: | diff --git a/commands/docs/plugin_stop.md b/commands/docs/plugin_stop.md index 98564b47a1a..f2977d27f29 100644 --- a/commands/docs/plugin_stop.md +++ b/commands/docs/plugin_stop.md @@ -2,7 +2,7 @@ title: plugin stop categories: | plugin -version: 0.100.0 +version: 0.101.0 plugin: | Stop an installed plugin if it was running. usage: | diff --git a/commands/docs/plugin_use.md b/commands/docs/plugin_use.md index 57916daba96..df935b41107 100644 --- a/commands/docs/plugin_use.md +++ b/commands/docs/plugin_use.md @@ -2,7 +2,7 @@ title: plugin use categories: | plugin -version: 0.100.0 +version: 0.101.0 plugin: | Load a plugin from the plugin registry file into scope. usage: | diff --git a/commands/docs/polars.md b/commands/docs/polars.md index 8593b0925bf..7bf9e074467 100644 --- a/commands/docs/polars.md +++ b/commands/docs/polars.md @@ -2,7 +2,7 @@ title: polars categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Operate with data in a dataframe format. usage: | @@ -37,120 +37,118 @@ You must use one of the following subcommands. Using this command as-is will onl ## Subcommands: -| name | description | type | -| -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------ | -| [`polars agg`](/commands/docs/polars_agg.md) | Performs a series of aggregations from a group-by. | plugin | -| [`polars agg-groups`](/commands/docs/polars_agg-groups.md) | Creates an agg_groups expression. | plugin | -| [`polars all-false`](/commands/docs/polars_all-false.md) | Returns true if all values are false. | plugin | -| [`polars all-true`](/commands/docs/polars_all-true.md) | Returns true if all values are true. | plugin | -| [`polars append`](/commands/docs/polars_append.md) | Appends a new dataframe. | plugin | -| [`polars arg-max`](/commands/docs/polars_arg-max.md) | Return index for max value in series. | plugin | -| [`polars arg-min`](/commands/docs/polars_arg-min.md) | Return index for min value in series. | plugin | -| [`polars arg-sort`](/commands/docs/polars_arg-sort.md) | Returns indexes for a sorted series. | plugin | -| [`polars arg-true`](/commands/docs/polars_arg-true.md) | Returns indexes where values are true. | plugin | -| [`polars arg-unique`](/commands/docs/polars_arg-unique.md) | Returns indexes for unique values. | plugin | -| [`polars arg-where`](/commands/docs/polars_arg-where.md) | Creates an expression that returns the arguments where expression is true. | plugin | -| [`polars as`](/commands/docs/polars_as.md) | Creates an alias expression. | plugin | -| [`polars as-date`](/commands/docs/polars_as-date.md) | Converts string to date. | plugin | -| [`polars as-datetime`](/commands/docs/polars_as-datetime.md) | Converts string to datetime. | plugin | -| [`polars cache`](/commands/docs/polars_cache.md) | Caches operations in a new LazyFrame. | plugin | -| [`polars cast`](/commands/docs/polars_cast.md) | Cast a column to a different dtype. | plugin | -| [`polars col`](/commands/docs/polars_col.md) | Creates a named column expression. | plugin | -| [`polars collect`](/commands/docs/polars_collect.md) | Collect lazy dataframe into eager dataframe. | plugin | -| [`polars columns`](/commands/docs/polars_columns.md) | Show dataframe columns. | plugin | -| [`polars concat`](/commands/docs/polars_concat.md) | Concatenate two or more dataframes. | plugin | -| [`polars concat-str`](/commands/docs/polars_concat-str.md) | Creates a concat string expression. | plugin | -| [`polars contains`](/commands/docs/polars_contains.md) | Checks if a pattern is contained in a string. | plugin | -| [`polars count`](/commands/docs/polars_count.md) | Returns the number of non-null values in the column. | plugin | -| [`polars count-null`](/commands/docs/polars_count-null.md) | Counts null values. | plugin | -| [`polars cumulative`](/commands/docs/polars_cumulative.md) | Cumulative calculation for a column or series. | plugin | -| [`polars datepart`](/commands/docs/polars_datepart.md) | Creates an expression for capturing the specified datepart in a column. | plugin | -| [`polars decimal`](/commands/docs/polars_decimal.md) | Converts a string column into a decimal column | plugin | -| [`polars drop`](/commands/docs/polars_drop.md) | Creates a new dataframe by dropping the selected columns. | plugin | -| [`polars drop-duplicates`](/commands/docs/polars_drop-duplicates.md) | Drops duplicate values in dataframe. | plugin | -| [`polars drop-nulls`](/commands/docs/polars_drop-nulls.md) | Drops null values in dataframe. | plugin | -| [`polars dummies`](/commands/docs/polars_dummies.md) | Creates a new dataframe with dummy variables. | plugin | -| [`polars explode`](/commands/docs/polars_explode.md) | Explodes a dataframe or creates a explode expression. | plugin | -| [`polars expr-not`](/commands/docs/polars_expr-not.md) | Creates a not expression. | plugin | -| [`polars fetch`](/commands/docs/polars_fetch.md) | Collects the lazyframe to the selected rows. | plugin | -| [`polars fill-nan`](/commands/docs/polars_fill-nan.md) | Replaces NaN values with the given expression. | plugin | -| [`polars fill-null`](/commands/docs/polars_fill-null.md) | Replaces NULL values with the given expression. | plugin | -| [`polars filter`](/commands/docs/polars_filter.md) | Filter dataframe based in expression. | plugin | -| [`polars filter-with`](/commands/docs/polars_filter-with.md) | Filters dataframe using a mask or expression as reference. | plugin | -| [`polars first`](/commands/docs/polars_first.md) | Show only the first number of rows or create a first expression | plugin | -| [`polars flatten`](/commands/docs/polars_flatten.md) | An alias for polars explode. | plugin | -| [`polars get`](/commands/docs/polars_get.md) | Creates dataframe with the selected columns. | plugin | -| [`polars get-day`](/commands/docs/polars_get-day.md) | Gets day from date. | plugin | -| [`polars get-hour`](/commands/docs/polars_get-hour.md) | Gets hour from date. | plugin | -| [`polars get-minute`](/commands/docs/polars_get-minute.md) | Gets minute from date. | plugin | -| [`polars get-month`](/commands/docs/polars_get-month.md) | Gets month from date. | plugin | -| [`polars get-nanosecond`](/commands/docs/polars_get-nanosecond.md) | Gets nanosecond from date. | plugin | -| [`polars get-ordinal`](/commands/docs/polars_get-ordinal.md) | Gets ordinal from date. | plugin | -| [`polars get-second`](/commands/docs/polars_get-second.md) | Gets second from date. | plugin | -| [`polars get-week`](/commands/docs/polars_get-week.md) | Gets week from date. | plugin | -| [`polars get-weekday`](/commands/docs/polars_get-weekday.md) | Gets weekday from date. | plugin | -| [`polars get-year`](/commands/docs/polars_get-year.md) | Gets year from date. | plugin | -| [`polars group-by`](/commands/docs/polars_group-by.md) | Creates a group-by object that can be used for other aggregations. | plugin | -| [`polars implode`](/commands/docs/polars_implode.md) | Aggregates values into a list. | plugin | -| [`polars integer`](/commands/docs/polars_integer.md) | Converts a string column into a integer column | plugin | -| [`polars into-df`](/commands/docs/polars_into-df.md) | Converts a list, table or record into a dataframe. | plugin | -| [`polars into-lazy`](/commands/docs/polars_into-lazy.md) | Converts a dataframe into a lazy dataframe. | plugin | -| [`polars into-nu`](/commands/docs/polars_into-nu.md) | Converts a dataframe or an expression into nushell value for access and exploration. | plugin | -| [`polars is-duplicated`](/commands/docs/polars_is-duplicated.md) | Creates mask indicating duplicated values. | plugin | -| [`polars is-in`](/commands/docs/polars_is-in.md) | Creates an is-in expression or checks to see if the elements are contained in the right series | plugin | -| [`polars is-not-null`](/commands/docs/polars_is-not-null.md) | Creates mask where value is not null. | plugin | -| [`polars is-null`](/commands/docs/polars_is-null.md) | Creates mask where value is null. | plugin | -| [`polars is-unique`](/commands/docs/polars_is-unique.md) | Creates mask indicating unique values. | plugin | -| [`polars join`](/commands/docs/polars_join.md) | Joins a lazy frame with other lazy frame. | plugin | -| [`polars last`](/commands/docs/polars_last.md) | Creates new dataframe with tail rows or creates a last expression. | plugin | -| [`polars len`](/commands/docs/polars_len.md) | Return the number of rows in the context. This is similar to COUNT(*) in SQL. | plugin | -| [`polars lit`](/commands/docs/polars_lit.md) | Creates a literal expression. | plugin | -| [`polars lowercase`](/commands/docs/polars_lowercase.md) | Lowercase the strings in the column. | plugin | -| [`polars max`](/commands/docs/polars_max.md) | Creates a max expression or aggregates columns to their max value. | plugin | -| [`polars mean`](/commands/docs/polars_mean.md) | Creates a mean expression for an aggregation or aggregates columns to their mean value. | plugin | -| [`polars median`](/commands/docs/polars_median.md) | Median value from columns in a dataframe or creates expression for an aggregation | plugin | -| [`polars min`](/commands/docs/polars_min.md) | Creates a min expression or aggregates columns to their min value. | plugin | -| [`polars n-unique`](/commands/docs/polars_n-unique.md) | Counts unique values. | plugin | -| [`polars not`](/commands/docs/polars_not.md) | Inverts boolean mask. | plugin | -| [`polars open`](/commands/docs/polars_open.md) | Opens CSV, JSON, NDJSON/JSON lines, arrow, avro, or parquet file to create dataframe. A lazy dataframe will be created by default, if supported. | plugin | -| [`polars otherwise`](/commands/docs/polars_otherwise.md) | Completes a when expression. | plugin | -| [`polars pivot`](/commands/docs/polars_pivot.md) | Pivot a DataFrame from wide to long format. | plugin | -| [`polars profile`](/commands/docs/polars_profile.md) | Profile a lazy dataframe. This will run the query and return a record containing the materialized DataFrame and a DataFrame that contains profiling information of each node that is executed. - -The units of the timings are microseconds. | plugin | -| [`polars quantile`](/commands/docs/polars_quantile.md) | Aggregates the columns to the selected quantile. | plugin | -| [`polars query`](/commands/docs/polars_query.md) | Query dataframe using SQL. Note: The dataframe is always named 'df' in your query's from clause. | plugin | -| [`polars rename`](/commands/docs/polars_rename.md) | Rename a dataframe column. | plugin | -| [`polars replace`](/commands/docs/polars_replace.md) | Replace the leftmost (sub)string by a regex pattern. | plugin | -| [`polars replace-all`](/commands/docs/polars_replace-all.md) | Replace all (sub)strings by a regex pattern. | plugin | -| [`polars reverse`](/commands/docs/polars_reverse.md) | Reverses the LazyFrame | plugin | -| [`polars rolling`](/commands/docs/polars_rolling.md) | Rolling calculation for a series. | plugin | -| [`polars sample`](/commands/docs/polars_sample.md) | Create sample dataframe. | plugin | -| [`polars save`](/commands/docs/polars_save.md) | Saves a dataframe to disk. For lazy dataframes a sink operation will be used if the file type supports it (parquet, ipc/arrow, csv, and ndjson). | plugin | -| [`polars schema`](/commands/docs/polars_schema.md) | Show schema for a dataframe. | plugin | -| [`polars select`](/commands/docs/polars_select.md) | Selects columns from lazyframe. | plugin | -| [`polars set`](/commands/docs/polars_set.md) | Sets value where given mask is true. | plugin | -| [`polars set-with-idx`](/commands/docs/polars_set-with-idx.md) | Sets value in the given index. | plugin | -| [`polars shape`](/commands/docs/polars_shape.md) | Shows column and row size for a dataframe. | plugin | -| [`polars shift`](/commands/docs/polars_shift.md) | Shifts the values by a given period. | plugin | -| [`polars slice`](/commands/docs/polars_slice.md) | Creates new dataframe from a slice of rows. | plugin | -| [`polars sort-by`](/commands/docs/polars_sort-by.md) | Sorts a lazy dataframe based on expression(s). | plugin | -| [`polars std`](/commands/docs/polars_std.md) | Creates a std expression for an aggregation of std value from columns in a dataframe. | plugin | -| [`polars store-get`](/commands/docs/polars_store-get.md) | Gets a Dataframe or other object from the plugin cache. | plugin | -| [`polars store-ls`](/commands/docs/polars_store-ls.md) | Lists stored polars objects. | plugin | -| [`polars store-rm`](/commands/docs/polars_store-rm.md) | Removes a stored Dataframe or other object from the plugin cache. | plugin | -| [`polars str-join`](/commands/docs/polars_str-join.md) | Concatenates strings within a column or dataframes | plugin | -| [`polars str-lengths`](/commands/docs/polars_str-lengths.md) | Get lengths of all strings. | plugin | -| [`polars str-slice`](/commands/docs/polars_str-slice.md) | Slices the string from the start position until the selected length. | plugin | -| [`polars strftime`](/commands/docs/polars_strftime.md) | Formats date based on string rule. | plugin | -| [`polars sum`](/commands/docs/polars_sum.md) | Creates a sum expression for an aggregation or aggregates columns to their sum value. | plugin | -| [`polars summary`](/commands/docs/polars_summary.md) | For a dataframe, produces descriptive statistics (summary statistics) for its numeric columns. | plugin | -| [`polars take`](/commands/docs/polars_take.md) | Creates new dataframe using the given indices. | plugin | -| [`polars unique`](/commands/docs/polars_unique.md) | Returns unique values from a dataframe. | plugin | -| [`polars unnest`](/commands/docs/polars_unnest.md) | Decompose struct columns into separate columns for each of their fields. The new columns will be inserted into the dataframe at the location of the struct column. | plugin | -| [`polars unpivot`](/commands/docs/polars_unpivot.md) | Unpivot a DataFrame from wide to long format. | plugin | -| [`polars uppercase`](/commands/docs/polars_uppercase.md) | Uppercase the strings in the column. | plugin | -| [`polars value-counts`](/commands/docs/polars_value-counts.md) | Returns a dataframe with the counts for unique values in series. | plugin | -| [`polars var`](/commands/docs/polars_var.md) | Create a var expression for an aggregation. | plugin | -| [`polars when`](/commands/docs/polars_when.md) | Creates and modifies a when expression. | plugin | -| [`polars with-column`](/commands/docs/polars_with-column.md) | Adds a series to the dataframe. | plugin | \ No newline at end of file +| name | description | type | +| -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------ | +| [`polars agg`](/commands/docs/polars_agg.md) | Performs a series of aggregations from a group-by. | plugin | +| [`polars agg-groups`](/commands/docs/polars_agg-groups.md) | Creates an agg_groups expression. | plugin | +| [`polars all-false`](/commands/docs/polars_all-false.md) | Returns true if all values are false. | plugin | +| [`polars all-true`](/commands/docs/polars_all-true.md) | Returns true if all values are true. | plugin | +| [`polars append`](/commands/docs/polars_append.md) | Appends a new dataframe. | plugin | +| [`polars arg-max`](/commands/docs/polars_arg-max.md) | Return index for max value in series. | plugin | +| [`polars arg-min`](/commands/docs/polars_arg-min.md) | Return index for min value in series. | plugin | +| [`polars arg-sort`](/commands/docs/polars_arg-sort.md) | Returns indexes for a sorted series. | plugin | +| [`polars arg-true`](/commands/docs/polars_arg-true.md) | Returns indexes where values are true. | plugin | +| [`polars arg-unique`](/commands/docs/polars_arg-unique.md) | Returns indexes for unique values. | plugin | +| [`polars arg-where`](/commands/docs/polars_arg-where.md) | Creates an expression that returns the arguments where expression is true. | plugin | +| [`polars as`](/commands/docs/polars_as.md) | Creates an alias expression. | plugin | +| [`polars as-date`](/commands/docs/polars_as-date.md) | Converts string to date. | plugin | +| [`polars as-datetime`](/commands/docs/polars_as-datetime.md) | Converts string to datetime. | plugin | +| [`polars cache`](/commands/docs/polars_cache.md) | Caches operations in a new LazyFrame. | plugin | +| [`polars cast`](/commands/docs/polars_cast.md) | Cast a column to a different dtype. | plugin | +| [`polars col`](/commands/docs/polars_col.md) | Creates a named column expression. | plugin | +| [`polars collect`](/commands/docs/polars_collect.md) | Collect lazy dataframe into eager dataframe. | plugin | +| [`polars columns`](/commands/docs/polars_columns.md) | Show dataframe columns. | plugin | +| [`polars concat`](/commands/docs/polars_concat.md) | Concatenate two or more dataframes. | plugin | +| [`polars concat-str`](/commands/docs/polars_concat-str.md) | Creates a concat string expression. | plugin | +| [`polars contains`](/commands/docs/polars_contains.md) | Checks if a pattern is contained in a string. | plugin | +| [`polars count`](/commands/docs/polars_count.md) | Returns the number of non-null values in the column. | plugin | +| [`polars count-null`](/commands/docs/polars_count-null.md) | Counts null values. | plugin | +| [`polars cumulative`](/commands/docs/polars_cumulative.md) | Cumulative calculation for a column or series. | plugin | +| [`polars datepart`](/commands/docs/polars_datepart.md) | Creates an expression for capturing the specified datepart in a column. | plugin | +| [`polars decimal`](/commands/docs/polars_decimal.md) | Converts a string column into a decimal column | plugin | +| [`polars drop`](/commands/docs/polars_drop.md) | Creates a new dataframe by dropping the selected columns. | plugin | +| [`polars drop-duplicates`](/commands/docs/polars_drop-duplicates.md) | Drops duplicate values in dataframe. | plugin | +| [`polars drop-nulls`](/commands/docs/polars_drop-nulls.md) | Drops null values in dataframe. | plugin | +| [`polars dummies`](/commands/docs/polars_dummies.md) | Creates a new dataframe with dummy variables. | plugin | +| [`polars explode`](/commands/docs/polars_explode.md) | Explodes a dataframe or creates a explode expression. | plugin | +| [`polars expr-not`](/commands/docs/polars_expr-not.md) | Creates a not expression. | plugin | +| [`polars fetch`](/commands/docs/polars_fetch.md) | Collects the lazyframe to the selected rows. | plugin | +| [`polars fill-nan`](/commands/docs/polars_fill-nan.md) | Replaces NaN values with the given expression. | plugin | +| [`polars fill-null`](/commands/docs/polars_fill-null.md) | Replaces NULL values with the given expression. | plugin | +| [`polars filter`](/commands/docs/polars_filter.md) | Filter dataframe based in expression. | plugin | +| [`polars filter-with`](/commands/docs/polars_filter-with.md) | Filters dataframe using a mask or expression as reference. | plugin | +| [`polars first`](/commands/docs/polars_first.md) | Show only the first number of rows or create a first expression | plugin | +| [`polars flatten`](/commands/docs/polars_flatten.md) | An alias for polars explode. | plugin | +| [`polars get`](/commands/docs/polars_get.md) | Creates dataframe with the selected columns. | plugin | +| [`polars get-day`](/commands/docs/polars_get-day.md) | Gets day from date. | plugin | +| [`polars get-hour`](/commands/docs/polars_get-hour.md) | Gets hour from date. | plugin | +| [`polars get-minute`](/commands/docs/polars_get-minute.md) | Gets minute from date. | plugin | +| [`polars get-month`](/commands/docs/polars_get-month.md) | Gets month from date. | plugin | +| [`polars get-nanosecond`](/commands/docs/polars_get-nanosecond.md) | Gets nanosecond from date. | plugin | +| [`polars get-ordinal`](/commands/docs/polars_get-ordinal.md) | Gets ordinal from date. | plugin | +| [`polars get-second`](/commands/docs/polars_get-second.md) | Gets second from date. | plugin | +| [`polars get-week`](/commands/docs/polars_get-week.md) | Gets week from date. | plugin | +| [`polars get-weekday`](/commands/docs/polars_get-weekday.md) | Gets weekday from date. | plugin | +| [`polars get-year`](/commands/docs/polars_get-year.md) | Gets year from date. | plugin | +| [`polars group-by`](/commands/docs/polars_group-by.md) | Creates a group-by object that can be used for other aggregations. | plugin | +| [`polars implode`](/commands/docs/polars_implode.md) | Aggregates values into a list. | plugin | +| [`polars integer`](/commands/docs/polars_integer.md) | Converts a string column into a integer column | plugin | +| [`polars into-df`](/commands/docs/polars_into-df.md) | Converts a list, table or record into a dataframe. | plugin | +| [`polars into-lazy`](/commands/docs/polars_into-lazy.md) | Converts a dataframe into a lazy dataframe. | plugin | +| [`polars into-nu`](/commands/docs/polars_into-nu.md) | Converts a dataframe or an expression into nushell value for access and exploration. | plugin | +| [`polars is-duplicated`](/commands/docs/polars_is-duplicated.md) | Creates mask indicating duplicated values. | plugin | +| [`polars is-in`](/commands/docs/polars_is-in.md) | Creates an is-in expression or checks to see if the elements are contained in the right series | plugin | +| [`polars is-not-null`](/commands/docs/polars_is-not-null.md) | Creates mask where value is not null. | plugin | +| [`polars is-null`](/commands/docs/polars_is-null.md) | Creates mask where value is null. | plugin | +| [`polars is-unique`](/commands/docs/polars_is-unique.md) | Creates mask indicating unique values. | plugin | +| [`polars join`](/commands/docs/polars_join.md) | Joins a lazy frame with other lazy frame. | plugin | +| [`polars last`](/commands/docs/polars_last.md) | Creates new dataframe with tail rows or creates a last expression. | plugin | +| [`polars len`](/commands/docs/polars_len.md) | Return the number of rows in the context. This is similar to COUNT(*) in SQL. | plugin | +| [`polars lit`](/commands/docs/polars_lit.md) | Creates a literal expression. | plugin | +| [`polars lowercase`](/commands/docs/polars_lowercase.md) | Lowercase the strings in the column. | plugin | +| [`polars max`](/commands/docs/polars_max.md) | Creates a max expression or aggregates columns to their max value. | plugin | +| [`polars mean`](/commands/docs/polars_mean.md) | Creates a mean expression for an aggregation or aggregates columns to their mean value. | plugin | +| [`polars median`](/commands/docs/polars_median.md) | Median value from columns in a dataframe or creates expression for an aggregation | plugin | +| [`polars min`](/commands/docs/polars_min.md) | Creates a min expression or aggregates columns to their min value. | plugin | +| [`polars n-unique`](/commands/docs/polars_n-unique.md) | Counts unique values. | plugin | +| [`polars not`](/commands/docs/polars_not.md) | Inverts boolean mask. | plugin | +| [`polars open`](/commands/docs/polars_open.md) | Opens CSV, JSON, NDJSON/JSON lines, arrow, avro, or parquet file to create dataframe. A lazy dataframe will be created by default, if supported. | plugin | +| [`polars otherwise`](/commands/docs/polars_otherwise.md) | Completes a when expression. | plugin | +| [`polars pivot`](/commands/docs/polars_pivot.md) | Pivot a DataFrame from wide to long format. | plugin | +| [`polars profile`](/commands/docs/polars_profile.md) | Profile a lazy dataframe. | plugin | +| [`polars quantile`](/commands/docs/polars_quantile.md) | Aggregates the columns to the selected quantile. | plugin | +| [`polars query`](/commands/docs/polars_query.md) | Query dataframe using SQL. Note: The dataframe is always named 'df' in your query's from clause. | plugin | +| [`polars rename`](/commands/docs/polars_rename.md) | Rename a dataframe column. | plugin | +| [`polars replace`](/commands/docs/polars_replace.md) | Replace the leftmost (sub)string by a regex pattern. | plugin | +| [`polars replace-all`](/commands/docs/polars_replace-all.md) | Replace all (sub)strings by a regex pattern. | plugin | +| [`polars reverse`](/commands/docs/polars_reverse.md) | Reverses the LazyFrame | plugin | +| [`polars rolling`](/commands/docs/polars_rolling.md) | Rolling calculation for a series. | plugin | +| [`polars sample`](/commands/docs/polars_sample.md) | Create sample dataframe. | plugin | +| [`polars save`](/commands/docs/polars_save.md) | Saves a dataframe to disk. For lazy dataframes a sink operation will be used if the file type supports it (parquet, ipc/arrow, csv, and ndjson). | plugin | +| [`polars schema`](/commands/docs/polars_schema.md) | Show schema for a dataframe. | plugin | +| [`polars select`](/commands/docs/polars_select.md) | Selects columns from lazyframe. | plugin | +| [`polars set`](/commands/docs/polars_set.md) | Sets value where given mask is true. | plugin | +| [`polars set-with-idx`](/commands/docs/polars_set-with-idx.md) | Sets value in the given index. | plugin | +| [`polars shape`](/commands/docs/polars_shape.md) | Shows column and row size for a dataframe. | plugin | +| [`polars shift`](/commands/docs/polars_shift.md) | Shifts the values by a given period. | plugin | +| [`polars slice`](/commands/docs/polars_slice.md) | Creates new dataframe from a slice of rows. | plugin | +| [`polars sort-by`](/commands/docs/polars_sort-by.md) | Sorts a lazy dataframe based on expression(s). | plugin | +| [`polars std`](/commands/docs/polars_std.md) | Creates a std expression for an aggregation of std value from columns in a dataframe. | plugin | +| [`polars store-get`](/commands/docs/polars_store-get.md) | Gets a Dataframe or other object from the plugin cache. | plugin | +| [`polars store-ls`](/commands/docs/polars_store-ls.md) | Lists stored polars objects. | plugin | +| [`polars store-rm`](/commands/docs/polars_store-rm.md) | Removes a stored Dataframe or other object from the plugin cache. | plugin | +| [`polars str-join`](/commands/docs/polars_str-join.md) | Concatenates strings within a column or dataframes | plugin | +| [`polars str-lengths`](/commands/docs/polars_str-lengths.md) | Get lengths of all strings. | plugin | +| [`polars str-slice`](/commands/docs/polars_str-slice.md) | Slices the string from the start position until the selected length. | plugin | +| [`polars strftime`](/commands/docs/polars_strftime.md) | Formats date based on string rule. | plugin | +| [`polars sum`](/commands/docs/polars_sum.md) | Creates a sum expression for an aggregation or aggregates columns to their sum value. | plugin | +| [`polars summary`](/commands/docs/polars_summary.md) | For a dataframe, produces descriptive statistics (summary statistics) for its numeric columns. | plugin | +| [`polars take`](/commands/docs/polars_take.md) | Creates new dataframe using the given indices. | plugin | +| [`polars unique`](/commands/docs/polars_unique.md) | Returns unique values from a dataframe. | plugin | +| [`polars unnest`](/commands/docs/polars_unnest.md) | Decompose struct columns into separate columns for each of their fields. The new columns will be inserted into the dataframe at the location of the struct column. | plugin | +| [`polars unpivot`](/commands/docs/polars_unpivot.md) | Unpivot a DataFrame from wide to long format. | plugin | +| [`polars uppercase`](/commands/docs/polars_uppercase.md) | Uppercase the strings in the column. | plugin | +| [`polars value-counts`](/commands/docs/polars_value-counts.md) | Returns a dataframe with the counts for unique values in series. | plugin | +| [`polars var`](/commands/docs/polars_var.md) | Create a var expression for an aggregation. | plugin | +| [`polars when`](/commands/docs/polars_when.md) | Creates and modifies a when expression. | plugin | +| [`polars with-column`](/commands/docs/polars_with-column.md) | Adds a series to the dataframe. | plugin | \ No newline at end of file diff --git a/commands/docs/polars_agg-groups.md b/commands/docs/polars_agg-groups.md index f6033e3eb5c..052356ef1a9 100644 --- a/commands/docs/polars_agg-groups.md +++ b/commands/docs/polars_agg-groups.md @@ -2,7 +2,7 @@ title: polars agg-groups categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Creates an agg_groups expression. usage: | @@ -34,7 +34,7 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. ## Examples -Get the groiup index of the group by operations. +Get the group index of the group by operations. ```nu > [[group value]; [one 94] [one 95] [one 96] [two 97] [two 98] [two 99]] | polars into-df diff --git a/commands/docs/polars_agg.md b/commands/docs/polars_agg.md index f782533999f..b292252bd24 100644 --- a/commands/docs/polars_agg.md +++ b/commands/docs/polars_agg.md @@ -2,7 +2,7 @@ title: polars agg categories: | lazyframe -version: 0.100.0 +version: 0.101.0 lazyframe: | Performs a series of aggregations from a group-by. usage: | diff --git a/commands/docs/polars_all-false.md b/commands/docs/polars_all-false.md index 22c95f942ae..686f339b02f 100644 --- a/commands/docs/polars_all-false.md +++ b/commands/docs/polars_all-false.md @@ -2,7 +2,7 @@ title: polars all-false categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Returns true if all values are false. usage: | diff --git a/commands/docs/polars_all-true.md b/commands/docs/polars_all-true.md index 8a6823d4b57..3593755598f 100644 --- a/commands/docs/polars_all-true.md +++ b/commands/docs/polars_all-true.md @@ -2,7 +2,7 @@ title: polars all-true categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Returns true if all values are true. usage: | diff --git a/commands/docs/polars_append.md b/commands/docs/polars_append.md index 21c6e52d92e..cd05ec5c22e 100644 --- a/commands/docs/polars_append.md +++ b/commands/docs/polars_append.md @@ -2,7 +2,7 @@ title: polars append categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Appends a new dataframe. usage: | diff --git a/commands/docs/polars_arg-max.md b/commands/docs/polars_arg-max.md index b4a3165b437..afd48980a5e 100644 --- a/commands/docs/polars_arg-max.md +++ b/commands/docs/polars_arg-max.md @@ -2,7 +2,7 @@ title: polars arg-max categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Return index for max value in series. usage: | diff --git a/commands/docs/polars_arg-min.md b/commands/docs/polars_arg-min.md index fb0d482d845..86cf78b6005 100644 --- a/commands/docs/polars_arg-min.md +++ b/commands/docs/polars_arg-min.md @@ -2,7 +2,7 @@ title: polars arg-min categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Return index for min value in series. usage: | diff --git a/commands/docs/polars_arg-sort.md b/commands/docs/polars_arg-sort.md index e588265f48b..43c6b7be4b9 100644 --- a/commands/docs/polars_arg-sort.md +++ b/commands/docs/polars_arg-sort.md @@ -2,7 +2,7 @@ title: polars arg-sort categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Returns indexes for a sorted series. usage: | diff --git a/commands/docs/polars_arg-true.md b/commands/docs/polars_arg-true.md index 13f570610b2..221b5bcc3f3 100644 --- a/commands/docs/polars_arg-true.md +++ b/commands/docs/polars_arg-true.md @@ -2,7 +2,7 @@ title: polars arg-true categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Returns indexes where values are true. usage: | diff --git a/commands/docs/polars_arg-unique.md b/commands/docs/polars_arg-unique.md index ec72c9ba28a..e8703cf46b0 100644 --- a/commands/docs/polars_arg-unique.md +++ b/commands/docs/polars_arg-unique.md @@ -2,7 +2,7 @@ title: polars arg-unique categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Returns indexes for unique values. usage: | diff --git a/commands/docs/polars_arg-where.md b/commands/docs/polars_arg-where.md index 256447c7209..139df390e1c 100644 --- a/commands/docs/polars_arg-where.md +++ b/commands/docs/polars_arg-where.md @@ -2,7 +2,7 @@ title: polars arg-where categories: | expression -version: 0.100.0 +version: 0.101.0 expression: | Creates an expression that returns the arguments where expression is true. usage: | diff --git a/commands/docs/polars_as-date.md b/commands/docs/polars_as-date.md index 01f019fb616..ad138efe25d 100644 --- a/commands/docs/polars_as-date.md +++ b/commands/docs/polars_as-date.md @@ -2,7 +2,7 @@ title: polars as-date categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Converts string to date. usage: | diff --git a/commands/docs/polars_as-datetime.md b/commands/docs/polars_as-datetime.md index a064e44f396..e23aa0d993a 100644 --- a/commands/docs/polars_as-datetime.md +++ b/commands/docs/polars_as-datetime.md @@ -2,7 +2,7 @@ title: polars as-datetime categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Converts string to datetime. usage: | diff --git a/commands/docs/polars_as.md b/commands/docs/polars_as.md index c1c678374da..b71b00a6caa 100644 --- a/commands/docs/polars_as.md +++ b/commands/docs/polars_as.md @@ -2,7 +2,7 @@ title: polars as categories: | expression -version: 0.100.0 +version: 0.101.0 expression: | Creates an alias expression. usage: | diff --git a/commands/docs/polars_cache.md b/commands/docs/polars_cache.md index f426ac8ed01..45ba587fbd8 100644 --- a/commands/docs/polars_cache.md +++ b/commands/docs/polars_cache.md @@ -2,7 +2,7 @@ title: polars cache categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Caches operations in a new LazyFrame. usage: | diff --git a/commands/docs/polars_cast.md b/commands/docs/polars_cast.md index 7f1f3e530b5..b98cbdbe169 100644 --- a/commands/docs/polars_cast.md +++ b/commands/docs/polars_cast.md @@ -2,7 +2,7 @@ title: polars cast categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Cast a column to a different dtype. usage: | diff --git a/commands/docs/polars_col.md b/commands/docs/polars_col.md index a23541059bc..0d562ff9513 100644 --- a/commands/docs/polars_col.md +++ b/commands/docs/polars_col.md @@ -2,7 +2,7 @@ title: polars col categories: | expression -version: 0.100.0 +version: 0.101.0 expression: | Creates a named column expression. usage: | diff --git a/commands/docs/polars_collect.md b/commands/docs/polars_collect.md index 45265cfa922..9d18fa6d726 100644 --- a/commands/docs/polars_collect.md +++ b/commands/docs/polars_collect.md @@ -2,7 +2,7 @@ title: polars collect categories: | lazyframe -version: 0.100.0 +version: 0.101.0 lazyframe: | Collect lazy dataframe into eager dataframe. usage: | diff --git a/commands/docs/polars_columns.md b/commands/docs/polars_columns.md index f0cc70573c5..e022981959c 100644 --- a/commands/docs/polars_columns.md +++ b/commands/docs/polars_columns.md @@ -2,7 +2,7 @@ title: polars columns categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Show dataframe columns. usage: | diff --git a/commands/docs/polars_concat-str.md b/commands/docs/polars_concat-str.md index 4fdc6f55ed9..6d0cdc6d889 100644 --- a/commands/docs/polars_concat-str.md +++ b/commands/docs/polars_concat-str.md @@ -2,7 +2,7 @@ title: polars concat-str categories: | expression -version: 0.100.0 +version: 0.101.0 expression: | Creates a concat string expression. usage: | diff --git a/commands/docs/polars_concat.md b/commands/docs/polars_concat.md index 45b495714bd..bd5dad14b00 100644 --- a/commands/docs/polars_concat.md +++ b/commands/docs/polars_concat.md @@ -2,7 +2,7 @@ title: polars concat categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Concatenate two or more dataframes. usage: | diff --git a/commands/docs/polars_contains.md b/commands/docs/polars_contains.md index 608efc15028..c06a0c9785c 100644 --- a/commands/docs/polars_contains.md +++ b/commands/docs/polars_contains.md @@ -2,7 +2,7 @@ title: polars contains categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Checks if a pattern is contained in a string. usage: | diff --git a/commands/docs/polars_count-null.md b/commands/docs/polars_count-null.md index a5b4dd5155c..13d4aa0b2f8 100644 --- a/commands/docs/polars_count-null.md +++ b/commands/docs/polars_count-null.md @@ -2,7 +2,7 @@ title: polars count-null categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Counts null values. usage: | diff --git a/commands/docs/polars_count.md b/commands/docs/polars_count.md index 4fae4c18f9f..4ae4ac04814 100644 --- a/commands/docs/polars_count.md +++ b/commands/docs/polars_count.md @@ -2,7 +2,7 @@ title: polars count categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Returns the number of non-null values in the column. usage: | diff --git a/commands/docs/polars_cumulative.md b/commands/docs/polars_cumulative.md index dc2947832df..910245d27a8 100644 --- a/commands/docs/polars_cumulative.md +++ b/commands/docs/polars_cumulative.md @@ -2,7 +2,7 @@ title: polars cumulative categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Cumulative calculation for a column or series. usage: | diff --git a/commands/docs/polars_datepart.md b/commands/docs/polars_datepart.md index e0bf65d976b..5dfedd89662 100644 --- a/commands/docs/polars_datepart.md +++ b/commands/docs/polars_datepart.md @@ -2,7 +2,7 @@ title: polars datepart categories: | expression -version: 0.100.0 +version: 0.101.0 expression: | Creates an expression for capturing the specified datepart in a column. usage: | @@ -59,10 +59,10 @@ Creates an expression to capture multiple date parts (polars col datetime | polars datepart minute | polars as datetime_minute ), (polars col datetime | polars datepart second | polars as datetime_second ), (polars col datetime | polars datepart nanosecond | polars as datetime_ns ) ] -╭───┬─────────────┬───────────────┬────────────────┬──────────────┬───────────────┬─────────────────┬─────────────────┬─────────────╮ -│ # │ datetime │ datetime_year │ datetime_month │ datetime_day │ datetime_hour │ datetime_minute │ datetime_second │ datetime_ns │ -├───┼─────────────┼───────────────┼────────────────┼──────────────┼───────────────┼─────────────────┼─────────────────┼─────────────┤ -│ 0 │ 2 years ago │ 2021 │ 12 │ 30 │ 1 │ 2 │ 3 │ 123456789 │ -╰───┴─────────────┴───────────────┴────────────────┴──────────────┴───────────────┴─────────────────┴─────────────────┴─────────────╯ +╭─────┬───────────────┬─────────────────┬──────────────────┬───────────────┬────────────────┬──────────────────┬──────╮ +│ # │ datetime │ datetime_year │ datetime_month │ datetime_day │ datetime_hour │ datetime_minute │ ... │ +├─────┼───────────────┼─────────────────┼──────────────────┼───────────────┼────────────────┼──────────────────┼──────┤ +│ 0 │ 2 years ago │ 2021 │ 12 │ 30 │ 1 │ 2 │ ... │ +╰─────┴───────────────┴─────────────────┴──────────────────┴───────────────┴────────────────┴──────────────────┴──────╯ ``` diff --git a/commands/docs/polars_decimal.md b/commands/docs/polars_decimal.md index cb872e0b4e2..91a0e7388b0 100644 --- a/commands/docs/polars_decimal.md +++ b/commands/docs/polars_decimal.md @@ -2,7 +2,7 @@ title: polars decimal categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Converts a string column into a decimal column usage: | diff --git a/commands/docs/polars_drop-duplicates.md b/commands/docs/polars_drop-duplicates.md index b803fb6a095..5496bf71d82 100644 --- a/commands/docs/polars_drop-duplicates.md +++ b/commands/docs/polars_drop-duplicates.md @@ -2,7 +2,7 @@ title: polars drop-duplicates categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Drops duplicate values in dataframe. usage: | diff --git a/commands/docs/polars_drop-nulls.md b/commands/docs/polars_drop-nulls.md index 387b85367e8..39a9b209657 100644 --- a/commands/docs/polars_drop-nulls.md +++ b/commands/docs/polars_drop-nulls.md @@ -2,7 +2,7 @@ title: polars drop-nulls categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Drops null values in dataframe. usage: | diff --git a/commands/docs/polars_drop.md b/commands/docs/polars_drop.md index 4f8b2f502bb..429b9c2628d 100644 --- a/commands/docs/polars_drop.md +++ b/commands/docs/polars_drop.md @@ -2,7 +2,7 @@ title: polars drop categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Creates a new dataframe by dropping the selected columns. usage: | diff --git a/commands/docs/polars_dummies.md b/commands/docs/polars_dummies.md index 24e5156ee97..38fb6296afb 100644 --- a/commands/docs/polars_dummies.md +++ b/commands/docs/polars_dummies.md @@ -2,7 +2,7 @@ title: polars dummies categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Creates a new dataframe with dummy variables. usage: | diff --git a/commands/docs/polars_explode.md b/commands/docs/polars_explode.md index 071e7eab4d5..8b7da366ee6 100644 --- a/commands/docs/polars_explode.md +++ b/commands/docs/polars_explode.md @@ -2,7 +2,7 @@ title: polars explode categories: | lazyframe -version: 0.100.0 +version: 0.101.0 lazyframe: | Explodes a dataframe or creates a explode expression. usage: | diff --git a/commands/docs/polars_expr-not.md b/commands/docs/polars_expr-not.md index 7b84bad569d..27619e1229a 100644 --- a/commands/docs/polars_expr-not.md +++ b/commands/docs/polars_expr-not.md @@ -2,7 +2,7 @@ title: polars expr-not categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Creates a not expression. usage: | diff --git a/commands/docs/polars_fetch.md b/commands/docs/polars_fetch.md index 6f386b00d6b..137280959f3 100644 --- a/commands/docs/polars_fetch.md +++ b/commands/docs/polars_fetch.md @@ -2,7 +2,7 @@ title: polars fetch categories: | lazyframe -version: 0.100.0 +version: 0.101.0 lazyframe: | Collects the lazyframe to the selected rows. usage: | diff --git a/commands/docs/polars_fill-nan.md b/commands/docs/polars_fill-nan.md index 2d8ff5b6ff1..755c1602c63 100644 --- a/commands/docs/polars_fill-nan.md +++ b/commands/docs/polars_fill-nan.md @@ -2,7 +2,7 @@ title: polars fill-nan categories: | lazyframe -version: 0.100.0 +version: 0.101.0 lazyframe: | Replaces NaN values with the given expression. usage: | diff --git a/commands/docs/polars_fill-null.md b/commands/docs/polars_fill-null.md index 5990ee09291..e5247074f6b 100644 --- a/commands/docs/polars_fill-null.md +++ b/commands/docs/polars_fill-null.md @@ -2,7 +2,7 @@ title: polars fill-null categories: | lazyframe -version: 0.100.0 +version: 0.101.0 lazyframe: | Replaces NULL values with the given expression. usage: | diff --git a/commands/docs/polars_filter-with.md b/commands/docs/polars_filter-with.md index f190f3f6774..d99c691a5fa 100644 --- a/commands/docs/polars_filter-with.md +++ b/commands/docs/polars_filter-with.md @@ -2,7 +2,7 @@ title: polars filter-with categories: | dataframe or lazyframe -version: 0.100.0 +version: 0.101.0 dataframe_or_lazyframe: | Filters dataframe using a mask or expression as reference. usage: | diff --git a/commands/docs/polars_filter.md b/commands/docs/polars_filter.md index ab82c7d3c1a..8bb267dc98f 100644 --- a/commands/docs/polars_filter.md +++ b/commands/docs/polars_filter.md @@ -2,7 +2,7 @@ title: polars filter categories: | lazyframe -version: 0.100.0 +version: 0.101.0 lazyframe: | Filter dataframe based in expression. usage: | diff --git a/commands/docs/polars_first.md b/commands/docs/polars_first.md index 6f95f7cb4ec..fa6103c751b 100644 --- a/commands/docs/polars_first.md +++ b/commands/docs/polars_first.md @@ -2,7 +2,7 @@ title: polars first categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Show only the first number of rows or create a first expression usage: | diff --git a/commands/docs/polars_flatten.md b/commands/docs/polars_flatten.md index 367f0915d52..334f854f445 100644 --- a/commands/docs/polars_flatten.md +++ b/commands/docs/polars_flatten.md @@ -2,7 +2,7 @@ title: polars flatten categories: | lazyframe -version: 0.100.0 +version: 0.101.0 lazyframe: | An alias for polars explode. usage: | diff --git a/commands/docs/polars_get-day.md b/commands/docs/polars_get-day.md index 7342b8f85a0..c6077d215e5 100644 --- a/commands/docs/polars_get-day.md +++ b/commands/docs/polars_get-day.md @@ -2,7 +2,7 @@ title: polars get-day categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Gets day from date. usage: | diff --git a/commands/docs/polars_get-hour.md b/commands/docs/polars_get-hour.md index 6a288f8e18e..fee59c9c396 100644 --- a/commands/docs/polars_get-hour.md +++ b/commands/docs/polars_get-hour.md @@ -2,7 +2,7 @@ title: polars get-hour categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Gets hour from date. usage: | diff --git a/commands/docs/polars_get-minute.md b/commands/docs/polars_get-minute.md index 862f54a2ef5..46fc5ea4679 100644 --- a/commands/docs/polars_get-minute.md +++ b/commands/docs/polars_get-minute.md @@ -2,7 +2,7 @@ title: polars get-minute categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Gets minute from date. usage: | diff --git a/commands/docs/polars_get-month.md b/commands/docs/polars_get-month.md index 964c6cec05c..30eecef781b 100644 --- a/commands/docs/polars_get-month.md +++ b/commands/docs/polars_get-month.md @@ -2,7 +2,7 @@ title: polars get-month categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Gets month from date. usage: | diff --git a/commands/docs/polars_get-nanosecond.md b/commands/docs/polars_get-nanosecond.md index 7428f282227..ba88e2d53e8 100644 --- a/commands/docs/polars_get-nanosecond.md +++ b/commands/docs/polars_get-nanosecond.md @@ -2,7 +2,7 @@ title: polars get-nanosecond categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Gets nanosecond from date. usage: | diff --git a/commands/docs/polars_get-ordinal.md b/commands/docs/polars_get-ordinal.md index e0e32ddf491..75b16320828 100644 --- a/commands/docs/polars_get-ordinal.md +++ b/commands/docs/polars_get-ordinal.md @@ -2,7 +2,7 @@ title: polars get-ordinal categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Gets ordinal from date. usage: | diff --git a/commands/docs/polars_get-second.md b/commands/docs/polars_get-second.md index 8df36be16d5..809fcdc7e6d 100644 --- a/commands/docs/polars_get-second.md +++ b/commands/docs/polars_get-second.md @@ -2,7 +2,7 @@ title: polars get-second categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Gets second from date. usage: | diff --git a/commands/docs/polars_get-week.md b/commands/docs/polars_get-week.md index 41ae6ca44cc..29f13188b02 100644 --- a/commands/docs/polars_get-week.md +++ b/commands/docs/polars_get-week.md @@ -2,7 +2,7 @@ title: polars get-week categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Gets week from date. usage: | diff --git a/commands/docs/polars_get-weekday.md b/commands/docs/polars_get-weekday.md index 08bfc2366b1..0cd51c9bb65 100644 --- a/commands/docs/polars_get-weekday.md +++ b/commands/docs/polars_get-weekday.md @@ -2,7 +2,7 @@ title: polars get-weekday categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Gets weekday from date. usage: | diff --git a/commands/docs/polars_get-year.md b/commands/docs/polars_get-year.md index c7db47089f0..7be5f375b69 100644 --- a/commands/docs/polars_get-year.md +++ b/commands/docs/polars_get-year.md @@ -2,7 +2,7 @@ title: polars get-year categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Gets year from date. usage: | diff --git a/commands/docs/polars_get.md b/commands/docs/polars_get.md index 41e92aa5a8d..f286e31114c 100644 --- a/commands/docs/polars_get.md +++ b/commands/docs/polars_get.md @@ -2,7 +2,7 @@ title: polars get categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Creates dataframe with the selected columns. usage: | diff --git a/commands/docs/polars_group-by.md b/commands/docs/polars_group-by.md index 161a7655d42..2827cffb38c 100644 --- a/commands/docs/polars_group-by.md +++ b/commands/docs/polars_group-by.md @@ -2,7 +2,7 @@ title: polars group-by categories: | lazyframe -version: 0.100.0 +version: 0.101.0 lazyframe: | Creates a group-by object that can be used for other aggregations. usage: | diff --git a/commands/docs/polars_implode.md b/commands/docs/polars_implode.md index c5ab8a38fdc..d6eb30d1f4c 100644 --- a/commands/docs/polars_implode.md +++ b/commands/docs/polars_implode.md @@ -2,7 +2,7 @@ title: polars implode categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Aggregates values into a list. usage: | diff --git a/commands/docs/polars_integer.md b/commands/docs/polars_integer.md index 6f5624fe6ef..5965943e8c7 100644 --- a/commands/docs/polars_integer.md +++ b/commands/docs/polars_integer.md @@ -2,7 +2,7 @@ title: polars integer categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Converts a string column into a integer column usage: | diff --git a/commands/docs/polars_into-df.md b/commands/docs/polars_into-df.md index 7fc18e5bc65..d8ef326623f 100644 --- a/commands/docs/polars_into-df.md +++ b/commands/docs/polars_into-df.md @@ -2,7 +2,7 @@ title: polars into-df categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Converts a list, table or record into a dataframe. usage: | diff --git a/commands/docs/polars_into-lazy.md b/commands/docs/polars_into-lazy.md index 2df2dbaf263..8e6fbacbbba 100644 --- a/commands/docs/polars_into-lazy.md +++ b/commands/docs/polars_into-lazy.md @@ -2,7 +2,7 @@ title: polars into-lazy categories: | lazyframe -version: 0.100.0 +version: 0.101.0 lazyframe: | Converts a dataframe into a lazy dataframe. usage: | diff --git a/commands/docs/polars_into-nu.md b/commands/docs/polars_into-nu.md index 0248a9eb847..17d512ec9da 100644 --- a/commands/docs/polars_into-nu.md +++ b/commands/docs/polars_into-nu.md @@ -2,7 +2,7 @@ title: polars into-nu categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Converts a dataframe or an expression into nushell value for access and exploration. usage: | diff --git a/commands/docs/polars_is-duplicated.md b/commands/docs/polars_is-duplicated.md index 24537dbba22..38bfd615065 100644 --- a/commands/docs/polars_is-duplicated.md +++ b/commands/docs/polars_is-duplicated.md @@ -2,7 +2,7 @@ title: polars is-duplicated categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Creates mask indicating duplicated values. usage: | diff --git a/commands/docs/polars_is-in.md b/commands/docs/polars_is-in.md index 09383f33460..4d93fa9f2d3 100644 --- a/commands/docs/polars_is-in.md +++ b/commands/docs/polars_is-in.md @@ -2,7 +2,7 @@ title: polars is-in categories: | expression -version: 0.100.0 +version: 0.101.0 expression: | Creates an is-in expression or checks to see if the elements are contained in the right series usage: | diff --git a/commands/docs/polars_is-not-null.md b/commands/docs/polars_is-not-null.md index d2b751c817b..25e70891a63 100644 --- a/commands/docs/polars_is-not-null.md +++ b/commands/docs/polars_is-not-null.md @@ -2,7 +2,7 @@ title: polars is-not-null categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Creates mask where value is not null. usage: | diff --git a/commands/docs/polars_is-null.md b/commands/docs/polars_is-null.md index cbde451b402..d6cc5be2b12 100644 --- a/commands/docs/polars_is-null.md +++ b/commands/docs/polars_is-null.md @@ -2,7 +2,7 @@ title: polars is-null categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Creates mask where value is null. usage: | diff --git a/commands/docs/polars_is-unique.md b/commands/docs/polars_is-unique.md index 4018f36ec88..0d85c1b32df 100644 --- a/commands/docs/polars_is-unique.md +++ b/commands/docs/polars_is-unique.md @@ -2,7 +2,7 @@ title: polars is-unique categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Creates mask indicating unique values. usage: | diff --git a/commands/docs/polars_join.md b/commands/docs/polars_join.md index c0f677b9ac5..53d3a75a1b5 100644 --- a/commands/docs/polars_join.md +++ b/commands/docs/polars_join.md @@ -2,7 +2,7 @@ title: polars join categories: | lazyframe -version: 0.100.0 +version: 0.101.0 lazyframe: | Joins a lazy frame with other lazy frame. usage: | @@ -31,6 +31,7 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. - `--left, -l`: left join between lazyframes - `--full, -f`: full join between lazyframes - `--cross, -c`: cross join between lazyframes + - `--coalesce-columns`: Sets the join coalesce strategy to colesce columns. Most useful when used with --full, which will not otherwise coalesce. - `--suffix, -s {string}`: Suffix to use on columns with same name ## Parameters @@ -50,8 +51,8 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. Join two lazy dataframes ```nu -> let df_a = ([[a b c];[1 "a" 0] [2 "b" 1] [1 "c" 2] [1 "c" 3]] | polars into-lazy); - let df_b = ([["foo" "bar" "ham"];[1 "a" "let"] [2 "c" "var"] [3 "c" "const"]] | polars into-lazy); +> let df_a = ([[a b c];[1 "a" 0] [2 "b" 1] [1 "c" 2] [1 "c" 3]] | polars into-lazy) + let df_b = ([["foo" "bar" "ham"];[1 "a" "let"] [2 "c" "var"] [3 "c" "const"]] | polars into-lazy) $df_a | polars join $df_b a foo | polars collect ╭───┬───┬───┬───┬─────┬─────╮ │ # │ a │ b │ c │ bar │ ham │ @@ -66,8 +67,8 @@ Join two lazy dataframes Join one eager dataframe with a lazy dataframe ```nu -> let df_a = ([[a b c];[1 "a" 0] [2 "b" 1] [1 "c" 2] [1 "c" 3]] | polars into-df); - let df_b = ([["foo" "bar" "ham"];[1 "a" "let"] [2 "c" "var"] [3 "c" "const"]] | polars into-lazy); +> let df_a = ([[a b c];[1 "a" 0] [2 "b" 1] [1 "c" 2] [1 "c" 3]] | polars into-df) + let df_b = ([["foo" "bar" "ham"];[1 "a" "let"] [2 "c" "var"] [3 "c" "const"]] | polars into-lazy) $df_a | polars join $df_b a foo ╭───┬───┬───┬───┬─────┬─────╮ │ # │ a │ b │ c │ bar │ ham │ @@ -79,3 +80,36 @@ Join one eager dataframe with a lazy dataframe ╰───┴───┴───┴───┴─────┴─────╯ ``` + +Perform a full join of two dataframes and coalesce columns +```nu +> let table1 = [[A B]; ["common" "common"] ["table1" "only"]] | polars into-df + let table2 = [[A C]; ["common" "common"] ["table2" "only"]] | polars into-df + $table1 | polars join -f $table2 --coalesce-columns A A +╭───┬────────┬────────┬────────╮ +│ # │ A │ B │ C │ +├───┼────────┼────────┼────────┤ +│ 0 │ common │ common │ common │ +│ 1 │ table2 │ │ only │ +│ 2 │ table1 │ only │ │ +╰───┴────────┴────────┴────────╯ + +``` + +Join one eager dataframe with another using a cross join +```nu +> let tokens = [[monopoly_token]; [hat] [shoe] [boat]] | polars into-df + let players = [[name, cash]; [Alice, 78] [Bob, 135]] | polars into-df + $players | polars select (polars col name) | polars join --cross $tokens | polars collect +╭───┬───────┬────────────────╮ +│ # │ name │ monopoly_token │ +├───┼───────┼────────────────┤ +│ 0 │ Alice │ hat │ +│ 1 │ Alice │ shoe │ +│ 2 │ Alice │ boat │ +│ 3 │ Bob │ hat │ +│ 4 │ Bob │ shoe │ +│ 5 │ Bob │ boat │ +╰───┴───────┴────────────────╯ + +``` diff --git a/commands/docs/polars_last.md b/commands/docs/polars_last.md index 465b4d36764..cd0e9483802 100644 --- a/commands/docs/polars_last.md +++ b/commands/docs/polars_last.md @@ -2,7 +2,7 @@ title: polars last categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Creates new dataframe with tail rows or creates a last expression. usage: | diff --git a/commands/docs/polars_len.md b/commands/docs/polars_len.md index 3c1dbe52213..e499b577bae 100644 --- a/commands/docs/polars_len.md +++ b/commands/docs/polars_len.md @@ -2,7 +2,7 @@ title: polars len categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Return the number of rows in the context. This is similar to COUNT(*) in SQL. usage: | diff --git a/commands/docs/polars_lit.md b/commands/docs/polars_lit.md index 53d23410045..a5b2efa327b 100644 --- a/commands/docs/polars_lit.md +++ b/commands/docs/polars_lit.md @@ -2,7 +2,7 @@ title: polars lit categories: | expression -version: 0.100.0 +version: 0.101.0 expression: | Creates a literal expression. usage: | diff --git a/commands/docs/polars_lowercase.md b/commands/docs/polars_lowercase.md index 50a0978065c..a7e34bbe853 100644 --- a/commands/docs/polars_lowercase.md +++ b/commands/docs/polars_lowercase.md @@ -2,7 +2,7 @@ title: polars lowercase categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Lowercase the strings in the column. usage: | diff --git a/commands/docs/polars_max.md b/commands/docs/polars_max.md index 93fe80f56bc..1417f1af1d1 100644 --- a/commands/docs/polars_max.md +++ b/commands/docs/polars_max.md @@ -2,7 +2,7 @@ title: polars max categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Creates a max expression or aggregates columns to their max value. usage: | diff --git a/commands/docs/polars_mean.md b/commands/docs/polars_mean.md index 9ab16bc825c..7777a7e5e99 100644 --- a/commands/docs/polars_mean.md +++ b/commands/docs/polars_mean.md @@ -2,7 +2,7 @@ title: polars mean categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Creates a mean expression for an aggregation or aggregates columns to their mean value. usage: | diff --git a/commands/docs/polars_median.md b/commands/docs/polars_median.md index 40c888d2793..cf1e9e8ae59 100644 --- a/commands/docs/polars_median.md +++ b/commands/docs/polars_median.md @@ -2,7 +2,7 @@ title: polars median categories: | lazyframe -version: 0.100.0 +version: 0.101.0 lazyframe: | Median value from columns in a dataframe or creates expression for an aggregation usage: | diff --git a/commands/docs/polars_min.md b/commands/docs/polars_min.md index aeb249899fa..e33618c3603 100644 --- a/commands/docs/polars_min.md +++ b/commands/docs/polars_min.md @@ -2,7 +2,7 @@ title: polars min categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Creates a min expression or aggregates columns to their min value. usage: | diff --git a/commands/docs/polars_n-unique.md b/commands/docs/polars_n-unique.md index 54587910a5a..103c98efa9a 100644 --- a/commands/docs/polars_n-unique.md +++ b/commands/docs/polars_n-unique.md @@ -2,7 +2,7 @@ title: polars n-unique categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Counts unique values. usage: | diff --git a/commands/docs/polars_not.md b/commands/docs/polars_not.md index 11f1dd46912..37b334db5d1 100644 --- a/commands/docs/polars_not.md +++ b/commands/docs/polars_not.md @@ -2,7 +2,7 @@ title: polars not categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Inverts boolean mask. usage: | diff --git a/commands/docs/polars_open.md b/commands/docs/polars_open.md index a1c91ccb3e6..f12ebefe176 100644 --- a/commands/docs/polars_open.md +++ b/commands/docs/polars_open.md @@ -2,7 +2,7 @@ title: polars open categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Opens CSV, JSON, NDJSON/JSON lines, arrow, avro, or parquet file to create dataframe. A lazy dataframe will be created by default, if supported. usage: | diff --git a/commands/docs/polars_otherwise.md b/commands/docs/polars_otherwise.md index f307dec58ab..a73e3a76135 100644 --- a/commands/docs/polars_otherwise.md +++ b/commands/docs/polars_otherwise.md @@ -2,7 +2,7 @@ title: polars otherwise categories: | expression -version: 0.100.0 +version: 0.101.0 expression: | Completes a when expression. usage: | diff --git a/commands/docs/polars_pivot.md b/commands/docs/polars_pivot.md index d9ebda68002..8ca0cf7f2ed 100644 --- a/commands/docs/polars_pivot.md +++ b/commands/docs/polars_pivot.md @@ -2,7 +2,7 @@ title: polars pivot categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Pivot a DataFrame from wide to long format. usage: | diff --git a/commands/docs/polars_profile.md b/commands/docs/polars_profile.md index b61581f73db..376be925536 100644 --- a/commands/docs/polars_profile.md +++ b/commands/docs/polars_profile.md @@ -2,21 +2,17 @@ title: polars profile categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | - Profile a lazy dataframe. This will run the query and return a record containing the materialized DataFrame and a DataFrame that contains profiling information of each node that is executed. - - The units of the timings are microseconds. + Profile a lazy dataframe. usage: | - Profile a lazy dataframe. This will run the query and return a record containing the materialized DataFrame and a DataFrame that contains profiling information of each node that is executed. - - The units of the timings are microseconds. + Profile a lazy dataframe. --- # `polars profile` for [dataframe](/commands/categories/dataframe.md) -
Profile a lazy dataframe. This will run the query and return a record containing the materialized DataFrame and a DataFrame that contains profiling information of each node that is executed.

The units of the timings are microseconds.
+
Profile a lazy dataframe.
::: warning This command requires a plugin The `polars profile` command resides in the `polars` plugin. @@ -52,3 +48,8 @@ Profile a lazy dataframe ``` + +## Notes +This will run the query and return a record containing the materialized DataFrame and a DataFrame that contains profiling information of each node that is executed. + +The units of the timings are microseconds. \ No newline at end of file diff --git a/commands/docs/polars_quantile.md b/commands/docs/polars_quantile.md index 6529d122578..c0d83ef873a 100644 --- a/commands/docs/polars_quantile.md +++ b/commands/docs/polars_quantile.md @@ -2,7 +2,7 @@ title: polars quantile categories: | lazyframe -version: 0.100.0 +version: 0.101.0 lazyframe: | Aggregates the columns to the selected quantile. usage: | diff --git a/commands/docs/polars_query.md b/commands/docs/polars_query.md index 61395a89e18..fea3f548201 100644 --- a/commands/docs/polars_query.md +++ b/commands/docs/polars_query.md @@ -2,7 +2,7 @@ title: polars query categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Query dataframe using SQL. Note: The dataframe is always named 'df' in your query's from clause. usage: | diff --git a/commands/docs/polars_rename.md b/commands/docs/polars_rename.md index 606661ef424..5fadc1c599e 100644 --- a/commands/docs/polars_rename.md +++ b/commands/docs/polars_rename.md @@ -2,7 +2,7 @@ title: polars rename categories: | dataframe or lazyframe -version: 0.100.0 +version: 0.101.0 dataframe_or_lazyframe: | Rename a dataframe column. usage: | diff --git a/commands/docs/polars_replace-all.md b/commands/docs/polars_replace-all.md index 0e4b2170baa..5f0e43dc04a 100644 --- a/commands/docs/polars_replace-all.md +++ b/commands/docs/polars_replace-all.md @@ -2,7 +2,7 @@ title: polars replace-all categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Replace all (sub)strings by a regex pattern. usage: | diff --git a/commands/docs/polars_replace.md b/commands/docs/polars_replace.md index 34af6f802d0..5c79c4d46ad 100644 --- a/commands/docs/polars_replace.md +++ b/commands/docs/polars_replace.md @@ -2,7 +2,7 @@ title: polars replace categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Replace the leftmost (sub)string by a regex pattern. usage: | diff --git a/commands/docs/polars_reverse.md b/commands/docs/polars_reverse.md index 7cb707baa80..1261d5e65f1 100644 --- a/commands/docs/polars_reverse.md +++ b/commands/docs/polars_reverse.md @@ -2,7 +2,7 @@ title: polars reverse categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Reverses the LazyFrame usage: | diff --git a/commands/docs/polars_rolling.md b/commands/docs/polars_rolling.md index 9bc58aeac4c..66ac2b95f68 100644 --- a/commands/docs/polars_rolling.md +++ b/commands/docs/polars_rolling.md @@ -2,7 +2,7 @@ title: polars rolling categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Rolling calculation for a series. usage: | diff --git a/commands/docs/polars_sample.md b/commands/docs/polars_sample.md index 0526a7d606f..576413320db 100644 --- a/commands/docs/polars_sample.md +++ b/commands/docs/polars_sample.md @@ -2,7 +2,7 @@ title: polars sample categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Create sample dataframe. usage: | diff --git a/commands/docs/polars_save.md b/commands/docs/polars_save.md index 15a60e0d7ea..0e49ca6bf39 100644 --- a/commands/docs/polars_save.md +++ b/commands/docs/polars_save.md @@ -2,7 +2,7 @@ title: polars save categories: | lazyframe -version: 0.100.0 +version: 0.101.0 lazyframe: | Saves a dataframe to disk. For lazy dataframes a sink operation will be used if the file type supports it (parquet, ipc/arrow, csv, and ndjson). usage: | diff --git a/commands/docs/polars_schema.md b/commands/docs/polars_schema.md index 99e729c9d73..10b79a2b644 100644 --- a/commands/docs/polars_schema.md +++ b/commands/docs/polars_schema.md @@ -2,7 +2,7 @@ title: polars schema categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Show schema for a dataframe. usage: | diff --git a/commands/docs/polars_select.md b/commands/docs/polars_select.md index 4370d39f239..520c24ad095 100644 --- a/commands/docs/polars_select.md +++ b/commands/docs/polars_select.md @@ -2,7 +2,7 @@ title: polars select categories: | lazyframe -version: 0.100.0 +version: 0.101.0 lazyframe: | Selects columns from lazyframe. usage: | diff --git a/commands/docs/polars_set-with-idx.md b/commands/docs/polars_set-with-idx.md index 7c5cb94d8b1..dd23f57a5f9 100644 --- a/commands/docs/polars_set-with-idx.md +++ b/commands/docs/polars_set-with-idx.md @@ -2,7 +2,7 @@ title: polars set-with-idx categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Sets value in the given index. usage: | diff --git a/commands/docs/polars_set.md b/commands/docs/polars_set.md index 859a2fd8441..502465cf5d0 100644 --- a/commands/docs/polars_set.md +++ b/commands/docs/polars_set.md @@ -2,7 +2,7 @@ title: polars set categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Sets value where given mask is true. usage: | diff --git a/commands/docs/polars_shape.md b/commands/docs/polars_shape.md index 7e3716f60f1..0180a8754c7 100644 --- a/commands/docs/polars_shape.md +++ b/commands/docs/polars_shape.md @@ -2,7 +2,7 @@ title: polars shape categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Shows column and row size for a dataframe. usage: | diff --git a/commands/docs/polars_shift.md b/commands/docs/polars_shift.md index b4b20042abe..136fc7e65db 100644 --- a/commands/docs/polars_shift.md +++ b/commands/docs/polars_shift.md @@ -2,7 +2,7 @@ title: polars shift categories: | dataframe or lazyframe -version: 0.100.0 +version: 0.101.0 dataframe_or_lazyframe: | Shifts the values by a given period. usage: | diff --git a/commands/docs/polars_slice.md b/commands/docs/polars_slice.md index 6b2b2e655df..cb36768308b 100644 --- a/commands/docs/polars_slice.md +++ b/commands/docs/polars_slice.md @@ -2,7 +2,7 @@ title: polars slice categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Creates new dataframe from a slice of rows. usage: | diff --git a/commands/docs/polars_sort-by.md b/commands/docs/polars_sort-by.md index 4af0a35e109..4d6cbcf610b 100644 --- a/commands/docs/polars_sort-by.md +++ b/commands/docs/polars_sort-by.md @@ -2,7 +2,7 @@ title: polars sort-by categories: | lazyframe -version: 0.100.0 +version: 0.101.0 lazyframe: | Sorts a lazy dataframe based on expression(s). usage: | diff --git a/commands/docs/polars_std.md b/commands/docs/polars_std.md index 58872ede9b7..0ad4ca504d0 100644 --- a/commands/docs/polars_std.md +++ b/commands/docs/polars_std.md @@ -2,7 +2,7 @@ title: polars std categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Creates a std expression for an aggregation of std value from columns in a dataframe. usage: | diff --git a/commands/docs/polars_store-get.md b/commands/docs/polars_store-get.md index 1c24308980a..a94f12850c3 100644 --- a/commands/docs/polars_store-get.md +++ b/commands/docs/polars_store-get.md @@ -2,7 +2,7 @@ title: polars store-get categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Gets a Dataframe or other object from the plugin cache. usage: | diff --git a/commands/docs/polars_store-ls.md b/commands/docs/polars_store-ls.md index 0f208288bb0..d190810b6e4 100644 --- a/commands/docs/polars_store-ls.md +++ b/commands/docs/polars_store-ls.md @@ -2,7 +2,7 @@ title: polars store-ls categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Lists stored polars objects. usage: | diff --git a/commands/docs/polars_store-rm.md b/commands/docs/polars_store-rm.md index ba6ad7f0905..22b1e895115 100644 --- a/commands/docs/polars_store-rm.md +++ b/commands/docs/polars_store-rm.md @@ -2,7 +2,7 @@ title: polars store-rm categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Removes a stored Dataframe or other object from the plugin cache. usage: | diff --git a/commands/docs/polars_str-join.md b/commands/docs/polars_str-join.md index f7b119db1eb..f495f640969 100644 --- a/commands/docs/polars_str-join.md +++ b/commands/docs/polars_str-join.md @@ -2,7 +2,7 @@ title: polars str-join categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Concatenates strings within a column or dataframes usage: | diff --git a/commands/docs/polars_str-lengths.md b/commands/docs/polars_str-lengths.md index 856e4dc0aad..78d1f6d03f8 100644 --- a/commands/docs/polars_str-lengths.md +++ b/commands/docs/polars_str-lengths.md @@ -2,7 +2,7 @@ title: polars str-lengths categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Get lengths of all strings. usage: | diff --git a/commands/docs/polars_str-slice.md b/commands/docs/polars_str-slice.md index 310ef500aff..50a8b7d377e 100644 --- a/commands/docs/polars_str-slice.md +++ b/commands/docs/polars_str-slice.md @@ -2,7 +2,7 @@ title: polars str-slice categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Slices the string from the start position until the selected length. usage: | diff --git a/commands/docs/polars_strftime.md b/commands/docs/polars_strftime.md index f423ef664dc..863e4cec6e0 100644 --- a/commands/docs/polars_strftime.md +++ b/commands/docs/polars_strftime.md @@ -2,7 +2,7 @@ title: polars strftime categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Formats date based on string rule. usage: | diff --git a/commands/docs/polars_sum.md b/commands/docs/polars_sum.md index 449b8324b40..a596240143e 100644 --- a/commands/docs/polars_sum.md +++ b/commands/docs/polars_sum.md @@ -2,7 +2,7 @@ title: polars sum categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Creates a sum expression for an aggregation or aggregates columns to their sum value. usage: | diff --git a/commands/docs/polars_summary.md b/commands/docs/polars_summary.md index 10630200a9a..a3e7dc78e9d 100644 --- a/commands/docs/polars_summary.md +++ b/commands/docs/polars_summary.md @@ -2,7 +2,7 @@ title: polars summary categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | For a dataframe, produces descriptive statistics (summary statistics) for its numeric columns. usage: | diff --git a/commands/docs/polars_take.md b/commands/docs/polars_take.md index 0a0e110e7a4..53c455a2203 100644 --- a/commands/docs/polars_take.md +++ b/commands/docs/polars_take.md @@ -2,7 +2,7 @@ title: polars take categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Creates new dataframe using the given indices. usage: | diff --git a/commands/docs/polars_unique.md b/commands/docs/polars_unique.md index 5aef050c423..ac496b9d598 100644 --- a/commands/docs/polars_unique.md +++ b/commands/docs/polars_unique.md @@ -2,7 +2,7 @@ title: polars unique categories: | dataframe or lazyframe -version: 0.100.0 +version: 0.101.0 dataframe_or_lazyframe: | Returns unique values from a dataframe. usage: | diff --git a/commands/docs/polars_unnest.md b/commands/docs/polars_unnest.md index 597317173f2..8279feea263 100644 --- a/commands/docs/polars_unnest.md +++ b/commands/docs/polars_unnest.md @@ -2,7 +2,7 @@ title: polars unnest categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Decompose struct columns into separate columns for each of their fields. The new columns will be inserted into the dataframe at the location of the struct column. usage: | diff --git a/commands/docs/polars_unpivot.md b/commands/docs/polars_unpivot.md index 1deb948a2f2..de6c4bce81e 100644 --- a/commands/docs/polars_unpivot.md +++ b/commands/docs/polars_unpivot.md @@ -2,7 +2,7 @@ title: polars unpivot categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Unpivot a DataFrame from wide to long format. usage: | diff --git a/commands/docs/polars_uppercase.md b/commands/docs/polars_uppercase.md index 78d3eb10f46..bc9824824e2 100644 --- a/commands/docs/polars_uppercase.md +++ b/commands/docs/polars_uppercase.md @@ -2,7 +2,7 @@ title: polars uppercase categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Uppercase the strings in the column. usage: | diff --git a/commands/docs/polars_value-counts.md b/commands/docs/polars_value-counts.md index 9a2481693a2..c32a38ac157 100644 --- a/commands/docs/polars_value-counts.md +++ b/commands/docs/polars_value-counts.md @@ -2,7 +2,7 @@ title: polars value-counts categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Returns a dataframe with the counts for unique values in series. usage: | @@ -27,7 +27,7 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. ## Flags - - `--column, -c {string}`: Provide a custom name for the coutn column + - `--column, -c {string}`: Provide a custom name for the count column - `--sort, -s`: Whether or not values should be sorted - `--parallel, -p`: Use multiple threads when processing - `--normalize, -n {string}`: Normalize the counts diff --git a/commands/docs/polars_var.md b/commands/docs/polars_var.md index 73fe57625a6..ddf354747a3 100644 --- a/commands/docs/polars_var.md +++ b/commands/docs/polars_var.md @@ -2,7 +2,7 @@ title: polars var categories: | dataframe -version: 0.100.0 +version: 0.101.0 dataframe: | Create a var expression for an aggregation. usage: | diff --git a/commands/docs/polars_when.md b/commands/docs/polars_when.md index 782bc9012e4..59bd0215a73 100644 --- a/commands/docs/polars_when.md +++ b/commands/docs/polars_when.md @@ -2,7 +2,7 @@ title: polars when categories: | expression -version: 0.100.0 +version: 0.101.0 expression: | Creates and modifies a when expression. usage: | diff --git a/commands/docs/polars_with-column.md b/commands/docs/polars_with-column.md index d26c2410ed6..b88e473c827 100644 --- a/commands/docs/polars_with-column.md +++ b/commands/docs/polars_with-column.md @@ -2,7 +2,7 @@ title: polars with-column categories: | dataframe or lazyframe -version: 0.100.0 +version: 0.101.0 dataframe_or_lazyframe: | Adds a series to the dataframe. usage: | @@ -27,7 +27,7 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. ## Flags - - `--name, -n {string}`: new column name + - `--name, -n {string}`: New column name. For lazy dataframes and expressions syntax, use a `polars as` expression to name a column. ## Parameters diff --git a/commands/docs/port.md b/commands/docs/port.md index 442367affeb..e9f35cf61d4 100644 --- a/commands/docs/port.md +++ b/commands/docs/port.md @@ -2,7 +2,7 @@ title: port categories: | network -version: 0.100.0 +version: 0.101.0 network: | Get a free port from system. usage: | diff --git a/commands/docs/prepend.md b/commands/docs/prepend.md index c8673918b84..563ecb026b2 100644 --- a/commands/docs/prepend.md +++ b/commands/docs/prepend.md @@ -2,7 +2,7 @@ title: prepend categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Prepend any number of rows to a table. usage: | diff --git a/commands/docs/print.md b/commands/docs/print.md index 61cd85608dd..f9c5ddfefd3 100644 --- a/commands/docs/print.md +++ b/commands/docs/print.md @@ -2,7 +2,7 @@ title: print categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Print the given values to stdout. usage: | diff --git a/commands/docs/ps.md b/commands/docs/ps.md index 81c3b37210f..f189f664ea2 100644 --- a/commands/docs/ps.md +++ b/commands/docs/ps.md @@ -2,7 +2,7 @@ title: ps categories: | system -version: 0.100.0 +version: 0.101.0 system: | View information about system processes. usage: | diff --git a/commands/docs/pwd.md b/commands/docs/pwd.md index 33de1c141dc..0117a5bbedd 100644 --- a/commands/docs/pwd.md +++ b/commands/docs/pwd.md @@ -2,7 +2,7 @@ title: pwd categories: | default -version: 0.100.0 +version: 0.101.0 default: | Return the current working directory usage: | diff --git a/commands/docs/query.md b/commands/docs/query.md index 3f1902a2b6d..a8a983c9996 100644 --- a/commands/docs/query.md +++ b/commands/docs/query.md @@ -2,7 +2,7 @@ title: query categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Show all the query commands usage: | diff --git a/commands/docs/query_db.md b/commands/docs/query_db.md index e77ae782f20..6ea35b9695b 100644 --- a/commands/docs/query_db.md +++ b/commands/docs/query_db.md @@ -2,7 +2,7 @@ title: query db categories: | database -version: 0.100.0 +version: 0.101.0 database: | Query a database using SQL. usage: | diff --git a/commands/docs/query_json.md b/commands/docs/query_json.md index 7d0bb8a5d8c..3b1c01ba55d 100644 --- a/commands/docs/query_json.md +++ b/commands/docs/query_json.md @@ -2,7 +2,7 @@ title: query json categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | execute json query on json file (open --raw | query json 'query string') usage: | diff --git a/commands/docs/query_web.md b/commands/docs/query_web.md index 7f209beccaa..7cc00a21608 100644 --- a/commands/docs/query_web.md +++ b/commands/docs/query_web.md @@ -2,7 +2,7 @@ title: query web categories: | network -version: 0.100.0 +version: 0.101.0 network: | execute selector query on html/web usage: | diff --git a/commands/docs/query_webpage-info.md b/commands/docs/query_webpage-info.md index bbab3a2f3d7..a6546531f61 100644 --- a/commands/docs/query_webpage-info.md +++ b/commands/docs/query_webpage-info.md @@ -2,7 +2,7 @@ title: query webpage-info categories: | network -version: 0.100.0 +version: 0.101.0 network: | uses the webpage crate to extract info from html: title, description, language, links, RSS feeds, Opengraph, Schema.org, and more usage: | diff --git a/commands/docs/query_xml.md b/commands/docs/query_xml.md index 338ccb8aa10..15003294401 100644 --- a/commands/docs/query_xml.md +++ b/commands/docs/query_xml.md @@ -2,7 +2,7 @@ title: query xml categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | execute xpath query on xml usage: | diff --git a/commands/docs/random.md b/commands/docs/random.md index 251ef29f0b6..907db1d9a39 100644 --- a/commands/docs/random.md +++ b/commands/docs/random.md @@ -2,7 +2,7 @@ title: random categories: | random -version: 0.100.0 +version: 0.101.0 random: | Generate a random value. usage: | diff --git a/commands/docs/random_binary.md b/commands/docs/random_binary.md index 022bdb84d9b..e0fb13fa3a3 100644 --- a/commands/docs/random_binary.md +++ b/commands/docs/random_binary.md @@ -2,7 +2,7 @@ title: random binary categories: | random -version: 0.100.0 +version: 0.101.0 random: | Generate random bytes. usage: | diff --git a/commands/docs/random_bool.md b/commands/docs/random_bool.md index 9e0739872d4..116119eb8a0 100644 --- a/commands/docs/random_bool.md +++ b/commands/docs/random_bool.md @@ -2,7 +2,7 @@ title: random bool categories: | random -version: 0.100.0 +version: 0.101.0 random: | Generate a random boolean value. usage: | diff --git a/commands/docs/random_chars.md b/commands/docs/random_chars.md index 8aad5f90409..eac6d316bd0 100644 --- a/commands/docs/random_chars.md +++ b/commands/docs/random_chars.md @@ -2,7 +2,7 @@ title: random chars categories: | random -version: 0.100.0 +version: 0.101.0 random: | Generate random chars uniformly distributed over ASCII letters and numbers: a-z, A-Z and 0-9. usage: | diff --git a/commands/docs/random_dice.md b/commands/docs/random_dice.md index fde9bfdb9d5..61d5960edfa 100644 --- a/commands/docs/random_dice.md +++ b/commands/docs/random_dice.md @@ -2,7 +2,7 @@ title: random dice categories: | random -version: 0.100.0 +version: 0.101.0 random: | Generate a random dice roll. usage: | @@ -28,7 +28,7 @@ usage: | | input | output | | ------- | --------- | -| nothing | list\ | +| nothing | list\ | ## Examples diff --git a/commands/docs/random_float.md b/commands/docs/random_float.md index 4f0127cd42d..2f3c34b1d91 100644 --- a/commands/docs/random_float.md +++ b/commands/docs/random_float.md @@ -2,7 +2,7 @@ title: random float categories: | random -version: 0.100.0 +version: 0.101.0 random: | Generate a random float within a range [min..max]. usage: | diff --git a/commands/docs/random_int.md b/commands/docs/random_int.md index 0e0fa26dd73..b63edd8ded1 100644 --- a/commands/docs/random_int.md +++ b/commands/docs/random_int.md @@ -2,7 +2,7 @@ title: random int categories: | random -version: 0.100.0 +version: 0.101.0 random: | Generate a random integer [min..max]. usage: | diff --git a/commands/docs/random_uuid.md b/commands/docs/random_uuid.md index ebe763362dd..b485a784eab 100644 --- a/commands/docs/random_uuid.md +++ b/commands/docs/random_uuid.md @@ -2,7 +2,7 @@ title: random uuid categories: | random -version: 0.100.0 +version: 0.101.0 random: | Generate a random uuid4 string. usage: | diff --git a/commands/docs/range.md b/commands/docs/range.md index 395dcf04e79..d44b6db2457 100644 --- a/commands/docs/range.md +++ b/commands/docs/range.md @@ -2,7 +2,7 @@ title: range categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Return only the selected rows. usage: | diff --git a/commands/docs/reduce.md b/commands/docs/reduce.md index b0bf42d4894..5745e8e73c6 100644 --- a/commands/docs/reduce.md +++ b/commands/docs/reduce.md @@ -2,7 +2,7 @@ title: reduce categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Aggregate a list (starting from the left) to a single value using an accumulator closure. usage: | @@ -83,3 +83,13 @@ Concatenate a string with itself, using a range to determine the number of times > let s = "Str"; 0..2 | reduce --fold '' {|it, acc| $acc + $s} StrStrStr ``` + +Merge multiple records together, making use of the fact that the accumulated value is also supplied as pipeline input to the closure. +```nu +> [{a: 1} {b: 2} {c: 3}] | reduce {|it| merge $it} +╭───┬───╮ +│ a │ 1 │ +│ b │ 2 │ +│ c │ 3 │ +╰───┴───╯ +``` diff --git a/commands/docs/registry_query.md b/commands/docs/registry_query.md index cfc0cdbd594..e339c8f927b 100644 --- a/commands/docs/registry_query.md +++ b/commands/docs/registry_query.md @@ -2,7 +2,7 @@ title: registry query categories: | system -version: 0.100.0 +version: 0.101.0 system: | Query the Windows registry. usage: | diff --git a/commands/docs/reject.md b/commands/docs/reject.md index 92e4fb292cf..1128b58a2ad 100644 --- a/commands/docs/reject.md +++ b/commands/docs/reject.md @@ -2,7 +2,7 @@ title: reject categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Remove the given columns or rows from the table. Opposite of `select`. usage: | diff --git a/commands/docs/rename.md b/commands/docs/rename.md index 7019a269d87..d7f56e6d715 100644 --- a/commands/docs/rename.md +++ b/commands/docs/rename.md @@ -2,7 +2,7 @@ title: rename categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Creates a new table with columns renamed. usage: | diff --git a/commands/docs/return.md b/commands/docs/return.md index cbed26cfa52..44d8162839a 100644 --- a/commands/docs/return.md +++ b/commands/docs/return.md @@ -2,7 +2,7 @@ title: return categories: | core -version: 0.100.0 +version: 0.101.0 core: | Return early from a function. usage: | diff --git a/commands/docs/reverse.md b/commands/docs/reverse.md index 3f36f572903..0a2947cc742 100644 --- a/commands/docs/reverse.md +++ b/commands/docs/reverse.md @@ -2,7 +2,7 @@ title: reverse categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Reverses the input list or table. usage: | diff --git a/commands/docs/rm.md b/commands/docs/rm.md index 09975704f64..f5efa27c089 100644 --- a/commands/docs/rm.md +++ b/commands/docs/rm.md @@ -2,7 +2,7 @@ title: rm categories: | filesystem -version: 0.100.0 +version: 0.101.0 filesystem: | Remove files and directories. usage: | diff --git a/commands/docs/roll.md b/commands/docs/roll.md index 8bb32584703..8313e251f38 100644 --- a/commands/docs/roll.md +++ b/commands/docs/roll.md @@ -2,7 +2,7 @@ title: roll categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Rolling commands for tables. usage: | diff --git a/commands/docs/roll_down.md b/commands/docs/roll_down.md index 1130684dc37..a67b7e822e9 100644 --- a/commands/docs/roll_down.md +++ b/commands/docs/roll_down.md @@ -2,7 +2,7 @@ title: roll down categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Roll table rows down. usage: | diff --git a/commands/docs/roll_left.md b/commands/docs/roll_left.md index 3970800972f..ba90ac43dcc 100644 --- a/commands/docs/roll_left.md +++ b/commands/docs/roll_left.md @@ -2,7 +2,7 @@ title: roll left categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Roll record or table columns left. usage: | diff --git a/commands/docs/roll_right.md b/commands/docs/roll_right.md index 35f78cdde78..deb3cd3c749 100644 --- a/commands/docs/roll_right.md +++ b/commands/docs/roll_right.md @@ -2,7 +2,7 @@ title: roll right categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Roll table columns right. usage: | diff --git a/commands/docs/roll_up.md b/commands/docs/roll_up.md index 16bbba56a2d..ff0c93cd1f6 100644 --- a/commands/docs/roll_up.md +++ b/commands/docs/roll_up.md @@ -2,7 +2,7 @@ title: roll up categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Roll table rows up. usage: | diff --git a/commands/docs/rotate.md b/commands/docs/rotate.md index b394843f6fa..d927521bb9c 100644 --- a/commands/docs/rotate.md +++ b/commands/docs/rotate.md @@ -2,7 +2,7 @@ title: rotate categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Rotates a table or record clockwise (default) or counter-clockwise (use --ccw flag). usage: | diff --git a/commands/docs/run-external.md b/commands/docs/run-external.md index dc54b76463a..ea38423d825 100644 --- a/commands/docs/run-external.md +++ b/commands/docs/run-external.md @@ -2,7 +2,7 @@ title: run-external categories: | system -version: 0.100.0 +version: 0.101.0 system: | Runs external command. usage: | diff --git a/commands/docs/save.md b/commands/docs/save.md index 23e568fa646..142c7b39906 100644 --- a/commands/docs/save.md +++ b/commands/docs/save.md @@ -2,7 +2,7 @@ title: save categories: | filesystem -version: 0.100.0 +version: 0.101.0 filesystem: | Save a file. usage: | diff --git a/commands/docs/schema.md b/commands/docs/schema.md index fb9d16817bd..d83b66ac540 100644 --- a/commands/docs/schema.md +++ b/commands/docs/schema.md @@ -2,7 +2,7 @@ title: schema categories: | database -version: 0.100.0 +version: 0.101.0 database: | Show the schema of a SQLite database. usage: | diff --git a/commands/docs/scope.md b/commands/docs/scope.md index 6439507cc46..8029817b846 100644 --- a/commands/docs/scope.md +++ b/commands/docs/scope.md @@ -2,7 +2,7 @@ title: scope categories: | core -version: 0.100.0 +version: 0.101.0 core: | Commands for getting info about what is in scope. usage: | diff --git a/commands/docs/scope_aliases.md b/commands/docs/scope_aliases.md index 55857de885f..a4f0f5f0572 100644 --- a/commands/docs/scope_aliases.md +++ b/commands/docs/scope_aliases.md @@ -2,7 +2,7 @@ title: scope aliases categories: | core -version: 0.100.0 +version: 0.101.0 core: | Output info on the aliases in the current scope. usage: | diff --git a/commands/docs/scope_commands.md b/commands/docs/scope_commands.md index 387be508a4b..67478e29526 100644 --- a/commands/docs/scope_commands.md +++ b/commands/docs/scope_commands.md @@ -2,7 +2,7 @@ title: scope commands categories: | core -version: 0.100.0 +version: 0.101.0 core: | Output info on the commands in the current scope. usage: | diff --git a/commands/docs/scope_engine-stats.md b/commands/docs/scope_engine-stats.md index e3d661f3239..ed1fd382c10 100644 --- a/commands/docs/scope_engine-stats.md +++ b/commands/docs/scope_engine-stats.md @@ -2,7 +2,7 @@ title: scope engine-stats categories: | core -version: 0.100.0 +version: 0.101.0 core: | Output stats on the engine in the current state. usage: | diff --git a/commands/docs/scope_externs.md b/commands/docs/scope_externs.md index 252a4b8483b..a5e09440656 100644 --- a/commands/docs/scope_externs.md +++ b/commands/docs/scope_externs.md @@ -2,7 +2,7 @@ title: scope externs categories: | core -version: 0.100.0 +version: 0.101.0 core: | Output info on the known externals in the current scope. usage: | diff --git a/commands/docs/scope_modules.md b/commands/docs/scope_modules.md index ed83439c704..0caa26b3477 100644 --- a/commands/docs/scope_modules.md +++ b/commands/docs/scope_modules.md @@ -2,7 +2,7 @@ title: scope modules categories: | core -version: 0.100.0 +version: 0.101.0 core: | Output info on the modules in the current scope. usage: | diff --git a/commands/docs/scope_variables.md b/commands/docs/scope_variables.md index 07d2c2dd794..f83ef1c8ae3 100644 --- a/commands/docs/scope_variables.md +++ b/commands/docs/scope_variables.md @@ -2,7 +2,7 @@ title: scope variables categories: | core -version: 0.100.0 +version: 0.101.0 core: | Output info on the variables in the current scope. usage: | diff --git a/commands/docs/select.md b/commands/docs/select.md index 16327b23b02..d3735f3400f 100644 --- a/commands/docs/select.md +++ b/commands/docs/select.md @@ -2,7 +2,7 @@ title: select categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Select only these columns or rows from the input. Opposite of `reject`. usage: | diff --git a/commands/docs/seq.md b/commands/docs/seq.md index 52663886e85..299491e1e16 100644 --- a/commands/docs/seq.md +++ b/commands/docs/seq.md @@ -2,7 +2,7 @@ title: seq categories: | generators -version: 0.100.0 +version: 0.101.0 generators: | Output sequences of numbers. usage: | diff --git a/commands/docs/seq_char.md b/commands/docs/seq_char.md index ac056a8ff85..fe2cd6a9712 100644 --- a/commands/docs/seq_char.md +++ b/commands/docs/seq_char.md @@ -2,7 +2,7 @@ title: seq char categories: | generators -version: 0.100.0 +version: 0.101.0 generators: | Print a sequence of ASCII characters. usage: | @@ -45,7 +45,7 @@ sequence a to e ``` -sequence a to e, and put the characters in a pipe-separated string +Sequence a to e, and join the characters with a pipe ```nu > seq char a e | str join '|' diff --git a/commands/docs/seq_date.md b/commands/docs/seq_date.md index 940e403ab04..6533db336c8 100644 --- a/commands/docs/seq_date.md +++ b/commands/docs/seq_date.md @@ -2,7 +2,7 @@ title: seq date categories: | generators -version: 0.100.0 +version: 0.101.0 generators: | Print sequences of dates. usage: | diff --git a/commands/docs/shuffle.md b/commands/docs/shuffle.md index 1aca4876ccd..649412f08b7 100644 --- a/commands/docs/shuffle.md +++ b/commands/docs/shuffle.md @@ -2,7 +2,7 @@ title: shuffle categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Shuffle rows randomly. usage: | diff --git a/commands/docs/skip.md b/commands/docs/skip.md index 2716d353541..09475c7082e 100644 --- a/commands/docs/skip.md +++ b/commands/docs/skip.md @@ -2,7 +2,7 @@ title: skip categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Skip the first several rows of the input. Counterpart of `drop`. Opposite of `first`. usage: | diff --git a/commands/docs/skip_until.md b/commands/docs/skip_until.md index 0d2cc8b8ddf..79d39b754c1 100644 --- a/commands/docs/skip_until.md +++ b/commands/docs/skip_until.md @@ -2,7 +2,7 @@ title: skip until categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Skip elements of the input until a predicate is true. usage: | diff --git a/commands/docs/skip_while.md b/commands/docs/skip_while.md index 70ed08cd2c0..cb772bf3925 100644 --- a/commands/docs/skip_while.md +++ b/commands/docs/skip_while.md @@ -2,7 +2,7 @@ title: skip while categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Skip elements of the input while a predicate is true. usage: | diff --git a/commands/docs/sleep.md b/commands/docs/sleep.md index 311d1d2b15e..a1a1b1e821b 100644 --- a/commands/docs/sleep.md +++ b/commands/docs/sleep.md @@ -2,7 +2,7 @@ title: sleep categories: | platform -version: 0.100.0 +version: 0.101.0 platform: | Delay for a specified amount of time. usage: | @@ -38,9 +38,9 @@ Sleep for 1sec ``` -Sleep for 3sec +Use multiple arguments to write a duration with multiple units, which is unsupported by duration literals ```nu -> sleep 1sec 1sec 1sec +> sleep 1min 30sec ``` diff --git a/commands/docs/sort-by.md b/commands/docs/sort-by.md index 67c3d2640dd..fccc974b16d 100644 --- a/commands/docs/sort-by.md +++ b/commands/docs/sort-by.md @@ -2,7 +2,7 @@ title: sort-by categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Sort by the given cell path or closure. usage: | diff --git a/commands/docs/sort.md b/commands/docs/sort.md index 4054ae31889..75a6fa1349e 100644 --- a/commands/docs/sort.md +++ b/commands/docs/sort.md @@ -2,7 +2,7 @@ title: sort categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Sort in increasing order. usage: | diff --git a/commands/docs/source-env.md b/commands/docs/source-env.md index 93d15a4a224..04f60554e37 100644 --- a/commands/docs/source-env.md +++ b/commands/docs/source-env.md @@ -2,7 +2,7 @@ title: source-env categories: | core -version: 0.100.0 +version: 0.101.0 core: | Source the environment from a source file into the current environment. usage: | diff --git a/commands/docs/source.md b/commands/docs/source.md index 720375e9faa..e44d26f9685 100644 --- a/commands/docs/source.md +++ b/commands/docs/source.md @@ -2,7 +2,7 @@ title: source categories: | core -version: 0.100.0 +version: 0.101.0 core: | Runs a script file in the current context. usage: | diff --git a/commands/docs/split-by.md b/commands/docs/split-by.md index 8d971ec6944..6a8802cce29 100644 --- a/commands/docs/split-by.md +++ b/commands/docs/split-by.md @@ -1,16 +1,16 @@ --- title: split-by categories: | - filters -version: 0.100.0 -filters: | + deprecated +version: 0.101.0 +deprecated: | Split a record into groups. usage: | Split a record into groups. --- -# `split-by` for [filters](/commands/categories/filters.md) +# `split-by` for [deprecated](/commands/categories/deprecated.md)
Split a record into groups.
diff --git a/commands/docs/split.md b/commands/docs/split.md index 1910d7ccc20..b8d1db049c4 100644 --- a/commands/docs/split.md +++ b/commands/docs/split.md @@ -2,7 +2,7 @@ title: split categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Split contents across desired subcommand (like row, column) via the separator. usage: | diff --git a/commands/docs/split_cell-path.md b/commands/docs/split_cell-path.md index 606dd768285..f34182a126c 100644 --- a/commands/docs/split_cell-path.md +++ b/commands/docs/split_cell-path.md @@ -2,7 +2,7 @@ title: split cell-path categories: | conversions -version: 0.100.0 +version: 0.101.0 conversions: | Split a cell-path into its components. usage: | diff --git a/commands/docs/split_chars.md b/commands/docs/split_chars.md index 2fea6dc0879..82483272c24 100644 --- a/commands/docs/split_chars.md +++ b/commands/docs/split_chars.md @@ -2,7 +2,7 @@ title: split chars categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Split a string into a list of characters. usage: | diff --git a/commands/docs/split_column.md b/commands/docs/split_column.md index 9d2a0d17e90..58a943aa3eb 100644 --- a/commands/docs/split_column.md +++ b/commands/docs/split_column.md @@ -2,7 +2,7 @@ title: split column categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Split a string into multiple columns using a separator. usage: | diff --git a/commands/docs/split_list.md b/commands/docs/split_list.md index fa7a4eaa127..a474e6d778d 100644 --- a/commands/docs/split_list.md +++ b/commands/docs/split_list.md @@ -2,7 +2,7 @@ title: split list categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Split a list into multiple lists using a separator. usage: | diff --git a/commands/docs/split_row.md b/commands/docs/split_row.md index d47cdfdd8c2..25e23042821 100644 --- a/commands/docs/split_row.md +++ b/commands/docs/split_row.md @@ -2,7 +2,7 @@ title: split row categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Split a string into multiple rows using a separator. usage: | diff --git a/commands/docs/split_words.md b/commands/docs/split_words.md index 0ec8198d8cc..bb63a6f4850 100644 --- a/commands/docs/split_words.md +++ b/commands/docs/split_words.md @@ -2,7 +2,7 @@ title: split words categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Split a string's words into separate rows. usage: | diff --git a/commands/docs/start.md b/commands/docs/start.md index 15d313020c6..e04d2097e35 100644 --- a/commands/docs/start.md +++ b/commands/docs/start.md @@ -2,7 +2,7 @@ title: start categories: | filesystem -version: 0.100.0 +version: 0.101.0 filesystem: | Open a folder, file or website in the default application or viewer. usage: | diff --git a/commands/docs/stor.md b/commands/docs/stor.md index 0546af06f28..14a0a80d53f 100644 --- a/commands/docs/stor.md +++ b/commands/docs/stor.md @@ -2,7 +2,7 @@ title: stor categories: | database -version: 0.100.0 +version: 0.101.0 database: | Various commands for working with the in-memory sqlite database. usage: | diff --git a/commands/docs/stor_create.md b/commands/docs/stor_create.md index d2a07161a9f..868decbd519 100644 --- a/commands/docs/stor_create.md +++ b/commands/docs/stor_create.md @@ -2,7 +2,7 @@ title: stor create categories: | database -version: 0.100.0 +version: 0.101.0 database: | Create a table in the in-memory sqlite database. usage: | diff --git a/commands/docs/stor_delete.md b/commands/docs/stor_delete.md index ac036b8afb2..4b428987c78 100644 --- a/commands/docs/stor_delete.md +++ b/commands/docs/stor_delete.md @@ -2,7 +2,7 @@ title: stor delete categories: | database -version: 0.100.0 +version: 0.101.0 database: | Delete a table or specified rows in the in-memory sqlite database. usage: | diff --git a/commands/docs/stor_export.md b/commands/docs/stor_export.md index 6b12a1f401f..9f44b44a859 100644 --- a/commands/docs/stor_export.md +++ b/commands/docs/stor_export.md @@ -2,7 +2,7 @@ title: stor export categories: | database -version: 0.100.0 +version: 0.101.0 database: | Export the in-memory sqlite database to a sqlite database file. usage: | diff --git a/commands/docs/stor_import.md b/commands/docs/stor_import.md index 8587ce6be0e..5030ffe6c8a 100644 --- a/commands/docs/stor_import.md +++ b/commands/docs/stor_import.md @@ -2,7 +2,7 @@ title: stor import categories: | database -version: 0.100.0 +version: 0.101.0 database: | Import a sqlite database file into the in-memory sqlite database. usage: | diff --git a/commands/docs/stor_insert.md b/commands/docs/stor_insert.md index 4af7f436b67..45c38a233f9 100644 --- a/commands/docs/stor_insert.md +++ b/commands/docs/stor_insert.md @@ -2,7 +2,7 @@ title: stor insert categories: | database -version: 0.100.0 +version: 0.101.0 database: | Insert information into a specified table in the in-memory sqlite database. usage: | diff --git a/commands/docs/stor_open.md b/commands/docs/stor_open.md index 5e8eb420ad1..2d618311f6f 100644 --- a/commands/docs/stor_open.md +++ b/commands/docs/stor_open.md @@ -2,7 +2,7 @@ title: stor open categories: | database -version: 0.100.0 +version: 0.101.0 database: | Opens the in-memory sqlite database. usage: | diff --git a/commands/docs/stor_reset.md b/commands/docs/stor_reset.md index a2b2f8ed767..6b81e8b3dcc 100644 --- a/commands/docs/stor_reset.md +++ b/commands/docs/stor_reset.md @@ -2,7 +2,7 @@ title: stor reset categories: | database -version: 0.100.0 +version: 0.101.0 database: | Reset the in-memory database by dropping all tables. usage: | diff --git a/commands/docs/stor_update.md b/commands/docs/stor_update.md index 626127f1f4b..0ca45e32704 100644 --- a/commands/docs/stor_update.md +++ b/commands/docs/stor_update.md @@ -2,7 +2,7 @@ title: stor update categories: | database -version: 0.100.0 +version: 0.101.0 database: | Update information in a specified table in the in-memory sqlite database. usage: | diff --git a/commands/docs/str.md b/commands/docs/str.md index bbd8b4263ba..245f383ff44 100644 --- a/commands/docs/str.md +++ b/commands/docs/str.md @@ -2,7 +2,7 @@ title: str categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Various commands for working with string data. usage: | diff --git a/commands/docs/str_camel-case.md b/commands/docs/str_camel-case.md index 83375b4dd62..a2d1f770f39 100644 --- a/commands/docs/str_camel-case.md +++ b/commands/docs/str_camel-case.md @@ -2,7 +2,7 @@ title: str camel-case categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Convert a string to camelCase. usage: | diff --git a/commands/docs/str_capitalize.md b/commands/docs/str_capitalize.md index 2fd369d5009..d1dc1e0fc8c 100644 --- a/commands/docs/str_capitalize.md +++ b/commands/docs/str_capitalize.md @@ -2,7 +2,7 @@ title: str capitalize categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Capitalize first letter of text. usage: | diff --git a/commands/docs/str_contains.md b/commands/docs/str_contains.md index 2fb1a076d20..8b7f5c79ebe 100644 --- a/commands/docs/str_contains.md +++ b/commands/docs/str_contains.md @@ -2,7 +2,7 @@ title: str contains categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Checks if string input contains a substring. usage: | diff --git a/commands/docs/str_distance.md b/commands/docs/str_distance.md index 2105eea2b89..71b65b93e29 100644 --- a/commands/docs/str_distance.md +++ b/commands/docs/str_distance.md @@ -2,7 +2,7 @@ title: str distance categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Compare two strings and return the edit distance/Levenshtein distance. usage: | diff --git a/commands/docs/str_downcase.md b/commands/docs/str_downcase.md index fd208bfc12a..88671d2c3ff 100644 --- a/commands/docs/str_downcase.md +++ b/commands/docs/str_downcase.md @@ -2,7 +2,7 @@ title: str downcase categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Make text lowercase. usage: | diff --git a/commands/docs/str_ends-with.md b/commands/docs/str_ends-with.md index 6f4785f9ff4..5ea033ba439 100644 --- a/commands/docs/str_ends-with.md +++ b/commands/docs/str_ends-with.md @@ -2,7 +2,7 @@ title: str ends-with categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Check if an input ends with a string. usage: | diff --git a/commands/docs/str_expand.md b/commands/docs/str_expand.md index 7ca9115540d..ebacccfc59c 100644 --- a/commands/docs/str_expand.md +++ b/commands/docs/str_expand.md @@ -2,7 +2,7 @@ title: str expand categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Generates all possible combinations defined in brace expansion syntax. usage: | diff --git a/commands/docs/str_index-of.md b/commands/docs/str_index-of.md index 359824e207d..1c01f6a5ace 100644 --- a/commands/docs/str_index-of.md +++ b/commands/docs/str_index-of.md @@ -2,7 +2,7 @@ title: str index-of categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Returns start index of first occurrence of string in input, or -1 if no match. usage: | diff --git a/commands/docs/str_join.md b/commands/docs/str_join.md index ad4f80cd919..55146571111 100644 --- a/commands/docs/str_join.md +++ b/commands/docs/str_join.md @@ -2,7 +2,7 @@ title: str join categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Concatenate multiple strings into a single string, with an optional separator between each. usage: | diff --git a/commands/docs/str_kebab-case.md b/commands/docs/str_kebab-case.md index 277c5572988..ac4ffc694c6 100644 --- a/commands/docs/str_kebab-case.md +++ b/commands/docs/str_kebab-case.md @@ -2,7 +2,7 @@ title: str kebab-case categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Convert a string to kebab-case. usage: | diff --git a/commands/docs/str_length.md b/commands/docs/str_length.md index e6689145bf4..a126bbae21e 100644 --- a/commands/docs/str_length.md +++ b/commands/docs/str_length.md @@ -2,7 +2,7 @@ title: str length categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Output the length of any strings in the pipeline. usage: | diff --git a/commands/docs/str_pascal-case.md b/commands/docs/str_pascal-case.md index 7db341bfe0b..f27d428e944 100644 --- a/commands/docs/str_pascal-case.md +++ b/commands/docs/str_pascal-case.md @@ -2,7 +2,7 @@ title: str pascal-case categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Convert a string to PascalCase. usage: | diff --git a/commands/docs/str_replace.md b/commands/docs/str_replace.md index c608779a86a..e9edba82a28 100644 --- a/commands/docs/str_replace.md +++ b/commands/docs/str_replace.md @@ -2,7 +2,7 @@ title: str replace categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Find and replace text. usage: | diff --git a/commands/docs/str_reverse.md b/commands/docs/str_reverse.md index d61a3a6717b..5a7f410a0ae 100644 --- a/commands/docs/str_reverse.md +++ b/commands/docs/str_reverse.md @@ -2,7 +2,7 @@ title: str reverse categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Reverse every string in the pipeline. usage: | diff --git a/commands/docs/str_screaming-snake-case.md b/commands/docs/str_screaming-snake-case.md index 8f48259951e..9d4646bd892 100644 --- a/commands/docs/str_screaming-snake-case.md +++ b/commands/docs/str_screaming-snake-case.md @@ -2,7 +2,7 @@ title: str screaming-snake-case categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Convert a string to SCREAMING_SNAKE_CASE. usage: | diff --git a/commands/docs/str_snake-case.md b/commands/docs/str_snake-case.md index 6708ac19433..70407e00d38 100644 --- a/commands/docs/str_snake-case.md +++ b/commands/docs/str_snake-case.md @@ -2,7 +2,7 @@ title: str snake-case categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Convert a string to snake_case. usage: | diff --git a/commands/docs/str_starts-with.md b/commands/docs/str_starts-with.md index cbc675c4aee..a49e53aa8d0 100644 --- a/commands/docs/str_starts-with.md +++ b/commands/docs/str_starts-with.md @@ -2,7 +2,7 @@ title: str starts-with categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Check if an input starts with a string. usage: | diff --git a/commands/docs/str_stats.md b/commands/docs/str_stats.md index 1ff06775c40..95732831d04 100644 --- a/commands/docs/str_stats.md +++ b/commands/docs/str_stats.md @@ -2,7 +2,7 @@ title: str stats categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Gather word count statistics on the text. usage: | diff --git a/commands/docs/str_substring.md b/commands/docs/str_substring.md index e6e4acb2307..85d786bfcb0 100644 --- a/commands/docs/str_substring.md +++ b/commands/docs/str_substring.md @@ -2,7 +2,7 @@ title: str substring categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Get part of a string. Note that the first character of a string is index 0. usage: | diff --git a/commands/docs/str_title-case.md b/commands/docs/str_title-case.md index 3d082da5828..02d3391c071 100644 --- a/commands/docs/str_title-case.md +++ b/commands/docs/str_title-case.md @@ -2,7 +2,7 @@ title: str title-case categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Convert a string to Title Case. usage: | diff --git a/commands/docs/str_trim.md b/commands/docs/str_trim.md index d6432ae5bd4..1626b4f4274 100644 --- a/commands/docs/str_trim.md +++ b/commands/docs/str_trim.md @@ -2,7 +2,7 @@ title: str trim categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Trim whitespace or specific character. usage: | diff --git a/commands/docs/str_upcase.md b/commands/docs/str_upcase.md index 0c47803177e..41f97ca6ad1 100644 --- a/commands/docs/str_upcase.md +++ b/commands/docs/str_upcase.md @@ -2,7 +2,7 @@ title: str upcase categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Make text uppercase. usage: | diff --git a/commands/docs/sys.md b/commands/docs/sys.md index 6e5409608a2..912f5b78374 100644 --- a/commands/docs/sys.md +++ b/commands/docs/sys.md @@ -2,7 +2,7 @@ title: sys categories: | system -version: 0.100.0 +version: 0.101.0 system: | View information about the system. usage: | diff --git a/commands/docs/sys_cpu.md b/commands/docs/sys_cpu.md index a01cd67999f..a76baa683ed 100644 --- a/commands/docs/sys_cpu.md +++ b/commands/docs/sys_cpu.md @@ -2,7 +2,7 @@ title: sys cpu categories: | system -version: 0.100.0 +version: 0.101.0 system: | View information about the system CPUs. usage: | @@ -18,6 +18,10 @@ usage: | ```> sys cpu {flags} ``` +## Flags + + - `--long, -l`: Get all available columns (slower, needs to sample CPU over time) + ## Input/output types: diff --git a/commands/docs/sys_disks.md b/commands/docs/sys_disks.md index ee3f751245d..f8b4a218462 100644 --- a/commands/docs/sys_disks.md +++ b/commands/docs/sys_disks.md @@ -2,7 +2,7 @@ title: sys disks categories: | system -version: 0.100.0 +version: 0.101.0 system: | View information about the system disks. usage: | diff --git a/commands/docs/sys_host.md b/commands/docs/sys_host.md index ec795d8de8b..5af9f1b8e26 100644 --- a/commands/docs/sys_host.md +++ b/commands/docs/sys_host.md @@ -2,7 +2,7 @@ title: sys host categories: | system -version: 0.100.0 +version: 0.101.0 system: | View information about the system host. usage: | diff --git a/commands/docs/sys_mem.md b/commands/docs/sys_mem.md index dbc4af66b39..dfe4dc6c930 100644 --- a/commands/docs/sys_mem.md +++ b/commands/docs/sys_mem.md @@ -2,7 +2,7 @@ title: sys mem categories: | system -version: 0.100.0 +version: 0.101.0 system: | View information about the system memory. usage: | diff --git a/commands/docs/sys_net.md b/commands/docs/sys_net.md index 0c5194b9764..4138d4ba6e1 100644 --- a/commands/docs/sys_net.md +++ b/commands/docs/sys_net.md @@ -2,7 +2,7 @@ title: sys net categories: | system -version: 0.100.0 +version: 0.101.0 system: | View information about the system network interfaces. usage: | diff --git a/commands/docs/sys_temp.md b/commands/docs/sys_temp.md index 1c56e513876..1215553acef 100644 --- a/commands/docs/sys_temp.md +++ b/commands/docs/sys_temp.md @@ -2,7 +2,7 @@ title: sys temp categories: | system -version: 0.100.0 +version: 0.101.0 system: | View the temperatures of system components. usage: | diff --git a/commands/docs/sys_users.md b/commands/docs/sys_users.md index 157f1a9a56e..c3f169fc686 100644 --- a/commands/docs/sys_users.md +++ b/commands/docs/sys_users.md @@ -2,7 +2,7 @@ title: sys users categories: | system -version: 0.100.0 +version: 0.101.0 system: | View information about the users on the system. usage: | diff --git a/commands/docs/table.md b/commands/docs/table.md index 83ef33d26aa..748aeb3b0af 100644 --- a/commands/docs/table.md +++ b/commands/docs/table.md @@ -2,7 +2,7 @@ title: table categories: | viewers -version: 0.100.0 +version: 0.101.0 viewers: | Render the table. usage: | diff --git a/commands/docs/take.md b/commands/docs/take.md index 0a8730510af..0176720d2c4 100644 --- a/commands/docs/take.md +++ b/commands/docs/take.md @@ -2,7 +2,7 @@ title: take categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Take only the first n elements of a list, or the first n bytes of a binary value. usage: | diff --git a/commands/docs/take_until.md b/commands/docs/take_until.md index 6c8123d87fa..bcd57d0259d 100644 --- a/commands/docs/take_until.md +++ b/commands/docs/take_until.md @@ -2,7 +2,7 @@ title: take until categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Take elements of the input until a predicate is true. usage: | diff --git a/commands/docs/take_while.md b/commands/docs/take_while.md index dfc6136e56a..61fa5595a34 100644 --- a/commands/docs/take_while.md +++ b/commands/docs/take_while.md @@ -2,7 +2,7 @@ title: take while categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Take elements of the input while a predicate is true. usage: | diff --git a/commands/docs/tee.md b/commands/docs/tee.md index 85fcc2c833c..fe73025c11a 100644 --- a/commands/docs/tee.md +++ b/commands/docs/tee.md @@ -2,7 +2,7 @@ title: tee categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Copy a stream to another command in parallel. usage: | diff --git a/commands/docs/term.md b/commands/docs/term.md new file mode 100644 index 00000000000..a772e7afea2 --- /dev/null +++ b/commands/docs/term.md @@ -0,0 +1,36 @@ +--- +title: term +categories: | + platform +version: 0.101.0 +platform: | + Commands for querying information about the terminal. +usage: | + Commands for querying information about the terminal. +--- + + +# `term` for [platform](/commands/categories/platform.md) + +
Commands for querying information about the terminal.
+ +## Signature + +```> term {flags} ``` + + +## Input/output types: + +| input | output | +| ------- | ------ | +| nothing | string | + +## Notes +You must use one of the following subcommands. Using this command as-is will only produce this help message. + +## Subcommands: + +| name | description | type | +| -------------------------------------------- | -------------------------------------------------------------------------------------------- | -------- | +| [`term query`](/commands/docs/term_query.md) | Query the terminal for information. | built-in | +| [`term size`](/commands/docs/term_size.md) | Returns a record containing the number of columns (width) and rows (height) of the terminal. | built-in | \ No newline at end of file diff --git a/commands/docs/term_query.md b/commands/docs/term_query.md new file mode 100644 index 00000000000..e8b810e6889 --- /dev/null +++ b/commands/docs/term_query.md @@ -0,0 +1,73 @@ +--- +title: term query +categories: | + platform +version: 0.101.0 +platform: | + Query the terminal for information. +usage: | + Query the terminal for information. +--- + + +# `term query` for [platform](/commands/categories/platform.md) + +
Query the terminal for information.
+ +## Signature + +```> term query {flags} (query)``` + +## Flags + + - `--prefix, -p {one_of(binary, string)}`: Prefix sequence for the expected reply. + - `--terminator, -t {one_of(binary, string)}`: Terminator sequence for the expected reply. + - `--keep, -k`: Include prefix and terminator in the output. + +## Parameters + + - `query`: The query that will be printed to stdout. + + +## Input/output types: + +| input | output | +| ------- | ------ | +| nothing | binary | + +## Examples + +Get cursor position. +```nu +> term query (ansi cursor_position) --prefix (ansi csi) --terminator 'R' + +``` + +Get terminal background color. +```nu +> term query $'(ansi osc)10;?(ansi st)' --prefix $'(ansi osc)10;' --terminator (ansi st) + +``` + +Get terminal background color. (some terminals prefer `char bel` rather than `ansi st` as string terminator) +```nu +> term query $'(ansi osc)10;?(char bel)' --prefix $'(ansi osc)10;' --terminator (char bel) + +``` + +Read clipboard content on terminals supporting OSC-52. +```nu +> term query $'(ansi osc)52;c;?(ansi st)' --prefix $'(ansi osc)52;c;' --terminator (ansi st) + +``` + +## Notes +Print the given query, and read the immediate result from stdin. + +The standard input will be read right after `query` is printed, and consumed until the `terminator` +sequence is encountered. The `terminator` is not included in the output. + +If `terminator` is not supplied, input will be read until Ctrl-C is pressed. + +If `prefix` is supplied, input's initial bytes will be validated against it. +The `prefix` is not included in the output. \ No newline at end of file diff --git a/commands/docs/term_size.md b/commands/docs/term_size.md index 534ad309523..e2d9f8ed7d3 100644 --- a/commands/docs/term_size.md +++ b/commands/docs/term_size.md @@ -2,7 +2,7 @@ title: term size categories: | platform -version: 0.100.0 +version: 0.101.0 platform: | Returns a record containing the number of columns (width) and rows (height) of the terminal. usage: | diff --git a/commands/docs/timeit.md b/commands/docs/timeit.md index 7dac9d3e9c7..79756a22eb3 100644 --- a/commands/docs/timeit.md +++ b/commands/docs/timeit.md @@ -2,17 +2,17 @@ title: timeit categories: | debug -version: 0.100.0 +version: 0.101.0 debug: | - Time the running time of a block. + Time how long it takes a closure to run. usage: | - Time the running time of a block. + Time how long it takes a closure to run. --- # `timeit` for [debug](/commands/categories/debug.md) -
Time the running time of a block.
+
Time how long it takes a closure to run.
## Signature @@ -20,7 +20,7 @@ usage: | ## Parameters - - `command`: The command or block to run. + - `command`: The closure to run. ## Input/output types: @@ -31,20 +31,31 @@ usage: | | nothing | duration | ## Examples -Times a command within a closure +Time a closure containing one command ```nu > timeit { sleep 500ms } ``` -Times a command using an existing input +Time a closure with an input value ```nu -> http get https://www.nushell.sh/book/ | timeit { split chars } +> 'A really long string' | timeit { split chars } ``` -Times a command invocation +Time a closure with an input stream ```nu -> timeit ls -la +> open some_file.txt | collect | timeit { split chars } ``` + +Time a closure containing a pipeline +```nu +> timeit { open some_file.txt | split chars } + +``` + +## Notes +Any pipeline input given to this command is passed to the closure. Note that streaming inputs may affect timing results, and it is recommended to add a `collect` command before this if the input is a stream. + +This command will bubble up any errors encountered when running the closure. The return pipeline of the closure is collected into a value and then discarded. \ No newline at end of file diff --git a/commands/docs/to.md b/commands/docs/to.md index 007805955b9..ce334c26035 100644 --- a/commands/docs/to.md +++ b/commands/docs/to.md @@ -2,7 +2,7 @@ title: to categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Translate structured data to a format. usage: | diff --git a/commands/docs/to_csv.md b/commands/docs/to_csv.md index 2948bf77bf1..c675196c619 100644 --- a/commands/docs/to_csv.md +++ b/commands/docs/to_csv.md @@ -2,7 +2,7 @@ title: to csv categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Convert table into .csv text . usage: | diff --git a/commands/docs/to_html.md b/commands/docs/to_html.md index 92631e5ee76..442b61155cc 100644 --- a/commands/docs/to_html.md +++ b/commands/docs/to_html.md @@ -2,7 +2,7 @@ title: to html categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Convert table into simple HTML. usage: | diff --git a/commands/docs/to_json.md b/commands/docs/to_json.md index e4c3c71dcf9..0fd5c8c7fda 100644 --- a/commands/docs/to_json.md +++ b/commands/docs/to_json.md @@ -2,7 +2,7 @@ title: to json categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Converts table data into JSON text. usage: | diff --git a/commands/docs/to_md.md b/commands/docs/to_md.md index 825b7b3578d..38b69d441ba 100644 --- a/commands/docs/to_md.md +++ b/commands/docs/to_md.md @@ -2,7 +2,7 @@ title: to md categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Convert table into simple Markdown. usage: | diff --git a/commands/docs/to_msgpack.md b/commands/docs/to_msgpack.md index a6febc8d256..6ced502c8b4 100644 --- a/commands/docs/to_msgpack.md +++ b/commands/docs/to_msgpack.md @@ -2,7 +2,7 @@ title: to msgpack categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Convert Nu values into MessagePack. usage: | diff --git a/commands/docs/to_msgpackz.md b/commands/docs/to_msgpackz.md index 70885582142..57a48b7a541 100644 --- a/commands/docs/to_msgpackz.md +++ b/commands/docs/to_msgpackz.md @@ -2,7 +2,7 @@ title: to msgpackz categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Convert Nu values into brotli-compressed MessagePack. usage: | diff --git a/commands/docs/to_nuon.md b/commands/docs/to_nuon.md index b0247488cd0..d3a549e6eeb 100644 --- a/commands/docs/to_nuon.md +++ b/commands/docs/to_nuon.md @@ -2,7 +2,7 @@ title: to nuon categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Converts table data into Nuon (Nushell Object Notation) text. usage: | diff --git a/commands/docs/to_plist.md b/commands/docs/to_plist.md index 68d0b26490e..f9c936e1ed1 100644 --- a/commands/docs/to_plist.md +++ b/commands/docs/to_plist.md @@ -2,7 +2,7 @@ title: to plist categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Convert Nu values into plist usage: | diff --git a/commands/docs/to_text.md b/commands/docs/to_text.md index 431aa74add1..7f5cc40cf31 100644 --- a/commands/docs/to_text.md +++ b/commands/docs/to_text.md @@ -2,7 +2,7 @@ title: to text categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Converts data into simple text. usage: | diff --git a/commands/docs/to_toml.md b/commands/docs/to_toml.md index 055cdeecc47..6f8bbc02ec4 100644 --- a/commands/docs/to_toml.md +++ b/commands/docs/to_toml.md @@ -2,7 +2,7 @@ title: to toml categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Convert record into .toml text. usage: | diff --git a/commands/docs/to_tsv.md b/commands/docs/to_tsv.md index b374c58043c..804d45d21c2 100644 --- a/commands/docs/to_tsv.md +++ b/commands/docs/to_tsv.md @@ -2,7 +2,7 @@ title: to tsv categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Convert table into .tsv text. usage: | diff --git a/commands/docs/to_xml.md b/commands/docs/to_xml.md index 119bb686f39..0aced66ded2 100644 --- a/commands/docs/to_xml.md +++ b/commands/docs/to_xml.md @@ -2,7 +2,7 @@ title: to xml categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Convert special record structure into .xml text. usage: | diff --git a/commands/docs/to_yaml.md b/commands/docs/to_yaml.md index b255b16ee62..56eb7ad20f9 100644 --- a/commands/docs/to_yaml.md +++ b/commands/docs/to_yaml.md @@ -2,7 +2,7 @@ title: to yaml categories: | formats -version: 0.100.0 +version: 0.101.0 formats: | Convert table into .yaml/.yml text. usage: | diff --git a/commands/docs/touch.md b/commands/docs/touch.md index 415f2a70265..2f3dd7fc33d 100644 --- a/commands/docs/touch.md +++ b/commands/docs/touch.md @@ -2,7 +2,7 @@ title: touch categories: | filesystem -version: 0.100.0 +version: 0.101.0 filesystem: | Creates one or more files. usage: | diff --git a/commands/docs/transpose.md b/commands/docs/transpose.md index 39a18110bbd..a08b070c887 100644 --- a/commands/docs/transpose.md +++ b/commands/docs/transpose.md @@ -2,7 +2,7 @@ title: transpose categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Transposes the table contents so rows become columns and columns become rows. usage: | diff --git a/commands/docs/try.md b/commands/docs/try.md index ba5b23b40ec..49dc9849d15 100644 --- a/commands/docs/try.md +++ b/commands/docs/try.md @@ -2,7 +2,7 @@ title: try categories: | core -version: 0.100.0 +version: 0.101.0 core: | Try to run a block, if it fails optionally run a catch closure. usage: | diff --git a/commands/docs/tutor.md b/commands/docs/tutor.md index 14c773bcb5c..47d854da971 100644 --- a/commands/docs/tutor.md +++ b/commands/docs/tutor.md @@ -2,7 +2,7 @@ title: tutor categories: | misc -version: 0.100.0 +version: 0.101.0 misc: | Run the tutorial. To begin, run: tutor. usage: | diff --git a/commands/docs/ulimit.md b/commands/docs/ulimit.md index 44960660480..9a8d914d6b9 100644 --- a/commands/docs/ulimit.md +++ b/commands/docs/ulimit.md @@ -2,7 +2,7 @@ title: ulimit categories: | platform -version: 0.100.0 +version: 0.101.0 platform: | Set or get resource usage limits. usage: | @@ -25,20 +25,11 @@ usage: | - `--all, -a`: Prints all current limits - `--core-size, -c`: Maximum size of core files created - `--data-size, -d`: Maximum size of a process's data segment - - `--nice, -e`: Controls of maximum nice priority - `--file-size, -f`: Maximum size of files created by the shell - - `--pending-signals, -i`: Maximum number of pending signals - - `--lock-size, -l`: Maximum size that may be locked into memory - - `--resident-set-size, -m`: Maximum resident set size - `--file-descriptor-count, -n`: Maximum number of open file descriptors - - `--queue-size, -q`: Maximum bytes in POSIX message queues - - `--realtime-priority, -r`: Maximum realtime scheduling priority - `--stack-size, -s`: Maximum stack size - `--cpu-time, -t`: Maximum amount of CPU time in seconds - - `--process-count, -u`: Maximum number of processes available to the current user - `--virtual-memory-size, -v`: Maximum amount of virtual memory available to each process - - `--file-locks, -x`: Maximum number of file locks - - `--realtime-maxtime, -y`: Maximum contiguous realtime CPU time ## Parameters diff --git a/commands/docs/uname.md b/commands/docs/uname.md index 9178c87b52e..bc84deeedb1 100644 --- a/commands/docs/uname.md +++ b/commands/docs/uname.md @@ -2,7 +2,7 @@ title: uname categories: | system -version: 0.100.0 +version: 0.101.0 system: | Print certain system information using uutils/coreutils uname. usage: | diff --git a/commands/docs/uniq-by.md b/commands/docs/uniq-by.md index e1589209be2..9b5dc8a0834 100644 --- a/commands/docs/uniq-by.md +++ b/commands/docs/uniq-by.md @@ -2,7 +2,7 @@ title: uniq-by categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Return the distinct values in the input by the given column(s). usage: | diff --git a/commands/docs/uniq.md b/commands/docs/uniq.md index 92bd5bdea37..8626df5fffa 100644 --- a/commands/docs/uniq.md +++ b/commands/docs/uniq.md @@ -2,7 +2,7 @@ title: uniq categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Return the distinct values in the input. usage: | diff --git a/commands/docs/update.md b/commands/docs/update.md index f16e570edb4..fc2d96702d0 100644 --- a/commands/docs/update.md +++ b/commands/docs/update.md @@ -2,7 +2,7 @@ title: update categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Update an existing column to have a new value. usage: | diff --git a/commands/docs/update_cells.md b/commands/docs/update_cells.md index afd8e855108..d7e6d19eedd 100644 --- a/commands/docs/update_cells.md +++ b/commands/docs/update_cells.md @@ -2,7 +2,7 @@ title: update cells categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Update the table cells. usage: | @@ -47,11 +47,11 @@ Update the zero value cells to empty strings. $value } } -╭───┬────────────┬────────────┬────────────┬────────────┬────────────┬────────────┬────────────╮ -│ # │ 2021-04-16 │ 2021-06-10 │ 2021-09-18 │ 2021-10-15 │ 2021-11-16 │ 2021-11-17 │ 2021-11-18 │ -├───┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┤ -│ 0 │ 37 │ │ │ │ 37 │ │ │ -╰───┴────────────┴────────────┴────────────┴────────────┴────────────┴────────────┴────────────╯ +╭──────┬───────────────┬───────────────┬───────────────┬───────────────┬───────────────┬───────────────┬──────────────╮ +│ # │ 2021-04-16 │ 2021-06-10 │ 2021-09-18 │ 2021-10-15 │ 2021-11-16 │ 2021-11-17 │ 2021-11-18 │ +├──────┼───────────────┼───────────────┼───────────────┼───────────────┼───────────────┼───────────────┼──────────────┤ +│ 0 │ 37 │ │ │ │ 37 │ │ │ +╰──────┴───────────────┴───────────────┴───────────────┴───────────────┴───────────────┴───────────────┴──────────────╯ ``` @@ -67,10 +67,10 @@ Update the zero value cells to empty strings in 2 last columns. $value } } -╭───┬────────────┬────────────┬────────────┬────────────┬────────────┬────────────┬────────────╮ -│ # │ 2021-04-16 │ 2021-06-10 │ 2021-09-18 │ 2021-10-15 │ 2021-11-16 │ 2021-11-17 │ 2021-11-18 │ -├───┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┤ -│ 0 │ 37 │ 0 │ 0 │ 0 │ 37 │ │ │ -╰───┴────────────┴────────────┴────────────┴────────────┴────────────┴────────────┴────────────╯ +╭──────┬───────────────┬───────────────┬───────────────┬───────────────┬───────────────┬───────────────┬──────────────╮ +│ # │ 2021-04-16 │ 2021-06-10 │ 2021-09-18 │ 2021-10-15 │ 2021-11-16 │ 2021-11-17 │ 2021-11-18 │ +├──────┼───────────────┼───────────────┼───────────────┼───────────────┼───────────────┼───────────────┼──────────────┤ +│ 0 │ 37 │ 0 │ 0 │ 0 │ 37 │ │ │ +╰──────┴───────────────┴───────────────┴───────────────┴───────────────┴───────────────┴───────────────┴──────────────╯ ``` diff --git a/commands/docs/upsert.md b/commands/docs/upsert.md index 0d0f153697a..0034576266e 100644 --- a/commands/docs/upsert.md +++ b/commands/docs/upsert.md @@ -2,7 +2,7 @@ title: upsert categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Update an existing column to have a new value, or insert a new column. usage: | diff --git a/commands/docs/url.md b/commands/docs/url.md index 36c320ad9da..1747d304916 100644 --- a/commands/docs/url.md +++ b/commands/docs/url.md @@ -2,7 +2,7 @@ title: url categories: | network -version: 0.100.0 +version: 0.101.0 network: | Various commands for working with URLs. usage: | diff --git a/commands/docs/url_build-query.md b/commands/docs/url_build-query.md index 12813de622d..10d87f4f761 100644 --- a/commands/docs/url_build-query.md +++ b/commands/docs/url_build-query.md @@ -2,7 +2,7 @@ title: url build-query categories: | network -version: 0.100.0 +version: 0.101.0 network: | Converts record or table into query string applying percent-encoding. usage: | diff --git a/commands/docs/url_decode.md b/commands/docs/url_decode.md index a5c7138c7b4..22422e54066 100644 --- a/commands/docs/url_decode.md +++ b/commands/docs/url_decode.md @@ -2,7 +2,7 @@ title: url decode categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Converts a percent-encoded web safe string to a string. usage: | diff --git a/commands/docs/url_encode.md b/commands/docs/url_encode.md index c9f73b5d513..3ff1bd37c74 100644 --- a/commands/docs/url_encode.md +++ b/commands/docs/url_encode.md @@ -2,7 +2,7 @@ title: url encode categories: | strings -version: 0.100.0 +version: 0.101.0 strings: | Converts a string to a percent encoded web safe string. usage: | diff --git a/commands/docs/url_join.md b/commands/docs/url_join.md index 4bd595c7624..d9441be8753 100644 --- a/commands/docs/url_join.md +++ b/commands/docs/url_join.md @@ -2,7 +2,7 @@ title: url join categories: | network -version: 0.100.0 +version: 0.101.0 network: | Converts a record to url. usage: | diff --git a/commands/docs/url_parse.md b/commands/docs/url_parse.md index d2993e1e0cc..a8d8570bf6f 100644 --- a/commands/docs/url_parse.md +++ b/commands/docs/url_parse.md @@ -2,7 +2,7 @@ title: url parse categories: | network -version: 0.100.0 +version: 0.101.0 network: | Parses a url. usage: | diff --git a/commands/docs/url_split-query.md b/commands/docs/url_split-query.md index 6e2a3889d45..d2eced92988 100644 --- a/commands/docs/url_split-query.md +++ b/commands/docs/url_split-query.md @@ -2,7 +2,7 @@ title: url split-query categories: | network -version: 0.100.0 +version: 0.101.0 network: | Converts query string into table applying percent-decoding. usage: | diff --git a/commands/docs/use.md b/commands/docs/use.md index 78e9e4d03a2..97d89a269a6 100644 --- a/commands/docs/use.md +++ b/commands/docs/use.md @@ -2,7 +2,7 @@ title: use categories: | core -version: 0.100.0 +version: 0.101.0 core: | Use definitions from a module, making them available in your shell. usage: | diff --git a/commands/docs/utouch.md b/commands/docs/utouch.md new file mode 100644 index 00000000000..b89ff9788bc --- /dev/null +++ b/commands/docs/utouch.md @@ -0,0 +1,90 @@ +--- +title: utouch +categories: | + filesystem +version: 0.101.0 +filesystem: | + Creates one or more files. +usage: | + Creates one or more files. +--- + + +# `utouch` for [filesystem](/commands/categories/filesystem.md) + +
Creates one or more files.
+ +## Signature + +```> utouch {flags} ...rest``` + +## Flags + + - `--reference, -r {path}`: Use the access and modification times of the reference file/directory instead of the current time + - `--timestamp, -t {datetime}`: Use the given timestamp instead of the current time + - `--date, -d {string}`: Use the given time instead of the current time. This can be a full timestamp or it can be relative to either the current time or reference file time (if given). For more information, see https://www.gnu.org/software/coreutils/manual/html_node/touch-invocation.html + - `--modified, -m`: Change only the modification time (if used with -a, access time is changed too) + - `--access, -a`: Change only the access time (if used with -m, modification time is changed too) + - `--no-create, -c`: Don't create the file if it doesn't exist + - `--no-deref, -s`: Affect each symbolic link instead of any referenced file (only for systems that can change the timestamps of a symlink). Ignored if touching stdout + +## Parameters + + - `...rest`: The file(s) to create. '-' is used to represent stdout. + + +## Input/output types: + +| input | output | +| ------- | ------- | +| nothing | nothing | + +## Examples + +Creates "fixture.json" +```nu +> utouch fixture.json + +``` + +Creates files a, b and c +```nu +> utouch a b c + +``` + +Changes the last modified time of "fixture.json" to today's date +```nu +> utouch -m fixture.json + +``` + +Changes the last accessed and modified times of files a, b and c to the current time but yesterday +```nu +> utouch -d "yesterday" a b c + +``` + +Changes the last modified time of files d and e to "fixture.json"'s last modified time +```nu +> utouch -m -r fixture.json d e + +``` + +Changes the last accessed time of "fixture.json" to a datetime +```nu +> utouch -a -t 2019-08-24T12:30:30 fixture.json + +``` + +Change the last accessed and modified times of stdout +```nu +> utouch - + +``` + +Changes the last accessed and modified times of file a to 1 month before "fixture.json"'s last modified time +```nu +> utouch -r fixture.json -d "-1 month" a + +``` diff --git a/commands/docs/values.md b/commands/docs/values.md index c71717aa31a..c198d208330 100644 --- a/commands/docs/values.md +++ b/commands/docs/values.md @@ -2,7 +2,7 @@ title: values categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Given a record or table, produce a list of its columns' values. usage: | diff --git a/commands/docs/version.md b/commands/docs/version.md index 265693f0fe4..5cad03570ca 100644 --- a/commands/docs/version.md +++ b/commands/docs/version.md @@ -2,7 +2,7 @@ title: version categories: | core -version: 0.100.0 +version: 0.101.0 core: | Display Nu version, and its build configuration. usage: | diff --git a/commands/docs/view.md b/commands/docs/view.md index aef24356ab0..5154a3c596c 100644 --- a/commands/docs/view.md +++ b/commands/docs/view.md @@ -2,7 +2,7 @@ title: view categories: | debug -version: 0.100.0 +version: 0.101.0 debug: | Various commands for viewing debug information. usage: | @@ -30,9 +30,10 @@ You must use one of the following subcommands. Using this command as-is will onl ## Subcommands: -| name | description | type | -| ---------------------------------------------- | ---------------------------------------------------------- | -------- | -| [`view files`](/commands/docs/view_files.md) | View the files registered in nushell's EngineState memory. | built-in | -| [`view ir`](/commands/docs/view_ir.md) | View the compiled IR code for a block of code. | built-in | -| [`view source`](/commands/docs/view_source.md) | View a block, module, or a definition. | built-in | -| [`view span`](/commands/docs/view_span.md) | View the contents of a span. | built-in | \ No newline at end of file +| name | description | type | +| ---------------------------------------------- | ----------------------------------------------------------- | -------- | +| [`view blocks`](/commands/docs/view_blocks.md) | View the blocks registered in nushell's EngineState memory. | built-in | +| [`view files`](/commands/docs/view_files.md) | View the files registered in nushell's EngineState memory. | built-in | +| [`view ir`](/commands/docs/view_ir.md) | View the compiled IR code for a block of code. | built-in | +| [`view source`](/commands/docs/view_source.md) | View a block, module, or a definition. | built-in | +| [`view span`](/commands/docs/view_span.md) | View the contents of a span. | built-in | \ No newline at end of file diff --git a/commands/docs/view_blocks.md b/commands/docs/view_blocks.md new file mode 100644 index 00000000000..3dc9f43aea8 --- /dev/null +++ b/commands/docs/view_blocks.md @@ -0,0 +1,37 @@ +--- +title: view blocks +categories: | + debug +version: 0.101.0 +debug: | + View the blocks registered in nushell's EngineState memory. +usage: | + View the blocks registered in nushell's EngineState memory. +--- + + +# `view blocks` for [debug](/commands/categories/debug.md) + +
View the blocks registered in nushell's EngineState memory.
+ +## Signature + +```> view blocks {flags} ``` + + +## Input/output types: + +| input | output | +| ------- | ----------------------------------------------------------- | +| nothing | table\ | + +## Examples + +View the blocks registered in Nushell's EngineState memory +```nu +> view blocks + +``` + +## Notes +These are blocks parsed and loaded at runtime as well as any blocks that accumulate in the repl. \ No newline at end of file diff --git a/commands/docs/view_files.md b/commands/docs/view_files.md index a4a9dfcc2cc..0c9a140a711 100644 --- a/commands/docs/view_files.md +++ b/commands/docs/view_files.md @@ -2,7 +2,7 @@ title: view files categories: | debug -version: 0.100.0 +version: 0.101.0 debug: | View the files registered in nushell's EngineState memory. usage: | diff --git a/commands/docs/view_ir.md b/commands/docs/view_ir.md index 98dc9db00b8..18da54f57bb 100644 --- a/commands/docs/view_ir.md +++ b/commands/docs/view_ir.md @@ -2,7 +2,7 @@ title: view ir categories: | debug -version: 0.100.0 +version: 0.101.0 debug: | View the compiled IR code for a block of code. usage: | diff --git a/commands/docs/view_source.md b/commands/docs/view_source.md index 4c1673ae242..160c9f2a4af 100644 --- a/commands/docs/view_source.md +++ b/commands/docs/view_source.md @@ -2,7 +2,7 @@ title: view source categories: | debug -version: 0.100.0 +version: 0.101.0 debug: | View a block, module, or a definition. usage: | diff --git a/commands/docs/view_span.md b/commands/docs/view_span.md index 62a82dac792..ded3c0ec5e8 100644 --- a/commands/docs/view_span.md +++ b/commands/docs/view_span.md @@ -2,7 +2,7 @@ title: view span categories: | debug -version: 0.100.0 +version: 0.101.0 debug: | View the contents of a span. usage: | diff --git a/commands/docs/watch.md b/commands/docs/watch.md index 62bff49289c..70e5d1962a9 100644 --- a/commands/docs/watch.md +++ b/commands/docs/watch.md @@ -2,7 +2,7 @@ title: watch categories: | filesystem -version: 0.100.0 +version: 0.101.0 filesystem: | Watch for file changes and execute Nu code when they happen. usage: | diff --git a/commands/docs/where.md b/commands/docs/where.md index 36d8f05cd43..39355daf8d0 100644 --- a/commands/docs/where.md +++ b/commands/docs/where.md @@ -2,7 +2,7 @@ title: where categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Filter values based on a row condition. usage: | diff --git a/commands/docs/which.md b/commands/docs/which.md index fcf012187d2..adfd095dc12 100644 --- a/commands/docs/which.md +++ b/commands/docs/which.md @@ -2,7 +2,7 @@ title: which categories: | system -version: 0.100.0 +version: 0.101.0 system: | Finds a program file, alias or custom command. usage: | diff --git a/commands/docs/while.md b/commands/docs/while.md index 2628996dc8b..2e501d93a72 100644 --- a/commands/docs/while.md +++ b/commands/docs/while.md @@ -2,7 +2,7 @@ title: while categories: | core -version: 0.100.0 +version: 0.101.0 core: | Conditionally run a block in a loop. usage: | diff --git a/commands/docs/whoami.md b/commands/docs/whoami.md index 31d3a6c89a3..eed33f55387 100644 --- a/commands/docs/whoami.md +++ b/commands/docs/whoami.md @@ -2,7 +2,7 @@ title: whoami categories: | platform -version: 0.100.0 +version: 0.101.0 platform: | Get the current username using uutils/coreutils whoami. usage: | diff --git a/commands/docs/window.md b/commands/docs/window.md index da005e47b0b..af4e88beccc 100644 --- a/commands/docs/window.md +++ b/commands/docs/window.md @@ -2,7 +2,7 @@ title: window categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Creates a sliding window of `window_size` that slide by n rows/elements across input. usage: | diff --git a/commands/docs/with-env.md b/commands/docs/with-env.md index 67bbc55d863..963a4330152 100644 --- a/commands/docs/with-env.md +++ b/commands/docs/with-env.md @@ -2,7 +2,7 @@ title: with-env categories: | env -version: 0.100.0 +version: 0.101.0 env: | Runs a block with an environment variable set. usage: | diff --git a/commands/docs/wrap.md b/commands/docs/wrap.md index b0a762cbd2e..66674d0a7bf 100644 --- a/commands/docs/wrap.md +++ b/commands/docs/wrap.md @@ -2,7 +2,7 @@ title: wrap categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Wrap the value into a column. usage: | diff --git a/commands/docs/zip.md b/commands/docs/zip.md index 580cb488ed2..51abd93d2e6 100644 --- a/commands/docs/zip.md +++ b/commands/docs/zip.md @@ -2,7 +2,7 @@ title: zip categories: | filters -version: 0.100.0 +version: 0.101.0 filters: | Combine a stream with the input. usage: |