From bfcb0c559deb34ed5e5321a288bcabf0ae08eae0 Mon Sep 17 00:00:00 2001 From: hustcer Date: Thu, 26 Feb 2026 21:49:46 +0800 Subject: [PATCH 1/4] Refresh command docs for 0.111 --- commands/docs/alias.md | 4 +- commands/docs/all.md | 12 +- commands/docs/ansi.md | 58 +++++++- commands/docs/ansi_gradient.md | 10 +- commands/docs/ansi_link.md | 4 +- commands/docs/ansi_strip.md | 2 +- commands/docs/any.md | 12 +- commands/docs/append.md | 14 +- commands/docs/ast.md | 24 ++-- commands/docs/attr.md | 2 +- commands/docs/attr_category.md | 4 +- commands/docs/attr_complete.md | 4 +- commands/docs/attr_complete_external.md | 4 +- commands/docs/attr_deprecated.md | 12 +- commands/docs/attr_example.md | 4 +- commands/docs/attr_search-terms.md | 4 +- commands/docs/banner.md | 2 +- commands/docs/bits.md | 2 +- commands/docs/bits_and.md | 4 +- commands/docs/bits_not.md | 6 +- commands/docs/bits_or.md | 4 +- commands/docs/bits_rol.md | 6 +- commands/docs/bits_ror.md | 6 +- commands/docs/bits_shl.md | 6 +- commands/docs/bits_shr.md | 6 +- commands/docs/bits_xor.md | 4 +- commands/docs/break.md | 4 +- commands/docs/bytes.md | 16 +-- commands/docs/bytes_add.md | 20 +-- commands/docs/bytes_at.md | 22 +-- commands/docs/bytes_build.md | 12 +- commands/docs/bytes_collect.md | 6 +- commands/docs/bytes_ends-with.md | 14 +- commands/docs/bytes_index-of.md | 16 +-- commands/docs/bytes_length.md | 6 +- commands/docs/bytes_remove.md | 22 +-- commands/docs/bytes_replace.md | 16 +-- commands/docs/bytes_reverse.md | 6 +- commands/docs/bytes_split.md | 6 +- commands/docs/bytes_starts-with.md | 14 +- commands/docs/cal.md | 16 +-- commands/docs/cd.md | 16 +-- commands/docs/char.md | 8 +- commands/docs/chunk-by.md | 2 +- commands/docs/chunks.md | 2 +- commands/docs/clear.md | 14 +- commands/docs/clip.md | 37 ++++++ commands/docs/clip_copy.md | 52 ++++++++ commands/docs/clip_paste.md | 49 +++++++ commands/docs/collect.md | 14 +- commands/docs/columns.md | 2 +- commands/docs/commandline.md | 2 +- commands/docs/commandline_edit.md | 10 +- commands/docs/commandline_get-cursor.md | 2 +- commands/docs/commandline_set-cursor.md | 4 +- commands/docs/compact.md | 4 +- commands/docs/complete.md | 2 +- commands/docs/config.md | 2 +- commands/docs/config_env.md | 8 +- commands/docs/config_flatten.md | 4 +- commands/docs/config_nu.md | 8 +- commands/docs/config_reset.md | 10 +- commands/docs/config_use-colors.md | 2 +- commands/docs/const.md | 6 +- commands/docs/continue.md | 4 +- commands/docs/cp.md | 42 +++--- commands/docs/date.md | 2 +- commands/docs/date_format.md | 4 +- commands/docs/date_from-human.md | 12 +- commands/docs/date_humanize.md | 2 +- commands/docs/date_list-timezone.md | 4 +- commands/docs/date_now.md | 4 +- commands/docs/date_to-timezone.md | 2 +- commands/docs/debug.md | 14 +- commands/docs/debug_env.md | 6 +- commands/docs/debug_experimental-options.md | 2 +- commands/docs/debug_info.md | 4 +- commands/docs/debug_profile.md | 18 +-- commands/docs/decode.md | 14 +- commands/docs/decode_base32.md | 8 +- commands/docs/decode_base32hex.md | 2 +- commands/docs/decode_base64.md | 8 +- commands/docs/decode_hex.md | 8 +- commands/docs/def.md | 24 ++-- commands/docs/default.md | 4 +- commands/docs/describe.md | 16 +-- commands/docs/detect.md | 2 +- commands/docs/detect_columns.md | 12 +- commands/docs/detect_type.md | 6 +- commands/docs/do.md | 26 ++-- commands/docs/drop.md | 2 +- commands/docs/drop_column.md | 26 +++- commands/docs/drop_nth.md | 2 +- commands/docs/du.md | 16 +-- commands/docs/each.md | 18 +-- commands/docs/each_while.md | 2 +- commands/docs/echo.md | 2 +- commands/docs/encode.md | 4 +- 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 | 4 +- commands/docs/error.md | 2 +- commands/docs/error_make.md | 24 ++-- commands/docs/every.md | 4 +- commands/docs/exec.md | 2 +- commands/docs/exit.md | 6 +- commands/docs/explain.md | 4 +- commands/docs/explore.md | 10 +- commands/docs/explore_config.md | 8 +- commands/docs/explore_regex.md | 5 +- commands/docs/export-env.md | 6 +- commands/docs/export.md | 4 +- commands/docs/export_alias.md | 4 +- commands/docs/export_const.md | 6 +- commands/docs/export_def.md | 14 +- commands/docs/export_extern.md | 8 +- commands/docs/export_module.md | 4 +- commands/docs/export_use.md | 4 +- commands/docs/extern.md | 8 +- commands/docs/fill.md | 26 ++-- commands/docs/filter.md | 14 +- commands/docs/find.md | 52 ++++---- commands/docs/first.md | 12 +- commands/docs/flatten.md | 20 +-- commands/docs/for.md | 8 +- commands/docs/format.md | 2 +- commands/docs/format_bits.md | 4 +- commands/docs/format_date.md | 4 +- commands/docs/format_duration.md | 8 +- commands/docs/format_filesize.md | 11 +- commands/docs/format_number.md | 4 +- commands/docs/format_pattern.md | 2 +- commands/docs/from.md | 4 +- commands/docs/from_csv.md | 32 ++--- commands/docs/from_eml.md | 4 +- commands/docs/from_ics.md | 2 +- commands/docs/from_ini.md | 55 +++++++- commands/docs/from_json.md | 20 +-- commands/docs/from_msgpack.md | 10 +- commands/docs/from_msgpackz.md | 4 +- commands/docs/from_nuon.md | 8 +- commands/docs/from_ods.md | 8 +- commands/docs/from_plist.md | 2 +- commands/docs/from_ssv.md | 12 +- commands/docs/from_toml.md | 6 +- commands/docs/from_tsv.md | 30 ++--- commands/docs/from_url.md | 2 +- commands/docs/from_vcf.md | 2 +- commands/docs/from_xlsx.md | 8 +- commands/docs/from_xml.md | 10 +- commands/docs/from_yaml.md | 6 +- commands/docs/from_yml.md | 6 +- commands/docs/generate.md | 2 +- commands/docs/get.md | 30 ++--- commands/docs/glob.md | 36 ++--- commands/docs/grid.md | 10 +- commands/docs/group-by.md | 22 +-- commands/docs/gstat.md | 6 +- commands/docs/hash.md | 2 +- commands/docs/hash_md5.md | 4 +- commands/docs/hash_sha256.md | 4 +- commands/docs/headers.md | 2 +- commands/docs/help.md | 10 +- commands/docs/help_aliases.md | 10 +- commands/docs/help_commands.md | 4 +- commands/docs/help_escapes.md | 2 +- commands/docs/help_externs.md | 10 +- commands/docs/help_modules.md | 10 +- commands/docs/help_operators.md | 2 +- commands/docs/help_pipe-and-redirect.md | 2 +- commands/docs/hide-env.md | 6 +- commands/docs/hide.md | 6 +- commands/docs/histogram.md | 2 +- commands/docs/history.md | 12 +- commands/docs/history_import.md | 2 +- commands/docs/history_session.md | 2 +- commands/docs/http.md | 33 +++-- commands/docs/http_delete.md | 40 +++--- commands/docs/http_get.md | 36 ++--- commands/docs/http_head.md | 24 ++-- commands/docs/http_options.md | 28 ++-- commands/docs/http_patch.md | 42 +++--- commands/docs/http_pool.md | 10 +- commands/docs/http_post.md | 50 +++---- commands/docs/http_put.md | 42 +++--- commands/docs/if.md | 8 +- commands/docs/ignore.md | 4 +- commands/docs/inc.md | 10 +- commands/docs/input.md | 38 +++--- commands/docs/input_list.md | 140 ++++++++++++++++++-- commands/docs/input_listen.md | 15 ++- commands/docs/insert.md | 2 +- commands/docs/inspect.md | 4 +- commands/docs/interleave.md | 2 +- commands/docs/into.md | 16 +-- commands/docs/into_binary.md | 24 ++-- commands/docs/into_bool.md | 24 ++-- commands/docs/into_cell-path.md | 12 +- commands/docs/into_datetime.md | 30 ++--- commands/docs/into_duration.md | 24 ++-- commands/docs/into_filesize.md | 20 +-- commands/docs/into_float.md | 10 +- commands/docs/into_glob.md | 14 +- commands/docs/into_int.md | 42 +++--- commands/docs/into_record.md | 22 +-- commands/docs/into_sqlite.md | 12 +- commands/docs/into_string.md | 36 ++--- commands/docs/into_value.md | 6 +- commands/docs/is-admin.md | 2 +- commands/docs/is-empty.md | 2 +- commands/docs/is-not-empty.md | 2 +- commands/docs/is-terminal.md | 8 +- commands/docs/items.md | 2 +- commands/docs/job.md | 4 +- commands/docs/job_flush.md | 4 +- commands/docs/job_id.md | 4 +- commands/docs/job_kill.md | 4 +- commands/docs/job_list.md | 4 +- commands/docs/job_recv.md | 16 +-- commands/docs/job_send.md | 8 +- commands/docs/job_spawn.md | 6 +- commands/docs/job_tag.md | 6 +- commands/docs/job_unfreeze.md | 6 +- commands/docs/join.md | 34 ++++- commands/docs/keybindings.md | 2 +- commands/docs/keybindings_default.md | 2 +- commands/docs/keybindings_list.md | 12 +- commands/docs/keybindings_listen.md | 2 +- commands/docs/kill.md | 20 +-- commands/docs/last.md | 12 +- commands/docs/length.md | 13 +- commands/docs/let-env.md | 2 +- commands/docs/let.md | 30 +++-- commands/docs/lines.md | 4 +- commands/docs/load-env.md | 6 +- commands/docs/loop.md | 4 +- commands/docs/ls.md | 36 ++--- commands/docs/match.md | 18 +-- commands/docs/math.md | 2 +- commands/docs/math_abs.md | 4 +- commands/docs/math_arccos.md | 4 +- commands/docs/math_arccosh.md | 2 +- commands/docs/math_arcsin.md | 4 +- commands/docs/math_arcsinh.md | 2 +- commands/docs/math_arctan.md | 4 +- commands/docs/math_arctanh.md | 2 +- commands/docs/math_avg.md | 8 +- commands/docs/math_ceil.md | 4 +- commands/docs/math_cos.md | 4 +- commands/docs/math_cosh.md | 2 +- commands/docs/math_exp.md | 2 +- commands/docs/math_floor.md | 4 +- commands/docs/math_ln.md | 2 +- commands/docs/math_log.md | 6 +- commands/docs/math_max.md | 8 +- commands/docs/math_median.md | 8 +- commands/docs/math_min.md | 8 +- commands/docs/math_mode.md | 6 +- commands/docs/math_product.md | 6 +- commands/docs/math_round.md | 10 +- commands/docs/math_sin.md | 4 +- commands/docs/math_sinh.md | 2 +- commands/docs/math_sqrt.md | 4 +- commands/docs/math_stddev.md | 10 +- commands/docs/math_sum.md | 8 +- commands/docs/math_tan.md | 4 +- commands/docs/math_tanh.md | 2 +- commands/docs/math_variance.md | 10 +- commands/docs/merge.md | 8 +- commands/docs/merge_deep.md | 2 +- commands/docs/metadata.md | 6 +- commands/docs/metadata_access.md | 4 +- commands/docs/metadata_set.md | 27 ++-- commands/docs/mkdir.md | 8 +- commands/docs/mktemp.md | 10 +- commands/docs/module.md | 8 +- commands/docs/move.md | 16 +-- commands/docs/mut.md | 12 +- commands/docs/mv.md | 26 ++-- commands/docs/nu-check.md | 12 +- commands/docs/nu-highlight.md | 4 +- commands/docs/open.md | 16 +-- commands/docs/overlay.md | 2 +- commands/docs/overlay_hide.md | 12 +- commands/docs/overlay_list.md | 6 +- commands/docs/overlay_new.md | 4 +- commands/docs/overlay_use.md | 12 +- commands/docs/panic.md | 2 +- commands/docs/par-each.md | 14 +- commands/docs/parse.md | 22 +-- commands/docs/path.md | 2 +- commands/docs/path_basename.md | 10 +- commands/docs/path_dirname.md | 14 +- commands/docs/path_exists.md | 8 +- commands/docs/path_expand.md | 12 +- commands/docs/path_join.md | 16 +-- commands/docs/path_parse.md | 12 +- commands/docs/path_relative-to.md | 8 +- commands/docs/path_self.md | 8 +- commands/docs/path_split.md | 6 +- commands/docs/path_type.md | 6 +- commands/docs/plugin.md | 2 +- commands/docs/plugin_add.md | 6 +- commands/docs/plugin_list.md | 6 +- commands/docs/plugin_rm.md | 6 +- commands/docs/plugin_stop.md | 2 +- commands/docs/plugin_use.md | 4 +- commands/docs/polars.md | 3 +- commands/docs/polars_agg-groups.md | 2 +- commands/docs/polars_agg.md | 4 +- commands/docs/polars_all-false.md | 2 +- commands/docs/polars_all-true.md | 2 +- commands/docs/polars_append.md | 6 +- commands/docs/polars_arg-max.md | 2 +- commands/docs/polars_arg-min.md | 2 +- commands/docs/polars_arg-sort.md | 8 +- commands/docs/polars_arg-true.md | 2 +- commands/docs/polars_arg-unique.md | 2 +- commands/docs/polars_arg-where.md | 4 +- commands/docs/polars_as-date.md | 6 +- commands/docs/polars_as-datetime.md | 20 +-- commands/docs/polars_as.md | 4 +- commands/docs/polars_cache.md | 2 +- commands/docs/polars_cast.md | 4 +- commands/docs/polars_col.md | 6 +- commands/docs/polars_collect.md | 2 +- commands/docs/polars_columns.md | 2 +- commands/docs/polars_concat-str.md | 6 +- commands/docs/polars_concat.md | 14 +- commands/docs/polars_contains.md | 4 +- commands/docs/polars_convert-time-zone.md | 26 ++-- commands/docs/polars_count-null.md | 2 +- commands/docs/polars_count.md | 2 +- commands/docs/polars_cumulative.md | 6 +- commands/docs/polars_cut.md | 2 +- commands/docs/polars_datepart.md | 4 +- commands/docs/polars_decimal.md | 4 +- commands/docs/polars_drop-duplicates.md | 8 +- commands/docs/polars_drop-nulls.md | 4 +- commands/docs/polars_drop.md | 4 +- commands/docs/polars_dummies.md | 8 +- commands/docs/polars_entropy.md | 56 ++++++++ commands/docs/polars_explode.md | 4 +- commands/docs/polars_expr-not.md | 2 +- commands/docs/polars_fill-nan.md | 4 +- commands/docs/polars_fill-null.md | 4 +- commands/docs/polars_filter-with.md | 4 +- commands/docs/polars_filter.md | 16 +-- commands/docs/polars_first.md | 4 +- commands/docs/polars_flatten.md | 4 +- 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 | 4 +- commands/docs/polars_group-by.md | 4 +- commands/docs/polars_horizontal.md | 8 +- commands/docs/polars_implode.md | 2 +- commands/docs/polars_integer.md | 8 +- commands/docs/polars_into-df.md | 2 +- commands/docs/polars_into-dtype.md | 2 +- commands/docs/polars_into-lazy.md | 2 +- commands/docs/polars_into-nu.md | 8 +- commands/docs/polars_into-repr.md | 2 +- commands/docs/polars_into-schema.md | 2 +- commands/docs/polars_is-duplicated.md | 2 +- commands/docs/polars_is-in.md | 4 +- 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-where.md | 6 +- commands/docs/polars_join.md | 53 ++++++-- commands/docs/polars_last.md | 4 +- commands/docs/polars_len.md | 2 +- commands/docs/polars_list-contains.md | 4 +- commands/docs/polars_lit.md | 4 +- commands/docs/polars_lowercase.md | 2 +- commands/docs/polars_math.md | 6 +- 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 | 30 ++--- commands/docs/polars_otherwise.md | 4 +- commands/docs/polars_over.md | 4 +- commands/docs/polars_pivot.md | 28 ++-- commands/docs/polars_profile.md | 2 +- commands/docs/polars_qcut.md | 2 +- commands/docs/polars_quantile.md | 4 +- commands/docs/polars_query.md | 4 +- commands/docs/polars_rename.md | 6 +- commands/docs/polars_replace-time-zone.md | 24 ++-- commands/docs/polars_replace.md | 6 +- commands/docs/polars_reverse.md | 2 +- commands/docs/polars_rolling.md | 6 +- commands/docs/polars_sample.md | 12 +- commands/docs/polars_save.md | 10 +- commands/docs/polars_schema.md | 4 +- commands/docs/polars_select.md | 4 +- commands/docs/polars_selector.md | 2 +- commands/docs/polars_selector_all.md | 2 +- commands/docs/polars_selector_by-dtype.md | 4 +- commands/docs/polars_selector_by-name.md | 4 +- commands/docs/polars_selector_first.md | 4 +- commands/docs/polars_selector_last.md | 4 +- commands/docs/polars_set-with-idx.md | 6 +- commands/docs/polars_set.md | 6 +- commands/docs/polars_shape.md | 2 +- commands/docs/polars_shift.md | 6 +- commands/docs/polars_slice.md | 6 +- commands/docs/polars_sort-by.md | 10 +- commands/docs/polars_std.md | 2 +- commands/docs/polars_store-get.md | 4 +- commands/docs/polars_store-ls.md | 2 +- commands/docs/polars_store-rm.md | 4 +- commands/docs/polars_str-join.md | 2 +- commands/docs/polars_str-lengths.md | 2 +- commands/docs/polars_str-replace-all.md | 6 +- commands/docs/polars_str-replace.md | 6 +- commands/docs/polars_str-slice.md | 6 +- commands/docs/polars_str-split.md | 4 +- commands/docs/polars_str-strip-chars.md | 8 +- commands/docs/polars_strftime.md | 4 +- commands/docs/polars_struct-json-encode.md | 2 +- commands/docs/polars_sum.md | 2 +- commands/docs/polars_summary.md | 4 +- commands/docs/polars_take.md | 4 +- commands/docs/polars_truncate.md | 10 +- commands/docs/polars_unique.md | 8 +- commands/docs/polars_unnest.md | 6 +- commands/docs/polars_unpivot.md | 10 +- commands/docs/polars_uppercase.md | 2 +- commands/docs/polars_value-counts.md | 10 +- commands/docs/polars_var.md | 2 +- commands/docs/polars_when.md | 6 +- commands/docs/polars_with-column.md | 4 +- commands/docs/port.md | 2 +- commands/docs/prepend.md | 14 +- commands/docs/print.md | 10 +- commands/docs/ps.md | 4 +- commands/docs/pwd.md | 2 +- commands/docs/query.md | 2 +- commands/docs/query_db.md | 10 +- commands/docs/query_json.md | 4 +- commands/docs/query_web.md | 12 +- commands/docs/query_webpage-info.md | 2 +- commands/docs/query_xml.md | 6 +- commands/docs/random.md | 2 +- commands/docs/random_binary.md | 6 +- commands/docs/random_bool.md | 8 +- commands/docs/random_chars.md | 8 +- commands/docs/random_dice.md | 10 +- commands/docs/random_float.md | 10 +- commands/docs/random_int.md | 10 +- commands/docs/random_uuid.md | 12 +- commands/docs/reduce.md | 14 +- commands/docs/reject.md | 28 ++-- commands/docs/rename.md | 16 +-- commands/docs/return.md | 4 +- commands/docs/reverse.md | 6 +- commands/docs/rm.md | 27 ++-- commands/docs/roll.md | 2 +- commands/docs/roll_down.md | 4 +- commands/docs/roll_left.md | 6 +- commands/docs/roll_right.md | 6 +- commands/docs/roll_up.md | 4 +- commands/docs/rotate.md | 4 +- commands/docs/run-external.md | 2 +- commands/docs/save.md | 24 ++-- commands/docs/schema.md | 4 +- commands/docs/scope.md | 2 +- commands/docs/scope_aliases.md | 4 +- commands/docs/scope_commands.md | 4 +- commands/docs/scope_engine-stats.md | 4 +- commands/docs/scope_externs.md | 4 +- commands/docs/scope_modules.md | 4 +- commands/docs/scope_variables.md | 4 +- commands/docs/select.md | 33 ++--- commands/docs/seq.md | 2 +- commands/docs/seq_char.md | 2 +- commands/docs/seq_date.md | 18 +-- commands/docs/shuffle.md | 4 +- commands/docs/skip.md | 8 +- commands/docs/skip_until.md | 8 +- commands/docs/skip_while.md | 8 +- commands/docs/sleep.md | 10 +- commands/docs/slice.md | 8 +- commands/docs/sort-by.md | 22 +-- commands/docs/sort.md | 34 ++--- commands/docs/source-env.md | 4 +- commands/docs/source.md | 6 +- commands/docs/split.md | 2 +- commands/docs/split_cell-path.md | 6 +- commands/docs/split_chars.md | 12 +- commands/docs/split_column.md | 18 +-- commands/docs/split_list.md | 18 +-- commands/docs/split_row.md | 14 +- commands/docs/split_words.md | 14 +- commands/docs/start.md | 14 +- commands/docs/stor.md | 2 +- commands/docs/stor_create.md | 6 +- commands/docs/stor_delete.md | 6 +- commands/docs/stor_export.md | 4 +- commands/docs/stor_import.md | 4 +- commands/docs/stor_insert.md | 6 +- commands/docs/stor_open.md | 2 +- commands/docs/stor_reset.md | 2 +- commands/docs/stor_update.md | 8 +- commands/docs/str.md | 10 +- commands/docs/str_camel-case.md | 2 +- commands/docs/str_capitalize.md | 14 +- commands/docs/str_contains.md | 18 +-- commands/docs/str_distance.md | 8 +- commands/docs/str_downcase.md | 16 +-- commands/docs/str_ends-with.md | 10 +- commands/docs/str_expand.md | 6 +- commands/docs/str_index-of.md | 22 +-- commands/docs/str_join.md | 6 +- commands/docs/str_kebab-case.md | 2 +- commands/docs/str_length.md | 16 +-- commands/docs/str_pascal-case.md | 2 +- commands/docs/str_replace.md | 42 +++--- commands/docs/str_reverse.md | 6 +- commands/docs/str_screaming-snake-case.md | 2 +- commands/docs/str_snake-case.md | 2 +- commands/docs/str_starts-with.md | 12 +- commands/docs/str_stats.md | 8 +- commands/docs/str_substring.md | 12 +- commands/docs/str_title-case.md | 2 +- commands/docs/str_trim.md | 18 +-- commands/docs/str_upcase.md | 10 +- commands/docs/sys.md | 2 +- commands/docs/sys_cpu.md | 4 +- 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 | 26 ++-- commands/docs/take.md | 12 +- commands/docs/take_until.md | 8 +- commands/docs/take_while.md | 8 +- commands/docs/tee.md | 10 +- commands/docs/term.md | 2 +- commands/docs/term_query.md | 4 +- commands/docs/term_size.md | 8 +- commands/docs/timeit.md | 12 +- commands/docs/to.md | 10 +- commands/docs/to_csv.md | 16 +-- commands/docs/to_html.md | 16 +-- commands/docs/to_json.md | 16 +-- commands/docs/to_md.md | 36 ++--- commands/docs/to_msgpack.md | 10 +- commands/docs/to_msgpackz.md | 8 +- commands/docs/to_nuon.md | 24 ++-- commands/docs/to_plist.md | 4 +- commands/docs/to_text.md | 20 +-- commands/docs/to_toml.md | 6 +- commands/docs/to_tsv.md | 12 +- commands/docs/to_xml.md | 18 +-- commands/docs/to_yaml.md | 6 +- commands/docs/to_yml.md | 6 +- commands/docs/touch.md | 34 ++--- commands/docs/transpose.md | 20 +-- commands/docs/try.md | 19 ++- commands/docs/tutor.md | 8 +- commands/docs/ulimit.md | 22 +-- commands/docs/umask.md | 48 +++++++ commands/docs/uname.md | 2 +- commands/docs/uniq-by.md | 26 +++- commands/docs/uniq.md | 20 +-- commands/docs/unlet.md | 10 +- commands/docs/update.md | 12 +- commands/docs/update_cells.md | 4 +- commands/docs/upsert.md | 18 +-- commands/docs/url.md | 6 +- commands/docs/url_build-query.md | 10 +- commands/docs/url_decode.md | 6 +- commands/docs/url_encode.md | 10 +- commands/docs/url_join.md | 16 +-- commands/docs/url_parse.md | 10 +- commands/docs/url_split-query.md | 8 +- commands/docs/use.md | 14 +- commands/docs/values.md | 8 +- commands/docs/version.md | 4 +- commands/docs/version_check.md | 2 +- commands/docs/view.md | 2 +- commands/docs/view_blocks.md | 4 +- commands/docs/view_files.md | 6 +- commands/docs/view_ir.md | 2 +- commands/docs/view_source.md | 28 ++-- commands/docs/view_span.md | 4 +- commands/docs/watch.md | 20 +-- commands/docs/where.md | 26 ++-- commands/docs/which.md | 4 +- commands/docs/while.md | 4 +- commands/docs/whoami.md | 4 +- commands/docs/window.md | 12 +- commands/docs/with-env.md | 4 +- commands/docs/wrap.md | 6 +- commands/docs/zip.md | 10 +- make_docs.nu | 4 +- 613 files changed, 3187 insertions(+), 2573 deletions(-) create mode 100644 commands/docs/clip.md create mode 100644 commands/docs/clip_copy.md create mode 100644 commands/docs/clip_paste.md create mode 100644 commands/docs/polars_entropy.md create mode 100644 commands/docs/umask.md diff --git a/commands/docs/alias.md b/commands/docs/alias.md index 46ee911c8a9..94763799e57 100644 --- a/commands/docs/alias.md +++ b/commands/docs/alias.md @@ -2,7 +2,7 @@ title: alias categories: | core -version: 0.110.0 +version: 0.111.0 core: | Alias a command (with optional flags) to a new name. usage: | @@ -33,7 +33,7 @@ contributors: false | nothing | nothing | ## Examples -Alias ll to ls -l +Alias ll to ls -l. ```nu > alias ll = ls -l diff --git a/commands/docs/all.md b/commands/docs/all.md index 90d4fccb059..11eb494f24a 100644 --- a/commands/docs/all.md +++ b/commands/docs/all.md @@ -2,7 +2,7 @@ title: all categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Test if every element of the input fulfills a predicate expression. usage: | @@ -32,31 +32,31 @@ contributors: false | list<any> | bool | ## Examples -Check if a list contains only true values +Check if a list contains only true values. ```nu > [false true true false] | all {} false ``` -Check if each row's status is the string 'UP' +Check if each row's status is the string 'UP'. ```nu > [[status]; [UP] [UP]] | all {|el| $el.status == UP } true ``` -Check that each item is a string +Check that each item is a string. ```nu > [foo bar 2 baz] | all {|| ($in | describe) == 'string' } false ``` -Check that all values are equal to twice their index +Check that all values are equal to twice their index. ```nu > [0 2 4 6] | enumerate | all {|i| $i.item == $i.index * 2 } true ``` -Check that all of the values are even, using a stored closure +Check that all of the values are even, using a stored closure. ```nu > let cond = {|el| ($el mod 2) == 0 }; [2 4 6 8] | all $cond true diff --git a/commands/docs/ansi.md b/commands/docs/ansi.md index 264dfaaa5fe..a380889e65b 100644 --- a/commands/docs/ansi.md +++ b/commands/docs/ansi.md @@ -2,7 +2,7 @@ title: ansi categories: | platform -version: 0.110.0 +version: 0.111.0 platform: | Output ANSI codes to change color and style of text. usage: | @@ -24,7 +24,7 @@ contributors: false - `--escape, -e`: escape sequence without the escape character(s) ('\x1b[' is not required) - `--osc, -o`: operating system command (osc) escape sequence without the escape character(s) ('\x1b]' is not required) - - `--list, -l`: list available ansi code names + - `--list, -l`: List available ansi code names. ## Parameters @@ -91,6 +91,60 @@ Use structured escape codes Hello, Nu World! ``` +Use structured escape codes with attribute name +```nu +> let strike_blue_on_red = { + fg: '#0000ff' + bg: '#ff0000' + attr: strike + } + $"(ansi --escape $strike_blue_on_red)Hello, Nu World!(ansi reset)" +Hello, Nu World! +``` + +Use structured escape codes with multiple attribute names +```nu +> let bold_italic_blue_on_red = { + fg: '#0000ff' + bg: '#ff0000' + attr: 'bold italic' + } + $"(ansi --escape $bold_italic_blue_on_red)Hello, Nu World!(ansi reset)" +Hello, Nu World! +``` + +Use structured escape codes with concatenated attribute codes +```nu +> let bold_italic_strike_blue_on_red = { + fg: '#0000ff' + bg: '#ff0000' + attr: bis + } + $"(ansi --escape $bold_italic_strike_blue_on_red)Hello, Nu World!(ansi reset)" +Hello, Nu World! +``` + +Use structured escape codes with attribute list (comma-separated) +```nu +> let bold_underline_blue = { + fg: '#0000ff' + attr: [b,underline] + } + $"(ansi --escape $bold_underline_blue)Hello, Nu World!(ansi reset)" +Hello, Nu World! +``` + +Use structured escape codes with multiple attributes in list +```nu +> let styled_text = { + fg: '#0000ff' + bg: '#ff0000' + attr: [bold, italic, strike] + } + $"(ansi --escape $styled_text)Hello, Nu World!(ansi reset)" +Hello, Nu World! +``` + ## Notes ```text An introduction to what ANSI escape sequences are can be found in the diff --git a/commands/docs/ansi_gradient.md b/commands/docs/ansi_gradient.md index a1347acccf9..cec11276c74 100644 --- a/commands/docs/ansi_gradient.md +++ b/commands/docs/ansi_gradient.md @@ -2,7 +2,7 @@ title: ansi gradient categories: | platform -version: 0.110.0 +version: 0.111.0 platform: | Add a color gradient (using ANSI color codes) to the given string. usage: | @@ -22,10 +22,10 @@ contributors: false ## Flags - - `--fgstart, -a {string}`: foreground gradient start color in hex (0x123456) - - `--fgend, -b {string}`: foreground gradient end color in hex - - `--bgstart, -c {string}`: background gradient start color in hex - - `--bgend, -d {string}`: background gradient end color in hex + - `--fgstart, -a {string}`: Foreground gradient start color in hex (0x123456). + - `--fgend, -b {string}`: Foreground gradient end color in hex. + - `--bgstart, -c {string}`: Background gradient start color in hex. + - `--bgend, -d {string}`: Background gradient end color in hex. ## Parameters diff --git a/commands/docs/ansi_link.md b/commands/docs/ansi_link.md index 5783f49d3aa..f1eee99ada5 100644 --- a/commands/docs/ansi_link.md +++ b/commands/docs/ansi_link.md @@ -2,7 +2,7 @@ title: ansi link categories: | platform -version: 0.110.0 +version: 0.111.0 platform: | Add a link (using OSC 8 escape sequence) to the given string. usage: | @@ -23,7 +23,7 @@ contributors: false ## Flags - `--text, -t {string}`: Link text. Uses uri as text if absent. In case of - tables, records and lists applies this text to all elements + tables, records and lists applies this text to all elements. ## Parameters diff --git a/commands/docs/ansi_strip.md b/commands/docs/ansi_strip.md index 4c17988612a..62fa5b135c1 100644 --- a/commands/docs/ansi_strip.md +++ b/commands/docs/ansi_strip.md @@ -2,7 +2,7 @@ title: ansi strip categories: | platform -version: 0.110.0 +version: 0.111.0 platform: | Strip ANSI escape sequences from a string. usage: | diff --git a/commands/docs/any.md b/commands/docs/any.md index 26a9328a52f..e9500762de4 100644 --- a/commands/docs/any.md +++ b/commands/docs/any.md @@ -2,7 +2,7 @@ title: any categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Tests if any element of the input fulfills a predicate expression. usage: | @@ -32,31 +32,31 @@ contributors: false | list<any> | bool | ## Examples -Check if a list contains any true values +Check if a list contains any true values. ```nu > [false true true false] | any {} true ``` -Check if any row's status is the string 'DOWN' +Check if any row's status is the string 'DOWN'. ```nu > [[status]; [UP] [DOWN] [UP]] | any {|el| $el.status == DOWN } true ``` -Check that any item is a string +Check that any item is a string. ```nu > [1 2 3 4] | any {|| ($in | describe) == 'string' } false ``` -Check if any value is equal to twice its own index +Check if any value is equal to twice its own index. ```nu > [9 8 7 6] | enumerate | any {|i| $i.item == $i.index * 2 } true ``` -Check if any of the values are odd, using a stored closure +Check if any of the values are odd, using a stored closure. ```nu > let cond = {|e| $e mod 2 == 1 }; [2 4 1 6 8] | any $cond true diff --git a/commands/docs/append.md b/commands/docs/append.md index 232c6650658..941366d8e99 100644 --- a/commands/docs/append.md +++ b/commands/docs/append.md @@ -2,7 +2,7 @@ title: append categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Append any number of rows to a table. usage: | @@ -32,7 +32,7 @@ contributors: false | any | list<any> | ## Examples -Append one int to a list +Append one int to a list. ```nu > [0 1 2 3] | append 4 ╭───┬───╮ @@ -45,7 +45,7 @@ Append one int to a list ``` -Append a list to an item +Append a list to an item. ```nu > 0 | append [1 2 3] ╭───┬───╮ @@ -57,7 +57,7 @@ Append a list to an item ``` -Append a list of string to a string +Append a list of string to a string. ```nu > "a" | append ["b"] ╭───┬───╮ @@ -67,7 +67,7 @@ Append a list of string to a string ``` -Append three int items +Append three int items. ```nu > [0 1] | append [2 3 4] ╭───┬───╮ @@ -80,7 +80,7 @@ Append three int items ``` -Append ints and strings +Append ints and strings. ```nu > [0 1] | append [2 nu 4 shell] ╭───┬───────╮ @@ -94,7 +94,7 @@ Append ints and strings ``` -Append a range of ints to a list +Append a range of ints to a list. ```nu > [0 1] | append 2..4 ╭───┬───╮ diff --git a/commands/docs/ast.md b/commands/docs/ast.md index 0f925474bb9..4262373e234 100644 --- a/commands/docs/ast.md +++ b/commands/docs/ast.md @@ -2,7 +2,7 @@ title: ast categories: | debug -version: 0.110.0 +version: 0.111.0 debug: | Print the abstract syntax tree (ast) for a pipeline. usage: | @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--json, -j`: Serialize to json - - `--minify, -m`: Minify the nuon or json output - - `--flatten, -f`: An easier to read version of the ast + - `--json, -j`: Serialize to json. + - `--minify, -m`: Minify the nuon or json output. + - `--flatten, -f`: An easier to read version of the ast. ## Parameters @@ -40,37 +40,37 @@ contributors: false | nothing | string | ## Examples -Print the ast of a string +Print the ast of a string. ```nu > ast 'hello' ``` -Print the ast of a pipeline +Print the ast of a pipeline. ```nu > ast 'ls | where name =~ README' ``` -Print the ast of a pipeline with an error +Print the ast of a pipeline with an error. ```nu > ast 'for x in 1..10 { echo $x ' ``` -Print the ast of a pipeline with an error, as json, in a nushell table +Print the ast of a pipeline with an error, as json, in a nushell table. ```nu > ast 'for x in 1..10 { echo $x ' --json | get block | from json ``` -Print the ast of a pipeline with an error, as json, minified +Print the ast of a pipeline with an error, as json, minified. ```nu > ast 'for x in 1..10 { echo $x ' --json --minify ``` -Print the ast of a string flattened +Print the ast of a string flattened. ```nu > ast "'hello'" --flatten ╭───┬─────────┬──────────────┬───────────────╮ @@ -84,13 +84,13 @@ Print the ast of a string flattened ``` -Print the ast of a string flattened, as json, minified +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 +Print the ast of a pipeline flattened. ```nu > ast 'ls | sort-by type name -i' --flatten ╭───┬─────────┬────────────────────┬────────────────╮ diff --git a/commands/docs/attr.md b/commands/docs/attr.md index 37dce406d81..a98b9fa5a9d 100644 --- a/commands/docs/attr.md +++ b/commands/docs/attr.md @@ -2,7 +2,7 @@ title: attr categories: | core -version: 0.110.0 +version: 0.111.0 core: | Various attributes for custom commands. usage: | diff --git a/commands/docs/attr_category.md b/commands/docs/attr_category.md index 45cd6ff7e4e..f6d38841a05 100644 --- a/commands/docs/attr_category.md +++ b/commands/docs/attr_category.md @@ -2,7 +2,7 @@ title: attr category categories: | core -version: 0.110.0 +version: 0.111.0 core: | Attribute for adding a category to custom commands. usage: | @@ -32,7 +32,7 @@ contributors: false | nothing | string | ## Examples -Add a category to a custom command +Add a category to a custom command. ```nu > # Double numbers @category math diff --git a/commands/docs/attr_complete.md b/commands/docs/attr_complete.md index 10d3137ac0b..ee7253fc542 100644 --- a/commands/docs/attr_complete.md +++ b/commands/docs/attr_complete.md @@ -2,7 +2,7 @@ title: attr complete categories: | core -version: 0.110.0 +version: 0.111.0 core: | Attribute for using another command as a completion source for all arguments. usage: | @@ -32,7 +32,7 @@ contributors: false | nothing | string | ## Examples -Use another command as completion source +Use another command as completion source. ```nu > def complete-foo [spans: list] { [bar baz qux spam eggs] | where $it not-in $spans diff --git a/commands/docs/attr_complete_external.md b/commands/docs/attr_complete_external.md index 10c2247b96d..b5be90da3ca 100644 --- a/commands/docs/attr_complete_external.md +++ b/commands/docs/attr_complete_external.md @@ -2,7 +2,7 @@ title: attr complete external categories: | core -version: 0.110.0 +version: 0.111.0 core: | Attribute for enabling use of the external completer for internal commands. usage: | @@ -28,7 +28,7 @@ contributors: false | nothing | nothing | ## Examples -Use the external completer for a wrapper command +Use the external completer for a wrapper command. ```nu > @complete external def --wrapped jc [...args] { diff --git a/commands/docs/attr_deprecated.md b/commands/docs/attr_deprecated.md index b8e1af536ec..083a1815fb2 100644 --- a/commands/docs/attr_deprecated.md +++ b/commands/docs/attr_deprecated.md @@ -2,7 +2,7 @@ title: attr deprecated categories: | core -version: 0.110.0 +version: 0.111.0 core: | Attribute for marking a command or flag as deprecated. usage: | @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--flag {string}`: Mark a flag as deprecated rather than the command - - `--since, -s {string}`: Denote a version when this item was deprecated - - `--remove, -r {string}`: Denote a version when this item will be removed + - `--flag {string}`: Mark a flag as deprecated rather than the command. + - `--since, -s {string}`: Denote a version when this item was deprecated. + - `--remove, -r {string}`: Denote a version when this item will be removed. - `--report {string}`: How to warn about this item. One of: first (default), every ## Parameters @@ -39,14 +39,14 @@ contributors: false | nothing | record | ## Examples -Add a deprecation warning to a custom command +Add a deprecation warning to a custom command. ```nu > @deprecated def outdated [] {} ``` -Add a deprecation warning with a custom message +Add a deprecation warning with a custom message. ```nu > @deprecated "Use my-new-command instead." @category deprecated diff --git a/commands/docs/attr_example.md b/commands/docs/attr_example.md index 93e55401502..ae4f8e0d0b0 100644 --- a/commands/docs/attr_example.md +++ b/commands/docs/attr_example.md @@ -2,7 +2,7 @@ title: attr example categories: | core -version: 0.110.0 +version: 0.111.0 core: | Attribute for adding examples to custom commands. usage: | @@ -37,7 +37,7 @@ contributors: false | nothing | record<description: string, example: string> | ## Examples -Add examples to custom command +Add examples to custom command. ```nu > # Double numbers @example "double an int" { 2 | double } --result 4 diff --git a/commands/docs/attr_search-terms.md b/commands/docs/attr_search-terms.md index 6d6c47ca40c..23de0499b3d 100644 --- a/commands/docs/attr_search-terms.md +++ b/commands/docs/attr_search-terms.md @@ -2,7 +2,7 @@ title: attr search-terms categories: | core -version: 0.110.0 +version: 0.111.0 core: | Attribute for adding search terms to custom commands. usage: | @@ -32,7 +32,7 @@ contributors: false | nothing | list<string> | ## Examples -Add search terms to a custom command +Add search terms to a custom command. ```nu > # Double numbers @search-terms multiply times diff --git a/commands/docs/banner.md b/commands/docs/banner.md index 14fdd8de873..8acc620ad2d 100644 --- a/commands/docs/banner.md +++ b/commands/docs/banner.md @@ -2,7 +2,7 @@ title: banner categories: | default -version: 0.110.0 +version: 0.111.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 e42d57f9a8e..eb79f42ee4e 100644 --- a/commands/docs/bits.md +++ b/commands/docs/bits.md @@ -2,7 +2,7 @@ title: bits categories: | bits -version: 0.110.0 +version: 0.111.0 bits: | Various commands for working with bits. usage: | diff --git a/commands/docs/bits_and.md b/commands/docs/bits_and.md index e72667507be..5eaa847044e 100644 --- a/commands/docs/bits_and.md +++ b/commands/docs/bits_and.md @@ -2,7 +2,7 @@ title: bits and categories: | bits -version: 0.110.0 +version: 0.111.0 bits: | Performs bitwise and for ints or binary values. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--endian, -e {string}`: byte encode endian, available options: native(default), little, big + - `--endian, -e {string}`: Byte encode endian, available options: native(default), little, big. ## Parameters diff --git a/commands/docs/bits_not.md b/commands/docs/bits_not.md index bce35948426..fda3a1d79ce 100644 --- a/commands/docs/bits_not.md +++ b/commands/docs/bits_not.md @@ -2,7 +2,7 @@ title: bits not categories: | bits -version: 0.110.0 +version: 0.111.0 bits: | Performs logical negation on each bit. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--signed, -s`: always treat input number as a signed number - - `--number-bytes, -n {int}`: the size of unsigned number in bytes, it can be 1, 2, 4, 8, auto + - `--signed, -s`: Always treat input number as a signed number. + - `--number-bytes, -n {int}`: The size of unsigned number in bytes, it can be 1, 2, 4, 8, auto. ## Input/output types: diff --git a/commands/docs/bits_or.md b/commands/docs/bits_or.md index 0e6319468dc..37951e565e0 100644 --- a/commands/docs/bits_or.md +++ b/commands/docs/bits_or.md @@ -2,7 +2,7 @@ title: bits or categories: | bits -version: 0.110.0 +version: 0.111.0 bits: | Performs bitwise or for ints or binary values. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--endian, -e {string}`: byte encode endian, available options: native(default), little, big + - `--endian, -e {string}`: Byte encode endian, available options: native(default), little, big. ## Parameters diff --git a/commands/docs/bits_rol.md b/commands/docs/bits_rol.md index a231bf448d8..993f3b7a3a0 100644 --- a/commands/docs/bits_rol.md +++ b/commands/docs/bits_rol.md @@ -2,7 +2,7 @@ title: bits rol categories: | bits -version: 0.110.0 +version: 0.111.0 bits: | Bitwise rotate left for ints or binary values. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--signed, -s`: always treat input number as a signed number - - `--number-bytes, -n {int}`: the word size in number of bytes. Must be `1`, `2`, `4`, or `8` (defaults to the smallest of those that fits the input number) + - `--signed, -s`: Always treat input number as a signed number. + - `--number-bytes, -n {int}`: The word size in number of bytes. Must be `1`, `2`, `4`, or `8` (defaults to the smallest of those that fits the input number). ## Parameters diff --git a/commands/docs/bits_ror.md b/commands/docs/bits_ror.md index 285c284adbf..3df6d53fc24 100644 --- a/commands/docs/bits_ror.md +++ b/commands/docs/bits_ror.md @@ -2,7 +2,7 @@ title: bits ror categories: | bits -version: 0.110.0 +version: 0.111.0 bits: | Bitwise rotate right for ints or binary values. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--signed, -s`: always treat input number as a signed number - - `--number-bytes, -n {int}`: the word size in number of bytes. Must be `1`, `2`, `4`, or `8` (defaults to the smallest of those that fits the input number) + - `--signed, -s`: Always treat input number as a signed number. + - `--number-bytes, -n {int}`: The word size in number of bytes. Must be `1`, `2`, `4`, or `8` (defaults to the smallest of those that fits the input number). ## Parameters diff --git a/commands/docs/bits_shl.md b/commands/docs/bits_shl.md index 8b7fa073e2f..c9b906956a8 100644 --- a/commands/docs/bits_shl.md +++ b/commands/docs/bits_shl.md @@ -2,7 +2,7 @@ title: bits shl categories: | bits -version: 0.110.0 +version: 0.111.0 bits: | Bitwise shift left for ints or binary values. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--signed, -s`: always treat input number as a signed number - - `--number-bytes, -n {int}`: the word size in number of bytes. Must be `1`, `2`, `4`, or `8` (defaults to the smallest of those that fits the input number) + - `--signed, -s`: Always treat input number as a signed number. + - `--number-bytes, -n {int}`: The word size in number of bytes. Must be `1`, `2`, `4`, or `8` (defaults to the smallest of those that fits the input number). ## Parameters diff --git a/commands/docs/bits_shr.md b/commands/docs/bits_shr.md index 3a9e0149d70..13e2e89aeba 100644 --- a/commands/docs/bits_shr.md +++ b/commands/docs/bits_shr.md @@ -2,7 +2,7 @@ title: bits shr categories: | bits -version: 0.110.0 +version: 0.111.0 bits: | Bitwise shift right for ints or binary values. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--signed, -s`: always treat input number as a signed number - - `--number-bytes, -n {int}`: the word size in number of bytes. Must be `1`, `2`, `4`, or `8` (defaults to the smallest of those that fits the input number) + - `--signed, -s`: Always treat input number as a signed number. + - `--number-bytes, -n {int}`: The word size in number of bytes. Must be `1`, `2`, `4`, or `8` (defaults to the smallest of those that fits the input number). ## Parameters diff --git a/commands/docs/bits_xor.md b/commands/docs/bits_xor.md index b8bd3f0812d..77ab448a27a 100644 --- a/commands/docs/bits_xor.md +++ b/commands/docs/bits_xor.md @@ -2,7 +2,7 @@ title: bits xor categories: | bits -version: 0.110.0 +version: 0.111.0 bits: | Performs bitwise xor for ints or binary values. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--endian, -e {string}`: byte encode endian, available options: native(default), little, big + - `--endian, -e {string}`: Byte encode endian, available options: native(default), little, big. ## Parameters diff --git a/commands/docs/break.md b/commands/docs/break.md index df254606225..84d27cbb11c 100644 --- a/commands/docs/break.md +++ b/commands/docs/break.md @@ -2,7 +2,7 @@ title: break categories: | core -version: 0.110.0 +version: 0.111.0 core: | Break a loop. usage: | @@ -28,7 +28,7 @@ contributors: false | nothing | nothing | ## Examples -Break out of a loop +Break out of a loop. ```nu > loop { break } diff --git a/commands/docs/bytes.md b/commands/docs/bytes.md index 9c0e5c5f482..823e2a58bce 100644 --- a/commands/docs/bytes.md +++ b/commands/docs/bytes.md @@ -2,7 +2,7 @@ title: bytes categories: | bytes -version: 0.110.0 +version: 0.111.0 bytes: | Various commands for working with byte data. usage: | @@ -33,15 +33,15 @@ You must use one of the following subcommands. Using this command as-is will onl | name | description | type | | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------ | -------- | -| [`bytes add`](/commands/docs/bytes_add.md) | Add specified bytes to the input. | built-in | -| [`bytes at`](/commands/docs/bytes_at.md) | Get bytes defined by a range. | built-in | -| [`bytes build`](/commands/docs/bytes_build.md) | Create bytes from the arguments. | built-in | +| [`bytes add`](/commands/docs/bytes_add.md) | Add specified bytes to the binary input. | built-in | +| [`bytes at`](/commands/docs/bytes_at.md) | Get bytes from the input defined by a range. | built-in | +| [`bytes build`](/commands/docs/bytes_build.md) | Create a binary value from the provided arguments. | built-in | | [`bytes collect`](/commands/docs/bytes_collect.md) | Concatenate multiple binary into a single binary, with an optional separator between each. | built-in | -| [`bytes ends-with`](/commands/docs/bytes_ends-with.md) | Check if bytes ends with a pattern. | built-in | +| [`bytes ends-with`](/commands/docs/bytes_ends-with.md) | Check if binary data ends with a pattern. | built-in | | [`bytes index-of`](/commands/docs/bytes_index-of.md) | Returns start index of first occurrence of pattern in bytes, or -1 if no match. | built-in | | [`bytes length`](/commands/docs/bytes_length.md) | Output the length of any bytes in the pipeline. | built-in | -| [`bytes remove`](/commands/docs/bytes_remove.md) | Remove bytes. | built-in | -| [`bytes replace`](/commands/docs/bytes_replace.md) | Find and replace binary. | built-in | +| [`bytes remove`](/commands/docs/bytes_remove.md) | Remove specified bytes from the input. | built-in | +| [`bytes replace`](/commands/docs/bytes_replace.md) | Find and replace bytes in binary data. | built-in | | [`bytes reverse`](/commands/docs/bytes_reverse.md) | Reverse the bytes in the pipeline. | built-in | | [`bytes split`](/commands/docs/bytes_split.md) | Split input into multiple items using a separator. | built-in | -| [`bytes starts-with`](/commands/docs/bytes_starts-with.md) | Check if bytes starts with a pattern. | built-in | \ No newline at end of file +| [`bytes starts-with`](/commands/docs/bytes_starts-with.md) | Check if binary data starts with a pattern. | built-in | \ No newline at end of file diff --git a/commands/docs/bytes_add.md b/commands/docs/bytes_add.md index 34b53c0cde0..cf8bc343320 100644 --- a/commands/docs/bytes_add.md +++ b/commands/docs/bytes_add.md @@ -2,11 +2,11 @@ title: bytes add categories: | bytes -version: 0.110.0 +version: 0.111.0 bytes: | - Add specified bytes to the input. + Add specified bytes to the binary input. usage: | - Add specified bytes to the input. + Add specified bytes to the binary input. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `bytes add` for [bytes](/commands/categories/bytes.md) -
Add specified bytes to the input.
+
Add specified bytes to the binary input.
## Signature @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--index, -i {int}`: index to insert binary data - - `--end, -e`: add to the end of binary + - `--index, -i {int}`: Index to insert binary data. + - `--end, -e`: Add to the end of binary. ## Parameters @@ -41,7 +41,7 @@ contributors: false | record | record | ## Examples -Add bytes `0x[AA]` to `0x[1F FF AA AA]` +Add bytes `0x[AA]` to `0x[1F FF AA AA]`. ```nu > 0x[1F FF AA AA] | bytes add 0x[AA] Length: 5 (0x5) bytes | printable whitespace ascii_other non_ascii @@ -49,7 +49,7 @@ Length: 5 (0x5) bytes | printable whitespace ascii_other non_ascii ``` -Add bytes `0x[AA BB]` to `0x[1F FF AA AA]` at index 1 +Add bytes `0x[AA BB]` to `0x[1F FF AA AA]` at index 1. ```nu > 0x[1F FF AA AA] | bytes add 0x[AA BB] --index 1 Length: 6 (0x6) bytes | printable whitespace ascii_other non_ascii @@ -57,7 +57,7 @@ Length: 6 (0x6) bytes | printable whitespace ascii_other non_ascii ``` -Add bytes `0x[11]` to `0x[FF AA AA]` at the end +Add bytes `0x[11]` to `0x[FF AA AA]` at the end. ```nu > 0x[FF AA AA] | bytes add 0x[11] --end Length: 4 (0x4) bytes | printable whitespace ascii_other non_ascii @@ -65,7 +65,7 @@ Length: 4 (0x4) bytes | printable whitespace ascii_other non_ascii ``` -Add bytes `0x[11 22 33]` to `0x[FF AA AA]` at the end, at index 1(the index is start from end) +Add bytes `0x[11 22 33]` to `0x[FF AA AA]` at the end, at index 1(the index is start from end). ```nu > 0x[FF AA BB] | bytes add 0x[11 22 33] --end --index 1 Length: 6 (0x6) bytes | printable whitespace ascii_other non_ascii diff --git a/commands/docs/bytes_at.md b/commands/docs/bytes_at.md index c8ab7ad7a2c..069138e9f41 100644 --- a/commands/docs/bytes_at.md +++ b/commands/docs/bytes_at.md @@ -2,11 +2,11 @@ title: bytes at categories: | bytes -version: 0.110.0 +version: 0.111.0 bytes: | - Get bytes defined by a range. + Get bytes from the input defined by a range. usage: | - Get bytes defined by a range. + Get bytes from the input defined by a range. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `bytes at` for [bytes](/commands/categories/bytes.md) -
Get bytes defined by a range.
+
Get bytes from the input defined by a range.
## Signature @@ -36,7 +36,7 @@ contributors: false | record | record | ## Examples -Extract bytes starting from a specific index +Extract bytes starting from a specific index. ```nu > { data: 0x[33 44 55 10 01 13 10] } | bytes at 3.. data ╭──────┬─────────────────╮ @@ -44,7 +44,7 @@ Extract bytes starting from a specific index ╰──────┴─────────────────╯ ``` -Slice out `0x[10 01 13]` from `0x[33 44 55 10 01 13]` +Slice out `0x[10 01 13]` from `0x[33 44 55 10 01 13]`. ```nu > 0x[33 44 55 10 01 13] | bytes at 3..5 Length: 3 (0x3) bytes | printable whitespace ascii_other non_ascii @@ -52,7 +52,7 @@ Length: 3 (0x3) bytes | printable whitespace ascii_other non_ascii ``` -Extract bytes from the start up to a specific index +Extract bytes from the start up to a specific index. ```nu > 0x[33 44 55 10 01 13 10] | bytes at ..4 Length: 5 (0x5) bytes | printable whitespace ascii_other non_ascii @@ -60,7 +60,7 @@ Length: 5 (0x5) bytes | printable whitespace ascii_other non_ascii ``` -Extract byte `0x[10]` using an exclusive end index +Extract byte `0x[10]` using an exclusive end index. ```nu > 0x[33 44 55 10 01 13 10] | bytes at 3..<4 Length: 1 (0x1) bytes | printable whitespace ascii_other non_ascii @@ -68,7 +68,7 @@ Length: 1 (0x1) bytes | printable whitespace ascii_other non_ascii ``` -Extract bytes up to a negative index (inclusive) +Extract bytes up to a negative index (inclusive). ```nu > 0x[33 44 55 10 01 13 10] | bytes at ..-4 Length: 4 (0x4) bytes | printable whitespace ascii_other non_ascii @@ -76,7 +76,7 @@ Length: 4 (0x4) bytes | printable whitespace ascii_other non_ascii ``` -Slice bytes across multiple table columns +Slice bytes across multiple table columns. ```nu > [[ColA ColB ColC]; [0x[11 12 13] 0x[14 15 16] 0x[17 18 19]]] | bytes at 1.. ColB ColC ╭───┬──────────────┬──────────┬──────────╮ @@ -87,7 +87,7 @@ Slice bytes across multiple table columns ``` -Extract the last three bytes using a negative start index +Extract the last three bytes using a negative start index. ```nu > 0x[33 44 55 10 01 13 10] | bytes at (-3).. Length: 3 (0x3) bytes | printable whitespace ascii_other non_ascii diff --git a/commands/docs/bytes_build.md b/commands/docs/bytes_build.md index 3a301c6441e..36c3c5ba47a 100644 --- a/commands/docs/bytes_build.md +++ b/commands/docs/bytes_build.md @@ -2,11 +2,11 @@ title: bytes build categories: | bytes -version: 0.110.0 +version: 0.111.0 bytes: | - Create bytes from the arguments. + Create a binary value from the provided arguments. usage: | - Create bytes from the arguments. + Create a binary value from the provided arguments. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `bytes build` for [bytes](/commands/categories/bytes.md) -
Create bytes from the arguments.
+
Create a binary value from the provided arguments.
## Signature @@ -32,7 +32,7 @@ contributors: false | nothing | binary | ## Examples -Builds binary data from 0x[01 02], 0x[03], 0x[04] +Builds binary data from 0x[01 02], 0x[03], 0x[04]. ```nu > bytes build 0x[01 02] 0x[03] 0x[04] Length: 4 (0x4) bytes | printable whitespace ascii_other non_ascii @@ -40,7 +40,7 @@ Length: 4 (0x4) bytes | printable whitespace ascii_other non_ascii ``` -Builds binary data from byte numbers +Builds binary data from byte numbers. ```nu > bytes build 255 254 253 252 Length: 4 (0x4) bytes | printable whitespace ascii_other non_ascii diff --git a/commands/docs/bytes_collect.md b/commands/docs/bytes_collect.md index 47322e2da24..bac5afe80d3 100644 --- a/commands/docs/bytes_collect.md +++ b/commands/docs/bytes_collect.md @@ -2,7 +2,7 @@ title: bytes collect categories: | bytes -version: 0.110.0 +version: 0.111.0 bytes: | Concatenate multiple binary into a single binary, with an optional separator between each. usage: | @@ -32,7 +32,7 @@ contributors: false | list<binary> | binary | ## Examples -Create a byte array from input +Create a byte array from input. ```nu > [0x[11] 0x[13 15]] | bytes collect Length: 3 (0x3) bytes | printable whitespace ascii_other non_ascii @@ -40,7 +40,7 @@ Length: 3 (0x3) bytes | printable whitespace ascii_other non_ascii ``` -Create a byte array from input with a separator +Create a byte array from input with a separator. ```nu > [0x[11] 0x[33] 0x[44]] | bytes collect 0x[01] Length: 5 (0x5) bytes | printable whitespace ascii_other non_ascii diff --git a/commands/docs/bytes_ends-with.md b/commands/docs/bytes_ends-with.md index aac48600c05..3aaa4848112 100644 --- a/commands/docs/bytes_ends-with.md +++ b/commands/docs/bytes_ends-with.md @@ -2,11 +2,11 @@ title: bytes ends-with categories: | bytes -version: 0.110.0 +version: 0.111.0 bytes: | - Check if bytes ends with a pattern. + Check if binary data ends with a pattern. usage: | - Check if bytes ends with a pattern. + Check if binary data ends with a pattern. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `bytes ends-with` for [bytes](/commands/categories/bytes.md) -
Check if bytes ends with a pattern.
+
Check if binary data ends with a pattern.
## Signature @@ -35,19 +35,19 @@ contributors: false | record | record | ## Examples -Checks if binary ends with `0x[AA]` +Checks if binary ends with `0x[AA]`. ```nu > 0x[1F FF AA AA] | bytes ends-with 0x[AA] true ``` -Checks if binary ends with `0x[FF AA AA]` +Checks if binary ends with `0x[FF AA AA]`. ```nu > 0x[1F FF AA AA] | bytes ends-with 0x[FF AA AA] true ``` -Checks if binary ends with `0x[11]` +Checks if binary ends with `0x[11]`. ```nu > 0x[1F FF AA AA] | bytes ends-with 0x[11] false diff --git a/commands/docs/bytes_index-of.md b/commands/docs/bytes_index-of.md index ab607f00b63..6f92672beac 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.110.0 +version: 0.111.0 bytes: | Returns start index of first occurrence of pattern in bytes, or -1 if no match. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--all, -a`: returns all matched index - - `--end, -e`: search from the end of the binary + - `--all, -a`: Returns all matched index. + - `--end, -e`: Search from the end of the binary. ## Parameters @@ -40,19 +40,19 @@ contributors: false | record | record | ## Examples -Returns index of pattern in bytes +Returns index of pattern in bytes. ```nu > 0x[33 44 55 10 01 13 44 55] | bytes index-of 0x[44 55] 1 ``` -Returns index of pattern, search from end +Returns index of pattern, search from end. ```nu > 0x[33 44 55 10 01 13 44 55] | bytes index-of --end 0x[44 55] 6 ``` -Returns all matched index +Returns all matched index. ```nu > 0x[33 44 55 10 01 33 44 33 44] | bytes index-of --all 0x[33 44] ╭───┬───╮ @@ -63,7 +63,7 @@ Returns all matched index ``` -Returns all matched index, searching from end +Returns all matched index, searching from end. ```nu > 0x[33 44 55 10 01 33 44 33 44] | bytes index-of --all --end 0x[33 44] ╭───┬───╮ @@ -74,7 +74,7 @@ Returns all matched index, searching from end ``` -Returns index of pattern for specific column +Returns index of pattern for specific column. ```nu > [[ColA ColB ColC]; [0x[11 12 13] 0x[14 15 16] 0x[17 18 19]]] | bytes index-of 0x[11] ColA ColC ╭───┬──────┬──────────────┬──────╮ diff --git a/commands/docs/bytes_length.md b/commands/docs/bytes_length.md index e246785550a..eba16aaedec 100644 --- a/commands/docs/bytes_length.md +++ b/commands/docs/bytes_length.md @@ -2,7 +2,7 @@ title: bytes length categories: | bytes -version: 0.110.0 +version: 0.111.0 bytes: | Output the length of any bytes in the pipeline. usage: | @@ -35,13 +35,13 @@ contributors: false | record | record | ## Examples -Return the length of a binary +Return the length of a binary. ```nu > 0x[1F FF AA AB] | bytes length 4 ``` -Return the lengths of multiple binaries +Return the lengths of multiple binaries. ```nu > [0x[1F FF AA AB] 0x[1F]] | bytes length ╭───┬───╮ diff --git a/commands/docs/bytes_remove.md b/commands/docs/bytes_remove.md index 897c08a5c73..4de80aaf3a9 100644 --- a/commands/docs/bytes_remove.md +++ b/commands/docs/bytes_remove.md @@ -2,11 +2,11 @@ title: bytes remove categories: | bytes -version: 0.110.0 +version: 0.111.0 bytes: | - Remove bytes. + Remove specified bytes from the input. usage: | - Remove bytes. + Remove specified bytes from the input. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `bytes remove` for [bytes](/commands/categories/bytes.md) -
Remove bytes.
+
Remove specified bytes from the input.
## Signature @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--end, -e`: remove from end of binary - - `--all, -a`: remove occurrences of finding binary + - `--end, -e`: Remove from end of binary. + - `--all, -a`: Remove occurrences of finding binary. ## Parameters @@ -40,7 +40,7 @@ contributors: false | record | record | ## Examples -Remove contents +Remove contents. ```nu > 0x[10 AA FF AA FF] | bytes remove 0x[10 AA] Length: 3 (0x3) bytes | printable whitespace ascii_other non_ascii @@ -48,7 +48,7 @@ Length: 3 (0x3) bytes | printable whitespace ascii_other non_ascii ``` -Remove all occurrences of find binary in record field +Remove all occurrences of find binary in record field. ```nu > { data: 0x[10 AA 10 BB 10] } | bytes remove --all 0x[10] data ╭──────┬────────────╮ @@ -56,7 +56,7 @@ Remove all occurrences of find binary in record field ╰──────┴────────────╯ ``` -Remove occurrences of find binary from end +Remove occurrences of find binary from end. ```nu > 0x[10 AA 10 BB CC AA 10] | bytes remove --end 0x[10] Length: 6 (0x6) bytes | printable whitespace ascii_other non_ascii @@ -64,7 +64,7 @@ Length: 6 (0x6) bytes | printable whitespace ascii_other non_ascii ``` -Remove find binary from end not found +Remove find binary from end not found. ```nu > 0x[10 AA 10 BB CC AA 10] | bytes remove --end 0x[11] Length: 7 (0x7) bytes | printable whitespace ascii_other non_ascii @@ -72,7 +72,7 @@ Length: 7 (0x7) bytes | printable whitespace ascii_other non_ascii ``` -Remove all occurrences of find binary in table +Remove all occurrences of find binary in table. ```nu > [[ColA ColB ColC]; [0x[11 12 13] 0x[14 15 16] 0x[17 18 19]]] | bytes remove 0x[11] ColA ColC ╭───┬──────────┬──────────────┬──────────────╮ diff --git a/commands/docs/bytes_replace.md b/commands/docs/bytes_replace.md index 2a4b29a7f50..c8e837d8c96 100644 --- a/commands/docs/bytes_replace.md +++ b/commands/docs/bytes_replace.md @@ -2,11 +2,11 @@ title: bytes replace categories: | bytes -version: 0.110.0 +version: 0.111.0 bytes: | - Find and replace binary. + Find and replace bytes in binary data. usage: | - Find and replace binary. + Find and replace bytes in binary data. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `bytes replace` for [bytes](/commands/categories/bytes.md) -
Find and replace binary.
+
Find and replace bytes in binary data.
## Signature @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--all, -a`: replace all occurrences of find binary + - `--all, -a`: Replace all occurrences of find binary. ## Parameters @@ -40,7 +40,7 @@ contributors: false | record | record | ## Examples -Find and replace contents +Find and replace contents. ```nu > 0x[10 AA FF AA FF] | bytes replace 0x[10 AA] 0x[FF] Length: 4 (0x4) bytes | printable whitespace ascii_other non_ascii @@ -48,7 +48,7 @@ Length: 4 (0x4) bytes | printable whitespace ascii_other non_ascii ``` -Find and replace all occurrences of find binary +Find and replace all occurrences of find binary. ```nu > 0x[10 AA 10 BB 10] | bytes replace --all 0x[10] 0x[A0] Length: 5 (0x5) bytes | printable whitespace ascii_other non_ascii @@ -56,7 +56,7 @@ Length: 5 (0x5) bytes | printable whitespace ascii_other non_ascii ``` -Find and replace all occurrences of find binary in table +Find and replace all occurrences of find binary in table. ```nu > [[ColA ColB ColC]; [0x[11 12 13] 0x[14 15 16] 0x[17 18 19]]] | bytes replace --all 0x[11] 0x[13] ColA ColC ╭───┬──────────────┬──────────────┬──────────────╮ diff --git a/commands/docs/bytes_reverse.md b/commands/docs/bytes_reverse.md index 4ece219dbf5..e8f9356bb5a 100644 --- a/commands/docs/bytes_reverse.md +++ b/commands/docs/bytes_reverse.md @@ -2,7 +2,7 @@ title: bytes reverse categories: | bytes -version: 0.110.0 +version: 0.111.0 bytes: | Reverse the bytes in the pipeline. usage: | @@ -34,7 +34,7 @@ contributors: false | record | record | ## Examples -Reverse bytes `0x[1F FF AA AA]` +Reverse bytes `0x[1F FF AA AA]`. ```nu > 0x[1F FF AA AA] | bytes reverse Length: 4 (0x4) bytes | printable whitespace ascii_other non_ascii @@ -42,7 +42,7 @@ Length: 4 (0x4) bytes | printable whitespace ascii_other non_ascii ``` -Reverse bytes `0x[FF AA AA]` +Reverse bytes `0x[FF AA AA]`. ```nu > 0x[FF AA AA] | bytes reverse Length: 3 (0x3) bytes | printable whitespace ascii_other non_ascii diff --git a/commands/docs/bytes_split.md b/commands/docs/bytes_split.md index 4763d092083..209fe81187f 100644 --- a/commands/docs/bytes_split.md +++ b/commands/docs/bytes_split.md @@ -2,7 +2,7 @@ title: bytes split categories: | bytes -version: 0.110.0 +version: 0.111.0 bytes: | Split input into multiple items using a separator. usage: | @@ -32,7 +32,7 @@ contributors: false | binary | list<binary> | ## Examples -Split a binary value using a binary separator +Split a binary value using a binary separator. ```nu > 0x[66 6F 6F 20 62 61 72 20 62 61 7A 20] | bytes split 0x[20] ╭───┬─────────────────╮ @@ -44,7 +44,7 @@ Split a binary value using a binary separator ``` -Split a binary value using a string separator +Split a binary value using a string separator. ```nu > 0x[61 2D 2D 62 2D 2D 63] | bytes split "--" ╭───┬──────╮ diff --git a/commands/docs/bytes_starts-with.md b/commands/docs/bytes_starts-with.md index 0510550a10f..c5c7bf5fa5b 100644 --- a/commands/docs/bytes_starts-with.md +++ b/commands/docs/bytes_starts-with.md @@ -2,11 +2,11 @@ title: bytes starts-with categories: | bytes -version: 0.110.0 +version: 0.111.0 bytes: | - Check if bytes starts with a pattern. + Check if binary data starts with a pattern. usage: | - Check if bytes starts with a pattern. + Check if binary data starts with a pattern. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `bytes starts-with` for [bytes](/commands/categories/bytes.md) -
Check if bytes starts with a pattern.
+
Check if binary data starts with a pattern.
## Signature @@ -35,19 +35,19 @@ contributors: false | record | record | ## Examples -Checks if binary starts with `0x[1F FF AA]` +Checks if binary starts with `0x[1F FF AA]`. ```nu > 0x[1F FF AA AA] | bytes starts-with 0x[1F FF AA] true ``` -Checks if binary starts with `0x[1F]` +Checks if binary starts with `0x[1F]`. ```nu > 0x[1F FF AA AA] | bytes starts-with 0x[1F] true ``` -Checks if binary starts with `0x[1F]` +Checks if binary starts with `0x[1F]`. ```nu > 0x[1F FF AA AA] | bytes starts-with 0x[11] false diff --git a/commands/docs/cal.md b/commands/docs/cal.md index 465e9aa0ee5..f1b58b8ecce 100644 --- a/commands/docs/cal.md +++ b/commands/docs/cal.md @@ -2,7 +2,7 @@ title: cal categories: | generators -version: 0.110.0 +version: 0.111.0 generators: | Display a calendar. usage: | @@ -22,13 +22,13 @@ contributors: false ## Flags - - `--year, -y`: Display the year column - - `--quarter, -q`: Display the quarter column - - `--month, -m`: Display the month column - - `--as-table, -t`: output as a table - - `--full-year {int}`: Display a year-long calendar for the specified year - - `--week-start {string}`: Display the calendar with the specified day as the first day of the week - - `--month-names`: Display the month names in a separate column + - `--year, -y`: Display the year column. + - `--quarter, -q`: Display the quarter column. + - `--month, -m`: Display the month column. + - `--as-table, -t`: Output as a table. + - `--full-year {int}`: Display a year-long calendar for the specified year. + - `--week-start {string}`: Display the calendar with the specified day as the first day of the week. + - `--month-names`: Display the month names in a separate column. ## Input/output types: diff --git a/commands/docs/cd.md b/commands/docs/cd.md index 7abed85c5c9..afb59ee424d 100644 --- a/commands/docs/cd.md +++ b/commands/docs/cd.md @@ -2,11 +2,11 @@ title: cd categories: | filesystem -version: 0.110.0 +version: 0.111.0 filesystem: | - Change directory. + Change the current working directory. usage: | - Change directory. + Change the current working directory. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `cd` for [filesystem](/commands/categories/filesystem.md) -
Change directory.
+
Change the current working directory.
## Signature @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--physical, -P`: use the physical directory structure; resolve symbolic links before processing instances of .. + - `--physical, -P`: Use the physical directory structure; resolve symbolic links before processing instances of .. ## Parameters @@ -36,19 +36,19 @@ contributors: false | nothing | nothing | ## Examples -Change to your home directory +Change to your home directory. ```nu > cd ~ ``` -Change to the previous working directory (same as "cd $env.OLDPWD") +Change to the previous working directory (same as "cd $env.OLDPWD"). ```nu > cd - ``` -Changing directory with a custom command requires 'def --env' +Changing directory with a custom command requires 'def --env'. ```nu > def --env gohome [] { cd ~ } diff --git a/commands/docs/char.md b/commands/docs/char.md index b4faddcf091..8d22d2c1722 100644 --- a/commands/docs/char.md +++ b/commands/docs/char.md @@ -2,7 +2,7 @@ title: char categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Output special characters (e.g., 'newline'). usage: | @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--list, -l`: List all supported character names - - `--unicode, -u`: Unicode string i.e. 1f378 - - `--integer, -i`: Create a codepoint from an integer + - `--list, -l`: List all supported character names. + - `--unicode, -u`: Unicode string i.e. 1f378. + - `--integer, -i`: Create a codepoint from an integer. ## Parameters diff --git a/commands/docs/chunk-by.md b/commands/docs/chunk-by.md index 2e9f4abe002..a93fac8e2e0 100644 --- a/commands/docs/chunk-by.md +++ b/commands/docs/chunk-by.md @@ -2,7 +2,7 @@ title: chunk-by categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Divides a sequence into sub-sequences based on a closure. usage: | diff --git a/commands/docs/chunks.md b/commands/docs/chunks.md index 0b30fb60270..4f274a1c937 100644 --- a/commands/docs/chunks.md +++ b/commands/docs/chunks.md @@ -2,7 +2,7 @@ title: chunks categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Divide a list, table or binary input into chunks of `chunk_size`. usage: | diff --git a/commands/docs/clear.md b/commands/docs/clear.md index 0106d647c9a..314b46547bc 100644 --- a/commands/docs/clear.md +++ b/commands/docs/clear.md @@ -2,11 +2,11 @@ title: clear categories: | platform -version: 0.110.0 +version: 0.111.0 platform: | - Clear the terminal. + Clear the terminal screen. usage: | - Clear the terminal. + Clear the terminal screen. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `clear` for [platform](/commands/categories/platform.md) -
Clear the terminal.
+
Clear the terminal screen.
## Signature @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--keep-scrollback, -k`: Do not clear the scrollback history + - `--keep-scrollback, -k`: Do not clear the scrollback history. ## Input/output types: @@ -32,13 +32,13 @@ contributors: false | nothing | nothing | ## Examples -Clear the terminal +Clear the terminal. ```nu > clear ``` -Clear the terminal but not its scrollback history +Clear the terminal but not its scrollback history. ```nu > clear --keep-scrollback diff --git a/commands/docs/clip.md b/commands/docs/clip.md new file mode 100644 index 00000000000..0ca210c8900 --- /dev/null +++ b/commands/docs/clip.md @@ -0,0 +1,37 @@ +--- +title: clip +categories: | + system +version: 0.111.0 +system: | + Commands for managing the clipboard. +usage: | + Commands for managing the clipboard. +editLink: false +contributors: false +--- + + +# `clip` for [system](/commands/categories/system.md) + +
Commands for managing the clipboard.
+ +## Signature + +```> clip {flags} ``` + + +## Input/output types: + +| input | output | +| ------- | ------- | +| nothing | nothing | + +## Subcommands: + +| name | description | type | +| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | +| [`clip copy`](/commands/docs/clip_copy.md) | Copy the input into the clipboard. | built-in | +| [`clip paste`](/commands/docs/clip_paste.md) | Output the current clipboard content. + By default, it tries to parse clipboard content as JSON and outputs the corresponding Nushell value. + This behavior can be inverted using `$env.config.clip.default_raw = true`. | built-in | \ No newline at end of file diff --git a/commands/docs/clip_copy.md b/commands/docs/clip_copy.md new file mode 100644 index 00000000000..1a9728cdfa9 --- /dev/null +++ b/commands/docs/clip_copy.md @@ -0,0 +1,52 @@ +--- +title: clip copy +categories: | + system +version: 0.111.0 +system: | + Copy the input into the clipboard. +usage: | + Copy the input into the clipboard. +editLink: false +contributors: false +--- + + +# `clip copy` for [system](/commands/categories/system.md) + +
Copy the input into the clipboard.
+ +## Signature + +```> clip copy {flags} ``` + +## Flags + + - `--raw, -r`: Disable JSON serialization. + - `--show, -s`: Display copied value in the output. + + +## Input/output types: + +| input | output | +| ----- | ------ | +| any | any | +## Examples + +Copy a string to the clipboard. +```nu +> 'hello' | clip copy + +``` + +Copy a structured value and pass it through. +```nu +> $env | clip copy --show + +``` + +Copy a structured value as plain text without JSON serialization. +```nu +> $env | clip copy --raw + +``` diff --git a/commands/docs/clip_paste.md b/commands/docs/clip_paste.md new file mode 100644 index 00000000000..13a0ff51316 --- /dev/null +++ b/commands/docs/clip_paste.md @@ -0,0 +1,49 @@ +--- +title: clip paste +categories: | + system +version: 0.111.0 +system: | + Output the current clipboard content. + By default, it tries to parse clipboard content as JSON and outputs the corresponding Nushell value. + This behavior can be inverted using `$env.config.clip.default_raw = true`. +usage: | + Output the current clipboard content. + By default, it tries to parse clipboard content as JSON and outputs the corresponding Nushell value. + This behavior can be inverted using `$env.config.clip.default_raw = true`. +editLink: false +contributors: false +--- + + +# `clip paste` for [system](/commands/categories/system.md) + +
Output the current clipboard content.
By default, it tries to parse clipboard content as JSON and outputs the corresponding Nushell value.
This behavior can be inverted using `$env.config.clip.default_raw = true`.
+ +## Signature + +```> clip paste {flags} ``` + +## Flags + + - `--raw, -r`: Disable JSON parsing. (act inverted if default_raw config is true). + + +## Input/output types: + +| input | output | +| ------- | ------ | +| nothing | any | +## Examples + +Paste from clipboard and try to parse JSON. +```nu +> clip paste + +``` + +Paste raw clipboard text without JSON parsing. +```nu +> clip paste --raw + +``` diff --git a/commands/docs/collect.md b/commands/docs/collect.md index 7029fef6478..bf1177c34b6 100644 --- a/commands/docs/collect.md +++ b/commands/docs/collect.md @@ -1,9 +1,9 @@ --- title: collect categories: | - filters -version: 0.110.0 -filters: | + core +version: 0.111.0 +core: | Collect a stream into a value. usage: | Collect a stream into a value. @@ -12,7 +12,7 @@ contributors: false --- -# `collect` for [filters](/commands/categories/filters.md) +# `collect` for [core](/commands/categories/core.md)
Collect a stream into a value.
@@ -22,7 +22,7 @@ contributors: false ## Flags - - `--keep-env`: let the closure affect environment variables + - `--keep-env`: Let the closure affect environment variables. ## Parameters @@ -36,13 +36,13 @@ contributors: false | any | any | ## Examples -Use the second value in the stream +Use the second value in the stream. ```nu > [1 2 3] | collect { |x| $x.1 } 2 ``` -Read and write to the same file +Read and write to the same file. ```nu > open file.txt | collect | save -f file.txt diff --git a/commands/docs/columns.md b/commands/docs/columns.md index de287f7c189..c44c60c62bf 100644 --- a/commands/docs/columns.md +++ b/commands/docs/columns.md @@ -2,7 +2,7 @@ title: columns categories: | filters -version: 0.110.0 +version: 0.111.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 8f7af299d92..d7f35b1a31a 100644 --- a/commands/docs/commandline.md +++ b/commands/docs/commandline.md @@ -2,7 +2,7 @@ title: commandline categories: | core -version: 0.110.0 +version: 0.111.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 66dafafaed3..27c2a4007e8 100644 --- a/commands/docs/commandline_edit.md +++ b/commands/docs/commandline_edit.md @@ -2,7 +2,7 @@ title: commandline edit categories: | core -version: 0.110.0 +version: 0.111.0 core: | Modify the current command line input buffer. usage: | @@ -22,10 +22,10 @@ contributors: false ## Flags - - `--append, -a`: appends the string to the end of the buffer - - `--insert, -i`: inserts the string into the buffer at the cursor position - - `--replace, -r`: replaces the current contents of the buffer (default) - - `--accept, -A`: immediately executes the result after edit + - `--append, -a`: Appends the string to the end of the buffer. + - `--insert, -i`: Inserts the string into the buffer at the cursor position. + - `--replace, -r`: Replaces the current contents of the buffer (default). + - `--accept, -A`: Immediately executes the result after edit. ## Parameters diff --git a/commands/docs/commandline_get-cursor.md b/commands/docs/commandline_get-cursor.md index cd628287a73..e0a2052663a 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.110.0 +version: 0.111.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 99cbb0c0d93..0b782be9468 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.110.0 +version: 0.111.0 core: | Set the current cursor position. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--end, -e`: set the current cursor position to the end of the buffer + - `--end, -e`: Set the current cursor position to the end of the buffer. ## Parameters diff --git a/commands/docs/compact.md b/commands/docs/compact.md index d8254310e7f..b1ae336ec90 100644 --- a/commands/docs/compact.md +++ b/commands/docs/compact.md @@ -2,7 +2,7 @@ title: compact categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Creates a table with non-empty rows. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--empty, -e`: also compact empty items like "", {}, and [] + - `--empty, -e`: Also compact empty items like "", {}, and []. ## Parameters diff --git a/commands/docs/complete.md b/commands/docs/complete.md index 4d1c2e162f8..5da89cf1678 100644 --- a/commands/docs/complete.md +++ b/commands/docs/complete.md @@ -2,7 +2,7 @@ title: complete categories: | system -version: 0.110.0 +version: 0.111.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 e42797515de..732fd1d5d50 100644 --- a/commands/docs/config.md +++ b/commands/docs/config.md @@ -2,7 +2,7 @@ title: config categories: | env -version: 0.110.0 +version: 0.111.0 env: | Edit nushell configuration files. usage: | diff --git a/commands/docs/config_env.md b/commands/docs/config_env.md index a40bf6aa89b..56709ce8863 100644 --- a/commands/docs/config_env.md +++ b/commands/docs/config_env.md @@ -2,7 +2,7 @@ title: config env categories: | env -version: 0.110.0 +version: 0.111.0 env: | Edit nu environment configurations. usage: | @@ -33,19 +33,19 @@ contributors: false | nothing | any | ## Examples -open user's env.nu in the default editor +Open user's env.nu in the default editor. ```nu > config env ``` -pretty-print a commented `env.nu` that explains common settings +Pretty-print a commented `env.nu` that explains common settings. ```nu > config env --doc | nu-highlight, ``` -pretty-print the internal `env.nu` file which is loaded before the user's environment +Pretty-print the internal `env.nu` file which is loaded before the user's environment. ```nu > config env --default | nu-highlight, diff --git a/commands/docs/config_flatten.md b/commands/docs/config_flatten.md index aadadc81bec..1617b59af79 100644 --- a/commands/docs/config_flatten.md +++ b/commands/docs/config_flatten.md @@ -2,7 +2,7 @@ title: config flatten categories: | debug -version: 0.110.0 +version: 0.111.0 debug: | Show the current configuration in a flattened form. usage: | @@ -28,7 +28,7 @@ contributors: false | nothing | record | ## Examples -Show the current configuration in a flattened form +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 8a19146d9bd..6693d382a18 100644 --- a/commands/docs/config_nu.md +++ b/commands/docs/config_nu.md @@ -2,7 +2,7 @@ title: config nu categories: | env -version: 0.110.0 +version: 0.111.0 env: | Edit nu configurations. usage: | @@ -33,19 +33,19 @@ contributors: false | nothing | any | ## Examples -open user's config.nu in the default editor +Open user's config.nu in the default editor. ```nu > config nu ``` -pretty-print a commented `config.nu` that explains common settings +Pretty-print a commented `config.nu` that explains common settings. ```nu > config nu --doc | nu-highlight ``` -pretty-print the internal `config.nu` file which is loaded before user's config +Pretty-print the internal `config.nu` file which is loaded before user's config. ```nu > config nu --default | nu-highlight diff --git a/commands/docs/config_reset.md b/commands/docs/config_reset.md index 7360dcce244..9bc6b0dd6cb 100644 --- a/commands/docs/config_reset.md +++ b/commands/docs/config_reset.md @@ -2,7 +2,7 @@ title: config reset categories: | env -version: 0.110.0 +version: 0.111.0 env: | Reset nushell environment configurations to default, and saves old config files in the config location as oldconfig.nu and oldenv.nu. usage: | @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--nu, -n`: reset only nu config, config.nu - - `--env, -e`: reset only env config, env.nu - - `--without-backup, -w`: do not make a backup + - `--nu, -n`: Reset only nu config, config.nu. + - `--env, -e`: Reset only env config, env.nu. + - `--without-backup, -w`: Do not make a backup. ## Input/output types: @@ -34,7 +34,7 @@ contributors: false | nothing | nothing | ## Examples -reset nushell configuration files +Reset nushell configuration files. ```nu > config reset diff --git a/commands/docs/config_use-colors.md b/commands/docs/config_use-colors.md index 71011c82be1..1edb6da2112 100644 --- a/commands/docs/config_use-colors.md +++ b/commands/docs/config_use-colors.md @@ -2,7 +2,7 @@ title: config use-colors categories: | env -version: 0.110.0 +version: 0.111.0 env: | Get the configuration for color output. usage: | diff --git a/commands/docs/const.md b/commands/docs/const.md index 872daeeb493..7106993a841 100644 --- a/commands/docs/const.md +++ b/commands/docs/const.md @@ -2,7 +2,7 @@ title: const categories: | core -version: 0.110.0 +version: 0.111.0 core: | Create a parse-time constant. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `const_name`: Constant name. + - `const_name`: The constant name to create. - `initial_value`: Equals sign followed by constant value. @@ -39,7 +39,7 @@ Create a new parse-time constant. ``` -Create a composite constant value +Create a composite constant value. ```nu > const x = { a: 10, b: 20 } diff --git a/commands/docs/continue.md b/commands/docs/continue.md index 00b8928dbbc..95a9c1d4634 100644 --- a/commands/docs/continue.md +++ b/commands/docs/continue.md @@ -2,7 +2,7 @@ title: continue categories: | core -version: 0.110.0 +version: 0.111.0 core: | Continue a loop from the next iteration. usage: | @@ -28,7 +28,7 @@ contributors: false | nothing | nothing | ## Examples -Continue a loop from the next iteration +Continue a loop from the next iteration. ```nu > for i in 1..10 { if $i == 5 { continue }; print $i } diff --git a/commands/docs/cp.md b/commands/docs/cp.md index 5b4b9656778..7fc433d09b3 100644 --- a/commands/docs/cp.md +++ b/commands/docs/cp.md @@ -2,7 +2,7 @@ title: cp categories: | filesystem -version: 0.110.0 +version: 0.111.0 filesystem: | Copy files using uutils/coreutils cp. usage: | @@ -22,20 +22,20 @@ contributors: false ## Flags - - `--recursive, -r`: copy directories recursively - - `--verbose, -v`: explicitly state what is being done - - `--force, -f`: if an existing destination file cannot be opened, remove it and try + - `--recursive, -r`: Copy directories recursively. + - `--verbose, -v`: Explicitly state what is being done. + - `--force, -f`: If an existing destination file cannot be opened, remove it and try again (this option is ignored when the -n option is also used). - currently not implemented for windows - - `--interactive, -i`: ask before overwriting files - - `--update, -u`: copy only when the SOURCE file is newer than the destination file or when the destination file is missing - - `--progress, -p`: display a progress bar - - `--no-clobber, -n`: do not overwrite an existing file - - `--preserve {list}`: preserve only the specified attributes (empty list means no attributes preserved) + Currently not implemented for windows. + - `--interactive, -i`: Ask before overwriting files. + - `--update, -u`: Copy only when the SOURCE file is newer than the destination file or when the destination file is missing. + - `--progress, -p`: Display a progress bar. + - `--no-clobber, -n`: Do not overwrite an existing file. + - `--preserve {list}`: Preserve only the specified attributes (empty list means no attributes preserved) if not specified only mode is preserved - possible values: mode, ownership (unix only), timestamps, context, link, links, xattr - - `--debug`: explain how a file is copied. Implies -v - - `--all, -a`: move hidden files if '*' is provided + possible values: mode, ownership (unix only), timestamps, context, link, links, xattr. + - `--debug`: Explain how a file is copied. Implies -v. + - `--all, -a`: Copy hidden files if '*' is provided. ## Parameters @@ -49,49 +49,49 @@ contributors: false | nothing | nothing | ## Examples -Copy myfile to dir_b +Copy myfile to dir_b. ```nu > cp myfile dir_b ``` -Recursively copy dir_a to dir_b +Recursively copy dir_a to dir_b. ```nu > cp -r dir_a dir_b ``` -Recursively copy dir_a to dir_b, and print the feedbacks +Recursively copy dir_a to dir_b, and print the feedbacks. ```nu > cp -r -v dir_a dir_b ``` -Move many files into a directory +Move many files into a directory. ```nu > cp *.txt dir_a ``` -Copy only if source file is newer than target file +Copy only if source file is newer than target file. ```nu > cp -u myfile newfile ``` -Copy file preserving mode and timestamps attributes +Copy file preserving mode and timestamps attributes. ```nu > cp --preserve [ mode timestamps ] myfile newfile ``` -Copy file erasing all attributes +Copy file erasing all attributes. ```nu > cp --preserve [] myfile newfile ``` -Copy file to a directory three levels above its current location +Copy file to a directory three levels above its current location. ```nu > cp myfile .... diff --git a/commands/docs/date.md b/commands/docs/date.md index 290e6df5c9e..6f5bec14555 100644 --- a/commands/docs/date.md +++ b/commands/docs/date.md @@ -2,7 +2,7 @@ title: date categories: | date -version: 0.110.0 +version: 0.111.0 date: | Date-related commands. usage: | diff --git a/commands/docs/date_format.md b/commands/docs/date_format.md index c93ed36d25e..438c59fb2b9 100644 --- a/commands/docs/date_format.md +++ b/commands/docs/date_format.md @@ -2,7 +2,7 @@ title: date format categories: | removed -version: 0.110.0 +version: 0.111.0 removed: | Removed command: use `format date` instead. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--list, -l`: lists strftime cheatsheet + - `--list, -l`: Lists strftime cheatsheet. ## Parameters diff --git a/commands/docs/date_from-human.md b/commands/docs/date_from-human.md index 4f7d10f781a..3683ad9424f 100644 --- a/commands/docs/date_from-human.md +++ b/commands/docs/date_from-human.md @@ -2,7 +2,7 @@ title: date from-human categories: | date -version: 0.110.0 +version: 0.111.0 date: | Convert a human readable datetime string to a datetime. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--list, -l`: Show human-readable datetime parsing examples + - `--list, -l`: Show human-readable datetime parsing examples. ## Input/output types: @@ -33,25 +33,25 @@ contributors: false | nothing | table | ## Examples -Parsing human readable datetime +Parsing human readable datetime. ```nu > 'Today at 18:30' | date from-human ``` -Parsing human readable datetime +Parsing human readable datetime. ```nu > 'Last Friday at 19:45' | date from-human ``` -Parsing human readable datetime +Parsing human readable datetime. ```nu > 'In 5 minutes and 30 seconds' | date from-human ``` -PShow human-readable datetime parsing examples +Show human-readable datetime parsing examples. ```nu > date from-human --list diff --git a/commands/docs/date_humanize.md b/commands/docs/date_humanize.md index f2fb0f41f02..fcc29c86902 100644 --- a/commands/docs/date_humanize.md +++ b/commands/docs/date_humanize.md @@ -2,7 +2,7 @@ title: date humanize categories: | date -version: 0.110.0 +version: 0.111.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 b95482aadfa..2029e39f6fd 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.110.0 +version: 0.111.0 date: | List supported time zones. usage: | @@ -28,7 +28,7 @@ contributors: false | nothing | table | ## Examples -Show time zone(s) that contains 'Shanghai' +Show time zone(s) that contains 'Shanghai'. ```nu > date list-timezone | where timezone =~ Shanghai ╭───┬───────────────╮ diff --git a/commands/docs/date_now.md b/commands/docs/date_now.md index 2b191706fd6..3f819a2b255 100644 --- a/commands/docs/date_now.md +++ b/commands/docs/date_now.md @@ -2,7 +2,7 @@ title: date now categories: | date -version: 0.110.0 +version: 0.111.0 date: | Get the current date. usage: | @@ -52,7 +52,7 @@ Get the time duration since a more specific time. ``` -Get current time and format it in the debug format (RFC 2822 with timezone) +Get current time and format it in the debug format (RFC 2822 with timezone). ```nu > date now | debug diff --git a/commands/docs/date_to-timezone.md b/commands/docs/date_to-timezone.md index 560c32e6119..28d5781682f 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.110.0 +version: 0.111.0 date: | Convert a date to a given time zone. usage: | diff --git a/commands/docs/debug.md b/commands/docs/debug.md index dd01ea0bfcb..98d62cb58e6 100644 --- a/commands/docs/debug.md +++ b/commands/docs/debug.md @@ -2,7 +2,7 @@ title: debug categories: | debug -version: 0.110.0 +version: 0.111.0 debug: | Debug print the value(s) piped in. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--raw, -r`: Prints the raw value representation - - `--raw-value, -v`: Prints the raw value representation but not the nushell value part + - `--raw, -r`: Prints the raw value representation. + - `--raw-value, -v`: Prints the raw value representation but not the nushell value part. ## Input/output types: @@ -34,13 +34,13 @@ contributors: false | any | string | ## Examples -Debug print a string +Debug print a string. ```nu > 'hello' | debug hello ``` -Debug print a list +Debug print a list. ```nu > ['hello'] | debug ╭───┬───────╮ @@ -49,7 +49,7 @@ Debug print a list ``` -Debug print a table +Debug print a table. ```nu > [[version patch]; ['0.1.0' false] ['0.1.1' true] ['0.2.0' false]] | debug ╭───┬────────────────────────────────╮ @@ -60,7 +60,7 @@ Debug print a table ``` -Debug print an ansi escape encoded string and get the raw value +Debug print an ansi escape encoded string and get the raw value. ```nu > $'(ansi red)nushell(ansi reset)' | debug -v "\u{1b}[31mnushell\u{1b}[0m" diff --git a/commands/docs/debug_env.md b/commands/docs/debug_env.md index 3a7b2f0412b..bebb35e6526 100644 --- a/commands/docs/debug_env.md +++ b/commands/docs/debug_env.md @@ -2,7 +2,7 @@ title: debug env categories: | debug -version: 0.110.0 +version: 0.111.0 debug: | Show environment variables as external commands would get it. usage: | @@ -28,13 +28,13 @@ contributors: false | nothing | record | ## Examples -Get PATH variable that externals see +Get PATH variable that externals see. ```nu > debug env | get PATH! ``` -Create a .env file +Create a .env file. ```nu > debug env | transpose key value | each {$"($in.key)=($in.value | to json)"} | save .env diff --git a/commands/docs/debug_experimental-options.md b/commands/docs/debug_experimental-options.md index b91d75bec06..b6349b5b45a 100644 --- a/commands/docs/debug_experimental-options.md +++ b/commands/docs/debug_experimental-options.md @@ -2,7 +2,7 @@ title: debug experimental-options categories: | debug -version: 0.110.0 +version: 0.111.0 debug: | Show all experimental options. usage: | diff --git a/commands/docs/debug_info.md b/commands/docs/debug_info.md index a66e2bcb9c8..7b8300b247c 100644 --- a/commands/docs/debug_info.md +++ b/commands/docs/debug_info.md @@ -2,7 +2,7 @@ title: debug info categories: | debug -version: 0.110.0 +version: 0.111.0 debug: | View process memory info. usage: | @@ -28,7 +28,7 @@ contributors: false | nothing | record | ## Examples -View process information +View process information. ```nu > debug info diff --git a/commands/docs/debug_profile.md b/commands/docs/debug_profile.md index fcdb410dc0c..b1200f7c620 100644 --- a/commands/docs/debug_profile.md +++ b/commands/docs/debug_profile.md @@ -2,7 +2,7 @@ title: debug profile categories: | debug -version: 0.110.0 +version: 0.111.0 debug: | Profile pipeline elements in a closure. usage: | @@ -22,12 +22,12 @@ contributors: false ## Flags - - `--spans, -s`: Collect spans of profiled elements - - `--expand-source, -e`: Collect full source fragments of profiled elements - - `--values, -v`: Collect pipeline element output values - - `--lines, -l`: Collect line numbers - - `--duration-values, -d`: Report instruction duration as duration values rather than milliseconds - - `--max-depth, -m {int}`: How many blocks/closures deep to step into (default 2) + - `--spans, -s`: Collect spans of profiled elements. + - `--expand-source, -e`: Collect full source fragments of profiled elements. + - `--values, -v`: Collect pipeline element output values. + - `--lines, -l`: Collect line numbers. + - `--duration-values, -d`: Report instruction duration as duration values rather than milliseconds. + - `--max-depth, -m {int}`: How many blocks/closures deep to step into (default 2). ## Parameters @@ -41,13 +41,13 @@ contributors: false | any | table | ## Examples -Profile config evaluation +Profile config evaluation. ```nu > debug profile { source $nu.config-path } ``` -Profile config evaluation with more granularity +Profile config evaluation with more granularity. ```nu > debug profile { source $nu.config-path } --max-depth 4 diff --git a/commands/docs/decode.md b/commands/docs/decode.md index be50c647b97..c48b731e341 100644 --- a/commands/docs/decode.md +++ b/commands/docs/decode.md @@ -2,7 +2,7 @@ title: decode categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Decode bytes into a string. usage: | @@ -53,9 +53,9 @@ documentation link at https://docs.rs/encoding_rs/latest/encoding_rs/#statics ## Subcommands: -| name | description | type | -| -------------------------------------------------------- | ------------------------- | -------- | -| [`decode base32`](/commands/docs/decode_base32.md) | Decode a Base32 value. | built-in | -| [`decode base32hex`](/commands/docs/decode_base32hex.md) | Encode a base32hex value. | built-in | -| [`decode base64`](/commands/docs/decode_base64.md) | Decode a Base64 value. | built-in | -| [`decode hex`](/commands/docs/decode_hex.md) | Hex decode a value. | built-in | \ No newline at end of file +| name | description | type | +| -------------------------------------------------------- | ------------------------------ | -------- | +| [`decode base32`](/commands/docs/decode_base32.md) | Decode a Base32-encoded value. | built-in | +| [`decode base32hex`](/commands/docs/decode_base32hex.md) | Encode a base32hex value. | built-in | +| [`decode base64`](/commands/docs/decode_base64.md) | Decode a Base64-encoded value. | built-in | +| [`decode hex`](/commands/docs/decode_hex.md) | Decode a hex-encoded value. | built-in | \ No newline at end of file diff --git a/commands/docs/decode_base32.md b/commands/docs/decode_base32.md index 341c28eeec9..7df64e37c82 100644 --- a/commands/docs/decode_base32.md +++ b/commands/docs/decode_base32.md @@ -2,11 +2,11 @@ title: decode base32 categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | - Decode a Base32 value. + Decode a Base32-encoded value. usage: | - Decode a Base32 value. + Decode a Base32-encoded value. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `decode base32` for [formats](/commands/categories/formats.md) -
Decode a Base32 value.
+
Decode a Base32-encoded value.
## Signature diff --git a/commands/docs/decode_base32hex.md b/commands/docs/decode_base32hex.md index 016d9a34c7f..786fb90e83d 100644 --- a/commands/docs/decode_base32hex.md +++ b/commands/docs/decode_base32hex.md @@ -2,7 +2,7 @@ title: decode base32hex categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Encode a base32hex value. usage: | diff --git a/commands/docs/decode_base64.md b/commands/docs/decode_base64.md index b3d939757ad..7703bbd396f 100644 --- a/commands/docs/decode_base64.md +++ b/commands/docs/decode_base64.md @@ -2,11 +2,11 @@ title: decode base64 categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | - Decode a Base64 value. + Decode a Base64-encoded value. usage: | - Decode a Base64 value. + Decode a Base64-encoded value. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `decode base64` for [formats](/commands/categories/formats.md) -
Decode a Base64 value.
+
Decode a Base64-encoded value.
## Signature diff --git a/commands/docs/decode_hex.md b/commands/docs/decode_hex.md index 4ca91f702cf..6ad73e1ad8f 100644 --- a/commands/docs/decode_hex.md +++ b/commands/docs/decode_hex.md @@ -2,11 +2,11 @@ title: decode hex categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | - Hex decode a value. + Decode a hex-encoded value. usage: | - Hex decode a value. + Decode a hex-encoded value. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `decode hex` for [formats](/commands/categories/formats.md) -
Hex decode a value.
+
Decode a hex-encoded value.
## Signature diff --git a/commands/docs/def.md b/commands/docs/def.md index 76c28b27fbf..2ef2e56a75e 100644 --- a/commands/docs/def.md +++ b/commands/docs/def.md @@ -2,7 +2,7 @@ title: def categories: | core -version: 0.110.0 +version: 0.111.0 core: | Define a custom command. usage: | @@ -22,14 +22,14 @@ contributors: false ## Flags - - `--env`: keep the environment defined inside the command - - `--wrapped`: treat unknown flags and arguments as strings (requires ...rest-like parameter in signature) + - `--env`: Keep the environment defined inside the command. + - `--wrapped`: Treat unknown flags and arguments as strings (requires ...rest-like parameter in signature). ## Parameters - - `def_name`: Command name. - - `params`: Parameters. - - `block`: Body of the definition. + - `def_name`: The command name to define. + - `params`: The command parameters, a comma-separated list inside []. + - `block`: The body of the command, a list of instructions inside {}. ## Input/output types: @@ -39,37 +39,37 @@ contributors: false | nothing | nothing | ## Examples -Define a command and run it +Define a command and run it. ```nu > def say-hi [] { echo 'hi' }; say-hi hi ``` -Define a command and run it with parameter(s) +Define a command and run it with parameter(s). ```nu > def say-sth [sth: string] { echo $sth }; say-sth hi hi ``` -Set environment variable by call a custom command +Set environment variable by call a custom command. ```nu > def --env foo [] { $env.BAR = "BAZ" }; foo; $env.BAR BAZ ``` -cd affects the environment, so '--env' is required to change directory from within a command +cd affects the environment, so '--env' is required to change directory from within a command. ```nu > def --env gohome [] { cd ~ }; gohome; $env.PWD == ('~' | path expand) true ``` -Define a custom wrapper for an external command +Define a custom wrapper for an external command. ```nu > def --wrapped my-echo [...rest] { ^echo ...$rest }; my-echo -e 'spam\tspam' spamspam ``` -Define a custom command with a type signature. Passing a non-int value will result in an error +Define a custom command with a type signature. Passing a non-int value will result in an error. ```nu > def only_int []: int -> int { $in }; 42 | only_int 42 diff --git a/commands/docs/default.md b/commands/docs/default.md index 9728dc4518c..84f72b7178f 100644 --- a/commands/docs/default.md +++ b/commands/docs/default.md @@ -2,7 +2,7 @@ title: default categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Sets a default value if a row's column is missing or null. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--empty, -e`: also replace empty items like "", {}, and [] + - `--empty, -e`: Also replace empty items like "", {}, and []. ## Parameters diff --git a/commands/docs/describe.md b/commands/docs/describe.md index b62b9fefd1a..993f02ac4af 100644 --- a/commands/docs/describe.md +++ b/commands/docs/describe.md @@ -2,7 +2,7 @@ title: describe categories: | core -version: 0.110.0 +version: 0.111.0 core: | Describe the type and structure of the value(s) piped in. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--no-collect, -n`: do not collect streams of structured data - - `--detailed, -d`: show detailed information about the value + - `--no-collect, -n`: Do not collect streams of structured data. + - `--detailed, -d`: Show detailed information about the value. ## Input/output types: @@ -33,13 +33,13 @@ contributors: false | any | any | ## Examples -Describe the type of a string +Describe the type of a string. ```nu > 'hello' | describe string ``` -Describe the type of a record in a detailed way +Describe the type of a record in a detailed way. ```nu > {shell:'true', uwu:true, features: {bugs:false, multiplatform:true, speed: 10}, fib: [1 1 2 3 5 8], on_save: {|x| $'Saving ($x)'}, first_commit: 2019-05-10, my_duration: (4min + 20sec)} | describe -d ╭───────────────┬────────────────────────────────────────────────────────────────────────────────────────────╮ @@ -130,19 +130,19 @@ Describe the type of a record in a detailed way ╰───────────────┴────────────────────────────────────────────────────────────────────────────────────────────╯ ``` -Describe the type of a stream with detailed information +Describe the type of a stream with detailed information. ```nu > [1 2 3] | each {|i| echo $i} | describe -d ``` -Describe a stream of data, collecting it first +Describe a stream of data, collecting it first. ```nu > [1 2 3] | each {|i| echo $i} | describe ``` -Describe the input but do not collect streams +Describe the input but do not collect streams. ```nu > [1 2 3] | each {|i| echo $i} | describe --no-collect diff --git a/commands/docs/detect.md b/commands/docs/detect.md index 9bbd1944bf3..93d2f54ec38 100644 --- a/commands/docs/detect.md +++ b/commands/docs/detect.md @@ -2,7 +2,7 @@ title: detect categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Various commands for detecting things. usage: | diff --git a/commands/docs/detect_columns.md b/commands/docs/detect_columns.md index 27d63708347..42b2d2e5761 100644 --- a/commands/docs/detect_columns.md +++ b/commands/docs/detect_columns.md @@ -2,7 +2,7 @@ title: detect columns categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Attempt to automatically split text into multiple columns. usage: | @@ -22,11 +22,11 @@ contributors: false ## Flags - - `--skip, -s {int}`: number of rows to skip before detecting - - `--no-headers, -n`: don't detect headers - - `--ignore-box-chars, -i`: ignore lines consisting entirely of box drawing characters and clean box characters from tokens - - `--combine-columns, -c {range}`: columns to be combined; listed as a range - - `--guess`: detect columns by guessing width, it may be useful if default one doesn't work + - `--skip, -s {int}`: Number of rows to skip before detecting. + - `--no-headers, -n`: Don't detect headers. + - `--ignore-box-chars, -i`: Ignore lines consisting entirely of box drawing characters and clean box characters from tokens. + - `--combine-columns, -c {range}`: Columns to be combined; listed as a range. + - `--guess`: Detect columns by guessing width, it may be useful if default one doesn't work. ## Input/output types: diff --git a/commands/docs/detect_type.md b/commands/docs/detect_type.md index ff60fe292e8..dd525749cb4 100644 --- a/commands/docs/detect_type.md +++ b/commands/docs/detect_type.md @@ -2,7 +2,7 @@ title: detect type categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Infer Nushell datatype from a string. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--prefer-filesize, -f`: For ints display them as human-readable file sizes - - `--prefer-dmy`: Prefer day-month-year format for ambiguous dates + - `--prefer-filesize, -f`: For ints display them as human-readable file sizes. + - `--prefer-dmy`: Prefer day-month-year format for ambiguous dates. ## Input/output types: diff --git a/commands/docs/do.md b/commands/docs/do.md index 00bb9457a3f..d817db13f62 100644 --- a/commands/docs/do.md +++ b/commands/docs/do.md @@ -2,7 +2,7 @@ title: do categories: | core -version: 0.110.0 +version: 0.111.0 core: | Run a closure, providing it with the pipeline input. usage: | @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--ignore-errors, -i`: ignore errors as the closure runs - - `--capture-errors, -c`: catch errors as the closure runs, and return them - - `--env`: keep the environment defined inside the command + - `--ignore-errors, -i`: Ignore errors as the closure runs. + - `--capture-errors, -c`: Catch errors as the closure runs, and return them. + - `--env`: Keep the environment defined inside the command. ## Parameters @@ -39,55 +39,55 @@ contributors: false | any | any | ## Examples -Run the closure +Run the closure. ```nu > do { echo hello } hello ``` -Run a stored first-class closure +Run a stored first-class closure. ```nu > let text = "I am enclosed"; let hello = {|| echo $text}; do $hello I am enclosed ``` -Run the closure and ignore both shell and external program errors +Run the closure and ignore both shell and external program errors. ```nu > do --ignore-errors { thisisnotarealcommand } ``` -Abort the pipeline if a program returns a non-zero exit code +Abort the pipeline if a program returns a non-zero exit code. ```nu > do --capture-errors { nu --commands 'exit 1' } | myscarycommand ``` -Run the closure with a positional, type-checked parameter +Run the closure with a positional, type-checked parameter. ```nu > do {|x:int| 100 + $x } 77 177 ``` -Run the closure with pipeline input +Run the closure with pipeline input. ```nu > 77 | do { 100 + $in } 177 ``` -Run the closure with a default parameter value +Run the closure with a default parameter value. ```nu > 77 | do {|x=100| $x + $in } 177 ``` -Run the closure with two positional parameters +Run the closure with two positional parameters. ```nu > do {|x,y| $x + $y } 77 100 177 ``` -Run the closure and keep changes to the environment +Run the closure and keep changes to the environment. ```nu > do --env { $env.foo = 'bar' }; $env.foo bar diff --git a/commands/docs/drop.md b/commands/docs/drop.md index 87d43aa5fbd..8ecf5391c26 100644 --- a/commands/docs/drop.md +++ b/commands/docs/drop.md @@ -2,7 +2,7 @@ title: drop categories: | filters -version: 0.110.0 +version: 0.111.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 5a207294775..76e654d3578 100644 --- a/commands/docs/drop_column.md +++ b/commands/docs/drop_column.md @@ -2,7 +2,7 @@ title: drop column categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Remove N columns at the right-hand end of the input table. To remove columns by name, use `reject`. usage: | @@ -20,6 +20,10 @@ contributors: false ```> drop column {flags} (columns)``` +## Flags + + - `--left, -l`: Drop columns from the left. + ## Parameters - `columns`: Starting from the end, the number of columns to remove. @@ -52,3 +56,23 @@ Remove the last column of a record │ lib │ nu-lib │ ╰─────┴────────╯ ``` + +Remove the first column of a table +```nu +> [[lib, extension]; [nu-lib, rs] [nu-core, rb]] | drop column --left +╭───┬───────────╮ +│ # │ extension │ +├───┼───────────┤ +│ 0 │ rs │ +│ 1 │ rb │ +╰───┴───────────╯ + +``` + +Remove the first column of a record +```nu +> {lib: nu-lib, extension: rs} | drop column --left +╭───────────┬────╮ +│ extension │ rs │ +╰───────────┴────╯ +``` diff --git a/commands/docs/drop_nth.md b/commands/docs/drop_nth.md index 1e46cae13a3..2932766866d 100644 --- a/commands/docs/drop_nth.md +++ b/commands/docs/drop_nth.md @@ -2,7 +2,7 @@ title: drop nth categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Drop the selected rows. usage: | diff --git a/commands/docs/du.md b/commands/docs/du.md index 37519b36be4..c7e40d7bd86 100644 --- a/commands/docs/du.md +++ b/commands/docs/du.md @@ -2,7 +2,7 @@ title: du categories: | filesystem -version: 0.110.0 +version: 0.111.0 filesystem: | Find disk usage sizes of specified items. usage: | @@ -22,12 +22,12 @@ contributors: false ## Flags - - `--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 - - `--all, -a`: move hidden files if '*' is provided + - `--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. + - `--all, -a`: Include hidden files if '*' is provided. ## Parameters @@ -41,7 +41,7 @@ contributors: false | nothing | table | ## Examples -Disk usage of the current directory +Disk usage of the current directory. ```nu > du diff --git a/commands/docs/each.md b/commands/docs/each.md index 3db7d92912c..5fc953ffaf5 100644 --- a/commands/docs/each.md +++ b/commands/docs/each.md @@ -2,7 +2,7 @@ title: each categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Run a closure on each row of the input list, creating a new list with the results. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--keep-empty, -k`: keep empty result cells - - `--flatten, -f`: combine outputs into a single stream instead of collecting them to separate values + - `--keep-empty, -k`: Keep empty result cells. + - `--flatten, -f`: Combine outputs into a single stream instead of collecting them to separate values. ## Parameters @@ -39,7 +39,7 @@ contributors: false | any | any | ## Examples -Multiplies elements in the list +Multiplies elements in the list. ```nu > [1 2 3] | each {|e| 2 * $e } ╭───┬───╮ @@ -50,7 +50,7 @@ Multiplies elements in the list ``` -Produce a list of values in the record, converted to string +Produce a list of values in the record, converted to string. ```nu > {major:2, minor:1, patch:4} | values | each {|| into string } ╭───┬───╮ @@ -71,7 +71,7 @@ Produce a list of values in the record, converted to string ``` -Iterate over each element, producing a list showing indexes of any 2s +Iterate over each element, producing a list showing indexes of any 2s. ```nu > [1 2 3] | enumerate | each {|e| if $e.item == 2 { $"found 2 at ($e.index)!"} } ╭───┬───────────────╮ @@ -80,7 +80,7 @@ Iterate over each element, producing a list showing indexes of any 2s ``` -Iterate over each element, keeping null results +Iterate over each element, keeping null results. ```nu > [1 2 3] | each --keep-empty {|e| if $e == 2 { "found 2!"} } ╭───┬──────────╮ @@ -91,13 +91,13 @@ Iterate over each element, keeping null results ``` -Update value if not null, otherwise do nothing +Update value if not null, otherwise do nothing. ```nu > $env.name? | each { $"hello ($in)" } | default "bye" ``` -Scan through multiple files without pause +Scan through multiple files without pause. ```nu > ls *.txt | each --flatten {|f| open $f.name | lines } | find -i 'note: ' | str join "\n" diff --git a/commands/docs/each_while.md b/commands/docs/each_while.md index 6db141d3078..ea32ba8bd33 100644 --- a/commands/docs/each_while.md +++ b/commands/docs/each_while.md @@ -2,7 +2,7 @@ title: each while categories: | filters -version: 0.110.0 +version: 0.111.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 179b3a19eca..4e5f0a70449 100644 --- a/commands/docs/echo.md +++ b/commands/docs/echo.md @@ -2,7 +2,7 @@ title: echo categories: | core -version: 0.110.0 +version: 0.111.0 core: | Returns its arguments, ignoring the piped-in value. usage: | diff --git a/commands/docs/encode.md b/commands/docs/encode.md index 63ca814504b..ca5e8af4541 100644 --- a/commands/docs/encode.md +++ b/commands/docs/encode.md @@ -2,7 +2,7 @@ title: encode categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Encode a string into bytes. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--ignore-errors, -i`: when a character isn't in the given encoding, replace with a HTML entity (like `🎈`) + - `--ignore-errors, -i`: When a character isn't in the given encoding, replace with a HTML entity (like `🎈`). ## Parameters diff --git a/commands/docs/encode_base32.md b/commands/docs/encode_base32.md index 7c2295bbe1e..8e202464393 100644 --- a/commands/docs/encode_base32.md +++ b/commands/docs/encode_base32.md @@ -2,7 +2,7 @@ title: encode base32 categories: | formats -version: 0.110.0 +version: 0.111.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 75516978c29..167befa64cb 100644 --- a/commands/docs/encode_base32hex.md +++ b/commands/docs/encode_base32hex.md @@ -2,7 +2,7 @@ title: encode base32hex categories: | formats -version: 0.110.0 +version: 0.111.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 b65bc229961..81a3b4ba429 100644 --- a/commands/docs/encode_base64.md +++ b/commands/docs/encode_base64.md @@ -2,7 +2,7 @@ title: encode base64 categories: | formats -version: 0.110.0 +version: 0.111.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 b36cbb25426..64229c06ce9 100644 --- a/commands/docs/encode_hex.md +++ b/commands/docs/encode_hex.md @@ -2,7 +2,7 @@ title: encode hex categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Hex encode a binary value or a string. usage: | diff --git a/commands/docs/enumerate.md b/commands/docs/enumerate.md index 545e0941dd6..5e28cf759b3 100644 --- a/commands/docs/enumerate.md +++ b/commands/docs/enumerate.md @@ -2,7 +2,7 @@ title: enumerate categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Enumerate the elements in a stream. usage: | @@ -28,7 +28,7 @@ contributors: false | any | table | ## Examples -Add an index to each element of a list +Add an index to each element of a list. ```nu > [a, b, c] | enumerate ╭───┬──────╮ diff --git a/commands/docs/error.md b/commands/docs/error.md index 3b0d9881330..f886a98d11e 100644 --- a/commands/docs/error.md +++ b/commands/docs/error.md @@ -2,7 +2,7 @@ title: error categories: | core -version: 0.110.0 +version: 0.111.0 core: | Various commands for working with errors. usage: | diff --git a/commands/docs/error_make.md b/commands/docs/error_make.md index e1988f6afcc..14038731d78 100644 --- a/commands/docs/error_make.md +++ b/commands/docs/error_make.md @@ -2,7 +2,7 @@ title: error make categories: | core -version: 0.110.0 +version: 0.111.0 core: | Create an error. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--unspanned, -u`: remove the labels from the error + - `--unspanned, -u`: Remove the labels from the error. ## Parameters @@ -31,32 +31,30 @@ contributors: false ## Input/output types: -| input | output | -| ------- | ------ | -| nothing | error | -| string | error | -| record | error | +| input | output | +| ----- | ------ | +| any | error | ## Examples -Create a simple, default error +Create a simple, default error. ```nu > error make ``` -Create a simple error from a string +Create a simple error from a string. ```nu > error make 'my error message' ``` -Create a simple error from an `error_struct` record +Create a simple error from an `error_struct` record. ```nu > error make {msg: 'my error message'} ``` -A complex error utilizing spans and inners +A complex error utilizing spans and inners. ```nu > def foo [x: int, y: int] { let z = $x + $y @@ -75,13 +73,13 @@ A complex error utilizing spans and inners ``` -Chain errors using a pipeline +Chain errors using a pipeline. ```nu > try {error make "foo"} catch {error make "bar"} ``` -Chain errors using arguments (note the extra command in `catch`) +Chain errors using arguments (note the extra command in `catch`). ```nu > try { error make "foo" diff --git a/commands/docs/every.md b/commands/docs/every.md index d8eb511e705..7d0518efef6 100644 --- a/commands/docs/every.md +++ b/commands/docs/every.md @@ -2,7 +2,7 @@ title: every categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Show (or skip) every n-th row, starting from the first one. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--skip, -s`: skip the rows that would be returned, instead of selecting them + - `--skip, -s`: Skip the rows that would be returned, instead of selecting them. ## Parameters diff --git a/commands/docs/exec.md b/commands/docs/exec.md index d59c1f04002..605c8d8033e 100644 --- a/commands/docs/exec.md +++ b/commands/docs/exec.md @@ -2,7 +2,7 @@ title: exec categories: | system -version: 0.110.0 +version: 0.111.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 584e111aadd..b9152325edb 100644 --- a/commands/docs/exit.md +++ b/commands/docs/exit.md @@ -2,7 +2,7 @@ title: exit categories: | shells -version: 0.110.0 +version: 0.111.0 shells: | Exit Nu. usage: | @@ -20,6 +20,10 @@ contributors: false ```> exit {flags} (exit_code)``` +## Flags + + - `--abort`: Exit by abort. + ## Parameters - `exit_code`: Exit code to return immediately with. diff --git a/commands/docs/explain.md b/commands/docs/explain.md index 6f8e2a1046c..e0cb70d2b5b 100644 --- a/commands/docs/explain.md +++ b/commands/docs/explain.md @@ -2,7 +2,7 @@ title: explain categories: | debug -version: 0.110.0 +version: 0.111.0 debug: | Explain closure contents. usage: | @@ -33,7 +33,7 @@ contributors: false | nothing | any | ## Examples -Explain a command within a closure +Explain a command within a closure. ```nu > explain {|| ls | sort-by name type --ignore-case | get name } | table --expand diff --git a/commands/docs/explore.md b/commands/docs/explore.md index 8932d78d155..039dfb6d12c 100644 --- a/commands/docs/explore.md +++ b/commands/docs/explore.md @@ -2,7 +2,7 @@ title: explore categories: | viewers -version: 0.110.0 +version: 0.111.0 viewers: | Explore acts as a table pager, just like `less` does for text. usage: | @@ -22,10 +22,10 @@ contributors: false ## Flags - - `--head {bool}`: Show or hide column headers (default true) - - `--index, -i`: Show row indexes when viewing a list - - `--tail, -t`: Start with the viewport scrolled to the bottom - - `--peek, -p`: When quitting, output the value of the cell the cursor was on + - `--head {bool}`: Show or hide column headers (default true). + - `--index, -i`: Show row indexes when viewing a list. + - `--tail, -t`: Start with the viewport scrolled to the bottom. + - `--peek, -p`: When quitting, output the value of the cell the cursor was on. ## Input/output types: diff --git a/commands/docs/explore_config.md b/commands/docs/explore_config.md index 6da1a66a404..9c67b03bb09 100644 --- a/commands/docs/explore_config.md +++ b/commands/docs/explore_config.md @@ -2,7 +2,7 @@ title: explore config categories: | viewers -version: 0.110.0 +version: 0.111.0 viewers: | Launch a TUI to view and edit the nushell configuration interactively. usage: | @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--use-example-data, -e`: Show the nushell configuration TUI using example data - - `--tree, -t`: Do not show the TUI, just show a tree structure of the data - - `--output, -o {string}`: Optional output file to save changes to (default: output.json) + - `--use-example-data, -e`: Show the nushell configuration TUI using example data. + - `--tree, -t`: Do not show the TUI, just show a tree structure of the data. + - `--output, -o {string}`: Optional output file to save changes to (default: output.json). ## Input/output types: diff --git a/commands/docs/explore_regex.md b/commands/docs/explore_regex.md index 8481647bc34..3233dd4381f 100644 --- a/commands/docs/explore_regex.md +++ b/commands/docs/explore_regex.md @@ -2,7 +2,7 @@ title: explore regex categories: | viewers -version: 0.110.0 +version: 0.111.0 viewers: | Launch a TUI to create and explore regular expressions interactively. usage: | @@ -42,4 +42,5 @@ Explore a regular expression interactively with sample text ``` ## Notes -Press `Ctrl-Q` to quit and provide constructed regular expression as the output. \ No newline at end of file +Press `Ctrl-Q` to quit and provide constructed regular expression as the output. +Supports AltGr key combinations for international keyboard layouts. \ No newline at end of file diff --git a/commands/docs/export-env.md b/commands/docs/export-env.md index a96b6b56b80..70520ccdd1d 100644 --- a/commands/docs/export-env.md +++ b/commands/docs/export-env.md @@ -2,7 +2,7 @@ title: export-env categories: | env -version: 0.110.0 +version: 0.111.0 env: | Run a block and preserve its environment in a current scope. usage: | @@ -32,13 +32,13 @@ contributors: false | nothing | nothing | ## Examples -Set an environment variable +Set an environment variable. ```nu > export-env { $env.SPAM = 'eggs' } ``` -Set an environment variable and examine its value +Set an environment variable and examine its value. ```nu > export-env { $env.SPAM = 'eggs' }; $env.SPAM eggs diff --git a/commands/docs/export.md b/commands/docs/export.md index 4c3952238ba..bd6216dc0a0 100644 --- a/commands/docs/export.md +++ b/commands/docs/export.md @@ -2,7 +2,7 @@ title: export categories: | core -version: 0.110.0 +version: 0.111.0 core: | Export definitions or environment variables from a module. usage: | @@ -28,7 +28,7 @@ contributors: false | nothing | nothing | ## Examples -Export a definition from a module +Export a definition from a module. ```nu > module utils { export def my-command [] { "hello" } }; use utils my-command; my-command hello diff --git a/commands/docs/export_alias.md b/commands/docs/export_alias.md index 3e6bea19c33..c1a59eb4250 100644 --- a/commands/docs/export_alias.md +++ b/commands/docs/export_alias.md @@ -2,7 +2,7 @@ title: export alias categories: | core -version: 0.110.0 +version: 0.111.0 core: | Alias a command (with optional flags) to a new name and export it from a module. usage: | @@ -33,7 +33,7 @@ contributors: false | nothing | nothing | ## Examples -Alias ll to ls -l and export it from a module +Alias ll to ls -l and export it from a module. ```nu > module spam { export alias ll = ls -l } diff --git a/commands/docs/export_const.md b/commands/docs/export_const.md index 314106e218b..b26aae3b9b2 100644 --- a/commands/docs/export_const.md +++ b/commands/docs/export_const.md @@ -2,7 +2,7 @@ title: export const categories: | core -version: 0.110.0 +version: 0.111.0 core: | Use parse-time constant from a module and export them from this module. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `const_name`: Constant name. + - `const_name`: The constant name to create and export. - `initial_value`: Equals sign followed by constant value. @@ -33,7 +33,7 @@ contributors: false | nothing | nothing | ## Examples -Re-export a command from another module +Re-export a constant from another module. ```nu > module spam { export const foo = 3; } module eggs { export use spam foo } diff --git a/commands/docs/export_def.md b/commands/docs/export_def.md index ffac9d39664..a02076b5521 100644 --- a/commands/docs/export_def.md +++ b/commands/docs/export_def.md @@ -2,7 +2,7 @@ title: export def categories: | core -version: 0.110.0 +version: 0.111.0 core: | Define a custom command and export it from a module. usage: | @@ -22,14 +22,14 @@ contributors: false ## Flags - - `--env`: keep the environment defined inside the command - - `--wrapped`: treat unknown flags and arguments as strings (requires ...rest-like parameter in signature) + - `--env`: Environment: defined inside the command. + - `--wrapped`: Unknown flags and arguments: strings that require rest-like parameter in signature. ## Parameters - - `def_name`: Command name. - - `params`: Parameters. - - `block`: Body of the definition. + - `def_name`: Command name to define. + - `params`: Command parameters: comma-separated list inside []. + - `block`: Command body: list of instructions inside {}. ## Input/output types: @@ -39,7 +39,7 @@ contributors: false | nothing | nothing | ## Examples -Define a custom command in a module and call it +Define a custom command in a module and call it. ```nu > module spam { export def foo [] { "foo" } }; use spam foo; foo foo diff --git a/commands/docs/export_extern.md b/commands/docs/export_extern.md index 47d3f562c6e..cb857de0ca7 100644 --- a/commands/docs/export_extern.md +++ b/commands/docs/export_extern.md @@ -2,7 +2,7 @@ title: export extern categories: | core -version: 0.110.0 +version: 0.111.0 core: | Define an extern and export it from a module. usage: | @@ -22,8 +22,8 @@ contributors: false ## Parameters - - `def_name`: Definition name. - - `params`: Parameters. + - `def_name`: The name of the external command signature to define and export. + - `params`: The parameters for the external command signature. ## Input/output types: @@ -33,7 +33,7 @@ contributors: false | nothing | nothing | ## Examples -Export the signature for an external command +Export the signature for an external command. ```nu > export extern echo [text: string] diff --git a/commands/docs/export_module.md b/commands/docs/export_module.md index 98105151399..54d01f5fa1f 100644 --- a/commands/docs/export_module.md +++ b/commands/docs/export_module.md @@ -2,7 +2,7 @@ title: export module categories: | core -version: 0.110.0 +version: 0.111.0 core: | Export a custom module from a module. usage: | @@ -33,7 +33,7 @@ contributors: false | nothing | nothing | ## Examples -Define a custom command in a submodule of a module and call it +Define a custom command in a submodule of a module and call it. ```nu > module spam { export module eggs { diff --git a/commands/docs/export_use.md b/commands/docs/export_use.md index 2ca1cb2ea84..8d5bc348df3 100644 --- a/commands/docs/export_use.md +++ b/commands/docs/export_use.md @@ -2,7 +2,7 @@ title: export use categories: | core -version: 0.110.0 +version: 0.111.0 core: | Use definitions from a module and export them from this module. usage: | @@ -33,7 +33,7 @@ contributors: false | nothing | nothing | ## Examples -Re-export a command from another module +Re-export a command from another module. ```nu > module spam { export def foo [] { "foo" } } module eggs { export use spam foo } diff --git a/commands/docs/extern.md b/commands/docs/extern.md index 176b909be81..d2a41eed57c 100644 --- a/commands/docs/extern.md +++ b/commands/docs/extern.md @@ -2,7 +2,7 @@ title: extern categories: | core -version: 0.110.0 +version: 0.111.0 core: | Define a signature for an external command. usage: | @@ -22,8 +22,8 @@ contributors: false ## Parameters - - `def_name`: Definition name. - - `params`: Parameters. + - `def_name`: The name of the external command signature to define. + - `params`: The parameters for the external command signature. ## Input/output types: @@ -33,7 +33,7 @@ contributors: false | nothing | nothing | ## Examples -Write a signature for an external command +Write a signature for an external command. ```nu > extern echo [text: string] diff --git a/commands/docs/fill.md b/commands/docs/fill.md index 061a25b37f1..c65f34ae727 100644 --- a/commands/docs/fill.md +++ b/commands/docs/fill.md @@ -2,11 +2,11 @@ title: fill categories: | conversions -version: 0.110.0 +version: 0.111.0 conversions: | - Fill and Align. + Fill and align text in columns. usage: | - Fill and Align. + Fill and align text in columns. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `fill` for [conversions](/commands/categories/conversions.md) -
Fill and Align.
+
Fill and align text in columns.
## Signature @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--width, -w {int}`: The width of the output. Defaults to 1 - - `--alignment, -a {string}`: The alignment of the output. Defaults to Left (Left(l), Right(r), Center(c/m), MiddleRight(cr/mr)) - - `--character, -c {string}`: The character to fill with. Defaults to ' ' (space) + - `--width, -w {int}`: The width of the output. Defaults to 1. + - `--alignment, -a {string}`: The alignment of the output. Defaults to Left (Left(l), Right(r), Center(c/m), MiddleRight(cr/mr)). + - `--character, -c {string}`: The character to fill with. Defaults to ' ' (space). ## Input/output types: @@ -42,37 +42,37 @@ contributors: false | list<any> | list<string> | ## Examples -Fill a string on the left side to a width of 15 with the character '─' +Fill a string on the left side to a width of 15 with the character '─'. ```nu > 'nushell' | fill --alignment l --character '─' --width 15 nushell──────── ``` -Fill a string on the right side to a width of 15 with the character '─' +Fill a string on the right side to a width of 15 with the character '─'. ```nu > 'nushell' | fill --alignment r --character '─' --width 15 ────────nushell ``` -Fill an empty string with 10 '─' characters +Fill an empty string with 10 '─' characters. ```nu > '' | fill --character '─' --width 10 ────────── ``` -Fill a number on the left side to a width of 5 with the character '0' +Fill a number on the left side to a width of 5 with the character '0'. ```nu > 1 | fill --alignment right --character '0' --width 5 00001 ``` -Fill a number on both sides to a width of 5 with the character '0' +Fill a number on both sides to a width of 5 with the character '0'. ```nu > 1.1 | fill --alignment center --character '0' --width 5 01.10 ``` -Fill a filesize on both sides to a width of 10 with the character '0' +Fill a filesize on both sides to a width of 10 with the character '0'. ```nu > 1kib | fill --alignment middle --character '0' --width 10 0001024000 diff --git a/commands/docs/filter.md b/commands/docs/filter.md index 027e2b29d89..7273cba7b3b 100644 --- a/commands/docs/filter.md +++ b/commands/docs/filter.md @@ -2,7 +2,7 @@ title: filter categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Filter values based on a predicate closure. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `closure`: Predicate closure. + - `closure`: The closure to use as a filter predicate. ## Input/output types: @@ -33,7 +33,7 @@ contributors: false | range | list<any> | ## Examples -Filter items of a list according to a condition +Filter items of a list according to a condition. ```nu > [1 2] | filter {|x| $x > 1} ╭───┬───╮ @@ -42,7 +42,7 @@ Filter items of a list according to a condition ``` -Filter rows of a table according to a condition +Filter rows of a table according to a condition. ```nu > [{a: 1} {a: 2}] | filter {|x| $x.a > 1} ╭───┬───╮ @@ -53,7 +53,7 @@ Filter rows of a table according to a condition ``` -Filter rows of a table according to a stored condition +Filter rows of a table according to a stored condition. ```nu > let cond = {|x| $x.a > 1}; [{a: 1} {a: 2}] | filter $cond ╭───┬───╮ @@ -64,7 +64,7 @@ Filter rows of a table according to a stored condition ``` -Filter items of a range according to a condition +Filter items of a range according to a condition. ```nu > 9..13 | filter {|el| $el mod 2 != 0} ╭───┬────╮ @@ -75,7 +75,7 @@ Filter items of a range according to a condition ``` -List all numbers above 3, using an existing closure condition +List all numbers above 3, using an existing closure condition. ```nu > let a = {$in > 3}; [1, 2, 5, 6] | filter $a diff --git a/commands/docs/find.md b/commands/docs/find.md index 90cb0543a2d..7f8eebd062e 100644 --- a/commands/docs/find.md +++ b/commands/docs/find.md @@ -2,11 +2,11 @@ title: find categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | - Searches terms in the input. + Search for terms in the input data. usage: | - Searches terms in the input. + Search for terms in the input data. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `find` for [filters](/commands/categories/filters.md) -
Searches terms in the input.
+
Search for terms in the input data.
## Signature @@ -22,14 +22,14 @@ contributors: false ## Flags - - `--regex, -r {string}`: regex to match with - - `--ignore-case, -i`: case-insensitive; when in regex mode, this is equivalent to (?i) - - `--multiline, -m`: don't split multi-line strings into lists of lines. you should use this option when using the (?m) or (?s) flags in regex mode - - `--dotall, -s`: dotall regex mode: allow a dot . to match newlines \n; equivalent to (?s) - - `--columns, -c {list}`: column names to be searched - - `--no-highlight, -n`: no-highlight mode: find without marking with ansi code - - `--invert, -v`: invert the match - - `--rfind, -R`: search from the end of the string and only return the first match + - `--regex, -r {string}`: Regex to match with. + - `--ignore-case, -i`: Case-insensitive; when in regex mode, this is equivalent to (?i). + - `--multiline, -m`: Don't split multi-line strings into lists of lines. you should use this option when using the (?m) or (?s) flags in regex mode. + - `--dotall, -s`: Dotall regex mode: allow a dot . to match newlines \n; equivalent to (?s). + - `--columns, -c {list}`: Column names to be searched. + - `--no-highlight, -n`: No-highlight mode: find without marking with ansi code. + - `--invert, -v`: Invert the match. + - `--rfind, -R`: Search from the end of the string and only return the first match. ## Parameters @@ -44,7 +44,7 @@ contributors: false | string | any | ## Examples -Search for multiple terms in a command output +Search for multiple terms in a command output. ```nu > ls | find toml md sh @@ -56,7 +56,7 @@ Search and highlight text for a term in a string. Cargo.toml ``` -Search a number or a file size in a list of numbers +Search a number or a file size in a list of numbers. ```nu > [1 5 3kb 4 35 3Mb] | find 5 3kb ╭───┬────────╮ @@ -66,7 +66,7 @@ Search a number or a file size in a list of numbers ``` -Search a char in a list of string +Search a char in a list of string. ```nu > [moe larry curly] | find l ╭───┬───────╮ @@ -76,7 +76,7 @@ Search a char in a list of string ``` -Search using regex +Search using regex. ```nu > [abc odb arc abf] | find --regex "b." ╭───┬─────╮ @@ -86,7 +86,7 @@ Search using regex ``` -Case insensitive search +Case insensitive search. ```nu > [aBc bde Arc abf] | find "ab" -i ╭───┬─────╮ @@ -96,7 +96,7 @@ Case insensitive search ``` -Find value in records using regex +Find value in records using regex. ```nu > [[version name]; ['0.1.0' nushell] ['0.1.1' fish] ['0.2.0' zsh]] | find --regex "nu" ╭───┬─────────┬─────────╮ @@ -107,7 +107,7 @@ Find value in records using regex ``` -Find inverted values in records using regex +Find inverted values in records using regex. ```nu > [[version name]; ['0.1.0' nushell] ['0.1.1' fish] ['0.2.0' zsh]] | find --regex "nu" --invert ╭───┬─────────┬──────╮ @@ -119,7 +119,7 @@ Find inverted values in records using regex ``` -Find value in list using regex +Find value in list using regex. ```nu > [["Larry", "Moe"], ["Victor", "Marina"]] | find --regex "rr" ╭───┬───────────────╮ @@ -131,7 +131,7 @@ Find value in list using regex ``` -Find inverted values in records using regex +Find inverted values in records using regex. ```nu > [["Larry", "Moe"], ["Victor", "Marina"]] | find --regex "rr" --invert ╭───┬────────────────╮ @@ -143,7 +143,7 @@ Find inverted values in records using regex ``` -Remove ANSI sequences from result +Remove ANSI sequences from result. ```nu > [[foo bar]; [abc 123] [def 456]] | find --no-highlight 123 ╭───┬─────┬─────╮ @@ -154,7 +154,7 @@ Remove ANSI sequences from result ``` -Find and highlight text in specific columns +Find and highlight text in specific columns. ```nu > [[col1 col2 col3]; [moe larry curly] [larry curly moe]] | find moe --columns [col1] ╭───┬──────┬───────┬───────╮ @@ -165,7 +165,7 @@ Find and highlight text in specific columns ``` -Find in a multi-line string +Find in a multi-line string. ```nu > 'Violets are red And roses are blue @@ -178,7 +178,7 @@ Alter their hue' | find ue ``` -Find in a multi-line string without splitting the input into a list of lines +Find in a multi-line string without splitting the input into a list of lines. ```nu > 'Violets are red And roses are blue @@ -190,7 +190,7 @@ When metamaterials Alter their hue ``` -Find and highlight the last occurrence in a string +Find and highlight the last occurrence in a string. ```nu > 'hello world hello' | find --rfind hello hello world hello diff --git a/commands/docs/first.md b/commands/docs/first.md index 69d8ca56150..6c6f1820aa8 100644 --- a/commands/docs/first.md +++ b/commands/docs/first.md @@ -2,7 +2,7 @@ title: first categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Return only the first several rows of the input. Counterpart of `last`. Opposite of `skip`. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--strict, -s`: Throw an error if input is empty + - `--strict, -s`: Throw an error if input is empty. ## Parameters @@ -38,13 +38,13 @@ contributors: false | range | any | ## Examples -Return the first item of a list/table +Return the first item of a list/table. ```nu > [1 2 3] | first 1 ``` -Return the first 2 items of a list/table +Return the first 2 items of a list/table. ```nu > [1 2 3] | first 2 ╭───┬───╮ @@ -54,7 +54,7 @@ Return the first 2 items of a list/table ``` -Return the first 2 bytes of a binary value +Return the first 2 bytes of a binary value. ```nu > 0x[01 23 45] | first 2 Length: 2 (0x2) bytes | printable whitespace ascii_other non_ascii @@ -62,7 +62,7 @@ Length: 2 (0x2) bytes | printable whitespace ascii_other non_ascii ``` -Return the first item of a range +Return the first item of a range. ```nu > 1..3 | first 1 diff --git a/commands/docs/flatten.md b/commands/docs/flatten.md index d60b3accc35..9928a6a718a 100644 --- a/commands/docs/flatten.md +++ b/commands/docs/flatten.md @@ -2,11 +2,11 @@ title: flatten categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | - Flatten the table. + Flatten a table by extracting nested values. usage: | - Flatten the table. + Flatten a table by extracting nested values. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `flatten` for [filters](/commands/categories/filters.md) -
Flatten the table.
+
Flatten a table by extracting nested values.
## Signature @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--all, -a`: flatten inner table one level out + - `--all, -a`: Flatten inner table one level out. ## Parameters @@ -37,7 +37,7 @@ contributors: false | record | table | ## Examples -flatten a table +flatten a table. ```nu > [[N, u, s, h, e, l, l]] | flatten ╭───┬───╮ @@ -52,25 +52,25 @@ flatten a table ``` -flatten a table, get the first item +flatten a table, get the first item. ```nu > [[N, u, s, h, e, l, l]] | flatten | first ``` -flatten a column having a nested table +flatten a column having a nested table. ```nu > [[origin, people]; [Ecuador, ([[name, meal]; ['Andres', 'arepa']])]] | flatten --all | get meal ``` -restrict the flattening by passing column names +restrict the flattening by passing column names. ```nu > [[origin, crate, versions]; [World, ([[name]; ['nu-cli']]), ['0.21', '0.22']]] | flatten versions --all | last | get versions ``` -Flatten inner table +Flatten inner table. ```nu > { a: b, d: [ 1 2 3 4 ], e: [ 4 3 ] } | flatten d --all ╭───┬───┬───┬───────────╮ diff --git a/commands/docs/for.md b/commands/docs/for.md index 16edc23a553..001aa3ca9c7 100644 --- a/commands/docs/for.md +++ b/commands/docs/for.md @@ -2,7 +2,7 @@ title: for categories: | core -version: 0.110.0 +version: 0.111.0 core: | Loop over a range. usage: | @@ -34,19 +34,19 @@ contributors: false | nothing | nothing | ## Examples -Print the square of each integer +Print the square of each integer. ```nu > for x in [1 2 3] { print ($x * $x) } ``` -Work with elements of a range +Work with elements of a range. ```nu > for $x in 1..3 { print $x } ``` -Number each item and print a message +Number each item and print a message. ```nu > for $it in (['bob' 'fred'] | enumerate) { print $"($it.index) is ($it.item)" } diff --git a/commands/docs/format.md b/commands/docs/format.md index 3ececbad7d7..bbafedf3d33 100644 --- a/commands/docs/format.md +++ b/commands/docs/format.md @@ -2,7 +2,7 @@ title: format categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Various commands for formatting data. usage: | diff --git a/commands/docs/format_bits.md b/commands/docs/format_bits.md index 10cec840cdc..fac0e93685d 100644 --- a/commands/docs/format_bits.md +++ b/commands/docs/format_bits.md @@ -2,7 +2,7 @@ title: format bits categories: | conversions -version: 0.110.0 +version: 0.111.0 conversions: | Convert value to a string of binary data represented by 0 and 1. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--endian, -e {string}`: Byte encode endian. Only applies to int, filesize, duration and bool, as well as tables and records of those. Available options: native, little, big(default) + - `--endian, -e {string}`: Byte encode endian. Only applies to int, filesize, duration and bool, as well as tables and records of those. Available options: native, little, big(default). ## Parameters diff --git a/commands/docs/format_date.md b/commands/docs/format_date.md index 5598ae0d8da..6a8da52747b 100644 --- a/commands/docs/format_date.md +++ b/commands/docs/format_date.md @@ -2,7 +2,7 @@ title: format date categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Format a given date using a format string. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--list, -l`: lists strftime cheatsheet + - `--list, -l`: Lists strftime cheatsheet. ## Parameters diff --git a/commands/docs/format_duration.md b/commands/docs/format_duration.md index 7e211c92fcc..d5af5f03945 100644 --- a/commands/docs/format_duration.md +++ b/commands/docs/format_duration.md @@ -2,7 +2,7 @@ title: format duration categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Outputs duration with a specified unit of time. usage: | @@ -35,13 +35,13 @@ contributors: false | table | table | ## Examples -Convert µs duration to the requested second duration as a string +Convert µs duration to the requested second duration as a string. ```nu > 1000000µs | format duration sec 1 sec ``` -Convert durations to µs duration as strings +Convert durations to µs duration as strings. ```nu > [1sec 2sec] | format duration µs ╭───┬────────────╮ @@ -51,7 +51,7 @@ Convert durations to µs duration as strings ``` -Convert duration to µs as a string if unit asked for was us +Convert duration to µs as a string if unit asked for was us. ```nu > 1sec | format duration us 1000000 µs diff --git a/commands/docs/format_filesize.md b/commands/docs/format_filesize.md index 7ce545254cf..6001c2617e0 100644 --- a/commands/docs/format_filesize.md +++ b/commands/docs/format_filesize.md @@ -2,7 +2,7 @@ title: format filesize categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Converts a column of filesizes to some specified format. usage: | @@ -35,20 +35,23 @@ contributors: false | record | record | ## Examples -Convert the size column to KB +Convert the size column to KB. ```nu > ls | format filesize kB size ``` -Convert the apparent column to B +Convert the apparent column to B. ```nu > du | format filesize B apparent ``` -Convert the size data to MB +Convert the size data to MB. ```nu > 4GB | format filesize MB 4000 MB ``` + +## Notes +Decimal precision is controlled by `$env.config.float_precision`. \ No newline at end of file diff --git a/commands/docs/format_number.md b/commands/docs/format_number.md index 667e7d317b7..2224330c038 100644 --- a/commands/docs/format_number.md +++ b/commands/docs/format_number.md @@ -2,7 +2,7 @@ title: format number categories: | conversions -version: 0.110.0 +version: 0.111.0 conversions: | Format a number. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--no-prefix, -n`: don't include the binary, hex or octal prefixes + - `--no-prefix, -n`: Don't include the binary, hex or octal prefixes. ## Input/output types: diff --git a/commands/docs/format_pattern.md b/commands/docs/format_pattern.md index 4fdbe62c3ea..859aa77f131 100644 --- a/commands/docs/format_pattern.md +++ b/commands/docs/format_pattern.md @@ -2,7 +2,7 @@ title: format pattern categories: | strings -version: 0.110.0 +version: 0.111.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 2d5110b20f8..f812320ff8d 100644 --- a/commands/docs/from.md +++ b/commands/docs/from.md @@ -2,7 +2,7 @@ title: from categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Parse a string or binary data into structured data. usage: | @@ -37,7 +37,7 @@ You must use one of the following subcommands. Using this command as-is will onl | [`from eml`](/commands/docs/from_eml.md) | Parse text as .eml and create record. | plugin | | [`from ics`](/commands/docs/from_ics.md) | Parse text as .ics and create table. | plugin | | [`from ini`](/commands/docs/from_ini.md) | Parse text as .ini and create table. | plugin | -| [`from json`](/commands/docs/from_json.md) | Convert from json to structured data. | built-in | +| [`from json`](/commands/docs/from_json.md) | Convert JSON text into structured data. | built-in | | [`from msgpack`](/commands/docs/from_msgpack.md) | Convert MessagePack data into Nu values. | built-in | | [`from msgpackz`](/commands/docs/from_msgpackz.md) | Convert brotli-compressed MessagePack data into Nu values. | built-in | | [`from nuon`](/commands/docs/from_nuon.md) | Convert from nuon to structured data. | built-in | diff --git a/commands/docs/from_csv.md b/commands/docs/from_csv.md index eb9c66a3e5b..518043bd15d 100644 --- a/commands/docs/from_csv.md +++ b/commands/docs/from_csv.md @@ -2,7 +2,7 @@ title: from csv categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Parse text as .csv and create table. usage: | @@ -22,13 +22,13 @@ contributors: false ## Flags - - `--separator, -s {string}`: a character to separate columns (either single char or 4 byte unicode sequence), defaults to ',' - - `--comment, -c {string}`: a comment character to ignore lines starting with it - - `--quote, -q {string}`: a quote character to ignore separators in strings, defaults to '"' - - `--escape, -e {string}`: an escape character for strings containing the quote character - - `--noheaders, -n`: don't treat the first row as column names - - `--flexible`: allow the number of fields in records to be variable - - `--no-infer`: no field type inferencing + - `--separator, -s {string}`: A character to separate columns (either single char or 4 byte unicode sequence), defaults to ','. + - `--comment, -c {string}`: A comment character to ignore lines starting with it. + - `--quote, -q {string}`: A quote character to ignore separators in strings, defaults to '"'. + - `--escape, -e {string}`: An escape character for strings containing the quote character. + - `--noheaders, -n`: Don't treat the first row as column names. + - `--flexible`: Allow the number of fields in records to be variable. + - `--no-infer`: No field type inferencing. - `--trim, -t {string}`: drop leading and trailing whitespaces around headers names and/or field values @@ -39,7 +39,7 @@ contributors: false | string | table | ## Examples -Convert comma-separated data to a table +Convert comma-separated data to a table. ```nu > "ColA,ColB 1,2" | from csv @@ -51,7 +51,7 @@ Convert comma-separated data to a table ``` -Convert comma-separated data to a table, allowing variable number of columns per row +Convert comma-separated data to a table, allowing variable number of columns per row. ```nu > "ColA,ColB 1,2 @@ -67,37 +67,37 @@ Convert comma-separated data to a table, allowing variable number of columns per ``` -Convert comma-separated data to a table, ignoring headers +Convert comma-separated data to a table, ignoring headers. ```nu > open data.txt | from csv --noheaders ``` -Convert semicolon-separated data to a table +Convert semicolon-separated data to a table. ```nu > open data.txt | from csv --separator ';' ``` -Convert comma-separated data to a table, ignoring lines starting with '#' +Convert comma-separated data to a table, ignoring lines starting with '#'. ```nu > open data.txt | from csv --comment '#' ``` -Convert comma-separated data to a table, dropping all possible whitespaces around header names and field values +Convert comma-separated data to a table, dropping all possible whitespaces around header names and field values. ```nu > open data.txt | from csv --trim all ``` -Convert comma-separated data to a table, dropping all possible whitespaces around header names +Convert comma-separated data to a table, dropping all possible whitespaces around header names. ```nu > open data.txt | from csv --trim headers ``` -Convert comma-separated data to a table, dropping all possible whitespaces around field values +Convert comma-separated data to a table, dropping all possible whitespaces around field values. ```nu > open data.txt | from csv --trim fields diff --git a/commands/docs/from_eml.md b/commands/docs/from_eml.md index b35d54fe06f..4d18baff378 100644 --- a/commands/docs/from_eml.md +++ b/commands/docs/from_eml.md @@ -2,7 +2,7 @@ title: from eml categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Parse text as .eml and create record. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--preview-body, -b {int}`: How many bytes of the body to preview + - `--preview-body, -b {int}`: How many bytes of the body to preview. ## Input/output types: diff --git a/commands/docs/from_ics.md b/commands/docs/from_ics.md index 247954bb0de..eaf57b1f4d1 100644 --- a/commands/docs/from_ics.md +++ b/commands/docs/from_ics.md @@ -2,7 +2,7 @@ title: from ics categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Parse text as .ics and create table. usage: | diff --git a/commands/docs/from_ini.md b/commands/docs/from_ini.md index 9731da67628..bbae63eda0c 100644 --- a/commands/docs/from_ini.md +++ b/commands/docs/from_ini.md @@ -2,7 +2,7 @@ title: from ini categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Parse text as .ini and create table. usage: | @@ -20,6 +20,13 @@ contributors: false ```> from ini {flags} ``` +## Flags + + - `--no-quote, -q`: Disable quote handling for values. + - `--no-escape, -e`: Disable escape sequence handling for values. + - `--indented-multiline-value, -m`: Allow values to continue on indented lines. + - `--preserve-key-leading-whitespace, -w`: Preserve leading whitespace in keys. + ## Input/output types: @@ -40,3 +47,49 @@ b=2' | from ini │ │ ╰───┴───╯ │ ╰─────┴───────────╯ ``` + +Disable escaping to keep backslashes literal +```nu +> '[start] +file=C:\Windows\System32\xcopy.exe' | from ini --no-escape +╭───────┬──────────────────────────────────────────╮ +│ │ ╭──────┬───────────────────────────────╮ │ +│ start │ │ file │ C:\Windows\System32\xcopy.exe │ │ +│ │ ╰──────┴───────────────────────────────╯ │ +╰───────┴──────────────────────────────────────────╯ +``` + +Disable quote handling to keep quote characters +```nu +> '[foo] +bar="quoted"' | from ini --no-quote +╭─────┬────────────────────╮ +│ │ ╭─────┬──────────╮ │ +│ foo │ │ bar │ "quoted" │ │ +│ │ ╰─────┴──────────╯ │ +╰─────┴────────────────────╯ +``` + +Allow values to continue on indented lines +```nu +> '[foo] +bar=line one + line two' | from ini --indented-multiline-value +╭─────┬────────────────────╮ +│ │ ╭─────┬──────────╮ │ +│ foo │ │ bar │ line one │ │ +│ │ │ │ line two │ │ +│ │ ╰─────┴──────────╯ │ +╰─────┴────────────────────╯ +``` + +Preserve leading whitespace in keys +```nu +> '[foo] + key=value' | from ini --preserve-key-leading-whitespace +╭─────┬───────────────────╮ +│ │ ╭───────┬───────╮ │ +│ foo │ │ key │ value │ │ +│ │ ╰───────┴───────╯ │ +╰─────┴───────────────────╯ +``` diff --git a/commands/docs/from_json.md b/commands/docs/from_json.md index cb7550ddcad..a9eb4649a77 100644 --- a/commands/docs/from_json.md +++ b/commands/docs/from_json.md @@ -2,11 +2,11 @@ title: from json categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | - Convert from json to structured data. + Convert JSON text into structured data. usage: | - Convert from json to structured data. + Convert JSON text into structured data. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `from json` for [formats](/commands/categories/formats.md) -
Convert from json to structured data.
+
Convert JSON text into structured data.
## Signature @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--objects, -o`: treat each line as a separate value - - `--strict, -s`: follow the json specification exactly + - `--objects, -o`: Treat each line as a separate value. + - `--strict, -s`: Follow the json specification exactly. ## Input/output types: @@ -33,7 +33,7 @@ contributors: false | string | any | ## Examples -Converts json formatted string to table +Converts json formatted string to table. ```nu > '{ "a": 1 }' | from json ╭───┬───╮ @@ -41,7 +41,7 @@ Converts json formatted string to table ╰───┴───╯ ``` -Converts json formatted string to table +Converts json formatted string to table. ```nu > '{ "a": 1, "b": [1, 2] }' | from json ╭───┬───────────╮ @@ -53,7 +53,7 @@ Converts json formatted string to table ╰───┴───────────╯ ``` -Parse json strictly which will error on comments and trailing commas +Parse json strictly which will error on comments and trailing commas. ```nu > '{ "a": 1, "b": 2 }' | from json -s ╭───┬───╮ @@ -62,7 +62,7 @@ Parse json strictly which will error on comments and trailing commas ╰───┴───╯ ``` -Parse a stream of line-delimited JSON values +Parse a stream of line-delimited JSON values. ```nu > '{ "a": 1 } { "b": 2 }' | from json --objects diff --git a/commands/docs/from_msgpack.md b/commands/docs/from_msgpack.md index d80653cb285..3b5317c266a 100644 --- a/commands/docs/from_msgpack.md +++ b/commands/docs/from_msgpack.md @@ -2,7 +2,7 @@ title: from msgpack categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Convert MessagePack data into Nu values. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--objects`: Read multiple objects from input + - `--objects`: Read multiple objects from input. ## Input/output types: @@ -32,7 +32,7 @@ contributors: false | binary | any | ## Examples -Read a list of values from MessagePack +Read a list of values from MessagePack. ```nu > 0x[93A3666F6F2AC2] | from msgpack ╭───┬───────╮ @@ -43,7 +43,7 @@ Read a list of values from MessagePack ``` -Read a stream of multiple values from MessagePack +Read a stream of multiple values from MessagePack. ```nu > 0x[81A76E757368656C6CA5726F636B73A9736572696F75736C79] | from msgpack --objects ╭───┬─────────────────────╮ @@ -55,7 +55,7 @@ Read a stream of multiple values from MessagePack ``` -Read a table from MessagePack +Read a table from MessagePack. ```nu > 0x[9282AA6576656E745F6E616D65B141706F6C6C6F203131204C616E64696E67A474696D65C70CFF00000000FFFFFFFFFF2CAB5B82AA6576656E745F6E616D65B44E757368656C6C20666972737420636F6D6D6974A474696D65D6FF5CD5ADE0] | from msgpack ╭───┬──────────────────────┬──────────────╮ diff --git a/commands/docs/from_msgpackz.md b/commands/docs/from_msgpackz.md index b61ab3b3d90..632784176b8 100644 --- a/commands/docs/from_msgpackz.md +++ b/commands/docs/from_msgpackz.md @@ -2,7 +2,7 @@ title: from msgpackz categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Convert brotli-compressed MessagePack data into Nu values. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--objects`: Read multiple objects from input + - `--objects`: Read multiple objects from input. ## Input/output types: diff --git a/commands/docs/from_nuon.md b/commands/docs/from_nuon.md index 2ce8c6dc96e..14227f93fa9 100644 --- a/commands/docs/from_nuon.md +++ b/commands/docs/from_nuon.md @@ -2,7 +2,7 @@ title: from nuon categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Convert from nuon to structured data. usage: | @@ -28,7 +28,7 @@ contributors: false | string | any | ## Examples -Converts nuon formatted string to table +Converts nuon formatted string to table. ```nu > '{ a:1 }' | from nuon ╭───┬───╮ @@ -36,7 +36,7 @@ Converts nuon formatted string to table ╰───┴───╯ ``` -Converts nuon formatted string to table +Converts nuon formatted string to table. ```nu > '{ a:1, b: [1, 2] }' | from nuon ╭───┬───────────╮ @@ -48,7 +48,7 @@ Converts nuon formatted string to table ╰───┴───────────╯ ``` -Converts raw nuon formatted string to table +Converts raw nuon formatted string to table. ```nu > '{a:1,b:[1,2]}' | from nuon ╭───┬───────────╮ diff --git a/commands/docs/from_ods.md b/commands/docs/from_ods.md index de83eaac8d7..e3fb2665ac4 100644 --- a/commands/docs/from_ods.md +++ b/commands/docs/from_ods.md @@ -2,7 +2,7 @@ title: from ods categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Parse OpenDocument Spreadsheet(.ods) data and create table. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--sheets, -s {list}`: Only convert specified sheets + - `--sheets, -s {list}`: Only convert specified sheets. ## Input/output types: @@ -32,13 +32,13 @@ contributors: false | string | table | ## Examples -Convert binary .ods data to a table +Convert binary .ods data to a table. ```nu > open --raw test.ods | from ods ``` -Convert binary .ods data to a table, specifying the tables +Convert binary .ods data to a table, specifying the tables. ```nu > open --raw test.ods | from ods --sheets [Spreadsheet1] diff --git a/commands/docs/from_plist.md b/commands/docs/from_plist.md index 7a939c5ad2a..81b1fe81122 100644 --- a/commands/docs/from_plist.md +++ b/commands/docs/from_plist.md @@ -2,7 +2,7 @@ title: from plist categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Convert plist to Nushell values usage: | diff --git a/commands/docs/from_ssv.md b/commands/docs/from_ssv.md index e6e23b7ddde..1c8662e9d12 100644 --- a/commands/docs/from_ssv.md +++ b/commands/docs/from_ssv.md @@ -2,7 +2,7 @@ title: from ssv categories: | formats -version: 0.110.0 +version: 0.111.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: | @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--noheaders, -n`: don't treat the first row as column names - - `--aligned-columns, -a`: assume columns are aligned - - `--minimum-spaces, -m {int}`: the minimum spaces to separate columns + - `--noheaders, -n`: Don't treat the first row as column names. + - `--aligned-columns, -a`: Assume columns are aligned. + - `--minimum-spaces, -m {int}`: The minimum spaces to separate columns. ## Input/output types: @@ -34,7 +34,7 @@ contributors: false | string | table | ## Examples -Converts ssv formatted string to table +Converts ssv formatted string to table. ```nu > 'FOO BAR 1 2' | from ssv @@ -46,7 +46,7 @@ Converts ssv formatted string to table ``` -Converts ssv formatted string to table but not treating the first row as column names +Converts ssv formatted string to table but not treating the first row as column names. ```nu > 'FOO BAR 1 2' | from ssv --noheaders diff --git a/commands/docs/from_toml.md b/commands/docs/from_toml.md index 72d67ecff34..31ef8fa1911 100644 --- a/commands/docs/from_toml.md +++ b/commands/docs/from_toml.md @@ -2,7 +2,7 @@ title: from toml categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Parse text as .toml and create record. usage: | @@ -28,7 +28,7 @@ contributors: false | string | record | ## Examples -Converts toml formatted string to record +Converts toml formatted string to record. ```nu > 'a = 1' | from toml ╭───┬───╮ @@ -36,7 +36,7 @@ Converts toml formatted string to record ╰───┴───╯ ``` -Converts toml formatted string to record +Converts toml formatted string to record. ```nu > 'a = 1 b = [1, 2]' | from toml diff --git a/commands/docs/from_tsv.md b/commands/docs/from_tsv.md index c26892fa2da..1e786399f68 100644 --- a/commands/docs/from_tsv.md +++ b/commands/docs/from_tsv.md @@ -2,7 +2,7 @@ title: from tsv categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Parse text as .tsv and create table. usage: | @@ -22,13 +22,13 @@ contributors: false ## Flags - - `--comment, -c {string}`: a comment character to ignore lines starting with it - - `--quote, -q {string}`: a quote character to ignore separators in strings, defaults to '"' - - `--escape, -e {string}`: an escape character for strings containing the quote character - - `--noheaders, -n`: don't treat the first row as column names - - `--flexible`: allow the number of fields in records to be variable - - `--no-infer`: no field type inferencing - - `--trim, -t {string}`: drop leading and trailing whitespaces around headers names and/or field values + - `--comment, -c {string}`: A comment character to ignore lines starting with it. + - `--quote, -q {string}`: A quote character to ignore separators in strings, defaults to '"'. + - `--escape, -e {string}`: An escape character for strings containing the quote character. + - `--noheaders, -n`: Don't treat the first row as column names. + - `--flexible`: Allow the number of fields in records to be variable. + - `--no-infer`: No field type inferencing. + - `--trim, -t {string}`: Drop leading and trailing whitespaces around headers names and/or field values. ## Input/output types: @@ -38,7 +38,7 @@ contributors: false | string | table | ## Examples -Convert tab-separated data to a table +Convert tab-separated data to a table. ```nu > "ColA ColB 1 2" | from tsv @@ -50,7 +50,7 @@ Convert tab-separated data to a table ``` -Convert comma-separated data to a table, allowing variable number of columns per row and ignoring headers +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 @@ -63,31 +63,31 @@ value 2 description 2" | from tsv --flexible --noheaders ``` -Create a tsv file with header columns and open it +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 ``` -Create a tsv file without header columns and open it +Create a tsv file without header columns and open it. ```nu > $'a1(char tab)b1(char tab)c1(char nl)a2(char tab)b2(char tab)c2' | save tsv-data | open tsv-data | from tsv --noheaders ``` -Create a tsv file without header columns and open it, removing all unnecessary whitespaces +Create a tsv file without header columns and open it, removing all unnecessary whitespaces. ```nu > $'a1(char tab)b1(char tab)c1(char nl)a2(char tab)b2(char tab)c2' | save tsv-data | open tsv-data | from tsv --trim all ``` -Create a tsv file without header columns and open it, removing all unnecessary whitespaces in the header names +Create a tsv file without header columns and open it, removing all unnecessary whitespaces in the header names. ```nu > $'a1(char tab)b1(char tab)c1(char nl)a2(char tab)b2(char tab)c2' | save tsv-data | open tsv-data | from tsv --trim headers ``` -Create a tsv file without header columns and open it, removing all unnecessary whitespaces in the field values +Create a tsv file without header columns and open it, removing all unnecessary whitespaces in the field values. ```nu > $'a1(char tab)b1(char tab)c1(char nl)a2(char tab)b2(char tab)c2' | save tsv-data | open tsv-data | from tsv --trim fields diff --git a/commands/docs/from_url.md b/commands/docs/from_url.md index b9767b36e52..005c1f2f72a 100644 --- a/commands/docs/from_url.md +++ b/commands/docs/from_url.md @@ -2,7 +2,7 @@ title: from url categories: | formats -version: 0.110.0 +version: 0.111.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 e37794708b8..a752b508d26 100644 --- a/commands/docs/from_vcf.md +++ b/commands/docs/from_vcf.md @@ -2,7 +2,7 @@ title: from vcf categories: | formats -version: 0.110.0 +version: 0.111.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 d62fa7a6ca8..3a7ed2375fc 100644 --- a/commands/docs/from_xlsx.md +++ b/commands/docs/from_xlsx.md @@ -2,7 +2,7 @@ title: from xlsx categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Parse binary Excel(.xlsx) data and create table. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--sheets, -s {list}`: Only convert specified sheets + - `--sheets, -s {list}`: Only convert specified sheets. ## Input/output types: @@ -32,13 +32,13 @@ contributors: false | binary | table | ## Examples -Convert binary .xlsx data to a table +Convert binary .xlsx data to a table. ```nu > open --raw test.xlsx | from xlsx ``` -Convert binary .xlsx data to a table, specifying the tables +Convert binary .xlsx data to a table, specifying the tables. ```nu > open --raw test.xlsx | from xlsx --sheets [Spreadsheet1] diff --git a/commands/docs/from_xml.md b/commands/docs/from_xml.md index cfefb25874e..17fcd7f01cb 100644 --- a/commands/docs/from_xml.md +++ b/commands/docs/from_xml.md @@ -2,7 +2,7 @@ title: from xml categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Parse text as .xml and create record. usage: | @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--keep-comments`: add comment nodes to result - - `--allow-dtd`: allow parsing documents with DTDs (may result in exponential entity expansion) - - `--keep-pi`: add processing instruction nodes to result + - `--keep-comments`: Add comment nodes to result. + - `--allow-dtd`: Allow parsing documents with DTDs (may result in exponential entity expansion). + - `--keep-pi`: Add processing instruction nodes to result. ## Input/output types: @@ -34,7 +34,7 @@ contributors: false | string | record | ## Examples -Converts xml formatted string to record +Converts xml formatted string to record. ```nu > ' diff --git a/commands/docs/from_yaml.md b/commands/docs/from_yaml.md index 6a8ea9da6e8..88ad91afea5 100644 --- a/commands/docs/from_yaml.md +++ b/commands/docs/from_yaml.md @@ -2,7 +2,7 @@ title: from yaml categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Parse text as .yaml/.yml and create table. usage: | @@ -28,7 +28,7 @@ contributors: false | string | any | ## Examples -Converts yaml formatted string to table +Converts yaml formatted string to table. ```nu > 'a: 1' | from yaml ╭───┬───╮ @@ -36,7 +36,7 @@ Converts yaml formatted string to table ╰───┴───╯ ``` -Converts yaml formatted string to table +Converts yaml formatted string to table. ```nu > '[ a: 1, b: [1, 2] ]' | from yaml ╭───┬────┬───────────╮ diff --git a/commands/docs/from_yml.md b/commands/docs/from_yml.md index e302b22360c..15f1ec37ea0 100644 --- a/commands/docs/from_yml.md +++ b/commands/docs/from_yml.md @@ -2,7 +2,7 @@ title: from yml categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Parse text as .yaml/.yml and create table. usage: | @@ -28,7 +28,7 @@ contributors: false | string | any | ## Examples -Converts yaml formatted string to table +Converts yaml formatted string to table. ```nu > 'a: 1' | from yaml ╭───┬───╮ @@ -36,7 +36,7 @@ Converts yaml formatted string to table ╰───┴───╯ ``` -Converts yaml formatted string to table +Converts yaml formatted string to table. ```nu > '[ a: 1, b: [1, 2] ]' | from yaml ╭───┬────┬───────────╮ diff --git a/commands/docs/generate.md b/commands/docs/generate.md index 2b242c4e3a3..57a54cf689d 100644 --- a/commands/docs/generate.md +++ b/commands/docs/generate.md @@ -2,7 +2,7 @@ title: generate categories: | generators -version: 0.110.0 +version: 0.111.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 a369d9590f4..d7495b3a627 100644 --- a/commands/docs/get.md +++ b/commands/docs/get.md @@ -2,7 +2,7 @@ title: get categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Extract data using a cell path. usage: | @@ -22,10 +22,10 @@ contributors: false ## Flags - - `--optional, -o`: make all cell path members optional (returns `null` for missing values) - - `--ignore-case`: make all cell path members case insensitive - - `--ignore-errors, -i`: ignore missing data (make all cell path members optional) (deprecated) - - `--sensitive, -s`: get path in a case sensitive manner (deprecated) + - `--optional, -o`: Make all cell path members optional (returns `null` for missing values). + - `--ignore-case`: Make all cell path members case insensitive. + - `--ignore-errors, -i`: Ignore missing data (make all cell path members optional) (deprecated). + - `--sensitive, -s`: Get path in a case sensitive manner (deprecated). ## Parameters @@ -43,13 +43,13 @@ contributors: false | nothing | nothing | ## Examples -Get an item from a list +Get an item from a list. ```nu > [0 1 2] | get 1 1 ``` -Get a column from a table +Get a column from a table. ```nu > [{A: A0}] | get A ╭───┬────╮ @@ -58,7 +58,7 @@ Get a column from a table ``` -Get a column from a table where some rows don't have that column, using optional cell-path syntax +Get a column from a table where some rows don't have that column, using optional cell-path syntax. ```nu > [{A: A0, B: B0}, {B: B1}, {A: A2, B: B2}] | get A? ╭───┬────╮ @@ -69,7 +69,7 @@ Get a column from a table where some rows don't have that column, using optional ``` -Get a column from a table where some rows don't have that column, using the optional flag +Get a column from a table where some rows don't have that column, using the optional flag. ```nu > [{A: A0, B: B0}, {B: B1}, {A: A2, B: B2}] | get -o A ╭───┬────╮ @@ -80,37 +80,37 @@ Get a column from a table where some rows don't have that column, using the opti ``` -Get a cell from a table +Get a cell from a table. ```nu > [{A: A0}] | get 0.A A0 ``` -Extract the name of the 3rd record in a list (same as `ls | $in.name.2`) +Extract the name of the 3rd record in a list (same as `ls | $in.name.2`). ```nu > ls | get name.2 ``` -Extract the name of the 3rd record in a list +Extract the name of the 3rd record in a list. ```nu > ls | get 2.name ``` -Getting environment variables in a case insensitive way, using case insensitive cell-path syntax +Getting environment variables in a case insensitive way, using case insensitive cell-path syntax. ```nu > $env | get home! path! ``` -Getting environment variables in a case insensitive way, using the '--ignore-case' flag +Getting environment variables in a case insensitive way, using the '--ignore-case' flag. ```nu > $env | get --ignore-case home path ``` -Getting Path in a case sensitive way, won't work for 'PATH' +Getting Path in a case sensitive way, won't work for 'PATH'. ```nu > $env | get Path diff --git a/commands/docs/glob.md b/commands/docs/glob.md index dc6e4781b09..a1c4ccb1c99 100644 --- a/commands/docs/glob.md +++ b/commands/docs/glob.md @@ -2,7 +2,7 @@ title: glob categories: | filesystem -version: 0.110.0 +version: 0.111.0 filesystem: | Creates a list of files and/or folders based on the glob pattern provided. usage: | @@ -22,11 +22,11 @@ contributors: false ## Flags - - `--depth, -d {int}`: directory depth to search - - `--no-dir, -D`: Whether to filter out directories from the returned paths - - `--no-file, -F`: Whether to filter out files from the returned paths - - `--no-symlink, -S`: Whether to filter out symlinks from the returned paths - - `--follow-symlinks, -l`: Whether to follow symbolic links to their targets + - `--depth, -d {int}`: Directory depth to search. + - `--no-dir, -D`: Whether to filter out directories from the returned paths. + - `--no-file, -F`: Whether to filter out files from the returned paths. + - `--no-symlink, -S`: Whether to filter out symlinks from the returned paths. + - `--follow-symlinks, -l`: Whether to follow symbolic links to their targets. - `--exclude, -e {list}`: Patterns to exclude from the search: `glob` will not walk the inside of directories matching the excluded patterns. ## Parameters @@ -41,73 +41,73 @@ contributors: false | nothing | list<string> | ## Examples -Search for *.rs files +Search for *.rs files. ```nu > glob *.rs ``` -Search for *.rs and *.toml files recursively up to 2 folders deep +Search for *.rs and *.toml files recursively up to 2 folders deep. ```nu > glob **/*.{rs,toml} --depth 2 ``` -Search for files and folders that begin with uppercase C or lowercase c +Search for files and folders that begin with uppercase C or lowercase c. ```nu > glob "[Cc]*" ``` -Search for files and folders like abc or xyz substituting a character for ? +Search for files and folders like abc or xyz substituting a character for ?. ```nu > glob "{a?c,x?z}" ``` -A case-insensitive search for files and folders that begin with c +A case-insensitive search for files and folders that begin with c. ```nu > glob "(?i)c*" ``` -Search for files or folders that do not begin with c, C, b, M, or s +Search for files or folders that do not begin with c, C, b, M, or s. ```nu > glob "[!cCbMs]*" ``` -Search for files or folders with 3 a's in a row in the name +Search for files or folders with 3 a's in a row in the name. ```nu > glob ``` -Search for files or folders with only a, b, c, or d in the file name between 1 and 10 times +Search for files or folders with only a, b, c, or d in the file name between 1 and 10 times. ```nu > glob <[a-d]:1,10> ``` -Search for folders that begin with an uppercase ASCII letter, ignoring files and symlinks +Search for folders that begin with an uppercase ASCII letter, ignoring files and symlinks. ```nu > glob "[A-Z]*" --no-file --no-symlink ``` -Search for files named tsconfig.json that are not in node_modules directories +Search for files named tsconfig.json that are not in node_modules directories. ```nu > glob **/tsconfig.json --exclude [**/node_modules/**] ``` -Search for all files that are not in the target nor .git directories +Search for all files that are not in the target nor .git directories. ```nu > glob **/* --exclude [**/target/** **/.git/** */] ``` -Search for files following symbolic links to their targets +Search for files following symbolic links to their targets. ```nu > glob "**/*.txt" --follow-symlinks diff --git a/commands/docs/grid.md b/commands/docs/grid.md index b7e077df80a..ef4012d1af4 100644 --- a/commands/docs/grid.md +++ b/commands/docs/grid.md @@ -2,7 +2,7 @@ title: grid categories: | viewers -version: 0.110.0 +version: 0.111.0 viewers: | Renders the output to a textual terminal grid. usage: | @@ -22,10 +22,10 @@ contributors: false ## Flags - - `--width, -w {int}`: number of terminal columns wide (not output columns) - - `--color, -c`: draw output with color - - `--icons, -i`: draw output with icons (assumes nerd font is used) - - `--separator, -s {string}`: character to separate grid with + - `--width, -w {int}`: Number of terminal columns wide (not output columns). + - `--color, -c`: Draw output with color. + - `--icons, -i`: Draw output with icons (assumes nerd font is used). + - `--separator, -s {string}`: Character to separate grid with. ## Input/output types: diff --git a/commands/docs/group-by.md b/commands/docs/group-by.md index 7986bbf6233..516bd43c11f 100644 --- a/commands/docs/group-by.md +++ b/commands/docs/group-by.md @@ -2,7 +2,7 @@ title: group-by categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Splits a list or table into groups, and returns a record containing those groups. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--to-table`: Return a table with "groups" and "items" columns + - `--to-table`: Return a table with "groups" and "items" columns. ## Parameters @@ -36,19 +36,19 @@ contributors: false | list<any> | any | ## Examples -Group items by the "type" column's values +Group items by the "type" column's values. ```nu > ls | group-by type ``` -Group items by the "foo" column's values, ignoring records without a "foo" column +Group items by the "foo" column's values, ignoring records without a "foo" column. ```nu > open cool.json | group-by foo? ``` -Group using a block which is evaluated against each input value +Group using a block which is evaluated against each input value. ```nu > [foo.txt bar.csv baz.txt] | group-by { path parse | get extension } ╭─────┬─────────────────╮ @@ -62,7 +62,7 @@ Group using a block which is evaluated against each input value ╰─────┴─────────────────╯ ``` -You can also group by raw values by leaving out the argument +You can also group by raw values by leaving out the argument. ```nu > ['1' '3' '1' '3' '2' '1' '1'] | group-by ╭───┬───────────╮ @@ -82,7 +82,7 @@ You can also group by raw values by leaving out the argument ╰───┴───────────╯ ``` -You can also output a table instead of a record +You can also output a table instead of a record. ```nu > ['1' '3' '1' '3' '2' '1' '1'] | group-by --to-table ╭───┬───────┬───────────╮ @@ -105,7 +105,7 @@ You can also output a table instead of a record ``` -Group bools, whether they are strings or actual bools +Group bools, whether they are strings or actual bools. ```nu > [true "true" false "false"] | group-by ╭───────┬───────────────╮ @@ -120,7 +120,7 @@ Group bools, whether they are strings or actual bools ╰───────┴───────────────╯ ``` -Group items by multiple columns' values +Group items by multiple columns' values. ```nu > [ [name, lang, year]; @@ -152,7 +152,7 @@ Group items by multiple columns' values ╰────┴─────────────────────────────────────────╯ ``` -Group items by multiple columns' values +Group items by multiple columns' values. ```nu > [ [name, lang, year]; @@ -183,7 +183,7 @@ Group items by multiple columns' values ``` -Group items by column and delete the original +Group items by column and delete the original. ```nu > [ [name, lang, year]; diff --git a/commands/docs/gstat.md b/commands/docs/gstat.md index fb023dca29d..ca836be0942 100644 --- a/commands/docs/gstat.md +++ b/commands/docs/gstat.md @@ -2,7 +2,7 @@ title: gstat categories: | prompt -version: 0.110.0 +version: 0.111.0 prompt: | Get the git status of a repo usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--no-tag`: Disable git tag resolving + - `--no-tag`: Disable git tag resolving. ## Parameters - - `path`: path to repo + - `path`: Path to repo. diff --git a/commands/docs/hash.md b/commands/docs/hash.md index eb0fa37f86c..feb4f497fb8 100644 --- a/commands/docs/hash.md +++ b/commands/docs/hash.md @@ -2,7 +2,7 @@ title: hash categories: | hash -version: 0.110.0 +version: 0.111.0 hash: | Apply hash function. usage: | diff --git a/commands/docs/hash_md5.md b/commands/docs/hash_md5.md index cadf9293ab3..8db94099cbe 100644 --- a/commands/docs/hash_md5.md +++ b/commands/docs/hash_md5.md @@ -2,7 +2,7 @@ title: hash md5 categories: | hash -version: 0.110.0 +version: 0.111.0 hash: | Hash a value using the md5 hash algorithm. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--binary, -b`: Output binary instead of hexadecimal representation + - `--binary, -b`: Output binary instead of hexadecimal representation. ## Parameters diff --git a/commands/docs/hash_sha256.md b/commands/docs/hash_sha256.md index 634572023d9..e8269e01c5c 100644 --- a/commands/docs/hash_sha256.md +++ b/commands/docs/hash_sha256.md @@ -2,7 +2,7 @@ title: hash sha256 categories: | hash -version: 0.110.0 +version: 0.111.0 hash: | Hash a value using the sha256 hash algorithm. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--binary, -b`: Output binary instead of hexadecimal representation + - `--binary, -b`: Output binary instead of hexadecimal representation. ## Parameters diff --git a/commands/docs/headers.md b/commands/docs/headers.md index 115798b418c..5c5a74e0cd0 100644 --- a/commands/docs/headers.md +++ b/commands/docs/headers.md @@ -2,7 +2,7 @@ title: headers categories: | filters -version: 0.110.0 +version: 0.111.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 da7180b9cba..0b1a35d85ee 100644 --- a/commands/docs/help.md +++ b/commands/docs/help.md @@ -2,7 +2,7 @@ title: help categories: | core -version: 0.110.0 +version: 0.111.0 core: | Display help information about different parts of Nushell. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--find, -f {string}`: string to find in command names, descriptions, and search terms + - `--find, -f {string}`: String to find in command names, descriptions, and search terms. ## Parameters @@ -36,19 +36,19 @@ contributors: false | nothing | any | ## Examples -show help for single command, alias, or module +show help for single command, alias, or module. ```nu > help match ``` -show help for single sub-command, alias, or module +show help for single sub-command, alias, or module. ```nu > help str join ``` -search for string in command names, descriptions, and search terms +search for string in command names, descriptions, and search terms. ```nu > help --find char diff --git a/commands/docs/help_aliases.md b/commands/docs/help_aliases.md index ab51cd350df..af829d980ec 100644 --- a/commands/docs/help_aliases.md +++ b/commands/docs/help_aliases.md @@ -2,7 +2,7 @@ title: help aliases categories: | core -version: 0.110.0 +version: 0.111.0 core: | Show help on nushell aliases. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--find, -f {string}`: string to find in alias names and descriptions + - `--find, -f {string}`: String to find in alias names and descriptions. ## Parameters @@ -36,19 +36,19 @@ contributors: false | nothing | table | ## Examples -show all aliases +Show all aliases. ```nu > help aliases ``` -show help for single alias +Show help for single alias. ```nu > help aliases my-alias ``` -search for string in alias names and descriptions +Search for string in alias names and descriptions. ```nu > help aliases --find my-alias diff --git a/commands/docs/help_commands.md b/commands/docs/help_commands.md index 4260aeeac11..69cd64d8530 100644 --- a/commands/docs/help_commands.md +++ b/commands/docs/help_commands.md @@ -2,7 +2,7 @@ title: help commands categories: | core -version: 0.110.0 +version: 0.111.0 core: | Show help on nushell commands. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--find, -f {string}`: string to find in command names, descriptions, and search terms + - `--find, -f {string}`: String to find in command names, descriptions, and search terms. ## Parameters diff --git a/commands/docs/help_escapes.md b/commands/docs/help_escapes.md index 6ff156c83ad..4f7a15e38ed 100644 --- a/commands/docs/help_escapes.md +++ b/commands/docs/help_escapes.md @@ -2,7 +2,7 @@ title: help escapes categories: | core -version: 0.110.0 +version: 0.111.0 core: | Show help on nushell string escapes. usage: | diff --git a/commands/docs/help_externs.md b/commands/docs/help_externs.md index 128cba78341..5e5695aaf6f 100644 --- a/commands/docs/help_externs.md +++ b/commands/docs/help_externs.md @@ -2,7 +2,7 @@ title: help externs categories: | core -version: 0.110.0 +version: 0.111.0 core: | Show help on nushell externs. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--find, -f {string}`: string to find in extern names and descriptions + - `--find, -f {string}`: String to find in extern names and descriptions. ## Parameters @@ -36,19 +36,19 @@ contributors: false | nothing | table | ## Examples -show all externs +Show all externs. ```nu > help externs ``` -show help for single extern +Show help for single extern. ```nu > help externs smth ``` -search for string in extern names and descriptions +Search for string in extern names and descriptions. ```nu > help externs --find smth diff --git a/commands/docs/help_modules.md b/commands/docs/help_modules.md index 530e85cbb50..384537a71df 100644 --- a/commands/docs/help_modules.md +++ b/commands/docs/help_modules.md @@ -2,7 +2,7 @@ title: help modules categories: | core -version: 0.110.0 +version: 0.111.0 core: | Show help on nushell modules. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--find, -f {string}`: string to find in module names and descriptions + - `--find, -f {string}`: String to find in module names and descriptions. ## Parameters @@ -36,19 +36,19 @@ contributors: false | nothing | table | ## Examples -show all modules +Show all modules. ```nu > help modules ``` -show help for single module +Show help for single module. ```nu > help modules my-module ``` -search for string in module names and descriptions +Search for string in module names and descriptions. ```nu > help modules --find my-module diff --git a/commands/docs/help_operators.md b/commands/docs/help_operators.md index 96fe4341540..9d9ef4a396b 100644 --- a/commands/docs/help_operators.md +++ b/commands/docs/help_operators.md @@ -2,7 +2,7 @@ title: help operators categories: | core -version: 0.110.0 +version: 0.111.0 core: | Show help on nushell operators. usage: | diff --git a/commands/docs/help_pipe-and-redirect.md b/commands/docs/help_pipe-and-redirect.md index 89850e785cf..c1905f783ef 100644 --- a/commands/docs/help_pipe-and-redirect.md +++ b/commands/docs/help_pipe-and-redirect.md @@ -2,7 +2,7 @@ title: help pipe-and-redirect categories: | core -version: 0.110.0 +version: 0.111.0 core: | Show help on nushell pipes and redirects. usage: | diff --git a/commands/docs/hide-env.md b/commands/docs/hide-env.md index 654e98987d6..3a72bec23db 100644 --- a/commands/docs/hide-env.md +++ b/commands/docs/hide-env.md @@ -2,7 +2,7 @@ title: hide-env categories: | core -version: 0.110.0 +version: 0.111.0 core: | Hide environment variables in the current scope. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--ignore-errors, -i`: do not throw an error if an environment variable was not found + - `--ignore-errors, -i`: Do not throw an error if an environment variable was not found. ## Parameters @@ -36,7 +36,7 @@ contributors: false | nothing | nothing | ## Examples -Hide an environment variable +Hide an environment variable. ```nu > $env.HZ_ENV_ABC = 1; hide-env HZ_ENV_ABC; 'HZ_ENV_ABC' in $env false diff --git a/commands/docs/hide.md b/commands/docs/hide.md index 9d1caba48f1..49708cea520 100644 --- a/commands/docs/hide.md +++ b/commands/docs/hide.md @@ -2,7 +2,7 @@ title: hide categories: | core -version: 0.110.0 +version: 0.111.0 core: | Hide definitions in the current scope. usage: | @@ -33,13 +33,13 @@ contributors: false | nothing | nothing | ## Examples -Hide the alias just defined +Hide the alias just defined. ```nu > alias lll = ls -l; hide lll ``` -Hide a custom command +Hide a custom command. ```nu > def say-hi [] { echo 'Hi!' }; hide say-hi diff --git a/commands/docs/histogram.md b/commands/docs/histogram.md index 00bc98785c7..44e61d38143 100644 --- a/commands/docs/histogram.md +++ b/commands/docs/histogram.md @@ -2,7 +2,7 @@ title: histogram categories: | chart -version: 0.110.0 +version: 0.111.0 chart: | Creates a new table with a histogram based on the column name passed in. usage: | diff --git a/commands/docs/history.md b/commands/docs/history.md index afdeaae9637..35d4590a169 100644 --- a/commands/docs/history.md +++ b/commands/docs/history.md @@ -2,7 +2,7 @@ title: history categories: | history -version: 0.110.0 +version: 0.111.0 history: | Get the command history. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--clear, -c`: Clears out the history entries - - `--long, -l`: Show long listing of entries for sqlite history + - `--clear, -c`: Clears out the history entries. + - `--long, -l`: Show long format with timestamps and additional details. ## Input/output types: @@ -45,6 +45,12 @@ Show last 5 commands you have ran ``` +Show last 5 commands with full details +```nu +> history --long | last 5 + +``` + Search all the commands from history that contains 'cargo' ```nu > history | where command =~ cargo | get command diff --git a/commands/docs/history_import.md b/commands/docs/history_import.md index d11c0c38f9e..a5cebd1ae54 100644 --- a/commands/docs/history_import.md +++ b/commands/docs/history_import.md @@ -2,7 +2,7 @@ title: history import categories: | history -version: 0.110.0 +version: 0.111.0 history: | Import command line history. usage: | diff --git a/commands/docs/history_session.md b/commands/docs/history_session.md index 994cff923bd..094ad8fa936 100644 --- a/commands/docs/history_session.md +++ b/commands/docs/history_session.md @@ -2,7 +2,7 @@ title: history session categories: | history -version: 0.110.0 +version: 0.111.0 history: | Get the command history session. usage: | diff --git a/commands/docs/http.md b/commands/docs/http.md index 07564459777..fcd210f939a 100644 --- a/commands/docs/http.md +++ b/commands/docs/http.md @@ -2,7 +2,7 @@ title: http categories: | network -version: 0.110.0 +version: 0.111.0 network: | Various commands for working with http methods. usage: | @@ -22,22 +22,21 @@ contributors: false ## Flags - - `--content-type, -t {any}`: the MIME type of content to post - - `--user, -u {any}`: the username when authenticating - - `--password, -p {any}`: the password when authenticating - - `--max-time, -m {duration}`: max duration before timeout occurs - - `--headers, -H {any}`: custom headers you want to add - - `--raw, -r`: fetch contents as text rather than a table - - `--insecure, -k`: allow insecure server connections when using SSL + - `--content-type, -t {any}`: The MIME type of content to post. + - `--user, -u {any}`: The username when authenticating. + - `--password, -p {any}`: The password when authenticating. + - `--max-time, -m {duration}`: Max duration before timeout occurs. + - `--headers, -H {any}`: Custom headers you want to add. + - `--raw, -r`: Fetch contents as text rather than a table. + - `--insecure, -k`: Allow insecure server connections when using SSL. - `--full, -f`: Returns the record, containing metainformation about the exchange in addition to the response. Returning record fields: - urls: list of url redirects this command had to make to get to the destination - headers.request: list of headers passed when doing the request - headers.response: list of received headers - body: the http body of the response - - status: the http status of the response - - - `--allow-errors, -e`: do not fail if the server returns an error code + - status: the http status of the response. + - `--allow-errors, -e`: Do not fail if the server returns an error code. - `--redirect-mode, -R {string}`: What to do when encountering redirects. Default: 'follow'. Valid options: 'follow' ('f'), 'manual' ('m'), 'error' ('e'). ## Parameters @@ -53,19 +52,19 @@ contributors: false | nothing | any | ## Examples -Get content from example.com with default verb +Get content from example.com with default verb. ```nu > http https://www.example.com ``` -Post content to example.com with default verb +Post content to example.com with default verb. ```nu > http https://www.example.com 'body' ``` -Get content from example.com with explicit verb +Get content from example.com with explicit verb. ```nu > http get https://www.example.com @@ -82,7 +81,7 @@ Without a subcommand but with a URL provided, it performs a GET request by defau | [`http get`](/commands/docs/http_get.md) | Fetch the contents from a URL. | built-in | | [`http head`](/commands/docs/http_head.md) | Get the headers from a URL. | built-in | | [`http options`](/commands/docs/http_options.md) | Requests permitted communication options for a given URL. | built-in | -| [`http patch`](/commands/docs/http_patch.md) | Patch a body to a URL. | built-in | +| [`http patch`](/commands/docs/http_patch.md) | Send a PATCH request to a URL with a request body. | built-in | | [`http pool`](/commands/docs/http_pool.md) | Configure and reset builtin http connection pool. | built-in | -| [`http post`](/commands/docs/http_post.md) | Post a body to a URL. | built-in | -| [`http put`](/commands/docs/http_put.md) | Put a body to a URL. | built-in | \ No newline at end of file +| [`http post`](/commands/docs/http_post.md) | Send a POST request to a URL with a request body. | built-in | +| [`http put`](/commands/docs/http_put.md) | Send a PUT request to a URL with a request body. | built-in | \ No newline at end of file diff --git a/commands/docs/http_delete.md b/commands/docs/http_delete.md index d64cdda8217..50e4df5a3a1 100644 --- a/commands/docs/http_delete.md +++ b/commands/docs/http_delete.md @@ -2,7 +2,7 @@ title: http delete categories: | network -version: 0.110.0 +version: 0.111.0 network: | Delete the specified resource. usage: | @@ -22,19 +22,19 @@ contributors: false ## Flags - - `--user, -u {any}`: the username when authenticating - - `--password, -p {any}`: the password when authenticating - - `--data, -d {any}`: the content to post - - `--content-type, -t {any}`: the MIME type of content to post - - `--max-time, -m {duration}`: max duration before timeout occurs - - `--headers, -H {any}`: custom headers you want to add - - `--raw, -r`: fetch contents as text rather than a table - - `--insecure, -k`: allow insecure server connections when using SSL - - `--full, -f`: returns the full response instead of only the body - - `--allow-errors, -e`: do not fail if the server returns an error code - - `--pool`: using a global pool as a client + - `--user, -u {any}`: The username when authenticating. + - `--password, -p {any}`: The password when authenticating. + - `--data, -d {any}`: The content to post. + - `--content-type, -t {any}`: The MIME type of content to post. + - `--max-time, -m {duration}`: Max duration before timeout occurs. + - `--headers, -H {any}`: Custom headers you want to add. + - `--raw, -r`: Fetch contents as text rather than a table. + - `--insecure, -k`: Allow insecure server connections when using SSL. + - `--full, -f`: Returns the full response instead of only the body. + - `--allow-errors, -e`: Do not fail if the server returns an error code. + - `--pool`: Using a global pool as a client. - `--redirect-mode, -R {string}`: What to do when encountering redirects. Default: 'follow'. Valid options: 'follow' ('f'), 'manual' ('m'), 'error' ('e'). - - `--unix-socket, -U {path}`: Connect to the specified Unix socket instead of using TCP + - `--unix-socket, -U {path}`: Connect to the specified Unix socket instead of using TCP. ## Parameters @@ -48,43 +48,43 @@ contributors: false | any | any | ## Examples -http delete from example.com +HTTP delete from example.com. ```nu > http delete https://www.example.com ``` -http delete from example.com, with username and password +HTTP delete from example.com, with username and password. ```nu > http delete --user myuser --password mypass https://www.example.com ``` -http delete from example.com, with custom header using a record +HTTP delete from example.com, with custom header using a record. ```nu > http delete --headers {my-header-key: my-header-value} https://www.example.com ``` -http delete from example.com, with custom header using a list +HTTP delete from example.com, with custom header using a list. ```nu > http delete --headers [my-header-key-A my-header-value-A my-header-key-B my-header-value-B] https://www.example.com ``` -http delete from example.com, with body +HTTP delete from example.com, with body. ```nu > http delete --data 'body' https://www.example.com ``` -http delete from example.com, with JSON body +HTTP delete from example.com, with JSON body. ```nu > http delete --content-type application/json --data { field: value } https://www.example.com ``` -Perform an HTTP delete with JSON content from a pipeline to example.com +Perform an HTTP delete with JSON content from a pipeline to example.com. ```nu > open foo.json | http delete https://www.example.com diff --git a/commands/docs/http_get.md b/commands/docs/http_get.md index fdf78d4c1b9..20090c76c1f 100644 --- a/commands/docs/http_get.md +++ b/commands/docs/http_get.md @@ -2,7 +2,7 @@ title: http get categories: | network -version: 0.110.0 +version: 0.111.0 network: | Fetch the contents from a URL. usage: | @@ -22,17 +22,17 @@ contributors: false ## Flags - - `--user, -u {any}`: the username when authenticating - - `--password, -p {any}`: the password when authenticating - - `--max-time, -m {duration}`: max duration before timeout occurs - - `--headers, -H {any}`: custom headers you want to add - - `--raw, -r`: fetch contents as text rather than a table - - `--insecure, -k`: allow insecure server connections when using SSL - - `--full, -f`: returns the full response instead of only the body - - `--allow-errors, -e`: do not fail if the server returns an error code - - `--pool`: using a global pool as a client + - `--user, -u {any}`: The username when authenticating. + - `--password, -p {any}`: The password when authenticating. + - `--max-time, -m {duration}`: Max duration before timeout occurs. + - `--headers, -H {any}`: Custom headers you want to add. + - `--raw, -r`: Fetch contents as text rather than a table. + - `--insecure, -k`: Allow insecure server connections when using SSL. + - `--full, -f`: Returns the full response instead of only the body. + - `--allow-errors, -e`: Do not fail if the server returns an error code. + - `--pool`: Using a global pool as a client. - `--redirect-mode, -R {string}`: What to do when encountering redirects. Default: 'follow'. Valid options: 'follow' ('f'), 'manual' ('m'), 'error' ('e'). - - `--unix-socket, -U {path}`: Connect to the specified Unix socket instead of using TCP + - `--unix-socket, -U {path}`: Connect to the specified Unix socket instead of using TCP. ## Parameters @@ -46,43 +46,43 @@ contributors: false | nothing | any | ## Examples -Get content from example.com +Get content from example.com. ```nu > http get https://www.example.com ``` -Get content from example.com, with username and password +Get content from example.com, with username and password. ```nu > http get --user myuser --password mypass https://www.example.com ``` -Get content from example.com, with custom header using a record +Get content from example.com, with custom header using a record. ```nu > http get --headers {my-header-key: my-header-value} https://www.example.com ``` -Get content from example.com, with custom headers using a list +Get content from example.com, with custom headers using a list. ```nu > http get --headers [my-header-key-A my-header-value-A my-header-key-B my-header-value-B] https://www.example.com ``` -Get the response status code +Get the response status code. ```nu > http get https://www.example.com | metadata | get http_response.status ``` -Check response status while streaming +Check response status while streaming. ```nu > http get --allow-errors https://example.com/file | metadata access {|m| if $m.http_response.status != 200 { error make {msg: "failed"} } else { } } | lines ``` -Get from Docker daemon via Unix socket +Get from Docker daemon via Unix socket. ```nu > http get --unix-socket /var/run/docker.sock http://localhost/containers/json diff --git a/commands/docs/http_head.md b/commands/docs/http_head.md index 948d6647e46..4f5d7a7d0e5 100644 --- a/commands/docs/http_head.md +++ b/commands/docs/http_head.md @@ -2,7 +2,7 @@ title: http head categories: | network -version: 0.110.0 +version: 0.111.0 network: | Get the headers from a URL. usage: | @@ -22,14 +22,14 @@ contributors: false ## Flags - - `--user, -u {any}`: the username when authenticating - - `--password, -p {any}`: the password when authenticating - - `--max-time, -m {duration}`: max duration before timeout occurs - - `--headers, -H {any}`: custom headers you want to add - - `--insecure, -k`: allow insecure server connections when using SSL - - `--pool`: using a global pool as a client + - `--user, -u {any}`: The username when authenticating. + - `--password, -p {any}`: The password when authenticating. + - `--max-time, -m {duration}`: Max duration before timeout occurs. + - `--headers, -H {any}`: Custom headers you want to add. + - `--insecure, -k`: Allow insecure server connections when using SSL. + - `--pool`: Using a global pool as a client. - `--redirect-mode, -R {string}`: What to do when encountering redirects. Default: 'follow'. Valid options: 'follow' ('f'), 'manual' ('m'), 'error' ('e'). - - `--unix-socket, -U {path}`: Connect to the specified Unix socket instead of using TCP + - `--unix-socket, -U {path}`: Connect to the specified Unix socket instead of using TCP. ## Parameters @@ -43,25 +43,25 @@ contributors: false | nothing | any | ## Examples -Get headers from example.com +Get headers from example.com. ```nu > http head https://www.example.com ``` -Get headers from example.com, with username and password +Get headers from example.com, with username and password. ```nu > http head --user myuser --password mypass https://www.example.com ``` -Get headers from example.com, with custom header using a record +Get headers from example.com, with custom header using a record. ```nu > http head --headers {my-header-key: my-header-value} https://www.example.com ``` -Get headers from example.com, with custom header using a list +Get headers from example.com, with custom header using a list. ```nu > http head --headers [my-header-key-A my-header-value-A my-header-key-B my-header-value-B] https://www.example.com diff --git a/commands/docs/http_options.md b/commands/docs/http_options.md index 997bdfd40b3..92f57a41b5f 100644 --- a/commands/docs/http_options.md +++ b/commands/docs/http_options.md @@ -2,7 +2,7 @@ title: http options categories: | network -version: 0.110.0 +version: 0.111.0 network: | Requests permitted communication options for a given URL. usage: | @@ -22,14 +22,14 @@ contributors: false ## Flags - - `--user, -u {any}`: the username when authenticating - - `--password, -p {any}`: the password when authenticating - - `--max-time, -m {duration}`: max duration before timeout occurs - - `--headers, -H {any}`: custom headers you want to add - - `--insecure, -k`: allow insecure server connections when using SSL - - `--allow-errors, -e`: do not fail if the server returns an error code - - `--pool`: using a global pool as a client - - `--unix-socket, -U {path}`: Connect to the specified Unix socket instead of using TCP + - `--user, -u {any}`: The username when authenticating. + - `--password, -p {any}`: The password when authenticating. + - `--max-time, -m {duration}`: Max duration before timeout occurs. + - `--headers, -H {any}`: Custom headers you want to add. + - `--insecure, -k`: Allow insecure server connections when using SSL. + - `--allow-errors, -e`: Do not fail if the server returns an error code. + - `--pool`: Using a global pool as a client. + - `--unix-socket, -U {path}`: Connect to the specified Unix socket instead of using TCP. ## Parameters @@ -43,31 +43,31 @@ contributors: false | nothing | any | ## Examples -Get options from example.com +Get options from example.com. ```nu > http options https://www.example.com ``` -Get options from example.com, with username and password +Get options from example.com, with username and password. ```nu > http options --user myuser --password mypass https://www.example.com ``` -Get options from example.com, with custom header using a record +Get options from example.com, with custom header using a record. ```nu > http options --headers {my-header-key: my-header-value} https://www.example.com ``` -Get options from example.com, with custom headers using a list +Get options from example.com, with custom headers using a list. ```nu > http options --headers [my-header-key-A my-header-value-A my-header-key-B my-header-value-B] https://www.example.com ``` -Simulate a browser cross-origin preflight request from www.example.com to media.example.com +Simulate a browser cross-origin preflight request from www.example.com to media.example.com. ```nu > http options https://media.example.com/api/ --headers [Origin https://www.example.com Access-Control-Request-Headers "Content-Type, X-Custom-Header" Access-Control-Request-Method GET] diff --git a/commands/docs/http_patch.md b/commands/docs/http_patch.md index ebdaecd63e3..eed70d0fbee 100644 --- a/commands/docs/http_patch.md +++ b/commands/docs/http_patch.md @@ -2,11 +2,11 @@ title: http patch categories: | network -version: 0.110.0 +version: 0.111.0 network: | - Patch a body to a URL. + Send a PATCH request to a URL with a request body. usage: | - Patch a body to a URL. + Send a PATCH request to a URL with a request body. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `http patch` for [network](/commands/categories/network.md) -
Patch a body to a URL.
+
Send a PATCH request to a URL with a request body.
## Signature @@ -22,18 +22,18 @@ contributors: false ## Flags - - `--user, -u {any}`: the username when authenticating - - `--password, -p {any}`: the password when authenticating - - `--content-type, -t {any}`: the MIME type of content to post - - `--max-time, -m {duration}`: max duration before timeout occurs - - `--headers, -H {any}`: custom headers you want to add - - `--raw, -r`: return values as a string instead of a table - - `--insecure, -k`: allow insecure server connections when using SSL - - `--full, -f`: returns the full response instead of only the body - - `--allow-errors, -e`: do not fail if the server returns an error code - - `--pool`: using a global pool as a client + - `--user, -u {any}`: The username when authenticating. + - `--password, -p {any}`: The password when authenticating. + - `--content-type, -t {any}`: The MIME type of content to post. + - `--max-time, -m {duration}`: Max duration before timeout occurs. + - `--headers, -H {any}`: Custom headers you want to add. + - `--raw, -r`: Return values as a string instead of a table. + - `--insecure, -k`: Allow insecure server connections when using SSL. + - `--full, -f`: Returns the full response instead of only the body. + - `--allow-errors, -e`: Do not fail if the server returns an error code. + - `--pool`: Using a global pool as a client. - `--redirect-mode, -R {string}`: What to do when encountering redirects. Default: 'follow'. Valid options: 'follow' ('f'), 'manual' ('m'), 'error' ('e'). - - `--unix-socket, -U {path}`: Connect to the specified Unix socket instead of using TCP + - `--unix-socket, -U {path}`: Connect to the specified Unix socket instead of using TCP. ## Parameters @@ -48,37 +48,37 @@ contributors: false | any | any | ## Examples -Patch content to example.com +Patch content to example.com. ```nu > http patch https://www.example.com 'body' ``` -Patch content to example.com, with username and password +Patch content to example.com, with username and password. ```nu > http patch --user myuser --password mypass https://www.example.com 'body' ``` -Patch content to example.com, with custom header using a record +Patch content to example.com, with custom header using a record. ```nu > http patch --headers {my-header-key: my-header-value} https://www.example.com ``` -Patch content to example.com, with custom header using a list +Patch content to example.com, with custom header using a list. ```nu > http patch --headers [my-header-key-A my-header-value-A my-header-key-B my-header-value-B] https://www.example.com ``` -Patch content to example.com, with JSON body +Patch content to example.com, with JSON body. ```nu > http patch --content-type application/json https://www.example.com { field: value } ``` -Patch JSON content from a pipeline to example.com +Patch JSON content from a pipeline to example.com. ```nu > open --raw foo.json | http patch https://www.example.com diff --git a/commands/docs/http_pool.md b/commands/docs/http_pool.md index 2faff1f5eca..f8a17943696 100644 --- a/commands/docs/http_pool.md +++ b/commands/docs/http_pool.md @@ -2,7 +2,7 @@ title: http pool categories: | network -version: 0.110.0 +version: 0.111.0 network: | Configure and reset builtin http connection pool. usage: | @@ -22,10 +22,10 @@ contributors: false ## Flags - - `--insecure, -k`: allow insecure server connections when using SSL - - `--allow-errors, -e`: do not fail if the server returns an error code + - `--insecure, -k`: Allow insecure server connections when using SSL. + - `--allow-errors, -e`: Do not fail if the server returns an error code. - `--redirect-mode, -R {string}`: What to do when encountering redirects. Default: 'follow'. Valid options: 'follow' ('f'), 'manual' ('m'), 'error' ('e'). - - `--unix-socket, -U {path}`: Connect to the specified Unix socket instead of using TCP + - `--unix-socket, -U {path}`: Connect to the specified Unix socket instead of using TCP. ## Input/output types: @@ -34,4 +34,4 @@ contributors: false | ------- | ------ | | nothing | any | ## Notes -All connections inside http connection poll will be closed. \ No newline at end of file +All connections inside http connection pool will be closed. \ No newline at end of file diff --git a/commands/docs/http_post.md b/commands/docs/http_post.md index 1242835180d..ed3a8f293ae 100644 --- a/commands/docs/http_post.md +++ b/commands/docs/http_post.md @@ -2,11 +2,11 @@ title: http post categories: | network -version: 0.110.0 +version: 0.111.0 network: | - Post a body to a URL. + Send a POST request to a URL with a request body. usage: | - Post a body to a URL. + Send a POST request to a URL with a request body. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `http post` for [network](/commands/categories/network.md) -
Post a body to a URL.
+
Send a POST request to a URL with a request body.
## Signature @@ -22,18 +22,18 @@ contributors: false ## Flags - - `--user, -u {any}`: the username when authenticating - - `--password, -p {any}`: the password when authenticating - - `--content-type, -t {any}`: the MIME type of content to post - - `--max-time, -m {duration}`: max duration before timeout occurs - - `--headers, -H {any}`: custom headers you want to add - - `--raw, -r`: return values as a string instead of a table - - `--insecure, -k`: allow insecure server connections when using SSL - - `--full, -f`: returns the full response instead of only the body - - `--allow-errors, -e`: do not fail if the server returns an error code - - `--pool`: using a global pool as a client + - `--user, -u {any}`: The username when authenticating. + - `--password, -p {any}`: The password when authenticating. + - `--content-type, -t {any}`: The MIME type of content to post. + - `--max-time, -m {duration}`: Max duration before timeout occurs. + - `--headers, -H {any}`: Custom headers you want to add. + - `--raw, -r`: Return values as a string instead of a table. + - `--insecure, -k`: Allow insecure server connections when using SSL. + - `--full, -f`: Returns the full response instead of only the body. + - `--allow-errors, -e`: Do not fail if the server returns an error code. + - `--pool`: Using a global pool as a client. - `--redirect-mode, -R {string}`: What to do when encountering redirects. Default: 'follow'. Valid options: 'follow' ('f'), 'manual' ('m'), 'error' ('e'). - - `--unix-socket, -U {path}`: Connect to the specified Unix socket instead of using TCP + - `--unix-socket, -U {path}`: Connect to the specified Unix socket instead of using TCP. ## Parameters @@ -48,61 +48,61 @@ contributors: false | any | any | ## Examples -Post content to example.com +Post content to example.com. ```nu > http post https://www.example.com 'body' ``` -Post content to example.com, with username and password +Post content to example.com, with username and password. ```nu > http post --user myuser --password mypass https://www.example.com 'body' ``` -Post content to example.com, with custom header using a record +Post content to example.com, with custom header using a record. ```nu > http post --headers {my-header-key: my-header-value} https://www.example.com ``` -Post content to example.com, with custom header using a list +Post content to example.com, with custom header using a list. ```nu > http post --headers [my-header-key-A my-header-value-A my-header-key-B my-header-value-B] https://www.example.com ``` -Post content to example.com, with JSON body +Post content to example.com, with JSON body. ```nu > http post --content-type application/json https://www.example.com { field: value } ``` -Post JSON content from a pipeline to example.com +Post JSON content from a pipeline to example.com. ```nu > open --raw foo.json | http post https://www.example.com ``` -Upload a binary file to example.com +Upload a binary file to example.com. ```nu > http post --content-type multipart/form-data https://www.example.com { file: (open -r file.mp3) } ``` -Convert a text file into binary and upload it to example.com +Convert a text file into binary and upload it to example.com. ```nu > http post --content-type multipart/form-data https://www.example.com { file: (open -r file.txt | into binary) } ``` -Get the response status code +Get the response status code. ```nu > http post https://www.example.com 'body' | metadata | get http_response.status ``` -Check response status while streaming +Check response status while streaming. ```nu > http post --allow-errors https://example.com/upload 'data' | metadata access {|m| if $m.http_response.status != 200 { error make {msg: "failed"} } else { } } | lines diff --git a/commands/docs/http_put.md b/commands/docs/http_put.md index f422899fbb6..43148f40cf8 100644 --- a/commands/docs/http_put.md +++ b/commands/docs/http_put.md @@ -2,11 +2,11 @@ title: http put categories: | network -version: 0.110.0 +version: 0.111.0 network: | - Put a body to a URL. + Send a PUT request to a URL with a request body. usage: | - Put a body to a URL. + Send a PUT request to a URL with a request body. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `http put` for [network](/commands/categories/network.md) -
Put a body to a URL.
+
Send a PUT request to a URL with a request body.
## Signature @@ -22,18 +22,18 @@ contributors: false ## Flags - - `--user, -u {any}`: the username when authenticating - - `--password, -p {any}`: the password when authenticating - - `--content-type, -t {any}`: the MIME type of content to post - - `--max-time, -m {duration}`: max duration before timeout occurs - - `--headers, -H {any}`: custom headers you want to add - - `--raw, -r`: return values as a string instead of a table - - `--insecure, -k`: allow insecure server connections when using SSL - - `--full, -f`: returns the full response instead of only the body - - `--allow-errors, -e`: do not fail if the server returns an error code - - `--pool`: using a global pool as a client + - `--user, -u {any}`: The username when authenticating. + - `--password, -p {any}`: The password when authenticating. + - `--content-type, -t {any}`: The MIME type of content to post. + - `--max-time, -m {duration}`: Max duration before timeout occurs. + - `--headers, -H {any}`: Custom headers you want to add. + - `--raw, -r`: Return values as a string instead of a table. + - `--insecure, -k`: Allow insecure server connections when using SSL. + - `--full, -f`: Returns the full response instead of only the body. + - `--allow-errors, -e`: Do not fail if the server returns an error code. + - `--pool`: Using a global pool as a client. - `--redirect-mode, -R {string}`: What to do when encountering redirects. Default: 'follow'. Valid options: 'follow' ('f'), 'manual' ('m'), 'error' ('e'). - - `--unix-socket, -U {path}`: Connect to the specified Unix socket instead of using TCP + - `--unix-socket, -U {path}`: Connect to the specified Unix socket instead of using TCP. ## Parameters @@ -48,37 +48,37 @@ contributors: false | any | any | ## Examples -Put content to example.com +Put content to example.com. ```nu > http put https://www.example.com 'body' ``` -Put content to example.com, with username and password +Put content to example.com, with username and password. ```nu > http put --user myuser --password mypass https://www.example.com 'body' ``` -Put content to example.com, with custom header using a record +Put content to example.com, with custom header using a record. ```nu > http put --headers {my-header-key: my-header-value} https://www.example.com ``` -Put content to example.com, with custom header using a list +Put content to example.com, with custom header using a list. ```nu > http put --headers [my-header-key-A my-header-value-A my-header-key-B my-header-value-B] https://www.example.com ``` -Put content to example.com, with JSON body +Put content to example.com, with JSON body. ```nu > http put --content-type application/json https://www.example.com { field: value } ``` -Put JSON content from a pipeline to example.com +Put JSON content from a pipeline to example.com. ```nu > open --raw foo.json | http put https://www.example.com diff --git a/commands/docs/if.md b/commands/docs/if.md index afab1bda062..9b979aef33c 100644 --- a/commands/docs/if.md +++ b/commands/docs/if.md @@ -2,7 +2,7 @@ title: if categories: | core -version: 0.110.0 +version: 0.111.0 core: | Conditionally run a block. usage: | @@ -34,19 +34,19 @@ contributors: false | any | any | ## Examples -Output a value if a condition matches, otherwise return nothing +Output a value if a condition matches, otherwise return nothing. ```nu > if 2 < 3 { 'yes!' } yes! ``` -Output a value if a condition matches, else return another value +Output a value if a condition matches, else return another value. ```nu > if 5 < 3 { 'yes!' } else { 'no!' } no! ``` -Chain multiple if's together +Chain multiple if's together. ```nu > if 5 < 3 { 'yes!' } else if 4 < 5 { 'no!' } else { 'okay!' } no! diff --git a/commands/docs/ignore.md b/commands/docs/ignore.md index 290b71bbddf..3c0e0f85003 100644 --- a/commands/docs/ignore.md +++ b/commands/docs/ignore.md @@ -2,7 +2,7 @@ title: ignore categories: | core -version: 0.110.0 +version: 0.111.0 core: | Ignore the output of the previous command in the pipeline. usage: | @@ -28,7 +28,7 @@ contributors: false | any | nothing | ## Examples -Ignore the output of an echo command +Ignore the output of an echo command. ```nu > echo done | ignore diff --git a/commands/docs/inc.md b/commands/docs/inc.md index d27a3ebdd9a..ba6eb4dd714 100644 --- a/commands/docs/inc.md +++ b/commands/docs/inc.md @@ -2,7 +2,7 @@ title: inc categories: | default -version: 0.110.0 +version: 0.111.0 default: | Increment a value or version. Optionally use the column of a table. usage: | @@ -22,10 +22,10 @@ contributors: false ## Flags - - `--major, -M`: increment the major version (eg 1.2.1 -> 2.0.0) - - `--minor, -m`: increment the minor version (eg 1.2.1 -> 1.3.0) - - `--patch, -p`: increment the patch version (eg 1.2.1 -> 1.2.2) + - `--major, -M`: Increment the major version (eg 1.2.1 -> 2.0.0). + - `--minor, -m`: Increment the minor version (eg 1.2.1 -> 1.3.0). + - `--patch, -p`: Increment the patch version (eg 1.2.1 -> 1.2.2). ## Parameters - - `cell_path`: cell path to update + - `cell_path`: Cell path to update. diff --git a/commands/docs/input.md b/commands/docs/input.md index fc190605b45..644e4e70d07 100644 --- a/commands/docs/input.md +++ b/commands/docs/input.md @@ -2,11 +2,11 @@ title: input categories: | platform -version: 0.110.0 +version: 0.111.0 platform: | - Get input from the user. + Get input from the user via the terminal. usage: | - Get input from the user. + Get input from the user via the terminal. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `input` for [platform](/commands/categories/platform.md) -
Get input from the user.
+
Get input from the user via the terminal.
## Signature @@ -22,13 +22,13 @@ contributors: false ## Flags - - `--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 - - `--reedline`: use the reedline library, defaults to false + - `--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. + - `--reedline`: Use the reedline library, defaults to false. - `--history-file {path}`: Path to a file to read and write command history. This is a text file and will be created if it doesn't exist. Will be used as the selection list. Implies `--reedline`. - `--max-history {int}`: The maximum number of entries to keep in the history, defaults to $env.config.history.max_size. Implies `--reedline`. - - `--suppress-output, -s`: don't print keystroke values + - `--suppress-output, -s`: Don't print keystroke values. ## Parameters @@ -43,37 +43,37 @@ contributors: false | list<string> | any | ## Examples -Get input from the user, and assign to a variable +Get input from the user, and assign to a variable. ```nu > let user_input = (input) ``` -Get two characters from the user, and assign to a variable +Get two characters from the user, and assign to a variable. ```nu > let user_input = (input --numchar 2) ``` -Get input from the user with default value, 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) ``` -Get multiple lines of input from the user (newlines can be entered using `Alt` + `Enter` or `Ctrl` + `Enter`), and assign to a variable +Get multiple lines of input from the user (newlines can be entered using `Alt` + `Enter` or `Ctrl` + `Enter`), and assign to a variable. ```nu > let multiline_input = (input --reedline) ``` -Get input from the user with history, and assign to a variable +Get input from the user with history, and assign to a variable. ```nu > let user_input = ([past,command,entries] | input --reedline) ``` -Get input from the user with history backed by a file, and assign to a variable +Get input from the user with history backed by a file, and assign to a variable. ```nu > let user_input = (input --reedline --history-file ./history.txt) @@ -82,7 +82,7 @@ Get input from the user with history backed by a file, and assign to a variable ## Subcommands: -| name | description | type | -| ------------------------------------------------ | -------------------------------- | -------- | -| [`input list`](/commands/docs/input_list.md) | Interactive list selection. | built-in | -| [`input listen`](/commands/docs/input_listen.md) | Listen for user interface event. | built-in | \ No newline at end of file +| name | description | type | +| ------------------------------------------------ | ----------------------------------------------- | -------- | +| [`input list`](/commands/docs/input_list.md) | Display an interactive list for user selection. | built-in | +| [`input listen`](/commands/docs/input_listen.md) | Listen for user interface events. | built-in | \ No newline at end of file diff --git a/commands/docs/input_list.md b/commands/docs/input_list.md index 29cafb5a12a..e8725385c11 100644 --- a/commands/docs/input_list.md +++ b/commands/docs/input_list.md @@ -2,11 +2,11 @@ title: input list categories: | platform -version: 0.110.0 +version: 0.111.0 platform: | - Interactive list selection. + Display an interactive list for user selection. usage: | - Interactive list selection. + Display an interactive list for user selection. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `input list` for [platform](/commands/categories/platform.md) -
Interactive list selection.
+
Display an interactive list for user selection.
## Signature @@ -22,10 +22,15 @@ contributors: false ## Flags - - `--multi, -m`: Use multiple results, you can press a to toggle all options on/off + - `--multi, -m`: Use multiple results, you can press a to toggle all, Ctrl+R to refine. - `--fuzzy, -f`: Use a fuzzy select. - `--index, -i`: Returns list indexes. - - `--display, -d {cell-path}`: Field to use as display value + - `--no-footer, -n`: Hide the footer showing item count and selection count. + - `--no-separator`: Hide the separator line between the search box and results. + - `--case-sensitive, -s {oneof}`: Case sensitivity for fuzzy matching: true, false, or 'smart' (case-insensitive unless query has uppercase) + - `--display, -d {oneof}`: Field or closure to generate display value for search (returns original value when selected) + - `--no-table, -t`: Disable table rendering for table input (show as single lines). + - `--per-column, -c`: Match filter text against each column independently (table mode only). ## Parameters @@ -40,41 +45,150 @@ contributors: false | range | int | ## Examples -Return a single value from a list +Return a single value from a list. ```nu > [1 2 3 4 5] | input list 'Rate it' ``` -Return multiple values from a list +Return multiple values from a list. ```nu > [Banana Kiwi Pear Peach Strawberry] | input list --multi 'Add fruits to the basket' ``` -Return a single record from a table with fuzzy search +Return a single record from a table with fuzzy search. ```nu > ls | input list --fuzzy 'Select the target' ``` -Choose an item from a range +Choose an item from a range. ```nu > 1..10 | input list ``` -Return the index of a selected item +Return the index of a selected item. ```nu > [Banana Kiwi Pear Peach Strawberry] | input list --index ``` -Choose an item from a table using a column as display value +Choose an item from a table using a column as display value. ```nu > [[name price]; [Banana 12] [Kiwi 4] [Pear 7]] | input list -d name ``` +Choose an item using a closure to generate display text +```nu +> [[name price]; [Banana 12] [Kiwi 4] [Pear 7]] | input list -d {|it| $"($it.name): $($it.price)"} + +``` + +Fuzzy search with case-sensitive matching +```nu +> [abc ABC aBc] | input list --fuzzy --case-sensitive true + +``` + +Fuzzy search without the footer showing item count +```nu +> ls | input list --fuzzy --no-footer + +``` + +Fuzzy search without the separator line +```nu +> ls | input list --fuzzy --no-separator + +``` + +Fuzzy search with custom match highlighting color +```nu +> $env.config.color_config.search_result = "red"; ls | input list --fuzzy + +``` + +Display a table with column rendering +```nu +> [[name size]; [file1.txt "1.2 KB"] [file2.txt "3.4 KB"]] | input list + +``` + +Display a table as single lines (no table rendering) +```nu +> ls | input list --no-table + +``` + +Fuzzy search with multiple selection (use Tab to toggle) +```nu +> ls | input list --fuzzy --multi + +``` + ## Notes -Abort with esc or q. \ No newline at end of file +Presents an interactive list in the terminal for selecting items. + +Four modes are available: +- Single (default): Select one item with arrow keys, confirm with Enter +- Multi (--multi): Select multiple items with Space, toggle all with 'a' +- Fuzzy (--fuzzy): Type to filter, matches are highlighted +- Fuzzy Multi (--fuzzy --multi): Type to filter AND select multiple items with Tab, toggle all with Alt+A + +Multi mode features: +- The footer always shows the selection count (e.g., "[1-5 of 10, 3 selected]") +- Use Ctrl+R to "refine" the list: narrow down to only selected items, keeping them + selected so you can deselect the ones you don't want. Can be used multiple times. + +Table rendering: +When piping a table (list of records), items are displayed with aligned columns. +Use Left/Right arrows (or h/l) to scroll horizontally when columns exceed terminal width. +In fuzzy mode, use Shift+Left/Right for horizontal scrolling. +Ellipsis (…) shows when more columns are available in each direction. +In fuzzy mode, the ellipsis is highlighted when matches exist in hidden columns. +Use --no-table to disable table rendering and show records as single lines. +Use --per-column to match filter text against each column independently (best match wins). +This prevents false positives from matches spanning column boundaries. +Use --display to specify a column or closure for display/search text (disables table mode). +The --display flag accepts either a cell path (e.g., -d name) or a closure (e.g., -d {|it| $it.name}). +The closure receives each item and should return the string to display and search on. +The original value is always returned when selected, regardless of what --display shows. + +Keyboard shortcuts: +- Up/Down, j/k: Navigate items +- Left/Right, h/l: Scroll columns horizontally (table mode, single/multi) +- Shift+Left/Right: Scroll columns horizontally (fuzzy mode) +- Home/End: Jump to first/last item +- PageUp/PageDown: Navigate by page +- Space: Toggle selection (multi mode) +- Tab: Toggle selection and move down (fuzzy multi mode) +- Shift+Tab: Toggle selection and move up (fuzzy multi mode) +- a: Toggle all items (multi mode), Alt+A in fuzzy multi mode +- Ctrl+R: Refine list to only selected items (multi modes) +- Alt+C: Cycle case sensitivity (smart -> CASE -> nocase) in fuzzy modes +- Alt+P: Toggle per-column matching in fuzzy table mode +- Enter: Confirm selection +- Esc: Cancel (all modes) +- q: Cancel (single/multi modes only) +- Ctrl+C: Cancel (all modes) + +Fuzzy mode supports readline-style editing: +- Ctrl+A/E: Beginning/end of line +- Ctrl+B/F, Left/Right: Move cursor +- Alt+B/F: Move by word +- Ctrl+U/K: Kill to beginning/end of line +- Ctrl+W, Alt+Backspace: Delete previous word +- Ctrl+D, Delete: Delete character at cursor + +Styling (inherited from $env.config.color_config): +- search_result: Match highlighting in fuzzy mode +- hints: Footer text +- separator: Separator line and table column separators +- row_index: Prompt marker and selection marker +- header: Table column headers +- Table column characters inherit from $env.config.table.mode + +Use --no-footer and --no-separator to hide the footer and separator line. \ No newline at end of file diff --git a/commands/docs/input_listen.md b/commands/docs/input_listen.md index ab5b4adaba2..e4b4c1ed519 100644 --- a/commands/docs/input_listen.md +++ b/commands/docs/input_listen.md @@ -2,11 +2,11 @@ title: input listen categories: | platform -version: 0.110.0 +version: 0.111.0 platform: | - Listen for user interface event. + Listen for user interface events. usage: | - Listen for user interface event. + Listen for user interface events. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `input listen` for [platform](/commands/categories/platform.md) -
Listen for user interface event.
+
Listen for user interface events.
## Signature @@ -22,8 +22,9 @@ contributors: false ## Flags - - `--types, -t {list}`: Listen for event of specified types only (can be one of: focus, key, mouse, paste, resize) - - `--raw, -r`: Add raw_code field with numeric value of keycode and raw_flags with bit mask flags + - `--types, -t {list}`: Listen for event of specified types only (can be one of: focus, key, mouse, paste, resize). + - `--raw, -r`: Add raw_code field with numeric value of keycode and raw_flags with bit mask flags. + - `--timeout, -o {duration}`: How long to wait for input before returning. ## Input/output types: @@ -33,7 +34,7 @@ contributors: false | nothing | record<keycode: string, modifiers: list<string>> | ## Examples -Listen for a keyboard shortcut and find out how nu receives it +Listen for a keyboard shortcut and find out how nu receives it. ```nu > input listen --types [key] diff --git a/commands/docs/insert.md b/commands/docs/insert.md index 889ecc98200..cb59b4eb839 100644 --- a/commands/docs/insert.md +++ b/commands/docs/insert.md @@ -2,7 +2,7 @@ title: insert categories: | filters -version: 0.110.0 +version: 0.111.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 9268e1815fd..d18fb6d402e 100644 --- a/commands/docs/inspect.md +++ b/commands/docs/inspect.md @@ -2,7 +2,7 @@ title: inspect categories: | debug -version: 0.110.0 +version: 0.111.0 debug: | Inspect pipeline results while running a pipeline. usage: | @@ -28,7 +28,7 @@ contributors: false | any | any | ## Examples -Inspect pipeline results +Inspect pipeline results. ```nu > ls | inspect | get name | inspect diff --git a/commands/docs/interleave.md b/commands/docs/interleave.md index 12c4a81cef5..42f4fa82ba1 100644 --- a/commands/docs/interleave.md +++ b/commands/docs/interleave.md @@ -2,7 +2,7 @@ title: interleave categories: | filters -version: 0.110.0 +version: 0.111.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 9d7064025a5..746656a12a9 100644 --- a/commands/docs/into.md +++ b/commands/docs/into.md @@ -2,7 +2,7 @@ title: into categories: | conversions -version: 0.110.0 +version: 0.111.0 conversions: | Commands to convert data from one type to another. usage: | @@ -34,15 +34,15 @@ You must use one of the following subcommands. Using this command as-is will onl | name | description | type | | ---------------------------------------------------- | ------------------------------------------ | -------- | | [`into binary`](/commands/docs/into_binary.md) | Convert value to a binary primitive. | built-in | -| [`into bool`](/commands/docs/into_bool.md) | Convert value to boolean. | built-in | +| [`into bool`](/commands/docs/into_bool.md) | Convert value to a boolean. | built-in | | [`into cell-path`](/commands/docs/into_cell-path.md) | Convert value to a cell-path. | built-in | | [`into datetime`](/commands/docs/into_datetime.md) | Convert text or timestamp into a datetime. | built-in | -| [`into duration`](/commands/docs/into_duration.md) | Convert value to duration. | built-in | -| [`into filesize`](/commands/docs/into_filesize.md) | Convert value to filesize. | built-in | +| [`into duration`](/commands/docs/into_duration.md) | Convert value to a duration. | built-in | +| [`into filesize`](/commands/docs/into_filesize.md) | Convert value to a filesize. | built-in | | [`into float`](/commands/docs/into_float.md) | Convert data into floating point number. | built-in | -| [`into glob`](/commands/docs/into_glob.md) | Convert value to glob. | built-in | -| [`into int`](/commands/docs/into_int.md) | Convert value to integer. | built-in | -| [`into record`](/commands/docs/into_record.md) | Convert value to record. | built-in | +| [`into glob`](/commands/docs/into_glob.md) | Convert value to a glob pattern. | built-in | +| [`into int`](/commands/docs/into_int.md) | Convert value to an integer. | built-in | +| [`into record`](/commands/docs/into_record.md) | Convert value to a record. | built-in | | [`into sqlite`](/commands/docs/into_sqlite.md) | Convert table into a SQLite database. | built-in | -| [`into string`](/commands/docs/into_string.md) | Convert value to string. | built-in | +| [`into string`](/commands/docs/into_string.md) | Convert value to a string. | built-in | | [`into value`](/commands/docs/into_value.md) | Convert custom values into base values. | built-in | \ No newline at end of file diff --git a/commands/docs/into_binary.md b/commands/docs/into_binary.md index f217efced3c..648e6406711 100644 --- a/commands/docs/into_binary.md +++ b/commands/docs/into_binary.md @@ -2,7 +2,7 @@ title: into binary categories: | conversions -version: 0.110.0 +version: 0.111.0 conversions: | Convert value to a binary primitive. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--compact, -c`: output without padding zeros - - `--endian, -e {string}`: byte encode endian. Does not affect string, date or binary. In containers, only individual elements are affected. Available options: native(default), little, big + - `--compact, -c`: Output without padding zeros. + - `--endian, -e {string}`: Byte encode endian. Does not affect string, date or binary. In containers, only individual elements are affected. Available options: native(default), little, big. ## Parameters @@ -45,7 +45,7 @@ contributors: false | record | record | ## Examples -convert string to a nushell binary primitive +convert string to a nushell binary primitive. ```nu > 'This is a string that is exactly 52 characters long.' | into binary Length: 52 (0x34) bytes | printable whitespace ascii_other non_ascii @@ -56,7 +56,7 @@ Length: 52 (0x34) bytes | printable whitespace ascii_other non_ascii ``` -convert a number to a nushell binary primitive +convert a number to a nushell binary primitive. ```nu > 1 | into binary Length: 8 (0x8) bytes | printable whitespace ascii_other non_ascii @@ -64,7 +64,7 @@ Length: 8 (0x8) bytes | printable whitespace ascii_other non_ascii ``` -convert a number to a nushell binary primitive (big endian) +convert a number to a nushell binary primitive (big endian). ```nu > 258 | into binary --endian big Length: 8 (0x8) bytes | printable whitespace ascii_other non_ascii @@ -72,7 +72,7 @@ Length: 8 (0x8) bytes | printable whitespace ascii_other non_ascii ``` -convert a number to a nushell binary primitive (little endian) +convert a number to a nushell binary primitive (little endian). ```nu > 258 | into binary --endian little Length: 8 (0x8) bytes | printable whitespace ascii_other non_ascii @@ -80,7 +80,7 @@ Length: 8 (0x8) bytes | printable whitespace ascii_other non_ascii ``` -convert a boolean to a nushell binary primitive +convert a boolean to a nushell binary primitive. ```nu > true | into binary Length: 8 (0x8) bytes | printable whitespace ascii_other non_ascii @@ -88,19 +88,19 @@ Length: 8 (0x8) bytes | printable whitespace ascii_other non_ascii ``` -convert a filesize to a nushell binary primitive +convert a filesize to a nushell binary primitive. ```nu > ls | where name == LICENSE | get size | into binary ``` -convert a filepath to a nushell binary primitive +convert a filepath to a nushell binary primitive. ```nu > ls | where name == LICENSE | get name | path expand | into binary ``` -convert a float to a nushell binary primitive +convert a float to a nushell binary primitive. ```nu > 1.234 | into binary Length: 8 (0x8) bytes | printable whitespace ascii_other non_ascii @@ -108,7 +108,7 @@ Length: 8 (0x8) bytes | printable whitespace ascii_other non_ascii ``` -convert an int to a nushell binary primitive with compact enabled +convert an int to a nushell binary primitive with compact enabled. ```nu > 10 | into binary --compact Length: 1 (0x1) bytes | printable whitespace ascii_other non_ascii diff --git a/commands/docs/into_bool.md b/commands/docs/into_bool.md index 9cc99457648..089e41475eb 100644 --- a/commands/docs/into_bool.md +++ b/commands/docs/into_bool.md @@ -2,11 +2,11 @@ title: into bool categories: | conversions -version: 0.110.0 +version: 0.111.0 conversions: | - Convert value to boolean. + Convert value to a boolean. usage: | - Convert value to boolean. + Convert value to a boolean. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `into bool` for [conversions](/commands/categories/conversions.md) -
Convert value to boolean.
+
Convert value to a boolean.
## Signature @@ -43,7 +43,7 @@ contributors: false | record | record | ## Examples -Convert value to boolean in table +Convert value to boolean in table. ```nu > [[value]; ['false'] ['1'] [0] [1.0] [true]] | into bool value ╭───┬───────╮ @@ -58,43 +58,43 @@ Convert value to boolean in table ``` -Convert bool to boolean +Convert bool to boolean. ```nu > true | into bool true ``` -convert int to boolean +convert int to boolean. ```nu > 1 | into bool true ``` -convert float to boolean +convert float to boolean. ```nu > 0.3 | into bool true ``` -convert float string to boolean +convert float string to boolean. ```nu > '0.0' | into bool false ``` -convert string to boolean +convert string to boolean. ```nu > 'true' | into bool true ``` -interpret a null as false +interpret a null as false. ```nu > null | into bool --relaxed false ``` -interpret any non-false, non-zero string as true +interpret any non-false, non-zero string as true. ```nu > 'something' | into bool --relaxed true diff --git a/commands/docs/into_cell-path.md b/commands/docs/into_cell-path.md index 721e9d0ce10..b76f424acd2 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.110.0 +version: 0.111.0 conversions: | Convert value to a cell-path. usage: | @@ -31,31 +31,31 @@ contributors: false | list<record<value: any, optional: bool, insensitive: bool>> | cell-path | ## Examples -Convert integer into cell path +Convert integer into cell path. ```nu > 5 | into cell-path $.5 ``` -Convert cell path into cell path +Convert cell path into cell path. ```nu > 5 | into cell-path | into cell-path $.5 ``` -Convert string into cell path +Convert string into cell path. ```nu > 'some.path' | split row '.' | into cell-path $.some.path ``` -Convert list into cell path +Convert list into cell path. ```nu > [5 c 7 h] | into cell-path $.5.c.7.h ``` -Convert table into cell path +Convert table into cell path. ```nu > [[value, optional, insensitive]; [5 true false] [c false false] [d false true]] | into cell-path $.5?.c.d! diff --git a/commands/docs/into_datetime.md b/commands/docs/into_datetime.md index cbc4ae63611..d6cbffc2055 100644 --- a/commands/docs/into_datetime.md +++ b/commands/docs/into_datetime.md @@ -2,7 +2,7 @@ title: into datetime categories: | conversions -version: 0.110.0 +version: 0.111.0 conversions: | Convert text or timestamp into a datetime. usage: | @@ -22,10 +22,10 @@ contributors: false ## Flags - - `--timezone, -z {string}`: Specify timezone if the input is a Unix timestamp. Valid options: 'UTC' ('u') or 'LOCAL' ('l') - - `--offset, -o {int}`: Specify timezone by offset from UTC if the input is a Unix timestamp, like '+8', '-4' - - `--format, -f {string}`: Specify expected format of INPUT string to parse to datetime. Use --list to see options - - `--list, -l`: Show all possible variables for use in --format flag + - `--timezone, -z {string}`: Specify timezone if the input is a Unix timestamp. Valid options: 'UTC' ('u') or 'LOCAL' ('l'). + - `--offset, -o {int}`: Specify timezone by offset from UTC if the input is a Unix timestamp, like '+8', '-4'. + - `--format, -f {string}`: Specify expected format of INPUT string to parse to datetime. Use --list to see options. + - `--list, -l`: Show all possible variables for use in --format flag. ## Parameters @@ -47,55 +47,55 @@ contributors: false | any | table | ## Examples -Convert timestamp string to datetime with timezone offset +Convert timestamp string to datetime with timezone offset. ```nu > '27.02.2021 1:55 pm +0000' | into datetime Sat, 27 Feb 2021 13:55:00 +0000 (4 years ago) ``` -Convert standard timestamp string to datetime with timezone offset +Convert standard timestamp string to datetime with timezone offset. ```nu > '2021-02-27T13:55:40.2246+00:00' | into datetime Sat, 27 Feb 2021 13:55:40 +0000 (4 years ago) ``` -Convert non-standard timestamp string, with timezone offset, to datetime using a custom format +Convert non-standard timestamp string, with timezone offset, to datetime using a custom format. ```nu > '20210227_135540+0000' | into datetime --format '%Y%m%d_%H%M%S%z' Sat, 27 Feb 2021 13:55:40 +0000 (4 years ago) ``` -Convert non-standard timestamp string, without timezone offset, to datetime with custom formatting +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 +0800 (41 years ago) ``` -Convert nanosecond-precision unix timestamp to a datetime with offset from UTC +Convert nanosecond-precision unix timestamp to a datetime with offset from UTC. ```nu > 1614434140123456789 | into datetime --offset -5 Sat, 27 Feb 2021 13:55:40 +0000 (4 years ago) ``` -Convert standard (seconds) unix timestamp to a UTC datetime +Convert standard (seconds) unix timestamp to a UTC datetime. ```nu > 1614434140 | into datetime -f '%s' Sat, 27 Feb 2021 13:55:40 +0000 (4 years ago) ``` -Using a datetime as input simply returns the value +Using a datetime as input simply returns the value. ```nu > 2021-02-27T13:55:40 | into datetime Sat, 27 Feb 2021 13:55:40 +0000 (4 years ago) ``` -Using a record as input +Using a record as input. ```nu > {year: 2025, month: 3, day: 30, hour: 12, minute: 15, second: 59, timezone: '+02:00'} | into datetime -Sun, 30 Mar 2025 10:15:59 +0000 (9 months ago) +Sun, 30 Mar 2025 10:15:59 +0000 (11 months ago) ``` -Convert list of timestamps to datetimes +Convert list of timestamps to datetimes. ```nu > ["2023-03-30 10:10:07 -05:00", "2023-05-05 13:43:49 -05:00", "2023-06-05 01:37:42 -05:00"] | into datetime ╭───┬─────────────╮ diff --git a/commands/docs/into_duration.md b/commands/docs/into_duration.md index 0666c2f24b5..c2ae9b873b7 100644 --- a/commands/docs/into_duration.md +++ b/commands/docs/into_duration.md @@ -2,11 +2,11 @@ title: into duration categories: | conversions -version: 0.110.0 +version: 0.111.0 conversions: | - Convert value to duration. + Convert value to a duration. usage: | - Convert value to duration. + Convert value to a duration. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `into duration` for [conversions](/commands/categories/conversions.md) -
Convert value to duration.
+
Convert value to a duration.
## Signature @@ -42,19 +42,19 @@ contributors: false | table | table | ## Examples -Convert duration string to duration value +Convert duration string to duration value. ```nu > '7min' | into duration 7min ``` -Convert compound duration string to duration value +Convert compound duration string to duration value. ```nu > '1day 2hr 3min 4sec' | into duration 1day 2hr 3min 4sec ``` -Convert table of duration strings to table of duration values +Convert table of duration strings to table of duration values. ```nu > [[value]; ['1sec'] ['2min'] ['3hr'] ['4day'] ['5wk']] | into duration value ╭───┬───────╮ @@ -69,31 +69,31 @@ Convert table of duration strings to table of duration values ``` -Convert duration to duration +Convert duration to duration. ```nu > 420sec | into duration 7min ``` -Convert a number of ns to duration +Convert a number of ns to duration. ```nu > 1_234_567 | into duration 1ms 234µs 567ns ``` -Convert a number of an arbitrary unit to duration +Convert a number of an arbitrary unit to duration. ```nu > 1_234 | into duration --unit ms 1sec 234ms ``` -Convert a floating point number of an arbitrary unit to duration +Convert a floating point number of an arbitrary unit to duration. ```nu > 1.234 | into duration --unit sec 1sec 234ms ``` -Convert a record to a duration +Convert a record to a duration. ```nu > {day: 10, hour: 2, minute: 6, second: 50, sign: '+'} | into duration 1wk 3day 2hr 6min 50sec diff --git a/commands/docs/into_filesize.md b/commands/docs/into_filesize.md index bfe5d84daff..28b1fbcaea4 100644 --- a/commands/docs/into_filesize.md +++ b/commands/docs/into_filesize.md @@ -2,11 +2,11 @@ title: into filesize categories: | conversions -version: 0.110.0 +version: 0.111.0 conversions: | - Convert value to filesize. + Convert value to a filesize. usage: | - Convert value to filesize. + Convert value to a filesize. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `into filesize` for [conversions](/commands/categories/conversions.md) -
Convert value to filesize.
+
Convert value to a filesize.
## Signature @@ -42,7 +42,7 @@ contributors: false | list<any> | list<filesize> | ## Examples -Convert string to filesize in table +Convert string to filesize in table. ```nu > [[device size]; ["/dev/sda1" "200"] ["/dev/loop0" "50"]] | into filesize size ╭───┬────────────┬───────╮ @@ -54,31 +54,31 @@ Convert string to filesize in table ``` -Convert string to filesize +Convert string to filesize. ```nu > '2' | into filesize 2 B ``` -Convert float to filesize +Convert float to filesize. ```nu > 8.3 | into filesize 8 B ``` -Convert int to filesize +Convert int to filesize. ```nu > 5 | into filesize 5 B ``` -Convert file size to filesize +Convert file size to filesize. ```nu > 4KB | into filesize 4.0 kB ``` -Convert string with unit to filesize +Convert string with unit to filesize. ```nu > '-1KB' | into filesize -1.0 kB diff --git a/commands/docs/into_float.md b/commands/docs/into_float.md index 68f682e33d7..37b30d20c24 100644 --- a/commands/docs/into_float.md +++ b/commands/docs/into_float.md @@ -2,7 +2,7 @@ title: into float categories: | conversions -version: 0.110.0 +version: 0.111.0 conversions: | Convert data into floating point number. usage: | @@ -38,7 +38,7 @@ contributors: false | list<any> | list<float> | ## Examples -Convert string to float in table +Convert string to float in table. ```nu > [[num]; ['5.01']] | into float num ╭───┬──────╮ @@ -49,13 +49,13 @@ Convert string to float in table ``` -Convert string to floating point number +Convert string to floating point number. ```nu > '1.345' | into float 1.345 ``` -Coerce list of ints and floats to float +Coerce list of ints and floats to float. ```nu > [4 -5.9] | into float ╭───┬───────╮ @@ -65,7 +65,7 @@ Coerce list of ints and floats to float ``` -Convert boolean to float +Convert boolean to float. ```nu > true | into float 1.0 diff --git a/commands/docs/into_glob.md b/commands/docs/into_glob.md index e81b78c3eba..3c8f7ab3904 100644 --- a/commands/docs/into_glob.md +++ b/commands/docs/into_glob.md @@ -2,11 +2,11 @@ title: into glob categories: | conversions -version: 0.110.0 +version: 0.111.0 conversions: | - Convert value to glob. + Convert value to a glob pattern. usage: | - Convert value to glob. + Convert value to a glob pattern. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `into glob` for [conversions](/commands/categories/conversions.md) -
Convert value to glob.
+
Convert value to a glob pattern.
## Signature @@ -36,19 +36,19 @@ contributors: false | record | record | ## Examples -convert string to glob +Convert string to glob. ```nu > '1234' | into glob 1234 ``` -convert glob to glob +Convert glob to glob. ```nu > '1234' | into glob | into glob 1234 ``` -convert filepath to glob +Convert filepath to glob. ```nu > ls Cargo.toml | get name | into glob diff --git a/commands/docs/into_int.md b/commands/docs/into_int.md index aef38a14b31..ca4b4ece390 100644 --- a/commands/docs/into_int.md +++ b/commands/docs/into_int.md @@ -2,11 +2,11 @@ title: into int categories: | conversions -version: 0.110.0 +version: 0.111.0 conversions: | - Convert value to integer. + Convert value to an integer. usage: | - Convert value to integer. + Convert value to an integer. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `into int` for [conversions](/commands/categories/conversions.md) -
Convert value to integer.
+
Convert value to an integer.
## Signature @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--radix, -r {number}`: radix of integer - - `--endian, -e {string}`: byte encode endian, available options: native(default), little, big - - `--signed, -s`: always treat input number as a signed number + - `--radix, -r {number}`: Radix of integer. + - `--endian, -e {string}`: Byte encode endian, available options: native(default), little, big. + - `--signed, -s`: Always treat input number as a signed number. ## Parameters @@ -53,37 +53,37 @@ contributors: false | list<any> | list<int> | ## Examples -Convert string to int in table +Convert string to int in table. ```nu > [[num]; ['-5'] [4] [1.5]] | into int num ``` -Convert string to int +Convert string to int. ```nu > '2' | into int 2 ``` -Convert float to int +Convert float to int. ```nu > 5.9 | into int 5 ``` -Convert decimal string to int +Convert decimal string to int. ```nu > '5.9' | into int 5 ``` -Convert file size to int +Convert file size to int. ```nu > 4KB | into int 4000 ``` -Convert bool to int +Convert bool to int. ```nu > [false, true] | into int ╭───┬───╮ @@ -93,49 +93,49 @@ Convert bool to int ``` -Convert date to int (Unix nanosecond timestamp) +Convert date to int (Unix nanosecond timestamp). ```nu > 1983-04-13T12:09:14.123456789-05:00 | into int 419101754123456789 ``` -Convert to int from binary data (radix: 2) +Convert to int from binary data (radix: 2). ```nu > '1101' | into int --radix 2 13 ``` -Convert to int from hex +Convert to int from hex. ```nu > 'FF' | into int --radix 16 255 ``` -Convert octal string to int +Convert octal string to int. ```nu > '0o10132' | into int 4186 ``` -Convert 0 padded string to int +Convert 0 padded string to int. ```nu > '0010132' | into int 10132 ``` -Convert 0 padded string to int with radix 8 +Convert 0 padded string to int with radix 8. ```nu > '0010132' | into int --radix 8 4186 ``` -Convert binary value to int +Convert binary value to int. ```nu > 0x[10] | into int 16 ``` -Convert binary value to signed int +Convert binary value to signed int. ```nu > 0x[a0] | into int --signed -96 diff --git a/commands/docs/into_record.md b/commands/docs/into_record.md index 0864c200275..fe66d8d5832 100644 --- a/commands/docs/into_record.md +++ b/commands/docs/into_record.md @@ -2,11 +2,11 @@ title: into record categories: | conversions -version: 0.110.0 +version: 0.111.0 conversions: | - Convert value to record. + Convert value to a record. usage: | - Convert value to record. + Convert value to a record. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `into record` for [conversions](/commands/categories/conversions.md) -
Convert value to record.
+
Convert value to a record.
## Signature @@ -31,7 +31,7 @@ contributors: false | record | record | ## Examples -Convert from one row table to record +Convert from one row table to record. ```nu > [[value]; [false]] | into record ╭───────┬───────╮ @@ -39,7 +39,7 @@ Convert from one row table to record ╰───────┴───────╯ ``` -Convert from list of records to record +Convert from list of records to record. ```nu > [{foo: bar} {baz: quux}] | into record ╭─────┬──────╮ @@ -48,7 +48,7 @@ Convert from list of records to record ╰─────┴──────╯ ``` -Convert from list of pairs into record +Convert from list of pairs into record. ```nu > [[foo bar] [baz quux]] | into record ╭─────┬──────╮ @@ -57,7 +57,7 @@ Convert from list of pairs into record ╰─────┴──────╯ ``` -convert duration to record (weeks max) +convert duration to record (weeks max). ```nu > (-500day - 4hr - 5sec) | into record ╭────────┬────╮ @@ -69,7 +69,7 @@ convert duration to record (weeks max) ╰────────┴────╯ ``` -convert record to record +convert record to record. ```nu > {a: 1, b: 2} | into record ╭───┬───╮ @@ -78,7 +78,7 @@ convert record to record ╰───┴───╯ ``` -convert date to record +convert date to record. ```nu > 2020-04-12T22:10:57+02:00 | into record ╭─────────────┬────────╮ @@ -95,7 +95,7 @@ convert date to record ╰─────────────┴────────╯ ``` -convert date components to table columns +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 36e0ed433a5..44998087486 100644 --- a/commands/docs/into_sqlite.md +++ b/commands/docs/into_sqlite.md @@ -2,7 +2,7 @@ title: into sqlite categories: | conversions -version: 0.110.0 +version: 0.111.0 conversions: | Convert table into a SQLite database. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--table-name, -t {string}`: Specify table name to store the data in + - `--table-name, -t {string}`: Specify table name to store the data in. ## Parameters @@ -37,25 +37,25 @@ contributors: false | record | nothing | ## Examples -Convert ls entries into a SQLite database with 'main' as the table name +Convert ls entries into a SQLite database with 'main' as the table name. ```nu > ls | into sqlite my_ls.db ``` -Convert ls entries into a SQLite database with 'my_table' as the table name +Convert ls entries into a SQLite database with 'my_table' as the table name. ```nu > ls | into sqlite my_ls.db -t my_table ``` -Convert table literal into a SQLite database with 'main' as the table name +Convert table literal into a SQLite database with 'main' as the table name. ```nu > [[name]; [-----] [someone] [=====] [somename] ['(((((']] | into sqlite filename.db ``` -Insert a single record into a SQLite database +Insert a single record into a SQLite database. ```nu > { foo: bar, baz: quux } | into sqlite filename.db diff --git a/commands/docs/into_string.md b/commands/docs/into_string.md index 6d486bad442..f39a9474d9e 100644 --- a/commands/docs/into_string.md +++ b/commands/docs/into_string.md @@ -2,11 +2,11 @@ title: into string categories: | conversions -version: 0.110.0 +version: 0.111.0 conversions: | - Convert value to string. + Convert value to a string. usage: | - Convert value to string. + Convert value to a string. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `into string` for [conversions](/commands/categories/conversions.md) -
Convert value to string.
+
Convert value to a string.
## Signature @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--group-digits, -g`: group digits together by the locale specific thousands separator - - `--decimals, -d {int}`: decimal digits to which to round + - `--group-digits, -g`: Group digits together by the locale specific thousands separator. + - `--decimals, -d {int}`: Decimal digits to which to round. ## Parameters @@ -50,73 +50,73 @@ contributors: false | record | record | ## Examples -convert int to string and append three decimal places +convert int to string and append three decimal places. ```nu > 5 | into string --decimals 3 5.000 ``` -convert float to string and round to nearest integer +convert float to string and round to nearest integer. ```nu > 1.7 | into string --decimals 0 2 ``` -convert float to string +convert float to string. ```nu > 1.7 | into string --decimals 1 1.7 ``` -convert float to string and limit to 2 decimals +convert float to string and limit to 2 decimals. ```nu > 1.734 | into string --decimals 2 1.73 ``` -convert float to string +convert float to string. ```nu > 4.3 | into string 4.3 ``` -convert string to string +convert string to string. ```nu > '1234' | into string 1234 ``` -convert boolean to string +convert boolean to string. ```nu > true | into string true ``` -convert date to string +convert date to string. ```nu > '2020-10-10 10:00:00 +02:00' | into datetime | into string Sat Oct 10 10:00:00 2020 ``` -convert filepath to string +convert filepath to string. ```nu > ls Cargo.toml | get name | into string ``` -convert filesize to string +convert filesize to string. ```nu > 1kB | into string 1.0 kB ``` -convert duration to string +convert duration to string. ```nu > 9day | into string 1wk 2day ``` -convert cell-path to string +convert cell-path to string. ```nu > $.name | into string $.name diff --git a/commands/docs/into_value.md b/commands/docs/into_value.md index ac608eb49f4..45520295797 100644 --- a/commands/docs/into_value.md +++ b/commands/docs/into_value.md @@ -2,7 +2,7 @@ title: into value categories: | conversions -version: 0.110.0 +version: 0.111.0 conversions: | Convert custom values into base values. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--columns, -c {list}`: list of columns to update - - `--prefer-filesizes, -f`: For ints display them as human-readable file sizes + - `--columns, -c {list}`: List of columns to update. + - `--prefer-filesizes, -f`: For ints display them as human-readable file sizes. ## Input/output types: diff --git a/commands/docs/is-admin.md b/commands/docs/is-admin.md index f72d5115bdc..024f374051e 100644 --- a/commands/docs/is-admin.md +++ b/commands/docs/is-admin.md @@ -2,7 +2,7 @@ title: is-admin categories: | core -version: 0.110.0 +version: 0.111.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 677c2a5fedd..87261e37484 100644 --- a/commands/docs/is-empty.md +++ b/commands/docs/is-empty.md @@ -2,7 +2,7 @@ title: is-empty categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Check for empty values. usage: | diff --git a/commands/docs/is-not-empty.md b/commands/docs/is-not-empty.md index c8ab2665cfb..3b5add13093 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.110.0 +version: 0.111.0 filters: | Check for non-empty values. usage: | diff --git a/commands/docs/is-terminal.md b/commands/docs/is-terminal.md index 02d5c018a40..e407e2dbd82 100644 --- a/commands/docs/is-terminal.md +++ b/commands/docs/is-terminal.md @@ -2,7 +2,7 @@ title: is-terminal categories: | platform -version: 0.110.0 +version: 0.111.0 platform: | Check if stdin, stdout, or stderr is a terminal. usage: | @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--stdin, -i`: Check if stdin is a terminal - - `--stdout, -o`: Check if stdout is a terminal - - `--stderr, -e`: Check if stderr is a terminal + - `--stdin, -i`: Check if stdin is a terminal. + - `--stdout, -o`: Check if stdout is a terminal. + - `--stderr, -e`: Check if stderr is a terminal. ## Input/output types: diff --git a/commands/docs/items.md b/commands/docs/items.md index afafa38476a..e2a10f1a8c8 100644 --- a/commands/docs/items.md +++ b/commands/docs/items.md @@ -2,7 +2,7 @@ title: items categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Given a record, iterate on each pair of column name and associated value. usage: | diff --git a/commands/docs/job.md b/commands/docs/job.md index 97a8fac7ab9..c2423065908 100644 --- a/commands/docs/job.md +++ b/commands/docs/job.md @@ -2,7 +2,7 @@ title: job categories: | experimental -version: 0.110.0 +version: 0.111.0 experimental: | Various commands for working with background jobs. usage: | @@ -37,7 +37,7 @@ You must use one of the following subcommands. Using this command as-is will onl | [`job id`](/commands/docs/job_id.md) | Get id of current job. | built-in | | [`job kill`](/commands/docs/job_kill.md) | Kill a background job. | built-in | | [`job list`](/commands/docs/job_list.md) | List background jobs. | built-in | -| [`job recv`](/commands/docs/job_recv.md) | Read a message from the mailbox. | built-in | +| [`job recv`](/commands/docs/job_recv.md) | Read a message from a job's mailbox. | built-in | | [`job send`](/commands/docs/job_send.md) | Send a message to the mailbox of a job. | built-in | | [`job spawn`](/commands/docs/job_spawn.md) | Spawn a background job and retrieve its ID. | built-in | | [`job tag`](/commands/docs/job_tag.md) | Add a description tag to a background job. | built-in | diff --git a/commands/docs/job_flush.md b/commands/docs/job_flush.md index 4147a07954d..a41bc1d73ab 100644 --- a/commands/docs/job_flush.md +++ b/commands/docs/job_flush.md @@ -2,7 +2,7 @@ title: job flush categories: | experimental -version: 0.110.0 +version: 0.111.0 experimental: | Clear this job's mailbox. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--tag {int}`: Clear messages with this tag + - `--tag {int}`: Clear messages with this tag. ## Input/output types: diff --git a/commands/docs/job_id.md b/commands/docs/job_id.md index 47d3bd1c363..709f5181c37 100644 --- a/commands/docs/job_id.md +++ b/commands/docs/job_id.md @@ -2,7 +2,7 @@ title: job id categories: | experimental -version: 0.110.0 +version: 0.111.0 experimental: | Get id of current job. usage: | @@ -28,7 +28,7 @@ contributors: false | nothing | int | ## Examples -Get id of current job +Get id of current job. ```nu > job id diff --git a/commands/docs/job_kill.md b/commands/docs/job_kill.md index 93fe87ad691..5c6ced79be8 100644 --- a/commands/docs/job_kill.md +++ b/commands/docs/job_kill.md @@ -2,7 +2,7 @@ title: job kill categories: | experimental -version: 0.110.0 +version: 0.111.0 experimental: | Kill a background job. usage: | @@ -32,7 +32,7 @@ contributors: false | nothing | nothing | ## Examples -Kill a newly spawned job +Kill a newly spawned job. ```nu > let id = job spawn { sleep 10sec }; job kill $id diff --git a/commands/docs/job_list.md b/commands/docs/job_list.md index fdf58894723..625b411740f 100644 --- a/commands/docs/job_list.md +++ b/commands/docs/job_list.md @@ -2,7 +2,7 @@ title: job list categories: | experimental -version: 0.110.0 +version: 0.111.0 experimental: | List background jobs. usage: | @@ -28,7 +28,7 @@ contributors: false | nothing | table | ## Examples -List all background jobs +List all background jobs. ```nu > job list diff --git a/commands/docs/job_recv.md b/commands/docs/job_recv.md index 271de496137..bfc85ea9600 100644 --- a/commands/docs/job_recv.md +++ b/commands/docs/job_recv.md @@ -2,11 +2,11 @@ title: job recv categories: | experimental -version: 0.110.0 +version: 0.111.0 experimental: | - Read a message from the mailbox. + Read a message from a job's mailbox. usage: | - Read a message from the mailbox. + Read a message from a job's mailbox. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `job recv` for [experimental](/commands/categories/experimental.md) -
Read a message from the mailbox.
+
Read a message from a job's mailbox.
## Signature @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--tag {int}`: A tag for the message + - `--tag {int}`: A tag for the message. - `--timeout {duration}`: The maximum time duration to wait for. @@ -33,7 +33,7 @@ contributors: false | nothing | any | ## Examples -Block the current thread while no message arrives +Block the current thread while no message arrives. ```nu > job recv @@ -45,13 +45,13 @@ Receive a message, wait for at most 10 seconds. ``` -Get a message or fail if no message is available immediately +Get a message or fail if no message is available immediately. ```nu > job recv --timeout 0sec ``` -Receive a message from a newly-spawned job +Receive a message from a newly-spawned job. ```nu > job spawn { sleep 1sec; 'hi' | job send 0 }; job recv diff --git a/commands/docs/job_send.md b/commands/docs/job_send.md index 81e852d250f..62799d9d771 100644 --- a/commands/docs/job_send.md +++ b/commands/docs/job_send.md @@ -2,7 +2,7 @@ title: job send categories: | experimental -version: 0.110.0 +version: 0.111.0 experimental: | Send a message to the mailbox of a job. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--tag {int}`: A tag for the message + - `--tag {int}`: A tag for the message. ## Parameters @@ -36,13 +36,13 @@ contributors: false | any | nothing | ## Examples -Send a message from the main thread to a newly-spawned job +Send a message from the main thread to a newly-spawned job. ```nu > let id = job spawn { job recv | save sent.txt }; 'hi' | job send $id ``` -Send a message from a newly-spawned job to the main thread (which always has an ID of 0) +Send a message from a newly-spawned job to the main thread (which always has an ID of 0). ```nu > job spawn { sleep 1sec; 'hi' | job send 0 }; job recv diff --git a/commands/docs/job_spawn.md b/commands/docs/job_spawn.md index 4249d468b24..22ebb4ff95b 100644 --- a/commands/docs/job_spawn.md +++ b/commands/docs/job_spawn.md @@ -2,7 +2,7 @@ title: job spawn categories: | experimental -version: 0.110.0 +version: 0.111.0 experimental: | Spawn a background job and retrieve its ID. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--tag, -t {string}`: An optional description tag for this job + - `--tag, -t {string}`: An optional description tag for this job. ## Parameters @@ -36,7 +36,7 @@ contributors: false | nothing | int | ## Examples -Spawn a background job to do some time consuming work +Spawn a background job to do some time consuming work. ```nu > job spawn { sleep 5sec; rm evidence.pdf } diff --git a/commands/docs/job_tag.md b/commands/docs/job_tag.md index a7ee73c7de8..3e189ea2370 100644 --- a/commands/docs/job_tag.md +++ b/commands/docs/job_tag.md @@ -2,7 +2,7 @@ title: job tag categories: | experimental -version: 0.110.0 +version: 0.111.0 experimental: | Add a description tag to a background job. usage: | @@ -33,13 +33,13 @@ contributors: false | nothing | nothing | ## Examples -Tag a newly spawned job +Tag a newly spawned job. ```nu > let id = job spawn { sleep 10sec }; job tag $id abc ``` -Remove the tag of a job +Remove the tag of a job. ```nu > let id = job spawn { sleep 10sec }; job tag $id abc; job tag $id null diff --git a/commands/docs/job_unfreeze.md b/commands/docs/job_unfreeze.md index 6791838a701..50d807e580e 100644 --- a/commands/docs/job_unfreeze.md +++ b/commands/docs/job_unfreeze.md @@ -2,7 +2,7 @@ title: job unfreeze categories: | experimental -version: 0.110.0 +version: 0.111.0 experimental: | Unfreeze a frozen process job in foreground. usage: | @@ -32,13 +32,13 @@ contributors: false | nothing | nothing | ## Examples -Unfreeze the latest frozen job +Unfreeze the latest frozen job. ```nu > job unfreeze ``` -Unfreeze a specific frozen job by its PID +Unfreeze a specific frozen job by its PID. ```nu > job unfreeze 4 diff --git a/commands/docs/join.md b/commands/docs/join.md index 27c07569e10..76588c31aed 100644 --- a/commands/docs/join.md +++ b/commands/docs/join.md @@ -2,7 +2,7 @@ title: join categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Join two tables. usage: | @@ -22,10 +22,12 @@ contributors: false ## Flags - - `--inner, -i`: Inner join (default) - - `--left, -l`: Left-outer join - - `--right, -r`: Right-outer join - - `--outer, -o`: Outer join + - `--prefix, -p {string}`: Prefix columns from the right table with this string (excluding the shared join key). + - `--suffix, -s {string}`: Suffix columns from the right table with this string (excluding the shared join key). + - `--inner, -i`: Inner join (default). + - `--left, -l`: Left-outer join. + - `--right, -r`: Right-outer join. + - `--outer, -o`: Outer join. ## Parameters @@ -51,3 +53,25 @@ Join two tables ╰───┴───┴───┴───╯ ``` + +Join multiple tables with distinct suffixes for the right table's columns +```nu +> [{id: 1 x: 10}] | join --suffix _a [{id: 1 x: 20}] id | join --suffix _b [{id: 1 x: 30}] id +╭───┬────┬────┬─────┬─────╮ +│ # │ id │ x │ x_a │ x_b │ +├───┼────┼────┼─────┼─────┤ +│ 0 │ 1 │ 10 │ 20 │ 30 │ +╰───┴────┴────┴─────┴─────╯ + +``` + +Join multiple tables with a prefix for the right table's columns +```nu +> [{id: 1 x: 10}] | join --prefix r_ [{id: 1 x: 20}] id +╭───┬────┬────┬─────╮ +│ # │ id │ x │ r_x │ +├───┼────┼────┼─────┤ +│ 0 │ 1 │ 10 │ 20 │ +╰───┴────┴────┴─────╯ + +``` diff --git a/commands/docs/keybindings.md b/commands/docs/keybindings.md index e242095a38a..5403d262bf7 100644 --- a/commands/docs/keybindings.md +++ b/commands/docs/keybindings.md @@ -2,7 +2,7 @@ title: keybindings categories: | platform -version: 0.110.0 +version: 0.111.0 platform: | Keybindings related commands. usage: | diff --git a/commands/docs/keybindings_default.md b/commands/docs/keybindings_default.md index 737f519ad88..3ec4a6f0728 100644 --- a/commands/docs/keybindings_default.md +++ b/commands/docs/keybindings_default.md @@ -2,7 +2,7 @@ title: keybindings default categories: | platform -version: 0.110.0 +version: 0.111.0 platform: | List default keybindings. usage: | diff --git a/commands/docs/keybindings_list.md b/commands/docs/keybindings_list.md index b52874bf338..d5867c7741e 100644 --- a/commands/docs/keybindings_list.md +++ b/commands/docs/keybindings_list.md @@ -2,7 +2,7 @@ title: keybindings list categories: | platform -version: 0.110.0 +version: 0.111.0 platform: | List available options that can be used to create keybindings. usage: | @@ -22,11 +22,11 @@ contributors: false ## Flags - - `--modifiers, -m`: list of modifiers - - `--keycodes, -k`: list of keycodes - - `--modes, -o`: list of edit modes - - `--events, -e`: list of reedline event - - `--edits, -d`: list of edit commands + - `--modifiers, -m`: List of modifiers. + - `--keycodes, -k`: List of keycodes. + - `--modes, -o`: List of edit modes. + - `--events, -e`: List of reedline event. + - `--edits, -d`: List of edit commands. ## Input/output types: diff --git a/commands/docs/keybindings_listen.md b/commands/docs/keybindings_listen.md index 7f11c13dcea..c3738f89368 100644 --- a/commands/docs/keybindings_listen.md +++ b/commands/docs/keybindings_listen.md @@ -2,7 +2,7 @@ title: keybindings listen categories: | platform -version: 0.110.0 +version: 0.111.0 platform: | Get input from the user. usage: | diff --git a/commands/docs/kill.md b/commands/docs/kill.md index f1f5ec0c4d3..6edd2b2d5f7 100644 --- a/commands/docs/kill.md +++ b/commands/docs/kill.md @@ -2,11 +2,11 @@ title: kill categories: | platform -version: 0.110.0 +version: 0.111.0 platform: | - Kill a process using the process id. + Kill a process using its process ID. usage: | - Kill a process using the process id. + Kill a process using its process ID. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `kill` for [platform](/commands/categories/platform.md) -
Kill a process using the process id.
+
Kill a process using its process ID.
## Signature @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--force, -f`: forcefully kill the process - - `--quiet, -q`: won't print anything to the console - - `--signal, -s {int}`: signal decimal number to be sent instead of the default 15 (unsupported on Windows) + - `--force, -f`: Forcefully kill the process. + - `--quiet, -q`: Won't print anything to the console. + - `--signal, -s {int}`: Signal decimal number to be sent instead of the default 15 (unsupported on Windows). ## Parameters @@ -38,19 +38,19 @@ contributors: false | nothing | any | ## Examples -Kill the pid using the most memory +Kill the pid using the most memory. ```nu > ps | sort-by mem | last | kill $in.pid ``` -Force kill a given pid +Force kill a given pid. ```nu > kill --force 12345 ``` -Send INT signal +Send INT signal. ```nu > kill -s 2 12345 diff --git a/commands/docs/last.md b/commands/docs/last.md index 13308a6531b..3fa400b9bfd 100644 --- a/commands/docs/last.md +++ b/commands/docs/last.md @@ -2,7 +2,7 @@ title: last categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Return only the last several rows of the input. Counterpart of `first`. Opposite of `drop`. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--strict, -s`: Throw an error if input is empty + - `--strict, -s`: Throw an error if input is empty. ## Parameters @@ -38,7 +38,7 @@ contributors: false | range | any | ## Examples -Return the last 2 items of a list/table +Return the last 2 items of a list/table. ```nu > [1,2,3] | last 2 ╭───┬───╮ @@ -48,13 +48,13 @@ Return the last 2 items of a list/table ``` -Return the last item of a list/table +Return the last item of a list/table. ```nu > [1,2,3] | last 3 ``` -Return the last 2 bytes of a binary value +Return the last 2 bytes of a binary value. ```nu > 0x[01 23 45] | last 2 Length: 2 (0x2) bytes | printable whitespace ascii_other non_ascii @@ -62,7 +62,7 @@ Length: 2 (0x2) bytes | printable whitespace ascii_other non_ascii ``` -Return the last item of a range +Return the last item of a range. ```nu > 1..3 | last 3 diff --git a/commands/docs/length.md b/commands/docs/length.md index e879352e861..f66a3172c2f 100644 --- a/commands/docs/length.md +++ b/commands/docs/length.md @@ -2,7 +2,7 @@ title: length categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Count the number of items in an input list, rows in a table, or bytes in binary data. usage: | @@ -23,11 +23,12 @@ contributors: false ## Input/output types: -| input | output | -| --------- | ------ | -| list<any> | int | -| binary | int | -| nothing | int | +| input | output | +| ------------------ | ------ | +| list<any> | int | +| binary | int | +| nothing | int | +| SQLiteQueryBuilder | int | ## Examples Count the number of items in a list diff --git a/commands/docs/let-env.md b/commands/docs/let-env.md index ca86f699986..dc1a92d12c4 100644 --- a/commands/docs/let-env.md +++ b/commands/docs/let-env.md @@ -2,7 +2,7 @@ title: let-env categories: | removed -version: 0.110.0 +version: 0.111.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 0584f71aa1a..e07d5c05cad 100644 --- a/commands/docs/let.md +++ b/commands/docs/let.md @@ -2,7 +2,7 @@ title: let categories: | core -version: 0.110.0 +version: 0.111.0 core: | Create a variable and give it a value. usage: | @@ -22,41 +22,53 @@ contributors: false ## Parameters - - `var_name`: Variable name. + - `var_name`: The variable name to create. - `initial_value`: Equals sign followed by value. ## Input/output types: -| input | output | -| ----- | ------- | -| any | nothing | +| input | output | +| ----- | ------ | +| any | any | ## Examples -Set a variable to a value +Set a variable to a value (no output). ```nu > let x = 10 ``` -Set a variable to the result of an expression +Set a variable to the result of an expression (no output). ```nu > let x = 10 + 100 ``` -Set a variable based on the condition +Set a variable based on the condition (no output). ```nu > let x = if false { -1 } else { 1 } ``` -Set a variable to the output of a pipeline +Set a variable to the output of a pipeline. ```nu > ls | let files ``` +Use let in the middle of a pipeline to assign and pass the value. +```nu +> 10 | let x | $x + 5 +15 +``` + +Use let in the middle of a pipeline, then consume value with $in. +```nu +> 10 | let x | $in + 5 +15 +``` + ## Notes This command is a parser keyword. For details, check: https://www.nushell.sh/book/thinking_in_nu.html \ No newline at end of file diff --git a/commands/docs/lines.md b/commands/docs/lines.md index 3de77f95e19..50da348387a 100644 --- a/commands/docs/lines.md +++ b/commands/docs/lines.md @@ -2,7 +2,7 @@ title: lines categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Converts input to lines. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--skip-empty, -s`: skip empty lines + - `--skip-empty, -s`: Skip empty lines. ## Input/output types: diff --git a/commands/docs/load-env.md b/commands/docs/load-env.md index 7169792419c..e498a95ac2d 100644 --- a/commands/docs/load-env.md +++ b/commands/docs/load-env.md @@ -2,7 +2,7 @@ title: load-env categories: | filesystem -version: 0.110.0 +version: 0.111.0 filesystem: | Loads an environment update from a record. usage: | @@ -34,13 +34,13 @@ contributors: false | any | nothing | ## Examples -Load variables from an input stream +Load variables from an input stream. ```nu > {NAME: ABE, AGE: UNKNOWN} | load-env; $env.NAME ABE ``` -Load variables from an argument +Load variables from an argument. ```nu > load-env {NAME: ABE, AGE: UNKNOWN}; $env.NAME ABE diff --git a/commands/docs/loop.md b/commands/docs/loop.md index 0db85a68747..8d9022a0ef9 100644 --- a/commands/docs/loop.md +++ b/commands/docs/loop.md @@ -2,7 +2,7 @@ title: loop categories: | core -version: 0.110.0 +version: 0.111.0 core: | Run a block in a loop. usage: | @@ -32,7 +32,7 @@ contributors: false | nothing | nothing | ## Examples -Loop while a condition is true +Loop while a condition is true. ```nu > mut x = 0; loop { if $x > 10 { break }; $x = $x + 1 }; $x 11 diff --git a/commands/docs/ls.md b/commands/docs/ls.md index 83db56ace27..c4676c104b4 100644 --- a/commands/docs/ls.md +++ b/commands/docs/ls.md @@ -2,7 +2,7 @@ title: ls categories: | filesystem -version: 0.110.0 +version: 0.111.0 filesystem: | List the filenames, sizes, and modification times of items in a directory. usage: | @@ -22,13 +22,13 @@ contributors: false ## Flags - - `--all, -a`: Show hidden files - - `--long, -l`: Get all available columns for each entry (slower; columns are platform-dependent) - - `--short-names, -s`: Only print the file names, and not the path - - `--full-paths, -f`: display paths as absolute paths - - `--du, -d`: Display the apparent directory size ("disk usage") in place of the directory metadata size - - `--directory, -D`: List the specified directory itself instead of its contents - - `--mime-type, -m`: Show mime-type in type column instead of 'file' (based on filenames only; files' contents are not examined) + - `--all, -a`: Show hidden files. + - `--long, -l`: Get all available columns for each entry (slower; columns are platform-dependent). + - `--short-names, -s`: Only print the file names, and not the path. + - `--full-paths, -f`: Display paths as absolute paths. + - `--du, -d`: Display the apparent directory size ("disk usage") in place of the directory metadata size. + - `--directory, -D`: List the specified directory itself instead of its contents. + - `--mime-type, -m`: Show mime-type in type column instead of 'file' (based on filenames only; files' contents are not examined). - `--threads, -t`: Use multiple threads to list contents. Output will be non-deterministic. ## Parameters @@ -43,61 +43,61 @@ contributors: false | nothing | table | ## Examples -List visible files in the current directory +List visible files in the current directory. ```nu > ls ``` -List visible files in a subdirectory +List visible files in a subdirectory. ```nu > ls subdir ``` -List visible files with full path in the parent directory +List visible files with full path in the parent directory. ```nu > ls -f .. ``` -List Rust files +List Rust files. ```nu > ls *.rs ``` -List files and directories whose name do not contain 'bar' +List files and directories whose name do not contain 'bar'. ```nu > ls | where name !~ bar ``` -List the full path of all dirs in your home directory +List the full path of all dirs in your home directory. ```nu > ls -a ~ | where type == dir ``` -List only the names (not paths) of all dirs in your home directory which have not been modified in 7 days +List only the names (not paths) of all dirs in your home directory which have not been modified in 7 days. ```nu > ls -as ~ | where type == dir and modified < ((date now) - 7day) ``` -Recursively list all files and subdirectories under the current directory using a glob pattern +Recursively list all files and subdirectories under the current directory using a glob pattern. ```nu > ls -a **/* ``` -Recursively list *.rs and *.toml files using the glob command +Recursively list *.rs and *.toml files using the glob command. ```nu > ls ...(glob **/*.{rs,toml}) ``` -List given paths and show directories themselves +List given paths and show directories themselves. ```nu > ['/path/to/directory' '/path/to/file'] | each {|| ls -D $in } | flatten diff --git a/commands/docs/match.md b/commands/docs/match.md index 0f0420f8819..aef11b5ed56 100644 --- a/commands/docs/match.md +++ b/commands/docs/match.md @@ -2,7 +2,7 @@ title: match categories: | core -version: 0.110.0 +version: 0.111.0 core: | Conditionally run a block on a matched value. usage: | @@ -33,49 +33,49 @@ contributors: false | any | any | ## Examples -Match on a value +Match on a value. ```nu > match 3 { 1 => 'one', 2 => 'two', 3 => 'three' } three ``` -Match against alternative values +Match against alternative values. ```nu > match 'three' { 1 | 'one' => '-', 2 | 'two' => '--', 3 | 'three' => '---' } --- ``` -Match on a value in range +Match on a value in range. ```nu > match 3 { 1..10 => 'yes!' } yes! ``` -Match on a field in a record +Match on a field in a record. ```nu > match {a: 100} { {a: $my_value} => { $my_value } } 100 ``` -Match with a catch-all +Match with a catch-all. ```nu > match 3 { 1 => { 'yes!' }, _ => { 'no!' } } no! ``` -Match against a list +Match against a list. ```nu > match [1, 2, 3] { [$a, $b, $c] => { $a + $b + $c }, _ => 0 } 6 ``` -Match against pipeline input +Match against pipeline input. ```nu > {a: {b: 3}} | match $in {{a: { $b }} => ($b + 10) } 13 ``` -Match with a guard +Match with a guard. ```nu > match [1 2 3] { [$x, ..$y] if $x == 1 => { 'good list' }, diff --git a/commands/docs/math.md b/commands/docs/math.md index 2a5ea462fbb..5ec1a39e59f 100644 --- a/commands/docs/math.md +++ b/commands/docs/math.md @@ -2,7 +2,7 @@ title: math categories: | math -version: 0.110.0 +version: 0.111.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 7935813848e..0a866523deb 100644 --- a/commands/docs/math_abs.md +++ b/commands/docs/math_abs.md @@ -2,7 +2,7 @@ title: math abs categories: | math -version: 0.110.0 +version: 0.111.0 math: | Returns the absolute value of a number. usage: | @@ -32,7 +32,7 @@ contributors: false | range | list<number> | ## Examples -Compute absolute value of each number in a list of numbers +Compute absolute value of each number in a list of numbers. ```nu > [-50 -100.0 25] | math abs ╭───┬────────╮ diff --git a/commands/docs/math_arccos.md b/commands/docs/math_arccos.md index 0516ffc1b6b..a274e83a4de 100644 --- a/commands/docs/math_arccos.md +++ b/commands/docs/math_arccos.md @@ -2,7 +2,7 @@ title: math arccos categories: | math -version: 0.110.0 +version: 0.111.0 math: | Returns the arccosine of the number. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--degrees, -d`: Return degrees instead of radians + - `--degrees, -d`: Return degrees instead of radians. ## Input/output types: diff --git a/commands/docs/math_arccosh.md b/commands/docs/math_arccosh.md index 7b0e10b0a3e..9135d4afe3a 100644 --- a/commands/docs/math_arccosh.md +++ b/commands/docs/math_arccosh.md @@ -2,7 +2,7 @@ title: math arccosh categories: | math -version: 0.110.0 +version: 0.111.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 932f4d1d8dd..c72a7c790ac 100644 --- a/commands/docs/math_arcsin.md +++ b/commands/docs/math_arcsin.md @@ -2,7 +2,7 @@ title: math arcsin categories: | math -version: 0.110.0 +version: 0.111.0 math: | Returns the arcsine of the number. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--degrees, -d`: Return degrees instead of radians + - `--degrees, -d`: Return degrees instead of radians. ## Input/output types: diff --git a/commands/docs/math_arcsinh.md b/commands/docs/math_arcsinh.md index f97512d9e0a..de8b2efac14 100644 --- a/commands/docs/math_arcsinh.md +++ b/commands/docs/math_arcsinh.md @@ -2,7 +2,7 @@ title: math arcsinh categories: | math -version: 0.110.0 +version: 0.111.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 f983891b52c..daee35cdc23 100644 --- a/commands/docs/math_arctan.md +++ b/commands/docs/math_arctan.md @@ -2,7 +2,7 @@ title: math arctan categories: | math -version: 0.110.0 +version: 0.111.0 math: | Returns the arctangent of the number. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--degrees, -d`: Return degrees instead of radians + - `--degrees, -d`: Return degrees instead of radians. ## Input/output types: diff --git a/commands/docs/math_arctanh.md b/commands/docs/math_arctanh.md index e1a6715d557..19940f572de 100644 --- a/commands/docs/math_arctanh.md +++ b/commands/docs/math_arctanh.md @@ -2,7 +2,7 @@ title: math arctanh categories: | math -version: 0.110.0 +version: 0.111.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 cee379591bc..3d1547df41e 100644 --- a/commands/docs/math_avg.md +++ b/commands/docs/math_avg.md @@ -2,7 +2,7 @@ title: math avg categories: | math -version: 0.110.0 +version: 0.111.0 math: | Returns the average of a list of numbers. usage: | @@ -36,19 +36,19 @@ contributors: false | record | record | ## Examples -Compute the average of a list of numbers +Compute the average of a list of numbers. ```nu > [-50 100.0 25] | math avg 25.0 ``` -Compute the average of a list of durations +Compute the average of a list of durations. ```nu > [2sec 1min] | math avg 31sec ``` -Compute the average of each column in a table +Compute the average of each column in a table. ```nu > [[a b]; [1 2] [3 4]] | math avg ╭───┬───╮ diff --git a/commands/docs/math_ceil.md b/commands/docs/math_ceil.md index b4c7155e41c..232cfd5915a 100644 --- a/commands/docs/math_ceil.md +++ b/commands/docs/math_ceil.md @@ -2,7 +2,7 @@ title: math ceil categories: | math -version: 0.110.0 +version: 0.111.0 math: | Returns the ceil of a number (smallest integer greater than or equal to that number). usage: | @@ -30,7 +30,7 @@ contributors: false | range | list<number> | ## Examples -Apply the ceil function to a list of numbers +Apply the ceil function to a list of numbers. ```nu > [1.5 2.3 -3.1] | math ceil ╭───┬────╮ diff --git a/commands/docs/math_cos.md b/commands/docs/math_cos.md index 21f94732048..90a40796e6e 100644 --- a/commands/docs/math_cos.md +++ b/commands/docs/math_cos.md @@ -2,7 +2,7 @@ title: math cos categories: | math -version: 0.110.0 +version: 0.111.0 math: | Returns the cosine of the number. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--degrees, -d`: Use degrees instead of radians + - `--degrees, -d`: Use degrees instead of radians. ## Input/output types: diff --git a/commands/docs/math_cosh.md b/commands/docs/math_cosh.md index 2c0e52c9392..7d9af55fe14 100644 --- a/commands/docs/math_cosh.md +++ b/commands/docs/math_cosh.md @@ -2,7 +2,7 @@ title: math cosh categories: | math -version: 0.110.0 +version: 0.111.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 03ae8a7fd96..29748d4ea8f 100644 --- a/commands/docs/math_exp.md +++ b/commands/docs/math_exp.md @@ -2,7 +2,7 @@ title: math exp categories: | math -version: 0.110.0 +version: 0.111.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 c363fce50e6..6e0cdd7c94d 100644 --- a/commands/docs/math_floor.md +++ b/commands/docs/math_floor.md @@ -2,7 +2,7 @@ title: math floor categories: | math -version: 0.110.0 +version: 0.111.0 math: | Returns the floor of a number (largest integer less than or equal to that number). usage: | @@ -30,7 +30,7 @@ contributors: false | range | list<number> | ## Examples -Apply the floor function to a list of numbers +Apply the floor function to a list of numbers. ```nu > [1.5 2.3 -3.1] | math floor ╭───┬────╮ diff --git a/commands/docs/math_ln.md b/commands/docs/math_ln.md index d47c37d5857..1be846c466c 100644 --- a/commands/docs/math_ln.md +++ b/commands/docs/math_ln.md @@ -2,7 +2,7 @@ title: math ln categories: | math -version: 0.110.0 +version: 0.111.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 29b449ee50e..5f1010fa6e3 100644 --- a/commands/docs/math_log.md +++ b/commands/docs/math_log.md @@ -2,7 +2,7 @@ title: math log categories: | math -version: 0.110.0 +version: 0.111.0 math: | Returns the logarithm for an arbitrary base. usage: | @@ -34,13 +34,13 @@ contributors: false | range | list<number> | ## Examples -Get the logarithm of 100 to the base 10 +Get the logarithm of 100 to the base 10. ```nu > 100 | math log 10 2.0 ``` -Get the log2 of a list of values +Get the log2 of a list of values. ```nu > [16 8 4] | math log 2 ╭───┬──────╮ diff --git a/commands/docs/math_max.md b/commands/docs/math_max.md index 635ba9e6c06..957d6ac7528 100644 --- a/commands/docs/math_max.md +++ b/commands/docs/math_max.md @@ -2,7 +2,7 @@ title: math max categories: | math -version: 0.110.0 +version: 0.111.0 math: | Returns the maximum of a list of values, or of columns in a table. usage: | @@ -34,13 +34,13 @@ contributors: false | record | record | ## Examples -Find the maximum of a list of numbers +Find the maximum of a list of numbers. ```nu > [-50 100 25] | math max 100 ``` -Find the maxima of the columns of a table +Find the maxima of the columns of a table. ```nu > [{a: 1 b: 3} {a: 2 b: -1}] | math max ╭───┬───╮ @@ -49,7 +49,7 @@ Find the maxima of the columns of a table ╰───┴───╯ ``` -Find the maximum of a list of dates +Find the maximum of a list of dates. ```nu > [2022-02-02 2022-12-30 2012-12-12] | math max Fri, 30 Dec 2022 00:00:00 +0000 (3 years ago) diff --git a/commands/docs/math_median.md b/commands/docs/math_median.md index ff0fdfcc689..db391b2ef55 100644 --- a/commands/docs/math_median.md +++ b/commands/docs/math_median.md @@ -2,7 +2,7 @@ title: math median categories: | math -version: 0.110.0 +version: 0.111.0 math: | Computes the median of a list of numbers. usage: | @@ -33,13 +33,13 @@ contributors: false | record | record | ## Examples -Compute the median of a list of numbers +Compute the median of a list of numbers. ```nu > [3 8 9 12 12 15] | math median 10.5 ``` -Compute the medians of the columns of a table +Compute the medians of the columns of a table. ```nu > [{a: 1 b: 3} {a: 2 b: -1} {a: -3 b: 5}] | math median ╭───┬───╮ @@ -48,7 +48,7 @@ Compute the medians of the columns of a table ╰───┴───╯ ``` -Find the median of a list of file sizes +Find the median of a list of file sizes. ```nu > [5KB 10MB 200B] | math median 5.0 kB diff --git a/commands/docs/math_min.md b/commands/docs/math_min.md index 6c431deb7b2..90e12734dc0 100644 --- a/commands/docs/math_min.md +++ b/commands/docs/math_min.md @@ -2,7 +2,7 @@ title: math min categories: | math -version: 0.110.0 +version: 0.111.0 math: | Finds the minimum within a list of values or tables. usage: | @@ -34,13 +34,13 @@ contributors: false | record | record | ## Examples -Compute the minimum of a list of numbers +Compute the minimum of a list of numbers. ```nu > [-50 100 25] | math min -50 ``` -Compute the minima of the columns of a table +Compute the minima of the columns of a table. ```nu > [{a: 1 b: 3} {a: 2 b: -1}] | math min ╭───┬────╮ @@ -49,7 +49,7 @@ Compute the minima of the columns of a table ╰───┴────╯ ``` -Find the minimum of a list of arbitrary values (Warning: Weird) +Find the minimum of a list of arbitrary values (Warning: Weird). ```nu > [-50 'hello' true] | math min true diff --git a/commands/docs/math_mode.md b/commands/docs/math_mode.md index 4a5f2fb321b..c38354d4f1d 100644 --- a/commands/docs/math_mode.md +++ b/commands/docs/math_mode.md @@ -2,7 +2,7 @@ title: math mode categories: | math -version: 0.110.0 +version: 0.111.0 math: | Returns the most frequent element(s) from a list of numbers or tables. usage: | @@ -31,7 +31,7 @@ contributors: false | table | record | ## Examples -Compute the mode(s) of a list of numbers +Compute the mode(s) of a list of numbers. ```nu > [3 3 9 12 12 15] | math mode ╭───┬────╮ @@ -41,7 +41,7 @@ Compute the mode(s) of a list of numbers ``` -Compute the mode(s) of the columns of a table +Compute the mode(s) of the columns of a table. ```nu > [{a: 1 b: 3} {a: 2 b: -1} {a: 1 b: 5}] | math mode ╭───┬────────────╮ diff --git a/commands/docs/math_product.md b/commands/docs/math_product.md index c5d7df40e9e..f8ebf6bb655 100644 --- a/commands/docs/math_product.md +++ b/commands/docs/math_product.md @@ -2,7 +2,7 @@ title: math product categories: | math -version: 0.110.0 +version: 0.111.0 math: | Returns the product of a list of numbers or the products of each column of a table. usage: | @@ -31,13 +31,13 @@ contributors: false | record | record | ## Examples -Compute the product of a list of numbers +Compute the product of a list of numbers. ```nu > [2 3 3 4] | math product 72 ``` -Compute the product of each column in a table +Compute the product of each column in a table. ```nu > [[a b]; [1 2] [3 4]] | math product ╭───┬───╮ diff --git a/commands/docs/math_round.md b/commands/docs/math_round.md index 69763ebd736..594bc1eb274 100644 --- a/commands/docs/math_round.md +++ b/commands/docs/math_round.md @@ -2,7 +2,7 @@ title: math round categories: | math -version: 0.110.0 +version: 0.111.0 math: | Returns the input number rounded to the specified precision. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--precision, -p {number}`: digits of precision + - `--precision, -p {number}`: Digits of precision. ## Input/output types: @@ -34,7 +34,7 @@ contributors: false | range | list<number> | ## Examples -Apply the round function to a list of numbers +Apply the round function to a list of numbers. ```nu > [1.5 2.3 -3.1] | math round ╭───┬────╮ @@ -45,7 +45,7 @@ Apply the round function to a list of numbers ``` -Apply the round function with precision specified +Apply the round function with precision specified. ```nu > [1.555 2.333 -3.111] | math round --precision 2 ╭───┬───────╮ @@ -56,7 +56,7 @@ Apply the round function with precision specified ``` -Apply negative precision to a list of numbers +Apply negative precision to a list of numbers. ```nu > [123, 123.3, -123.4] | math round --precision -1 ╭───┬──────╮ diff --git a/commands/docs/math_sin.md b/commands/docs/math_sin.md index 03f37bbd494..6af59e6f622 100644 --- a/commands/docs/math_sin.md +++ b/commands/docs/math_sin.md @@ -2,7 +2,7 @@ title: math sin categories: | math -version: 0.110.0 +version: 0.111.0 math: | Returns the sine of the number. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--degrees, -d`: Use degrees instead of radians + - `--degrees, -d`: Use degrees instead of radians. ## Input/output types: diff --git a/commands/docs/math_sinh.md b/commands/docs/math_sinh.md index 0c9028f6a1e..18a7db25eda 100644 --- a/commands/docs/math_sinh.md +++ b/commands/docs/math_sinh.md @@ -2,7 +2,7 @@ title: math sinh categories: | math -version: 0.110.0 +version: 0.111.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 e9ad2b8fbd2..6ad353c40f5 100644 --- a/commands/docs/math_sqrt.md +++ b/commands/docs/math_sqrt.md @@ -2,7 +2,7 @@ title: math sqrt categories: | math -version: 0.110.0 +version: 0.111.0 math: | Returns the square root of the input number. usage: | @@ -30,7 +30,7 @@ contributors: false | range | list<number> | ## Examples -Compute the square root of each number in a list +Compute the square root of each number in a list. ```nu > [9 16] | math sqrt ╭───┬──────╮ diff --git a/commands/docs/math_stddev.md b/commands/docs/math_stddev.md index e5de6c0ecab..2d881219c1f 100644 --- a/commands/docs/math_stddev.md +++ b/commands/docs/math_stddev.md @@ -2,7 +2,7 @@ title: math stddev categories: | math -version: 0.110.0 +version: 0.111.0 math: | Returns the standard deviation of a list of numbers, or of each column in a table. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--sample, -s`: calculate sample standard deviation (i.e. using N-1 as the denominator) + - `--sample, -s`: Calculate sample standard deviation (i.e. using N-1 as the denominator). ## Input/output types: @@ -35,19 +35,19 @@ contributors: false | record | record | ## Examples -Compute the standard deviation of a list of numbers +Compute the standard deviation of a list of numbers. ```nu > [1 2 3 4 5] | math stddev 1.4142135623730951 ``` -Compute the sample standard deviation of a list of numbers +Compute the sample standard deviation of a list of numbers. ```nu > [1 2 3 4 5] | math stddev --sample 1.5811388300841898 ``` -Compute the standard deviation of each column in a table +Compute the standard deviation of each column in a table. ```nu > [[a b]; [1 2] [3 4]] | math stddev ╭───┬───╮ diff --git a/commands/docs/math_sum.md b/commands/docs/math_sum.md index 2e7a0932ea9..16c72e1f3e5 100644 --- a/commands/docs/math_sum.md +++ b/commands/docs/math_sum.md @@ -2,7 +2,7 @@ title: math sum categories: | math -version: 0.110.0 +version: 0.111.0 math: | Returns the sum of a list of numbers or of each column in a table. usage: | @@ -33,19 +33,19 @@ contributors: false | record | record | ## Examples -Sum a list of numbers +Sum a list of numbers. ```nu > [1 2 3] | math sum 6 ``` -Get the disk usage for the current directory +Get the disk usage for the current directory. ```nu > ls | get size | math sum ``` -Compute the sum of each column in a table +Compute the sum of each column in a table. ```nu > [[a b]; [1 2] [3 4]] | math sum ╭───┬───╮ diff --git a/commands/docs/math_tan.md b/commands/docs/math_tan.md index de16ce35f57..e0d130c6c7e 100644 --- a/commands/docs/math_tan.md +++ b/commands/docs/math_tan.md @@ -2,7 +2,7 @@ title: math tan categories: | math -version: 0.110.0 +version: 0.111.0 math: | Returns the tangent of the number. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--degrees, -d`: Use degrees instead of radians + - `--degrees, -d`: Use degrees instead of radians. ## Input/output types: diff --git a/commands/docs/math_tanh.md b/commands/docs/math_tanh.md index 6c5d6aaf0a7..818fc9bf01a 100644 --- a/commands/docs/math_tanh.md +++ b/commands/docs/math_tanh.md @@ -2,7 +2,7 @@ title: math tanh categories: | math -version: 0.110.0 +version: 0.111.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 2d1c4380fd3..54177d57cf9 100644 --- a/commands/docs/math_variance.md +++ b/commands/docs/math_variance.md @@ -2,7 +2,7 @@ title: math variance categories: | math -version: 0.110.0 +version: 0.111.0 math: | Returns the variance of a list of numbers or of each column in a table. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--sample, -s`: calculate sample variance (i.e. using N-1 as the denominator) + - `--sample, -s`: Calculate sample variance (i.e. using N-1 as the denominator). ## Input/output types: @@ -35,19 +35,19 @@ contributors: false | record | record | ## Examples -Get the variance of a list of numbers +Get the variance of a list of numbers. ```nu > [1 2 3 4 5] | math variance 2.0 ``` -Get the sample variance of a list of numbers +Get the sample variance of a list of numbers. ```nu > [1 2 3 4 5] | math variance --sample 2.5 ``` -Compute the variance of each column in a table +Compute the variance of each column in a table. ```nu > [[a b]; [1 2] [3 4]] | math variance ╭───┬───╮ diff --git a/commands/docs/merge.md b/commands/docs/merge.md index b025dcd2831..5d738b88ffe 100644 --- a/commands/docs/merge.md +++ b/commands/docs/merge.md @@ -2,7 +2,7 @@ title: merge categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Merge the input with a record or table, overwriting values in matching columns. usage: | @@ -33,7 +33,7 @@ contributors: false | table | table | ## Examples -Add an 'id' column to the input table +Add an 'id' column to the input table. ```nu > [a b c] | wrap name | merge ( [47 512 618] | wrap id ) ╭───┬──────┬─────╮ @@ -46,7 +46,7 @@ Add an 'id' column to the input table ``` -Merge two records +Merge two records. ```nu > {a: 1, b: 2} | merge {c: 3} ╭───┬───╮ @@ -56,7 +56,7 @@ Merge two records ╰───┴───╯ ``` -Merge two tables, overwriting overlapping columns +Merge two tables, overwriting overlapping columns. ```nu > [{columnA: A0 columnB: B0}] | merge [{columnA: 'A0*'}] ╭───┬─────────┬─────────╮ diff --git a/commands/docs/merge_deep.md b/commands/docs/merge_deep.md index 7b723d0b03d..8bc0105fc48 100644 --- a/commands/docs/merge_deep.md +++ b/commands/docs/merge_deep.md @@ -2,7 +2,7 @@ title: merge deep categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Merge the input with a record or table, recursively merging values in matching columns. usage: | diff --git a/commands/docs/metadata.md b/commands/docs/metadata.md index 5899499da04..c1818f9cbe2 100644 --- a/commands/docs/metadata.md +++ b/commands/docs/metadata.md @@ -2,7 +2,7 @@ title: metadata categories: | debug -version: 0.110.0 +version: 0.111.0 debug: | Get the metadata for items in the stream. usage: | @@ -32,13 +32,13 @@ contributors: false | any | record | ## Examples -Get the metadata of a variable +Get the metadata of a variable. ```nu > let a = 42; metadata $a ``` -Get the metadata of the input +Get the metadata of the input. ```nu > ls | metadata diff --git a/commands/docs/metadata_access.md b/commands/docs/metadata_access.md index 7ccbc0e26e4..7ed9105d952 100644 --- a/commands/docs/metadata_access.md +++ b/commands/docs/metadata_access.md @@ -2,7 +2,7 @@ title: metadata access categories: | debug -version: 0.110.0 +version: 0.111.0 debug: | Access the metadata for the input stream within a closure. usage: | @@ -32,7 +32,7 @@ contributors: false | any | any | ## Examples -Access metadata and data from a stream together +Access metadata and data from a stream together. ```nu > {foo: bar} | to json --raw | metadata access {|meta| {in: $in, content: $meta.content_type}} ╭─────────┬──────────────────╮ diff --git a/commands/docs/metadata_set.md b/commands/docs/metadata_set.md index ed9d2bf57b7..53dd8747291 100644 --- a/commands/docs/metadata_set.md +++ b/commands/docs/metadata_set.md @@ -2,7 +2,7 @@ title: metadata set categories: | debug -version: 0.110.0 +version: 0.111.0 debug: | Set the metadata for items in the stream. usage: | @@ -22,10 +22,11 @@ contributors: false ## Flags - - `--datasource-ls, -l`: Assign the DataSource::Ls metadata to the input - - `--datasource-filepath, -f {path}`: Assign the DataSource::FilePath metadata to the input - - `--content-type, -c {string}`: Assign content type metadata to the input - - `--merge, -m {record}`: Merge arbitrary metadata fields + - `--datasource-ls, -l`: Assign the DataSource::Ls metadata to the input. + - `--datasource-filepath, -f {path}`: Assign the DataSource::FilePath metadata to the input. + - `--path-columns, -p {list}`: Assign path columns metadata to the input. + - `--content-type, -c {string}`: Assign content type metadata to the input. + - `--merge, -m {record}`: Merge arbitrary metadata fields. ## Parameters @@ -39,31 +40,37 @@ contributors: false | any | any | ## Examples -Set the metadata of a table literal +Set the metadata of a table literal. ```nu > [[name color]; [Cargo.lock '#ff0000'] [Cargo.toml '#00ff00'] [README.md '#0000ff']] | metadata set --datasource-ls ``` -Set the metadata of a file path +Set the metadata of a file path. ```nu > 'crates' | metadata set --datasource-filepath $'(pwd)/crates' ``` -Set the content type metadata +Set the path columns metadata. +```nu +> glob * | wrap path | metadata set --path-columns [path] + +``` + +Set the content type metadata. ```nu > 'crates' | metadata set --content-type text/plain | metadata | get content_type text/plain ``` -Set custom metadata +Set custom metadata. ```nu > "data" | metadata set --merge {custom_key: "value"} | metadata | get custom_key value ``` -Set metadata using a closure +Set metadata using a closure. ```nu > "data" | metadata set --content-type "text/csv" | metadata set {|m| $m | update content_type {$in + "-processed"}} | metadata | get content_type text/csv-processed diff --git a/commands/docs/mkdir.md b/commands/docs/mkdir.md index 012947fd5f5..91fc423c418 100644 --- a/commands/docs/mkdir.md +++ b/commands/docs/mkdir.md @@ -2,7 +2,7 @@ title: mkdir categories: | filesystem -version: 0.110.0 +version: 0.111.0 filesystem: | Create directories, with intermediary directories if required using uutils/coreutils mkdir. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--verbose, -v`: print a message for each created directory. + - `--verbose, -v`: Print a message for each created directory. ## Parameters @@ -36,13 +36,13 @@ contributors: false | nothing | nothing | ## Examples -Make a directory named foo +Make a directory named foo. ```nu > mkdir foo ``` -Make multiple directories and show the paths created +Make multiple directories and show the paths created. ```nu > mkdir -v foo/bar foo2 diff --git a/commands/docs/mktemp.md b/commands/docs/mktemp.md index eebdef2e0f8..53766c53bbc 100644 --- a/commands/docs/mktemp.md +++ b/commands/docs/mktemp.md @@ -2,7 +2,7 @@ title: mktemp categories: | filesystem -version: 0.110.0 +version: 0.111.0 filesystem: | Create temporary files or directories using uutils/coreutils mktemp. usage: | @@ -23,8 +23,8 @@ contributors: false ## Flags - `--suffix {string}`: Append suffix to template; must not contain a slash. - - `--tmpdir-path, -p {path}`: Interpret TEMPLATE relative to tmpdir-path. If tmpdir-path is not set use $TMPDIR - - `--tmpdir, -t`: Interpret TEMPLATE relative to the system temporary directory. + - `--tmpdir-path, -p {path}`: Interpret TEMPLATE relative to tmpdir-path. If tmpdir-path is not set use $TMPDIR. + - `--tmpdir, -t`: Interpret TEMPLATE relative to the system temporary directory. It is implied if template is not provided. - `--directory, -d`: Create a directory instead of a file. - `--dry`: Don't create a file and just return the path that would have been created. @@ -40,10 +40,10 @@ contributors: false | nothing | string | ## Examples -Make a temporary file with the given suffix in the current working directory. +Make a temporary file with the given suffix in the system temp directory. ```nu > mktemp --suffix .txt -/tmp.lekjbhelyx.txt +/tmp/tmp.lekjbhelyx.txt ``` Make a temporary file named testfile.XXX with the 'X's as random characters in the current working directory. diff --git a/commands/docs/module.md b/commands/docs/module.md index 628148939c1..2843f01cee0 100644 --- a/commands/docs/module.md +++ b/commands/docs/module.md @@ -2,7 +2,7 @@ title: module categories: | core -version: 0.110.0 +version: 0.111.0 core: | Define a custom module. usage: | @@ -33,19 +33,19 @@ contributors: false | nothing | nothing | ## Examples -Define a custom command in a module and call it +Define a custom command in a module and call it. ```nu > module spam { export def foo [] { "foo" } }; use spam foo; foo foo ``` -Define an environment variable in a module +Define an environment variable in a module. ```nu > module foo { export-env { $env.FOO = "BAZ" } }; use foo; $env.FOO BAZ ``` -Define a custom command that participates in the environment in a module and call it +Define a custom command that participates in the environment in a module and call it. ```nu > module foo { export def --env bar [] { $env.FOO_BAR = "BAZ" } }; use foo bar; bar; $env.FOO_BAR BAZ diff --git a/commands/docs/move.md b/commands/docs/move.md index 55891febdc0..d3064b3c850 100644 --- a/commands/docs/move.md +++ b/commands/docs/move.md @@ -2,7 +2,7 @@ title: move categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Moves columns relative to other columns or make them the first/last columns. Flags are mutually exclusive. usage: | @@ -22,10 +22,10 @@ contributors: false ## Flags - - `--after {string}`: the column that will precede the columns moved - - `--before {string}`: the column that will be the next after the columns moved - - `--first`: makes the columns be the first ones - - `--last`: makes the columns be the last ones + - `--after {string}`: The column that will precede the columns moved. + - `--before {string}`: The column that will be the next after the columns moved. + - `--first`: Makes the columns be the first ones. + - `--last`: Makes the columns be the last ones. ## Parameters @@ -40,7 +40,7 @@ contributors: false | table | table | ## Examples -Move a column before the first column +Move a column before the first column. ```nu > [[name value index]; [foo a 1] [bar b 2] [baz c 3]] | move index --before name ╭───┬──────┬───────╮ @@ -53,7 +53,7 @@ Move a column before the first column ``` -Move multiple columns after the last column and reorder them +Move multiple columns after the last column and reorder them. ```nu > [[name value index]; [foo a 1] [bar b 2] [baz c 3]] | move value name --after index ╭───┬───────┬──────╮ @@ -66,7 +66,7 @@ Move multiple columns after the last column and reorder them ``` -Move columns of a record +Move columns of a record. ```nu > { name: foo, value: a, index: 1 } | move name --before index ╭───────┬─────╮ diff --git a/commands/docs/mut.md b/commands/docs/mut.md index dbc95bee8be..bc7df59f5d9 100644 --- a/commands/docs/mut.md +++ b/commands/docs/mut.md @@ -2,7 +2,7 @@ title: mut categories: | core -version: 0.110.0 +version: 0.111.0 core: | Create a mutable variable and give it a value. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `var_name`: Variable name. + - `var_name`: The mutable variable name to create. - `initial_value`: Equals sign followed by value. @@ -33,25 +33,25 @@ contributors: false | any | nothing | ## Examples -Set a mutable variable to a value, then update it +Set a mutable variable to a value, then update it. ```nu > mut x = 10; $x = 12 ``` -Upsert a value inside a mutable data structure +Upsert a value inside a mutable data structure. ```nu > mut a = {b:{c:1}}; $a.b.c = 2 ``` -Set a mutable variable to the result of an expression +Set a mutable variable to the result of an expression. ```nu > mut x = 10 + 100 ``` -Set a mutable variable based on the condition +Set a mutable variable based on the condition. ```nu > mut x = if false { -1 } else { 1 } diff --git a/commands/docs/mv.md b/commands/docs/mv.md index eca2e0d7f3f..3fb3c8759cc 100644 --- a/commands/docs/mv.md +++ b/commands/docs/mv.md @@ -2,7 +2,7 @@ title: mv categories: | filesystem -version: 0.110.0 +version: 0.111.0 filesystem: | Move files or directories using uutils/coreutils mv. usage: | @@ -22,13 +22,13 @@ contributors: false ## Flags - - `--force, -f`: do not prompt before overwriting - - `--verbose, -v`: explain what is being done. - - `--progress, -p`: display a progress bar - - `--interactive, -i`: prompt before overwriting - - `--update, -u`: move and overwrite only when the SOURCE file is newer than the destination file or when the destination file is missing - - `--no-clobber, -n`: do not overwrite an existing file - - `--all, -a`: move hidden files if '*' is provided + - `--force, -f`: Do not prompt before overwriting. + - `--verbose, -v`: Explain what is being done. + - `--progress, -p`: Display a progress bar. + - `--interactive, -i`: Prompt before overwriting. + - `--update, -u`: Move and overwrite only when the SOURCE file is newer than the destination file or when the destination file is missing. + - `--no-clobber, -n`: Do not overwrite an existing file. + - `--all, -a`: Move hidden files if '*' is provided. ## Parameters @@ -42,31 +42,31 @@ contributors: false | nothing | nothing | ## Examples -Rename a file +Rename a file. ```nu > mv before.txt after.txt ``` -Move a file into a directory +Move a file into a directory. ```nu > mv test.txt my/subdirectory ``` -Move only if source file is newer than target file +Move only if source file is newer than target file. ```nu > mv -u new/test.txt old/ ``` -Move many files into a directory +Move many files into a directory. ```nu > mv *.txt my/subdirectory ``` -Move a file into the "my" directory two levels up in the directory tree +Move a file into the "my" directory two levels up in the directory tree. ```nu > mv test.txt .../my/ diff --git a/commands/docs/nu-check.md b/commands/docs/nu-check.md index e8ed6383632..d3a1d3fe363 100644 --- a/commands/docs/nu-check.md +++ b/commands/docs/nu-check.md @@ -2,11 +2,11 @@ title: nu-check categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | - Validate and parse input content. + Validate and parse Nushell input content. usage: | - Validate and parse input content. + Validate and parse Nushell input content. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `nu-check` for [strings](/commands/categories/strings.md) -
Validate and parse input content.
+
Validate and parse Nushell input content.
## Signature @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--as-module, -m`: Parse content as module - - `--debug, -d`: Show error messages + - `--as-module, -m`: Parse content as module. + - `--debug, -d`: Show error messages. ## Parameters diff --git a/commands/docs/nu-highlight.md b/commands/docs/nu-highlight.md index 5d9cba09c1f..3cb9ec0fe11 100644 --- a/commands/docs/nu-highlight.md +++ b/commands/docs/nu-highlight.md @@ -2,7 +2,7 @@ title: nu-highlight categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Syntax highlight the input string. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--reject-garbage, -r`: Return an error if invalid syntax (garbage) was encountered + - `--reject-garbage, -r`: Return an error if invalid syntax (garbage) was encountered. ## Input/output types: diff --git a/commands/docs/open.md b/commands/docs/open.md index e5d1a763854..0d97f82b963 100644 --- a/commands/docs/open.md +++ b/commands/docs/open.md @@ -2,7 +2,7 @@ title: open categories: | filesystem -version: 0.110.0 +version: 0.111.0 filesystem: | Load a file into a cell, converting to table if possible (avoid by appending '--raw'). usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--raw, -r`: open file as raw binary + - `--raw, -r`: Open file as raw binary. ## Parameters @@ -38,37 +38,37 @@ contributors: false | any | any | ## Examples -Open a file, with structure (based on file extension or SQLite database header) +Open a file, with structure (based on file extension or SQLite database header). ```nu > open myfile.json ``` -Open a file, as raw bytes +Open a file, as raw bytes. ```nu > open myfile.json --raw ``` -Open a file, using the input to get filename +Open a file, using the input to get filename. ```nu > 'myfile.txt' | open ``` -Open a file, and decode it by the specified encoding +Open a file, and decode it by the specified encoding. ```nu > open myfile.txt --raw | decode utf-8 ``` -Create a custom `from` parser to open newline-delimited JSON files with `open` +Create a custom `from` parser to open newline-delimited JSON files with `open`. ```nu > def "from ndjson" [] { from json -o }; open myfile.ndjson ``` -Show the extensions for which the `open` command will automatically parse +Show the extensions for which the `open` command will automatically parse. ```nu > scope commands | where name starts-with "from " diff --git a/commands/docs/overlay.md b/commands/docs/overlay.md index 588dbd6d2d6..a2e38148470 100644 --- a/commands/docs/overlay.md +++ b/commands/docs/overlay.md @@ -2,7 +2,7 @@ title: overlay categories: | core -version: 0.110.0 +version: 0.111.0 core: | Commands for manipulating overlays. usage: | diff --git a/commands/docs/overlay_hide.md b/commands/docs/overlay_hide.md index 6fd316f38df..7c5ada4a9d4 100644 --- a/commands/docs/overlay_hide.md +++ b/commands/docs/overlay_hide.md @@ -2,7 +2,7 @@ title: overlay hide categories: | core -version: 0.110.0 +version: 0.111.0 core: | Hide an active overlay. usage: | @@ -23,7 +23,7 @@ contributors: false ## Flags - `--keep-custom, -k`: Keep all newly added commands and aliases in the next activated overlay. - - `--keep-env, -e {list}`: List of environment variables to keep in the next activated overlay + - `--keep-env, -e {list}`: List of environment variables to keep in the next activated overlay. ## Parameters @@ -37,7 +37,7 @@ contributors: false | nothing | nothing | ## Examples -Keep a custom command after hiding the overlay +Keep a custom command after hiding the overlay. ```nu > module spam { export def foo [] { "foo" } } overlay use spam @@ -48,7 +48,7 @@ Keep a custom command after hiding the overlay ``` -Hide an overlay created from a file +Hide an overlay created from a file. ```nu > 'export alias f = "foo"' | save spam.nu overlay use spam.nu @@ -56,7 +56,7 @@ Hide an overlay created from a file ``` -Hide the last activated overlay +Hide the last activated overlay. ```nu > module spam { export-env { $env.FOO = "foo" } } overlay use spam @@ -64,7 +64,7 @@ Hide the last activated overlay ``` -Keep the current working directory when removing an overlay +Keep the current working directory when removing an overlay. ```nu > overlay new spam cd some-dir diff --git a/commands/docs/overlay_list.md b/commands/docs/overlay_list.md index b94b1d8c957..72149cd0bc8 100644 --- a/commands/docs/overlay_list.md +++ b/commands/docs/overlay_list.md @@ -2,7 +2,7 @@ title: overlay list categories: | core -version: 0.110.0 +version: 0.111.0 core: | List all overlays with their active status. usage: | @@ -28,7 +28,7 @@ contributors: false | nothing | table<name: string, active: bool> | ## Examples -List all overlays with their active status +List all overlays with their active status. ```nu > module spam { export def foo [] { "foo" } } overlay use spam @@ -41,7 +41,7 @@ List all overlays with their active status ``` -Get overlay status after hiding +Get overlay status after hiding. ```nu > module spam { export def foo [] { "foo" } } overlay use spam diff --git a/commands/docs/overlay_new.md b/commands/docs/overlay_new.md index cfde1ef12e6..c5678c9e5e7 100644 --- a/commands/docs/overlay_new.md +++ b/commands/docs/overlay_new.md @@ -2,7 +2,7 @@ title: overlay new categories: | core -version: 0.110.0 +version: 0.111.0 core: | Create an empty overlay. usage: | @@ -36,7 +36,7 @@ contributors: false | nothing | nothing | ## Examples -Create an empty overlay +Create an empty overlay. ```nu > overlay new spam diff --git a/commands/docs/overlay_use.md b/commands/docs/overlay_use.md index 5a302cae5c8..9bbdefae892 100644 --- a/commands/docs/overlay_use.md +++ b/commands/docs/overlay_use.md @@ -2,7 +2,7 @@ title: overlay use categories: | core -version: 0.110.0 +version: 0.111.0 core: | Use definitions from a module as an overlay. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--prefix, -p`: Prepend module name to the imported commands and aliases + - `--prefix, -p`: Prepend module name to the imported commands and aliases. - `--reload, -r`: If the overlay already exists, reload its definitions and environment. ## Parameters @@ -38,7 +38,7 @@ contributors: false | nothing | nothing | ## Examples -Create an overlay from a module +Create an overlay from a module. ```nu > module spam { export def foo [] { "foo" } } overlay use spam @@ -46,7 +46,7 @@ Create an overlay from a module ``` -Create an overlay from a module and rename it +Create an overlay from a module and rename it. ```nu > module spam { export def foo [] { "foo" } } overlay use spam as spam_new @@ -54,7 +54,7 @@ Create an overlay from a module and rename it ``` -Create an overlay with a prefix +Create an overlay with a prefix. ```nu > 'export def foo { "foo" }' overlay use --prefix spam @@ -62,7 +62,7 @@ Create an overlay with a prefix ``` -Create an overlay from a file +Create an overlay from a file. ```nu > 'export-env { $env.FOO = "foo" }' | save spam.nu overlay use spam.nu diff --git a/commands/docs/panic.md b/commands/docs/panic.md index d936f6b8eac..5a9eac85568 100644 --- a/commands/docs/panic.md +++ b/commands/docs/panic.md @@ -2,7 +2,7 @@ title: panic categories: | debug -version: 0.110.0 +version: 0.111.0 debug: | Causes nushell to panic. usage: | diff --git a/commands/docs/par-each.md b/commands/docs/par-each.md index 939259851ba..3303e4aa8c7 100644 --- a/commands/docs/par-each.md +++ b/commands/docs/par-each.md @@ -2,7 +2,7 @@ title: par-each categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Run a closure on each row of the input list in parallel, creating a new list with the results. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--threads, -t {int}`: the number of threads to use - - `--keep-order, -k`: keep sequence of output same as the order of input + - `--threads, -t {int}`: The number of threads to use. + - `--keep-order, -k`: Keep sequence of output same as the order of input. ## Parameters @@ -45,7 +45,7 @@ Multiplies each number. Note that the list will become arbitrarily disordered. ``` -Multiplies each number, keeping an original order +Multiplies each number, keeping an original order. ```nu > [1 2 3] | par-each --keep-order {|e| $e * 2 } ╭───┬───╮ @@ -56,7 +56,7 @@ Multiplies each number, keeping an original order ``` -Enumerate and sort-by can be used to reconstruct the original order +Enumerate and sort-by can be used to reconstruct the original order. ```nu > 1..3 | enumerate | par-each {|p| update item ($p.item * 2)} | sort-by item | get item ╭───┬───╮ @@ -67,7 +67,7 @@ Enumerate and sort-by can be used to reconstruct the original order ``` -Output can still be sorted afterward +Output can still be sorted afterward. ```nu > [foo bar baz] | par-each {|e| $e + '!' } | sort ╭───┬──────╮ @@ -78,7 +78,7 @@ Output can still be sorted afterward ``` -Iterate over each element, producing a list showing indexes of any 2s +Iterate over each element, producing a list showing indexes of any 2s. ```nu > [1 2 3] | enumerate | par-each { |e| if $e.item == 2 { $"found 2 at ($e.index)!"} } ╭───┬───────────────╮ diff --git a/commands/docs/parse.md b/commands/docs/parse.md index fb7ef7861fa..5473d0176f1 100644 --- a/commands/docs/parse.md +++ b/commands/docs/parse.md @@ -2,7 +2,7 @@ title: parse categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Parse columns from string data using a simple pattern or a supplied regular expression. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--regex, -r`: use full regex syntax for patterns - - `--backtrack, -b {int}`: set the max backtrack limit for regex + - `--regex, -r`: Use full regex syntax for patterns. + - `--backtrack, -b {int}`: Set the max backtrack limit for regex. ## Parameters @@ -38,7 +38,7 @@ contributors: false | list<any> | table | ## Examples -Parse a string into two named columns +Parse a string into two named columns. ```nu > "hi there" | parse "{foo} {bar}" ╭───┬─────┬───────╮ @@ -49,7 +49,7 @@ Parse a string into two named columns ``` -Parse a string, ignoring a column with _ +Parse a string, ignoring a column with _. ```nu > "hello world" | parse "{foo} {_}" ╭───┬───────╮ @@ -60,7 +60,7 @@ Parse a string, ignoring a column with _ ``` -This is how the first example is interpreted in the source code +This is how the first example is interpreted in the source code. ```nu > "hi there" | parse --regex '(?s)\A(?P.*?) (?P.*?)\z' ╭───┬─────┬───────╮ @@ -71,7 +71,7 @@ This is how the first example is interpreted in the source code ``` -Parse a string using fancy-regex named capture group pattern +Parse a string using fancy-regex named capture group pattern. ```nu > "foo bar." | parse --regex '\s*(?\w+)(?=\.)' ╭───┬──────╮ @@ -82,7 +82,7 @@ Parse a string using fancy-regex named capture group pattern ``` -Parse a string using fancy-regex capture group pattern +Parse a string using fancy-regex capture group pattern. ```nu > "foo! bar." | parse --regex '(\w+)(?=\.)|(\w+)(?=!)' ╭───┬──────────┬──────────╮ @@ -94,7 +94,7 @@ Parse a string using fancy-regex capture group pattern ``` -Parse a string using fancy-regex look behind pattern +Parse a string using fancy-regex look behind pattern. ```nu > " @another(foo bar) " | parse --regex '\s*(?<=[() ])(@\w+)(\([^)]*\))?\s*' ╭───┬──────────┬───────────╮ @@ -105,7 +105,7 @@ Parse a string using fancy-regex look behind pattern ``` -Parse a string using fancy-regex look ahead atomic group pattern +Parse a string using fancy-regex look ahead atomic group pattern. ```nu > "abcd" | parse --regex '^a(bc(?=d)|b)cd$' ╭───┬──────────╮ @@ -116,7 +116,7 @@ Parse a string using fancy-regex look ahead atomic group pattern ``` -Parse a string with a manually set fancy-regex backtrack limit +Parse a string with a manually set fancy-regex backtrack limit. ```nu > "hi there" | parse --backtrack 1500000 "{foo} {bar}" ╭───┬─────┬───────╮ diff --git a/commands/docs/path.md b/commands/docs/path.md index 834c4e0c1c2..cb9e6fd065d 100644 --- a/commands/docs/path.md +++ b/commands/docs/path.md @@ -2,7 +2,7 @@ title: path categories: | path -version: 0.110.0 +version: 0.111.0 path: | Explore and manipulate paths. usage: | diff --git a/commands/docs/path_basename.md b/commands/docs/path_basename.md index ab35da2788a..256c02ae8a7 100644 --- a/commands/docs/path_basename.md +++ b/commands/docs/path_basename.md @@ -2,7 +2,7 @@ title: path basename categories: | path -version: 0.110.0 +version: 0.111.0 path: | Get the final component of a path. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--replace, -r {string}`: Return original path with basename replaced by this string + - `--replace, -r {string}`: Return original path with basename replaced by this string. ## Input/output types: @@ -33,13 +33,13 @@ contributors: false | list<string> | list<string> | ## Examples -Get basename of a path +Get basename of a path. ```nu > '/home/joe/test.txt' | path basename test.txt ``` -Get basename of a list of paths +Get basename of a list of paths. ```nu > [ /home/joe, /home/doe ] | path basename ╭───┬─────╮ @@ -49,7 +49,7 @@ Get basename of a list of paths ``` -Replace basename of a path +Replace basename of a path. ```nu > '/home/joe/test.txt' | path basename --replace 'spam.png' /home/joe/spam.png diff --git a/commands/docs/path_dirname.md b/commands/docs/path_dirname.md index 7bf3c6ebb06..0124cd6b46a 100644 --- a/commands/docs/path_dirname.md +++ b/commands/docs/path_dirname.md @@ -2,7 +2,7 @@ title: path dirname categories: | path -version: 0.110.0 +version: 0.111.0 path: | Get the parent directory of a path. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--replace, -r {string}`: Return original path with dirname replaced by this string - - `--num-levels, -n {int}`: Number of directories to walk up + - `--replace, -r {string}`: Return original path with dirname replaced by this string. + - `--num-levels, -n {int}`: Number of directories to walk up. ## Input/output types: @@ -34,13 +34,13 @@ contributors: false | list<string> | list<string> | ## Examples -Get dirname of a path +Get dirname of a path. ```nu > '/home/joe/code/test.txt' | path dirname /home/joe/code ``` -Get dirname of a list of paths +Get dirname of a list of paths. ```nu > [ /home/joe/test.txt, /home/doe/test.txt ] | path dirname ╭───┬───────────╮ @@ -50,13 +50,13 @@ Get dirname of a list of paths ``` -Walk up two levels +Walk up two levels. ```nu > '/home/joe/code/test.txt' | path dirname --num-levels 2 /home/joe ``` -Replace the part that would be returned with a custom path +Replace the part that would be returned with a custom path. ```nu > '/home/joe/code/test.txt' | path dirname --num-levels 2 --replace /home/viking /home/viking/code/test.txt diff --git a/commands/docs/path_exists.md b/commands/docs/path_exists.md index 22939147a2c..bb386ca7837 100644 --- a/commands/docs/path_exists.md +++ b/commands/docs/path_exists.md @@ -2,7 +2,7 @@ title: path exists categories: | path -version: 0.110.0 +version: 0.111.0 path: | Check whether a path exists. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--no-symlink, -n`: Do not resolve symbolic links + - `--no-symlink, -n`: Do not resolve symbolic links. ## Input/output types: @@ -33,13 +33,13 @@ contributors: false | list<string> | list<bool> | ## Examples -Check if a file exists +Check if a file exists. ```nu > '/home/joe/todo.txt' | path exists false ``` -Check if files in list exist +Check if files in list exist. ```nu > [ /home/joe/todo.txt, /home/doe/todo.txt ] | path exists ╭───┬───────╮ diff --git a/commands/docs/path_expand.md b/commands/docs/path_expand.md index 2b5bfa2376c..0bf856de9ef 100644 --- a/commands/docs/path_expand.md +++ b/commands/docs/path_expand.md @@ -2,7 +2,7 @@ title: path expand categories: | path -version: 0.110.0 +version: 0.111.0 path: | Try to expand a path to its absolute form. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--strict, -s`: Throw an error if the path could not be expanded - - `--no-symlink, -n`: Do not resolve symbolic links + - `--strict, -s`: Throw an error if the path could not be expanded. + - `--no-symlink, -n`: Do not resolve symbolic links. ## Input/output types: @@ -34,19 +34,19 @@ contributors: false | list<string> | list<string> | ## Examples -Expand an absolute path +Expand an absolute path. ```nu > '/home/joe/foo/../bar' | path expand /home/joe/bar ``` -Expand a relative path +Expand a relative path. ```nu > 'foo/../bar' | path expand ``` -Expand a list of paths +Expand a list of paths. ```nu > [ /foo/../bar, /foo/../baz ] | path expand ╭───┬──────╮ diff --git a/commands/docs/path_join.md b/commands/docs/path_join.md index b55aa02dd6a..1cde7f2876b 100644 --- a/commands/docs/path_join.md +++ b/commands/docs/path_join.md @@ -2,7 +2,7 @@ title: path join categories: | path -version: 0.110.0 +version: 0.111.0 path: | Join a structured path or a list of path parts. usage: | @@ -35,43 +35,43 @@ contributors: false | table | list<string> | ## Examples -Append a filename to a path +Append a filename to a path. ```nu > '/home/viking' | path join spam.txt /home/viking/spam.txt ``` -Append a filename to a path +Append a filename to a path. ```nu > '/home/viking' | path join spams this_spam.txt /home/viking/spams/this_spam.txt ``` -Use relative paths, e.g. '..' will go up one directory +Use relative paths, e.g. '..' will go up one directory. ```nu > '/home/viking' | path join .. folder /home/viking/../folder ``` -Use absolute paths, e.g. '/' will bring you to the top level directory +Use absolute paths, e.g. '/' will bring you to the top level directory. ```nu > '/home/viking' | path join / folder /folder ``` -Join a list of parts into a path +Join a list of parts into a path. ```nu > [ '/' 'home' 'viking' 'spam.txt' ] | path join /home/viking/spam.txt ``` -Join a structured path into a path +Join a structured path into a path. ```nu > { parent: '/home/viking', stem: 'spam', extension: 'txt' } | path join /home/viking/spam.txt ``` -Join a table of structured paths into a list of paths +Join a table of structured paths into a list of paths. ```nu > [[ parent stem extension ]; [ '/home/viking' 'spam' 'txt' ]] | path join ╭───┬───────────────────────╮ diff --git a/commands/docs/path_parse.md b/commands/docs/path_parse.md index bcf2e536b12..6049004c05c 100644 --- a/commands/docs/path_parse.md +++ b/commands/docs/path_parse.md @@ -2,7 +2,7 @@ title: path parse categories: | path -version: 0.110.0 +version: 0.111.0 path: | Convert a path into structured data. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--extension, -e {string}`: Manually supply the extension (without the dot) + - `--extension, -e {string}`: Manually supply the extension (without the dot). ## Input/output types: @@ -33,7 +33,7 @@ contributors: false | list<string> | table | ## Examples -Parse a path +Parse a path. ```nu > '/home/viking/spam.txt' | path parse ╭───────────┬──────────────╮ @@ -43,13 +43,13 @@ Parse a path ╰───────────┴──────────────╯ ``` -Replace a complex extension +Replace a complex extension. ```nu > '/home/viking/spam.tar.gz' | path parse --extension tar.gz | upsert extension { 'txt' } ``` -Ignore the extension +Ignore the extension. ```nu > '/etc/conf.d' | path parse --extension '' ╭───────────┬────────╮ @@ -59,7 +59,7 @@ Ignore the extension ╰───────────┴────────╯ ``` -Parse all paths in a list +Parse all paths in a list. ```nu > [ /home/viking.d /home/spam.txt ] | path parse ╭───┬────────┬────────┬───────────╮ diff --git a/commands/docs/path_relative-to.md b/commands/docs/path_relative-to.md index c1d6471d084..4afe613584c 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.110.0 +version: 0.111.0 path: | Express a path as relative to another path. usage: | @@ -33,13 +33,13 @@ contributors: false | list<string> | list<string> | ## Examples -Find a relative path from two absolute paths +Find a relative path from two absolute paths. ```nu > '/home/viking' | path relative-to '/home' viking ``` -Find a relative path from absolute paths in list +Find a relative path from absolute paths in list. ```nu > [ /home/viking, /home/spam ] | path relative-to '/home' ╭───┬────────╮ @@ -49,7 +49,7 @@ Find a relative path from absolute paths in list ``` -Find a relative path from two relative paths +Find a relative path from two relative paths. ```nu > 'eggs/bacon/sausage/spam' | path relative-to 'eggs/bacon/sausage' spam diff --git a/commands/docs/path_self.md b/commands/docs/path_self.md index 713f3948c14..44b34d8342d 100644 --- a/commands/docs/path_self.md +++ b/commands/docs/path_self.md @@ -2,7 +2,7 @@ title: path self categories: | path -version: 0.110.0 +version: 0.111.0 path: | Get the absolute path of the script or module containing this command at parse time. usage: | @@ -32,19 +32,19 @@ contributors: false | nothing | string | ## Examples -Get the path of the current file +Get the path of the current file. ```nu > const current_file = path self ``` -Get the path of the directory containing the current file +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 +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 88cd1400da9..6b0bcbb1720 100644 --- a/commands/docs/path_split.md +++ b/commands/docs/path_split.md @@ -2,7 +2,7 @@ title: path split categories: | path -version: 0.110.0 +version: 0.111.0 path: | Split a path into a list based on the system's path separator. usage: | @@ -29,7 +29,7 @@ contributors: false | list<string> | list<list<string>> | ## Examples -Split a path into parts +Split a path into parts. ```nu > '/home/viking/spam.txt' | path split ╭───┬──────────╮ @@ -41,7 +41,7 @@ Split a path into parts ``` -Split paths in list into parts +Split paths in list into parts. ```nu > [ /home/viking/spam.txt /home/viking/eggs.txt ] | path split ╭───┬──────────────────╮ diff --git a/commands/docs/path_type.md b/commands/docs/path_type.md index d7cefa5a756..28af5f49649 100644 --- a/commands/docs/path_type.md +++ b/commands/docs/path_type.md @@ -2,7 +2,7 @@ title: path type categories: | path -version: 0.110.0 +version: 0.111.0 path: | Get the type of the object a path refers to (e.g., file, dir, symlink). usage: | @@ -29,13 +29,13 @@ contributors: false | list<string> | list<string> | ## Examples -Show type of a filepath +Show type of a filepath. ```nu > '.' | path type dir ``` -Show type of a filepaths in a list +Show type of filepaths in a list. ```nu > ls | get name | path type diff --git a/commands/docs/plugin.md b/commands/docs/plugin.md index c8a2c67d7bf..ff3966aa2fa 100644 --- a/commands/docs/plugin.md +++ b/commands/docs/plugin.md @@ -2,7 +2,7 @@ title: plugin categories: | plugin -version: 0.110.0 +version: 0.111.0 plugin: | Commands for managing plugins. usage: | diff --git a/commands/docs/plugin_add.md b/commands/docs/plugin_add.md index 113b2aad418..4ca77331516 100644 --- a/commands/docs/plugin_add.md +++ b/commands/docs/plugin_add.md @@ -2,7 +2,7 @@ title: plugin add categories: | plugin -version: 0.110.0 +version: 0.111.0 plugin: | Add a plugin to the plugin registry file. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--plugin-config {path}`: Use a plugin registry file other than the one set in `$nu.plugin-path` - - `--shell, -s {path}`: Use an additional shell program (cmd, sh, python, etc.) to run the plugin + - `--plugin-config {path}`: Use a plugin registry file other than the one set in `$nu.plugin-path`. + - `--shell, -s {path}`: Use an additional shell program (cmd, sh, python, etc.) to run the plugin. ## Parameters diff --git a/commands/docs/plugin_list.md b/commands/docs/plugin_list.md index fa153c57ba5..135da29ce4e 100644 --- a/commands/docs/plugin_list.md +++ b/commands/docs/plugin_list.md @@ -2,7 +2,7 @@ title: plugin list categories: | plugin -version: 0.110.0 +version: 0.111.0 plugin: | List loaded and installed plugins. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--plugin-config {path}`: Use a plugin registry file other than the one set in `$nu.plugin-path` + - `--plugin-config {path}`: Use a plugin registry file other than the one set in `$nu.plugin-path`. - `--engine, -e`: Show info for plugins that are loaded into the engine only. - `--registry, -r`: Show info for plugins from the registry file only. @@ -40,7 +40,7 @@ List installed plugins. ╭────┬───────┬─────────────────────┬──────────┬────────┬───────────────────────────────┬───────┬─────────────╮ │ # │ name │ version │ status │ pid │ filename │ shell │ commands │ ├────┼───────┼─────────────────────┼──────────┼────────┼───────────────────────────────┼───────┼─────────────┤ -│ 0 │ inc │ 0.110.0 │ running │ 106480 │ /opt/nu/plugins/nu_plugin_inc │ │ ╭───┬─────╮ │ +│ 0 │ inc │ 0.111.0 │ 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 0e662fd1bb1..fe46e785d31 100644 --- a/commands/docs/plugin_rm.md +++ b/commands/docs/plugin_rm.md @@ -2,7 +2,7 @@ title: plugin rm categories: | plugin -version: 0.110.0 +version: 0.111.0 plugin: | Remove a plugin from the plugin registry file. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--plugin-config {path}`: Use a plugin registry file other than the one set in `$nu.plugin-path` - - `--force, -f`: Don't cause an error if the plugin name wasn't found in the file + - `--plugin-config {path}`: Use a plugin registry file other than the one set in `$nu.plugin-path`. + - `--force, -f`: Don't cause an error if the plugin name wasn't found in the file. ## Parameters diff --git a/commands/docs/plugin_stop.md b/commands/docs/plugin_stop.md index 7a49984f95d..351af31c5bd 100644 --- a/commands/docs/plugin_stop.md +++ b/commands/docs/plugin_stop.md @@ -2,7 +2,7 @@ title: plugin stop categories: | plugin -version: 0.110.0 +version: 0.111.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 25af5446c05..4d7d60388e2 100644 --- a/commands/docs/plugin_use.md +++ b/commands/docs/plugin_use.md @@ -2,7 +2,7 @@ title: plugin use categories: | plugin -version: 0.110.0 +version: 0.111.0 plugin: | Load a plugin from the plugin registry file into scope. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--plugin-config {path}`: Use a plugin registry file other than the one set in `$nu.plugin-path` + - `--plugin-config {path}`: Use a plugin registry file other than the one set in `$nu.plugin-path`. ## Parameters diff --git a/commands/docs/polars.md b/commands/docs/polars.md index e46d8fd102a..b3c75ea15c5 100644 --- a/commands/docs/polars.md +++ b/commands/docs/polars.md @@ -2,7 +2,7 @@ title: polars categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Operate with data in a dataframe format. usage: | @@ -80,6 +80,7 @@ to the `polars agg` command with some column expressions for aggregation which t | [`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 entropy`](/commands/docs/polars_entropy.md) | Compute the entropy as `-sum(pk * log(pk))` where `pk` are discrete probabilities. | 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 fill-nan`](/commands/docs/polars_fill-nan.md) | Replaces NaN values with the given expression. | plugin | diff --git a/commands/docs/polars_agg-groups.md b/commands/docs/polars_agg-groups.md index 62828e55a84..3fb87d3d1f1 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.110.0 +version: 0.111.0 dataframe: | Creates an agg_groups expression. usage: | diff --git a/commands/docs/polars_agg.md b/commands/docs/polars_agg.md index e7a934002f1..6a957960041 100644 --- a/commands/docs/polars_agg.md +++ b/commands/docs/polars_agg.md @@ -2,7 +2,7 @@ title: polars agg categories: | lazyframe -version: 0.110.0 +version: 0.111.0 lazyframe: | Performs a series of aggregations from a group-by. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `...rest`: Expression(s) that define the aggregations to be applied + - `...rest`: Expression(s) that define the aggregations to be applied. ## Input/output types: diff --git a/commands/docs/polars_all-false.md b/commands/docs/polars_all-false.md index f3db5d4a47d..94640407ab6 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.110.0 +version: 0.111.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 d17fcefbf43..21e5d2b993f 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.110.0 +version: 0.111.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 b87b8e30652..49aadd3f7ab 100644 --- a/commands/docs/polars_append.md +++ b/commands/docs/polars_append.md @@ -2,7 +2,7 @@ title: polars append categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Appends a new dataframe. usage: | @@ -22,11 +22,11 @@ contributors: false ## Flags - - `--col, -c`: append as new columns instead of rows + - `--col, -c`: Append as new columns instead of rows. ## Parameters - - `other`: other dataframe to append + - `other`: Other dataframe to append. ## Input/output types: diff --git a/commands/docs/polars_arg-max.md b/commands/docs/polars_arg-max.md index 1e257d81661..774c9541d73 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.110.0 +version: 0.111.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 f3aae4372af..c10372f104e 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.110.0 +version: 0.111.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 dc9fac54a50..3ce694ce02b 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.110.0 +version: 0.111.0 dataframe: | Returns indexes for a sorted series. usage: | @@ -22,10 +22,10 @@ contributors: false ## Flags - - `--reverse, -r`: reverse order - - `--nulls-last, -n`: nulls ordered last + - `--reverse, -r`: Reverse order. + - `--nulls-last, -n`: Nulls ordered last. - `--limit, -l {int}`: Limit a sort output, this is for optimization purposes and might be ignored. - - `--maintain-order, -m`: maintain order on sorted items + - `--maintain-order, -m`: Maintain order on sorted items. ## Input/output types: diff --git a/commands/docs/polars_arg-true.md b/commands/docs/polars_arg-true.md index 6f3a04e5ffc..0566c6ec828 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.110.0 +version: 0.111.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 88fa7c9e6de..67c41514a8f 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.110.0 +version: 0.111.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 e9502492f93..425fdfb6ad3 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.110.0 +version: 0.111.0 expression: | Creates an expression that returns the arguments where expression is true. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `column name`: Expression to evaluate + - `column name`: Expression to evaluate. ## Input/output types: diff --git a/commands/docs/polars_as-date.md b/commands/docs/polars_as-date.md index 015adb37b76..4ce2e0ce25a 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.110.0 +version: 0.111.0 dataframe: | Converts string to date. usage: | @@ -22,11 +22,11 @@ contributors: false ## Flags - - `--not-exact, -n`: the format string may be contained in the date (e.g. foo-2021-01-01-bar could match 2021-01-01) + - `--not-exact, -n`: The format string may be contained in the date (e.g. foo-2021-01-01-bar could match 2021-01-01). ## Parameters - - `format`: formatting date string + - `format`: Formatting date string. ## Input/output types: diff --git a/commands/docs/polars_as-datetime.md b/commands/docs/polars_as-datetime.md index 9667af22dc8..11d21ec46e6 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.110.0 +version: 0.111.0 dataframe: | Converts string to datetime. usage: | @@ -22,20 +22,20 @@ contributors: false ## Flags - - `--not-exact, -n`: the format string may be contained in the date (e.g. foo-2021-01-01-bar could match 2021-01-01) - - `--naive`: the input datetimes should be parsed as naive (i.e., not timezone-aware). Ignored if input is an expression. + - `--not-exact, -n`: The format string may be contained in the date (e.g. foo-2021-01-01-bar could match 2021-01-01). + - `--naive`: The input datetimes should be parsed as naive (i.e., not timezone-aware). Ignored if input is an expression. - `--ambiguous, -a {oneof}`: Determine how to deal with ambiguous datetimes: `raise` (default): raise error `earliest`: use the earliest datetime `latest`: use the latest datetime `null`: set to null Used only when input is a lazyframe or expression and ignored otherwise - - `--time-unit {string}`: time unit for the output datetime. One of: ns, us, ms. Default is ns - - `--time-zone {string}`: time zone for the output datetime. E.g. 'UTC', 'America/New_York' + - `--time-unit {string}`: Time unit for the output datetime. One of: ns, us, ms. Default is ns. + - `--time-zone {string}`: Time zone for the output datetime. E.g. 'UTC', 'America/New_York'. ## Parameters - - `format`: formatting date time string + - `format`: Formatting date time string. ## Input/output types: @@ -88,10 +88,10 @@ Converts string to datetime using the `--not-exact` flag even with excessive sym ╭───┬──────────────╮ │ # │ datetime │ ├───┼──────────────┤ -│ 0 │ 2 months ago │ -│ 1 │ 2 months ago │ -│ 2 │ 2 months ago │ -│ 3 │ 2 months ago │ +│ 0 │ 3 months ago │ +│ 1 │ 3 months ago │ +│ 2 │ 3 months ago │ +│ 3 │ 3 months ago │ ╰───┴──────────────╯ ``` diff --git a/commands/docs/polars_as.md b/commands/docs/polars_as.md index aba6a9707c5..9a1150856fd 100644 --- a/commands/docs/polars_as.md +++ b/commands/docs/polars_as.md @@ -2,7 +2,7 @@ title: polars as categories: | expression -version: 0.110.0 +version: 0.111.0 expression: | Creates an alias expression. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `Alias name`: Alias name for the expression + - `Alias name`: Alias name for the expression. ## Input/output types: diff --git a/commands/docs/polars_cache.md b/commands/docs/polars_cache.md index f4d92d60276..01c631f79e7 100644 --- a/commands/docs/polars_cache.md +++ b/commands/docs/polars_cache.md @@ -2,7 +2,7 @@ title: polars cache categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Caches operations in a new LazyFrame. usage: | diff --git a/commands/docs/polars_cast.md b/commands/docs/polars_cast.md index 79335cb939e..86922f871f4 100644 --- a/commands/docs/polars_cast.md +++ b/commands/docs/polars_cast.md @@ -2,7 +2,7 @@ title: polars cast categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Cast a column to a different dtype. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `dtype`: The dtype to cast the column to + - `dtype`: The dtype to cast the column to. - `column`: The column to cast. Required when used with a dataframe. diff --git a/commands/docs/polars_col.md b/commands/docs/polars_col.md index 307ddef0d62..c4a92d8ad3c 100644 --- a/commands/docs/polars_col.md +++ b/commands/docs/polars_col.md @@ -2,7 +2,7 @@ title: polars col categories: | expression -version: 0.110.0 +version: 0.111.0 expression: | Creates a named column expression. usage: | @@ -22,12 +22,12 @@ contributors: false ## Flags - - `--type, -t`: Treat column names as type names + - `--type, -t`: Treat column names as type names. ## Parameters - `column name`: Name of column to be used. '*' can be used for all columns. Accepts regular expression input; regular expressions should start with ^ and end with $. - - `...rest`: Additional columns to be used. Cannot be '*' + - `...rest`: Additional columns to be used. Cannot be '*'. ## Input/output types: diff --git a/commands/docs/polars_collect.md b/commands/docs/polars_collect.md index 8c3c73d0075..5fa2014d557 100644 --- a/commands/docs/polars_collect.md +++ b/commands/docs/polars_collect.md @@ -2,7 +2,7 @@ title: polars collect categories: | lazyframe -version: 0.110.0 +version: 0.111.0 lazyframe: | Collect lazy dataframe into eager dataframe. usage: | diff --git a/commands/docs/polars_columns.md b/commands/docs/polars_columns.md index a126fc22049..62e36321a65 100644 --- a/commands/docs/polars_columns.md +++ b/commands/docs/polars_columns.md @@ -2,7 +2,7 @@ title: polars columns categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Show dataframe columns. usage: | diff --git a/commands/docs/polars_concat-str.md b/commands/docs/polars_concat-str.md index d91006a7dcb..94df801a7ac 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.110.0 +version: 0.111.0 expression: | Creates a concat string expression. usage: | @@ -22,8 +22,8 @@ contributors: false ## Parameters - - `separator`: Separator used during the concatenation - - `concat expressions`: Expression(s) that define the string concatenation + - `separator`: Separator used during the concatenation. + - `concat expressions`: Expression(s) that define the string concatenation. ## Input/output types: diff --git a/commands/docs/polars_concat.md b/commands/docs/polars_concat.md index b6ca1c0bee6..9425ec7dfe5 100644 --- a/commands/docs/polars_concat.md +++ b/commands/docs/polars_concat.md @@ -2,7 +2,7 @@ title: polars concat categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Concatenate two or more dataframes. usage: | @@ -22,16 +22,16 @@ contributors: false ## Flags - - `--no-parallel`: Disable parallel execution - - `--rechunk`: Rechunk the resulting dataframe - - `--to-supertypes`: Cast to supertypes - - `--diagonal`: Concatenate dataframes diagonally + - `--no-parallel`: Disable parallel execution. + - `--rechunk`: Rechunk the resulting dataframe. + - `--to-supertypes`: Cast to supertypes. + - `--diagonal`: Concatenate dataframes diagonally. - `--no-maintain-order`: Do not maintain order. The default behavior is to maintain order. - - `--from-partitioned-ds`: Concatenate dataframes from a partitioned dataset + - `--from-partitioned-ds`: Concatenate dataframes from a partitioned dataset. ## Parameters - - `...rest`: The dataframes to concatenate + - `...rest`: The dataframes to concatenate. ## Input/output types: diff --git a/commands/docs/polars_contains.md b/commands/docs/polars_contains.md index 65bbc856d8c..9dca42fb357 100644 --- a/commands/docs/polars_contains.md +++ b/commands/docs/polars_contains.md @@ -2,7 +2,7 @@ title: polars contains categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Checks if a pattern is contained in a string. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `pattern`: Regex pattern to be searched + - `pattern`: Regex pattern to be searched. ## Input/output types: diff --git a/commands/docs/polars_convert-time-zone.md b/commands/docs/polars_convert-time-zone.md index 1198be9af6a..71774525551 100644 --- a/commands/docs/polars_convert-time-zone.md +++ b/commands/docs/polars_convert-time-zone.md @@ -2,7 +2,7 @@ title: polars convert-time-zone categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Convert datetime to target timezone. usage: | @@ -38,12 +38,12 @@ Convert timezone for timezone-aware datetime > ["2025-04-10 09:30:00 -0400" "2025-04-10 10:30:00 -0400"] | polars into-df | polars as-datetime "%Y-%m-%d %H:%M:%S %z" | polars select (polars col datetime | polars convert-time-zone "Europe/Lisbon") -╭───┬──────────────╮ -│ # │ datetime │ -├───┼──────────────┤ -│ 0 │ 9 months ago │ -│ 1 │ 9 months ago │ -╰───┴──────────────╯ +╭───┬───────────────╮ +│ # │ datetime │ +├───┼───────────────┤ +│ 0 │ 10 months ago │ +│ 1 │ 10 months ago │ +╰───┴───────────────╯ ``` @@ -52,11 +52,11 @@ Timezone conversions for timezone-naive datetime will assume the original timezo > ["2025-04-10 09:30:00" "2025-04-10 10:30:00"] | polars into-df | polars as-datetime "%Y-%m-%d %H:%M:%S" --naive | polars select (polars col datetime | polars convert-time-zone "America/New_York") -╭───┬──────────────╮ -│ # │ datetime │ -├───┼──────────────┤ -│ 0 │ 9 months ago │ -│ 1 │ 9 months ago │ -╰───┴──────────────╯ +╭───┬───────────────╮ +│ # │ datetime │ +├───┼───────────────┤ +│ 0 │ 10 months ago │ +│ 1 │ 10 months ago │ +╰───┴───────────────╯ ``` diff --git a/commands/docs/polars_count-null.md b/commands/docs/polars_count-null.md index 61da4d4b111..f5fdc187609 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.110.0 +version: 0.111.0 dataframe: | Counts null values. usage: | diff --git a/commands/docs/polars_count.md b/commands/docs/polars_count.md index ca3cf658f31..9236c7df8e9 100644 --- a/commands/docs/polars_count.md +++ b/commands/docs/polars_count.md @@ -2,7 +2,7 @@ title: polars count categories: | dataframe -version: 0.110.0 +version: 0.111.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 9803abb7a47..13e01cfa260 100644 --- a/commands/docs/polars_cumulative.md +++ b/commands/docs/polars_cumulative.md @@ -2,7 +2,7 @@ title: polars cumulative categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Cumulative calculation for a column or series. usage: | @@ -22,11 +22,11 @@ contributors: false ## Flags - - `--reverse, -r`: Reverse cumulative calculation + - `--reverse, -r`: Reverse cumulative calculation. ## Parameters - - `type`: rolling operation. Values of min, max, and sum are accepted. + - `type`: Rolling operation. Values of min, max, and sum are accepted. ## Input/output types: diff --git a/commands/docs/polars_cut.md b/commands/docs/polars_cut.md index 3d1f237aaad..4a784aa7c95 100644 --- a/commands/docs/polars_cut.md +++ b/commands/docs/polars_cut.md @@ -2,7 +2,7 @@ title: polars cut categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Bin continuous values into discrete categories for a series. usage: | diff --git a/commands/docs/polars_datepart.md b/commands/docs/polars_datepart.md index bd539f0a0da..7591a41c3c2 100644 --- a/commands/docs/polars_datepart.md +++ b/commands/docs/polars_datepart.md @@ -2,7 +2,7 @@ title: polars datepart categories: | expression -version: 0.110.0 +version: 0.111.0 expression: | Creates an expression for capturing the specified datepart in a column. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `Datepart name`: Part of the date to capture. Possible values are year, quarter, month, week, weekday, day, hour, minute, second, millisecond, microsecond, nanosecond + - `Datepart name`: Part of the date to capture. Possible values are year, quarter, month, week, weekday, day, hour, minute, second, millisecond, microsecond, nanosecond. ## Input/output types: diff --git a/commands/docs/polars_decimal.md b/commands/docs/polars_decimal.md index 1db86c92a50..25eebd0982b 100644 --- a/commands/docs/polars_decimal.md +++ b/commands/docs/polars_decimal.md @@ -2,7 +2,7 @@ title: polars decimal categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Converts a string column into a decimal column usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `infer_length`: Number of decimal points to infer + - `infer_length`: Number of decimal points to infer. ## Input/output types: diff --git a/commands/docs/polars_drop-duplicates.md b/commands/docs/polars_drop-duplicates.md index dbfeb08945d..ab333ee13d9 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.110.0 +version: 0.111.0 dataframe: | Drops duplicate values in dataframe. usage: | @@ -22,12 +22,12 @@ contributors: false ## Flags - - `--maintain, -m`: maintain order - - `--last, -l`: keeps last duplicate value (by default keeps first) + - `--maintain, -m`: Maintain order. + - `--last, -l`: Keeps last duplicate value (by default keeps first). ## Parameters - - `subset`: subset of columns to drop duplicates + - `subset`: Subset of columns to drop duplicates. ## Input/output types: diff --git a/commands/docs/polars_drop-nulls.md b/commands/docs/polars_drop-nulls.md index 7312953dd56..6696d3387fb 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.110.0 +version: 0.111.0 dataframe: | Drops null values in dataframe. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `subset`: subset of columns to drop nulls + - `subset`: Subset of columns to drop nulls. ## Input/output types: diff --git a/commands/docs/polars_drop.md b/commands/docs/polars_drop.md index 71a39aea774..bf76f08fdcf 100644 --- a/commands/docs/polars_drop.md +++ b/commands/docs/polars_drop.md @@ -2,7 +2,7 @@ title: polars drop categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Creates a new dataframe by dropping the selected columns. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `...rest`: column names to be dropped + - `...rest`: Column names to be dropped. ## Input/output types: diff --git a/commands/docs/polars_dummies.md b/commands/docs/polars_dummies.md index bb85f17a5ff..7da94656385 100644 --- a/commands/docs/polars_dummies.md +++ b/commands/docs/polars_dummies.md @@ -2,7 +2,7 @@ title: polars dummies categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Creates a new dataframe with dummy variables. usage: | @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--drop-first, -d`: Drop first row - - `--drop-nulls, -n`: Drop nulls - - `--separator, -s`: Optional separator + - `--drop-first, -d`: Drop first row. + - `--drop-nulls, -n`: Drop nulls. + - `--separator, -s`: Optional separator. ## Input/output types: diff --git a/commands/docs/polars_entropy.md b/commands/docs/polars_entropy.md new file mode 100644 index 00000000000..bfcf20306f5 --- /dev/null +++ b/commands/docs/polars_entropy.md @@ -0,0 +1,56 @@ +--- +title: polars entropy +categories: | + dataframe +version: 0.111.0 +dataframe: | + Compute the entropy as `-sum(pk * log(pk))` where `pk` are discrete probabilities. +usage: | + Compute the entropy as `-sum(pk * log(pk))` where `pk` are discrete probabilities. +editLink: false +contributors: false +--- + + +# `polars entropy` for [dataframe](/commands/categories/dataframe.md) + +
Compute the entropy as `-sum(pk * log(pk))` where `pk` are discrete probabilities.
+ +## Signature + +```> polars entropy {flags} ``` + +## Flags + + - `--base {float}`: Given base, defaults to e. + - `--normalize {bool}`: Normalize pk if it doesn’t sum to 1. Default to true. + + +## Input/output types: + +| input | output | +| ----------------- | ----------------- | +| polars_expression | polars_expression | +## Examples + +Compute the entropy of a column expression +```nu +> [[a]; [1] [2] [3]] | polars into-df | polars select (polars col a | polars entropy --base 2) | polars collect +╭───┬──────╮ +│ # │ a │ +├───┼──────┤ +│ 0 │ 1.46 │ +╰───┴──────╯ + +``` + +Compute the entropy of a column expression without normalization +```nu +> [[a]; [1] [2] [3]] | polars into-df | polars select (polars col a | polars entropy --base 2 --normalize false) | polars collect +╭───┬───────╮ +│ # │ a │ +├───┼───────┤ +│ 0 │ -6.75 │ +╰───┴───────╯ + +``` diff --git a/commands/docs/polars_explode.md b/commands/docs/polars_explode.md index a9e8509067c..bea348fad65 100644 --- a/commands/docs/polars_explode.md +++ b/commands/docs/polars_explode.md @@ -2,7 +2,7 @@ title: polars explode categories: | lazyframe -version: 0.110.0 +version: 0.111.0 lazyframe: | Explodes a dataframe or creates a explode expression. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `...rest`: columns to explode, only applicable for dataframes + - `...rest`: Columns to explode, only applicable for dataframes. ## Input/output types: diff --git a/commands/docs/polars_expr-not.md b/commands/docs/polars_expr-not.md index 388ed0b7a1e..38f8b04c10c 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.110.0 +version: 0.111.0 dataframe: | Creates a not expression. usage: | diff --git a/commands/docs/polars_fill-nan.md b/commands/docs/polars_fill-nan.md index 507b271dad2..e0ebe785ac6 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.110.0 +version: 0.111.0 lazyframe: | Replaces NaN values with the given expression. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `fill`: Expression to use to fill the NAN values + - `fill`: Expression to use to fill the NAN values. ## Input/output types: diff --git a/commands/docs/polars_fill-null.md b/commands/docs/polars_fill-null.md index 5149bded70a..ff7cb3c2cd6 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.110.0 +version: 0.111.0 lazyframe: | Replaces NULL values with the given expression. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `fill`: Expression to use to fill the null values + - `fill`: Expression to use to fill the null values. ## Input/output types: diff --git a/commands/docs/polars_filter-with.md b/commands/docs/polars_filter-with.md index 484ee87ee2c..853d196210b 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.110.0 +version: 0.111.0 dataframe_or_lazyframe: | Filters dataframe using a mask or expression as reference. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `mask or expression`: boolean mask used to filter data + - `mask or expression`: Boolean mask used to filter data. ## Input/output types: diff --git a/commands/docs/polars_filter.md b/commands/docs/polars_filter.md index dfd76aa2c1a..7e01c41b78b 100644 --- a/commands/docs/polars_filter.md +++ b/commands/docs/polars_filter.md @@ -2,7 +2,7 @@ title: polars filter categories: | lazyframe -version: 0.110.0 +version: 0.111.0 lazyframe: | Filter dataframe based in expression. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `filter expression`: Expression that define the column selection + - `filter expression`: Expression that define the column selection. ## Input/output types: @@ -49,12 +49,12 @@ Filter dataframe using an expression Filter dataframe for rows where dt is within the last 2 days of the maximum dt value ```nu > [[dt val]; [2025-04-01 1] [2025-04-02 2] [2025-04-03 3] [2025-04-04 4]] | polars into-df | polars filter ((polars col dt) > ((polars col dt | polars max | $in - 2day))) -╭───┬──────────────┬─────╮ -│ # │ dt │ val │ -├───┼──────────────┼─────┤ -│ 0 │ 9 months ago │ 3 │ -│ 1 │ 9 months ago │ 4 │ -╰───┴──────────────┴─────╯ +╭───┬───────────────┬─────╮ +│ # │ dt │ val │ +├───┼───────────────┼─────┤ +│ 0 │ 10 months ago │ 3 │ +│ 1 │ 10 months ago │ 4 │ +╰───┴───────────────┴─────╯ ``` diff --git a/commands/docs/polars_first.md b/commands/docs/polars_first.md index d978e9ed1e9..6ac9373ca4b 100644 --- a/commands/docs/polars_first.md +++ b/commands/docs/polars_first.md @@ -2,7 +2,7 @@ title: polars first categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Show only the first number of rows or create a first expression usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `rows`: starting from the front, the number of rows to return + - `rows`: Starting from the front, the number of rows to return. ## Input/output types: diff --git a/commands/docs/polars_flatten.md b/commands/docs/polars_flatten.md index 620fca04d25..07d929c8448 100644 --- a/commands/docs/polars_flatten.md +++ b/commands/docs/polars_flatten.md @@ -2,7 +2,7 @@ title: polars flatten categories: | lazyframe -version: 0.110.0 +version: 0.111.0 lazyframe: | An alias for polars explode. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `...rest`: columns to flatten, only applicable for dataframes + - `...rest`: Columns to flatten, only applicable for dataframes. ## Input/output types: diff --git a/commands/docs/polars_get-day.md b/commands/docs/polars_get-day.md index 2b963372588..7570e44d73f 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.110.0 +version: 0.111.0 dataframe: | Gets day from date. usage: | diff --git a/commands/docs/polars_get-hour.md b/commands/docs/polars_get-hour.md index f1cdbb12e7e..62e22b058d3 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.110.0 +version: 0.111.0 dataframe: | Gets hour from datetime. usage: | diff --git a/commands/docs/polars_get-minute.md b/commands/docs/polars_get-minute.md index 30c2a75c84c..71911a4830e 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.110.0 +version: 0.111.0 dataframe: | Gets minute from date. usage: | diff --git a/commands/docs/polars_get-month.md b/commands/docs/polars_get-month.md index 7ebc7fed179..dde89af55b1 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.110.0 +version: 0.111.0 dataframe: | Gets month from date. usage: | diff --git a/commands/docs/polars_get-nanosecond.md b/commands/docs/polars_get-nanosecond.md index b3b99a198e9..fa426f4f551 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.110.0 +version: 0.111.0 dataframe: | Gets nanosecond from date. usage: | diff --git a/commands/docs/polars_get-ordinal.md b/commands/docs/polars_get-ordinal.md index 4e1ba338b61..3e8682125e1 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.110.0 +version: 0.111.0 dataframe: | Gets ordinal from date. usage: | diff --git a/commands/docs/polars_get-second.md b/commands/docs/polars_get-second.md index e8405f6ace4..352c9e9f5fa 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.110.0 +version: 0.111.0 dataframe: | Gets second from date. usage: | diff --git a/commands/docs/polars_get-week.md b/commands/docs/polars_get-week.md index 8ce1b48533c..550a4edaab3 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.110.0 +version: 0.111.0 dataframe: | Gets week from date. usage: | diff --git a/commands/docs/polars_get-weekday.md b/commands/docs/polars_get-weekday.md index 72fd97739d9..2f33bdcba5c 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.110.0 +version: 0.111.0 dataframe: | Gets weekday from date. usage: | diff --git a/commands/docs/polars_get-year.md b/commands/docs/polars_get-year.md index 4500e4c75fd..5809db12c86 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.110.0 +version: 0.111.0 dataframe: | Gets year from date. usage: | diff --git a/commands/docs/polars_get.md b/commands/docs/polars_get.md index 5bf7d8f5128..8ea74d83232 100644 --- a/commands/docs/polars_get.md +++ b/commands/docs/polars_get.md @@ -2,7 +2,7 @@ title: polars get categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Creates dataframe with the selected columns. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `...rest`: column names to sort dataframe + - `...rest`: Column names to sort dataframe. ## Input/output types: diff --git a/commands/docs/polars_group-by.md b/commands/docs/polars_group-by.md index 38991886ad8..be94b464008 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.110.0 +version: 0.111.0 lazyframe: | Creates a group-by object that can be used for other aggregations. usage: | @@ -26,7 +26,7 @@ contributors: false ## Parameters - - `...rest`: Expression(s) that define the lazy group-by + - `...rest`: Expression(s) that define the lazy group-by. ## Input/output types: diff --git a/commands/docs/polars_horizontal.md b/commands/docs/polars_horizontal.md index 503da77426b..6f71deceb05 100644 --- a/commands/docs/polars_horizontal.md +++ b/commands/docs/polars_horizontal.md @@ -2,7 +2,7 @@ title: polars horizontal categories: | expression -version: 0.110.0 +version: 0.111.0 expression: | Horizontal calculation across multiple columns. usage: | @@ -22,12 +22,12 @@ contributors: false ## Flags - - `--nulls, -n`: If set, null value in the input will lead to null output + - `--nulls, -n`: If set, null value in the input will lead to null output. ## Parameters - - `type`: horizontal operation. Values of all, any, min, max, sum, and mean are accepted. - - `...rest`: Expression(s) that define the lazy group-by + - `type`: Horizontal operation. Values of all, any, min, max, sum, and mean are accepted. + - `...rest`: Expression(s) that define the lazy group-by. ## Input/output types: diff --git a/commands/docs/polars_implode.md b/commands/docs/polars_implode.md index 510a256dce0..f3a9f5b262f 100644 --- a/commands/docs/polars_implode.md +++ b/commands/docs/polars_implode.md @@ -2,7 +2,7 @@ title: polars implode categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Aggregates values into a list. usage: | diff --git a/commands/docs/polars_integer.md b/commands/docs/polars_integer.md index fc948fa4931..c89a60077bc 100644 --- a/commands/docs/polars_integer.md +++ b/commands/docs/polars_integer.md @@ -2,7 +2,7 @@ title: polars integer categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Converts a string column into a integer column usage: | @@ -22,12 +22,12 @@ contributors: false ## Flags - - `--strict, -s`: Raises an error as opposed to converting to null + - `--strict, -s`: Raises an error as opposed to converting to null. ## Parameters - - `base`: An integer or expression representing the base (radix) of the number system (default is 10) - - `dtype`: Data type to cast to (defaults is i64) + - `base`: An integer or expression representing the base (radix) of the number system (default is 10). + - `dtype`: Data type to cast to (defaults is i64). ## Input/output types: diff --git a/commands/docs/polars_into-df.md b/commands/docs/polars_into-df.md index 658a2c66a03..f64e2fb77e6 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.110.0 +version: 0.111.0 dataframe: | Converts a list, table or record into a dataframe. usage: | diff --git a/commands/docs/polars_into-dtype.md b/commands/docs/polars_into-dtype.md index d4b4be920e8..ae71f3d4cac 100644 --- a/commands/docs/polars_into-dtype.md +++ b/commands/docs/polars_into-dtype.md @@ -2,7 +2,7 @@ title: polars into-dtype categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Convert a string to a specific datatype. usage: | diff --git a/commands/docs/polars_into-lazy.md b/commands/docs/polars_into-lazy.md index 69f33e45049..261ec9d9c44 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.110.0 +version: 0.111.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 ec9cf2737f8..cb6cf558696 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.110.0 +version: 0.111.0 dataframe: | Converts a dataframe or an expression into nushell value for access and exploration. usage: | @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--rows, -n {number}`: number of rows to be shown - - `--tail, -t`: shows tail rows - - `--index, -i`: add an index column + - `--rows, -n {number}`: Number of rows to be shown. + - `--tail, -t`: Shows tail rows. + - `--index, -i`: Add an index column. ## Input/output types: diff --git a/commands/docs/polars_into-repr.md b/commands/docs/polars_into-repr.md index 00efd3a6cca..f518bdb6fe2 100644 --- a/commands/docs/polars_into-repr.md +++ b/commands/docs/polars_into-repr.md @@ -2,7 +2,7 @@ title: polars into-repr categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Display a dataframe in its repr format. usage: | diff --git a/commands/docs/polars_into-schema.md b/commands/docs/polars_into-schema.md index fda6c87a6ae..a24d4e1c32a 100644 --- a/commands/docs/polars_into-schema.md +++ b/commands/docs/polars_into-schema.md @@ -2,7 +2,7 @@ title: polars into-schema categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Convert a value to a polars schema object usage: | diff --git a/commands/docs/polars_is-duplicated.md b/commands/docs/polars_is-duplicated.md index 8438c1b8ffb..b2e8c62ab73 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.110.0 +version: 0.111.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 b67ee63fe3f..8aff1641cbc 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.110.0 +version: 0.111.0 expression: | Creates an is-in expression or checks to see if the elements are contained in the right series usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `list`: List to check if values are in + - `list`: List to check if values are in. ## Input/output types: diff --git a/commands/docs/polars_is-not-null.md b/commands/docs/polars_is-not-null.md index b75b7e61c82..c58c30d29d7 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.110.0 +version: 0.111.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 0e15a8c2eee..ba87a002bcc 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.110.0 +version: 0.111.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 790b652ab46..cd92221684a 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.110.0 +version: 0.111.0 dataframe: | Creates mask indicating unique values. usage: | diff --git a/commands/docs/polars_join-where.md b/commands/docs/polars_join-where.md index e7a3b7c52d5..cb711e1fb37 100644 --- a/commands/docs/polars_join-where.md +++ b/commands/docs/polars_join-where.md @@ -2,7 +2,7 @@ title: polars join-where categories: | lazyframe -version: 0.110.0 +version: 0.111.0 lazyframe: | Joins a lazy frame with other lazy frame based on conditions. usage: | @@ -22,8 +22,8 @@ contributors: false ## Parameters - - `other`: LazyFrame to join with - - `condition`: Condition + - `other`: LazyFrame to join with. + - `condition`: Condition. ## Input/output types: diff --git a/commands/docs/polars_join.md b/commands/docs/polars_join.md index f4109f70cab..b18d6f3a18c 100644 --- a/commands/docs/polars_join.md +++ b/commands/docs/polars_join.md @@ -2,7 +2,7 @@ title: polars join categories: | lazyframe -version: 0.110.0 +version: 0.111.0 lazyframe: | Joins a lazy frame with other lazy frame. usage: | @@ -22,18 +22,19 @@ contributors: false ## Flags - - `--inner, -i`: inner joining between lazyframes (default) - - `--left, -l`: left join between lazyframes - - `--full, -f`: full join between lazyframes - - `--cross, -c`: cross join between lazyframes + - `--inner, -i`: Inner joining between lazyframes (default). + - `--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 + - `--nulls-equal`: Join on null values. By default null values will never produce matches. + - `--suffix, -s {string}`: Suffix to use on columns with same name. ## Parameters - - `other`: LazyFrame to join with - - `left_on`: Left column(s) to join on - - `right_on`: Right column(s) to join on + - `other`: LazyFrame to join with. + - `left_on`: Left column(s) to join on. + - `right_on`: Right column(s) to join on. ## Input/output types: @@ -108,3 +109,37 @@ Join one eager dataframe with another using a cross join ╰───┴───────┴────────────────╯ ``` + +Join on column expressions +```nu +> + let df1 = [[a b]; ["2025-01-01 01:00:00+0000" 1] ["2025-01-02 05:36:42+0000" 2]] | polars into-df --schema {a: "datetime", b: i8} + + let df2 = [[a c]; ["2025-01-01 00:00:00+0000" a] ["2025-01-02 00:00:00+0000" b]] | polars into-df --schema {a: "datetime", c: str} + + $df1 | polars join $df2 [(polars col a | polars truncate 1d)] [a] +╭───┬────────────┬───┬────────────┬───╮ +│ # │ a │ b │ a_x │ c │ +├───┼────────────┼───┼────────────┼───┤ +│ 0 │ a year ago │ 1 │ a year ago │ a │ +│ 1 │ a year ago │ 2 │ a year ago │ b │ +╰───┴────────────┴───┴────────────┴───╯ + +``` + +Join on nulls +```nu +> [[col1 col2]; [2 a] [3 b] [null c]] | polars into-df + | polars join ( + [[col1 col3]; [2 x] [3 y] [null z]] | polars into-df + ) [col1] [col1] --nulls-equal + | polars collect +╭───┬──────┬──────┬──────╮ +│ # │ col1 │ col2 │ col3 │ +├───┼──────┼──────┼──────┤ +│ 0 │ 2 │ a │ x │ +│ 1 │ 3 │ b │ y │ +│ 2 │ │ c │ z │ +╰───┴──────┴──────┴──────╯ + +``` diff --git a/commands/docs/polars_last.md b/commands/docs/polars_last.md index c9dda198691..4c548f0b6e1 100644 --- a/commands/docs/polars_last.md +++ b/commands/docs/polars_last.md @@ -2,7 +2,7 @@ title: polars last categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Creates new dataframe with tail rows or creates a last expression. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `rows`: Number of rows for tail + - `rows`: Number of rows for tail. ## Input/output types: diff --git a/commands/docs/polars_len.md b/commands/docs/polars_len.md index 0e4cfcdab93..4d541cff75d 100644 --- a/commands/docs/polars_len.md +++ b/commands/docs/polars_len.md @@ -2,7 +2,7 @@ title: polars len categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Return the number of rows in the context. This is similar to COUNT(*) in SQL. usage: | diff --git a/commands/docs/polars_list-contains.md b/commands/docs/polars_list-contains.md index 67adf375ad6..868e9038b72 100644 --- a/commands/docs/polars_list-contains.md +++ b/commands/docs/polars_list-contains.md @@ -2,7 +2,7 @@ title: polars list-contains categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Checks if an element is contained in a list. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `element`: Element to search for in the list + - `element`: Element to search for in the list. ## Input/output types: diff --git a/commands/docs/polars_lit.md b/commands/docs/polars_lit.md index b17a7dac2b5..ef875a8504c 100644 --- a/commands/docs/polars_lit.md +++ b/commands/docs/polars_lit.md @@ -2,7 +2,7 @@ title: polars lit categories: | expression -version: 0.110.0 +version: 0.111.0 expression: | Creates a literal expression. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `literal`: literal to construct the expression + - `literal`: Literal to construct the expression. ## Input/output types: diff --git a/commands/docs/polars_lowercase.md b/commands/docs/polars_lowercase.md index f77483183fd..5d6c37e0f5a 100644 --- a/commands/docs/polars_lowercase.md +++ b/commands/docs/polars_lowercase.md @@ -2,7 +2,7 @@ title: polars lowercase categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Lowercase the strings in the column. usage: | diff --git a/commands/docs/polars_math.md b/commands/docs/polars_math.md index ddd9b4731cd..b6b720ad6cf 100644 --- a/commands/docs/polars_math.md +++ b/commands/docs/polars_math.md @@ -2,7 +2,7 @@ title: polars math categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Collection of math functions to be applied on one or more column expressions usage: | @@ -22,8 +22,8 @@ contributors: false ## Parameters - - `type`: Function name. See extra description for full list of accepted values - - `...rest`: Extra arguments required by some functions + - `type`: Function name. See extra description for full list of accepted values. + - `...rest`: Extra arguments required by some functions. ## Input/output types: diff --git a/commands/docs/polars_max.md b/commands/docs/polars_max.md index c979588e3ec..23131e28738 100644 --- a/commands/docs/polars_max.md +++ b/commands/docs/polars_max.md @@ -2,7 +2,7 @@ title: polars max categories: | dataframe -version: 0.110.0 +version: 0.111.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 a11360a4455..a08be3fcfc3 100644 --- a/commands/docs/polars_mean.md +++ b/commands/docs/polars_mean.md @@ -2,7 +2,7 @@ title: polars mean categories: | dataframe -version: 0.110.0 +version: 0.111.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 2e639bbb582..ddbf84e4ca6 100644 --- a/commands/docs/polars_median.md +++ b/commands/docs/polars_median.md @@ -2,7 +2,7 @@ title: polars median categories: | lazyframe -version: 0.110.0 +version: 0.111.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 39cad964617..f4c5025dff9 100644 --- a/commands/docs/polars_min.md +++ b/commands/docs/polars_min.md @@ -2,7 +2,7 @@ title: polars min categories: | dataframe -version: 0.110.0 +version: 0.111.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 d9feb8b998a..46b3ca1edd0 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.110.0 +version: 0.111.0 dataframe: | Counts unique values. usage: | diff --git a/commands/docs/polars_not.md b/commands/docs/polars_not.md index b2366613459..c8dd9eb4c51 100644 --- a/commands/docs/polars_not.md +++ b/commands/docs/polars_not.md @@ -2,7 +2,7 @@ title: polars not categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Inverts boolean mask. usage: | diff --git a/commands/docs/polars_open.md b/commands/docs/polars_open.md index d843815aeb5..10100f70755 100644 --- a/commands/docs/polars_open.md +++ b/commands/docs/polars_open.md @@ -2,7 +2,7 @@ title: polars open categories: | dataframe -version: 0.110.0 +version: 0.111.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: | @@ -22,23 +22,23 @@ contributors: false ## Flags - - `--eager`: Open dataframe as an eager dataframe - - `--type, -t {string}`: File type: csv, tsv, json, parquet, arrow, avro. If omitted, derive from file extension - - `--delimiter, -d {string}`: file delimiter character. CSV file - - `--no-header`: Indicates if file doesn't have header. CSV file - - `--infer-schema {number}`: Number of rows to infer the schema of the file. CSV file - - `--skip-rows {number}`: Number of rows to skip from file. CSV file - - `--columns {list}`: Columns to be selected from csv file. CSV and Parquet file - - `--schema, -s {any}`: Polars Schema in format [{name: str}]. CSV, JSON, and JSONL files - - `--hive-enabled`: Enable hive support. Parquet and Arrow files - - `--hive-start-idx {number}`: Start index of hive partitioning. Parquet and Arrow files - - `--hive-schema {any}`: Hive schema in format [{name: str}]. Parquet and Arrow files - - `--hive-try-parse-dates`: Try to parse dates in hive partitioning. Parquet and Arrow files - - `--truncate-ragged-lines`: Truncate lines that are longer than the schema. CSV file + - `--eager`: Open dataframe as an eager dataframe. + - `--type, -t {string}`: File type: csv, tsv, json, parquet, arrow, avro. If omitted, derive from file extension. + - `--delimiter, -d {string}`: File delimiter character. CSV file. + - `--no-header`: Indicates if file doesn't have header. CSV file. + - `--infer-schema {number}`: Number of rows to infer the schema of the file. CSV file. + - `--skip-rows {number}`: Number of rows to skip from file. CSV file. + - `--columns {list}`: Columns to be selected from csv file. CSV and Parquet file. + - `--schema, -s {any}`: Polars Schema in format [{name: str}]. CSV, JSON, and JSONL files. + - `--hive-enabled`: Enable hive support. Parquet and Arrow files. + - `--hive-start-idx {number}`: Start index of hive partitioning. Parquet and Arrow files. + - `--hive-schema {any}`: Hive schema in format [{name: str}]. Parquet and Arrow files. + - `--hive-try-parse-dates`: Try to parse dates in hive partitioning. Parquet and Arrow files. + - `--truncate-ragged-lines`: Truncate lines that are longer than the schema. CSV file. ## Parameters - - `file`: file path or cloud url to load values from + - `file`: File path or cloud url to load values from. ## Input/output types: diff --git a/commands/docs/polars_otherwise.md b/commands/docs/polars_otherwise.md index 7d65781c18f..cdefa8775f9 100644 --- a/commands/docs/polars_otherwise.md +++ b/commands/docs/polars_otherwise.md @@ -2,7 +2,7 @@ title: polars otherwise categories: | expression -version: 0.110.0 +version: 0.111.0 expression: | Completes a when expression. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `otherwise expression`: expression to apply when no when predicate matches + - `otherwise expression`: Expression to apply when no when predicate matches. ## Input/output types: diff --git a/commands/docs/polars_over.md b/commands/docs/polars_over.md index af9847c2a0e..ec838cb9be7 100644 --- a/commands/docs/polars_over.md +++ b/commands/docs/polars_over.md @@ -2,7 +2,7 @@ title: polars over categories: | lazyframe -version: 0.110.0 +version: 0.111.0 lazyframe: | Compute expressions over a window group defined by partition expressions. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `...rest`: Expression(s) that define the partition window + - `...rest`: Expression(s) that define the partition window. ## Input/output types: diff --git a/commands/docs/polars_pivot.md b/commands/docs/polars_pivot.md index d60255eba34..b60e0e5c79b 100644 --- a/commands/docs/polars_pivot.md +++ b/commands/docs/polars_pivot.md @@ -2,7 +2,7 @@ title: polars pivot categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Pivot a DataFrame from long to wide format. usage: | @@ -22,13 +22,13 @@ contributors: false ## Flags - - `--on, -o {list}`: column names for pivoting - - `--index, -i {list}`: column names for indexes - - `--values, -v {list}`: column names used as value columns - - `--aggregate, -a {any}`: Aggregation to apply when pivoting. The following are supported: first, sum, min, max, mean, median, count, last, or a custom expression - - `--separator, -p {string}`: Delimiter in generated column names in case of multiple `values` columns (default '_') - - `--sort, -s`: Sort columns - - `--streamable, -t`: Whether or not to use the polars streaming engine. Only valid for lazy dataframes + - `--on, -o {list}`: Column names for pivoting. + - `--index, -i {list}`: Column names for indexes. + - `--values, -v {list}`: Column names used as value columns. + - `--aggregate, -a {any}`: Aggregation to apply when pivoting. The following are supported: first, sum, min, max, mean, median, count, last, or a custom expression. + - `--separator, -p {string}`: Delimiter in generated column names in case of multiple `values` columns (default '_'). + - `--sort, -s`: Sort columns. + - `--streamable, -t`: Whether or not to use the polars streaming engine. Only valid for lazy dataframes. - `--stable`: Perform a stable pivot. @@ -43,12 +43,12 @@ contributors: false Perform a pivot in order to show individuals test score by subject ```nu > [[name subject date test_1 test_2]; [Cady maths 2025-04-01 98 100] [Cady physics 2025-04-01 99 100] [Karen maths 2025-04-02 61 60] [Karen physics 2025-04-02 58 60]] | polars into-df | polars pivot --on [subject] --index [name date] --values [test_1] -╭───┬───────┬──────────────┬───────┬─────────╮ -│ # │ name │ date │ maths │ physics │ -├───┼───────┼──────────────┼───────┼─────────┤ -│ 0 │ Cady │ 9 months ago │ 98 │ 99 │ -│ 1 │ Karen │ 9 months ago │ 61 │ 58 │ -╰───┴───────┴──────────────┴───────┴─────────╯ +╭───┬───────┬───────────────┬───────┬─────────╮ +│ # │ name │ date │ maths │ physics │ +├───┼───────┼───────────────┼───────┼─────────┤ +│ 0 │ Cady │ 11 months ago │ 98 │ 99 │ +│ 1 │ Karen │ 11 months ago │ 61 │ 58 │ +╰───┴───────┴───────────────┴───────┴─────────╯ ``` diff --git a/commands/docs/polars_profile.md b/commands/docs/polars_profile.md index 62abd6cddd7..1e29ad97806 100644 --- a/commands/docs/polars_profile.md +++ b/commands/docs/polars_profile.md @@ -2,7 +2,7 @@ title: polars profile categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Profile a lazy dataframe. usage: | diff --git a/commands/docs/polars_qcut.md b/commands/docs/polars_qcut.md index 7444843b292..1b618bbc324 100644 --- a/commands/docs/polars_qcut.md +++ b/commands/docs/polars_qcut.md @@ -2,7 +2,7 @@ title: polars qcut categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Bin continuous values into discrete categories based on their quantiles for a series. usage: | diff --git a/commands/docs/polars_quantile.md b/commands/docs/polars_quantile.md index 96170fce1b6..36e452fde3a 100644 --- a/commands/docs/polars_quantile.md +++ b/commands/docs/polars_quantile.md @@ -2,7 +2,7 @@ title: polars quantile categories: | lazyframe -version: 0.110.0 +version: 0.111.0 lazyframe: | Aggregates the columns to the selected quantile. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `quantile`: quantile value for quantile operation + - `quantile`: Quantile value for quantile operation. ## Input/output types: diff --git a/commands/docs/polars_query.md b/commands/docs/polars_query.md index 2114efc29c0..5ede4d5dc07 100644 --- a/commands/docs/polars_query.md +++ b/commands/docs/polars_query.md @@ -2,7 +2,7 @@ title: polars query categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Query dataframe using SQL. Note: The dataframe is always named 'df' in your query's from clause. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `sql`: sql query + - `sql`: Sql query. ## Input/output types: diff --git a/commands/docs/polars_rename.md b/commands/docs/polars_rename.md index e64f8111143..0de16cbf07b 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.110.0 +version: 0.111.0 dataframe_or_lazyframe: | Rename a dataframe column. usage: | @@ -22,8 +22,8 @@ contributors: false ## Parameters - - `columns`: Column(s) to be renamed. A string or list of strings - - `new names`: New names for the selected column(s). A string or list of strings + - `columns`: Column(s) to be renamed. A string or list of strings. + - `new names`: New names for the selected column(s). A string or list of strings. ## Input/output types: diff --git a/commands/docs/polars_replace-time-zone.md b/commands/docs/polars_replace-time-zone.md index fd3fe901db6..32fd70b5f71 100644 --- a/commands/docs/polars_replace-time-zone.md +++ b/commands/docs/polars_replace-time-zone.md @@ -2,7 +2,7 @@ title: polars replace-time-zone categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Replace the timezone information in a datetime column. usage: | @@ -65,10 +65,10 @@ Apply timezone with ambiguous datetime ╭───┬──────────────╮ │ # │ datetime │ ├───┼──────────────┤ -│ 0 │ 2 months ago │ +│ 0 │ 3 months ago │ │ 1 │ │ -│ 2 │ 2 months ago │ -│ 3 │ 2 months ago │ +│ 2 │ 3 months ago │ +│ 3 │ 3 months ago │ ╰───┴──────────────╯ ``` @@ -79,13 +79,13 @@ Apply timezone with nonexistent datetime | polars into-df | polars as-datetime "%Y-%m-%d %H:%M:%S" --naive | polars select (polars col datetime | polars replace-time-zone "America/New_York" --nonexistent null) -╭───┬───────────────╮ -│ # │ datetime │ -├───┼───────────────┤ -│ 0 │ 10 months ago │ -│ 1 │ │ -│ 2 │ 10 months ago │ -│ 3 │ 10 months ago │ -╰───┴───────────────╯ +╭───┬────────────╮ +│ # │ datetime │ +├───┼────────────┤ +│ 0 │ a year ago │ +│ 1 │ │ +│ 2 │ a year ago │ +│ 3 │ a year ago │ +╰───┴────────────╯ ``` diff --git a/commands/docs/polars_replace.md b/commands/docs/polars_replace.md index 80286d1bcee..346cbe33355 100644 --- a/commands/docs/polars_replace.md +++ b/commands/docs/polars_replace.md @@ -2,7 +2,7 @@ title: polars replace categories: | expression -version: 0.110.0 +version: 0.111.0 expression: | Create an expression that replaces old values with new values usage: | @@ -28,8 +28,8 @@ contributors: false ## Parameters - - `old`: Values to be replaced - - `new`: Values to replace by + - `old`: Values to be replaced. + - `new`: Values to replace by. ## Input/output types: diff --git a/commands/docs/polars_reverse.md b/commands/docs/polars_reverse.md index 38f5ccf2046..227d2ca68ee 100644 --- a/commands/docs/polars_reverse.md +++ b/commands/docs/polars_reverse.md @@ -2,7 +2,7 @@ title: polars reverse categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Reverses the LazyFrame usage: | diff --git a/commands/docs/polars_rolling.md b/commands/docs/polars_rolling.md index ffb26f6b4b0..405f6660ec8 100644 --- a/commands/docs/polars_rolling.md +++ b/commands/docs/polars_rolling.md @@ -2,7 +2,7 @@ title: polars rolling categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Rolling calculation for a series. usage: | @@ -22,8 +22,8 @@ contributors: false ## Parameters - - `type`: rolling operation - - `window`: Window size for rolling + - `type`: Rolling operation. + - `window`: Window size for rolling. ## Input/output types: diff --git a/commands/docs/polars_sample.md b/commands/docs/polars_sample.md index c5890129bdc..8d84fda063a 100644 --- a/commands/docs/polars_sample.md +++ b/commands/docs/polars_sample.md @@ -2,7 +2,7 @@ title: polars sample categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Create sample dataframe. usage: | @@ -22,11 +22,11 @@ contributors: false ## Flags - - `--n-rows, -n {int}`: number of rows to be taken from dataframe - - `--fraction, -f {number}`: fraction of dataframe to be taken - - `--seed, -s {number}`: seed for the selection - - `--replace, -e`: sample with replace - - `--shuffle, -u`: shuffle sample + - `--n-rows, -n {int}`: Number of rows to be taken from dataframe. + - `--fraction, -f {number}`: Fraction of dataframe to be taken. + - `--seed, -s {number}`: Seed for the selection. + - `--replace, -e`: Sample with replace. + - `--shuffle, -u`: Shuffle sample. ## Input/output types: diff --git a/commands/docs/polars_save.md b/commands/docs/polars_save.md index f5b6944b3db..c8864d2f826 100644 --- a/commands/docs/polars_save.md +++ b/commands/docs/polars_save.md @@ -2,7 +2,7 @@ title: polars save categories: | lazyframe -version: 0.110.0 +version: 0.111.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: | @@ -22,14 +22,14 @@ contributors: false ## Flags - - `--type, -t {string}`: File type: csv, json, parquet, arrow/ipc. If omitted, derive from file extension - - `--avro-compression {string}`: Compression for avro supports deflate or snappy - - `--csv-delimiter {string}`: file delimiter character + - `--type, -t {string}`: File type: csv, json, parquet, arrow/ipc. If omitted, derive from file extension. + - `--avro-compression {string}`: Compression for avro supports deflate or snappy. + - `--csv-delimiter {string}`: File delimiter character. - `--csv-no-header`: Indicates to exclude a header row for CSV files. ## Parameters - - `path`: Path or cloud url to write to + - `path`: Path or cloud url to write to. ## Input/output types: diff --git a/commands/docs/polars_schema.md b/commands/docs/polars_schema.md index fd0e4f0310e..ac41b385246 100644 --- a/commands/docs/polars_schema.md +++ b/commands/docs/polars_schema.md @@ -2,7 +2,7 @@ title: polars schema categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Show schema for a dataframe. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--datatype-list, -l`: creates a lazy dataframe + - `--datatype-list, -l`: Creates a lazy dataframe. ## Input/output types: diff --git a/commands/docs/polars_select.md b/commands/docs/polars_select.md index d9c905d9400..c575bf3d172 100644 --- a/commands/docs/polars_select.md +++ b/commands/docs/polars_select.md @@ -2,7 +2,7 @@ title: polars select categories: | lazyframe -version: 0.110.0 +version: 0.111.0 lazyframe: | Selects columns from lazyframe. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `...rest`: Expression(s) that define the column selection + - `...rest`: Expression(s) that define the column selection. ## Input/output types: diff --git a/commands/docs/polars_selector.md b/commands/docs/polars_selector.md index 96c510929d6..fc8812c60c9 100644 --- a/commands/docs/polars_selector.md +++ b/commands/docs/polars_selector.md @@ -2,7 +2,7 @@ title: polars selector categories: | expression -version: 0.110.0 +version: 0.111.0 expression: | Create column selectors for use in polars commands. usage: | diff --git a/commands/docs/polars_selector_all.md b/commands/docs/polars_selector_all.md index 5cbf22f48ea..93c712ac317 100644 --- a/commands/docs/polars_selector_all.md +++ b/commands/docs/polars_selector_all.md @@ -2,7 +2,7 @@ title: polars selector all categories: | expression -version: 0.110.0 +version: 0.111.0 expression: | Creates a selector that selects all columns. usage: | diff --git a/commands/docs/polars_selector_by-dtype.md b/commands/docs/polars_selector_by-dtype.md index 76563e1f5b9..0befe2042d3 100644 --- a/commands/docs/polars_selector_by-dtype.md +++ b/commands/docs/polars_selector_by-dtype.md @@ -2,7 +2,7 @@ title: polars selector by-dtype categories: | expression -version: 0.110.0 +version: 0.111.0 expression: | Creates a selector that selects columns by data type. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `...rest`: Data types to select (e.g., i64, f64, str, bool) + - `...rest`: Data types to select (e.g., i64, f64, str, bool). ## Input/output types: diff --git a/commands/docs/polars_selector_by-name.md b/commands/docs/polars_selector_by-name.md index 7ad5e06d6db..16415a295e9 100644 --- a/commands/docs/polars_selector_by-name.md +++ b/commands/docs/polars_selector_by-name.md @@ -2,7 +2,7 @@ title: polars selector by-name categories: | expression -version: 0.110.0 +version: 0.111.0 expression: | Creates a selector that selects columns by name. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `...rest`: Names of columns to select + - `...rest`: Names of columns to select. ## Input/output types: diff --git a/commands/docs/polars_selector_first.md b/commands/docs/polars_selector_first.md index eabe51670c0..e86934f5685 100644 --- a/commands/docs/polars_selector_first.md +++ b/commands/docs/polars_selector_first.md @@ -2,7 +2,7 @@ title: polars selector first categories: | expression -version: 0.110.0 +version: 0.111.0 expression: | Creates a selector that selects the first column(s) by index. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `n`: Number of columns to select from the beginning (default: 1) + - `n`: Number of columns to select from the beginning (default: 1). ## Input/output types: diff --git a/commands/docs/polars_selector_last.md b/commands/docs/polars_selector_last.md index 22ea00e3547..49f728202d1 100644 --- a/commands/docs/polars_selector_last.md +++ b/commands/docs/polars_selector_last.md @@ -2,7 +2,7 @@ title: polars selector last categories: | expression -version: 0.110.0 +version: 0.111.0 expression: | Creates a selector that selects the last column(s) by index. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `n`: Number of columns to select from the end (default: 1) + - `n`: Number of columns to select from the end (default: 1). ## Input/output types: diff --git a/commands/docs/polars_set-with-idx.md b/commands/docs/polars_set-with-idx.md index 322199e9704..d1a9880fd0e 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.110.0 +version: 0.111.0 dataframe: | Sets value in the given index. usage: | @@ -22,11 +22,11 @@ contributors: false ## Flags - - `--indices, -i {any}`: list of indices indicating where to set the value + - `--indices, -i {any}`: List of indices indicating where to set the value. ## Parameters - - `value`: value to be inserted in series + - `value`: Value to be inserted in series. ## Input/output types: diff --git a/commands/docs/polars_set.md b/commands/docs/polars_set.md index 74a8ff0012f..56a50ae445d 100644 --- a/commands/docs/polars_set.md +++ b/commands/docs/polars_set.md @@ -2,7 +2,7 @@ title: polars set categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Sets value where given mask is true. usage: | @@ -22,11 +22,11 @@ contributors: false ## Flags - - `--mask, -m {any}`: mask indicating insertions + - `--mask, -m {any}`: Mask indicating insertions. ## Parameters - - `value`: value to be inserted in series + - `value`: Value to be inserted in series. ## Input/output types: diff --git a/commands/docs/polars_shape.md b/commands/docs/polars_shape.md index 0641db30cc8..0a8908bcad1 100644 --- a/commands/docs/polars_shape.md +++ b/commands/docs/polars_shape.md @@ -2,7 +2,7 @@ title: polars shape categories: | dataframe -version: 0.110.0 +version: 0.111.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 0d70329c9b0..e549c597a56 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.110.0 +version: 0.111.0 dataframe_or_lazyframe: | Shifts the values by a given period. usage: | @@ -22,11 +22,11 @@ contributors: false ## Flags - - `--fill, -f {any}`: Expression used to fill the null values (lazy df) + - `--fill, -f {any}`: Expression used to fill the null values (lazy df). ## Parameters - - `period`: shift period + - `period`: Shift period. ## Input/output types: diff --git a/commands/docs/polars_slice.md b/commands/docs/polars_slice.md index 0605657a82d..ad78e29e56e 100644 --- a/commands/docs/polars_slice.md +++ b/commands/docs/polars_slice.md @@ -2,7 +2,7 @@ title: polars slice categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Creates new dataframe from a slice of rows. usage: | @@ -22,8 +22,8 @@ contributors: false ## Parameters - - `offset`: start of slice - - `size`: size of slice + - `offset`: Start of slice. + - `size`: Size of slice. ## Input/output types: diff --git a/commands/docs/polars_sort-by.md b/commands/docs/polars_sort-by.md index 56f69857476..38cd3f5b92f 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.110.0 +version: 0.111.0 lazyframe: | Sorts a lazy dataframe based on expression(s). usage: | @@ -22,13 +22,13 @@ contributors: false ## Flags - - `--reverse, -r {list}`: Reverse sorting. Default is false - - `--nulls-last, -n`: nulls are shown last in the dataframe - - `--maintain-order, -m`: Maintains order during sort + - `--reverse, -r {list}`: Reverse sorting. Default is false. + - `--nulls-last, -n`: Nulls are shown last in the dataframe. + - `--maintain-order, -m`: Maintains order during sort. ## Parameters - - `...rest`: sort expression for the dataframe + - `...rest`: Sort expression for the dataframe. ## Input/output types: diff --git a/commands/docs/polars_std.md b/commands/docs/polars_std.md index cae18533359..5ab2742e9e3 100644 --- a/commands/docs/polars_std.md +++ b/commands/docs/polars_std.md @@ -2,7 +2,7 @@ title: polars std categories: | dataframe -version: 0.110.0 +version: 0.111.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 5d5c29ce3f1..6f7d4c006ca 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.110.0 +version: 0.111.0 dataframe: | Gets a Dataframe or other object from the plugin cache. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `key`: Key of objects to get + - `key`: Key of objects to get. ## Input/output types: diff --git a/commands/docs/polars_store-ls.md b/commands/docs/polars_store-ls.md index a600c76d481..0423a4b1a75 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.110.0 +version: 0.111.0 dataframe: | Lists stored polars objects. usage: | diff --git a/commands/docs/polars_store-rm.md b/commands/docs/polars_store-rm.md index 4ced98aad07..96ff5058954 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.110.0 +version: 0.111.0 dataframe: | Removes a stored Dataframe or other object from the plugin cache. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `...rest`: Keys of objects to remove + - `...rest`: Keys of objects to remove. ## Input/output types: diff --git a/commands/docs/polars_str-join.md b/commands/docs/polars_str-join.md index 9531a62c279..26f01854bed 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.110.0 +version: 0.111.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 66eb5e0d7f2..2e9c32a1a46 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.110.0 +version: 0.111.0 dataframe: | Get lengths of all strings. usage: | diff --git a/commands/docs/polars_str-replace-all.md b/commands/docs/polars_str-replace-all.md index 434bb0abdb1..c37e1a02027 100644 --- a/commands/docs/polars_str-replace-all.md +++ b/commands/docs/polars_str-replace-all.md @@ -2,7 +2,7 @@ title: polars str-replace-all categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Replace all (sub)strings by a regex pattern. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--pattern, -p {string}`: Regex pattern to be matched - - `--replace, -r {string}`: replacing string + - `--pattern, -p {string}`: Regex pattern to be matched. + - `--replace, -r {string}`: Replacing string. ## Input/output types: diff --git a/commands/docs/polars_str-replace.md b/commands/docs/polars_str-replace.md index 822c1ae650a..f390408a948 100644 --- a/commands/docs/polars_str-replace.md +++ b/commands/docs/polars_str-replace.md @@ -2,7 +2,7 @@ title: polars str-replace categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Replace the leftmost (sub)string by a regex pattern. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--pattern, -p {string}`: Regex pattern to be matched - - `--replace, -r {string}`: replacing string + - `--pattern, -p {string}`: Regex pattern to be matched. + - `--replace, -r {string}`: Replacing string. ## Input/output types: diff --git a/commands/docs/polars_str-slice.md b/commands/docs/polars_str-slice.md index be6634fd26a..a5a47e0aede 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.110.0 +version: 0.111.0 dataframe: | Slices the string from the start position until the selected length. usage: | @@ -22,11 +22,11 @@ contributors: false ## Flags - - `--length, -l {int}`: optional length + - `--length, -l {int}`: Optional length. ## Parameters - - `start`: start of slice + - `start`: Start of slice. ## Input/output types: diff --git a/commands/docs/polars_str-split.md b/commands/docs/polars_str-split.md index c00a1bdb01e..1d52a5e05f8 100644 --- a/commands/docs/polars_str-split.md +++ b/commands/docs/polars_str-split.md @@ -2,7 +2,7 @@ title: polars str-split categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Split the string by a substring. The resulting dtype is list. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `expr`: Separator expression + - `expr`: Separator expression. ## Input/output types: diff --git a/commands/docs/polars_str-strip-chars.md b/commands/docs/polars_str-strip-chars.md index 1caff3a1ba8..0d9131ef8e8 100644 --- a/commands/docs/polars_str-strip-chars.md +++ b/commands/docs/polars_str-strip-chars.md @@ -2,7 +2,7 @@ title: polars str-strip-chars categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Strips specified characters from strings in a column usage: | @@ -22,12 +22,12 @@ contributors: false ## Flags - - `--start, -s`: Strip from start of strings only - - `--end, -e`: Strip from end of strings only + - `--start, -s`: Strip from start of strings only. + - `--end, -e`: Strip from end of strings only. ## Parameters - - `pattern`: Characters to strip as either a string or polars expression + - `pattern`: Characters to strip as either a string or polars expression. ## Input/output types: diff --git a/commands/docs/polars_strftime.md b/commands/docs/polars_strftime.md index bbaa10811d6..7c028a7446a 100644 --- a/commands/docs/polars_strftime.md +++ b/commands/docs/polars_strftime.md @@ -2,7 +2,7 @@ title: polars strftime categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Formats date based on string rule. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `fmt`: Format rule + - `fmt`: Format rule. ## Input/output types: diff --git a/commands/docs/polars_struct-json-encode.md b/commands/docs/polars_struct-json-encode.md index 2cb24e9aefa..7199e6bc8f7 100644 --- a/commands/docs/polars_struct-json-encode.md +++ b/commands/docs/polars_struct-json-encode.md @@ -2,7 +2,7 @@ title: polars struct-json-encode categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Convert this struct to a string column with json values. usage: | diff --git a/commands/docs/polars_sum.md b/commands/docs/polars_sum.md index 8b67e151987..0c92f800a91 100644 --- a/commands/docs/polars_sum.md +++ b/commands/docs/polars_sum.md @@ -2,7 +2,7 @@ title: polars sum categories: | dataframe -version: 0.110.0 +version: 0.111.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 6f80de2972e..9306581dcdb 100644 --- a/commands/docs/polars_summary.md +++ b/commands/docs/polars_summary.md @@ -2,7 +2,7 @@ title: polars summary categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | For a dataframe, produces descriptive statistics (summary statistics) for its numeric columns. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--quantiles, -q {list}`: provide optional quantiles + - `--quantiles, -q {list}`: Provide optional quantiles. ## Input/output types: diff --git a/commands/docs/polars_take.md b/commands/docs/polars_take.md index 5b198934bd4..1fd98a548a9 100644 --- a/commands/docs/polars_take.md +++ b/commands/docs/polars_take.md @@ -2,7 +2,7 @@ title: polars take categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Creates new dataframe using the given indices. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `indices`: list of indices used to take data + - `indices`: List of indices used to take data. ## Input/output types: diff --git a/commands/docs/polars_truncate.md b/commands/docs/polars_truncate.md index 361185daa23..72efc575a0d 100644 --- a/commands/docs/polars_truncate.md +++ b/commands/docs/polars_truncate.md @@ -2,7 +2,7 @@ title: polars truncate categories: | expression -version: 0.110.0 +version: 0.111.0 expression: | Divide the date/datetime range into buckets. usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `every`: Period length for every interval (can be duration or str) + - `every`: Period length for every interval (can be duration or str). ## Input/output types: @@ -40,9 +40,9 @@ Truncate a series of dates by period length │ # │ datetime │ truncated │ ├───┼───────────────┼───────────────┤ │ 0 │ a year ago │ a year ago │ -│ 1 │ 11 months ago │ 11 months ago │ -│ 2 │ 9 months ago │ 10 months ago │ -│ 3 │ 8 months ago │ 8 months ago │ +│ 1 │ a year ago │ a year ago │ +│ 2 │ 11 months ago │ 11 months ago │ +│ 3 │ 9 months ago │ 9 months ago │ ╰───┴───────────────┴───────────────╯ ``` diff --git a/commands/docs/polars_unique.md b/commands/docs/polars_unique.md index d4a63dcfb1c..928934930b6 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.110.0 +version: 0.111.0 dataframe_or_lazyframe: | Returns unique values from a dataframe. usage: | @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--subset, -s {any}`: Subset of column(s) to use to maintain rows (lazy df) - - `--last, -l`: Keeps last unique value. Default keeps first value (lazy df) - - `--maintain-order, -k`: Keep the same order as the original DataFrame (lazy df) + - `--subset, -s {any}`: Subset of column(s) to use to maintain rows (lazy df). + - `--last, -l`: Keeps last unique value. Default keeps first value (lazy df). + - `--maintain-order, -k`: Keep the same order as the original DataFrame (lazy df). ## Input/output types: diff --git a/commands/docs/polars_unnest.md b/commands/docs/polars_unnest.md index 600a0f8858e..2f472f2bc4e 100644 --- a/commands/docs/polars_unnest.md +++ b/commands/docs/polars_unnest.md @@ -2,7 +2,7 @@ title: polars unnest categories: | dataframe -version: 0.110.0 +version: 0.111.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: | @@ -22,11 +22,11 @@ contributors: false ## Flags - - `--separator, -s {string}`: optional separator to use when creating new column names + - `--separator, -s {string}`: Optional separator to use when creating new column names. ## Parameters - - `...rest`: columns to unnest + - `...rest`: Columns to unnest. ## Input/output types: diff --git a/commands/docs/polars_unpivot.md b/commands/docs/polars_unpivot.md index 67b6833c28a..6631f88e40b 100644 --- a/commands/docs/polars_unpivot.md +++ b/commands/docs/polars_unpivot.md @@ -2,7 +2,7 @@ title: polars unpivot categories: | dataframe -version: 0.110.0 +version: 0.111.0 dataframe: | Unpivot a DataFrame from wide to long format. usage: | @@ -22,10 +22,10 @@ contributors: false ## Flags - - `--index, -i {list}`: column names for unpivoting - - `--on, -o {list}`: column names used as value columns - - `--variable-name, -r {string}`: optional name for variable column - - `--value-name, -l {string}`: optional name for value column + - `--index, -i {list}`: Column names for unpivoting. + - `--on, -o {list}`: Column names used as value columns. + - `--variable-name, -r {string}`: Optional name for variable column. + - `--value-name, -l {string}`: Optional name for value column. ## Input/output types: diff --git a/commands/docs/polars_uppercase.md b/commands/docs/polars_uppercase.md index 4c9ed649275..773c50dd226 100644 --- a/commands/docs/polars_uppercase.md +++ b/commands/docs/polars_uppercase.md @@ -2,7 +2,7 @@ title: polars uppercase categories: | dataframe -version: 0.110.0 +version: 0.111.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 8d62761b35b..d8ed5ff3135 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.110.0 +version: 0.111.0 dataframe: | Returns a dataframe with the counts for unique values in series. usage: | @@ -22,10 +22,10 @@ contributors: false ## Flags - - `--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 + - `--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. ## Input/output types: diff --git a/commands/docs/polars_var.md b/commands/docs/polars_var.md index 2351b0c4f37..f2933b20ed6 100644 --- a/commands/docs/polars_var.md +++ b/commands/docs/polars_var.md @@ -2,7 +2,7 @@ title: polars var categories: | dataframe -version: 0.110.0 +version: 0.111.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 76e6110c7c2..620b506bd97 100644 --- a/commands/docs/polars_when.md +++ b/commands/docs/polars_when.md @@ -2,7 +2,7 @@ title: polars when categories: | expression -version: 0.110.0 +version: 0.111.0 expression: | Creates and modifies a when expression. usage: | @@ -22,8 +22,8 @@ contributors: false ## Parameters - - `when expression`: when expression used for matching - - `then expression`: expression that will be applied when predicate is true + - `when expression`: When expression used for matching. + - `then expression`: Expression that will be applied when predicate is true. ## Input/output types: diff --git a/commands/docs/polars_with-column.md b/commands/docs/polars_with-column.md index bab9fd4f8af..7fd1f9eb6e4 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.110.0 +version: 0.111.0 dataframe_or_lazyframe: | Adds a series to the dataframe. usage: | @@ -26,7 +26,7 @@ contributors: false ## Parameters - - `...rest`: series to be added or expressions used to define the new columns + - `...rest`: Series to be added or expressions used to define the new columns. ## Input/output types: diff --git a/commands/docs/port.md b/commands/docs/port.md index 64dcffb5a2b..47cfa6ee073 100644 --- a/commands/docs/port.md +++ b/commands/docs/port.md @@ -2,7 +2,7 @@ title: port categories: | network -version: 0.110.0 +version: 0.111.0 network: | Get a free TCP port from system. usage: | diff --git a/commands/docs/prepend.md b/commands/docs/prepend.md index 9685b310c44..72f7512e196 100644 --- a/commands/docs/prepend.md +++ b/commands/docs/prepend.md @@ -2,7 +2,7 @@ title: prepend categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Prepend any number of rows to a table. usage: | @@ -32,7 +32,7 @@ contributors: false | any | list<any> | ## Examples -prepend a list to an item +Prepend a list to an item. ```nu > 0 | prepend [1 2 3] ╭───┬───╮ @@ -44,7 +44,7 @@ prepend a list to an item ``` -Prepend a list of strings to a string +Prepend a list of strings to a string. ```nu > "a" | prepend ["b"] ╭───┬───╮ @@ -54,7 +54,7 @@ Prepend a list of strings to a string ``` -Prepend one int item +Prepend one int item. ```nu > [1 2 3 4] | prepend 0 ╭───┬───╮ @@ -67,7 +67,7 @@ Prepend one int item ``` -Prepend two int items +Prepend two int items. ```nu > [2 3 4] | prepend [0 1] ╭───┬───╮ @@ -80,7 +80,7 @@ Prepend two int items ``` -Prepend ints and strings +Prepend ints and strings. ```nu > [2 nu 4 shell] | prepend [0 1 rocks] ╭───┬───────╮ @@ -95,7 +95,7 @@ Prepend ints and strings ``` -Prepend a range +Prepend a range. ```nu > [3 4] | prepend 0..2 ╭───┬───╮ diff --git a/commands/docs/print.md b/commands/docs/print.md index 9c105b4ec2b..4bf87e14653 100644 --- a/commands/docs/print.md +++ b/commands/docs/print.md @@ -2,7 +2,7 @@ title: print categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Print the given values to stdout. usage: | @@ -22,13 +22,13 @@ contributors: false ## Flags - - `--no-newline, -n`: print without inserting a newline for the line ending - - `--stderr, -e`: print to stderr instead of stdout - - `--raw, -r`: print without formatting (including binary data) + - `--no-newline, -n`: Print without inserting a newline for the line ending. + - `--stderr, -e`: Print to stderr instead of stdout. + - `--raw, -r`: Print without formatting (including binary data). ## Parameters - - `...rest`: the values to print + - `...rest`: The values to print. ## Input/output types: diff --git a/commands/docs/ps.md b/commands/docs/ps.md index 673b6987224..bc6f4521044 100644 --- a/commands/docs/ps.md +++ b/commands/docs/ps.md @@ -2,7 +2,7 @@ title: ps categories: | system -version: 0.110.0 +version: 0.111.0 system: | View information about system processes. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--long, -l`: list all available columns for each entry + - `--long, -l`: List all available columns for each entry. ## Input/output types: diff --git a/commands/docs/pwd.md b/commands/docs/pwd.md index 6f3316d5a11..d338bfe65ec 100644 --- a/commands/docs/pwd.md +++ b/commands/docs/pwd.md @@ -2,7 +2,7 @@ title: pwd categories: | default -version: 0.110.0 +version: 0.111.0 default: | Return the current working directory usage: | diff --git a/commands/docs/query.md b/commands/docs/query.md index c5581c04f4a..32cdf250f45 100644 --- a/commands/docs/query.md +++ b/commands/docs/query.md @@ -2,7 +2,7 @@ title: query categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Show all the query commands usage: | diff --git a/commands/docs/query_db.md b/commands/docs/query_db.md index 57c6c735b10..7bfc00d49b7 100644 --- a/commands/docs/query_db.md +++ b/commands/docs/query_db.md @@ -2,7 +2,7 @@ title: query db categories: | database -version: 0.110.0 +version: 0.111.0 database: | Query a SQLite database with SQL statements. usage: | @@ -36,20 +36,20 @@ contributors: false | any | any | ## Examples -Execute SQL against a SQLite database +Execute SQL against a SQLite database. ```nu > open foo.db | query db "SELECT * FROM Bar" ``` -Execute a SQL statement with parameters +Execute a SQL statement with parameters. ```nu > stor create -t my_table -c { first: str, second: int } stor open | query db "INSERT INTO my_table VALUES (?, ?)" -p [hello 123] ``` -Execute a SQL statement with named parameters +Execute a SQL statement with named parameters. ```nu > stor create -t my_table -c { first: str, second: int } stor insert -t my_table -d { first: 'hello', second: '123' } @@ -62,7 +62,7 @@ stor open | query db "SELECT * FROM my_table WHERE second = :search_second" -p { ``` -Execute a SQL query, selecting a declared JSON(B) column that will automatically be parsed +Execute a SQL query, selecting a declared JSON(B) column that will automatically be parsed. ```nu > stor create -t my_table -c {data: jsonb} [{data: {name: Albert, age: 40}} {data: {name: Barnaby, age: 54}}] | stor insert -t my_table diff --git a/commands/docs/query_json.md b/commands/docs/query_json.md index 49c1bbd030c..0172a16204a 100644 --- a/commands/docs/query_json.md +++ b/commands/docs/query_json.md @@ -2,7 +2,7 @@ title: query json categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | execute json query on json file (open --raw | query json 'query string') usage: | @@ -22,7 +22,7 @@ contributors: false ## Parameters - - `query`: json query + - `query`: Json query. ## Examples diff --git a/commands/docs/query_web.md b/commands/docs/query_web.md index 842b5ab1c11..c5a0360b011 100644 --- a/commands/docs/query_web.md +++ b/commands/docs/query_web.md @@ -2,7 +2,7 @@ title: query web categories: | network -version: 0.110.0 +version: 0.111.0 network: | execute selector query on html/web usage: | @@ -22,11 +22,11 @@ contributors: false ## Flags - - `--query, -q {string}`: selector query - - `--as-html, -m`: return the query output as html - - `--attribute, -a {any}`: downselect based on the given attribute - - `--as-table, -t {list}`: find table based on column header list - - `--inspect, -i`: run in inspect mode to provide more information for determining column headers + - `--query, -q {string}`: Selector query. + - `--as-html, -m`: Return the query output as html. + - `--attribute, -a {any}`: Downselect based on the given attribute. + - `--as-table, -t {list}`: Find table based on column header list. + - `--inspect, -i`: Run in inspect mode to provide more information for determining column headers. ## Examples diff --git a/commands/docs/query_webpage-info.md b/commands/docs/query_webpage-info.md index ced3ac2a527..dcc6c9515b5 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.110.0 +version: 0.111.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 83710f0cb1c..2721034d429 100644 --- a/commands/docs/query_xml.md +++ b/commands/docs/query_xml.md @@ -2,7 +2,7 @@ title: query xml categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Execute XPath 1.0 query on XML input usage: | @@ -22,14 +22,14 @@ contributors: false ## Flags - - `--namespaces, -n {record}`: map of prefixes to namespace URIs + - `--namespaces, -n {record}`: Map of prefixes to namespace URIs. - `--output-string-value`: Include `string_value` in the nodeset output. On by default. - `--output-type`: Include `type` in the nodeset output. Off by default. - `--output-names`: Include `local_name`, `prefixed_name`, and `namespace` in the nodeset output. Off by default. ## Parameters - - `query`: xpath query + - `query`: Xpath query. ## Input/output types: diff --git a/commands/docs/random.md b/commands/docs/random.md index 8221ac22379..c3a7e0e6778 100644 --- a/commands/docs/random.md +++ b/commands/docs/random.md @@ -2,7 +2,7 @@ title: random categories: | random -version: 0.110.0 +version: 0.111.0 random: | Generate a random value. usage: | diff --git a/commands/docs/random_binary.md b/commands/docs/random_binary.md index 7b878bd1e01..bb317a3894c 100644 --- a/commands/docs/random_binary.md +++ b/commands/docs/random_binary.md @@ -2,7 +2,7 @@ title: random binary categories: | random -version: 0.110.0 +version: 0.111.0 random: | Generate random bytes. usage: | @@ -32,13 +32,13 @@ contributors: false | nothing | binary | ## Examples -Generate 16 random bytes +Generate 16 random bytes. ```nu > random binary 16 ``` -Generate 1 random kilobyte +Generate 1 random kilobyte. ```nu > random binary 1kb diff --git a/commands/docs/random_bool.md b/commands/docs/random_bool.md index 377510bf903..b114c904bb6 100644 --- a/commands/docs/random_bool.md +++ b/commands/docs/random_bool.md @@ -2,7 +2,7 @@ title: random bool categories: | random -version: 0.110.0 +version: 0.111.0 random: | Generate a random boolean value. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--bias, -b {number}`: Adjusts the probability of a "true" outcome + - `--bias, -b {number}`: Adjusts the probability of a "true" outcome. ## Input/output types: @@ -32,13 +32,13 @@ contributors: false | nothing | bool | ## Examples -Generate a random boolean value +Generate a random boolean value. ```nu > random bool ``` -Generate a random boolean value with a 75% chance of "true" +Generate a random boolean value with a 75% chance of "true". ```nu > random bool --bias 0.75 diff --git a/commands/docs/random_chars.md b/commands/docs/random_chars.md index 8beca101295..fb3fdc724e3 100644 --- a/commands/docs/random_chars.md +++ b/commands/docs/random_chars.md @@ -2,7 +2,7 @@ title: random chars categories: | random -version: 0.110.0 +version: 0.111.0 random: | Generate random chars uniformly distributed over ASCII letters and numbers: a-z, A-Z and 0-9. usage: | @@ -32,19 +32,19 @@ contributors: false | nothing | string | ## Examples -Generate a string with 25 random chars +Generate a string with 25 random chars. ```nu > random chars ``` -Generate random chars with specified length +Generate random chars with specified length. ```nu > random chars --length 20 ``` -Generate one kilobyte of random chars +Generate one kilobyte of random chars. ```nu > random chars --length 1kb diff --git a/commands/docs/random_dice.md b/commands/docs/random_dice.md index ef7d24acfb9..8ab35d413b0 100644 --- a/commands/docs/random_dice.md +++ b/commands/docs/random_dice.md @@ -2,7 +2,7 @@ title: random dice categories: | random -version: 0.110.0 +version: 0.111.0 random: | Generate a random dice roll. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--dice, -d {int}`: The amount of dice being rolled - - `--sides, -s {int}`: The amount of sides a die has + - `--dice, -d {int}`: The amount of dice being rolled. + - `--sides, -s {int}`: The amount of sides a die has. ## Input/output types: @@ -33,13 +33,13 @@ contributors: false | nothing | list<int> | ## Examples -Roll 1 dice with 6 sides each +Roll 1 dice with 6 sides each. ```nu > random dice ``` -Roll 10 dice with 12 sides each +Roll 10 dice with 12 sides each. ```nu > random dice --dice 10 --sides 12 diff --git a/commands/docs/random_float.md b/commands/docs/random_float.md index 78b6de4bb6a..c47a2c3f1f7 100644 --- a/commands/docs/random_float.md +++ b/commands/docs/random_float.md @@ -2,7 +2,7 @@ title: random float categories: | random -version: 0.110.0 +version: 0.111.0 random: | Generate a random float within a range [min..max]. usage: | @@ -32,25 +32,25 @@ contributors: false | nothing | float | ## Examples -Generate a default float value between 0 and 1 +Generate a default float value between 0 and 1. ```nu > random float ``` -Generate a random float less than or equal to 500 +Generate a random float less than or equal to 500. ```nu > random float ..500 ``` -Generate a random float greater than or equal to 100000 +Generate a random float greater than or equal to 100000. ```nu > random float 100000.. ``` -Generate a random float between 1.0 and 1.1 +Generate a random float between 1.0 and 1.1. ```nu > random float 1.0..1.1 diff --git a/commands/docs/random_int.md b/commands/docs/random_int.md index eda0e1e2fac..511c7d88960 100644 --- a/commands/docs/random_int.md +++ b/commands/docs/random_int.md @@ -2,7 +2,7 @@ title: random int categories: | random -version: 0.110.0 +version: 0.111.0 random: | Generate a random integer [min..max]. usage: | @@ -32,25 +32,25 @@ contributors: false | nothing | int | ## Examples -Generate a non-negative random integer +Generate a non-negative random integer. ```nu > random int ``` -Generate a random integer between 0 (inclusive) and 500 (inclusive) +Generate a random integer between 0 (inclusive) and 500 (inclusive). ```nu > random int ..500 ``` -Generate a random integer greater than or equal to 100000 +Generate a random integer greater than or equal to 100000. ```nu > random int 100000.. ``` -Generate a random integer between -10 (inclusive) and 10 (inclusive) +Generate a random integer between -10 (inclusive) and 10 (inclusive). ```nu > random int (-10)..10 diff --git a/commands/docs/random_uuid.md b/commands/docs/random_uuid.md index 1892a6fe59e..e17e608b044 100644 --- a/commands/docs/random_uuid.md +++ b/commands/docs/random_uuid.md @@ -2,7 +2,7 @@ title: random uuid categories: | random -version: 0.110.0 +version: 0.111.0 random: | Generate a random uuid string of the specified version. usage: | @@ -35,19 +35,19 @@ contributors: false | nothing | string | ## Examples -Generate a random uuid v4 string (default) +Generate a random uuid v4 string (default). ```nu > random uuid ``` -Generate a uuid v1 string (timestamp-based) +Generate a uuid v1 string (timestamp-based). ```nu > random uuid -v 1 -m 00:11:22:33:44:55 ``` -Generate a uuid v3 string (namespace with MD5) +Generate a uuid v3 string (namespace with MD5). ```nu > random uuid -v 3 -n dns -s example.com @@ -59,13 +59,13 @@ Generate a uuid v4 string (random). ``` -Generate a uuid v5 string (namespace with SHA1) +Generate a uuid v5 string (namespace with SHA1). ```nu > random uuid -v 5 -n dns -s example.com ``` -Generate a uuid v7 string (timestamp + random) +Generate a uuid v7 string (timestamp + random). ```nu > random uuid -v 7 diff --git a/commands/docs/reduce.md b/commands/docs/reduce.md index 318c0dfe9ae..7a56479fe5d 100644 --- a/commands/docs/reduce.md +++ b/commands/docs/reduce.md @@ -2,7 +2,7 @@ title: reduce categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Aggregate a list (starting from the left) to a single value using an accumulator closure. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--fold, -f {any}`: reduce with initial value + - `--fold, -f {any}`: Reduce with initial value. ## Parameters @@ -38,7 +38,7 @@ contributors: false | range | any | ## Examples -Sum values of a list (same as 'math sum') +Sum values of a list (same as 'math sum'). ```nu > [ 1 2 3 4 ] | reduce {|it, acc| $it + $acc } 10 @@ -50,25 +50,25 @@ Sum values of a list (same as 'math sum') -8 ``` -Sum values of a list, plus their indexes +Sum values of a list, plus their indexes. ```nu > [ 8 7 6 ] | enumerate | reduce --fold 0 {|it, acc| $acc + $it.item + $it.index } 24 ``` -Sum values with a starting value (fold) +Sum values with a starting value (fold). ```nu > [ 1 2 3 4 ] | reduce --fold 10 {|it, acc| $acc + $it } 20 ``` -Iteratively perform string replace (from left to right): 'foobar' -> 'bazbar' -> 'quuxbar' +Iteratively perform string replace (from left to right): 'foobar' -> 'bazbar' -> 'quuxbar'. ```nu > [[foo baz] [baz quux]] | reduce --fold "foobar" {|it, acc| $acc | str replace $it.0 $it.1} quuxbar ``` -Replace selected characters in a string with 'X' +Replace selected characters in a string with 'X'. ```nu > [ i o t ] | reduce --fold "Arthur, King of the Britons" {|it, acc| $acc | str replace --all $it "X" } ArXhur, KXng Xf Xhe BrXXXns diff --git a/commands/docs/reject.md b/commands/docs/reject.md index 0f1a508fc72..45b589f67a0 100644 --- a/commands/docs/reject.md +++ b/commands/docs/reject.md @@ -2,7 +2,7 @@ title: reject categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Remove the given columns or rows from the table. Opposite of `select`. usage: | @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--optional, -o`: make all cell path members optional - - `--ignore-case`: make all cell path members case insensitive - - `--ignore-errors, -i`: ignore missing data (make all cell path members optional) (deprecated) + - `--optional, -o`: Make all cell path members optional. + - `--ignore-case`: Make all cell path members case insensitive. + - `--ignore-errors, -i`: Ignore missing data (make all cell path members optional) (deprecated). ## Parameters @@ -40,13 +40,13 @@ contributors: false | list<any> | list<any> | ## Examples -Reject a column in the `ls` table +Reject a column in the `ls` table. ```nu > ls | reject modified ``` -Reject a column in a table +Reject a column in a table. ```nu > [[a, b]; [1, 2]] | reject a ╭───┬───╮ @@ -57,7 +57,7 @@ Reject a column in a table ``` -Reject a row in a table +Reject a row in a table. ```nu > [[a, b]; [1, 2] [3, 4]] | reject 1 ╭───┬───┬───╮ @@ -68,7 +68,7 @@ Reject a row in a table ``` -Reject the specified field in a record +Reject the specified field in a record. ```nu > {a: 1, b: 2} | reject a ╭───┬───╮ @@ -76,7 +76,7 @@ Reject the specified field in a record ╰───┴───╯ ``` -Reject a nested field in a record +Reject a nested field in a record. ```nu > {a: {b: 3, c: 5}} | reject a.b ╭───┬───────────╮ @@ -86,13 +86,13 @@ Reject a nested field in a record ╰───┴───────────╯ ``` -Reject multiple rows +Reject multiple rows. ```nu > [[name type size]; [Cargo.toml toml 1kb] [Cargo.lock toml 2kb] [file.json json 3kb]] | reject 0 2 ``` -Reject multiple columns +Reject multiple columns. ```nu > [[name type size]; [Cargo.toml toml 1kb] [Cargo.lock toml 2kb]] | reject type size ╭───┬────────────╮ @@ -104,7 +104,7 @@ Reject multiple columns ``` -Reject multiple columns by spreading a list +Reject multiple columns by spreading a list. ```nu > let cols = [type size]; [[name type size]; [Cargo.toml toml 1kb] [Cargo.lock toml 2kb]] | reject ...$cols ╭───┬────────────╮ @@ -116,7 +116,7 @@ Reject multiple columns by spreading a list ``` -Reject item in list +Reject item in list. ```nu > [1 2 3] | reject 1 ╭───┬───╮ @@ -127,4 +127,4 @@ Reject item in list ``` ## Notes -To remove a quantity of rows or columns, use `skip`, `drop`, or `drop column`. \ No newline at end of file +To remove a quantity of rows or columns, use `skip`, `drop`, or `drop column`. To keep/retain only specific columns, use `select`. \ No newline at end of file diff --git a/commands/docs/rename.md b/commands/docs/rename.md index 38258dbe192..c1091164603 100644 --- a/commands/docs/rename.md +++ b/commands/docs/rename.md @@ -2,7 +2,7 @@ title: rename categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Creates a new table with columns renamed. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--column, -c {record}`: column name to be changed - - `--block, -b {closure(any)}`: A closure to apply changes on each column + - `--column, -c {record}`: Column name to be changed. + - `--block, -b {closure(any)}`: A closure to apply changes on each column. ## Parameters @@ -38,7 +38,7 @@ contributors: false | table | table | ## Examples -Rename a column +Rename a column. ```nu > [[a, b]; [1, 2]] | rename my_column ╭───┬───────────┬───╮ @@ -49,7 +49,7 @@ Rename a column ``` -Rename many columns +Rename many columns. ```nu > [[a, b, c]; [1, 2, 3]] | rename eggs ham bacon ╭───┬──────┬─────┬───────╮ @@ -60,7 +60,7 @@ Rename many columns ``` -Rename a specific column +Rename a specific column. ```nu > [[a, b, c]; [1, 2, 3]] | rename --column { a: ham } ╭───┬─────┬───┬───╮ @@ -71,7 +71,7 @@ Rename a specific column ``` -Rename the fields of a record +Rename the fields of a record. ```nu > {a: 1 b: 2} | rename x y ╭───┬───╮ @@ -80,7 +80,7 @@ Rename the fields of a record ╰───┴───╯ ``` -Rename fields based on a given closure +Rename fields based on a given closure. ```nu > {abc: 1, bbc: 2} | rename --block {str replace --all 'b' 'z'} ╭─────┬───╮ diff --git a/commands/docs/return.md b/commands/docs/return.md index 1699f0caa0e..14a2e37a581 100644 --- a/commands/docs/return.md +++ b/commands/docs/return.md @@ -2,7 +2,7 @@ title: return categories: | core -version: 0.110.0 +version: 0.111.0 core: | Return early from a custom command. usage: | @@ -32,7 +32,7 @@ contributors: false | nothing | any | ## Examples -Return early +Return early. ```nu > def foo [] { return } diff --git a/commands/docs/reverse.md b/commands/docs/reverse.md index a9f370e2bf7..8a14c1cbc9f 100644 --- a/commands/docs/reverse.md +++ b/commands/docs/reverse.md @@ -2,7 +2,7 @@ title: reverse categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Reverses the input list or table. usage: | @@ -28,7 +28,7 @@ contributors: false | list<any> | list<any> | ## Examples -Reverse a list +Reverse a list. ```nu > [0,1,2,3] | reverse ╭───┬───╮ @@ -40,7 +40,7 @@ Reverse a list ``` -Reverse a table +Reverse a table. ```nu > [{a: 1} {a: 2}] | reverse ╭───┬───╮ diff --git a/commands/docs/rm.md b/commands/docs/rm.md index a1670d13447..8f52c49deb6 100644 --- a/commands/docs/rm.md +++ b/commands/docs/rm.md @@ -2,7 +2,7 @@ title: rm categories: | filesystem -version: 0.110.0 +version: 0.111.0 filesystem: | Remove files and directories. usage: | @@ -22,13 +22,14 @@ contributors: false ## Flags - - `--trash, -t`: move to the platform's trash instead of permanently deleting. not used on android and ios - - `--permanent, -p`: delete permanently, ignoring the 'always_trash' config option. always enabled on android and ios - - `--recursive, -r`: delete subdirectories recursively - - `--force, -f`: suppress error when no file - - `--verbose, -v`: print names of deleted files - - `--interactive, -i`: ask user to confirm action - - `--interactive-once, -I`: ask user to confirm action only once + - `--trash, -t`: Move to the platform's trash instead of permanently deleting. not used on android and ios. + - `--permanent, -p`: Delete permanently, ignoring the 'always_trash' config option. always enabled on android and ios. + - `--recursive, -r`: Delete subdirectories recursively. + - `--force, -f`: Suppress error when no file. + - `--verbose, -v`: Print names of deleted files. + - `--interactive, -i`: Ask user to confirm action. + - `--interactive-once, -I`: Ask user to confirm action only once. + - `--all, -a`: Remove hidden files if '*' is provided. ## Parameters @@ -42,31 +43,31 @@ contributors: false | nothing | nothing | ## Examples -Delete, or move a file to the trash (based on the 'always_trash' config option) +Delete, or move a file to the trash (based on the 'always_trash' config option). ```nu > rm file.txt ``` -Move a file to the trash +Move a file to the trash. ```nu > rm --trash file.txt ``` -Delete a file permanently, even if the 'always_trash' config option is true +Delete a file permanently, even if the 'always_trash' config option is true. ```nu > rm --permanent file.txt ``` -Delete a file, ignoring 'file not found' errors +Delete a file, ignoring 'file not found' errors. ```nu > rm --force file.txt ``` -Delete all 0KB files in the current directory +Delete all 0KB files in the current directory. ```nu > ls | where size == 0KB and type == file | each { rm $in.name } | null diff --git a/commands/docs/roll.md b/commands/docs/roll.md index d512a18d7c3..690813ca7e9 100644 --- a/commands/docs/roll.md +++ b/commands/docs/roll.md @@ -2,7 +2,7 @@ title: roll categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Rolling commands for tables. usage: | diff --git a/commands/docs/roll_down.md b/commands/docs/roll_down.md index 99022680cc2..be6497ec8b8 100644 --- a/commands/docs/roll_down.md +++ b/commands/docs/roll_down.md @@ -2,7 +2,7 @@ title: roll down categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Roll table rows down. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--by, -b {int}`: Number of rows to roll + - `--by, -b {int}`: Number of rows to roll. ## Input/output types: diff --git a/commands/docs/roll_left.md b/commands/docs/roll_left.md index cf2237252a6..75b57d722cc 100644 --- a/commands/docs/roll_left.md +++ b/commands/docs/roll_left.md @@ -2,7 +2,7 @@ title: roll left categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Roll record or table columns left. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--by, -b {int}`: Number of columns to roll - - `--cells-only, -c`: rotates columns leaving headers fixed + - `--by, -b {int}`: Number of columns to roll. + - `--cells-only, -c`: Rotates columns leaving headers fixed. ## Input/output types: diff --git a/commands/docs/roll_right.md b/commands/docs/roll_right.md index d026a5ab2af..9cec9c7da39 100644 --- a/commands/docs/roll_right.md +++ b/commands/docs/roll_right.md @@ -2,7 +2,7 @@ title: roll right categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Roll table columns right. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--by, -b {int}`: Number of columns to roll - - `--cells-only, -c`: rotates columns leaving headers fixed + - `--by, -b {int}`: Number of columns to roll. + - `--cells-only, -c`: Rotates columns leaving headers fixed. ## Input/output types: diff --git a/commands/docs/roll_up.md b/commands/docs/roll_up.md index f849aa95bcf..ff1743bc11e 100644 --- a/commands/docs/roll_up.md +++ b/commands/docs/roll_up.md @@ -2,7 +2,7 @@ title: roll up categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Roll table rows up. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--by, -b {int}`: Number of rows to roll + - `--by, -b {int}`: Number of rows to roll. ## Input/output types: diff --git a/commands/docs/rotate.md b/commands/docs/rotate.md index 75574e599e2..45e9e95711e 100644 --- a/commands/docs/rotate.md +++ b/commands/docs/rotate.md @@ -2,7 +2,7 @@ title: rotate categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Rotates a table or record clockwise (default) or counter-clockwise (use --ccw flag). usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--ccw`: rotate counter clockwise + - `--ccw`: Rotate counter clockwise. ## Parameters diff --git a/commands/docs/run-external.md b/commands/docs/run-external.md index 0f053876902..6251ff2ff0d 100644 --- a/commands/docs/run-external.md +++ b/commands/docs/run-external.md @@ -2,7 +2,7 @@ title: run-external categories: | system -version: 0.110.0 +version: 0.111.0 system: | Runs external command. usage: | diff --git a/commands/docs/save.md b/commands/docs/save.md index dc51903f201..b359a6c48f8 100644 --- a/commands/docs/save.md +++ b/commands/docs/save.md @@ -2,7 +2,7 @@ title: save categories: | filesystem -version: 0.110.0 +version: 0.111.0 filesystem: | Save a file. usage: | @@ -22,11 +22,11 @@ contributors: false ## Flags - - `--stderr, -e {path}`: the filename used to save stderr, only works with `-r` flag - - `--raw, -r`: save file as raw binary - - `--append, -a`: append input to the end of the file - - `--force, -f`: overwrite the destination - - `--progress, -p`: enable progress bar + - `--stderr, -e {path}`: The filename used to save stderr, only works with `-r` flag. + - `--raw, -r`: Save file as raw binary. + - `--append, -a`: Append input to the end of the file. + - `--force, -f`: Overwrite the destination. + - `--progress, -p`: Enable progress bar. ## Parameters @@ -40,37 +40,37 @@ contributors: false | any | nothing | ## Examples -Save a string to foo.txt in the current directory +Save a string to foo.txt in the current directory. ```nu > 'save me' | save foo.txt ``` -Append a string to the end of foo.txt +Append a string to the end of foo.txt. ```nu > 'append me' | save --append foo.txt ``` -Save a record to foo.json in the current directory +Save a record to foo.json in the current directory. ```nu > { a: 1, b: 2 } | save foo.json ``` -Save a running program's stderr to foo.txt +Save a running program's stderr to foo.txt. ```nu > do -i {} | save foo.txt --stderr foo.txt ``` -Save a running program's stderr to separate file +Save a running program's stderr to separate file. ```nu > do -i {} | save foo.txt --stderr bar.txt ``` -Show the extensions for which the `save` command will automatically serialize +Show the extensions for which the `save` command will automatically serialize. ```nu > scope commands | where name starts-with "to " diff --git a/commands/docs/schema.md b/commands/docs/schema.md index 9f34380e394..af1310374c4 100644 --- a/commands/docs/schema.md +++ b/commands/docs/schema.md @@ -2,7 +2,7 @@ title: schema categories: | database -version: 0.110.0 +version: 0.111.0 database: | Show the schema of a SQLite database. usage: | @@ -28,7 +28,7 @@ contributors: false | any | any | ## Examples -Show the schema of a SQLite database +Show the schema of a SQLite database. ```nu > open foo.db | schema diff --git a/commands/docs/scope.md b/commands/docs/scope.md index 828a7d6fd30..6ce3ab92c05 100644 --- a/commands/docs/scope.md +++ b/commands/docs/scope.md @@ -2,7 +2,7 @@ title: scope categories: | core -version: 0.110.0 +version: 0.111.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 28d825a71a1..b1fc585b32b 100644 --- a/commands/docs/scope_aliases.md +++ b/commands/docs/scope_aliases.md @@ -2,7 +2,7 @@ title: scope aliases categories: | core -version: 0.110.0 +version: 0.111.0 core: | Output info on the aliases in the current scope. usage: | @@ -28,7 +28,7 @@ contributors: false | nothing | any | ## Examples -Show the aliases in the current scope +Show the aliases in the current scope. ```nu > scope aliases diff --git a/commands/docs/scope_commands.md b/commands/docs/scope_commands.md index f6e3419157c..0ee1ba16ab7 100644 --- a/commands/docs/scope_commands.md +++ b/commands/docs/scope_commands.md @@ -2,7 +2,7 @@ title: scope commands categories: | core -version: 0.110.0 +version: 0.111.0 core: | Output info on the commands in the current scope. usage: | @@ -28,7 +28,7 @@ contributors: false | nothing | list<any> | ## Examples -Show the commands in the current scope +Show the commands in the current scope. ```nu > scope commands diff --git a/commands/docs/scope_engine-stats.md b/commands/docs/scope_engine-stats.md index 3d72b426d6e..e0fc1a26e44 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.110.0 +version: 0.111.0 core: | Output stats on the engine in the current state. usage: | @@ -28,7 +28,7 @@ contributors: false | nothing | any | ## Examples -Show the stats on the current engine state +Show the stats on the current engine state. ```nu > scope engine-stats diff --git a/commands/docs/scope_externs.md b/commands/docs/scope_externs.md index d15096ec1b0..41b27f24efb 100644 --- a/commands/docs/scope_externs.md +++ b/commands/docs/scope_externs.md @@ -2,7 +2,7 @@ title: scope externs categories: | core -version: 0.110.0 +version: 0.111.0 core: | Output info on the known externals in the current scope. usage: | @@ -28,7 +28,7 @@ contributors: false | nothing | any | ## Examples -Show the known externals in the current scope +Show the known externals in the current scope. ```nu > scope externs diff --git a/commands/docs/scope_modules.md b/commands/docs/scope_modules.md index 5537a49e033..b25ae877343 100644 --- a/commands/docs/scope_modules.md +++ b/commands/docs/scope_modules.md @@ -2,7 +2,7 @@ title: scope modules categories: | core -version: 0.110.0 +version: 0.111.0 core: | Output info on the modules in the current scope. usage: | @@ -28,7 +28,7 @@ contributors: false | nothing | any | ## Examples -Show the modules in the current scope +Show the modules in the current scope. ```nu > scope modules diff --git a/commands/docs/scope_variables.md b/commands/docs/scope_variables.md index e384378ff81..79ccb69067c 100644 --- a/commands/docs/scope_variables.md +++ b/commands/docs/scope_variables.md @@ -2,7 +2,7 @@ title: scope variables categories: | core -version: 0.110.0 +version: 0.111.0 core: | Output info on the variables in the current scope. usage: | @@ -28,7 +28,7 @@ contributors: false | nothing | any | ## Examples -Show the variables in the current scope +Show the variables in the current scope. ```nu > scope variables diff --git a/commands/docs/select.md b/commands/docs/select.md index 1c74093c197..b9fe9e1ac00 100644 --- a/commands/docs/select.md +++ b/commands/docs/select.md @@ -2,7 +2,7 @@ title: select categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Select only these columns or rows from the input. Opposite of `reject`. usage: | @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--optional, -o`: make all cell path members optional (returns `null` for missing values) - - `--ignore-case`: make all cell path members case insensitive - - `--ignore-errors, -i`: ignore missing data (make all cell path members optional) (deprecated) + - `--optional, -o`: Make all cell path members optional (returns `null` for missing values). + - `--ignore-case`: Make all cell path members case insensitive. + - `--ignore-errors, -i`: Ignore missing data (make all cell path members optional) (deprecated). ## Parameters @@ -33,14 +33,15 @@ contributors: false ## Input/output types: -| input | output | -| --------- | ------ | -| record | record | -| table | table | -| list<any> | any | +| input | output | +| ------------------ | ------------------ | +| record | record | +| table | table | +| list<any> | any | +| SQLiteQueryBuilder | SQLiteQueryBuilder | ## Examples -Select a column in a table +Select a column in a table. ```nu > [{a: a b: b}] | select a ╭───┬───╮ @@ -51,7 +52,7 @@ Select a column in a table ``` -Select a column even if some rows are missing that column +Select a column even if some rows are missing that column. ```nu > [{a: a0 b: b0} {b: b1}] | select -o a ╭───┬────╮ @@ -63,7 +64,7 @@ Select a column even if some rows are missing that column ``` -Select a field in a record +Select a field in a record. ```nu > {a: a b: b} | select a ╭───┬───╮ @@ -71,19 +72,19 @@ Select a field in a record ╰───┴───╯ ``` -Select just the `name` column +Select just the `name` column. ```nu > ls | select name ``` -Select the first four rows (this is the same as `first 4`) +Select the first four rows (this is the same as `first 4`). ```nu > ls | select 0 1 2 3 ``` -Select multiple columns +Select multiple columns. ```nu > [[name type size]; [Cargo.toml toml 1kb] [Cargo.lock toml 2kb]] | select name type ╭───┬────────────┬──────╮ @@ -95,7 +96,7 @@ Select multiple columns ``` -Select multiple columns by spreading a list +Select multiple columns by spreading a list. ```nu > let cols = [name type]; [[name type size]; [Cargo.toml toml 1kb] [Cargo.lock toml 2kb]] | select ...$cols ╭───┬────────────┬──────╮ diff --git a/commands/docs/seq.md b/commands/docs/seq.md index 428e3f67faa..022f6a94b55 100644 --- a/commands/docs/seq.md +++ b/commands/docs/seq.md @@ -2,7 +2,7 @@ title: seq categories: | generators -version: 0.110.0 +version: 0.111.0 generators: | Output sequences of numbers. usage: | diff --git a/commands/docs/seq_char.md b/commands/docs/seq_char.md index 422da434482..e562a203608 100644 --- a/commands/docs/seq_char.md +++ b/commands/docs/seq_char.md @@ -2,7 +2,7 @@ title: seq char categories: | generators -version: 0.110.0 +version: 0.111.0 generators: | Print a sequence of ASCII characters. usage: | diff --git a/commands/docs/seq_date.md b/commands/docs/seq_date.md index f76a6bbab85..4830d71cbc2 100644 --- a/commands/docs/seq_date.md +++ b/commands/docs/seq_date.md @@ -2,7 +2,7 @@ title: seq date categories: | generators -version: 0.110.0 +version: 0.111.0 generators: | Print sequences of dates. usage: | @@ -22,14 +22,14 @@ contributors: false ## Flags - - `--output-format, -o {string}`: prints dates in this format (defaults to %Y-%m-%d) - - `--input-format, -i {string}`: give argument dates in this format (defaults to %Y-%m-%d) - - `--begin-date, -b {string}`: beginning date range - - `--end-date, -e {string}`: ending date - - `--increment, -n {oneof}`: increment dates by this duration (defaults to days if integer) - - `--days, -d {int}`: number of days to print (ignored if periods is used) - - `--periods, -p {int}`: number of periods to print - - `--reverse, -r`: print dates in reverse + - `--output-format, -o {string}`: Prints dates in this format (defaults to %Y-%m-%d). + - `--input-format, -i {string}`: Give argument dates in this format (defaults to %Y-%m-%d). + - `--begin-date, -b {string}`: Beginning date range. + - `--end-date, -e {string}`: Ending date. + - `--increment, -n {oneof}`: Increment dates by this duration (defaults to days if integer). + - `--days, -d {int}`: Number of days to print (ignored if periods is used). + - `--periods, -p {int}`: Number of periods to print. + - `--reverse, -r`: Print dates in reverse. ## Input/output types: diff --git a/commands/docs/shuffle.md b/commands/docs/shuffle.md index 8d66a0d6b2e..4799db509c0 100644 --- a/commands/docs/shuffle.md +++ b/commands/docs/shuffle.md @@ -2,7 +2,7 @@ title: shuffle categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Shuffle rows randomly. usage: | @@ -28,7 +28,7 @@ contributors: false | list<any> | list<any> | ## Examples -Shuffle rows randomly (execute it several times and see the difference) +Shuffle rows randomly (execute it several times and see the difference). ```nu > [[version patch]; ['1.0.0' false] ['3.0.1' true] ['2.0.0' false]] | shuffle diff --git a/commands/docs/skip.md b/commands/docs/skip.md index bd3e1145cbb..78b99401c97 100644 --- a/commands/docs/skip.md +++ b/commands/docs/skip.md @@ -2,7 +2,7 @@ title: skip categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Skip the first several rows of the input. Counterpart of `drop`. Opposite of `first`. usage: | @@ -34,7 +34,7 @@ contributors: false | list<any> | list<any> | ## Examples -Skip the first value of a list +Skip the first value of a list. ```nu > [2 4 6 8] | skip 1 ╭───┬───╮ @@ -45,7 +45,7 @@ Skip the first value of a list ``` -Skip two rows of a table +Skip two rows of a table. ```nu > [[editions]; [2015] [2018] [2021]] | skip 2 ╭───┬──────────╮ @@ -56,7 +56,7 @@ Skip two rows of a table ``` -Skip 2 bytes of a binary value +Skip 2 bytes of a binary value. ```nu > 0x[01 23 45 67] | skip 2 Length: 2 (0x2) bytes | printable whitespace ascii_other non_ascii diff --git a/commands/docs/skip_until.md b/commands/docs/skip_until.md index 4e3fc2b0434..50ec952fb5d 100644 --- a/commands/docs/skip_until.md +++ b/commands/docs/skip_until.md @@ -2,7 +2,7 @@ title: skip until categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Skip elements of the input until a predicate is true. usage: | @@ -33,7 +33,7 @@ contributors: false | list<any> | list<any> | ## Examples -Skip until the element is positive +Skip until the element is positive. ```nu > [-2 0 2 -1] | skip until {|x| $x > 0 } ╭───┬────╮ @@ -43,7 +43,7 @@ Skip until the element is positive ``` -Skip until the element is positive using stored condition +Skip until the element is positive using stored condition. ```nu > let cond = {|x| $x > 0 }; [-2 0 2 -1] | skip until $cond ╭───┬────╮ @@ -53,7 +53,7 @@ Skip until the element is positive using stored condition ``` -Skip until the field value is positive +Skip until the field value is positive. ```nu > [{a: -2} {a: 0} {a: 2} {a: -1}] | skip until {|x| $x.a > 0 } ╭───┬────╮ diff --git a/commands/docs/skip_while.md b/commands/docs/skip_while.md index ee35c2f39eb..5f028360c49 100644 --- a/commands/docs/skip_while.md +++ b/commands/docs/skip_while.md @@ -2,7 +2,7 @@ title: skip while categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Skip elements of the input while a predicate is true. usage: | @@ -33,7 +33,7 @@ contributors: false | list<any> | list<any> | ## Examples -Skip while the element is negative +Skip while the element is negative. ```nu > [-2 0 2 -1] | skip while {|x| $x < 0 } ╭───┬────╮ @@ -44,7 +44,7 @@ Skip while the element is negative ``` -Skip while the element is negative using stored condition +Skip while the element is negative using stored condition. ```nu > let cond = {|x| $x < 0 }; [-2 0 2 -1] | skip while $cond ╭───┬────╮ @@ -55,7 +55,7 @@ Skip while the element is negative using stored condition ``` -Skip while the field value is negative +Skip while the field value is negative. ```nu > [{a: -2} {a: 0} {a: 2} {a: -1}] | skip while {|x| $x.a < 0 } ╭───┬────╮ diff --git a/commands/docs/sleep.md b/commands/docs/sleep.md index 861d04682de..b9d2b1b70b0 100644 --- a/commands/docs/sleep.md +++ b/commands/docs/sleep.md @@ -2,7 +2,7 @@ title: sleep categories: | platform -version: 0.110.0 +version: 0.111.0 platform: | Delay for a specified amount of time. usage: | @@ -23,7 +23,7 @@ contributors: false ## Parameters - `duration`: Time to sleep. - - `...rest`: Additional time. + - `...rest`: Additional time duration to sleep. ## Input/output types: @@ -33,19 +33,19 @@ contributors: false | nothing | nothing | ## Examples -Sleep for 1sec +Sleep for 1 second. ```nu > sleep 1sec ``` -Use multiple arguments to write a duration with multiple units, which is unsupported by duration literals +Use multiple arguments to write a duration with multiple units, which is unsupported by duration literals. ```nu > sleep 1min 30sec ``` -Send output after 1sec +Send output after 1 second. ```nu > sleep 1sec; echo done diff --git a/commands/docs/slice.md b/commands/docs/slice.md index e6b0d1b060c..8ce8ccb6669 100644 --- a/commands/docs/slice.md +++ b/commands/docs/slice.md @@ -2,7 +2,7 @@ title: slice categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Return only the selected rows. usage: | @@ -32,7 +32,7 @@ contributors: false | list<any> | list<any> | ## Examples -Get the last 2 items +Get the last 2 items. ```nu > [0,1,2,3,4,5] | slice 4..5 ╭───┬───╮ @@ -42,7 +42,7 @@ Get the last 2 items ``` -Get the last 2 items +Get the last 2 items. ```nu > [0,1,2,3,4,5] | slice (-2).. ╭───┬───╮ @@ -52,7 +52,7 @@ Get the last 2 items ``` -Get the next to last 2 items +Get the next to last 2 items. ```nu > [0,1,2,3,4,5] | slice (-3)..-2 ╭───┬───╮ diff --git a/commands/docs/sort-by.md b/commands/docs/sort-by.md index a14a8e59b2a..5b1e1c17e84 100644 --- a/commands/docs/sort-by.md +++ b/commands/docs/sort-by.md @@ -2,7 +2,7 @@ title: sort-by categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Sort by the given cell path or closure. usage: | @@ -22,10 +22,10 @@ contributors: false ## Flags - - `--reverse, -r`: Sort in reverse order - - `--ignore-case, -i`: Sort string-based data case-insensitively - - `--natural, -n`: Sort alphanumeric string-based data naturally (1, 9, 10, 99, 100, ...) - - `--custom, -c`: Use closures to specify a custom sort order, rather than to compute a comparison key + - `--reverse, -r`: Sort in reverse order. + - `--ignore-case, -i`: Sort string-based data case-insensitively. + - `--natural, -n`: Sort alphanumeric string-based data naturally (1, 9, 10, 99, 100, ...). + - `--custom, -c`: Use closures to specify a custom sort order, rather than to compute a comparison key. ## Parameters @@ -41,19 +41,19 @@ contributors: false | table | table | ## Examples -Sort files by modified date +Sort files by modified date. ```nu > ls | sort-by modified ``` -Sort files by name (case-insensitive) +Sort files by name (case-insensitive). ```nu > ls | sort-by name --ignore-case ``` -Sort a table by a column (reversed order) +Sort a table by a column (reversed order). ```nu > [[fruit count]; [apple 9] [pear 3] [orange 7]] | sort-by fruit --reverse ╭───┬────────┬───────╮ @@ -66,7 +66,7 @@ Sort a table by a column (reversed order) ``` -Sort by a nested value +Sort by a nested value. ```nu > [[name info]; [Cairo {founded: 969}] [Kyoto {founded: 794}]] | sort-by info.founded ╭───┬───────┬───────────────────╮ @@ -82,7 +82,7 @@ Sort by a nested value ``` -Sort by the last value in a list +Sort by the last value in a list. ```nu > [[2 50] [10 1]] | sort-by { last } ╭───┬────────────╮ @@ -98,7 +98,7 @@ Sort by the last value in a list ``` -Sort in a custom order +Sort in a custom order. ```nu > [7 3 2 8 4] | sort-by -c {|a, b| $a < $b} ╭───┬───╮ diff --git a/commands/docs/sort.md b/commands/docs/sort.md index 760e1fe9c1f..4c094270536 100644 --- a/commands/docs/sort.md +++ b/commands/docs/sort.md @@ -2,11 +2,11 @@ title: sort categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | - Sort in increasing order. + Sort the input in increasing order. usage: | - Sort in increasing order. + Sort the input in increasing order. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `sort` for [filters](/commands/categories/filters.md) -
Sort in increasing order.
+
Sort the input in increasing order.
## Signature @@ -22,10 +22,10 @@ contributors: false ## Flags - - `--reverse, -r`: Sort in reverse order - - `--ignore-case, -i`: Sort string-based data case-insensitively - - `--values, -v`: If input is a single record, sort the record by values; ignored if input is not a single record - - `--natural, -n`: Sort alphanumeric string-based values naturally (1, 9, 10, 99, 100, ...) + - `--reverse, -r`: Sort in reverse order. + - `--ignore-case, -i`: Sort string-based data case-insensitively. + - `--values, -v`: If input is a single record, sort the record by values; ignored if input is not a single record. + - `--natural, -n`: Sort alphanumeric string-based values naturally (1, 9, 10, 99, 100, ...). ## Input/output types: @@ -36,7 +36,7 @@ contributors: false | record | record | ## Examples -Sort the list by increasing value +Sort the list by increasing value. ```nu > [2 0 1] | sort ╭───┬───╮ @@ -47,7 +47,7 @@ Sort the list by increasing value ``` -Sort the list by decreasing value +Sort the list by decreasing value. ```nu > [2 0 1] | sort --reverse ╭───┬───╮ @@ -58,7 +58,7 @@ Sort the list by decreasing value ``` -Sort a list of strings +Sort a list of strings. ```nu > [betty amy sarah] | sort ╭───┬───────╮ @@ -69,7 +69,7 @@ Sort a list of strings ``` -Sort a list of strings in reverse +Sort a list of strings in reverse. ```nu > [betty amy sarah] | sort --reverse ╭───┬───────╮ @@ -80,7 +80,7 @@ Sort a list of strings in reverse ``` -Sort strings (case-insensitive) +Sort strings (case-insensitive). ```nu > [airplane Truck Car] | sort -i ╭───┬──────────╮ @@ -91,7 +91,7 @@ Sort strings (case-insensitive) ``` -Sort strings (reversed case-insensitive) +Sort strings (reversed case-insensitive). ```nu > [airplane Truck Car] | sort -i -r ╭───┬──────────╮ @@ -102,7 +102,7 @@ Sort strings (reversed case-insensitive) ``` -Sort alphanumeric strings in natural order +Sort alphanumeric strings in natural order. ```nu > [foo1 foo10 foo9] | sort -n ╭───┬───────╮ @@ -113,7 +113,7 @@ Sort alphanumeric strings in natural order ``` -Sort record by key (case-insensitive) +Sort record by key (case-insensitive). ```nu > {b: 3, a: 4} | sort ╭───┬───╮ @@ -122,7 +122,7 @@ Sort record by key (case-insensitive) ╰───┴───╯ ``` -Sort record by value +Sort record by value. ```nu > {b: 4, a: 3, c:1} | sort -v ╭───┬───╮ diff --git a/commands/docs/source-env.md b/commands/docs/source-env.md index b5fd0d72371..02041f23796 100644 --- a/commands/docs/source-env.md +++ b/commands/docs/source-env.md @@ -2,7 +2,7 @@ title: source-env categories: | core -version: 0.110.0 +version: 0.111.0 core: | Source the environment from a source file into the current environment. usage: | @@ -32,7 +32,7 @@ contributors: false | any | any | ## Examples -Sources the environment from foo.nu in the current context +Sources the environment from foo.nu in the current context. ```nu > source-env foo.nu diff --git a/commands/docs/source.md b/commands/docs/source.md index 23969e6043e..abab1d2f9cd 100644 --- a/commands/docs/source.md +++ b/commands/docs/source.md @@ -2,7 +2,7 @@ title: source categories: | core -version: 0.110.0 +version: 0.111.0 core: | Runs a script file in the current context. usage: | @@ -32,13 +32,13 @@ contributors: false | any | any | ## Examples -Runs foo.nu in the current context +Runs foo.nu in the current context. ```nu > source foo.nu ``` -Runs foo.nu in current context and call the command defined, suppose foo.nu has content: `def say-hi [] { echo 'Hi!' }` +Runs foo.nu in current context and call the command defined, suppose foo.nu has content: `def say-hi [] { echo 'Hi!' }`. ```nu > source ./foo.nu; say-hi diff --git a/commands/docs/split.md b/commands/docs/split.md index b45a7fa554a..6d58ff75087 100644 --- a/commands/docs/split.md +++ b/commands/docs/split.md @@ -2,7 +2,7 @@ title: split categories: | strings -version: 0.110.0 +version: 0.111.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 cb559f42663..0b87dcc4cb6 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.110.0 +version: 0.111.0 conversions: | Split a cell-path into its components. usage: | @@ -29,7 +29,7 @@ contributors: false | cell-path | list<record<value: any, optional: bool, insensitive: bool>> | ## Examples -Split a cell-path into its components +Split a cell-path into its components. ```nu > $.5?.c | split cell-path ╭───┬───────┬──────────┬─────────────╮ @@ -41,7 +41,7 @@ Split a cell-path into its components ``` -Split a complex cell-path +Split a complex cell-path. ```nu > $.a!.b?.1."2"."c.d" | split cell-path ╭───┬───────┬──────────┬─────────────╮ diff --git a/commands/docs/split_chars.md b/commands/docs/split_chars.md index 3b938e04a1b..659c7bca256 100644 --- a/commands/docs/split_chars.md +++ b/commands/docs/split_chars.md @@ -2,7 +2,7 @@ title: split chars categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Split a string into a list of characters. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--grapheme-clusters, -g`: split on grapheme clusters - - `--code-points, -c`: split on code points (default; splits combined characters) + - `--grapheme-clusters, -g`: Split on grapheme clusters. + - `--code-points, -c`: Split on code points (default; splits combined characters). ## Input/output types: @@ -34,7 +34,7 @@ contributors: false | list<string> | list<list<string>> | ## Examples -Split the string into a list of characters +Split the string into a list of characters. ```nu > 'hello' | split chars ╭───┬───╮ @@ -47,7 +47,7 @@ Split the string into a list of characters ``` -Split on grapheme clusters +Split on grapheme clusters. ```nu > '🇯🇵ほげ' | split chars --grapheme-clusters ╭───┬────╮ @@ -58,7 +58,7 @@ Split on grapheme clusters ``` -Split multiple strings into lists of characters +Split multiple strings into lists of characters. ```nu > ['hello', 'world'] | split chars ╭───┬───────────╮ diff --git a/commands/docs/split_column.md b/commands/docs/split_column.md index 500e0a25256..a3aeea6fc11 100644 --- a/commands/docs/split_column.md +++ b/commands/docs/split_column.md @@ -2,7 +2,7 @@ title: split column categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Split a string into multiple columns using a separator. usage: | @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--collapse-empty, -c`: remove empty columns - - `--number, -n {int}`: Split into maximum number of items - - `--regex, -r`: separator is a regular expression + - `--collapse-empty, -c`: Remove empty columns. + - `--number, -n {int}`: Split into maximum number of items. + - `--regex, -r`: Separator is a regular expression. ## Parameters @@ -40,7 +40,7 @@ contributors: false | list<string> | table | ## Examples -Split a string into columns by the specified separator +Split a string into columns by the specified separator. ```nu > 'a--b--c' | split column '--' ╭───┬─────────┬─────────┬─────────╮ @@ -51,7 +51,7 @@ Split a string into columns by the specified separator ``` -Split a string into columns of char and remove the empty columns +Split a string into columns of char and remove the empty columns. ```nu > 'abc' | split column --collapse-empty '' ╭───┬─────────┬─────────┬─────────╮ @@ -62,7 +62,7 @@ Split a string into columns of char and remove the empty columns ``` -Split a list of strings into a table +Split a list of strings into a table. ```nu > ['a-b' 'c-d'] | split column - ╭───┬─────────┬─────────╮ @@ -74,7 +74,7 @@ Split a list of strings into a table ``` -Split a list of strings into a table, ignoring padding +Split a list of strings into a table, ignoring padding. ```nu > ['a - b' 'c - d'] | split column --regex '\s*-\s*' ╭───┬─────────┬─────────╮ @@ -86,7 +86,7 @@ Split a list of strings into a table, ignoring padding ``` -Split into columns, last column may contain the delimiter +Split into columns, last column may contain the delimiter. ```nu > ['author: Salina Yoon' r#'title: Where's Ellie?: A Hide-and-Seek Book'#] | split column --number 2 ': ' key value ╭───┬────────┬──────────────────────────────────────╮ diff --git a/commands/docs/split_list.md b/commands/docs/split_list.md index 69458687092..dd9c57ff830 100644 --- a/commands/docs/split_list.md +++ b/commands/docs/split_list.md @@ -2,7 +2,7 @@ title: split list categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Split a list into multiple lists using a separator. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--regex, -r`: separator is a regular expression, matching values that can be coerced into a string - - `--split {string}`: Whether to split lists before, after, or on (default) the separator + - `--regex, -r`: Separator is a regular expression, matching values that can be coerced into a string. + - `--split {string}`: Whether to split lists before, after, or on (default) the separator. ## Parameters @@ -37,7 +37,7 @@ contributors: false | list<any> | list<list<any>> | ## Examples -Split a list of chars into two lists +Split a list of chars into two lists. ```nu > [a, b, c, d, e, f, g] | split list d ╭───┬───────────╮ @@ -55,7 +55,7 @@ Split a list of chars into two lists ``` -Split a list of lists into two lists of lists +Split a list of lists into two lists of lists. ```nu > [[1,2], [2,3], [3,4]] | split list [2,3] ╭───┬───────────────────╮ @@ -75,7 +75,7 @@ Split a list of lists into two lists of lists ``` -Split a list of chars into two lists +Split a list of chars into two lists. ```nu > [a, b, c, d, a, e, f, g] | split list a ╭───┬────────────────╮ @@ -94,7 +94,7 @@ Split a list of chars into two lists ``` -Split a list of chars into lists based on multiple characters +Split a list of chars into lists based on multiple characters. ```nu > [a, b, c, d, a, e, f, g] | split list --regex '(b|e)' ╭───┬───────────╮ @@ -114,7 +114,7 @@ Split a list of chars into lists based on multiple characters ``` -Split a list of numbers on multiples of 3 +Split a list of numbers on multiples of 3. ```nu > [1 2 3 4 5 6 7 8 9 10] | split list {|e| $e mod 3 == 0 } ╭───┬────────────╮ @@ -137,7 +137,7 @@ Split a list of numbers on multiples of 3 ``` -Split a list of numbers into lists ending with 0 +Split a list of numbers into lists ending with 0. ```nu > [1 2 0 3 4 5 0 6 0 0 7] | split list --split after 0 ╭───┬───────────╮ diff --git a/commands/docs/split_row.md b/commands/docs/split_row.md index b16380edbb4..b8937bec7fa 100644 --- a/commands/docs/split_row.md +++ b/commands/docs/split_row.md @@ -2,7 +2,7 @@ title: split row categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Split a string into multiple rows using a separator. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--number, -n {int}`: Split into maximum number of items - - `--regex, -r`: use regex syntax for separator + - `--number, -n {int}`: Split into maximum number of items. + - `--regex, -r`: Use regex syntax for separator. ## Parameters @@ -38,7 +38,7 @@ contributors: false | list<string> | list<string> | ## Examples -Split a string into rows of char +Split a string into rows of char. ```nu > 'abc' | split row '' ╭───┬───╮ @@ -51,7 +51,7 @@ Split a string into rows of char ``` -Split a string into rows by the specified separator +Split a string into rows by the specified separator. ```nu > 'a--b--c' | split row '--' ╭───┬───╮ @@ -62,7 +62,7 @@ Split a string into rows by the specified separator ``` -Split a string by '-' +Split a string by '-'. ```nu > '-a-b-c-' | split row '-' ╭───┬───╮ @@ -75,7 +75,7 @@ Split a string by '-' ``` -Split a string by regex +Split a string by regex. ```nu > 'a b c' | split row -r '\s+' ╭───┬───╮ diff --git a/commands/docs/split_words.md b/commands/docs/split_words.md index 27eccf55208..b2f5d6e352c 100644 --- a/commands/docs/split_words.md +++ b/commands/docs/split_words.md @@ -2,7 +2,7 @@ title: split words categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Split a string's words into separate rows. usage: | @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--min-word-length, -l {int}`: The minimum word length - - `--grapheme-clusters, -g`: measure word length in grapheme clusters (requires -l) - - `--utf-8-bytes, -b`: measure word length in UTF-8 bytes (default; requires -l; non-ASCII chars are length 2+) + - `--min-word-length, -l {int}`: The minimum word length. + - `--grapheme-clusters, -g`: Measure word length in grapheme clusters (requires -l). + - `--utf-8-bytes, -b`: Measure word length in UTF-8 bytes (default; requires -l; non-ASCII chars are length 2+). ## Input/output types: @@ -35,7 +35,7 @@ contributors: false | list<string> | list<list<string>> | ## Examples -Split the string's words into separate rows +Split the string's words into separate rows. ```nu > 'hello world' | split words ╭───┬───────╮ @@ -45,7 +45,7 @@ Split the string's words into separate rows ``` -Split the string's words, of at least 3 characters, into separate rows +Split the string's words, of at least 3 characters, into separate rows. ```nu > 'hello to the world' | split words --min-word-length 3 ╭───┬───────╮ @@ -56,7 +56,7 @@ Split the string's words, of at least 3 characters, into separate rows ``` -A real-world example of splitting words +A real-world example of splitting words. ```nu > http get https://www.gutenberg.org/files/11/11-0.txt | str downcase | split words --min-word-length 2 | uniq --count | sort-by count --reverse | first 10 diff --git a/commands/docs/start.md b/commands/docs/start.md index 63a0ffe45d0..4b29c31d5c5 100644 --- a/commands/docs/start.md +++ b/commands/docs/start.md @@ -2,7 +2,7 @@ title: start categories: | filesystem -version: 0.110.0 +version: 0.111.0 filesystem: | Open a folder, file, or website in the default application or viewer. usage: | @@ -32,37 +32,37 @@ contributors: false | nothing | any | ## Examples -Open a text file with the default text editor +Open a text file with the default text editor. ```nu > start file.txt ``` -Open an image with the default image viewer +Open an image with the default image viewer. ```nu > start file.jpg ``` -Open the current directory with the default file manager +Open the current directory with the default file manager. ```nu > start . ``` -Open a PDF with the default PDF viewer +Open a PDF with the default PDF viewer. ```nu > start file.pdf ``` -Open a website with the default browser +Open a website with the default browser. ```nu > start https://www.nushell.sh ``` -Open an application-registered protocol URL +Open an application-registered protocol URL. ```nu > start obsidian://open?vault=Test diff --git a/commands/docs/stor.md b/commands/docs/stor.md index 424f5ec4655..e40ae2dd961 100644 --- a/commands/docs/stor.md +++ b/commands/docs/stor.md @@ -2,7 +2,7 @@ title: stor categories: | database -version: 0.110.0 +version: 0.111.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 c07b5325b51..967fe2bd8a2 100644 --- a/commands/docs/stor_create.md +++ b/commands/docs/stor_create.md @@ -2,7 +2,7 @@ title: stor create categories: | database -version: 0.110.0 +version: 0.111.0 database: | Create a table in the in-memory sqlite database. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--table-name, -t {string}`: name of the table you want to create - - `--columns, -c {record}`: a record of column names and datatypes + - `--table-name, -t {string}`: Name of the table you want to create. + - `--columns, -c {record}`: A record of column names and datatypes. ## Input/output types: diff --git a/commands/docs/stor_delete.md b/commands/docs/stor_delete.md index 5cf261093d3..ee5dd435ee1 100644 --- a/commands/docs/stor_delete.md +++ b/commands/docs/stor_delete.md @@ -2,7 +2,7 @@ title: stor delete categories: | database -version: 0.110.0 +version: 0.111.0 database: | Delete a table or specified rows in the in-memory sqlite database. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--table-name, -t {string}`: name of the table you want to delete or delete from - - `--where-clause, -w {string}`: a sql string to use as a where clause without the WHERE keyword + - `--table-name, -t {string}`: Name of the table you want to delete or delete from. + - `--where-clause, -w {string}`: A sql string to use as a where clause without the WHERE keyword. ## Input/output types: diff --git a/commands/docs/stor_export.md b/commands/docs/stor_export.md index 5b9fc8dce0b..97ed14ffbfe 100644 --- a/commands/docs/stor_export.md +++ b/commands/docs/stor_export.md @@ -2,7 +2,7 @@ title: stor export categories: | database -version: 0.110.0 +version: 0.111.0 database: | Export the in-memory sqlite database to a sqlite database file. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--file-name, -f {string}`: file name to export the sqlite in-memory database to + - `--file-name, -f {string}`: File name to export the sqlite in-memory database to. ## Input/output types: diff --git a/commands/docs/stor_import.md b/commands/docs/stor_import.md index 1d702b390a1..98c48e7c98c 100644 --- a/commands/docs/stor_import.md +++ b/commands/docs/stor_import.md @@ -2,7 +2,7 @@ title: stor import categories: | database -version: 0.110.0 +version: 0.111.0 database: | Import a sqlite database file into the in-memory sqlite database. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--file-name, -f {string}`: file name to import the sqlite in-memory database from + - `--file-name, -f {string}`: File name to import the sqlite in-memory database from. ## Input/output types: diff --git a/commands/docs/stor_insert.md b/commands/docs/stor_insert.md index dd67e96c319..9a7cca91d88 100644 --- a/commands/docs/stor_insert.md +++ b/commands/docs/stor_insert.md @@ -2,7 +2,7 @@ title: stor insert categories: | database -version: 0.110.0 +version: 0.111.0 database: | Insert information into a specified table in the in-memory sqlite database. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--table-name, -t {string}`: name of the table you want to insert into - - `--data-record, -d {record}`: a record of column names and column values to insert into the specified table + - `--table-name, -t {string}`: Name of the table you want to insert into. + - `--data-record, -d {record}`: A record of column names and column values to insert into the specified table. ## Input/output types: diff --git a/commands/docs/stor_open.md b/commands/docs/stor_open.md index 3a2c134397f..fb3bad1a40b 100644 --- a/commands/docs/stor_open.md +++ b/commands/docs/stor_open.md @@ -2,7 +2,7 @@ title: stor open categories: | database -version: 0.110.0 +version: 0.111.0 database: | Opens the in-memory sqlite database. usage: | diff --git a/commands/docs/stor_reset.md b/commands/docs/stor_reset.md index 7ae5ad05695..a03bc9f35fd 100644 --- a/commands/docs/stor_reset.md +++ b/commands/docs/stor_reset.md @@ -2,7 +2,7 @@ title: stor reset categories: | database -version: 0.110.0 +version: 0.111.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 908c8463de9..c6fb9d50b00 100644 --- a/commands/docs/stor_update.md +++ b/commands/docs/stor_update.md @@ -2,7 +2,7 @@ title: stor update categories: | database -version: 0.110.0 +version: 0.111.0 database: | Update information in a specified table in the in-memory sqlite database. usage: | @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--table-name, -t {string}`: name of the table you want to insert into - - `--update-record, -u {record}`: a record of column names and column values to update in the specified table - - `--where-clause, -w {string}`: a sql string to use as a where clause without the WHERE keyword + - `--table-name, -t {string}`: Name of the table you want to insert into. + - `--update-record, -u {record}`: A record of column names and column values to update in the specified table. + - `--where-clause, -w {string}`: A sql string to use as a where clause without the WHERE keyword. ## Input/output types: diff --git a/commands/docs/str.md b/commands/docs/str.md index a408cf5f23d..fbab38395ab 100644 --- a/commands/docs/str.md +++ b/commands/docs/str.md @@ -2,7 +2,7 @@ title: str categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Various commands for working with string data. usage: | @@ -34,10 +34,10 @@ You must use one of the following subcommands. Using this command as-is will onl | name | description | type | | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------- | -------- | | [`str camel-case`](/commands/docs/str_camel-case.md) | Convert a string to camelCase. | built-in | -| [`str capitalize`](/commands/docs/str_capitalize.md) | Capitalize first letter of text. | built-in | +| [`str capitalize`](/commands/docs/str_capitalize.md) | Capitalize the first letter of text. | built-in | | [`str contains`](/commands/docs/str_contains.md) | Checks if string input contains a substring. | built-in | | [`str distance`](/commands/docs/str_distance.md) | Compare two strings and return the edit distance/Levenshtein distance. | built-in | -| [`str downcase`](/commands/docs/str_downcase.md) | Make text lowercase. | built-in | +| [`str downcase`](/commands/docs/str_downcase.md) | Convert text to lowercase. | built-in | | [`str ends-with`](/commands/docs/str_ends-with.md) | Check if an input ends with a string. | built-in | | [`str expand`](/commands/docs/str_expand.md) | Generates all possible combinations defined in brace expansion syntax. | built-in | | [`str index-of`](/commands/docs/str_index-of.md) | Returns start index of first occurrence of string in input, or -1 if no match. | built-in | @@ -45,7 +45,7 @@ You must use one of the following subcommands. Using this command as-is will onl | [`str kebab-case`](/commands/docs/str_kebab-case.md) | Convert a string to kebab-case. | built-in | | [`str length`](/commands/docs/str_length.md) | Output the length of any strings in the pipeline. | built-in | | [`str pascal-case`](/commands/docs/str_pascal-case.md) | Convert a string to PascalCase. | built-in | -| [`str replace`](/commands/docs/str_replace.md) | Find and replace text. | built-in | +| [`str replace`](/commands/docs/str_replace.md) | Find and replace text in the input string. | built-in | | [`str reverse`](/commands/docs/str_reverse.md) | Reverse every string in the pipeline. | built-in | | [`str screaming-snake-case`](/commands/docs/str_screaming-snake-case.md) | Convert a string to SCREAMING_SNAKE_CASE. | built-in | | [`str snake-case`](/commands/docs/str_snake-case.md) | Convert a string to snake_case. | built-in | @@ -54,4 +54,4 @@ You must use one of the following subcommands. Using this command as-is will onl | [`str substring`](/commands/docs/str_substring.md) | Get part of a string. Note that the first character of a string is index 0. | built-in | | [`str title-case`](/commands/docs/str_title-case.md) | Convert a string to Title Case. | built-in | | [`str trim`](/commands/docs/str_trim.md) | Trim whitespace or specific character. | built-in | -| [`str upcase`](/commands/docs/str_upcase.md) | Make text uppercase. | built-in | \ No newline at end of file +| [`str upcase`](/commands/docs/str_upcase.md) | Convert text to uppercase. | built-in | \ No newline at end of file diff --git a/commands/docs/str_camel-case.md b/commands/docs/str_camel-case.md index 76a5cd8cc56..7e834e22fc0 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.110.0 +version: 0.111.0 strings: | Convert a string to camelCase. usage: | diff --git a/commands/docs/str_capitalize.md b/commands/docs/str_capitalize.md index 9079dffbc0a..fb341b4f46c 100644 --- a/commands/docs/str_capitalize.md +++ b/commands/docs/str_capitalize.md @@ -2,11 +2,11 @@ title: str capitalize categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | - Capitalize first letter of text. + Capitalize the first letter of text. usage: | - Capitalize first letter of text. + Capitalize the first letter of text. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `str capitalize` for [strings](/commands/categories/strings.md) -
Capitalize first letter of text.
+
Capitalize the first letter of text.
## Signature @@ -35,19 +35,19 @@ contributors: false | record | record | ## Examples -Capitalize contents +Capitalize contents. ```nu > 'good day' | str capitalize Good day ``` -Capitalize contents +Capitalize contents. ```nu > 'anton' | str capitalize Anton ``` -Capitalize a column in a table +Capitalize a column in a table. ```nu > [[lang, gems]; [nu_test, 100]] | str capitalize lang ╭───┬─────────┬──────╮ diff --git a/commands/docs/str_contains.md b/commands/docs/str_contains.md index d5c9ef9cf84..18cf317b2b5 100644 --- a/commands/docs/str_contains.md +++ b/commands/docs/str_contains.md @@ -2,7 +2,7 @@ title: str contains categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Checks if string input contains a substring. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--ignore-case, -i`: search is case insensitive + - `--ignore-case, -i`: Search is case insensitive. ## Parameters @@ -40,19 +40,19 @@ contributors: false | list<string> | list<bool> | ## Examples -Check if input contains string +Check if input contains string. ```nu > 'my_library.rb' | str contains '.rb' true ``` -Check if input contains string case insensitive +Check if input contains string case insensitive. ```nu > 'my_library.rb' | str contains --ignore-case '.RB' true ``` -Check if input contains string in a record +Check if input contains string in a record. ```nu > { ColA: test, ColB: 100 } | str contains 'e' ColA ╭──────┬──────╮ @@ -61,7 +61,7 @@ Check if input contains string in a record ╰──────┴──────╯ ``` -Check if input contains string in a table +Check if input contains string in a table. ```nu > [[ColA ColB]; [test 100]] | str contains --ignore-case 'E' ColA ╭───┬──────┬──────╮ @@ -72,7 +72,7 @@ Check if input contains string in a table ``` -Check if input contains string in a table +Check if input contains string in a table. ```nu > [[ColA ColB]; [test hello]] | str contains 'e' ColA ColB ╭───┬──────┬──────╮ @@ -83,13 +83,13 @@ Check if input contains string in a table ``` -Check if input string contains 'banana' +Check if input string contains 'banana'. ```nu > 'hello' | str contains 'banana' false ``` -Check if list contains string +Check if list contains string. ```nu > [one two three] | str contains o ╭───┬───────╮ diff --git a/commands/docs/str_distance.md b/commands/docs/str_distance.md index 2fafbd8f9ba..037981f4d42 100644 --- a/commands/docs/str_distance.md +++ b/commands/docs/str_distance.md @@ -2,7 +2,7 @@ title: str distance categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Compare two strings and return the edit distance/Levenshtein distance. usage: | @@ -35,13 +35,13 @@ contributors: false | record | record | ## Examples -get the edit distance between two strings +Get the edit distance between two strings. ```nu > 'nushell' | str distance 'nutshell' 1 ``` -Compute edit distance between strings in table and another string, using cell paths +Compute edit distance between strings in table and another string, using cell paths. ```nu > [{a: 'nutshell' b: 'numetal'}] | str distance 'nushell' 'a' 'b' ╭───┬───┬───╮ @@ -52,7 +52,7 @@ Compute edit distance between strings in table and another string, using cell pa ``` -Compute edit distance between strings in record and another string, using cell paths +Compute edit distance between strings in record and another string, using cell paths. ```nu > {a: 'nutshell' b: 'numetal'} | str distance 'nushell' a b ╭───┬───╮ diff --git a/commands/docs/str_downcase.md b/commands/docs/str_downcase.md index 423f46641ca..d46ef1f92d7 100644 --- a/commands/docs/str_downcase.md +++ b/commands/docs/str_downcase.md @@ -2,11 +2,11 @@ title: str downcase categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | - Make text lowercase. + Convert text to lowercase. usage: | - Make text lowercase. + Convert text to lowercase. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `str downcase` for [strings](/commands/categories/strings.md) -
Make text lowercase.
+
Convert text to lowercase.
## Signature @@ -35,19 +35,19 @@ contributors: false | record | record | ## Examples -Downcase contents +Downcase contents. ```nu > 'NU' | str downcase nu ``` -Downcase contents +Downcase contents. ```nu > 'TESTa' | str downcase testa ``` -Downcase contents +Downcase contents. ```nu > [[ColA ColB]; [Test ABC]] | str downcase ColA ╭───┬──────┬──────╮ @@ -58,7 +58,7 @@ Downcase contents ``` -Downcase contents +Downcase contents. ```nu > [[ColA ColB]; [Test ABC]] | str downcase ColA ColB ╭───┬──────┬──────╮ diff --git a/commands/docs/str_ends-with.md b/commands/docs/str_ends-with.md index 28305368d9e..8a8c356b27e 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.110.0 +version: 0.111.0 strings: | Check if an input ends with a string. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--ignore-case, -i`: search is case insensitive + - `--ignore-case, -i`: Search is case insensitive. ## Parameters @@ -40,13 +40,13 @@ contributors: false | record | record | ## Examples -Checks if string ends with '.rb' +Checks if string ends with '.rb'. ```nu > 'my_library.rb' | str ends-with '.rb' true ``` -Checks if strings end with '.txt' +Checks if strings end with '.txt'. ```nu > ['my_library.rb', 'README.txt'] | str ends-with '.txt' ╭───┬───────╮ @@ -56,7 +56,7 @@ Checks if strings end with '.txt' ``` -Checks if string ends with '.RB', case-insensitive +Checks if string ends with '.RB', case-insensitive. ```nu > 'my_library.rb' | str ends-with --ignore-case '.RB' true diff --git a/commands/docs/str_expand.md b/commands/docs/str_expand.md index e0bacd6c0bc..488fcfe62a8 100644 --- a/commands/docs/str_expand.md +++ b/commands/docs/str_expand.md @@ -2,7 +2,7 @@ title: str expand categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Generates all possible combinations defined in brace expansion syntax. usage: | @@ -44,7 +44,7 @@ Define a range inside braces to produce a list of string. ``` -Ignore the next character after the backslash ('\') +Ignore the next character after the backslash ('\'). ```nu > 'A{B\,,C}' | str expand ╭───┬─────╮ @@ -140,7 +140,7 @@ Empty item can be in the middle of the collection. ``` -Also, it is possible to use one inside another. Here is a real-world example, that creates files: +Also, it is possible to use one inside another. Here is a real-world example, that creates files. ```nu > "A{B{1,3},C{2,5}}D" | str expand ╭───┬──────╮ diff --git a/commands/docs/str_index-of.md b/commands/docs/str_index-of.md index c02b1d530b7..ed92e113d02 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.110.0 +version: 0.111.0 strings: | Returns start index of first occurrence of string in input, or -1 if no match. usage: | @@ -22,10 +22,10 @@ contributors: false ## Flags - - `--grapheme-clusters, -g`: count indexes using grapheme clusters (all visible chars have length 1) - - `--utf-8-bytes, -b`: count indexes using UTF-8 bytes (default; non-ASCII chars have length 2+) - - `--range, -r {range}`: optional start and/or end index - - `--end, -e`: search from the end of the input + - `--grapheme-clusters, -g`: Count indexes using grapheme clusters (all visible chars have length 1). + - `--utf-8-bytes, -b`: Count indexes using UTF-8 bytes (default; non-ASCII chars have length 2+). + - `--range, -r {range}`: Optional start and/or end index. + - `--end, -e`: Search from the end of the input. ## Parameters @@ -43,37 +43,37 @@ contributors: false | record | record | ## Examples -Returns index of string in input +Returns index of string in input. ```nu > 'my_library.rb' | str index-of '.rb' 10 ``` -Count length using grapheme clusters +Count length using grapheme clusters. ```nu > '🇯🇵ほげ ふが ぴよ' | str index-of --grapheme-clusters 'ふが' 4 ``` -Returns index of string in input within a`rhs open range` +Returns index of string in input within a`rhs open range`. ```nu > '.rb.rb' | str index-of '.rb' --range 1.. 3 ``` -Returns index of string in input within a lhs open range +Returns index of string in input within a lhs open range. ```nu > '123456' | str index-of '6' --range ..4 -1 ``` -Returns index of string in input within a range +Returns index of string in input within a range. ```nu > '123456' | str index-of '3' --range 1..4 2 ``` -Returns index of string in input +Returns index of string in input. ```nu > '/this/is/some/path/file.txt' | str index-of '/' -e 18 diff --git a/commands/docs/str_join.md b/commands/docs/str_join.md index 9d7cc284e51..cf3aa995de9 100644 --- a/commands/docs/str_join.md +++ b/commands/docs/str_join.md @@ -2,7 +2,7 @@ title: str join categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Concatenate multiple strings into a single string, with an optional separator between each. usage: | @@ -33,13 +33,13 @@ contributors: false | string | string | ## Examples -Create a string from input +Create a string from input. ```nu > ['nu', 'shell'] | str join nushell ``` -Create a string from input with a separator +Create a string from input with a separator. ```nu > ['nu', 'shell'] | str join '-' nu-shell diff --git a/commands/docs/str_kebab-case.md b/commands/docs/str_kebab-case.md index 31bf249a0b7..d4cd905f2a3 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.110.0 +version: 0.111.0 strings: | Convert a string to kebab-case. usage: | diff --git a/commands/docs/str_length.md b/commands/docs/str_length.md index f891b15c80e..87e2e94cf57 100644 --- a/commands/docs/str_length.md +++ b/commands/docs/str_length.md @@ -2,7 +2,7 @@ title: str length categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Output the length of any strings in the pipeline. usage: | @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--grapheme-clusters, -g`: count length in grapheme clusters (all visible chars have length 1) - - `--utf-8-bytes, -b`: count length in UTF-8 bytes (default; all non-ASCII chars have length 2+) - - `--chars, -c`: count length in chars + - `--grapheme-clusters, -g`: Count length in grapheme clusters (all visible chars have length 1). + - `--utf-8-bytes, -b`: Count length in UTF-8 bytes (default; all non-ASCII chars have length 2+). + - `--chars, -c`: Count length in chars. ## Parameters @@ -41,19 +41,19 @@ contributors: false | record | record | ## Examples -Return the lengths of a string in bytes +Return the lengths of a string in bytes. ```nu > 'hello' | str length 5 ``` -Count length of a string in grapheme clusters +Count length of a string in grapheme clusters. ```nu > '🇯🇵ほげ ふが ぴよ' | str length --grapheme-clusters 9 ``` -Return the lengths of multiple strings in bytes +Return the lengths of multiple strings in bytes. ```nu > ['hi' 'there'] | str length ╭───┬───╮ @@ -63,7 +63,7 @@ Return the lengths of multiple strings in bytes ``` -Return the lengths of a string in chars +Return the lengths of a string in chars. ```nu > 'hällo' | str length --chars 5 diff --git a/commands/docs/str_pascal-case.md b/commands/docs/str_pascal-case.md index c3447f0bed8..959a912c019 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.110.0 +version: 0.111.0 strings: | Convert a string to PascalCase. usage: | diff --git a/commands/docs/str_replace.md b/commands/docs/str_replace.md index bba3312f99d..970abb49e41 100644 --- a/commands/docs/str_replace.md +++ b/commands/docs/str_replace.md @@ -2,11 +2,11 @@ title: str replace categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | - Find and replace text. + Find and replace text in the input string. usage: | - Find and replace text. + Find and replace text in the input string. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `str replace` for [strings](/commands/categories/strings.md) -
Find and replace text.
+
Find and replace text in the input string.
## Signature @@ -22,10 +22,10 @@ contributors: false ## Flags - - `--all, -a`: replace all occurrences of the pattern - - `--no-expand, -n`: do not expand capture groups (like $name) in the replacement string - - `--regex, -r`: match the pattern as a regular expression in the input, instead of a substring - - `--multiline, -m`: multi-line regex mode (implies --regex): ^ and $ match begin/end of line; equivalent to (?m) + - `--all, -a`: Replace all occurrences of the pattern. + - `--no-expand, -n`: Do not expand capture groups (like $name) in the replacement string. + - `--regex, -r`: Match the pattern as a regular expression in the input, instead of a substring. + - `--multiline, -m`: Multi-line regex mode (implies --regex): ^ and $ match begin/end of line; equivalent to (?m). ## Parameters @@ -44,37 +44,37 @@ contributors: false | list<string> | list<string> | ## Examples -Find and replace the first occurrence of a substring +Find and replace the first occurrence of a substring. ```nu > 'c:\some\cool\path' | str replace 'c:\some\cool' '~' ~\path ``` -Find and replace all occurrences of a substring +Find and replace all occurrences of a substring. ```nu > 'abc abc abc' | str replace --all 'b' 'z' azc azc azc ``` -Find and replace contents with capture group using regular expression +Find and replace contents with capture group using regular expression. ```nu > 'my_library.rb' | str replace -r '(.+).rb' '$1.nu' my_library.nu ``` -Find and replace contents with capture group using regular expression, with escapes +Find and replace contents with capture group using regular expression, with escapes. ```nu > 'hello=world' | str replace -r '\$?(?.*)=(?.*)' '$$$varname = $value' $hello = world ``` -Find and replace all occurrences of found string using regular expression +Find and replace all occurrences of found string using regular expression. ```nu > 'abc abc abc' | str replace --all --regex 'b' 'z' azc azc azc ``` -Find and replace all occurrences of found string in table using regular expression +Find and replace all occurrences of found string in table using regular expression. ```nu > [[ColA ColB ColC]; [abc abc ads]] | str replace --all --regex 'b' 'z' ColA ColC ╭───┬──────┬──────┬──────╮ @@ -85,7 +85,7 @@ Find and replace all occurrences of found string in table using regular expressi ``` -Find and replace all occurrences of found string in record using regular expression +Find and replace all occurrences of found string in record using regular expression. ```nu > { KeyA: abc, KeyB: abc, KeyC: ads } | str replace --all --regex 'b' 'z' KeyA KeyC ╭──────┬─────╮ @@ -95,31 +95,31 @@ Find and replace all occurrences of found string in record using regular express ╰──────┴─────╯ ``` -Find and replace contents without using the replace parameter as a regular expression +Find and replace contents without using the replace parameter as a regular expression. ```nu > 'dogs_$1_cats' | str replace -r '\$1' '$2' -n dogs_$2_cats ``` -Use captures to manipulate the input text using regular expression +Use captures to manipulate the input text using regular expression. ```nu > "abc-def" | str replace -r "(.+)-(.+)" "${2}_${1}" def_abc ``` -Find and replace with fancy-regex using regular expression +Find and replace with fancy-regex using regular expression. ```nu > 'a successful b' | str replace -r '\b([sS])uc(?:cs|s?)e(ed(?:ed|ing|s?)|ss(?:es|ful(?:ly)?|i(?:ons?|ve(?:ly)?)|ors?)?)\b' '${1}ucce$2' a successful b ``` -Find and replace with fancy-regex using regular expression +Find and replace with fancy-regex using regular expression. ```nu > 'GHIKK-9+*' | str replace -r '[*[:xdigit:]+]' 'z' GHIKK-z+* ``` -Find and replace on individual lines using multiline regular expression +Find and replace on individual lines using multiline regular expression. ```nu > "non-matching line\n123. one line\n124. another line\n" | str replace --all --multiline '^[0-9]+\. ' '' non-matching line @@ -128,7 +128,7 @@ another line ``` -Find and replace backslash escape sequences using a closure +Find and replace backslash escape sequences using a closure. ```nu > 'string: \"abc\" backslash: \\ newline:\nend' | str replace -a -r '\\(.)' {|char| if $char == "n" { "\n" } else { $char } } string: "abc" backslash: \ newline: diff --git a/commands/docs/str_reverse.md b/commands/docs/str_reverse.md index 1ca736d97f9..ac808708409 100644 --- a/commands/docs/str_reverse.md +++ b/commands/docs/str_reverse.md @@ -2,7 +2,7 @@ title: str reverse categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Reverse every string in the pipeline. usage: | @@ -35,13 +35,13 @@ contributors: false | record | record | ## Examples -Reverse a single string +Reverse a single string. ```nu > 'Nushell' | str reverse llehsuN ``` -Reverse multiple strings in a list +Reverse multiple strings in a list. ```nu > ['Nushell' 'is' 'cool'] | str reverse ╭───┬─────────╮ diff --git a/commands/docs/str_screaming-snake-case.md b/commands/docs/str_screaming-snake-case.md index 3701888dc8c..3d48d5f1f5a 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.110.0 +version: 0.111.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 ed57fc16753..5df77096a18 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.110.0 +version: 0.111.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 86d0beac075..d0a757fcd53 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.110.0 +version: 0.111.0 strings: | Check if an input starts with a string. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--ignore-case, -i`: search is case insensitive + - `--ignore-case, -i`: Search is case insensitive. ## Parameters @@ -40,25 +40,25 @@ contributors: false | record | record | ## Examples -Checks if input string starts with 'my' +Checks if input string starts with 'my'. ```nu > 'my_library.rb' | str starts-with 'my' true ``` -Checks if input string starts with 'Car' +Checks if input string starts with 'Car'. ```nu > 'Cargo.toml' | str starts-with 'Car' true ``` -Checks if input string starts with '.toml' +Checks if input string starts with '.toml'. ```nu > 'Cargo.toml' | str starts-with '.toml' false ``` -Checks if input string starts with 'cargo', case-insensitive +Checks if input string starts with 'cargo', case-insensitive. ```nu > 'Cargo.toml' | str starts-with --ignore-case 'cargo' true diff --git a/commands/docs/str_stats.md b/commands/docs/str_stats.md index 0e1e1cc9f4f..0f1dee10a77 100644 --- a/commands/docs/str_stats.md +++ b/commands/docs/str_stats.md @@ -2,7 +2,7 @@ title: str stats categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Gather word count statistics on the text. usage: | @@ -28,7 +28,7 @@ contributors: false | string | record | ## Examples -Count the number of words in a string +Count the number of words in a string. ```nu > "There are seven words in this sentence" | str stats ╭───────────────┬────╮ @@ -41,7 +41,7 @@ Count the number of words in a string ╰───────────────┴────╯ ``` -Counts unicode characters +Counts unicode characters. ```nu > '今天天气真好' | str stats ╭───────────────┬────╮ @@ -54,7 +54,7 @@ Counts unicode characters ╰───────────────┴────╯ ``` -Counts Unicode characters correctly in a string +Counts Unicode characters correctly in a string. ```nu > "Amélie Amelie" | str stats ╭───────────────┬────╮ diff --git a/commands/docs/str_substring.md b/commands/docs/str_substring.md index 510fac5dec5..d99b8cafd11 100644 --- a/commands/docs/str_substring.md +++ b/commands/docs/str_substring.md @@ -2,7 +2,7 @@ title: str substring categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Get part of a string. Note that the first character of a string is index 0. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--grapheme-clusters, -g`: count indexes and split using grapheme clusters (all visible chars have length 1) - - `--utf-8-bytes, -b`: count indexes and split using UTF-8 bytes (default; non-ASCII chars have length 2+) + - `--grapheme-clusters, -g`: Count indexes and split using grapheme clusters (all visible chars have length 1). + - `--utf-8-bytes, -b`: Count indexes and split using UTF-8 bytes (default; non-ASCII chars have length 2+). ## Parameters @@ -41,19 +41,19 @@ contributors: false | record | record | ## Examples -Get a substring "nushell" from the text "good nushell" using a range +Get a substring "nushell" from the text "good nushell" using a range. ```nu > 'good nushell' | str substring 5..11 nushell ``` -Count indexes and split using grapheme clusters +Count indexes and split using grapheme clusters. ```nu > '🇯🇵ほげ ふが ぴよ' | str substring --grapheme-clusters 4..5 ふが ``` -sub string by negative index +sub string by negative index. ```nu > 'good nushell' | str substring 5..-2 nushel diff --git a/commands/docs/str_title-case.md b/commands/docs/str_title-case.md index 155eee23dfa..d0c726b71b2 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.110.0 +version: 0.111.0 strings: | Convert a string to Title Case. usage: | diff --git a/commands/docs/str_trim.md b/commands/docs/str_trim.md index 9f15f6e7ab0..70da032dd3d 100644 --- a/commands/docs/str_trim.md +++ b/commands/docs/str_trim.md @@ -2,7 +2,7 @@ title: str trim categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Trim whitespace or specific character. usage: | @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--char, -c {string}`: character to trim (default: whitespace) - - `--left, -l`: trims characters only from the beginning of the string - - `--right, -r`: trims characters only from the end of the string + - `--char, -c {string}`: Character to trim (default: whitespace). + - `--left, -l`: Trims characters only from the beginning of the string. + - `--right, -r`: Trims characters only from the end of the string. ## Parameters @@ -41,31 +41,31 @@ contributors: false | record | record | ## Examples -Trim whitespace +Trim whitespace. ```nu > 'Nu shell ' | str trim Nu shell ``` -Trim a specific character (not the whitespace) +Trim a specific character (not the whitespace). ```nu > '=== Nu shell ===' | str trim --char '=' Nu shell ``` -Trim whitespace from the beginning of string +Trim whitespace from the beginning of string. ```nu > ' Nu shell ' | str trim --left Nu shell ``` -Trim whitespace from the end of string +Trim whitespace from the end of string. ```nu > ' Nu shell ' | str trim --right Nu shell ``` -Trim a specific character only from the end of the string +Trim a specific character only from the end of the string. ```nu > '=== Nu shell ===' | str trim --right --char '=' === Nu shell diff --git a/commands/docs/str_upcase.md b/commands/docs/str_upcase.md index 7f36000fcb8..08e587be3b6 100644 --- a/commands/docs/str_upcase.md +++ b/commands/docs/str_upcase.md @@ -2,11 +2,11 @@ title: str upcase categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | - Make text uppercase. + Convert text to uppercase. usage: | - Make text uppercase. + Convert text to uppercase. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `str upcase` for [strings](/commands/categories/strings.md) -
Make text uppercase.
+
Convert text to uppercase.
## Signature @@ -35,7 +35,7 @@ contributors: false | record | record | ## Examples -Upcase contents +Upcase contents. ```nu > 'nu' | str upcase NU diff --git a/commands/docs/sys.md b/commands/docs/sys.md index 300ec701e96..94b5247ac93 100644 --- a/commands/docs/sys.md +++ b/commands/docs/sys.md @@ -2,7 +2,7 @@ title: sys categories: | system -version: 0.110.0 +version: 0.111.0 system: | View information about the system. usage: | diff --git a/commands/docs/sys_cpu.md b/commands/docs/sys_cpu.md index 33182dd713a..0e3d0e77c46 100644 --- a/commands/docs/sys_cpu.md +++ b/commands/docs/sys_cpu.md @@ -2,7 +2,7 @@ title: sys cpu categories: | system -version: 0.110.0 +version: 0.111.0 system: | View information about the system CPUs. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--long, -l`: Get all available columns (slower, needs to sample CPU over time) + - `--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 911f3780b8b..197cd470981 100644 --- a/commands/docs/sys_disks.md +++ b/commands/docs/sys_disks.md @@ -2,7 +2,7 @@ title: sys disks categories: | system -version: 0.110.0 +version: 0.111.0 system: | View information about the system disks. usage: | diff --git a/commands/docs/sys_host.md b/commands/docs/sys_host.md index 4e2e98bcc52..8aea4e643f7 100644 --- a/commands/docs/sys_host.md +++ b/commands/docs/sys_host.md @@ -2,7 +2,7 @@ title: sys host categories: | system -version: 0.110.0 +version: 0.111.0 system: | View information about the system host. usage: | diff --git a/commands/docs/sys_mem.md b/commands/docs/sys_mem.md index 13975c149b9..3f501d44bf0 100644 --- a/commands/docs/sys_mem.md +++ b/commands/docs/sys_mem.md @@ -2,7 +2,7 @@ title: sys mem categories: | system -version: 0.110.0 +version: 0.111.0 system: | View information about the system memory. usage: | diff --git a/commands/docs/sys_net.md b/commands/docs/sys_net.md index db5ec98456d..cd70589bdb6 100644 --- a/commands/docs/sys_net.md +++ b/commands/docs/sys_net.md @@ -2,7 +2,7 @@ title: sys net categories: | system -version: 0.110.0 +version: 0.111.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 4fa9568b1f6..565ad3dbe65 100644 --- a/commands/docs/sys_temp.md +++ b/commands/docs/sys_temp.md @@ -2,7 +2,7 @@ title: sys temp categories: | system -version: 0.110.0 +version: 0.111.0 system: | View the temperatures of system components. usage: | diff --git a/commands/docs/sys_users.md b/commands/docs/sys_users.md index 3645575a1a4..cc1df142730 100644 --- a/commands/docs/sys_users.md +++ b/commands/docs/sys_users.md @@ -2,7 +2,7 @@ title: sys users categories: | system -version: 0.110.0 +version: 0.111.0 system: | View information about the users on the system. usage: | diff --git a/commands/docs/table.md b/commands/docs/table.md index 45e5d4616a6..07157f7f426 100644 --- a/commands/docs/table.md +++ b/commands/docs/table.md @@ -2,7 +2,7 @@ title: table categories: | viewers -version: 0.110.0 +version: 0.111.0 viewers: | Render the table. usage: | @@ -22,18 +22,18 @@ contributors: false ## Flags - - `--theme, -t {string}`: set a table mode/theme - - `--index, -i {any}`: enable (true) or disable (false) the #/index column or set the starting index - - `--width, -w {int}`: number of terminal columns wide (not output columns) - - `--expand, -e`: expand the table structure in a light mode - - `--expand-deep, -d {int}`: an expand limit of recursion which will take place, must be used with --expand - - `--flatten`: Flatten simple arrays - - `--flatten-separator {string}`: sets a separator when 'flatten' used - - `--collapse, -c`: expand the table structure in collapse mode. -Be aware collapse mode currently doesn't support width control - - `--abbreviated, -a {int}`: abbreviate the data in the table by truncating the middle part and only showing amount provided on top and bottom - - `--list, -l`: list available table modes/themes - - `--icons, -o`: adds icons to ls tables + - `--theme, -t {string}`: Set a table mode/theme. + - `--index, -i {any}`: Enable (true) or disable (false) the #/index column or set the starting index. + - `--width, -w {int}`: Number of terminal columns wide (not output columns). + - `--expand, -e`: Expand the table structure in a light mode. + - `--expand-deep, -d {int}`: An expand limit of recursion which will take place, must be used with --expand. + - `--flatten`: Flatten simple arrays. + - `--flatten-separator {string}`: Sets a separator when 'flatten' is used. + - `--collapse, -c`: Expand the table structure in collapse mode. +Be aware collapse mode currently doesn't support width control. + - `--abbreviated, -a {int}`: Abbreviate the data in the table by truncating the middle part and only showing amount provided on top and bottom. + - `--list, -l`: List available table modes/themes. + - `--icons, -o`: Add icons to file paths in tables. ## Input/output types: diff --git a/commands/docs/take.md b/commands/docs/take.md index 70a7562302a..f57092e8b9b 100644 --- a/commands/docs/take.md +++ b/commands/docs/take.md @@ -2,7 +2,7 @@ title: take categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Take only the first n elements of a list, or the first n bytes of a binary value. usage: | @@ -35,7 +35,7 @@ contributors: false | range | list<number> | ## Examples -Return the first item of a list/table +Return the first item of a list/table. ```nu > [1 2 3] | take 1 ╭───┬───╮ @@ -44,7 +44,7 @@ Return the first item of a list/table ``` -Return the first 2 items of a list/table +Return the first 2 items of a list/table. ```nu > [1 2 3] | take 2 ╭───┬───╮ @@ -54,7 +54,7 @@ Return the first 2 items of a list/table ``` -Return the first two rows of a table +Return the first two rows of a table. ```nu > [[editions]; [2015] [2018] [2021]] | take 2 ╭───┬──────────╮ @@ -66,7 +66,7 @@ Return the first two rows of a table ``` -Return the first 2 bytes of a binary value +Return the first 2 bytes of a binary value. ```nu > 0x[01 23 45] | take 2 Length: 2 (0x2) bytes | printable whitespace ascii_other non_ascii @@ -74,7 +74,7 @@ Length: 2 (0x2) bytes | printable whitespace ascii_other non_ascii ``` -Return the first 3 elements of a range +Return the first 3 elements of a range. ```nu > 1..10 | take 3 ╭───┬───╮ diff --git a/commands/docs/take_until.md b/commands/docs/take_until.md index 6de6ef7840c..19dfb7dfb31 100644 --- a/commands/docs/take_until.md +++ b/commands/docs/take_until.md @@ -2,7 +2,7 @@ title: take until categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Take elements of the input until a predicate is true. usage: | @@ -32,7 +32,7 @@ contributors: false | list<any> | list<any> | ## Examples -Take until the element is positive +Take until the element is positive. ```nu > [-1 -2 9 1] | take until {|x| $x > 0 } ╭───┬────╮ @@ -42,7 +42,7 @@ Take until the element is positive ``` -Take until the element is positive using stored condition +Take until the element is positive using stored condition. ```nu > let cond = {|x| $x > 0 }; [-1 -2 9 1] | take until $cond ╭───┬────╮ @@ -52,7 +52,7 @@ Take until the element is positive using stored condition ``` -Take until the field value is positive +Take until the field value is positive. ```nu > [{a: -1} {a: -2} {a: 9} {a: 1}] | take until {|x| $x.a > 0 } ╭───┬────╮ diff --git a/commands/docs/take_while.md b/commands/docs/take_while.md index 6f697ebda58..d79246ef9c4 100644 --- a/commands/docs/take_while.md +++ b/commands/docs/take_while.md @@ -2,7 +2,7 @@ title: take while categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Take elements of the input while a predicate is true. usage: | @@ -33,7 +33,7 @@ contributors: false | list<any> | list<any> | ## Examples -Take while the element is negative +Take while the element is negative. ```nu > [-1 -2 9 1] | take while {|x| $x < 0 } ╭───┬────╮ @@ -43,7 +43,7 @@ Take while the element is negative ``` -Take while the element is negative using stored condition +Take while the element is negative using stored condition. ```nu > let cond = {|x| $x < 0 }; [-1 -2 9 1] | take while $cond ╭───┬────╮ @@ -53,7 +53,7 @@ Take while the element is negative using stored condition ``` -Take while the field value is negative +Take while the field value is negative. ```nu > [{a: -1} {a: -2} {a: 9} {a: 1}] | take while {|x| $x.a < 0 } ╭───┬────╮ diff --git a/commands/docs/tee.md b/commands/docs/tee.md index 3032668c465..20620419c83 100644 --- a/commands/docs/tee.md +++ b/commands/docs/tee.md @@ -2,7 +2,7 @@ title: tee categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Copy a stream to another command in parallel. usage: | @@ -36,25 +36,25 @@ contributors: false | any | any | ## Examples -Save a webpage to a file while also printing it +Save a webpage to a file while also printing it. ```nu > http get http://example.org/ | tee { save example.html } ``` -Save error messages from an external command to a file without redirecting them +Save error messages from an external command to a file without redirecting them. ```nu > nu -c 'print -e error; print ok' | tee --stderr { save error.log } | complete ``` -Print numbers and their sum +Print numbers and their sum. ```nu > 1..100 | tee { each { print } } | math sum | wrap sum ``` -Do something with a value on another thread, while also passing through the value +Do something with a value on another thread, while also passing through the value. ```nu > 10000 | tee { 1..$in | print } | $in * 5 50000 diff --git a/commands/docs/term.md b/commands/docs/term.md index d9c8fe053b3..79c0c303625 100644 --- a/commands/docs/term.md +++ b/commands/docs/term.md @@ -2,7 +2,7 @@ title: term categories: | platform -version: 0.110.0 +version: 0.111.0 platform: | Commands for querying information about the terminal. usage: | diff --git a/commands/docs/term_query.md b/commands/docs/term_query.md index 007f9afbafa..632724e032e 100644 --- a/commands/docs/term_query.md +++ b/commands/docs/term_query.md @@ -2,7 +2,7 @@ title: term query categories: | platform -version: 0.110.0 +version: 0.111.0 platform: | Query the terminal for information. usage: | @@ -50,7 +50,7 @@ Get terminal background color. ``` -Get terminal background color. (some terminals prefer `char bel` rather than `ansi st` as string terminator) +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) diff --git a/commands/docs/term_size.md b/commands/docs/term_size.md index 11e28f10adf..d77791b9ced 100644 --- a/commands/docs/term_size.md +++ b/commands/docs/term_size.md @@ -2,7 +2,7 @@ title: term size categories: | platform -version: 0.110.0 +version: 0.111.0 platform: | Returns a record containing the number of columns (width) and rows (height) of the terminal. usage: | @@ -28,19 +28,19 @@ contributors: false | nothing | record<columns: int, rows: int> | ## Examples -Return the columns (width) and rows (height) of the terminal +Return the columns (width) and rows (height) of the terminal. ```nu > term size ``` -Return the columns (width) of the terminal +Return the columns (width) of the terminal. ```nu > (term size).columns ``` -Return the rows (height) of the terminal +Return the rows (height) of the terminal. ```nu > (term size).rows diff --git a/commands/docs/timeit.md b/commands/docs/timeit.md index d5185a08e39..32b3c3f76ad 100644 --- a/commands/docs/timeit.md +++ b/commands/docs/timeit.md @@ -2,7 +2,7 @@ title: timeit categories: | debug -version: 0.110.0 +version: 0.111.0 debug: | Time how long it takes a closure to run. usage: | @@ -39,31 +39,31 @@ contributors: false | nothing | record<time: duration, output: any> | ## Examples -Time a closure containing one command +Time a closure containing one command. ```nu > timeit { sleep 500ms } 500ms 631µs 800ns ``` -Time a closure with an input value +Time a closure with an input value. ```nu > 'A really long string' | timeit { split chars } ``` -Time a closure with an input stream +Time a closure with an input stream. ```nu > open some_file.txt | collect | timeit { split chars } ``` -Time a closure containing a pipeline +Time a closure containing a pipeline. ```nu > timeit { open some_file.txt | split chars } ``` -Time a closure and also return the output +Time a closure and also return the output. ```nu > timeit --output { 'example text' } ╭────────┬──────────────╮ diff --git a/commands/docs/to.md b/commands/docs/to.md index 6638e0fdf86..ce21282678f 100644 --- a/commands/docs/to.md +++ b/commands/docs/to.md @@ -2,11 +2,11 @@ title: to categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | - Translate structured data to a format. + Translate structured data to various formats. usage: | - Translate structured data to a format. + Translate structured data to various formats. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `to` for [formats](/commands/categories/formats.md) -
Translate structured data to a format.
+
Translate structured data to various formats.
## Signature @@ -41,7 +41,7 @@ You must use one of the following subcommands. Using this command as-is will onl | [`to msgpackz`](/commands/docs/to_msgpackz.md) | Convert Nu values into brotli-compressed MessagePack. | built-in | | [`to nuon`](/commands/docs/to_nuon.md) | Converts table data into Nuon (Nushell Object Notation) text. | built-in | | [`to plist`](/commands/docs/to_plist.md) | Convert Nu values into plist | plugin | -| [`to text`](/commands/docs/to_text.md) | Converts data into simple text. | built-in | +| [`to text`](/commands/docs/to_text.md) | Convert data into plain text format. | built-in | | [`to toml`](/commands/docs/to_toml.md) | Convert record into .toml text. | built-in | | [`to tsv`](/commands/docs/to_tsv.md) | Convert table into .tsv text. | built-in | | [`to xml`](/commands/docs/to_xml.md) | Convert special record structure into .xml text. | built-in | diff --git a/commands/docs/to_csv.md b/commands/docs/to_csv.md index 6ec13e7399d..abe34958509 100644 --- a/commands/docs/to_csv.md +++ b/commands/docs/to_csv.md @@ -2,7 +2,7 @@ title: to csv categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Convert table into .csv text . usage: | @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--separator, -s {string}`: a character to separate columns, defaults to ',' - - `--noheaders, -n`: do not output the columns names as the first row - - `--columns {list}`: the names (in order) of the columns to use + - `--separator, -s {string}`: A character to separate columns, defaults to ','. + - `--noheaders, -n`: Do not output the columns names as the first row. + - `--columns {list}`: The names (in order) of the columns to use. ## Input/output types: @@ -35,7 +35,7 @@ contributors: false | table | string | ## Examples -Outputs a CSV string representing the contents of this table +Outputs a CSV string representing the contents of this table. ```nu > [[foo bar]; [1 2]] | to csv foo,bar @@ -43,7 +43,7 @@ foo,bar ``` -Outputs a CSV string representing the contents of this table +Outputs a CSV string representing the contents of this table. ```nu > [[foo bar]; [1 2]] | to csv --separator ';' foo;bar @@ -51,7 +51,7 @@ foo;bar ``` -Outputs a CSV string representing the contents of this record +Outputs a CSV string representing the contents of this record. ```nu > {a: 1 b: 2} | to csv a,b @@ -59,7 +59,7 @@ a,b ``` -Outputs a CSV stream with column names pre-determined +Outputs a CSV stream with column names pre-determined. ```nu > [[foo bar baz]; [1 2 3]] | to csv --columns [baz foo] baz,foo diff --git a/commands/docs/to_html.md b/commands/docs/to_html.md index a671ad0f66b..1101de392ab 100644 --- a/commands/docs/to_html.md +++ b/commands/docs/to_html.md @@ -2,7 +2,7 @@ title: to html categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Convert table into simple HTML. usage: | @@ -22,13 +22,13 @@ contributors: false ## Flags - - `--html-color, -c`: change ansi colors to html colors - - `--no-color, -n`: remove all ansi colors in output - - `--dark, -d`: indicate your background color is a darker color - - `--partial, -p`: only output the html for the content itself - - `--theme, -t {string}`: the name of the theme to use (github, blulocolight, ...); case-insensitive - - `--list, -l`: produce a color table of all available themes - - `--raw, -r`: do not escape html tags + - `--html-color, -c`: Change ansi colors to html colors. + - `--no-color, -n`: Remove all ansi colors in output. + - `--dark, -d`: Indicate your background color is a darker color. + - `--partial, -p`: Only output the html for the content itself. + - `--theme, -t {string}`: The name of the theme to use (github, blulocolight, ...); case-insensitive. + - `--list, -l`: Produce a color table of all available themes. + - `--raw, -r`: Do not escape html tags. ## Input/output types: diff --git a/commands/docs/to_json.md b/commands/docs/to_json.md index 6fc2e552baf..95315b3fc13 100644 --- a/commands/docs/to_json.md +++ b/commands/docs/to_json.md @@ -2,7 +2,7 @@ title: to json categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Converts table data into JSON text. usage: | @@ -22,10 +22,10 @@ contributors: false ## Flags - - `--raw, -r`: remove all of the whitespace and trailing line ending - - `--indent, -i {number}`: specify indentation width - - `--tabs, -t {number}`: specify indentation tab quantity - - `--serialize, -s`: serialize nushell types that cannot be deserialized + - `--raw, -r`: Remove all of the whitespace and trailing line ending. + - `--indent, -i {number}`: Specify indentation width. + - `--tabs, -t {number}`: Specify indentation tab quantity. + - `--serialize, -s`: Serialize nushell types that cannot be deserialized. ## Input/output types: @@ -35,7 +35,7 @@ contributors: false | any | string | ## Examples -Outputs a JSON string, with default indentation, representing the contents of this table +Outputs a JSON string, with default indentation, representing the contents of this table. ```nu > [a b c] | to json [ @@ -45,7 +45,7 @@ Outputs a JSON string, with default indentation, representing the contents of th ] ``` -Outputs a JSON string, with 4-space indentation, representing the contents of this table +Outputs a JSON string, with 4-space indentation, representing the contents of this table. ```nu > [Joe Bob Sam] | to json --indent 4 [ @@ -55,7 +55,7 @@ Outputs a JSON string, with 4-space indentation, representing the contents of th ] ``` -Outputs an unformatted JSON string representing the contents of this table +Outputs an unformatted JSON string representing the contents of this table. ```nu > [1 2 3] | to json -r [1,2,3] diff --git a/commands/docs/to_md.md b/commands/docs/to_md.md index 3b803987248..7212d7cf670 100644 --- a/commands/docs/to_md.md +++ b/commands/docs/to_md.md @@ -2,7 +2,7 @@ title: to md categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Convert table into simple Markdown. usage: | @@ -22,13 +22,13 @@ contributors: false ## Flags - - `--pretty, -p`: Formats the Markdown table to vertically align items - - `--per-element, -e`: Treat each row as markdown syntax element - - `--center, -c {list}`: Formats the Markdown table to center given columns - - `--escape-md, -m`: Escapes Markdown special characters - - `--escape-html, -t`: Escapes HTML special characters - - `--escape-all, -a`: Escapes both Markdown and HTML special characters - - `--list, -l {string}`: Format lists as 'ordered' (1. 2. 3.), 'unordered' (* * *), or 'none'. Default: unordered + - `--pretty, -p`: Formats the Markdown table to vertically align items. + - `--per-element, -e`: Treat each row as markdown syntax element. + - `--center, -c {list}`: Formats the Markdown table to center given columns. + - `--escape-md, -m`: Escapes Markdown special characters. + - `--escape-html, -t`: Escapes HTML special characters. + - `--escape-all, -a`: Escapes both Markdown and HTML special characters. + - `--list, -l {string}`: Format lists as 'ordered' (1. 2. 3.), 'unordered' (* * *), or 'none'. Default: unordered. ## Input/output types: @@ -38,7 +38,7 @@ contributors: false | any | string | ## Examples -Outputs an MD string representing the contents of this table +Outputs an MD string representing the contents of this table. ```nu > [[foo bar]; [1 2]] | to md | foo | bar | @@ -46,7 +46,7 @@ Outputs an MD string representing the contents of this table | 1 | 2 | ``` -Optionally, output a formatted markdown string +Optionally, output a formatted markdown string. ```nu > [[foo bar]; [1 2]] | to md --pretty | foo | bar | @@ -54,7 +54,7 @@ Optionally, output a formatted markdown string | 1 | 2 | ``` -Treat each row as a markdown element +Treat each row as a markdown element. ```nu > [{"H1": "Welcome to Nushell" } [[foo bar]; [1 2]]] | to md --per-element --pretty # Welcome to Nushell @@ -63,7 +63,7 @@ Treat each row as a markdown element | 1 | 2 | ``` -Render a list (unordered by default) +Render a list (unordered by default). ```nu > [0 1 2] | to md * 0 @@ -71,7 +71,7 @@ Render a list (unordered by default) * 2 ``` -Separate list into markdown tables +Separate list into markdown tables. ```nu > [ {foo: 1, bar: 2} {foo: 3, bar: 4} {foo: 5}] | to md --per-element | foo | bar | @@ -84,7 +84,7 @@ Separate list into markdown tables | 5 | ``` -Center a column of a markdown table +Center a column of a markdown table. ```nu > [ {foo: 1, bar: 2} {foo: 3, bar: 4}] | to md --pretty --center [bar] | foo | bar | @@ -93,7 +93,7 @@ Center a column of a markdown table | 3 | 4 | ``` -Escape markdown special characters +Escape markdown special characters. ```nu > [ {foo: "_1_", bar: "\# 2"} {foo: "[3]", bar: "4|5"}] | to md --escape-md | foo | bar | @@ -102,7 +102,7 @@ Escape markdown special characters | \[3\] | 4\|5 | ``` -Escape html special characters +Escape html special characters. ```nu > [ {a: p, b: "

Welcome to nushell

"}] | to md --escape-html | a | b | @@ -110,7 +110,7 @@ Escape html special characters | p | <p>Welcome to nushell</p> | ``` -Render a list as an ordered markdown list +Render a list as an ordered markdown list. ```nu > [one two three] | to md --list ordered 1. one @@ -118,7 +118,7 @@ Render a list as an ordered markdown list 3. three ``` -Render a list without markers +Render a list without markers. ```nu > [one two three] | to md --list none one diff --git a/commands/docs/to_msgpack.md b/commands/docs/to_msgpack.md index bfb4d12b82a..36e574103a6 100644 --- a/commands/docs/to_msgpack.md +++ b/commands/docs/to_msgpack.md @@ -2,7 +2,7 @@ title: to msgpack categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Convert Nu values into MessagePack. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--serialize, -s`: serialize nushell types that cannot be deserialized + - `--serialize, -s`: Serialize nushell types that cannot be deserialized. ## Input/output types: @@ -32,7 +32,7 @@ contributors: false | any | binary | ## Examples -Convert a list of values to MessagePack +Convert a list of values to MessagePack. ```nu > [foo, 42, false] | to msgpack Length: 7 (0x7) bytes | printable whitespace ascii_other non_ascii @@ -40,7 +40,7 @@ Length: 7 (0x7) bytes | printable whitespace ascii_other non_ascii ``` -Convert a range to a MessagePack array +Convert a range to a MessagePack array. ```nu > 1..10 | to msgpack Length: 11 (0xb) bytes | printable whitespace ascii_other non_ascii @@ -48,7 +48,7 @@ Length: 11 (0xb) bytes | printable whitespace ascii_other non_ascii ``` -Convert a table to MessagePack +Convert a table to MessagePack. ```nu > [ [event_name time]; diff --git a/commands/docs/to_msgpackz.md b/commands/docs/to_msgpackz.md index 34968688e05..db41a3cd16e 100644 --- a/commands/docs/to_msgpackz.md +++ b/commands/docs/to_msgpackz.md @@ -2,7 +2,7 @@ title: to msgpackz categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Convert Nu values into brotli-compressed MessagePack. usage: | @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--quality, -q {int}`: Quality of brotli compression (default 3) - - `--window-size, -w {int}`: Window size for brotli compression (default 20) - - `--serialize, -s`: serialize nushell types that cannot be deserialized + - `--quality, -q {int}`: Quality of brotli compression (default 3). + - `--window-size, -w {int}`: Window size for brotli compression (default 20). + - `--serialize, -s`: Serialize nushell types that cannot be deserialized. ## Input/output types: diff --git a/commands/docs/to_nuon.md b/commands/docs/to_nuon.md index 2ddbf71bccd..dd053a2a0b5 100644 --- a/commands/docs/to_nuon.md +++ b/commands/docs/to_nuon.md @@ -2,7 +2,7 @@ title: to nuon categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Converts table data into Nuon (Nushell Object Notation) text. usage: | @@ -22,11 +22,11 @@ contributors: false ## Flags - - `--raw, -r`: remove all of the whitespace (overwrites -i and -t) - - `--indent, -i {number}`: specify indentation width - - `--tabs, -t {number}`: specify indentation tab quantity - - `--serialize, -s`: serialize nushell types that cannot be deserialized - - `--raw-strings`: use raw string syntax (r#'...'#) for strings with quotes or backslashes + - `--raw, -r`: Remove all of the whitespace (overwrites -i and -t). + - `--indent, -i {number}`: Specify indentation width. + - `--tabs, -t {number}`: Specify indentation tab quantity. + - `--serialize, -s`: Serialize nushell types that cannot be deserialized. + - `--raw-strings`: Use raw string syntax (r#'...'#) for strings with quotes or backslashes. ## Input/output types: @@ -36,13 +36,13 @@ contributors: false | any | string | ## Examples -Outputs a NUON string representing the contents of this list, compact by default +Outputs a NUON string representing the contents of this list, compact by default. ```nu > [1 2 3] | to nuon [1, 2, 3] ``` -Outputs a NUON array of ints, with pretty indentation +Outputs a NUON array of ints, with pretty indentation. ```nu > [1 2 3] | to nuon --indent 2 [ @@ -52,13 +52,13 @@ Outputs a NUON array of ints, with pretty indentation ] ``` -Overwrite any set option with --raw +Overwrite any set option with --raw. ```nu > [1 2 3] | to nuon --indent 2 --raw [1,2,3] ``` -A more complex record with multiple data types +A more complex record with multiple data types. ```nu > {date: 2000-01-01, data: [1 [2 3] 4.56]} | to nuon --indent 2 { @@ -74,13 +74,13 @@ A more complex record with multiple data types } ``` -A more complex record with --raw +A more complex record with --raw. ```nu > {date: 2000-01-01, data: [1 [2 3] 4.56]} | to nuon --raw {date:2000-01-01T00:00:00+00:00,data:[1,[2,3],4.56]} ``` -Use raw string syntax for strings with quotes or backslashes +Use raw string syntax for strings with quotes or backslashes. ```nu > 'hello "world"' | to nuon --raw-strings r#'hello "world"'# diff --git a/commands/docs/to_plist.md b/commands/docs/to_plist.md index 8830c7b7c1f..59b8765bdcc 100644 --- a/commands/docs/to_plist.md +++ b/commands/docs/to_plist.md @@ -2,7 +2,7 @@ title: to plist categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Convert Nu values into plist usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--binary, -b`: Output plist in binary format + - `--binary, -b`: Output plist in binary format. ## Examples diff --git a/commands/docs/to_text.md b/commands/docs/to_text.md index 8d5c479fae4..0d0d908eeb6 100644 --- a/commands/docs/to_text.md +++ b/commands/docs/to_text.md @@ -2,11 +2,11 @@ title: to text categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | - Converts data into simple text. + Convert data into plain text format. usage: | - Converts data into simple text. + Convert data into plain text format. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `to text` for [formats](/commands/categories/formats.md) -
Converts data into simple text.
+
Convert data into plain text format.
## Signature @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--no-newline, -n`: Do not append a newline to the end of the text - - `--serialize, -s`: serialize nushell types that cannot be deserialized + - `--no-newline, -n`: Do not append a newline to the end of the text. + - `--serialize, -s`: Serialize nushell types that cannot be deserialized. ## Input/output types: @@ -33,26 +33,26 @@ contributors: false | any | string | ## Examples -Outputs data as simple text with a trailing newline +Outputs data as simple text with a trailing newline. ```nu > [1] | to text 1 ``` -Outputs data as simple text without a trailing newline +Outputs data as simple text without a trailing newline. ```nu > [1] | to text --no-newline 1 ``` -Outputs external data as simple text +Outputs external data as simple text. ```nu > git help -a | lines | find -r '^ ' | to text ``` -Outputs records as simple text +Outputs records as simple text. ```nu > ls | to text diff --git a/commands/docs/to_toml.md b/commands/docs/to_toml.md index 0cec2e1c7a8..2975dcca152 100644 --- a/commands/docs/to_toml.md +++ b/commands/docs/to_toml.md @@ -2,7 +2,7 @@ title: to toml categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Convert record into .toml text. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--serialize, -s`: serialize nushell types that cannot be deserialized + - `--serialize, -s`: Serialize nushell types that cannot be deserialized. ## Input/output types: @@ -32,7 +32,7 @@ contributors: false | record | string | ## Examples -Outputs an TOML string representing the contents of this record +Outputs an TOML string representing the contents of this record. ```nu > {foo: 1 bar: 'qwe'} | to toml foo = 1 diff --git a/commands/docs/to_tsv.md b/commands/docs/to_tsv.md index 78ce7657f99..6e4e73ff056 100644 --- a/commands/docs/to_tsv.md +++ b/commands/docs/to_tsv.md @@ -2,7 +2,7 @@ title: to tsv categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Convert table into .tsv text. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--noheaders, -n`: do not output the column names as the first row - - `--columns {list}`: the names (in order) of the columns to use + - `--noheaders, -n`: Do not output the column names as the first row. + - `--columns {list}`: The names (in order) of the columns to use. ## Input/output types: @@ -34,7 +34,7 @@ contributors: false | table | string | ## Examples -Outputs a TSV string representing the contents of this table +Outputs a TSV string representing the contents of this table. ```nu > [[foo bar]; [1 2]] | to tsv foobar @@ -42,7 +42,7 @@ foobar ``` -Outputs a TSV string representing the contents of this record +Outputs a TSV string representing the contents of this record. ```nu > {a: 1 b: 2} | to tsv ab @@ -50,7 +50,7 @@ ab ``` -Outputs a TSV stream with column names pre-determined +Outputs a TSV stream with column names pre-determined. ```nu > [[foo bar baz]; [1 2 3]] | to tsv --columns [baz foo] bazfoo diff --git a/commands/docs/to_xml.md b/commands/docs/to_xml.md index 6779b26019e..e5b79449b66 100644 --- a/commands/docs/to_xml.md +++ b/commands/docs/to_xml.md @@ -2,7 +2,7 @@ title: to xml categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Convert special record structure into .xml text. usage: | @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--indent, -i {int}`: Formats the XML text with the provided indentation setting - - `--partial-escape, -p`: Only escape mandatory characters in text and attributes - - `--self-closed, -s`: Output empty tags as self closing + - `--indent, -i {int}`: Formats the XML text with the provided indentation setting. + - `--partial-escape, -p`: Only escape mandatory characters in text and attributes. + - `--self-closed, -s`: Output empty tags as self closing. ## Input/output types: @@ -34,19 +34,19 @@ contributors: false | record | string | ## Examples -Outputs an XML string representing the contents of this table +Outputs an XML string representing the contents of this table. ```nu > {tag: note attributes: {} content : [{tag: remember attributes: {} content : [{tag: null attributes: null content : Event}]}]} | to xml Event ``` -When formatting xml null and empty record fields can be omitted and strings can be written without a wrapping record +When formatting xml null and empty record fields can be omitted and strings can be written without a wrapping record. ```nu > {tag: note content : [{tag: remember content : [Event]}]} | to xml Event ``` -Optionally, formats the text with a custom indentation setting +Optionally, formats the text with a custom indentation setting. ```nu > {tag: note content : [{tag: remember content : [Event]}]} | to xml --indent 3 @@ -54,13 +54,13 @@ Optionally, formats the text with a custom indentation setting ``` -Produce less escaping sequences in resulting xml +Produce less escaping sequences in resulting xml. ```nu > {tag: note attributes: {a: "'qwe'\\"} content: ["\"'"]} | to xml --partial-escape "' ``` -Save space using self-closed tags +Save space using self-closed tags. ```nu > {tag: root content: [[tag]; [a] [b] [c]]} | to xml --self-closed diff --git a/commands/docs/to_yaml.md b/commands/docs/to_yaml.md index 0d54e770a5f..b3af1c937b5 100644 --- a/commands/docs/to_yaml.md +++ b/commands/docs/to_yaml.md @@ -2,7 +2,7 @@ title: to yaml categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Convert table into .yaml/.yml text. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--serialize, -s`: serialize nushell types that cannot be deserialized + - `--serialize, -s`: Serialize nushell types that cannot be deserialized. ## Input/output types: @@ -32,7 +32,7 @@ contributors: false | any | string | ## Examples -Outputs a YAML string representing the contents of this table +Outputs a YAML string representing the contents of this table. ```nu > [[foo bar]; ["1" "2"]] | to yaml - foo: '1' diff --git a/commands/docs/to_yml.md b/commands/docs/to_yml.md index 706899a1be9..fbbe719fbbf 100644 --- a/commands/docs/to_yml.md +++ b/commands/docs/to_yml.md @@ -2,7 +2,7 @@ title: to yml categories: | formats -version: 0.110.0 +version: 0.111.0 formats: | Convert table into .yaml/.yml text. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--serialize, -s`: serialize nushell types that cannot be deserialized + - `--serialize, -s`: Serialize nushell types that cannot be deserialized. ## Input/output types: @@ -32,7 +32,7 @@ contributors: false | any | string | ## Examples -Outputs a YAML string representing the contents of this table +Outputs a YAML string representing the contents of this table. ```nu > [[foo bar]; ["1" "2"]] | to yml - foo: '1' diff --git a/commands/docs/touch.md b/commands/docs/touch.md index 9574b05159a..3041f141ac2 100644 --- a/commands/docs/touch.md +++ b/commands/docs/touch.md @@ -2,7 +2,7 @@ title: touch categories: | filesystem -version: 0.110.0 +version: 0.111.0 filesystem: | Creates one or more files. usage: | @@ -22,13 +22,13 @@ contributors: false ## 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 + - `--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 @@ -42,55 +42,55 @@ contributors: false | nothing | nothing | ## Examples -Creates "fixture.json" +Creates "fixture.json". ```nu > touch fixture.json ``` -Creates files a, b and c +Creates files a, b and c. ```nu > touch a b c ``` -Changes the last modified time of "fixture.json" to today's date +Changes the last modified time of "fixture.json" to today's date. ```nu > touch -m fixture.json ``` -Changes the last modified and accessed time of all files with the .json extension to today's date +Changes the last modified and accessed time of all files with the .json extension to today's date. ```nu > touch *.json ``` -Changes the last accessed and modified times of files a, b and c to the current time but yesterday +Changes the last accessed and modified times of files a, b and c to the current time but yesterday. ```nu > touch -d "yesterday" a b c ``` -Changes the last modified time of files d and e to "fixture.json"'s last modified time +Changes the last modified time of files d and e to "fixture.json"'s last modified time. ```nu > touch -m -r fixture.json d e ``` -Changes the last accessed time of "fixture.json" to a datetime +Changes the last accessed time of "fixture.json" to a datetime. ```nu > touch -a -t 2019-08-24T12:30:30 fixture.json ``` -Change the last accessed and modified times of stdout +Change the last accessed and modified times of stdout. ```nu > touch - ``` -Changes the last accessed and modified times of file a to 1 month before "fixture.json"'s last modified time +Changes the last accessed and modified times of file a to 1 month before "fixture.json"'s last modified time. ```nu > touch -r fixture.json -d "-1 month" a diff --git a/commands/docs/transpose.md b/commands/docs/transpose.md index f24b1be66c9..9b7e1ff3b3a 100644 --- a/commands/docs/transpose.md +++ b/commands/docs/transpose.md @@ -2,7 +2,7 @@ title: transpose categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Transposes the table contents so rows become columns and columns become rows. usage: | @@ -22,11 +22,11 @@ contributors: false ## Flags - - `--header-row, -r`: use the first input column as the table header-row (or keynames when combined with --as-record) - - `--ignore-titles, -i`: don't transpose the column names into values - - `--as-record, -d`: transfer to record if the result is a table and contains only one row - - `--keep-last, -l`: on repetition of record fields due to `header-row`, keep the last value obtained - - `--keep-all, -a`: on repetition of record fields due to `header-row`, keep all the values obtained + - `--header-row, -r`: Use the first input column as the table header-row (or keynames when combined with --as-record). + - `--ignore-titles, -i`: Don't transpose the column names into values. + - `--as-record, -d`: Transfer to record if the result is a table and contains only one row. + - `--keep-last, -l`: On repetition of record fields due to `header-row`, keep the last value obtained. + - `--keep-all, -a`: On repetition of record fields due to `header-row`, keep all the values obtained. ## Parameters @@ -41,7 +41,7 @@ contributors: false | record | table | ## Examples -Transposes the table contents with default column names +Transposes the table contents with default column names. ```nu > [[c1 c2]; [1 2]] | transpose ╭───┬─────────┬─────────╮ @@ -53,7 +53,7 @@ Transposes the table contents with default column names ``` -Transposes the table contents with specified column names +Transposes the table contents with specified column names. ```nu > [[c1 c2]; [1 2]] | transpose key val ╭───┬─────┬─────╮ @@ -65,7 +65,7 @@ Transposes the table contents with specified column names ``` -Transposes the table without column names and specify a new column name +Transposes the table without column names and specify a new column name. ```nu > [[c1 c2]; [1 2]] | transpose --ignore-titles val ╭───┬─────╮ @@ -77,7 +77,7 @@ Transposes the table without column names and specify a new column name ``` -Transfer back to record with -d flag +Transfer back to record with -d flag. ```nu > {c1: 1, c2: 2} | transpose | transpose --ignore-titles -r -d ╭────┬───╮ diff --git a/commands/docs/try.md b/commands/docs/try.md index f361a966495..969d3251cef 100644 --- a/commands/docs/try.md +++ b/commands/docs/try.md @@ -2,7 +2,7 @@ title: try categories: | core -version: 0.110.0 +version: 0.111.0 core: | Try to run a block, if it fails optionally run a catch closure. usage: | @@ -18,12 +18,13 @@ contributors: false ## Signature -```> try {flags} (try_block) (catch_closure)``` +```> try {flags} (try_block) (catch) (finally)``` ## Parameters - `try_block`: Block to run. - - `catch_closure`: Closure to run if try block fails. + - `catch`: Closure to run if try block fails. + - `finally`: Closure to run anyway. ## Input/output types: @@ -33,24 +34,30 @@ contributors: false | any | any | ## Examples -Try to run a division by zero +Try to run a division by zero. ```nu > try { 1 / 0 } ``` -Try to run a division by zero and return a string instead +Try to run a division by zero and return a string instead. ```nu > try { 1 / 0 } catch { 'divided by zero' } divided by zero ``` -Try to run a division by zero and report the message +Try to run a division by zero and report the message. ```nu > try { 1 / 0 } catch { |err| $err.msg } ``` +Try to run a division by zero, report the message, and run finally +```nu +> try { 1 / 0 } catch { |err| print $err.msg } finally { 'clean' } + +``` + ## Notes This command is a parser keyword. For details, check: https://www.nushell.sh/book/thinking_in_nu.html \ No newline at end of file diff --git a/commands/docs/tutor.md b/commands/docs/tutor.md index 40a22e2b82b..95d7c01012c 100644 --- a/commands/docs/tutor.md +++ b/commands/docs/tutor.md @@ -2,7 +2,7 @@ title: tutor categories: | misc -version: 0.110.0 +version: 0.111.0 misc: | Run the tutorial. To begin, run: tutor. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--find, -f {string}`: Search tutorial for a phrase + - `--find, -f {string}`: Search tutorial for a phrase. ## Parameters @@ -36,13 +36,13 @@ contributors: false | nothing | string | ## Examples -Begin the tutorial +Begin the tutorial. ```nu > tutor begin ``` -Search a tutorial by phrase +Search a tutorial by phrase. ```nu > tutor --find "$in" diff --git a/commands/docs/ulimit.md b/commands/docs/ulimit.md index 18854f4ffdd..e538aa6e491 100644 --- a/commands/docs/ulimit.md +++ b/commands/docs/ulimit.md @@ -2,7 +2,7 @@ title: ulimit categories: | platform -version: 0.110.0 +version: 0.111.0 platform: | Set or get resource usage limits. usage: | @@ -22,9 +22,9 @@ contributors: false ## Flags - - `--soft, -S`: Sets soft resource limit - - `--hard, -H`: Sets hard resource limit - - `--all, -a`: Prints all current limits + - `--soft, -S`: Sets soft resource limit. + - `--hard, -H`: Sets hard resource limit. + - `--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 - `--file-size, -f`: Maximum size of files created by the shell @@ -35,7 +35,7 @@ contributors: false ## Parameters - - `limit`: Limit value. + - `limit`: The limit value to set. ## Input/output types: @@ -45,37 +45,37 @@ contributors: false | nothing | any | ## Examples -Print all current limits +Print all current limits. ```nu > ulimit -a ``` -Print specified limits +Print specified limits. ```nu > ulimit --core-size --data-size --file-size ``` -Set limit +Set limit. ```nu > ulimit --core-size 102400 ``` -Set stack size soft limit +Set stack size soft limit. ```nu > ulimit -s -S 10240 ``` -Set virtual memory size hard limit +Set virtual memory size hard limit. ```nu > ulimit -v -H 10240 ``` -Set core size limit to unlimited +Set core size limit to unlimited. ```nu > ulimit -c unlimited diff --git a/commands/docs/umask.md b/commands/docs/umask.md new file mode 100644 index 00000000000..a557cd4c3d9 --- /dev/null +++ b/commands/docs/umask.md @@ -0,0 +1,48 @@ +--- +title: umask +categories: | + platform +version: 0.111.0 +platform: | + Get or set default file creation permissions. +usage: | + Get or set default file creation permissions. +editLink: false +contributors: false +--- + + +# `umask` for [platform](/commands/categories/platform.md) + +
Get or set default file creation permissions.
+ +## Signature + +```> umask {flags} (permissions)``` + +## Parameters + + - `permissions`: The permissions to set on created files. + + +## Input/output types: + +| input | output | +| ------- | ------ | +| nothing | string | +## Examples + +Print current default file creation permissions. +```nu +> umask + +``` + +Make new files read-only to group and inaccessible to others. +```nu +> umask rwxr-x--- + +``` + +## Notes +When setting a new mask, the previous mask will be returned. \ No newline at end of file diff --git a/commands/docs/uname.md b/commands/docs/uname.md index 5a49834b160..f622d12b467 100644 --- a/commands/docs/uname.md +++ b/commands/docs/uname.md @@ -2,7 +2,7 @@ title: uname categories: | system -version: 0.110.0 +version: 0.111.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 61f02657a84..15df68b3ccc 100644 --- a/commands/docs/uniq-by.md +++ b/commands/docs/uniq-by.md @@ -2,7 +2,7 @@ title: uniq-by categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Return the distinct values in the input by the given column(s). usage: | @@ -22,10 +22,11 @@ contributors: false ## Flags - - `--count, -c`: Return a table containing the distinct input values together with their counts - - `--repeated, -d`: Return the input values that occur more than once - - `--ignore-case, -i`: Ignore differences in case when comparing input values - - `--unique, -u`: Return the input values that occur once only + - `--count, -c`: Return a table containing the distinct input values together with their counts. + - `--keep-last, -l`: Return the last occurrence of each unique value instead of the first. + - `--repeated, -d`: Return the input values that occur more than once. + - `--ignore-case, -i`: Ignore differences in case when comparing input values. + - `--unique, -u`: Return the input values that occur once only. ## Parameters @@ -40,7 +41,7 @@ contributors: false | list<any> | list<any> | ## Examples -Get rows from table filtered by column uniqueness +Get rows from table filtered by column uniqueness. ```nu > [[fruit count]; [apple 9] [apple 2] [pear 3] [orange 7]] | uniq-by fruit ╭───┬────────┬───────╮ @@ -52,3 +53,16 @@ Get rows from table filtered by column uniqueness ╰───┴────────┴───────╯ ``` + +Get rows from table filtered by column uniqueness, keeping the last occurrence of each duplicate. +```nu +> [[fruit count]; [apple 9] [apple 2] [pear 3] [orange 7]] | uniq-by fruit --keep-last +╭───┬────────┬───────╮ +│ # │ fruit │ count │ +├───┼────────┼───────┤ +│ 0 │ apple │ 2 │ +│ 1 │ pear │ 3 │ +│ 2 │ orange │ 7 │ +╰───┴────────┴───────╯ + +``` diff --git a/commands/docs/uniq.md b/commands/docs/uniq.md index e09ae8ca8af..b0b430eb906 100644 --- a/commands/docs/uniq.md +++ b/commands/docs/uniq.md @@ -2,7 +2,7 @@ title: uniq categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Return the distinct values in the input. usage: | @@ -22,10 +22,10 @@ contributors: false ## Flags - - `--count, -c`: Return a table containing the distinct input values together with their counts - - `--repeated, -d`: Return the input values that occur more than once - - `--ignore-case, -i`: Compare input values case-insensitively - - `--unique, -u`: Return the input values that occur once only + - `--count, -c`: Return a table containing the distinct input values together with their counts. + - `--repeated, -d`: Return the input values that occur more than once. + - `--ignore-case, -i`: Compare input values case-insensitively. + - `--unique, -u`: Return the input values that occur once only. ## Input/output types: @@ -35,7 +35,7 @@ contributors: false | list<any> | list<any> | ## Examples -Return the distinct values of a list/table (remove duplicates so that each value occurs once only) +Return the distinct values of a list/table (remove duplicates so that each value occurs once only). ```nu > [2 3 3 4] | uniq ╭───┬───╮ @@ -46,7 +46,7 @@ Return the distinct values of a list/table (remove duplicates so that each value ``` -Return the input values that occur more than once +Return the input values that occur more than once. ```nu > [1 2 2] | uniq -d ╭───┬───╮ @@ -55,7 +55,7 @@ Return the input values that occur more than once ``` -Return the input values that occur once only +Return the input values that occur once only. ```nu > [1 2 2] | uniq --unique ╭───┬───╮ @@ -64,7 +64,7 @@ Return the input values that occur once only ``` -Ignore differences in case when comparing input values +Ignore differences in case when comparing input values. ```nu > ['hello' 'goodbye' 'Hello'] | uniq --ignore-case ╭───┬─────────╮ @@ -74,7 +74,7 @@ Ignore differences in case when comparing input values ``` -Return a table containing the distinct input values together with their counts +Return a table containing the distinct input values together with their counts. ```nu > [1 2 2] | uniq --count ╭───┬───────┬───────╮ diff --git a/commands/docs/unlet.md b/commands/docs/unlet.md index 509bca28698..901733a3adb 100644 --- a/commands/docs/unlet.md +++ b/commands/docs/unlet.md @@ -2,7 +2,7 @@ title: unlet categories: | experimental -version: 0.110.0 +version: 0.111.0 experimental: | Delete variables from nushell memory, making them unrecoverable. usage: | @@ -32,25 +32,25 @@ contributors: false | nothing | nothing | ## Examples -Delete a variable from memory +Delete a variable from memory. ```nu > let x = 42; unlet $x ``` -Delete multiple variables from memory +Delete multiple variables from memory. ```nu > let x = 1; let y = 2; unlet $x $y ``` -Attempting to delete a built-in variable fails +Attempting to delete a built-in variable fails. ```nu > unlet $nu ``` -Attempting to delete a non-variable fails +Attempting to delete a non-variable fails. ```nu > unlet 42 diff --git a/commands/docs/update.md b/commands/docs/update.md index d71106236a8..b7b459012cc 100644 --- a/commands/docs/update.md +++ b/commands/docs/update.md @@ -2,7 +2,7 @@ title: update categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Update an existing column to have a new value. usage: | @@ -35,7 +35,7 @@ contributors: false | list<any> | list<any> | ## Examples -Update a column value +Update a column value. ```nu > {'name': 'nu', 'stars': 5} | update name 'Nushell' ╭───────┬─────────╮ @@ -44,7 +44,7 @@ Update a column value ╰───────┴─────────╯ ``` -Use a closure to alter each value in the 'authors' column to a single string +Use a closure to alter each value in the 'authors' column to a single string. ```nu > [[project, authors]; ['nu', ['Andrés', 'JT', 'Yehuda']]] | update authors {|row| $row.authors | str join ',' } ╭───┬─────────┬──────────────────╮ @@ -55,7 +55,7 @@ Use a closure to alter each value in the 'authors' column to a single string ``` -Implicitly use the `$in` value in a closure to update 'authors' +Implicitly use the `$in` value in a closure to update 'authors'. ```nu > [[project, authors]; ['nu', ['Andrés', 'JT', 'Yehuda']]] | update authors { str join ',' } ╭───┬─────────┬──────────────────╮ @@ -66,7 +66,7 @@ Implicitly use the `$in` value in a closure to update 'authors' ``` -Update a value at an index in a list +Update a value at an index in a list. ```nu > [1 2 3] | update 1 4 ╭───┬───╮ @@ -77,7 +77,7 @@ Update a value at an index in a list ``` -Use a closure to compute a new value at an index +Use a closure to compute a new value at an index. ```nu > [1 2 3] | update 1 {|i| $i + 2 } ╭───┬───╮ diff --git a/commands/docs/update_cells.md b/commands/docs/update_cells.md index ac60a4dffaa..5cd8b7f004a 100644 --- a/commands/docs/update_cells.md +++ b/commands/docs/update_cells.md @@ -2,7 +2,7 @@ title: update cells categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Update the table cells. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--columns, -c {list}`: list of columns to update + - `--columns, -c {list}`: List of columns to update. ## Parameters diff --git a/commands/docs/upsert.md b/commands/docs/upsert.md index c3dd789071e..8a2d3824dc2 100644 --- a/commands/docs/upsert.md +++ b/commands/docs/upsert.md @@ -2,7 +2,7 @@ title: upsert categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Update an existing column to have a new value, or insert a new column. usage: | @@ -35,7 +35,7 @@ contributors: false | list<any> | list<any> | ## Examples -Update a record's value +Update a record's value. ```nu > {'name': 'nu', 'stars': 5} | upsert name 'Nushell' ╭───────┬─────────╮ @@ -44,7 +44,7 @@ Update a record's value ╰───────┴─────────╯ ``` -Insert a new entry into a record +Insert a new entry into a record. ```nu > {'name': 'nu', 'stars': 5} | upsert language 'Rust' ╭──────────┬──────╮ @@ -54,7 +54,7 @@ Insert a new entry into a record ╰──────────┴──────╯ ``` -Update each row of a table +Update each row of a table. ```nu > [[name lang]; [Nushell ''] [Reedline '']] | upsert lang 'Rust' ╭───┬──────────┬──────╮ @@ -66,7 +66,7 @@ Update each row of a table ``` -Insert a new column with values computed based off the other columns +Insert a new column with values computed based off the other columns. ```nu > [[foo]; [7] [8] [9]] | upsert bar {|row| $row.foo * 2 } ╭───┬─────┬─────╮ @@ -79,7 +79,7 @@ Insert a new column with values computed based off the other columns ``` -Update null values in a column to a default value +Update null values in a column to a default value. ```nu > [[foo]; [2] [null] [4]] | upsert foo { default 0 } ╭───┬─────╮ @@ -92,7 +92,7 @@ Update null values in a column to a default value ``` -Upsert into a list, updating an existing value at an index +Upsert into a list, updating an existing value at an index. ```nu > [1 2 3] | upsert 0 2 ╭───┬───╮ @@ -103,7 +103,7 @@ Upsert into a list, updating an existing value at an index ``` -Upsert into a list, inserting a new value at the end +Upsert into a list, inserting a new value at the end. ```nu > [1 2 3] | upsert 3 4 ╭───┬───╮ @@ -115,7 +115,7 @@ Upsert into a list, inserting a new value at the end ``` -Upsert into a nested path, creating new values as needed +Upsert into a nested path, creating new values as needed. ```nu > [{} {a: [{}]}] | upsert a.0.b "value" ╭───┬───────────────╮ diff --git a/commands/docs/url.md b/commands/docs/url.md index 5385bede06f..779604f8c6d 100644 --- a/commands/docs/url.md +++ b/commands/docs/url.md @@ -2,7 +2,7 @@ title: url categories: | network -version: 0.110.0 +version: 0.111.0 network: | Various commands for working with URLs. usage: | @@ -36,6 +36,6 @@ You must use one of the following subcommands. Using this command as-is will onl | [`url build-query`](/commands/docs/url_build-query.md) | Converts record or table into query string applying percent-encoding. | built-in | | [`url decode`](/commands/docs/url_decode.md) | Converts a percent-encoded web safe string to a string. | built-in | | [`url encode`](/commands/docs/url_encode.md) | Converts a string to a percent encoded web safe string. | built-in | -| [`url join`](/commands/docs/url_join.md) | Converts a record to url. | built-in | -| [`url parse`](/commands/docs/url_parse.md) | Parses a url. | built-in | +| [`url join`](/commands/docs/url_join.md) | Convert a record to a URL string. | built-in | +| [`url parse`](/commands/docs/url_parse.md) | Parse a URL string into structured data. | built-in | | [`url split-query`](/commands/docs/url_split-query.md) | Converts query string into table applying percent-decoding. | built-in | \ No newline at end of file diff --git a/commands/docs/url_build-query.md b/commands/docs/url_build-query.md index 443d7b23f54..b670af3f826 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.110.0 +version: 0.111.0 network: | Converts record or table into query string applying percent-encoding. usage: | @@ -29,25 +29,25 @@ contributors: false | table<key: any, value: any> | string | ## Examples -Outputs a query string representing the contents of this record +Outputs a query string representing the contents of this record. ```nu > { mode:normal userid:31415 } | url build-query mode=normal&userid=31415 ``` -Outputs a query string representing the contents of this record, with a value that needs to be url-encoded +Outputs a query string representing the contents of this record, with a value that needs to be URL-encoded. ```nu > {a:"AT&T", b: "AT T"} | url build-query a=AT%26T&b=AT+T ``` -Outputs a query string representing the contents of this record, "exploding" the list into multiple parameters +Outputs a query string representing the contents of this record, "exploding" the list into multiple parameters. ```nu > {a: ["one", "two"], b: "three"} | url build-query a=one&a=two&b=three ``` -Outputs a query string representing the contents of this table containing key-value pairs +Outputs a query string representing the contents of this table containing key-value pairs. ```nu > [[key, value]; [a, one], [a, two], [b, three], [a, four]] | url build-query a=one&a=two&b=three&a=four diff --git a/commands/docs/url_decode.md b/commands/docs/url_decode.md index 8b30404037f..54515fdbb97 100644 --- a/commands/docs/url_decode.md +++ b/commands/docs/url_decode.md @@ -2,7 +2,7 @@ title: url decode categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Converts a percent-encoded web safe string to a string. usage: | @@ -35,13 +35,13 @@ contributors: false | record | record | ## Examples -Decode a url with escape characters +Decode a URL with escape characters. ```nu > 'https://example.com/foo%20bar' | url decode https://example.com/foo bar ``` -Decode multiple urls with escape characters in list +Decode multiple URLs with escape characters in list. ```nu > ['https://example.com/foo%20bar' 'https://example.com/a%3Eb' '%E4%B8%AD%E6%96%87%E5%AD%97/eng/12%2034'] | url decode ╭───┬─────────────────────────────╮ diff --git a/commands/docs/url_encode.md b/commands/docs/url_encode.md index 9c67142f9ff..49411504350 100644 --- a/commands/docs/url_encode.md +++ b/commands/docs/url_encode.md @@ -2,7 +2,7 @@ title: url encode categories: | strings -version: 0.110.0 +version: 0.111.0 strings: | Converts a string to a percent encoded web safe string. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--all, -a`: encode all non-alphanumeric chars including `/`, `.`, `:` + - `--all, -a`: Encode all non-alphanumeric chars including `/`, `.`, `:`. ## Parameters @@ -39,13 +39,13 @@ contributors: false | record | record | ## Examples -Encode a url with escape characters +Encode a URL with escape characters. ```nu > 'https://example.com/foo bar' | url encode https://example.com/foo%20bar ``` -Encode multiple urls with escape characters in list +Encode multiple URLs with escape characters in list. ```nu > ['https://example.com/foo bar' 'https://example.com/a>b' '中文字/eng/12 34'] | url encode ╭───┬─────────────────────────────────────────╮ @@ -56,7 +56,7 @@ Encode multiple urls with escape characters in list ``` -Encode all non alphanumeric chars with all flag +Encode all non alphanumeric chars with all flag. ```nu > 'https://example.com/foo bar' | url encode --all https%3A%2F%2Fexample%2Ecom%2Ffoo%20bar diff --git a/commands/docs/url_join.md b/commands/docs/url_join.md index bfde71c208c..6436ce56fe3 100644 --- a/commands/docs/url_join.md +++ b/commands/docs/url_join.md @@ -2,11 +2,11 @@ title: url join categories: | network -version: 0.110.0 +version: 0.111.0 network: | - Converts a record to url. + Convert a record to a URL string. usage: | - Converts a record to url. + Convert a record to a URL string. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `url join` for [network](/commands/categories/network.md) -
Converts a record to url.
+
Convert a record to a URL string.
## Signature @@ -28,7 +28,7 @@ contributors: false | record | string | ## Examples -Outputs a url representing the contents of this record, `params` and `query` fields must be equivalent +Outputs a URL representing the contents of this record, `params` and `query` fields must be equivalent. ```nu > { "scheme": "http", @@ -48,7 +48,7 @@ Outputs a url representing the contents of this record, `params` and `query` fie http://www.pixiv.net/member_illust.php?mode=medium&illust_id=99260204 ``` -Outputs a url representing the contents of this record, "exploding" the list in `params` into multiple parameters +Outputs a URL representing the contents of this record, "exploding" the list in `params` into multiple parameters. ```nu > { "scheme": "http", @@ -62,7 +62,7 @@ Outputs a url representing the contents of this record, "exploding" the list in http://user:pwd@www.pixiv.net:1234?a=one&a=two&b=three ``` -Outputs a url representing the contents of this record +Outputs a URL representing the contents of this record. ```nu > { "scheme": "http", @@ -76,7 +76,7 @@ Outputs a url representing the contents of this record http://user:pwd@www.pixiv.net:1234?test=a ``` -Outputs a url representing the contents of this record +Outputs a URL representing the contents of this record. ```nu > { "scheme": "http", diff --git a/commands/docs/url_parse.md b/commands/docs/url_parse.md index 3f94ed37302..426c8bd6303 100644 --- a/commands/docs/url_parse.md +++ b/commands/docs/url_parse.md @@ -2,11 +2,11 @@ title: url parse categories: | network -version: 0.110.0 +version: 0.111.0 network: | - Parses a url. + Parse a URL string into structured data. usage: | - Parses a url. + Parse a URL string into structured data. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `url parse` for [network](/commands/categories/network.md) -
Parses a url.
+
Parse a URL string into structured data.
## Signature @@ -34,7 +34,7 @@ contributors: false | record | record | ## Examples -Parses a url +Parses a URL. ```nu > 'http://user123:pass567@www.example.com:8081/foo/bar?param1=section&p2=&f[name]=vldc&f[no]=42#hello' | url parse ╭──────────┬──────────────────────────────────────────╮ diff --git a/commands/docs/url_split-query.md b/commands/docs/url_split-query.md index 848d0c28a84..9436c989cb9 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.110.0 +version: 0.111.0 network: | Converts query string into table applying percent-decoding. usage: | @@ -28,7 +28,7 @@ contributors: false | string | table<key: string, value: string> | ## Examples -Outputs a table representing the contents of this query string +Outputs a table representing the contents of this query string. ```nu > "mode=normal&userid=31415" | url split-query ╭───┬────────┬────────╮ @@ -40,7 +40,7 @@ Outputs a table representing the contents of this query string ``` -Outputs a table representing the contents of this query string, url-decoding the values +Outputs a table representing the contents of this query string, url-decoding the values. ```nu > "a=AT%26T&b=AT+T" | url split-query ╭───┬─────┬───────╮ @@ -52,7 +52,7 @@ Outputs a table representing the contents of this query string, url-decoding the ``` -Outputs a table representing the contents of this query string +Outputs a table representing the contents of this query string. ```nu > "a=one&a=two&b=three" | url split-query ╭───┬─────┬───────╮ diff --git a/commands/docs/use.md b/commands/docs/use.md index 5d704653a7f..dfc9558fde6 100644 --- a/commands/docs/use.md +++ b/commands/docs/use.md @@ -2,7 +2,7 @@ title: use categories: | core -version: 0.110.0 +version: 0.111.0 core: | Use definitions from a module, making them available in your shell. usage: | @@ -33,37 +33,37 @@ contributors: false | nothing | nothing | ## Examples -Define a custom command in a module and call it +Define a custom command in a module and call it. ```nu > module spam { export def foo [] { "foo" } }; use spam foo; foo foo ``` -Define a custom command that participates in the environment in a module and call it +Define a custom command that participates in the environment in a module and call it. ```nu > module foo { export def --env bar [] { $env.FOO_BAR = "BAZ" } }; use foo bar; bar; $env.FOO_BAR BAZ ``` -Use a plain module name to import its definitions qualified by the module name +Use a plain module name to import its definitions qualified by the module name. ```nu > module spam { export def foo [] { "foo" }; export def bar [] { "bar" } }; use spam; (spam foo) + (spam bar) foobar ``` -Specify * to use all definitions in a module +Specify * to use all definitions in a module. ```nu > module spam { export def foo [] { "foo" }; export def bar [] { "bar" } }; use spam *; (foo) + (bar) foobar ``` -To use commands with spaces, like subcommands, surround them with quotes +To use commands with spaces, like subcommands, surround them with quotes. ```nu > module spam { export def 'foo bar' [] { "baz" } }; use spam 'foo bar'; foo bar baz ``` -To use multiple definitions from a module, wrap them in a list +To use multiple definitions from a module, wrap them in a list. ```nu > module spam { export def foo [] { "foo" }; export def 'foo bar' [] { "baz" } }; use spam ['foo', 'foo bar']; (foo) + (foo bar) foobaz diff --git a/commands/docs/values.md b/commands/docs/values.md index ee84e86a890..214a8714193 100644 --- a/commands/docs/values.md +++ b/commands/docs/values.md @@ -2,7 +2,7 @@ title: values categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Given a record or table, produce a list of its columns' values. usage: | @@ -29,7 +29,7 @@ contributors: false | table | list<any> | ## Examples -Get the values from the record (produce a list) +Get the values from the record (produce a list). ```nu > { mode:normal userid:31415 } | values ╭───┬────────╮ @@ -39,7 +39,7 @@ Get the values from the record (produce a list) ``` -Values are ordered by the column order of the record +Values are ordered by the column order of the record. ```nu > { f:250 g:191 c:128 d:1024 e:2000 a:16 b:32 } | values ╭───┬──────╮ @@ -54,7 +54,7 @@ Values are ordered by the column order of the record ``` -Get the values from the table (produce a list of lists) +Get the values from the table (produce a list of lists). ```nu > [[name meaning]; [ls list] [mv move] [cd 'change directory']] | values ╭───┬──────────────────────────╮ diff --git a/commands/docs/version.md b/commands/docs/version.md index c4e71b1850b..16bfcdee4c4 100644 --- a/commands/docs/version.md +++ b/commands/docs/version.md @@ -2,7 +2,7 @@ title: version categories: | core -version: 0.110.0 +version: 0.111.0 core: | Display Nu version, and its build configuration. usage: | @@ -28,7 +28,7 @@ contributors: false | nothing | record | ## Examples -Display Nu version +Display Nu version. ```nu > version diff --git a/commands/docs/version_check.md b/commands/docs/version_check.md index f7b19ed5923..9a1e02c4f16 100644 --- a/commands/docs/version_check.md +++ b/commands/docs/version_check.md @@ -2,7 +2,7 @@ title: version check categories: | platform -version: 0.110.0 +version: 0.111.0 platform: | Checks to see if you have the latest version of nushell. usage: | diff --git a/commands/docs/view.md b/commands/docs/view.md index aca706b6b76..300f958bd70 100644 --- a/commands/docs/view.md +++ b/commands/docs/view.md @@ -2,7 +2,7 @@ title: view categories: | debug -version: 0.110.0 +version: 0.111.0 debug: | Various commands for viewing debug information. usage: | diff --git a/commands/docs/view_blocks.md b/commands/docs/view_blocks.md index c3221dff416..5745206b33a 100644 --- a/commands/docs/view_blocks.md +++ b/commands/docs/view_blocks.md @@ -2,7 +2,7 @@ title: view blocks categories: | debug -version: 0.110.0 +version: 0.111.0 debug: | View the blocks registered in nushell's EngineState memory. usage: | @@ -28,7 +28,7 @@ contributors: false | nothing | table<block_id: int, content: string, start: int, end: int> | ## Examples -View the blocks registered in Nushell's EngineState memory +View the blocks registered in Nushell's EngineState memory. ```nu > view blocks diff --git a/commands/docs/view_files.md b/commands/docs/view_files.md index 16be7a80453..220fd7e7acd 100644 --- a/commands/docs/view_files.md +++ b/commands/docs/view_files.md @@ -2,7 +2,7 @@ title: view files categories: | debug -version: 0.110.0 +version: 0.111.0 debug: | View the files registered in nushell's EngineState memory. usage: | @@ -28,13 +28,13 @@ contributors: false | nothing | table<filename: string, start: int, end: int, size: int> | ## Examples -View the files registered in Nushell's EngineState memory +View the files registered in Nushell's EngineState memory. ```nu > view files ``` -View how Nushell was originally invoked +View how Nushell was originally invoked. ```nu > view files | get 0 diff --git a/commands/docs/view_ir.md b/commands/docs/view_ir.md index 73d22249a98..eda8bced479 100644 --- a/commands/docs/view_ir.md +++ b/commands/docs/view_ir.md @@ -2,7 +2,7 @@ title: view ir categories: | debug -version: 0.110.0 +version: 0.111.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 62b1f08475c..9af0b3490f1 100644 --- a/commands/docs/view_source.md +++ b/commands/docs/view_source.md @@ -2,7 +2,7 @@ title: view source categories: | debug -version: 0.110.0 +version: 0.111.0 debug: | View a block, module, or a definition. usage: | @@ -32,38 +32,50 @@ contributors: false | nothing | string | ## Examples -View the source of a code block +View the source of a code block. ```nu > let abc = {|| echo 'hi' }; view source $abc {|| echo 'hi' } ``` -View the source of a custom command +View the source of a custom command. ```nu > def hi [] { echo 'Hi!' }; view source hi def hi [] { echo 'Hi!' } ``` -View the source of a custom command, which participates in the caller environment +View the source of a custom command, which participates in the caller environment. ```nu > def --env foo [] { $env.BAR = 'BAZ' }; view source foo -def foo [] { $env.BAR = 'BAZ' } +def --env foo [] { $env.BAR = 'BAZ' } ``` -View the source of a custom command with flags and arguments +View the source of a custom command with flags. +```nu +> def --wrapped --env foo [...rest: string] { print $rest }; view source foo +def --env --wrapped foo [ ...rest: string] { print $rest } +``` + +View the source of a custom command with flags and arguments. ```nu > def test [a?:any --b:int ...rest:string] { echo 'test' }; view source test def test [ a?: any --b: int ...rest: string] { echo 'test' } ``` -View the source of a module +View the source of a module. ```nu > module mod-foo { export-env { $env.FOO_ENV = 'BAZ' } }; view source mod-foo export-env { $env.FOO_ENV = 'BAZ' } ``` -View the source of an alias +View the source of an alias. ```nu > alias hello = echo hi; view source hello echo hi ``` + +View the file where a definition lives via metadata. +```nu +> view source some_command | metadata + +``` diff --git a/commands/docs/view_span.md b/commands/docs/view_span.md index a047c9a1e41..5067d5ad0bb 100644 --- a/commands/docs/view_span.md +++ b/commands/docs/view_span.md @@ -2,7 +2,7 @@ title: view span categories: | debug -version: 0.110.0 +version: 0.111.0 debug: | View the contents of a span. usage: | @@ -33,7 +33,7 @@ contributors: false | nothing | string | ## Examples -View the source of a span. 1 and 2 are just example values. Use the return of debug --raw to get the actual values +View the source of a span. 1 and 2 are just example values. Use the return of debug --raw to get the actual values. ```nu > some | pipeline | or | variable | debug --raw; view span 1 2 diff --git a/commands/docs/watch.md b/commands/docs/watch.md index 213abc03120..f6127ae18ba 100644 --- a/commands/docs/watch.md +++ b/commands/docs/watch.md @@ -2,7 +2,7 @@ title: watch categories: | filesystem -version: 0.110.0 +version: 0.111.0 filesystem: | Watch for file changes and execute Nu code when they happen. usage: | @@ -22,12 +22,12 @@ contributors: false ## Flags - - `--debounce-ms, -d {int}`: Debounce changes for this many milliseconds (default: 100). Adjust if you find that single writes are reported as multiple events (deprecated) - - `--debounce {duration}`: Debounce changes for this duration (default: 100ms). Adjust if you find that single writes are reported as multiple events + - `--debounce-ms, -d {int}`: Debounce changes for this many milliseconds (default: 100). Adjust if you find that single writes are reported as multiple events (deprecated). + - `--debounce {duration}`: Debounce changes for this duration (default: 100ms). Adjust if you find that single writes are reported as multiple events. - `--glob, -g {string}`: Only report changes for files that match this glob pattern (default: all files) - - `--recursive, -r {bool}`: Watch all directories under `` recursively. Will be ignored if `` is a file (default: true) - - `--quiet, -q`: Hide the initial status message (default: false) - - `--verbose, -v`: Operate in verbose mode (default: false) + - `--recursive, -r {bool}`: Watch all directories under `` recursively. Will be ignored if `` is a file (default: true). + - `--quiet, -q`: Hide the initial status message (default: false). + - `--verbose, -v`: Operate in verbose mode (default: false). ## Parameters @@ -43,13 +43,13 @@ contributors: false | nothing | table<operation: string, path: string, new_path: string> | ## Examples -Run `cargo test` whenever a Rust file changes +Run `cargo test` whenever a Rust file changes. ```nu > watch . --glob=**/*.rs {|| cargo test } ``` -Watch all changes in the current directory +Watch all changes in the current directory. ```nu > watch . { |op, path, new_path| $"($op) ($path) ($new_path)"} @@ -66,13 +66,13 @@ Watch all changes in the current directory ``` -Print file changes with a debounce time of 5 minutes +Print file changes with a debounce time of 5 minutes. ```nu > watch /foo/bar --debounce 5min { |op, path| $"Registered ($op) on ($path)" | print } ``` -Note: if you are looking to run a command every N units of time, this can be accomplished with a loop and sleep +Note: if you are looking to run a command every N units of time, this can be accomplished with a loop and sleep. ```nu > loop { command; sleep duration } diff --git a/commands/docs/where.md b/commands/docs/where.md index 224de2ca8d2..4b6af73a1c1 100644 --- a/commands/docs/where.md +++ b/commands/docs/where.md @@ -2,7 +2,7 @@ title: where categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Filter values of an input list based on a condition. usage: | @@ -34,7 +34,7 @@ contributors: false | range | any | ## Examples -Filter rows of a table according to a condition +Filter rows of a table according to a condition. ```nu > [{a: 1} {a: 2}] | where a > 1 ╭───┬───╮ @@ -45,31 +45,31 @@ Filter rows of a table according to a condition ``` -List only the files in the current directory +List only the files in the current directory. ```nu > ls | where type == file ``` -List all files in the current directory with sizes greater than 2kb +List all files in the current directory with sizes greater than 2kb. ```nu > ls | where size > 2kb ``` -List all files with names that contain "Car" +List all files with names that contain "Car". ```nu > ls | where name =~ "Car" ``` -List all files that were modified in the last two weeks +List all files that were modified in the last two weeks. ```nu > ls | where modified >= (date now) - 2wk ``` -Filter items of a list with a row condition +Filter items of a list with a row condition. ```nu > [1 2 3 4 5] | where $it > 2 ╭───┬───╮ @@ -80,7 +80,7 @@ Filter items of a list with a row condition ``` -Filter items of a list with a closure +Filter items of a list with a closure. ```nu > [1 2 3 4 5] | where {|x| $x > 2 } ╭───┬───╮ @@ -91,25 +91,25 @@ Filter items of a list with a closure ``` -Find files whose filenames don't begin with the correct sequential number +Find files whose filenames don't begin with the correct sequential number. ```nu > ls | where type == file | sort-by name --natural | enumerate | where {|e| $e.item.name !~ $'^($e.index + 1)' } | get item ``` -Find case-insensitively files called "readme", with a subexpression inside the row condition +Find case-insensitively files called "readme", with a subexpression inside the row condition. ```nu > ls | where ($it.name | str downcase) =~ readme ``` -Find case-insensitively files called "readme", with regex only +Find case-insensitively files called "readme", with regex only. ```nu > ls | where name =~ '(?i)readme' ``` -Filter rows of a table according to a stored condition +Filter rows of a table according to a stored condition. ```nu > let cond = {|x| $x.a > 1}; [{a: 1} {a: 2}] | where $cond ╭───┬───╮ @@ -120,7 +120,7 @@ Filter rows of a table according to a stored condition ``` -List all numbers above 3, using an existing closure condition +List all numbers above 3, using an existing closure condition. ```nu > let a = {$in > 3}; [1, 2, 5, 6] | where $a ╭───┬───╮ diff --git a/commands/docs/which.md b/commands/docs/which.md index f0b89901aa8..d144b9dc387 100644 --- a/commands/docs/which.md +++ b/commands/docs/which.md @@ -2,7 +2,7 @@ title: which categories: | system -version: 0.110.0 +version: 0.111.0 system: | Finds a program file, alias or custom command. If `application` is not provided, all deduplicated commands will be returned. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--all, -a`: list all executables + - `--all, -a`: List all executables. ## Parameters diff --git a/commands/docs/while.md b/commands/docs/while.md index 2038a997304..e998ce5ae5b 100644 --- a/commands/docs/while.md +++ b/commands/docs/while.md @@ -2,7 +2,7 @@ title: while categories: | core -version: 0.110.0 +version: 0.111.0 core: | Conditionally run a block in a loop. usage: | @@ -33,7 +33,7 @@ contributors: false | nothing | nothing | ## Examples -Loop while a condition is true +Loop while a condition is true. ```nu > mut x = 0; while $x < 10 { $x = $x + 1 } diff --git a/commands/docs/whoami.md b/commands/docs/whoami.md index e0c73be77cd..1f25ca9fa79 100644 --- a/commands/docs/whoami.md +++ b/commands/docs/whoami.md @@ -2,7 +2,7 @@ title: whoami categories: | platform -version: 0.110.0 +version: 0.111.0 platform: | Get the current username using uutils/coreutils whoami. usage: | @@ -28,7 +28,7 @@ contributors: false | nothing | string | ## Examples -Get the current username +Get the current username. ```nu > whoami diff --git a/commands/docs/window.md b/commands/docs/window.md index aff325b4b69..2214777b745 100644 --- a/commands/docs/window.md +++ b/commands/docs/window.md @@ -2,7 +2,7 @@ title: window categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Creates a sliding window of `window_size` that slide by n rows/elements across input. usage: | @@ -22,8 +22,8 @@ contributors: false ## Flags - - `--stride, -s {int}`: the number of rows to slide over between windows - - `--remainder, -r`: yield last chunks even if they have fewer elements than size + - `--stride, -s {int}`: The number of rows to slide over between windows. + - `--remainder, -r`: Yield last chunks even if they have fewer elements than size. ## Parameters @@ -37,7 +37,7 @@ contributors: false | list<any> | list<list<any>> | ## Examples -A sliding window of two elements +A sliding window of two elements. ```nu > [1 2 3 4] | window 2 ╭───┬───────────╮ @@ -57,7 +57,7 @@ A sliding window of two elements ``` -A sliding window of two elements, with a stride of 3 +A sliding window of two elements, with a stride of 3. ```nu > [1, 2, 3, 4, 5, 6, 7, 8] | window 2 --stride 3 ╭───┬───────────╮ @@ -77,7 +77,7 @@ A sliding window of two elements, with a stride of 3 ``` -A sliding window of equal stride that includes remainder. Equivalent to chunking +A sliding window of equal stride that includes remainder. Equivalent to chunking. ```nu > [1, 2, 3, 4, 5] | window 3 --stride 3 --remainder ╭───┬───────────╮ diff --git a/commands/docs/with-env.md b/commands/docs/with-env.md index afe7a7ed47e..b08630815ce 100644 --- a/commands/docs/with-env.md +++ b/commands/docs/with-env.md @@ -2,7 +2,7 @@ title: with-env categories: | env -version: 0.110.0 +version: 0.111.0 env: | Runs a block with an environment variable set. usage: | @@ -33,7 +33,7 @@ contributors: false | any | any | ## Examples -Set by key-value record +Set by key-value record. ```nu > with-env {X: "Y", W: "Z"} { [$env.X $env.W] } ╭───┬───╮ diff --git a/commands/docs/wrap.md b/commands/docs/wrap.md index cb783e8a390..3601b1d3729 100644 --- a/commands/docs/wrap.md +++ b/commands/docs/wrap.md @@ -2,7 +2,7 @@ title: wrap categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Wrap the value into a column. usage: | @@ -34,7 +34,7 @@ contributors: false | any | record | ## Examples -Wrap a list into a table with a given column name +Wrap a list into a table with a given column name. ```nu > [ Pachisi Mahjong Catan Carcassonne ] | wrap game ╭───┬─────────────╮ @@ -48,7 +48,7 @@ Wrap a list into a table with a given column name ``` -Wrap a range into a table with a given column name +Wrap a range into a table with a given column name. ```nu > 4..6 | wrap num ╭───┬─────╮ diff --git a/commands/docs/zip.md b/commands/docs/zip.md index 368a235c1dc..31bc1bbec6b 100644 --- a/commands/docs/zip.md +++ b/commands/docs/zip.md @@ -2,7 +2,7 @@ title: zip categories: | filters -version: 0.110.0 +version: 0.111.0 filters: | Combine a stream with the input. usage: | @@ -33,7 +33,7 @@ contributors: false | range | list<list<any>> | ## Examples -Zip two lists +Zip two lists. ```nu > [1 2] | zip [3 4] ╭───┬───────────╮ @@ -49,7 +49,7 @@ Zip two lists ``` -Zip two ranges +Zip two ranges. ```nu > 1..3 | zip 4..6 ╭───┬───────────╮ @@ -69,7 +69,7 @@ Zip two ranges ``` -Zip two streams +Zip two streams. ```nu > seq 1 3 | zip { seq 4 600000000 } ╭───┬───────────╮ @@ -89,7 +89,7 @@ Zip two streams ``` -Rename .ogg files to match an existing list of filenames +Rename .ogg files to match an existing list of filenames. ```nu > glob *.ogg | zip ['bang.ogg', 'fanfare.ogg', 'laser.ogg'] | each {|| mv $in.0 $in.1 } diff --git a/make_docs.nu b/make_docs.nu index 923ee54cde6..b86efd95755 100644 --- a/make_docs.nu +++ b/make_docs.nu @@ -30,7 +30,7 @@ def plugin-paths [ nu_path?: path ] { # get all command names from a clean scope def command-names [] { let plugins = (plugin-paths) - nu --no-config-file --plugins ($plugins | to nuon) --commands $'scope commands | select name | to json' + nu --no-config-file --plugins ...$plugins --commands $'scope commands | select name | to json' | from json } @@ -62,7 +62,7 @@ def make_docs [ ] { let $nu_path = ($nu_path | default $nu.current-exe) let plugins = (plugin-paths $nu_path) - run-external $nu_path "--no-config-file" $"--plugins ($plugins | to nuon)" "make_docs.nu" + run-external $nu_path "--no-config-file" "--plugins" ...$plugins "make_docs.nu" } # generate the YAML frontmatter of a command From e0d5525ce2b8bdff3f43694e617f81de1b067f92 Mon Sep 17 00:00:00 2001 From: hustcer Date: Thu, 26 Feb 2026 21:51:23 +0800 Subject: [PATCH 2/4] Refresh command docs for 0.111 --- commands/docs/registry.md | 2 +- commands/docs/registry_query.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/docs/registry.md b/commands/docs/registry.md index 582e004594c..4e2e1f89319 100644 --- a/commands/docs/registry.md +++ b/commands/docs/registry.md @@ -2,7 +2,7 @@ title: registry categories: | system -version: 0.109.0 +version: 0.111.0 system: | Various commands for interacting with the system registry (Windows only). usage: | diff --git a/commands/docs/registry_query.md b/commands/docs/registry_query.md index 9a717908853..edb4efc98b9 100644 --- a/commands/docs/registry_query.md +++ b/commands/docs/registry_query.md @@ -2,7 +2,7 @@ title: registry query categories: | system -version: 0.109.0 +version: 0.111.0 system: | Query the Windows registry. usage: | From 3cc386ab03ab572e9f032f8ec0a3f6f45af4c984 Mon Sep 17 00:00:00 2001 From: hustcer Date: Fri, 27 Feb 2026 20:39:19 +0800 Subject: [PATCH 3/4] Refresh command docs for 0.111 --- commands/docs/clip.md | 10 +++++----- commands/docs/clip_paste.md | 10 +++++----- commands/docs/into_datetime.md | 12 ++++++------ commands/docs/polars_filter.md | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/commands/docs/clip.md b/commands/docs/clip.md index 0ca210c8900..cd5c3426ac9 100644 --- a/commands/docs/clip.md +++ b/commands/docs/clip.md @@ -29,9 +29,9 @@ contributors: false ## Subcommands: -| name | description | type | -| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| [`clip copy`](/commands/docs/clip_copy.md) | Copy the input into the clipboard. | built-in | +| name | description | type | +| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | +| [`clip copy`](/commands/docs/clip_copy.md) | Copy the input into the clipboard. | built-in | | [`clip paste`](/commands/docs/clip_paste.md) | Output the current clipboard content. - By default, it tries to parse clipboard content as JSON and outputs the corresponding Nushell value. - This behavior can be inverted using `$env.config.clip.default_raw = true`. | built-in | \ No newline at end of file + By default, it tries to parse clipboard content as JSON and outputs the corresponding Nushell value. + This behavior can be inverted using `$env.config.clip.default_raw = true`. | built-in | \ No newline at end of file diff --git a/commands/docs/clip_paste.md b/commands/docs/clip_paste.md index 13a0ff51316..30d929f9035 100644 --- a/commands/docs/clip_paste.md +++ b/commands/docs/clip_paste.md @@ -5,12 +5,12 @@ categories: | version: 0.111.0 system: | Output the current clipboard content. - By default, it tries to parse clipboard content as JSON and outputs the corresponding Nushell value. - This behavior can be inverted using `$env.config.clip.default_raw = true`. + By default, it tries to parse clipboard content as JSON and outputs the corresponding Nushell value. + This behavior can be inverted using `$env.config.clip.default_raw = true`. usage: | Output the current clipboard content. - By default, it tries to parse clipboard content as JSON and outputs the corresponding Nushell value. - This behavior can be inverted using `$env.config.clip.default_raw = true`. + By default, it tries to parse clipboard content as JSON and outputs the corresponding Nushell value. + This behavior can be inverted using `$env.config.clip.default_raw = true`. editLink: false contributors: false --- @@ -18,7 +18,7 @@ contributors: false # `clip paste` for [system](/commands/categories/system.md) -
Output the current clipboard content.
By default, it tries to parse clipboard content as JSON and outputs the corresponding Nushell value.
This behavior can be inverted using `$env.config.clip.default_raw = true`.
+
Output the current clipboard content.
By default, it tries to parse clipboard content as JSON and outputs the corresponding Nushell value.
This behavior can be inverted using `$env.config.clip.default_raw = true`.
## Signature diff --git a/commands/docs/into_datetime.md b/commands/docs/into_datetime.md index d6cbffc2055..ab34ed87c52 100644 --- a/commands/docs/into_datetime.md +++ b/commands/docs/into_datetime.md @@ -50,19 +50,19 @@ contributors: false Convert timestamp string to datetime with timezone offset. ```nu > '27.02.2021 1:55 pm +0000' | into datetime -Sat, 27 Feb 2021 13:55:00 +0000 (4 years ago) +Sat, 27 Feb 2021 13:55:00 +0000 (5 years ago) ``` Convert standard timestamp string to datetime with timezone offset. ```nu > '2021-02-27T13:55:40.2246+00:00' | into datetime -Sat, 27 Feb 2021 13:55:40 +0000 (4 years ago) +Sat, 27 Feb 2021 13:55:40 +0000 (5 years ago) ``` Convert non-standard timestamp string, with timezone offset, to datetime using a custom format. ```nu > '20210227_135540+0000' | into datetime --format '%Y%m%d_%H%M%S%z' -Sat, 27 Feb 2021 13:55:40 +0000 (4 years ago) +Sat, 27 Feb 2021 13:55:40 +0000 (5 years ago) ``` Convert non-standard timestamp string, without timezone offset, to datetime with custom formatting. @@ -74,19 +74,19 @@ Fri, 16 Nov 1984 08:00:00 +0800 (41 years ago) Convert nanosecond-precision unix timestamp to a datetime with offset from UTC. ```nu > 1614434140123456789 | into datetime --offset -5 -Sat, 27 Feb 2021 13:55:40 +0000 (4 years ago) +Sat, 27 Feb 2021 13:55:40 +0000 (5 years ago) ``` Convert standard (seconds) unix timestamp to a UTC datetime. ```nu > 1614434140 | into datetime -f '%s' -Sat, 27 Feb 2021 13:55:40 +0000 (4 years ago) +Sat, 27 Feb 2021 13:55:40 +0000 (5 years ago) ``` Using a datetime as input simply returns the value. ```nu > 2021-02-27T13:55:40 | into datetime -Sat, 27 Feb 2021 13:55:40 +0000 (4 years ago) +Sat, 27 Feb 2021 13:55:40 +0000 (5 years ago) ``` Using a record as input. diff --git a/commands/docs/polars_filter.md b/commands/docs/polars_filter.md index 7e01c41b78b..88ce703f2ff 100644 --- a/commands/docs/polars_filter.md +++ b/commands/docs/polars_filter.md @@ -52,7 +52,7 @@ Filter dataframe for rows where dt is within the last 2 days of the maximum dt v ╭───┬───────────────┬─────╮ │ # │ dt │ val │ ├───┼───────────────┼─────┤ -│ 0 │ 10 months ago │ 3 │ +│ 0 │ 11 months ago │ 3 │ │ 1 │ 10 months ago │ 4 │ ╰───┴───────────────┴─────╯ From 99fe8f7ad6e2474c3551b922e0341850566a8ec4 Mon Sep 17 00:00:00 2001 From: hustcer Date: Sat, 28 Feb 2026 20:16:27 +0800 Subject: [PATCH 4/4] Refresh command docs for 0.111 --- commands/docs/clip.md | 37 ------------------------ commands/docs/clip_copy.md | 52 ---------------------------------- commands/docs/clip_paste.md | 49 -------------------------------- commands/docs/metadata_set.md | 12 ++------ commands/docs/polars_filter.md | 2 +- 5 files changed, 4 insertions(+), 148 deletions(-) delete mode 100644 commands/docs/clip.md delete mode 100644 commands/docs/clip_copy.md delete mode 100644 commands/docs/clip_paste.md diff --git a/commands/docs/clip.md b/commands/docs/clip.md deleted file mode 100644 index cd5c3426ac9..00000000000 --- a/commands/docs/clip.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: clip -categories: | - system -version: 0.111.0 -system: | - Commands for managing the clipboard. -usage: | - Commands for managing the clipboard. -editLink: false -contributors: false ---- - - -# `clip` for [system](/commands/categories/system.md) - -
Commands for managing the clipboard.
- -## Signature - -```> clip {flags} ``` - - -## Input/output types: - -| input | output | -| ------- | ------- | -| nothing | nothing | - -## Subcommands: - -| name | description | type | -| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| [`clip copy`](/commands/docs/clip_copy.md) | Copy the input into the clipboard. | built-in | -| [`clip paste`](/commands/docs/clip_paste.md) | Output the current clipboard content. - By default, it tries to parse clipboard content as JSON and outputs the corresponding Nushell value. - This behavior can be inverted using `$env.config.clip.default_raw = true`. | built-in | \ No newline at end of file diff --git a/commands/docs/clip_copy.md b/commands/docs/clip_copy.md deleted file mode 100644 index 1a9728cdfa9..00000000000 --- a/commands/docs/clip_copy.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: clip copy -categories: | - system -version: 0.111.0 -system: | - Copy the input into the clipboard. -usage: | - Copy the input into the clipboard. -editLink: false -contributors: false ---- - - -# `clip copy` for [system](/commands/categories/system.md) - -
Copy the input into the clipboard.
- -## Signature - -```> clip copy {flags} ``` - -## Flags - - - `--raw, -r`: Disable JSON serialization. - - `--show, -s`: Display copied value in the output. - - -## Input/output types: - -| input | output | -| ----- | ------ | -| any | any | -## Examples - -Copy a string to the clipboard. -```nu -> 'hello' | clip copy - -``` - -Copy a structured value and pass it through. -```nu -> $env | clip copy --show - -``` - -Copy a structured value as plain text without JSON serialization. -```nu -> $env | clip copy --raw - -``` diff --git a/commands/docs/clip_paste.md b/commands/docs/clip_paste.md deleted file mode 100644 index 30d929f9035..00000000000 --- a/commands/docs/clip_paste.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: clip paste -categories: | - system -version: 0.111.0 -system: | - Output the current clipboard content. - By default, it tries to parse clipboard content as JSON and outputs the corresponding Nushell value. - This behavior can be inverted using `$env.config.clip.default_raw = true`. -usage: | - Output the current clipboard content. - By default, it tries to parse clipboard content as JSON and outputs the corresponding Nushell value. - This behavior can be inverted using `$env.config.clip.default_raw = true`. -editLink: false -contributors: false ---- - - -# `clip paste` for [system](/commands/categories/system.md) - -
Output the current clipboard content.
By default, it tries to parse clipboard content as JSON and outputs the corresponding Nushell value.
This behavior can be inverted using `$env.config.clip.default_raw = true`.
- -## Signature - -```> clip paste {flags} ``` - -## Flags - - - `--raw, -r`: Disable JSON parsing. (act inverted if default_raw config is true). - - -## Input/output types: - -| input | output | -| ------- | ------ | -| nothing | any | -## Examples - -Paste from clipboard and try to parse JSON. -```nu -> clip paste - -``` - -Paste raw clipboard text without JSON parsing. -```nu -> clip paste --raw - -``` diff --git a/commands/docs/metadata_set.md b/commands/docs/metadata_set.md index 53dd8747291..b47b56a931b 100644 --- a/commands/docs/metadata_set.md +++ b/commands/docs/metadata_set.md @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--datasource-ls, -l`: Assign the DataSource::Ls metadata to the input. + - `--datasource-ls, -l`: (DEPRECATED) Assign the DataSource::Ls metadata to the input. - `--datasource-filepath, -f {path}`: Assign the DataSource::FilePath metadata to the input. - `--path-columns, -p {list}`: Assign path columns metadata to the input. - `--content-type, -c {string}`: Assign content type metadata to the input. @@ -40,9 +40,9 @@ contributors: false | any | any | ## Examples -Set the metadata of a table literal. +Set the metadata of a table literal so the `name` column is treated as a path. ```nu -> [[name color]; [Cargo.lock '#ff0000'] [Cargo.toml '#00ff00'] [README.md '#0000ff']] | metadata set --datasource-ls +> [[name color]; [Cargo.lock '#ff0000'] [Cargo.toml '#00ff00'] [README.md '#0000ff']] | metadata set --path-columns [name] ``` @@ -52,12 +52,6 @@ Set the metadata of a file path. ``` -Set the path columns metadata. -```nu -> glob * | wrap path | metadata set --path-columns [path] - -``` - Set the content type metadata. ```nu > 'crates' | metadata set --content-type text/plain | metadata | get content_type diff --git a/commands/docs/polars_filter.md b/commands/docs/polars_filter.md index 88ce703f2ff..996aac42f99 100644 --- a/commands/docs/polars_filter.md +++ b/commands/docs/polars_filter.md @@ -53,7 +53,7 @@ Filter dataframe for rows where dt is within the last 2 days of the maximum dt v │ # │ dt │ val │ ├───┼───────────────┼─────┤ │ 0 │ 11 months ago │ 3 │ -│ 1 │ 10 months ago │ 4 │ +│ 1 │ 11 months ago │ 4 │ ╰───┴───────────────┴─────╯ ```