From 16dd6bf7aa56bffe17d53992b9e0b53e55e15030 Mon Sep 17 00:00:00 2001 From: Jacob Lamb Date: Fri, 9 Feb 2024 18:03:09 -0800 Subject: [PATCH 01/72] Init First draft --- .gitignore | 28 +- .prettierignore | 40 +- .prettierrc | 3 - .prettierrc.mjs | 12 + .typos.toml | 8 - .vscode/extensions.json | 4 + .vscode/launch.json | 11 + .vuepress/client.js | 14 - .vuepress/components/BlogPosts.vue | 76 - .vuepress/config.js | 209 - .vuepress/configs/index.ts | 2 - .vuepress/configs/navbar/de.ts | 8 - .vuepress/configs/navbar/en.ts | 10 - .vuepress/configs/navbar/es.ts | 7 - .vuepress/configs/navbar/index.ts | 7 - .vuepress/configs/navbar/ja.ts | 8 - .vuepress/configs/navbar/pt-BR.ts | 7 - .vuepress/configs/navbar/ru.ts | 9 - .vuepress/configs/navbar/zh-CN.ts | 8 - .../configs/sidebar/command_categories.ts | 34 - .vuepress/configs/sidebar/de.ts | 76 - .vuepress/configs/sidebar/en.ts | 161 - .vuepress/configs/sidebar/es.ts | 33 - .vuepress/configs/sidebar/index.ts | 7 - .vuepress/configs/sidebar/ja.ts | 107 - .vuepress/configs/sidebar/pt-BR.ts | 24 - .vuepress/configs/sidebar/ru.ts | 110 - .vuepress/configs/sidebar/zh-CN.ts | 81 - .vuepress/public/icon.png | Bin 847 -> 0 bytes .vuepress/styles/index.scss | 46 - .vuepress/styles/palette.scss | 4 - CNAME | 1 - CONTRIBUTING.md | 4 +- astro.config.mjs | 143 + biome.json | 20 + blog/2023-08-22-nushell_0_84_0.md | 416 - blog/2023-09-19-nushell_0_85_0.md | 595 - blog/2023-12-12-nushell_0_88_0.md | 769 -- blog/2024-01-09-nushell_0_89_0.md | 444 - blog/README.md | 5 - book/cheat_sheet.md | 549 - book/design_notes.md | 7 - book/nushell_map.md | 75 - book/nushell_map_imperative.md | 76 - book/quick_tour.md | 67 - commands/docs/cp.md | 91 - de/README.md | 51 - de/book/3rdpartyprompts.md | 44 - de/book/README.md | 73 - de/book/advanced.md | 20 - de/book/aliases.md | 50 - de/book/background_task.md | 36 - de/book/coloring_and_theming.md | 497 - de/book/coming_from_bash.md | 51 - de/book/coming_to_nu.md | 10 - de/book/command_reference.md | 25 - de/book/command_signature.md | 23 - de/book/configuration.md | 105 - de/book/custom_commands.md | 285 - de/book/custom_completions.md | 177 - de/book/environment.md | 222 - de/book/escaping.md | 15 - de/book/getting_started.md | 10 - de/book/hooks.md | 285 - de/book/installation.md | 129 - de/book/loading_data.md | 205 - de/book/metadata.md | 39 - de/book/moving_around.md | 56 - de/book/nu_as_a_shell.md | 30 - de/book/nu_fundamentals.md | 20 - de/book/operators.md | 123 - de/book/overlays.md | 256 - de/book/pipeline.md | 85 - de/book/plugins.md | 17 - de/book/programming_in_nu.md | 33 - de/book/scripts.md | 96 - de/book/thinking_in_nushell.md | 139 - de/book/types_of_data.md | 308 - de/book/variables_and_subexpressions.md | 83 - de/book/working_with_lists.md | 188 - de/book/working_with_strings.md | 224 - de/book/working_with_tables.md | 337 - es/README.md | 48 - es/book/README.md | 73 - es/book/aliases.md | 34 - es/book/cargando_datos.md | 200 - es/book/configuracion.md | 137 - es/book/entorno.md | 34 - es/book/escapando.md | 15 - es/book/explorando.md | 53 - es/book/instalacion.md | 189 - es/book/llegando_de_bash.md | 50 - es/book/mapa_funcional_nushell.md | 131 - es/book/mapa_imperativo_nushell.md | 131 - es/book/mapa_nushell.md | 132 - es/book/mapa_operador_nushell.md | 24 - es/book/matematicas.md | 92 - es/book/metadatos.md | 44 - es/book/pipeline.md | 51 - es/book/plugins.md | 11 - es/book/shells_en_shells.md | 158 - es/book/tipos_de_datos.md | 61 - es/book/trabajando_con_tablas.md | 290 - es/book/variables_y_subexpresiones.md | 65 - i18n-meta.json | 640 -- i18n.nu | 147 - ja/README.md | 55 - ja/book/README.md | 64 - ja/book/aliases.md | 50 - ja/book/coming_from_bash.md | 49 - ja/book/command_reference.md | 25 - ja/book/configuration.md | 149 - ja/book/environment.md | 32 - ja/book/escaping.md | 15 - ja/book/getting_started.md | 9 - ja/book/installation.md | 107 - ja/book/introduction.md | 69 - ja/book/loading_data.md | 169 - ja/book/math.md | 61 - ja/book/metadata.md | 42 - ja/book/moving_around.md | 53 - ja/book/nushell_map.md | 108 - ja/book/nushell_map_functional.md | 107 - ja/book/nushell_map_imperative.md | 107 - ja/book/nushell_operator_map.md | 24 - ja/book/pipeline.md | 51 - ja/book/plugins.md | 12 - ja/book/quick_tour.md | 67 - ja/book/shells_in_shells.md | 52 - ja/book/table_of_contents.md | 14 - ja/book/types_of_data.md | 110 - ja/book/working_with_tables.md | 257 - lang-guide/lang-guide.md | 34 +- lefthook.yml | 34 - make_docs.nu | 410 - package-lock.json | 9581 ++++++++++++----- package.json | 50 +- pt-BR/README.md | 48 - pt-BR/book/README.md | 14 - pt-BR/book/carregando_dados.md | 197 - pt-BR/book/command_reference.md | 25 - pt-BR/book/escapando.md | 15 - pt-BR/book/explorando.md | 78 - pt-BR/book/instalacao.md | 153 - pt-BR/book/introducao.md | 168 - pt-BR/book/line_editor.md | 672 -- pt-BR/book/metadados.md | 44 - pt-BR/book/pipeline.md | 51 - pt-BR/book/plugins.md | 11 - pt-BR/book/shells_em_shells.md | 158 - pt-BR/book/tipos_de_dados.md | 61 - pt-BR/book/trabalhando_com_tabelas.md | 290 - .../Book_table_of_contents.md | 0 public/favicon.svg | 15 + public/nushell-grammar.json | 1047 ++ public/nushell_minimal_dark_theme.json | 718 ++ ru/README.md | 53 - ru/book/README.md | 63 - .../assets}/images/0_12_0_jupyter.png | Bin .../assets}/images/0_14_0_help_examples.png | Bin .../assets}/images/0_15_0_prettier_errors.png | Bin .../assets}/images/0_16_0_after_table.png | Bin .../assets}/images/0_16_0_before_table.png | Bin .../assets}/images/0_16_0_prompt_3.png | Bin .../assets}/images/0_16_0_prompt_4.png | Bin .../assets}/images/0_16_0_rendering_time.png | Bin .../assets}/images/0_17_0_playground.png | Bin .../assets}/images/0_19_autocomplete.gif | Bin .../assets}/images/0_19_heart_theme.png | Bin .../assets}/images/0_19_table_colors.png | Bin .../assets}/images/0_21_bar_charts.gif | Bin .../assets}/images/0_21_line_chart.png | Bin .../assets}/images/0_22_flatten.gif | Bin .../assets}/images/0_23_website.png | Bin .../assets}/images/0_30_0_speed.png | Bin {assets => src/assets}/images/0_32_themes.png | Bin {assets => src/assets}/images/0_36_tutor.png | Bin {assets => src/assets}/images/0_37_find.png | Bin .../assets}/images/0_4_0_new_colors.png | Bin .../assets}/images/0_4_0_streaming_table.gif | Bin .../images/0_59_1_for_multiline_indicator.png | Bin .../assets}/images/0_59_1_ls_gridc.png | Bin .../assets}/images/0_59_1_ls_sort.png | Bin .../images/0_60_0_completions_external.gif | Bin .../images/0_60_0_completions_internal.gif | Bin .../assets}/images/0_60_0_history.gif | Bin .../images/0_60_0_history_complete.gif | Bin .../assets}/images/0_60_completions.gif | Bin .../assets}/images/0_60_ls_colors.png | Bin {assets => src/assets}/images/0_60_miette.png | Bin .../images/0_61_completion_descriptions.png | Bin .../assets}/images/0_61_help_menu.png | Bin .../assets}/images/0_67_error_message.png | Bin {assets => src/assets}/images/0_67_header.png | Bin .../assets}/images/0_67_vs_code.png | Bin .../assets}/images/0_6_0_starship_prompt.png | Bin .../assets}/images/0_70_table_expand.png | Bin .../assets}/images/0_72_auto_expand.png | Bin .../assets}/images/0_73_explore_try_mode.png | Bin .../assets}/images/0_74_io_signatures.png | Bin .../assets}/images/0_74_new_help.png | Bin .../assets}/images/0_75_save_progress.png | Bin .../assets}/images/0_76_explain_cmd.png | Bin .../assets}/images/0_76_inspect_cmd.png | Bin .../images/0_76_plugin_with_example.png | Bin .../assets}/images/0_76_profile_prompt.png | Bin .../assets}/images/0_76_view_files.png | Bin {assets => src/assets}/images/0_79_ide.png | Bin .../assets}/images/0_79_std_log.png | Bin .../assets}/images/0_84_table_compact.png | Bin .../assets}/images/0_84_table_padding.png | Bin .../assets}/images/0_86_completions.gif | Bin .../assets}/images/0_9_0_error_highlight.png | Bin .../assets}/images/bday_4_bulk_convert.jpeg | Bin {assets => src/assets}/images/bday_4_grid.png | Bin .../assets}/images/bday_4_hex_colours.png | Bin .../assets}/images/bday_4_subcommand_help.png | Bin {assets => src/assets}/images/default.png | Bin .../assets}/images/did_you_mean.png | Bin .../images/eq_git_branch_completion.gif | Bin .../assets/images}/fetch-example.png | Bin .../assets}/images/happy_nu_year_2020.png | Bin .../assets}/images/jonathandturner.jpg | Bin .../images/logo-contest/ellie-mascot.png | Bin .../assets}/images/logo-contest/font-logo.png | Bin .../images/logo-contest/shell-mascot.png | Bin .../assets/images}/ls-example.png | Bin .../assets/images}/miette-example.png | Bin {assets => src/assets}/images/nu_error.png | Bin {assets => src/assets}/images/nu_error2.png | Bin .../assets}/images/nu_error_metadata.png | Bin .../link.png => src/assets/images/nu_icon.png | Bin {assets => src/assets}/images/nu_logo.png | Bin {assets => src/assets}/images/nu_ls.png | Bin .../assets}/images/nu_ls_filter.png | Bin .../assets}/images/nu_ps_filter.png | Bin .../assets}/images/nushell-autocomplete4.gif | Bin .../nushell_survey_2019_anything_else.png | Bin .../images/nushell_survey_2019_blockers.png | Bin .../nushell_survey_2019_fave_features.png | Bin .../images/nushell_survey_2019_needs_work.png | Bin .../images/nushell_survey_2019_percent.png | Bin .../images/nushell_survey_2019_stoppers.png | Bin .../nushell_survey_2023_how_install.png | Bin .../images/nushell_survey_2023_platforms.png | Bin .../images/nushell_survey_2023_priorities.png | Bin .../nushell_survey_2023_running_nushell.png | Bin .../nushell_survey_2023_use_nushell.png | Bin {assets => src/assets}/images/open_cargo.png | Bin .../assets}/images/right_prompt.png | Bin .../assets}/images/right_prompt_default.png | Bin .../assets}/images/two_year_cake.png | Bin .../assets}/images/two_year_stars.png | Bin .../assets}/images/two_year_tweet1.png | Bin .../assets}/images/two_year_tweet2.png | Bin .../assets}/images/two_year_tweet3.png | Bin .../assets}/images/two_year_tweet4.png | Bin .../assets}/images/two_year_tweet5.png | Bin .../assets}/images/two_year_vscode.png | Bin .../assets}/images/utf8_light_table.png | Bin {assets => src/assets}/images/utf8_table.png | Bin {assets => src/assets}/images/view_source.png | Bin {assets => src/assets}/images/year_1_kloc.png | Bin src/content/config.ts | 6 + .../blog}/2019-08-23-introducing-nushell.md | 0 .../docs/blog}/2019-09-24-nushell_0_3_0.md | 0 .../docs/blog}/2019-10-15-nushell-0_4_0.md | 0 .../docs/blog}/2019-11-05-nushell-0_5_0.md | 0 .../2019-11-23-nushell-survey-results.md | 0 .../docs/blog}/2019-11-26-nushell-0_6_0.md | 0 .../docs/blog}/2019-12-18-nushell-0_7_0.md | 0 .../blog}/2019-12-31-happy-nu-year-2020.md | 0 .../docs/blog}/2020-01-07-nushell-0_8_0.md | 0 .../docs/blog}/2020-01-28-nushell-0_9_0.md | 0 .../docs/blog}/2020-02-18-nushell-0_10_0.md | 0 .../docs/blog}/2020-03-10-nushell_0_11_0.md | 0 .../docs/blog}/2020-03-31-nushell_0_12_0.md | 0 .../docs/blog}/2020-04-21-nushell_0_13_0.md | 0 .../docs/blog}/2020-05-12-nushell_0_14_0.md | 0 .../docs/blog}/2020-06-09-nushell_0_15_0.md | 0 .../docs/blog}/2020-06-30-nushell_0_16_0.md | 0 .../docs/blog}/2020-07-21-nushell_0_17_0.md | 0 .../docs/blog}/2020-08-11-nushell_0_18.md | 0 .../docs/blog}/2020-08-23-year_of_nushell.md | 0 .../docs/blog}/2020-09-01-nushell_0_19.md | 0 .../docs/blog}/2020-09-22-nushell_0_20.md | 0 .../docs/blog}/2020-10-13-nushell_0_21.md | 0 .../docs/blog}/2020-11-03-nushell_0_22.md | 0 .../docs/blog}/2020-11-24-nushell_0_23.md | 0 .../docs/blog}/2020-12-15-nushell_0_24.md | 0 .../docs/blog}/2021-01-05-nushell_0_25.md | 0 .../docs/blog}/2021-01-26-nushell_0_26.md | 0 .../docs/blog}/2021-02-16-nushell_0_27.md | 0 .../docs/blog}/2021-03-09-nushell_0_28.md | 0 .../docs/blog}/2021-03-30-nushell_0_29.md | 0 .../docs/blog}/2021-04-20-nushell_0_30.md | 0 .../docs/blog}/2021-05-11-nushell_0_31.md | 0 .../docs/blog}/2021-06-01-nushell_0_32.md | 0 .../docs/blog}/2021-06-22-nushell_0_33.md | 2 +- .../docs/blog}/2021-07-13-nushell_0_34.md | 0 .../docs/blog}/2021-08-03-nushell_0_35.md | 0 .../blog}/2021-08-23-two-years-of-nushell.md | 0 .../docs/blog}/2021-08-24-nushell_0_36.md | 0 .../docs/blog}/2021-09-14-nushell_0_37.md | 0 .../docs/blog}/2021-10-05-nushell_0_38.md | 0 .../docs/blog}/2021-10-26-nushell_0_39.md | 0 .../docs/blog}/2021-11-16-nushell_0_40.md | 0 .../docs/blog}/2021-12-07-nushell_0_41.md | 0 .../docs/blog}/2021-12-28-nushell_0_42.md | 0 .../docs/blog}/2022-01-18-nushell_0_43.md | 0 .../docs/blog}/2022-02-08-nushell_0_44.md | 0 .../docs/blog}/2022-03-01-nushell_0_59.md | 0 .../docs/blog}/2022-03-22-nushell_0_60.md | 0 .../docs/blog}/2022-04-12-nushell_0_61.md | 0 .../docs/blog}/2022-05-03-nushell_0_62.md | 0 .../docs/blog}/2022-05-24-nushell_0_63.md | 0 .../docs/blog}/2022-06-14-nushell_0_64.md | 0 .../docs/blog}/2022-07-05-nushell-0_65.md | 0 .../docs/blog}/2022-07-26-nushell-0_66.md | 0 .../docs/blog}/2022-08-16-nushell-0_67.md | 0 .../docs/blog}/2022-09-06-nushell-0_68.md | 4 +- .../docs/blog}/2022-09-27-nushell-0_69.md | 0 .../docs/blog}/2022-10-18-nushell-0_70.md | 0 .../docs/blog}/2022-11-08-nushell-0.71.md | 2 +- .../docs/blog}/2022-11-29-nushell-0.72.md | 30 +- .../docs/blog}/2022-12-20-nushell-0.73.md | 22 +- .../docs/blog}/2023-01-10-nushell_0_74.md | 24 +- .../docs/blog}/2023-01-31-nushell_0_75.md | 18 +- .../docs/blog}/2023-02-21-nushell_0_76.md | 14 +- .../docs/blog}/2023-03-14-nushell_0_77.md | 14 +- .../docs/blog}/2023-04-04-nushell_0_78.md | 20 +- .../docs/blog}/2023-04-25-nushell_0_79.md | 8 +- .../docs/blog}/2023-05-16-nushell_0_80.md | 0 .../docs/blog}/2023-06-06-nushell_0_81.md | 2 +- .../docs/blog}/2023-06-27-nushell_0_82.md | 8 +- .../docs/blog}/2023-06-27-road-to-1_0.md | 10 +- .../docs/blog}/2023-07-25-nushell_0_83.md | 388 +- .../docs/blog}/2023-07-30-nushell_0_83_1.md | 0 .../docs/blog/2023-08-22-nushell_0_84_0.md | 428 + .../2023-08-23-happy-birthday-nushell-4.md | 8 +- .../content/docs/blog}/2023-09-05-why-uu.md | 12 +- .../docs/blog/2023-09-19-nushell_0_85_0.md | 635 ++ .../docs/blog}/2023-10-17-nushell_0_86.md | 46 +- .../docs/blog}/2023-11-14-nushell_0_87_0.md | 32 +- .../2023-11-16-nushell-2023-survey-results.md | 0 .../docs/blog/2023-12-12-nushell_0_88_0.md | 835 ++ .../docs/blog}/2023-12-21-logo-contest.md | 20 +- .../docs/blog/2024-01-09-nushell_0_89_0.md | 465 + .../docs/blog}/2024-02-06-nushell_0_90_0.md | 10 +- src/content/docs/blog/README.md | 13 + .../content/docs/book}/3rdpartyprompts.md | 10 +- {book => src/content/docs/book}/advanced.md | 4 + {book => src/content/docs/book}/aliases.md | 31 +- .../content/docs/book}/background_task.md | 6 +- src/content/docs/book/cheat_sheet.mdx | 461 + .../docs/book}/coloring_and_theming.md | 30 +- .../content/docs/book}/coming_from_bash.md | 115 +- .../content/docs/book}/coming_from_cmd.md | 4 + .../content/docs/book}/coming_to_nu.md | 4 + .../content/docs/book}/command_signature.md | 10 +- .../content/docs/book}/configuration.md | 23 +- .../content/docs/book}/control_flow.md | 172 +- .../content/docs/book}/creating_errors.md | 12 +- .../content/docs/book}/custom_commands.md | 130 +- .../content/docs/book}/custom_completions.md | 24 +- {book => src/content/docs/book}/dataframes.md | 219 +- .../content/docs/book/default_shell.mdx | 15 +- {de => src/content/docs}/book/design_notes.md | 4 + .../content/docs/book}/environment.md | 39 +- {book => src/content/docs/book}/escaping.md | 8 +- {book => src/content/docs/book}/explore.md | 8 +- {book => src/content/docs/book}/externs.md | 8 +- .../content/docs/book}/getting_started.md | 4 + {book => src/content/docs/book}/hooks.md | 32 +- .../docs/book}/how_nushell_code_gets_run.md | 34 +- .../content/docs/book/installation.mdx | 78 +- .../content/docs/book}/introduction.md | 4 +- .../content/docs/book}/line_editor.md | 62 +- .../content/docs/book}/loading_data.md | 97 +- {book => src/content/docs/book}/metadata.md | 10 +- {book => src/content/docs/book}/modules.md | 175 +- .../content/docs/book/moving_around.mdx | 50 +- .../content/docs/book}/nu_as_a_shell.md | 4 + .../content/docs/book}/nu_fundamentals.md | 4 + src/content/docs/book/nushell_map.md | 78 + .../docs/book}/nushell_map_functional.md | 4 + .../docs/book/nushell_map_imperative.md | 80 + .../docs/book}/nushell_operator_map.md | 4 + {book => src/content/docs/book}/operators.md | 94 +- {book => src/content/docs/book}/overlays.md | 34 +- .../content/docs/book}/parallelism.md | 10 +- {book => src/content/docs/book}/pipelines.md | 71 +- {book => src/content/docs/book}/plugins.md | 10 +- .../content/docs/book}/programming_in_nu.md | 6 +- src/content/docs/book/quick_tour.md | 191 + .../content/docs/book}/regular_expressions.md | 4 + {book => src/content/docs/book}/scripts.md | 79 +- .../content/docs/book}/shells_in_shells.md | 10 +- .../content/docs/book}/standard_library.md | 4 + .../docs/book}/stdout_stderr_exit_codes.md | 20 +- .../content/docs/book}/style_guide.md | 16 +- {book => src/content/docs/book}/testing.md | 36 +- .../content/docs/book/thinking_in_nu.mdx | 50 +- .../content/docs/book}/types_of_data.md | 277 +- .../book}/variables_and_subexpressions.md | 110 +- .../content/docs/book}/working_with_lists.md | 113 +- .../docs/book}/working_with_strings.md | 198 +- .../content/docs/book}/working_with_tables.md | 100 +- .../content/docs/commands}/README.md | 8 + .../content/docs/commands}/categories/bits.md | 4 + .../docs/commands}/categories/bytes.md | 4 + .../docs/commands}/categories/chart.md | 4 + .../docs/commands}/categories/conversions.md | 4 + .../content/docs/commands}/categories/core.md | 4 + .../docs/commands}/categories/database.md | 4 + .../docs/commands}/categories/dataframe.md | 4 + .../categories/dataframe_or_lazyframe.md | 4 + .../content/docs/commands}/categories/date.md | 4 + .../docs/commands}/categories/debug.md | 4 + .../docs/commands}/categories/default.md | 4 + .../docs/commands}/categories/deprecated.md | 4 + .../content/docs/commands}/categories/env.md | 4 + .../docs/commands}/categories/experimental.md | 4 + .../docs/commands}/categories/expression.md | 4 + .../docs/commands}/categories/filesystem.md | 4 + .../docs/commands}/categories/filters.md | 4 + .../docs/commands}/categories/formats.md | 4 + .../docs/commands}/categories/generators.md | 4 + .../content/docs/commands}/categories/hash.md | 4 + .../docs/commands}/categories/history.md | 4 + .../docs/commands}/categories/lazyframe.md | 4 + .../content/docs/commands}/categories/math.md | 4 + .../content/docs/commands}/categories/misc.md | 4 + .../docs/commands}/categories/network.md | 4 + .../content/docs/commands}/categories/path.md | 4 + .../docs/commands}/categories/platform.md | 4 + .../docs/commands}/categories/prompt.md | 4 + .../docs/commands}/categories/random.md | 4 + .../docs/commands}/categories/removed.md | 4 + .../docs/commands}/categories/shells.md | 4 + .../docs/commands}/categories/strings.md | 4 + .../docs/commands}/categories/system.md | 4 + .../docs/commands}/categories/viewers.md | 4 + .../content/docs/commands}/docs/alias.md | 14 +- .../content/docs/commands}/docs/all.md | 22 +- .../content/docs/commands}/docs/ansi.md | 33 +- .../docs/commands}/docs/ansi_gradient.md | 41 +- .../content/docs/commands}/docs/ansi_link.md | 30 +- .../content/docs/commands}/docs/ansi_strip.md | 20 +- .../content/docs/commands}/docs/any.md | 22 +- .../content/docs/commands}/docs/append.md | 31 +- .../content/docs/commands}/docs/ast.md | 25 +- .../content/docs/commands}/docs/bits.md | 11 +- .../content/docs/commands}/docs/bits_and.md | 23 +- .../content/docs/commands}/docs/bits_not.md | 28 +- .../content/docs/commands}/docs/bits_or.md | 23 +- .../content/docs/commands}/docs/bits_rol.md | 27 +- .../content/docs/commands}/docs/bits_ror.md | 27 +- .../content/docs/commands}/docs/bits_shl.md | 33 +- .../content/docs/commands}/docs/bits_shr.md | 27 +- .../content/docs/commands}/docs/bits_xor.md | 23 +- .../content/docs/commands}/docs/break.md | 7 +- .../content/docs/commands}/docs/bytes.md | 7 +- .../content/docs/commands}/docs/bytes_add.md | 35 +- .../content/docs/commands}/docs/bytes_at.md | 34 +- .../docs/commands}/docs/bytes_build.md | 9 +- .../docs/commands}/docs/bytes_collect.md | 16 +- .../docs/commands}/docs/bytes_ends-with.md | 18 +- .../docs/commands}/docs/bytes_index-of.md | 28 +- .../docs/commands}/docs/bytes_length.md | 23 +- .../docs/commands}/docs/bytes_remove.md | 28 +- .../docs/commands}/docs/bytes_replace.md | 22 +- .../docs/commands}/docs/bytes_reverse.md | 13 +- .../docs/commands}/docs/bytes_starts-with.md | 18 +- .../content/docs/commands}/docs/cal.md | 25 +- .../content/docs/commands}/docs/cd.md | 13 +- .../content/docs/commands}/docs/char.md | 32 +- .../content/docs/commands}/docs/clear.md | 7 +- .../content/docs/commands}/docs/collect.md | 11 +- .../content/docs/commands}/docs/columns.md | 24 +- .../docs/commands}/docs/commandline.md | 18 +- .../content/docs/commands}/docs/compact.md | 24 +- .../content/docs/commands}/docs/complete.md | 13 +- .../content/docs/commands}/docs/config.md | 7 +- .../content/docs/commands}/docs/config_env.md | 15 +- .../content/docs/commands}/docs/config_nu.md | 15 +- .../docs/commands}/docs/config_reset.md | 13 +- .../content/docs/commands}/docs/const.md | 17 +- .../content/docs/commands}/docs/continue.md | 7 +- src/content/docs/commands/docs/cp.md | 98 + .../content/docs/commands}/docs/date.md | 7 +- .../docs/commands}/docs/date_format.md | 10 +- .../docs/commands}/docs/date_humanize.md | 8 +- .../docs/commands}/docs/date_list-timezone.md | 7 +- .../content/docs/commands}/docs/date_now.md | 16 +- .../docs/commands}/docs/date_to-record.md | 17 +- .../docs/commands}/docs/date_to-table.md | 17 +- .../docs/commands}/docs/date_to-timezone.md | 25 +- .../content/docs/commands}/docs/debug.md | 23 +- .../content/docs/commands}/docs/debug_info.md | 10 +- .../content/docs/commands}/docs/decode.md | 15 +- .../docs/commands}/docs/decode_base64.md | 32 +- .../content/docs/commands}/docs/decode_hex.md | 27 +- .../content/docs/commands}/docs/def.md | 29 +- .../content/docs/commands}/docs/default.md | 17 +- .../content/docs/commands}/docs/describe.md | 25 +- .../docs/commands}/docs/detect_columns.md | 25 +- .../content/docs/commands}/docs/dfr.md | 9 +- .../docs/commands}/docs/dfr_agg-groups.md | 9 +- .../content/docs/commands}/docs/dfr_agg.md | 14 +- .../docs/commands}/docs/dfr_all-false.md | 12 +- .../docs/commands}/docs/dfr_all-true.md | 12 +- .../content/docs/commands}/docs/dfr_append.md | 16 +- .../docs/commands}/docs/dfr_arg-max.md | 9 +- .../docs/commands}/docs/dfr_arg-min.md | 9 +- .../docs/commands}/docs/dfr_arg-sort.md | 18 +- .../docs/commands}/docs/dfr_arg-true.md | 9 +- .../docs/commands}/docs/dfr_arg-unique.md | 9 +- .../docs/commands}/docs/dfr_arg-where.md | 11 +- .../docs/commands}/docs/dfr_as-date.md | 20 +- .../docs/commands}/docs/dfr_as-datetime.md | 39 +- .../content/docs/commands}/docs/dfr_as.md | 11 +- .../content/docs/commands}/docs/dfr_cache.md | 9 +- .../content/docs/commands}/docs/dfr_col.md | 11 +- .../docs/commands}/docs/dfr_collect.md | 9 +- .../docs/commands}/docs/dfr_columns.md | 9 +- .../docs/commands}/docs/dfr_concat-str.md | 13 +- .../docs/commands}/docs/dfr_concatenate.md | 11 +- .../docs/commands}/docs/dfr_contains.md | 11 +- .../docs/commands}/docs/dfr_count-null.md | 9 +- .../content/docs/commands}/docs/dfr_count.md | 9 +- .../docs/commands}/docs/dfr_cumulative.md | 13 +- .../docs/commands}/docs/dfr_datepart.md | 14 +- .../commands}/docs/dfr_drop-duplicates.md | 15 +- .../docs/commands}/docs/dfr_drop-nulls.md | 14 +- .../content/docs/commands}/docs/dfr_drop.md | 11 +- .../content/docs/commands}/docs/dfr_dtypes.md | 9 +- .../docs/commands}/docs/dfr_dummies.md | 14 +- .../docs/commands}/docs/dfr_explode.md | 14 +- .../docs/commands}/docs/dfr_expr-not.md | 9 +- .../content/docs/commands}/docs/dfr_fetch.md | 11 +- .../docs/commands}/docs/dfr_fill-nan.md | 14 +- .../docs/commands}/docs/dfr_fill-null.md | 11 +- .../docs/commands}/docs/dfr_filter-with.md | 14 +- .../content/docs/commands}/docs/dfr_filter.md | 11 +- .../content/docs/commands}/docs/dfr_first.md | 17 +- .../docs/commands}/docs/dfr_flatten.md | 14 +- .../docs/commands}/docs/dfr_get-day.md | 9 +- .../docs/commands}/docs/dfr_get-hour.md | 9 +- .../docs/commands}/docs/dfr_get-minute.md | 9 +- .../docs/commands}/docs/dfr_get-month.md | 9 +- .../docs/commands}/docs/dfr_get-nanosecond.md | 9 +- .../docs/commands}/docs/dfr_get-ordinal.md | 9 +- .../docs/commands}/docs/dfr_get-second.md | 9 +- .../docs/commands}/docs/dfr_get-week.md | 9 +- .../docs/commands}/docs/dfr_get-weekday.md | 9 +- .../docs/commands}/docs/dfr_get-year.md | 9 +- .../content/docs/commands}/docs/dfr_get.md | 11 +- .../docs/commands}/docs/dfr_group-by.md | 14 +- .../docs/commands}/docs/dfr_implode.md | 9 +- .../docs/commands}/docs/dfr_into-df.md | 23 +- .../docs/commands}/docs/dfr_into-lazy.md | 11 +- .../docs/commands}/docs/dfr_into-nu.md | 19 +- .../docs/commands}/docs/dfr_is-duplicated.md | 12 +- .../content/docs/commands}/docs/dfr_is-in.md | 11 +- .../docs/commands}/docs/dfr_is-not-null.md | 12 +- .../docs/commands}/docs/dfr_is-null.md | 12 +- .../docs/commands}/docs/dfr_is-unique.md | 12 +- .../content/docs/commands}/docs/dfr_join.md | 28 +- .../content/docs/commands}/docs/dfr_last.md | 14 +- .../content/docs/commands}/docs/dfr_lit.md | 11 +- .../docs/commands}/docs/dfr_lowercase.md | 9 +- .../content/docs/commands}/docs/dfr_ls.md | 9 +- .../content/docs/commands}/docs/dfr_max.md | 12 +- .../content/docs/commands}/docs/dfr_mean.md | 12 +- .../content/docs/commands}/docs/dfr_median.md | 9 +- .../content/docs/commands}/docs/dfr_melt.md | 17 +- .../content/docs/commands}/docs/dfr_min.md | 12 +- .../docs/commands}/docs/dfr_n-unique.md | 12 +- .../content/docs/commands}/docs/dfr_not.md | 9 +- .../content/docs/commands}/docs/dfr_open.md | 27 +- .../docs/commands}/docs/dfr_otherwise.md | 17 +- .../docs/commands}/docs/dfr_quantile.md | 11 +- .../content/docs/commands}/docs/dfr_query.md | 11 +- .../content/docs/commands}/docs/dfr_rename.md | 19 +- .../docs/commands}/docs/dfr_replace-all.md | 13 +- .../docs/commands}/docs/dfr_replace.md | 13 +- .../docs/commands}/docs/dfr_reverse.md | 9 +- .../docs/commands}/docs/dfr_rolling.md | 16 +- .../content/docs/commands}/docs/dfr_sample.md | 22 +- .../content/docs/commands}/docs/dfr_schema.md | 11 +- .../content/docs/commands}/docs/dfr_select.md | 11 +- .../docs/commands}/docs/dfr_set-with-idx.md | 13 +- .../content/docs/commands}/docs/dfr_set.md | 13 +- .../content/docs/commands}/docs/dfr_shape.md | 9 +- .../content/docs/commands}/docs/dfr_shift.md | 13 +- .../content/docs/commands}/docs/dfr_slice.md | 13 +- .../docs/commands}/docs/dfr_sort-by.md | 20 +- .../content/docs/commands}/docs/dfr_std.md | 12 +- .../docs/commands}/docs/dfr_str-lengths.md | 9 +- .../docs/commands}/docs/dfr_str-slice.md | 13 +- .../docs/commands}/docs/dfr_strftime.md | 11 +- .../content/docs/commands}/docs/dfr_sum.md | 12 +- .../docs/commands}/docs/dfr_summary.md | 11 +- .../content/docs/commands}/docs/dfr_take.md | 14 +- .../docs/commands}/docs/dfr_to-arrow.md | 11 +- .../docs/commands}/docs/dfr_to-avro.md | 13 +- .../content/docs/commands}/docs/dfr_to-csv.md | 18 +- .../docs/commands}/docs/dfr_to-jsonl.md | 11 +- .../docs/commands}/docs/dfr_to-parquet.md | 11 +- .../content/docs/commands}/docs/dfr_unique.md | 18 +- .../docs/commands}/docs/dfr_uppercase.md | 9 +- .../docs/commands}/docs/dfr_value-counts.md | 9 +- .../content/docs/commands}/docs/dfr_var.md | 12 +- .../content/docs/commands}/docs/dfr_when.md | 19 +- .../docs/commands}/docs/dfr_with-column.md | 16 +- .../content/docs/commands}/docs/do.md | 45 +- .../content/docs/commands}/docs/drop.md | 28 +- .../docs/commands}/docs/drop_column.md | 13 +- .../content/docs/commands}/docs/drop_nth.md | 33 +- .../content/docs/commands}/docs/du.md | 19 +- .../content/docs/commands}/docs/each.md | 33 +- .../content/docs/commands}/docs/each_while.md | 23 +- .../content/docs/commands}/docs/echo.md | 15 +- .../content/docs/commands}/docs/encode.md | 17 +- .../docs/commands}/docs/encode_base64.md | 32 +- .../content/docs/commands}/docs/encode_hex.md | 24 +- .../content/docs/commands}/docs/enter.md | 7 +- .../content/docs/commands}/docs/enumerate.md | 7 +- .../content/docs/commands}/docs/error_make.md | 17 +- .../content/docs/commands}/docs/every.md | 18 +- .../content/docs/commands}/docs/exec.md | 15 +- .../content/docs/commands}/docs/exit.md | 9 +- .../content/docs/commands}/docs/explain.md | 10 +- .../content/docs/commands}/docs/explore.md | 27 +- .../content/docs/commands}/docs/export-env.md | 12 +- .../content/docs/commands}/docs/export.md | 12 +- .../docs/commands}/docs/export_alias.md | 14 +- .../docs/commands}/docs/export_const.md | 14 +- .../content/docs/commands}/docs/export_def.md | 20 +- .../docs/commands}/docs/export_extern.md | 14 +- .../docs/commands}/docs/export_module.md | 14 +- .../content/docs/commands}/docs/export_use.md | 14 +- .../content/docs/commands}/docs/extern.md | 14 +- .../content/docs/commands}/docs/fill.md | 41 +- .../content/docs/commands}/docs/filter.md | 31 +- .../content/docs/commands}/docs/find.md | 61 +- .../content/docs/commands}/docs/first.md | 24 +- .../content/docs/commands}/docs/flatten.md | 30 +- .../content/docs/commands}/docs/fmt.md | 11 +- .../content/docs/commands}/docs/for.md | 24 +- .../content/docs/commands}/docs/format.md | 7 +- .../docs/commands}/docs/format_date.md | 24 +- .../docs/commands}/docs/format_duration.md | 26 +- .../docs/commands}/docs/format_filesize.md | 18 +- .../docs/commands}/docs/format_pattern.md | 23 +- .../content/docs/commands}/docs/from.md | 7 +- .../content/docs/commands}/docs/from_csv.md | 41 +- .../content/docs/commands}/docs/from_eml.md | 14 +- .../content/docs/commands}/docs/from_ics.md | 9 +- .../content/docs/commands}/docs/from_ini.md | 9 +- .../content/docs/commands}/docs/from_json.md | 17 +- .../content/docs/commands}/docs/from_nuon.md | 10 +- .../content/docs/commands}/docs/from_ods.md | 12 +- .../content/docs/commands}/docs/from_ssv.md | 16 +- .../content/docs/commands}/docs/from_toml.md | 10 +- .../content/docs/commands}/docs/from_tsv.md | 36 +- .../content/docs/commands}/docs/from_url.md | 11 +- .../content/docs/commands}/docs/from_vcf.md | 9 +- .../content/docs/commands}/docs/from_xlsx.md | 12 +- .../content/docs/commands}/docs/from_xml.md | 15 +- .../content/docs/commands}/docs/from_yaml.md | 10 +- .../content/docs/commands}/docs/from_yml.md | 10 +- .../content/docs/commands}/docs/g.md | 16 +- .../content/docs/commands}/docs/generate.md | 22 +- .../content/docs/commands}/docs/get.md | 48 +- .../content/docs/commands}/docs/glob.md | 60 +- .../content/docs/commands}/docs/grid.md | 35 +- .../content/docs/commands}/docs/group-by.md | 27 +- .../content/docs/commands}/docs/group.md | 13 +- .../content/docs/commands}/docs/gstat.md | 6 +- .../content/docs/commands}/docs/hash.md | 7 +- .../content/docs/commands}/docs/hash_md5.md | 18 +- .../docs/commands}/docs/hash_sha256.md | 18 +- .../content/docs/commands}/docs/headers.md | 17 +- .../content/docs/commands}/docs/help.md | 20 +- .../docs/commands}/docs/help_aliases.md | 17 +- .../docs/commands}/docs/help_commands.md | 8 +- .../docs/commands}/docs/help_escapes.md | 4 +- .../docs/commands}/docs/help_externs.md | 17 +- .../docs/commands}/docs/help_modules.md | 20 +- .../docs/commands}/docs/help_operators.md | 4 +- .../content/docs/commands}/docs/hide-env.md | 11 +- .../content/docs/commands}/docs/hide.md | 17 +- .../content/docs/commands}/docs/histogram.md | 26 +- .../content/docs/commands}/docs/history.md | 18 +- .../docs/commands}/docs/history_session.md | 7 +- .../content/docs/commands}/docs/http.md | 7 +- .../docs/commands}/docs/http_delete.md | 46 +- .../content/docs/commands}/docs/http_get.md | 39 +- .../content/docs/commands}/docs/http_head.md | 30 +- .../docs/commands}/docs/http_options.md | 36 +- .../content/docs/commands}/docs/http_patch.md | 43 +- .../content/docs/commands}/docs/http_post.md | 43 +- .../content/docs/commands}/docs/http_put.md | 43 +- .../content/docs/commands}/docs/if.md | 19 +- .../content/docs/commands}/docs/ignore.md | 7 +- .../content/docs/commands}/docs/inc.md | 12 +- .../content/docs/commands}/docs/input.md | 21 +- .../content/docs/commands}/docs/input_list.md | 37 +- .../docs/commands}/docs/input_listen.md | 26 +- .../content/docs/commands}/docs/insert.md | 32 +- .../content/docs/commands}/docs/inspect.md | 7 +- .../content/docs/commands}/docs/into.md | 7 +- .../docs/commands}/docs/into_binary.md | 30 +- .../content/docs/commands}/docs/into_bits.md | 32 +- .../content/docs/commands}/docs/into_bool.md | 41 +- .../docs/commands}/docs/into_cell-path.md | 28 +- .../docs/commands}/docs/into_datetime.md | 56 +- .../docs/commands}/docs/into_duration.md | 30 +- .../docs/commands}/docs/into_filesize.md | 38 +- .../content/docs/commands}/docs/into_float.md | 35 +- .../content/docs/commands}/docs/into_int.md | 69 +- .../docs/commands}/docs/into_record.md | 35 +- .../docs/commands}/docs/into_sqlite.md | 21 +- .../docs/commands}/docs/into_string.md | 66 +- .../content/docs/commands}/docs/into_value.md | 12 +- .../content/docs/commands}/docs/is-admin.md | 7 +- .../content/docs/commands}/docs/is-empty.md | 15 +- .../docs/commands}/docs/is-terminal.md | 13 +- .../content/docs/commands}/docs/items.md | 12 +- .../content/docs/commands}/docs/join.md | 21 +- .../docs/commands}/docs/keybindings.md | 9 +- .../commands}/docs/keybindings_default.md | 7 +- .../docs/commands}/docs/keybindings_list.md | 23 +- .../docs/commands}/docs/keybindings_listen.md | 10 +- .../content/docs/commands}/docs/kill.md | 23 +- .../content/docs/commands}/docs/last.md | 22 +- .../content/docs/commands}/docs/lazy_make.md | 21 +- .../content/docs/commands}/docs/length.md | 14 +- .../content/docs/commands}/docs/let-env.md | 8 +- .../content/docs/commands}/docs/let.md | 20 +- .../content/docs/commands}/docs/lines.md | 13 +- .../content/docs/commands}/docs/load-env.md | 13 +- .../content/docs/commands}/docs/loop.md | 9 +- .../content/docs/commands}/docs/ls.md | 44 +- .../content/docs/commands}/docs/match.md | 26 +- .../content/docs/commands}/docs/math.md | 7 +- .../content/docs/commands}/docs/math_abs.md | 16 +- .../docs/commands}/docs/math_arccos.md | 23 +- .../docs/commands}/docs/math_arccosh.md | 18 +- .../docs/commands}/docs/math_arcsin.md | 23 +- .../docs/commands}/docs/math_arcsinh.md | 18 +- .../docs/commands}/docs/math_arctan.md | 23 +- .../docs/commands}/docs/math_arctanh.md | 18 +- .../content/docs/commands}/docs/math_avg.md | 30 +- .../content/docs/commands}/docs/math_ceil.md | 14 +- .../content/docs/commands}/docs/math_cos.md | 23 +- .../content/docs/commands}/docs/math_cosh.md | 18 +- .../content/docs/commands}/docs/math_exp.md | 21 +- .../content/docs/commands}/docs/math_floor.md | 14 +- .../content/docs/commands}/docs/math_ln.md | 18 +- .../content/docs/commands}/docs/math_log.md | 19 +- .../content/docs/commands}/docs/math_max.md | 24 +- .../docs/commands}/docs/math_median.md | 24 +- .../content/docs/commands}/docs/math_min.md | 24 +- .../content/docs/commands}/docs/math_mode.md | 17 +- .../docs/commands}/docs/math_product.md | 21 +- .../content/docs/commands}/docs/math_round.md | 22 +- .../content/docs/commands}/docs/math_sin.md | 23 +- .../content/docs/commands}/docs/math_sinh.md | 18 +- .../content/docs/commands}/docs/math_sqrt.md | 14 +- .../docs/commands}/docs/math_stddev.md | 24 +- .../content/docs/commands}/docs/math_sum.md | 24 +- .../content/docs/commands}/docs/math_tan.md | 23 +- .../content/docs/commands}/docs/math_tanh.md | 20 +- .../docs/commands}/docs/math_variance.md | 24 +- .../content/docs/commands}/docs/merge.md | 19 +- .../content/docs/commands}/docs/metadata.md | 12 +- .../content/docs/commands}/docs/mkdir.md | 14 +- .../content/docs/commands}/docs/mktemp.md | 26 +- .../content/docs/commands}/docs/module.md | 20 +- .../content/docs/commands}/docs/move.md | 20 +- .../content/docs/commands}/docs/mut.md | 23 +- .../content/docs/commands}/docs/mv.md | 25 +- .../content/docs/commands}/docs/n.md | 8 +- .../content/docs/commands}/docs/nu-check.md | 43 +- .../docs/commands}/docs/nu-highlight.md | 7 +- .../content/docs/commands}/docs/open.md | 29 +- .../content/docs/commands}/docs/overlay.md | 11 +- .../docs/commands}/docs/overlay_hide.md | 25 +- .../docs/commands}/docs/overlay_list.md | 14 +- .../docs/commands}/docs/overlay_new.md | 12 +- .../docs/commands}/docs/overlay_use.md | 27 +- .../content/docs/commands}/docs/p.md | 8 +- .../content/docs/commands}/docs/par-each.md | 34 +- .../content/docs/commands}/docs/parse.md | 33 +- .../content/docs/commands}/docs/path.md | 15 +- .../docs/commands}/docs/path_basename.md | 22 +- .../docs/commands}/docs/path_dirname.md | 27 +- .../docs/commands}/docs/path_exists.md | 22 +- .../docs/commands}/docs/path_expand.md | 24 +- .../content/docs/commands}/docs/path_join.md | 43 +- .../content/docs/commands}/docs/path_parse.md | 28 +- .../docs/commands}/docs/path_relative-to.md | 25 +- .../content/docs/commands}/docs/path_split.md | 17 +- .../content/docs/commands}/docs/path_type.md | 20 +- .../content/docs/commands}/docs/port.md | 14 +- .../content/docs/commands}/docs/prepend.md | 31 +- .../content/docs/commands}/docs/print.md | 20 +- .../content/docs/commands}/docs/ps.md | 21 +- .../content/docs/commands}/docs/query.md | 15 +- .../content/docs/commands}/docs/query_db.md | 9 +- .../content/docs/commands}/docs/query_json.md | 6 +- .../content/docs/commands}/docs/query_web.md | 26 +- .../content/docs/commands}/docs/query_xml.md | 6 +- .../content/docs/commands}/docs/random.md | 7 +- .../docs/commands}/docs/random_bool.md | 12 +- .../docs/commands}/docs/random_chars.md | 12 +- .../docs/commands}/docs/random_dice.md | 18 +- .../docs/commands}/docs/random_float.md | 18 +- .../content/docs/commands}/docs/random_int.md | 18 +- .../docs/commands}/docs/random_uuid.md | 7 +- .../content/docs/commands}/docs/range.md | 19 +- .../content/docs/commands}/docs/reduce.md | 35 +- .../content/docs/commands}/docs/register.md | 19 +- .../docs/commands}/docs/registry_query.md | 37 +- .../content/docs/commands}/docs/reject.md | 36 +- .../content/docs/commands}/docs/rename.md | 26 +- .../content/docs/commands}/docs/return.md | 12 +- .../content/docs/commands}/docs/reverse.md | 14 +- .../content/docs/commands}/docs/rm.md | 37 +- .../content/docs/commands}/docs/roll.md | 11 +- .../content/docs/commands}/docs/roll_down.md | 13 +- .../content/docs/commands}/docs/roll_left.md | 22 +- .../content/docs/commands}/docs/roll_right.md | 22 +- .../content/docs/commands}/docs/roll_up.md | 13 +- .../content/docs/commands}/docs/rotate.md | 31 +- .../docs/commands}/docs/run-external.md | 22 +- .../content/docs/commands}/docs/save.md | 31 +- .../content/docs/commands}/docs/schema.md | 7 +- .../content/docs/commands}/docs/scope.md | 7 +- .../docs/commands}/docs/scope_aliases.md | 7 +- .../docs/commands}/docs/scope_commands.md | 7 +- .../docs/commands}/docs/scope_engine-stats.md | 7 +- .../docs/commands}/docs/scope_externs.md | 7 +- .../docs/commands}/docs/scope_modules.md | 7 +- .../docs/commands}/docs/scope_variables.md | 7 +- .../content/docs/commands}/docs/select.md | 41 +- .../content/docs/commands}/docs/seq.md | 22 +- .../content/docs/commands}/docs/seq_char.md | 18 +- .../content/docs/commands}/docs/seq_date.md | 37 +- .../content/docs/commands}/docs/shells.md | 8 +- .../content/docs/commands}/docs/shuffle.md | 11 +- .../content/docs/commands}/docs/skip.md | 22 +- .../content/docs/commands}/docs/skip_until.md | 22 +- .../content/docs/commands}/docs/skip_while.md | 22 +- .../content/docs/commands}/docs/sleep.md | 17 +- .../content/docs/commands}/docs/sort-by.md | 30 +- .../content/docs/commands}/docs/sort.md | 43 +- .../content/docs/commands}/docs/source-env.md | 9 +- .../content/docs/commands}/docs/source.md | 15 +- .../content/docs/commands}/docs/split-by.md | 9 +- .../content/docs/commands}/docs/split.md | 7 +- .../docs/commands}/docs/split_chars.md | 24 +- .../docs/commands}/docs/split_column.md | 31 +- .../content/docs/commands}/docs/split_list.md | 24 +- .../content/docs/commands}/docs/split_row.md | 29 +- .../docs/commands}/docs/split_words.md | 26 +- .../content/docs/commands}/docs/start.md | 22 +- .../content/docs/commands}/docs/stor.md | 7 +- .../docs/commands}/docs/stor_create.md | 11 +- .../docs/commands}/docs/stor_delete.md | 14 +- .../docs/commands}/docs/stor_export.md | 9 +- .../docs/commands}/docs/stor_import.md | 9 +- .../docs/commands}/docs/stor_insert.md | 11 +- .../content/docs/commands}/docs/stor_open.md | 7 +- .../content/docs/commands}/docs/stor_reset.md | 7 +- .../docs/commands}/docs/stor_update.md | 16 +- .../content/docs/commands}/docs/str.md | 11 +- .../docs/commands}/docs/str_camel-case.md | 33 +- .../docs/commands}/docs/str_capitalize.md | 26 +- .../docs/commands}/docs/str_contains.md | 47 +- .../docs/commands}/docs/str_distance.md | 18 +- .../docs/commands}/docs/str_downcase.md | 29 +- .../docs/commands}/docs/str_ends-with.md | 30 +- .../docs/commands}/docs/str_escape-glob.md | 20 +- .../content/docs/commands}/docs/str_expand.md | 49 +- .../docs/commands}/docs/str_index-of.md | 45 +- .../content/docs/commands}/docs/str_join.md | 19 +- .../docs/commands}/docs/str_kebab-case.md | 33 +- .../content/docs/commands}/docs/str_length.md | 30 +- .../docs/commands}/docs/str_pascal-case.md | 33 +- .../docs/commands}/docs/str_replace.md | 62 +- .../docs/commands}/docs/str_reverse.md | 23 +- .../docs/str_screaming-snake-case.md | 33 +- .../docs/commands}/docs/str_snake-case.md | 33 +- .../docs/commands}/docs/str_starts-with.md | 33 +- .../content/docs/commands}/docs/str_stats.md | 13 +- .../docs/commands}/docs/str_substring.md | 29 +- .../docs/commands}/docs/str_title-case.md | 30 +- .../content/docs/commands}/docs/str_trim.md | 38 +- .../content/docs/commands}/docs/str_upcase.md | 20 +- .../content/docs/commands}/docs/sys.md | 13 +- .../content/docs/commands}/docs/table.md | 53 +- .../content/docs/commands}/docs/take.md | 35 +- .../content/docs/commands}/docs/take_until.md | 22 +- .../content/docs/commands}/docs/take_while.md | 22 +- .../content/docs/commands}/docs/term_size.md | 17 +- .../content/docs/commands}/docs/timeit.md | 16 +- .../content/docs/commands}/docs/to.md | 7 +- .../content/docs/commands}/docs/to_csv.md | 18 +- .../content/docs/commands}/docs/to_html.md | 34 +- .../content/docs/commands}/docs/to_json.md | 19 +- .../content/docs/commands}/docs/to_md.md | 20 +- .../content/docs/commands}/docs/to_nuon.md | 22 +- .../content/docs/commands}/docs/to_text.md | 13 +- .../content/docs/commands}/docs/to_toml.md | 7 +- .../content/docs/commands}/docs/to_tsv.md | 13 +- .../content/docs/commands}/docs/to_xml.md | 29 +- .../content/docs/commands}/docs/to_yaml.md | 7 +- .../content/docs/commands}/docs/touch.md | 34 +- .../content/docs/commands}/docs/transpose.md | 29 +- .../content/docs/commands}/docs/try.md | 14 +- .../content/docs/commands}/docs/tutor.md | 14 +- .../content/docs/commands}/docs/ulimit.md | 44 +- .../content/docs/commands}/docs/umkdir.md | 14 +- .../content/docs/commands}/docs/umv.md | 25 +- .../content/docs/commands}/docs/uniq-by.md | 24 +- .../content/docs/commands}/docs/uniq.md | 31 +- .../content/docs/commands}/docs/update.md | 33 +- .../docs/commands}/docs/update_cells.md | 18 +- .../content/docs/commands}/docs/upsert.md | 35 +- .../content/docs/commands}/docs/url.md | 7 +- .../docs/commands}/docs/url_build-query.md | 14 +- .../content/docs/commands}/docs/url_decode.md | 23 +- .../content/docs/commands}/docs/url_encode.md | 28 +- .../content/docs/commands}/docs/url_join.md | 13 +- .../content/docs/commands}/docs/url_parse.md | 10 +- .../content/docs/commands}/docs/use.md | 31 +- .../content/docs/commands}/docs/values.md | 21 +- .../content/docs/commands}/docs/version.md | 7 +- .../content/docs/commands}/docs/view.md | 7 +- .../content/docs/commands}/docs/view_files.md | 17 +- .../docs/commands}/docs/view_source.md | 24 +- .../content/docs/commands}/docs/view_span.md | 14 +- .../content/docs/commands}/docs/watch.md | 28 +- .../content/docs/commands}/docs/where.md | 45 +- .../content/docs/commands}/docs/which.md | 13 +- .../content/docs/commands}/docs/while.md | 11 +- .../content/docs/commands}/docs/whoami.md | 7 +- .../content/docs/commands}/docs/window.md | 23 +- .../content/docs/commands}/docs/with-env.md | 20 +- .../content/docs/commands}/docs/wrap.md | 21 +- .../content/docs/commands}/docs/zip.md | 22 +- .../content/docs/contributor-book}/README.md | 0 .../docs/contributor-book}/commands.md | 0 .../docs/contributor-book}/philosophy.md | 0 .../docs/contributor-book}/philosophy_0_80.md | 0 .../content/docs/contributor-book}/plugins.md | 2 +- .../content/docs/cookbook}/README.md | 10 +- .../content/docs/cookbook}/direnv.md | 2 +- .../docs/cookbook}/external_completers.md | 18 +- .../content/docs/cookbook}/files.md | 14 +- .../content/docs/cookbook}/git.md | 6 +- .../content/docs/cookbook}/help.md | 4 +- .../content/docs/cookbook}/http.md | 12 +- .../content/docs/cookbook}/jq_v_nushell.md | 60 +- .../content/docs/cookbook}/parsing.md | 8 +- .../content/docs/cookbook}/parsing_git_log.md | 38 +- .../docs/cookbook}/pattern_matching.md | 14 +- .../cookbook}/polars_v_pandas_v_nushell.md | 16 +- .../content/docs/cookbook}/setup.md | 12 +- .../content/docs/cookbook}/ssh_agent.md | 6 +- .../content/docs/cookbook}/system.md | 10 +- .../content/docs/cookbook}/tables.md | 10 +- src/content/docs/index.mdx | 49 + .../content/docs/introduction.md | 4 +- .../content/docs/snippets}/book/std_log.nu | 0 .../installation/build_nu_from_source.sh | 0 .../build_nu_from_source_release.sh | 0 .../installation/build_nu_yourself.sh | 0 .../installation/cargo_install_nu.sh | 0 .../cargo_install_nu_more_features.sh | 0 .../installation/chsh_invalid_shell_error.sh | 0 .../snippets}/installation/git_clone_nu.sh | 0 .../install_pkg_config_libssl_dev.sh | 0 .../installation/install_rhel_dependencies.sh | 0 .../docs/snippets}/installation/macos_deps.sh | 0 .../installation/remove_welcome_message.nu | 0 .../docs/snippets}/installation/run_nu.sh | 0 .../rustup_choose_rust_version.sh | 0 .../installation/use_rawkey_and_clipboard.sh | 0 .../windows_change_default_profile.sh | 0 .../windows_example_extraction_location.sh | 0 .../snippets}/installation/windows_run_nu.sh | 0 .../windows_terminal_default_shell.sh | 0 .../snippets}/introduction/date_example.sh | 0 .../introduction/date_table_example.sh | 0 .../snippets}/introduction/help_example.sh | 0 .../docs/snippets}/introduction/ls_example.sh | 0 .../ls_sort_by_reverse_example.sh | 0 .../introduction/ls_where_example.sh | 0 .../docs/snippets}/introduction/ps_example.sh | 0 .../introduction/ps_where_example.sh | 0 .../snippets}/introduction/sys_example.sh | 0 .../snippets}/introduction/sys_get_example.sh | 0 .../sys_get_external_echo_example.sh | 0 .../introduction/sys_get_nested_example.sh | 0 .../docs/snippets}/loading_data/cargo-toml.sh | 0 .../snippets}/loading_data/rust-lang-feed.sh | 0 .../docs/snippets}/loading_data/vscode.sh | 0 .../snippets}/moving_around/cd_example.sh | 0 .../cd_without_command_example.sh | 0 .../snippets}/moving_around/cp_example.sh | 0 .../moving_around/ls_deep_glob_example.sh | 0 .../snippets}/moving_around/ls_example.sh | 0 .../moving_around/ls_shallow_glob_example.sh | 0 .../snippets}/moving_around/mkdir_example.sh | 0 .../snippets}/moving_around/mv_example.sh | 0 .../snippets}/moving_around/rm_example.sh | 0 .../snippets}/types_of_data/cell-paths.sh | 0 src/env.d.ts | 2 + src/styles/index.css | 32 + tr/README.md | 21 - tr/book/README.md | 3 - tsconfig.json | 3 + zh-CN/README.md | 53 - zh-CN/book/3rdpartyprompts.md | 88 - zh-CN/book/README.md | 75 - zh-CN/book/aliases.md | 42 - zh-CN/book/coloring_and_theming.md | 509 - zh-CN/book/coming_from_bash.md | 60 - zh-CN/book/command_reference.md | 29 - zh-CN/book/configuration.md | 124 - zh-CN/book/creating_errors.md | 50 - zh-CN/book/custom_commands.md | 441 - zh-CN/book/custom_completions.md | 60 - zh-CN/book/dataframes.md | 1008 -- zh-CN/book/environment.md | 221 - zh-CN/book/escaping.md | 15 - zh-CN/book/externs.md | 51 - zh-CN/book/hooks.md | 232 - zh-CN/book/installation.md | 131 - zh-CN/book/introduction.md | 180 - zh-CN/book/line_editor.md | 713 -- zh-CN/book/loading_data.md | 178 - zh-CN/book/metadata.md | 39 - zh-CN/book/modules.md | 292 - zh-CN/book/moving_around.md | 69 - zh-CN/book/nushell_map.md | 101 - zh-CN/book/nushell_map_functional.md | 103 - zh-CN/book/nushell_map_imperative.md | 101 - zh-CN/book/nushell_operator_map.md | 25 - zh-CN/book/operators.md | 89 - zh-CN/book/overlays.md | 191 - zh-CN/book/parallelism.md | 43 - zh-CN/book/pipelines.md | 72 - zh-CN/book/plugins.md | 48 - zh-CN/book/regular_expressions.md | 3 - zh-CN/book/scripts.md | 88 - zh-CN/book/shells_in_shells.md | 52 - zh-CN/book/stdout_stderr_exit_codes.md | 70 - zh-CN/book/table_of_contents.md | 39 - zh-CN/book/thinking_in_nu.md | 144 - zh-CN/book/types_of_data.md | 312 - zh-CN/book/variables_and_subexpressions.md | 94 - zh-CN/book/working_with_lists.md | 177 - zh-CN/book/working_with_strings.md | 190 - zh-CN/book/working_with_tables.md | 321 - 1070 files changed, 20239 insertions(+), 31102 deletions(-) delete mode 100644 .prettierrc create mode 100644 .prettierrc.mjs delete mode 100644 .typos.toml create mode 100644 .vscode/extensions.json create mode 100644 .vscode/launch.json delete mode 100755 .vuepress/client.js delete mode 100644 .vuepress/components/BlogPosts.vue delete mode 100755 .vuepress/config.js delete mode 100644 .vuepress/configs/index.ts delete mode 100644 .vuepress/configs/navbar/de.ts delete mode 100644 .vuepress/configs/navbar/en.ts delete mode 100644 .vuepress/configs/navbar/es.ts delete mode 100644 .vuepress/configs/navbar/index.ts delete mode 100644 .vuepress/configs/navbar/ja.ts delete mode 100644 .vuepress/configs/navbar/pt-BR.ts delete mode 100644 .vuepress/configs/navbar/ru.ts delete mode 100644 .vuepress/configs/navbar/zh-CN.ts delete mode 100644 .vuepress/configs/sidebar/command_categories.ts delete mode 100644 .vuepress/configs/sidebar/de.ts delete mode 100644 .vuepress/configs/sidebar/en.ts delete mode 100644 .vuepress/configs/sidebar/es.ts delete mode 100644 .vuepress/configs/sidebar/index.ts delete mode 100644 .vuepress/configs/sidebar/ja.ts delete mode 100644 .vuepress/configs/sidebar/pt-BR.ts delete mode 100644 .vuepress/configs/sidebar/ru.ts delete mode 100644 .vuepress/configs/sidebar/zh-CN.ts delete mode 100644 .vuepress/public/icon.png delete mode 100755 .vuepress/styles/index.scss delete mode 100755 .vuepress/styles/palette.scss delete mode 100644 CNAME create mode 100644 astro.config.mjs create mode 100644 biome.json delete mode 100644 blog/2023-08-22-nushell_0_84_0.md delete mode 100644 blog/2023-09-19-nushell_0_85_0.md delete mode 100644 blog/2023-12-12-nushell_0_88_0.md delete mode 100644 blog/2024-01-09-nushell_0_89_0.md delete mode 100644 blog/README.md delete mode 100644 book/cheat_sheet.md delete mode 100644 book/design_notes.md delete mode 100644 book/nushell_map.md delete mode 100644 book/nushell_map_imperative.md delete mode 100644 book/quick_tour.md delete mode 100644 commands/docs/cp.md delete mode 100644 de/README.md delete mode 100644 de/book/3rdpartyprompts.md delete mode 100644 de/book/README.md delete mode 100644 de/book/advanced.md delete mode 100644 de/book/aliases.md delete mode 100644 de/book/background_task.md delete mode 100644 de/book/coloring_and_theming.md delete mode 100644 de/book/coming_from_bash.md delete mode 100644 de/book/coming_to_nu.md delete mode 100644 de/book/command_reference.md delete mode 100644 de/book/command_signature.md delete mode 100644 de/book/configuration.md delete mode 100644 de/book/custom_commands.md delete mode 100644 de/book/custom_completions.md delete mode 100644 de/book/environment.md delete mode 100644 de/book/escaping.md delete mode 100644 de/book/getting_started.md delete mode 100644 de/book/hooks.md delete mode 100644 de/book/installation.md delete mode 100644 de/book/loading_data.md delete mode 100644 de/book/metadata.md delete mode 100644 de/book/moving_around.md delete mode 100644 de/book/nu_as_a_shell.md delete mode 100644 de/book/nu_fundamentals.md delete mode 100644 de/book/operators.md delete mode 100644 de/book/overlays.md delete mode 100644 de/book/pipeline.md delete mode 100644 de/book/plugins.md delete mode 100644 de/book/programming_in_nu.md delete mode 100644 de/book/scripts.md delete mode 100644 de/book/thinking_in_nushell.md delete mode 100644 de/book/types_of_data.md delete mode 100644 de/book/variables_and_subexpressions.md delete mode 100644 de/book/working_with_lists.md delete mode 100644 de/book/working_with_strings.md delete mode 100644 de/book/working_with_tables.md delete mode 100755 es/README.md delete mode 100644 es/book/README.md delete mode 100644 es/book/aliases.md delete mode 100644 es/book/cargando_datos.md delete mode 100644 es/book/configuracion.md delete mode 100644 es/book/entorno.md delete mode 100644 es/book/escapando.md delete mode 100644 es/book/explorando.md delete mode 100644 es/book/instalacion.md delete mode 100644 es/book/llegando_de_bash.md delete mode 100644 es/book/mapa_funcional_nushell.md delete mode 100644 es/book/mapa_imperativo_nushell.md delete mode 100644 es/book/mapa_nushell.md delete mode 100644 es/book/mapa_operador_nushell.md delete mode 100644 es/book/matematicas.md delete mode 100644 es/book/metadatos.md delete mode 100644 es/book/pipeline.md delete mode 100644 es/book/plugins.md delete mode 100644 es/book/shells_en_shells.md delete mode 100644 es/book/tipos_de_datos.md delete mode 100644 es/book/trabajando_con_tablas.md delete mode 100644 es/book/variables_y_subexpresiones.md delete mode 100644 i18n-meta.json delete mode 100644 i18n.nu delete mode 100755 ja/README.md delete mode 100644 ja/book/README.md delete mode 100644 ja/book/aliases.md delete mode 100644 ja/book/coming_from_bash.md delete mode 100644 ja/book/command_reference.md delete mode 100644 ja/book/configuration.md delete mode 100644 ja/book/environment.md delete mode 100644 ja/book/escaping.md delete mode 100644 ja/book/getting_started.md delete mode 100644 ja/book/installation.md delete mode 100644 ja/book/introduction.md delete mode 100644 ja/book/loading_data.md delete mode 100644 ja/book/math.md delete mode 100644 ja/book/metadata.md delete mode 100644 ja/book/moving_around.md delete mode 100644 ja/book/nushell_map.md delete mode 100644 ja/book/nushell_map_functional.md delete mode 100644 ja/book/nushell_map_imperative.md delete mode 100644 ja/book/nushell_operator_map.md delete mode 100644 ja/book/pipeline.md delete mode 100644 ja/book/plugins.md delete mode 100644 ja/book/quick_tour.md delete mode 100644 ja/book/shells_in_shells.md delete mode 100644 ja/book/table_of_contents.md delete mode 100644 ja/book/types_of_data.md delete mode 100644 ja/book/working_with_tables.md delete mode 100644 lefthook.yml delete mode 100644 make_docs.nu mode change 100755 => 100644 package.json delete mode 100755 pt-BR/README.md delete mode 100644 pt-BR/book/README.md delete mode 100644 pt-BR/book/carregando_dados.md delete mode 100644 pt-BR/book/command_reference.md delete mode 100644 pt-BR/book/escapando.md delete mode 100644 pt-BR/book/explorando.md delete mode 100644 pt-BR/book/instalacao.md delete mode 100644 pt-BR/book/introducao.md delete mode 100644 pt-BR/book/line_editor.md delete mode 100644 pt-BR/book/metadados.md delete mode 100644 pt-BR/book/pipeline.md delete mode 100644 pt-BR/book/plugins.md delete mode 100644 pt-BR/book/shells_em_shells.md delete mode 100644 pt-BR/book/tipos_de_dados.md delete mode 100644 pt-BR/book/trabalhando_com_tabelas.md rename book/table_of_contents.md => public/Book_table_of_contents.md (100%) create mode 100644 public/favicon.svg create mode 100644 public/nushell-grammar.json create mode 100644 public/nushell_minimal_dark_theme.json delete mode 100644 ru/README.md delete mode 100644 ru/book/README.md rename {assets => src/assets}/images/0_12_0_jupyter.png (100%) rename {assets => src/assets}/images/0_14_0_help_examples.png (100%) rename {assets => src/assets}/images/0_15_0_prettier_errors.png (100%) rename {assets => src/assets}/images/0_16_0_after_table.png (100%) rename {assets => src/assets}/images/0_16_0_before_table.png (100%) rename {assets => src/assets}/images/0_16_0_prompt_3.png (100%) rename {assets => src/assets}/images/0_16_0_prompt_4.png (100%) rename {assets => src/assets}/images/0_16_0_rendering_time.png (100%) rename {assets => src/assets}/images/0_17_0_playground.png (100%) rename {assets => src/assets}/images/0_19_autocomplete.gif (100%) rename {assets => src/assets}/images/0_19_heart_theme.png (100%) rename {assets => src/assets}/images/0_19_table_colors.png (100%) rename {assets => src/assets}/images/0_21_bar_charts.gif (100%) rename {assets => src/assets}/images/0_21_line_chart.png (100%) rename {assets => src/assets}/images/0_22_flatten.gif (100%) rename {assets => src/assets}/images/0_23_website.png (100%) rename {assets => src/assets}/images/0_30_0_speed.png (100%) rename {assets => src/assets}/images/0_32_themes.png (100%) rename {assets => src/assets}/images/0_36_tutor.png (100%) rename {assets => src/assets}/images/0_37_find.png (100%) rename {assets => src/assets}/images/0_4_0_new_colors.png (100%) rename {assets => src/assets}/images/0_4_0_streaming_table.gif (100%) rename {assets => src/assets}/images/0_59_1_for_multiline_indicator.png (100%) rename {assets => src/assets}/images/0_59_1_ls_gridc.png (100%) rename {assets => src/assets}/images/0_59_1_ls_sort.png (100%) rename {assets => src/assets}/images/0_60_0_completions_external.gif (100%) rename {assets => src/assets}/images/0_60_0_completions_internal.gif (100%) rename {assets => src/assets}/images/0_60_0_history.gif (100%) rename {assets => src/assets}/images/0_60_0_history_complete.gif (100%) rename {assets => src/assets}/images/0_60_completions.gif (100%) rename {assets => src/assets}/images/0_60_ls_colors.png (100%) rename {assets => src/assets}/images/0_60_miette.png (100%) rename {assets => src/assets}/images/0_61_completion_descriptions.png (100%) rename {assets => src/assets}/images/0_61_help_menu.png (100%) rename {assets => src/assets}/images/0_67_error_message.png (100%) rename {assets => src/assets}/images/0_67_header.png (100%) rename {assets => src/assets}/images/0_67_vs_code.png (100%) rename {assets => src/assets}/images/0_6_0_starship_prompt.png (100%) rename {assets => src/assets}/images/0_70_table_expand.png (100%) rename {assets => src/assets}/images/0_72_auto_expand.png (100%) rename {assets => src/assets}/images/0_73_explore_try_mode.png (100%) rename {assets => src/assets}/images/0_74_io_signatures.png (100%) rename {assets => src/assets}/images/0_74_new_help.png (100%) rename {assets => src/assets}/images/0_75_save_progress.png (100%) rename {assets => src/assets}/images/0_76_explain_cmd.png (100%) rename {assets => src/assets}/images/0_76_inspect_cmd.png (100%) rename {assets => src/assets}/images/0_76_plugin_with_example.png (100%) rename {assets => src/assets}/images/0_76_profile_prompt.png (100%) rename {assets => src/assets}/images/0_76_view_files.png (100%) rename {assets => src/assets}/images/0_79_ide.png (100%) rename {assets => src/assets}/images/0_79_std_log.png (100%) rename {assets => src/assets}/images/0_84_table_compact.png (100%) rename {assets => src/assets}/images/0_84_table_padding.png (100%) rename {assets => src/assets}/images/0_86_completions.gif (100%) rename {assets => src/assets}/images/0_9_0_error_highlight.png (100%) rename {assets => src/assets}/images/bday_4_bulk_convert.jpeg (100%) rename {assets => src/assets}/images/bday_4_grid.png (100%) rename {assets => src/assets}/images/bday_4_hex_colours.png (100%) rename {assets => src/assets}/images/bday_4_subcommand_help.png (100%) rename {assets => src/assets}/images/default.png (100%) rename {assets => src/assets}/images/did_you_mean.png (100%) rename {assets => src/assets}/images/eq_git_branch_completion.gif (100%) rename {.vuepress/public/frontpage => src/assets/images}/fetch-example.png (100%) rename {assets => src/assets}/images/happy_nu_year_2020.png (100%) rename {assets => src/assets}/images/jonathandturner.jpg (100%) rename {assets => src/assets}/images/logo-contest/ellie-mascot.png (100%) rename {assets => src/assets}/images/logo-contest/font-logo.png (100%) rename {assets => src/assets}/images/logo-contest/shell-mascot.png (100%) rename {.vuepress/public/frontpage => src/assets/images}/ls-example.png (100%) rename {.vuepress/public/frontpage => src/assets/images}/miette-example.png (100%) rename {assets => src/assets}/images/nu_error.png (100%) rename {assets => src/assets}/images/nu_error2.png (100%) rename {assets => src/assets}/images/nu_error_metadata.png (100%) rename assets/images/link.png => src/assets/images/nu_icon.png (100%) rename {assets => src/assets}/images/nu_logo.png (100%) rename {assets => src/assets}/images/nu_ls.png (100%) rename {assets => src/assets}/images/nu_ls_filter.png (100%) rename {assets => src/assets}/images/nu_ps_filter.png (100%) rename {assets => src/assets}/images/nushell-autocomplete4.gif (100%) rename {assets => src/assets}/images/nushell_survey_2019_anything_else.png (100%) rename {assets => src/assets}/images/nushell_survey_2019_blockers.png (100%) rename {assets => src/assets}/images/nushell_survey_2019_fave_features.png (100%) rename {assets => src/assets}/images/nushell_survey_2019_needs_work.png (100%) rename {assets => src/assets}/images/nushell_survey_2019_percent.png (100%) rename {assets => src/assets}/images/nushell_survey_2019_stoppers.png (100%) rename {assets => src/assets}/images/nushell_survey_2023_how_install.png (100%) rename {assets => src/assets}/images/nushell_survey_2023_platforms.png (100%) rename {assets => src/assets}/images/nushell_survey_2023_priorities.png (100%) rename {assets => src/assets}/images/nushell_survey_2023_running_nushell.png (100%) rename {assets => src/assets}/images/nushell_survey_2023_use_nushell.png (100%) rename {assets => src/assets}/images/open_cargo.png (100%) rename {assets => src/assets}/images/right_prompt.png (100%) rename {assets => src/assets}/images/right_prompt_default.png (100%) rename {assets => src/assets}/images/two_year_cake.png (100%) rename {assets => src/assets}/images/two_year_stars.png (100%) rename {assets => src/assets}/images/two_year_tweet1.png (100%) rename {assets => src/assets}/images/two_year_tweet2.png (100%) rename {assets => src/assets}/images/two_year_tweet3.png (100%) rename {assets => src/assets}/images/two_year_tweet4.png (100%) rename {assets => src/assets}/images/two_year_tweet5.png (100%) rename {assets => src/assets}/images/two_year_vscode.png (100%) rename {assets => src/assets}/images/utf8_light_table.png (100%) rename {assets => src/assets}/images/utf8_table.png (100%) rename {assets => src/assets}/images/view_source.png (100%) rename {assets => src/assets}/images/year_1_kloc.png (100%) create mode 100644 src/content/config.ts rename {blog => src/content/docs/blog}/2019-08-23-introducing-nushell.md (100%) rename {blog => src/content/docs/blog}/2019-09-24-nushell_0_3_0.md (100%) rename {blog => src/content/docs/blog}/2019-10-15-nushell-0_4_0.md (100%) rename {blog => src/content/docs/blog}/2019-11-05-nushell-0_5_0.md (100%) rename {blog => src/content/docs/blog}/2019-11-23-nushell-survey-results.md (100%) rename {blog => src/content/docs/blog}/2019-11-26-nushell-0_6_0.md (100%) rename {blog => src/content/docs/blog}/2019-12-18-nushell-0_7_0.md (100%) rename {blog => src/content/docs/blog}/2019-12-31-happy-nu-year-2020.md (100%) rename {blog => src/content/docs/blog}/2020-01-07-nushell-0_8_0.md (100%) rename {blog => src/content/docs/blog}/2020-01-28-nushell-0_9_0.md (100%) rename {blog => src/content/docs/blog}/2020-02-18-nushell-0_10_0.md (100%) rename {blog => src/content/docs/blog}/2020-03-10-nushell_0_11_0.md (100%) rename {blog => src/content/docs/blog}/2020-03-31-nushell_0_12_0.md (100%) rename {blog => src/content/docs/blog}/2020-04-21-nushell_0_13_0.md (100%) rename {blog => src/content/docs/blog}/2020-05-12-nushell_0_14_0.md (100%) rename {blog => src/content/docs/blog}/2020-06-09-nushell_0_15_0.md (100%) rename {blog => src/content/docs/blog}/2020-06-30-nushell_0_16_0.md (100%) rename {blog => src/content/docs/blog}/2020-07-21-nushell_0_17_0.md (100%) rename {blog => src/content/docs/blog}/2020-08-11-nushell_0_18.md (100%) rename {blog => src/content/docs/blog}/2020-08-23-year_of_nushell.md (100%) rename {blog => src/content/docs/blog}/2020-09-01-nushell_0_19.md (100%) rename {blog => src/content/docs/blog}/2020-09-22-nushell_0_20.md (100%) rename {blog => src/content/docs/blog}/2020-10-13-nushell_0_21.md (100%) rename {blog => src/content/docs/blog}/2020-11-03-nushell_0_22.md (100%) rename {blog => src/content/docs/blog}/2020-11-24-nushell_0_23.md (100%) rename {blog => src/content/docs/blog}/2020-12-15-nushell_0_24.md (100%) rename {blog => src/content/docs/blog}/2021-01-05-nushell_0_25.md (100%) rename {blog => src/content/docs/blog}/2021-01-26-nushell_0_26.md (100%) rename {blog => src/content/docs/blog}/2021-02-16-nushell_0_27.md (100%) rename {blog => src/content/docs/blog}/2021-03-09-nushell_0_28.md (100%) rename {blog => src/content/docs/blog}/2021-03-30-nushell_0_29.md (100%) rename {blog => src/content/docs/blog}/2021-04-20-nushell_0_30.md (100%) rename {blog => src/content/docs/blog}/2021-05-11-nushell_0_31.md (100%) rename {blog => src/content/docs/blog}/2021-06-01-nushell_0_32.md (100%) rename {blog => src/content/docs/blog}/2021-06-22-nushell_0_33.md (99%) rename {blog => src/content/docs/blog}/2021-07-13-nushell_0_34.md (100%) rename {blog => src/content/docs/blog}/2021-08-03-nushell_0_35.md (100%) rename {blog => src/content/docs/blog}/2021-08-23-two-years-of-nushell.md (100%) rename {blog => src/content/docs/blog}/2021-08-24-nushell_0_36.md (100%) rename {blog => src/content/docs/blog}/2021-09-14-nushell_0_37.md (100%) rename {blog => src/content/docs/blog}/2021-10-05-nushell_0_38.md (100%) rename {blog => src/content/docs/blog}/2021-10-26-nushell_0_39.md (100%) rename {blog => src/content/docs/blog}/2021-11-16-nushell_0_40.md (100%) rename {blog => src/content/docs/blog}/2021-12-07-nushell_0_41.md (100%) rename {blog => src/content/docs/blog}/2021-12-28-nushell_0_42.md (100%) rename {blog => src/content/docs/blog}/2022-01-18-nushell_0_43.md (100%) rename {blog => src/content/docs/blog}/2022-02-08-nushell_0_44.md (100%) rename {blog => src/content/docs/blog}/2022-03-01-nushell_0_59.md (100%) rename {blog => src/content/docs/blog}/2022-03-22-nushell_0_60.md (100%) rename {blog => src/content/docs/blog}/2022-04-12-nushell_0_61.md (100%) rename {blog => src/content/docs/blog}/2022-05-03-nushell_0_62.md (100%) rename {blog => src/content/docs/blog}/2022-05-24-nushell_0_63.md (100%) rename {blog => src/content/docs/blog}/2022-06-14-nushell_0_64.md (100%) rename {blog => src/content/docs/blog}/2022-07-05-nushell-0_65.md (100%) rename {blog => src/content/docs/blog}/2022-07-26-nushell-0_66.md (100%) rename {blog => src/content/docs/blog}/2022-08-16-nushell-0_67.md (100%) rename {blog => src/content/docs/blog}/2022-09-06-nushell-0_68.md (99%) rename {blog => src/content/docs/blog}/2022-09-27-nushell-0_69.md (100%) rename {blog => src/content/docs/blog}/2022-10-18-nushell-0_70.md (100%) rename {blog => src/content/docs/blog}/2022-11-08-nushell-0.71.md (99%) rename {blog => src/content/docs/blog}/2022-11-29-nushell-0.72.md (99%) rename {blog => src/content/docs/blog}/2022-12-20-nushell-0.73.md (99%) rename {blog => src/content/docs/blog}/2023-01-10-nushell_0_74.md (99%) rename {blog => src/content/docs/blog}/2023-01-31-nushell_0_75.md (99%) rename {blog => src/content/docs/blog}/2023-02-21-nushell_0_76.md (99%) rename {blog => src/content/docs/blog}/2023-03-14-nushell_0_77.md (99%) rename {blog => src/content/docs/blog}/2023-04-04-nushell_0_78.md (99%) rename {blog => src/content/docs/blog}/2023-04-25-nushell_0_79.md (99%) rename {blog => src/content/docs/blog}/2023-05-16-nushell_0_80.md (100%) rename {blog => src/content/docs/blog}/2023-06-06-nushell_0_81.md (99%) rename {blog => src/content/docs/blog}/2023-06-27-nushell_0_82.md (99%) rename {blog => src/content/docs/blog}/2023-06-27-road-to-1_0.md (95%) rename {blog => src/content/docs/blog}/2023-07-25-nushell_0_83.md (50%) rename {blog => src/content/docs/blog}/2023-07-30-nushell_0_83_1.md (100%) create mode 100644 src/content/docs/blog/2023-08-22-nushell_0_84_0.md rename {blog => src/content/docs/blog}/2023-08-23-happy-birthday-nushell-4.md (99%) rename {blog => src/content/docs/blog}/2023-09-05-why-uu.md (91%) create mode 100644 src/content/docs/blog/2023-09-19-nushell_0_85_0.md rename {blog => src/content/docs/blog}/2023-10-17-nushell_0_86.md (99%) rename {blog => src/content/docs/blog}/2023-11-14-nushell_0_87_0.md (99%) rename {blog => src/content/docs/blog}/2023-11-16-nushell-2023-survey-results.md (100%) create mode 100644 src/content/docs/blog/2023-12-12-nushell_0_88_0.md rename {blog => src/content/docs/blog}/2023-12-21-logo-contest.md (94%) create mode 100644 src/content/docs/blog/2024-01-09-nushell_0_89_0.md rename {blog => src/content/docs/blog}/2024-02-06-nushell_0_90_0.md (99%) create mode 100644 src/content/docs/blog/README.md rename {book => src/content/docs/book}/3rdpartyprompts.md (98%) rename {book => src/content/docs/book}/advanced.md (98%) rename {book => src/content/docs/book}/aliases.md (91%) rename {book => src/content/docs/book}/background_task.md (94%) create mode 100644 src/content/docs/book/cheat_sheet.mdx rename {book => src/content/docs/book}/coloring_and_theming.md (99%) rename {book => src/content/docs/book}/coming_from_bash.md (61%) rename {book => src/content/docs/book}/coming_from_cmd.md (99%) rename {book => src/content/docs/book}/coming_to_nu.md (96%) rename {book => src/content/docs/book}/command_signature.md (95%) rename {book => src/content/docs/book}/configuration.md (98%) rename {book => src/content/docs/book}/control_flow.md (84%) rename {book => src/content/docs/book}/creating_errors.md (95%) rename {book => src/content/docs/book}/custom_commands.md (87%) rename {book => src/content/docs/book}/custom_completions.md (97%) rename {book => src/content/docs/book}/dataframes.md (93%) rename book/default_shell.md => src/content/docs/book/default_shell.mdx (84%) rename {de => src/content/docs}/book/design_notes.md (96%) rename {book => src/content/docs/book}/environment.md (97%) rename {book => src/content/docs/book}/escaping.md (96%) rename {book => src/content/docs/book}/explore.md (97%) rename {book => src/content/docs/book}/externs.md (98%) rename {book => src/content/docs/book}/getting_started.md (95%) rename {book => src/content/docs/book}/hooks.md (98%) rename {book => src/content/docs/book}/how_nushell_code_gets_run.md (98%) rename book/installation.md => src/content/docs/book/installation.mdx (71%) rename {book => src/content/docs/book}/introduction.md (99%) rename {book => src/content/docs/book}/line_editor.md (98%) rename {book => src/content/docs/book}/loading_data.md (77%) rename {book => src/content/docs/book}/metadata.md (96%) rename {book => src/content/docs/book}/modules.md (85%) rename book/moving_around.md => src/content/docs/book/moving_around.mdx (56%) rename {book => src/content/docs/book}/nu_as_a_shell.md (98%) rename {book => src/content/docs/book}/nu_fundamentals.md (98%) create mode 100644 src/content/docs/book/nushell_map.md rename {book => src/content/docs/book}/nushell_map_functional.md (99%) create mode 100644 src/content/docs/book/nushell_map_imperative.md rename {book => src/content/docs/book}/nushell_operator_map.md (98%) rename {book => src/content/docs/book}/operators.md (88%) rename {book => src/content/docs/book}/overlays.md (96%) rename {book => src/content/docs/book}/parallelism.md (97%) rename {book => src/content/docs/book}/pipelines.md (88%) rename {book => src/content/docs/book}/plugins.md (97%) rename {book => src/content/docs/book}/programming_in_nu.md (93%) create mode 100644 src/content/docs/book/quick_tour.md rename {book => src/content/docs/book}/regular_expressions.md (89%) rename {book => src/content/docs/book}/scripts.md (79%) rename {book => src/content/docs/book}/shells_in_shells.md (98%) rename {book => src/content/docs/book}/standard_library.md (90%) rename {book => src/content/docs/book}/stdout_stderr_exit_codes.md (97%) rename {book => src/content/docs/book}/style_guide.md (98%) rename {book => src/content/docs/book}/testing.md (87%) rename book/thinking_in_nu.md => src/content/docs/book/thinking_in_nu.mdx (90%) rename {book => src/content/docs/book}/types_of_data.md (76%) rename {book => src/content/docs/book}/variables_and_subexpressions.md (82%) rename {book => src/content/docs/book}/working_with_lists.md (79%) rename {book => src/content/docs/book}/working_with_strings.md (84%) rename {book => src/content/docs/book}/working_with_tables.md (92%) rename {commands => src/content/docs/commands}/README.md (71%) rename {commands => src/content/docs/commands}/categories/bits.md (95%) rename {commands => src/content/docs/commands}/categories/bytes.md (95%) rename {commands => src/content/docs/commands}/categories/chart.md (95%) rename {commands => src/content/docs/commands}/categories/conversions.md (96%) rename {commands => src/content/docs/commands}/categories/core.md (95%) rename {commands => src/content/docs/commands}/categories/database.md (96%) rename {commands => src/content/docs/commands}/categories/dataframe.md (96%) rename {commands => src/content/docs/commands}/categories/dataframe_or_lazyframe.md (96%) rename {commands => src/content/docs/commands}/categories/date.md (95%) rename {commands => src/content/docs/commands}/categories/debug.md (95%) rename {commands => src/content/docs/commands}/categories/default.md (96%) rename {commands => src/content/docs/commands}/categories/deprecated.md (96%) rename {commands => src/content/docs/commands}/categories/env.md (95%) rename {commands => src/content/docs/commands}/categories/experimental.md (96%) rename {commands => src/content/docs/commands}/categories/expression.md (96%) rename {commands => src/content/docs/commands}/categories/filesystem.md (96%) rename {commands => src/content/docs/commands}/categories/filters.md (96%) rename {commands => src/content/docs/commands}/categories/formats.md (96%) rename {commands => src/content/docs/commands}/categories/generators.md (96%) rename {commands => src/content/docs/commands}/categories/hash.md (95%) rename {commands => src/content/docs/commands}/categories/history.md (96%) rename {commands => src/content/docs/commands}/categories/lazyframe.md (96%) rename {commands => src/content/docs/commands}/categories/math.md (95%) rename {commands => src/content/docs/commands}/categories/misc.md (95%) rename {commands => src/content/docs/commands}/categories/network.md (96%) rename {commands => src/content/docs/commands}/categories/path.md (95%) rename {commands => src/content/docs/commands}/categories/platform.md (96%) rename {commands => src/content/docs/commands}/categories/prompt.md (96%) rename {commands => src/content/docs/commands}/categories/random.md (96%) rename {commands => src/content/docs/commands}/categories/removed.md (96%) rename {commands => src/content/docs/commands}/categories/shells.md (96%) rename {commands => src/content/docs/commands}/categories/strings.md (96%) rename {commands => src/content/docs/commands}/categories/system.md (96%) rename {commands => src/content/docs/commands}/categories/viewers.md (96%) rename {commands => src/content/docs/commands}/docs/alias.md (78%) rename {commands => src/content/docs/commands}/docs/all.md (84%) rename {commands => src/content/docs/commands}/docs/ansi.md (93%) rename {commands => src/content/docs/commands}/docs/ansi_gradient.md (64%) rename {commands => src/content/docs/commands}/docs/ansi_link.md (64%) rename {commands => src/content/docs/commands}/docs/ansi_strip.md (66%) rename {commands => src/content/docs/commands}/docs/any.md (84%) rename {commands => src/content/docs/commands}/docs/append.md (91%) rename {commands => src/content/docs/commands}/docs/ast.md (82%) rename {commands => src/content/docs/commands}/docs/bits.md (90%) rename {commands => src/content/docs/commands}/docs/bits_and.md (70%) rename {commands => src/content/docs/commands}/docs/bits_not.md (75%) rename {commands => src/content/docs/commands}/docs/bits_or.md (70%) rename {commands => src/content/docs/commands}/docs/bits_rol.md (61%) rename {commands => src/content/docs/commands}/docs/bits_ror.md (62%) rename {commands => src/content/docs/commands}/docs/bits_shl.md (63%) rename {commands => src/content/docs/commands}/docs/bits_shr.md (60%) rename {commands => src/content/docs/commands}/docs/bits_xor.md (70%) rename {commands => src/content/docs/commands}/docs/break.md (94%) rename {commands => src/content/docs/commands}/docs/bytes.md (97%) rename {commands => src/content/docs/commands}/docs/bytes_add.md (76%) rename {commands => src/content/docs/commands}/docs/bytes_at.md (84%) rename {commands => src/content/docs/commands}/docs/bytes_build.md (91%) rename {commands => src/content/docs/commands}/docs/bytes_collect.md (85%) rename {commands => src/content/docs/commands}/docs/bytes_ends-with.md (79%) rename {commands => src/content/docs/commands}/docs/bytes_index-of.md (85%) rename {commands => src/content/docs/commands}/docs/bytes_length.md (71%) rename {commands => src/content/docs/commands}/docs/bytes_remove.md (87%) rename {commands => src/content/docs/commands}/docs/bytes_replace.md (85%) rename {commands => src/content/docs/commands}/docs/bytes_reverse.md (87%) rename {commands => src/content/docs/commands}/docs/bytes_starts-with.md (79%) rename {commands => src/content/docs/commands}/docs/cal.md (61%) rename {commands => src/content/docs/commands}/docs/cd.md (88%) rename {commands => src/content/docs/commands}/docs/char.md (74%) rename {commands => src/content/docs/commands}/docs/clear.md (94%) rename {commands => src/content/docs/commands}/docs/collect.md (79%) rename {commands => src/content/docs/commands}/docs/columns.md (90%) rename {commands => src/content/docs/commands}/docs/commandline.md (55%) rename {commands => src/content/docs/commands}/docs/compact.md (85%) rename {commands => src/content/docs/commands}/docs/complete.md (90%) rename {commands => src/content/docs/commands}/docs/config.md (98%) rename {commands => src/content/docs/commands}/docs/config_env.md (86%) rename {commands => src/content/docs/commands}/docs/config_nu.md (86%) rename {commands => src/content/docs/commands}/docs/config_reset.md (81%) rename {commands => src/content/docs/commands}/docs/const.md (77%) rename {commands => src/content/docs/commands}/docs/continue.md (94%) create mode 100644 src/content/docs/commands/docs/cp.md rename {commands => src/content/docs/commands}/docs/date.md (98%) rename {commands => src/content/docs/commands}/docs/date_format.md (78%) rename {commands => src/content/docs/commands}/docs/date_humanize.md (94%) rename {commands => src/content/docs/commands}/docs/date_list-timezone.md (95%) rename {commands => src/content/docs/commands}/docs/date_now.md (92%) rename {commands => src/content/docs/commands}/docs/date_to-record.md (95%) rename {commands => src/content/docs/commands}/docs/date_to-table.md (97%) rename {commands => src/content/docs/commands}/docs/date_to-timezone.md (84%) rename {commands => src/content/docs/commands}/docs/debug.md (87%) rename {commands => src/content/docs/commands}/docs/debug_info.md (94%) rename {commands => src/content/docs/commands}/docs/decode.md (91%) rename {commands => src/content/docs/commands}/docs/decode_base64.md (57%) rename {commands => src/content/docs/commands}/docs/decode_hex.md (68%) rename {commands => src/content/docs/commands}/docs/def.md (73%) rename {commands => src/content/docs/commands}/docs/default.md (84%) rename {commands => src/content/docs/commands}/docs/describe.md (95%) rename {commands => src/content/docs/commands}/docs/detect_columns.md (85%) rename {commands => src/content/docs/commands}/docs/dfr.md (99%) rename {commands => src/content/docs/commands}/docs/dfr_agg-groups.md (94%) rename {commands => src/content/docs/commands}/docs/dfr_agg.md (94%) rename {commands => src/content/docs/commands}/docs/dfr_all-false.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_all-true.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_append.md (91%) rename {commands => src/content/docs/commands}/docs/dfr_arg-max.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_arg-min.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_arg-sort.md (88%) rename {commands => src/content/docs/commands}/docs/dfr_arg-true.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_arg-unique.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_arg-where.md (92%) rename {commands => src/content/docs/commands}/docs/dfr_as-date.md (71%) rename {commands => src/content/docs/commands}/docs/dfr_as-datetime.md (66%) rename {commands => src/content/docs/commands}/docs/dfr_as.md (93%) rename {commands => src/content/docs/commands}/docs/dfr_cache.md (95%) rename {commands => src/content/docs/commands}/docs/dfr_col.md (91%) rename {commands => src/content/docs/commands}/docs/dfr_collect.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_columns.md (95%) rename {commands => src/content/docs/commands}/docs/dfr_concat-str.md (87%) rename {commands => src/content/docs/commands}/docs/dfr_concatenate.md (90%) rename {commands => src/content/docs/commands}/docs/dfr_contains.md (91%) rename {commands => src/content/docs/commands}/docs/dfr_count-null.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_count.md (95%) rename {commands => src/content/docs/commands}/docs/dfr_cumulative.md (90%) rename {commands => src/content/docs/commands}/docs/dfr_datepart.md (93%) rename {commands => src/content/docs/commands}/docs/dfr_drop-duplicates.md (82%) rename {commands => src/content/docs/commands}/docs/dfr_drop-nulls.md (93%) rename {commands => src/content/docs/commands}/docs/dfr_drop.md (92%) rename {commands => src/content/docs/commands}/docs/dfr_dtypes.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_dummies.md (95%) rename {commands => src/content/docs/commands}/docs/dfr_explode.md (93%) rename {commands => src/content/docs/commands}/docs/dfr_expr-not.md (95%) rename {commands => src/content/docs/commands}/docs/dfr_fetch.md (91%) rename {commands => src/content/docs/commands}/docs/dfr_fill-nan.md (92%) rename {commands => src/content/docs/commands}/docs/dfr_fill-null.md (91%) rename {commands => src/content/docs/commands}/docs/dfr_filter-with.md (91%) rename {commands => src/content/docs/commands}/docs/dfr_filter.md (89%) rename {commands => src/content/docs/commands}/docs/dfr_first.md (91%) rename {commands => src/content/docs/commands}/docs/dfr_flatten.md (93%) rename {commands => src/content/docs/commands}/docs/dfr_get-day.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_get-hour.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_get-minute.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_get-month.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_get-nanosecond.md (95%) rename {commands => src/content/docs/commands}/docs/dfr_get-ordinal.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_get-second.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_get-week.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_get-weekday.md (95%) rename {commands => src/content/docs/commands}/docs/dfr_get-year.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_get.md (91%) rename {commands => src/content/docs/commands}/docs/dfr_group-by.md (95%) rename {commands => src/content/docs/commands}/docs/dfr_implode.md (94%) rename {commands => src/content/docs/commands}/docs/dfr_into-df.md (94%) rename {commands => src/content/docs/commands}/docs/dfr_into-lazy.md (85%) rename {commands => src/content/docs/commands}/docs/dfr_into-nu.md (91%) rename {commands => src/content/docs/commands}/docs/dfr_is-duplicated.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_is-in.md (93%) rename {commands => src/content/docs/commands}/docs/dfr_is-not-null.md (95%) rename {commands => src/content/docs/commands}/docs/dfr_is-null.md (95%) rename {commands => src/content/docs/commands}/docs/dfr_is-unique.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_join.md (82%) rename {commands => src/content/docs/commands}/docs/dfr_last.md (92%) rename {commands => src/content/docs/commands}/docs/dfr_lit.md (91%) rename {commands => src/content/docs/commands}/docs/dfr_lowercase.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_ls.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_max.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_mean.md (97%) rename {commands => src/content/docs/commands}/docs/dfr_median.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_melt.md (83%) rename {commands => src/content/docs/commands}/docs/dfr_min.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_n-unique.md (95%) rename {commands => src/content/docs/commands}/docs/dfr_not.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_open.md (53%) rename {commands => src/content/docs/commands}/docs/dfr_otherwise.md (90%) rename {commands => src/content/docs/commands}/docs/dfr_quantile.md (91%) rename {commands => src/content/docs/commands}/docs/dfr_query.md (94%) rename {commands => src/content/docs/commands}/docs/dfr_rename.md (88%) rename {commands => src/content/docs/commands}/docs/dfr_replace-all.md (87%) rename {commands => src/content/docs/commands}/docs/dfr_replace.md (87%) rename {commands => src/content/docs/commands}/docs/dfr_reverse.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_rolling.md (92%) rename {commands => src/content/docs/commands}/docs/dfr_sample.md (74%) rename {commands => src/content/docs/commands}/docs/dfr_schema.md (90%) rename {commands => src/content/docs/commands}/docs/dfr_select.md (90%) rename {commands => src/content/docs/commands}/docs/dfr_set-with-idx.md (86%) rename {commands => src/content/docs/commands}/docs/dfr_set.md (88%) rename {commands => src/content/docs/commands}/docs/dfr_shape.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_shift.md (87%) rename {commands => src/content/docs/commands}/docs/dfr_slice.md (90%) rename {commands => src/content/docs/commands}/docs/dfr_sort-by.md (82%) rename {commands => src/content/docs/commands}/docs/dfr_std.md (97%) rename {commands => src/content/docs/commands}/docs/dfr_str-lengths.md (95%) rename {commands => src/content/docs/commands}/docs/dfr_str-slice.md (90%) rename {commands => src/content/docs/commands}/docs/dfr_strftime.md (94%) rename {commands => src/content/docs/commands}/docs/dfr_sum.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_summary.md (95%) rename {commands => src/content/docs/commands}/docs/dfr_take.md (92%) rename {commands => src/content/docs/commands}/docs/dfr_to-arrow.md (90%) rename {commands => src/content/docs/commands}/docs/dfr_to-avro.md (83%) rename {commands => src/content/docs/commands}/docs/dfr_to-csv.md (81%) rename {commands => src/content/docs/commands}/docs/dfr_to-jsonl.md (90%) rename {commands => src/content/docs/commands}/docs/dfr_to-parquet.md (90%) rename {commands => src/content/docs/commands}/docs/dfr_unique.md (78%) rename {commands => src/content/docs/commands}/docs/dfr_uppercase.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_value-counts.md (96%) rename {commands => src/content/docs/commands}/docs/dfr_var.md (97%) rename {commands => src/content/docs/commands}/docs/dfr_when.md (87%) rename {commands => src/content/docs/commands}/docs/dfr_with-column.md (90%) rename {commands => src/content/docs/commands}/docs/do.md (71%) rename {commands => src/content/docs/commands}/docs/drop.md (89%) rename {commands => src/content/docs/commands}/docs/drop_column.md (90%) rename {commands => src/content/docs/commands}/docs/drop_nth.md (83%) rename {commands => src/content/docs/commands}/docs/du.md (62%) rename {commands => src/content/docs/commands}/docs/each.md (90%) rename {commands => src/content/docs/commands}/docs/each_while.md (83%) rename {commands => src/content/docs/commands}/docs/echo.md (87%) rename {commands => src/content/docs/commands}/docs/encode.md (88%) rename {commands => src/content/docs/commands}/docs/encode_base64.md (61%) rename {commands => src/content/docs/commands}/docs/encode_hex.md (60%) rename {commands => src/content/docs/commands}/docs/enter.md (84%) rename {commands => src/content/docs/commands}/docs/enumerate.md (95%) rename {commands => src/content/docs/commands}/docs/error_make.md (92%) rename {commands => src/content/docs/commands}/docs/every.md (76%) rename {commands => src/content/docs/commands}/docs/exec.md (86%) rename {commands => src/content/docs/commands}/docs/exit.md (84%) rename {commands => src/content/docs/commands}/docs/explain.md (89%) rename {commands => src/content/docs/commands}/docs/explore.md (72%) rename {commands => src/content/docs/commands}/docs/export-env.md (87%) rename {commands => src/content/docs/commands}/docs/export.md (95%) rename {commands => src/content/docs/commands}/docs/export_alias.md (80%) rename {commands => src/content/docs/commands}/docs/export_const.md (79%) rename {commands => src/content/docs/commands}/docs/export_def.md (66%) rename {commands => src/content/docs/commands}/docs/export_extern.md (81%) rename {commands => src/content/docs/commands}/docs/export_module.md (79%) rename {commands => src/content/docs/commands}/docs/export_use.md (80%) rename {commands => src/content/docs/commands}/docs/extern.md (81%) rename {commands => src/content/docs/commands}/docs/fill.md (72%) rename {commands => src/content/docs/commands}/docs/filter.md (87%) rename {commands => src/content/docs/commands}/docs/find.md (83%) rename {commands => src/content/docs/commands}/docs/first.md (82%) rename {commands => src/content/docs/commands}/docs/flatten.md (89%) rename {commands => src/content/docs/commands}/docs/fmt.md (86%) rename {commands => src/content/docs/commands}/docs/for.md (73%) rename {commands => src/content/docs/commands}/docs/format.md (93%) rename {commands => src/content/docs/commands}/docs/format_date.md (87%) rename {commands => src/content/docs/commands}/docs/format_duration.md (72%) rename {commands => src/content/docs/commands}/docs/format_filesize.md (78%) rename {commands => src/content/docs/commands}/docs/format_pattern.md (71%) rename {commands => src/content/docs/commands}/docs/from.md (98%) rename {commands => src/content/docs/commands}/docs/from_csv.md (67%) rename {commands => src/content/docs/commands}/docs/from_eml.md (96%) rename {commands => src/content/docs/commands}/docs/from_ics.md (98%) rename {commands => src/content/docs/commands}/docs/from_ini.md (96%) rename {commands => src/content/docs/commands}/docs/from_json.md (87%) rename {commands => src/content/docs/commands}/docs/from_nuon.md (95%) rename {commands => src/content/docs/commands}/docs/from_ods.md (87%) rename {commands => src/content/docs/commands}/docs/from_ssv.md (86%) rename {commands => src/content/docs/commands}/docs/from_toml.md (95%) rename {commands => src/content/docs/commands}/docs/from_tsv.md (74%) rename {commands => src/content/docs/commands}/docs/from_url.md (85%) rename {commands => src/content/docs/commands}/docs/from_vcf.md (98%) rename {commands => src/content/docs/commands}/docs/from_xlsx.md (87%) rename {commands => src/content/docs/commands}/docs/from_xml.md (95%) rename {commands => src/content/docs/commands}/docs/from_yaml.md (96%) rename {commands => src/content/docs/commands}/docs/from_yml.md (96%) rename {commands => src/content/docs/commands}/docs/g.md (87%) rename {commands => src/content/docs/commands}/docs/generate.md (87%) rename {commands => src/content/docs/commands}/docs/get.md (74%) rename {commands => src/content/docs/commands}/docs/glob.md (68%) rename {commands => src/content/docs/commands}/docs/grid.md (79%) rename {commands => src/content/docs/commands}/docs/group-by.md (92%) rename {commands => src/content/docs/commands}/docs/group.md (85%) rename {commands => src/content/docs/commands}/docs/gstat.md (90%) rename {commands => src/content/docs/commands}/docs/hash.md (93%) rename {commands => src/content/docs/commands}/docs/hash_md5.md (84%) rename {commands => src/content/docs/commands}/docs/hash_sha256.md (86%) rename {commands => src/content/docs/commands}/docs/headers.md (91%) rename {commands => src/content/docs/commands}/docs/help.md (87%) rename {commands => src/content/docs/commands}/docs/help_aliases.md (79%) rename {commands => src/content/docs/commands}/docs/help_commands.md (75%) rename {commands => src/content/docs/commands}/docs/help_escapes.md (94%) rename {commands => src/content/docs/commands}/docs/help_externs.md (79%) rename {commands => src/content/docs/commands}/docs/help_modules.md (82%) rename {commands => src/content/docs/commands}/docs/help_operators.md (93%) rename {commands => src/content/docs/commands}/docs/hide-env.md (79%) rename {commands => src/content/docs/commands}/docs/hide.md (80%) rename {commands => src/content/docs/commands}/docs/histogram.md (83%) rename {commands => src/content/docs/commands}/docs/history.md (86%) rename {commands => src/content/docs/commands}/docs/history_session.md (93%) rename {commands => src/content/docs/commands}/docs/http.md (95%) rename {commands => src/content/docs/commands}/docs/http_delete.md (55%) rename {commands => src/content/docs/commands}/docs/http_get.md (57%) rename {commands => src/content/docs/commands}/docs/http_head.md (60%) rename {commands => src/content/docs/commands}/docs/http_options.md (73%) rename {commands => src/content/docs/commands}/docs/http_patch.md (53%) rename {commands => src/content/docs/commands}/docs/http_post.md (53%) rename {commands => src/content/docs/commands}/docs/http_put.md (53%) rename {commands => src/content/docs/commands}/docs/if.md (76%) rename {commands => src/content/docs/commands}/docs/ignore.md (95%) rename {commands => src/content/docs/commands}/docs/inc.md (68%) rename {commands => src/content/docs/commands}/docs/input.md (75%) rename {commands => src/content/docs/commands}/docs/input_list.md (71%) rename {commands => src/content/docs/commands}/docs/input_listen.md (65%) rename {commands => src/content/docs/commands}/docs/insert.md (87%) rename {commands => src/content/docs/commands}/docs/inspect.md (94%) rename {commands => src/content/docs/commands}/docs/into.md (97%) rename {commands => src/content/docs/commands}/docs/into_binary.md (90%) rename {commands => src/content/docs/commands}/docs/into_bits.md (84%) rename {commands => src/content/docs/commands}/docs/into_bool.md (74%) rename {commands => src/content/docs/commands}/docs/into_cell-path.md (73%) rename {commands => src/content/docs/commands}/docs/into_datetime.md (68%) rename {commands => src/content/docs/commands}/docs/into_duration.md (83%) rename {commands => src/content/docs/commands}/docs/into_filesize.md (73%) rename {commands => src/content/docs/commands}/docs/into_float.md (72%) rename {commands => src/content/docs/commands}/docs/into_int.md (67%) rename {commands => src/content/docs/commands}/docs/into_record.md (88%) rename {commands => src/content/docs/commands}/docs/into_sqlite.md (83%) rename {commands => src/content/docs/commands}/docs/into_string.md (65%) rename {commands => src/content/docs/commands}/docs/into_value.md (87%) rename {commands => src/content/docs/commands}/docs/is-admin.md (95%) rename {commands => src/content/docs/commands}/docs/is-empty.md (85%) rename {commands => src/content/docs/commands}/docs/is-terminal.md (80%) rename {commands => src/content/docs/commands}/docs/items.md (87%) rename {commands => src/content/docs/commands}/docs/join.md (65%) rename {commands => src/content/docs/commands}/docs/keybindings.md (94%) rename {commands => src/content/docs/commands}/docs/keybindings_default.md (92%) rename {commands => src/content/docs/commands}/docs/keybindings_list.md (75%) rename {commands => src/content/docs/commands}/docs/keybindings_listen.md (90%) rename {commands => src/content/docs/commands}/docs/kill.md (66%) rename {commands => src/content/docs/commands}/docs/last.md (83%) rename {commands => src/content/docs/commands}/docs/lazy_make.md (67%) rename {commands => src/content/docs/commands}/docs/length.md (87%) rename {commands => src/content/docs/commands}/docs/let-env.md (81%) rename {commands => src/content/docs/commands}/docs/let.md (79%) rename {commands => src/content/docs/commands}/docs/lines.md (84%) rename {commands => src/content/docs/commands}/docs/load-env.md (88%) rename {commands => src/content/docs/commands}/docs/loop.md (90%) rename {commands => src/content/docs/commands}/docs/ls.md (64%) rename {commands => src/content/docs/commands}/docs/match.md (85%) rename {commands => src/content/docs/commands}/docs/math.md (99%) rename {commands => src/content/docs/commands}/docs/math_abs.md (80%) rename {commands => src/content/docs/commands}/docs/math_arccos.md (65%) rename {commands => src/content/docs/commands}/docs/math_arccosh.md (68%) rename {commands => src/content/docs/commands}/docs/math_arcsin.md (65%) rename {commands => src/content/docs/commands}/docs/math_arcsinh.md (68%) rename {commands => src/content/docs/commands}/docs/math_arctan.md (66%) rename {commands => src/content/docs/commands}/docs/math_arctanh.md (68%) rename {commands => src/content/docs/commands}/docs/math_avg.md (73%) rename {commands => src/content/docs/commands}/docs/math_ceil.md (85%) rename {commands => src/content/docs/commands}/docs/math_cos.md (72%) rename {commands => src/content/docs/commands}/docs/math_cosh.md (69%) rename {commands => src/content/docs/commands}/docs/math_exp.md (69%) rename {commands => src/content/docs/commands}/docs/math_floor.md (85%) rename {commands => src/content/docs/commands}/docs/math_ln.md (69%) rename {commands => src/content/docs/commands}/docs/math_log.md (78%) rename {commands => src/content/docs/commands}/docs/math_max.md (82%) rename {commands => src/content/docs/commands}/docs/math_median.md (80%) rename {commands => src/content/docs/commands}/docs/math_min.md (81%) rename {commands => src/content/docs/commands}/docs/math_mode.md (88%) rename {commands => src/content/docs/commands}/docs/math_product.md (81%) rename {commands => src/content/docs/commands}/docs/math_round.md (84%) rename {commands => src/content/docs/commands}/docs/math_sin.md (73%) rename {commands => src/content/docs/commands}/docs/math_sinh.md (68%) rename {commands => src/content/docs/commands}/docs/math_sqrt.md (83%) rename {commands => src/content/docs/commands}/docs/math_stddev.md (79%) rename {commands => src/content/docs/commands}/docs/math_sum.md (80%) rename {commands => src/content/docs/commands}/docs/math_tan.md (71%) rename {commands => src/content/docs/commands}/docs/math_tanh.md (65%) rename {commands => src/content/docs/commands}/docs/math_variance.md (78%) rename {commands => src/content/docs/commands}/docs/merge.md (91%) rename {commands => src/content/docs/commands}/docs/metadata.md (85%) rename {commands => src/content/docs/commands}/docs/mkdir.md (83%) rename {commands => src/content/docs/commands}/docs/mktemp.md (68%) rename {commands => src/content/docs/commands}/docs/module.md (81%) rename {commands => src/content/docs/commands}/docs/move.md (87%) rename {commands => src/content/docs/commands}/docs/mut.md (81%) rename {commands => src/content/docs/commands}/docs/mv.md (59%) rename {commands => src/content/docs/commands}/docs/n.md (93%) rename {commands => src/content/docs/commands}/docs/nu-check.md (75%) rename {commands => src/content/docs/commands}/docs/nu-highlight.md (93%) rename {commands => src/content/docs/commands}/docs/open.md (82%) rename {commands => src/content/docs/commands}/docs/overlay.md (83%) rename {commands => src/content/docs/commands}/docs/overlay_hide.md (76%) rename {commands => src/content/docs/commands}/docs/overlay_list.md (79%) rename {commands => src/content/docs/commands}/docs/overlay_new.md (85%) rename {commands => src/content/docs/commands}/docs/overlay_use.md (74%) rename {commands => src/content/docs/commands}/docs/p.md (94%) rename {commands => src/content/docs/commands}/docs/par-each.md (82%) rename {commands => src/content/docs/commands}/docs/parse.md (91%) rename {commands => src/content/docs/commands}/docs/path.md (89%) rename {commands => src/content/docs/commands}/docs/path_basename.md (77%) rename {commands => src/content/docs/commands}/docs/path_dirname.md (76%) rename {commands => src/content/docs/commands}/docs/path_exists.md (81%) rename {commands => src/content/docs/commands}/docs/path_expand.md (74%) rename {commands => src/content/docs/commands}/docs/path_join.md (79%) rename {commands => src/content/docs/commands}/docs/path_parse.md (86%) rename {commands => src/content/docs/commands}/docs/path_relative-to.md (83%) rename {commands => src/content/docs/commands}/docs/path_split.md (89%) rename {commands => src/content/docs/commands}/docs/path_type.md (78%) rename {commands => src/content/docs/commands}/docs/port.md (81%) rename {commands => src/content/docs/commands}/docs/prepend.md (91%) rename {commands => src/content/docs/commands}/docs/print.md (76%) rename {commands => src/content/docs/commands}/docs/ps.md (87%) rename {commands => src/content/docs/commands}/docs/query.md (69%) rename {commands => src/content/docs/commands}/docs/query_db.md (87%) rename {commands => src/content/docs/commands}/docs/query_json.md (91%) rename {commands => src/content/docs/commands}/docs/query_web.md (77%) rename {commands => src/content/docs/commands}/docs/query_xml.md (89%) rename {commands => src/content/docs/commands}/docs/random.md (95%) rename {commands => src/content/docs/commands}/docs/random_bool.md (85%) rename {commands => src/content/docs/commands}/docs/random_chars.md (87%) rename {commands => src/content/docs/commands}/docs/random_dice.md (74%) rename {commands => src/content/docs/commands}/docs/random_float.md (88%) rename {commands => src/content/docs/commands}/docs/random_int.md (88%) rename {commands => src/content/docs/commands}/docs/random_uuid.md (93%) rename {commands => src/content/docs/commands}/docs/range.md (85%) rename {commands => src/content/docs/commands}/docs/reduce.md (84%) rename {commands => src/content/docs/commands}/docs/register.md (74%) rename {commands => src/content/docs/commands}/docs/registry_query.md (51%) rename {commands => src/content/docs/commands}/docs/reject.md (89%) rename {commands => src/content/docs/commands}/docs/rename.md (88%) rename {commands => src/content/docs/commands}/docs/return.md (81%) rename {commands => src/content/docs/commands}/docs/reverse.md (88%) rename {commands => src/content/docs/commands}/docs/rm.md (59%) rename {commands => src/content/docs/commands}/docs/roll.md (87%) rename {commands => src/content/docs/commands}/docs/roll_down.md (79%) rename {commands => src/content/docs/commands}/docs/roll_left.md (83%) rename {commands => src/content/docs/commands}/docs/roll_right.md (82%) rename {commands => src/content/docs/commands}/docs/roll_up.md (79%) rename {commands => src/content/docs/commands}/docs/rotate.md (92%) rename {commands => src/content/docs/commands}/docs/run-external.md (62%) rename {commands => src/content/docs/commands}/docs/save.md (71%) rename {commands => src/content/docs/commands}/docs/schema.md (94%) rename {commands => src/content/docs/commands}/docs/scope.md (98%) rename {commands => src/content/docs/commands}/docs/scope_aliases.md (93%) rename {commands => src/content/docs/commands}/docs/scope_commands.md (93%) rename {commands => src/content/docs/commands}/docs/scope_engine-stats.md (93%) rename {commands => src/content/docs/commands}/docs/scope_externs.md (94%) rename {commands => src/content/docs/commands}/docs/scope_modules.md (93%) rename {commands => src/content/docs/commands}/docs/scope_variables.md (93%) rename {commands => src/content/docs/commands}/docs/select.md (85%) rename {commands => src/content/docs/commands}/docs/seq.md (89%) rename {commands => src/content/docs/commands}/docs/seq_char.md (78%) rename {commands => src/content/docs/commands}/docs/seq_date.md (75%) rename {commands => src/content/docs/commands}/docs/shells.md (92%) rename {commands => src/content/docs/commands}/docs/shuffle.md (86%) rename {commands => src/content/docs/commands}/docs/skip.md (87%) rename {commands => src/content/docs/commands}/docs/skip_until.md (83%) rename {commands => src/content/docs/commands}/docs/skip_while.md (84%) rename {commands => src/content/docs/commands}/docs/sleep.md (83%) rename {commands => src/content/docs/commands}/docs/sort-by.md (72%) rename {commands => src/content/docs/commands}/docs/sort.md (79%) rename {commands => src/content/docs/commands}/docs/source-env.md (84%) rename {commands => src/content/docs/commands}/docs/source.md (83%) rename {commands => src/content/docs/commands}/docs/split-by.md (97%) rename {commands => src/content/docs/commands}/docs/split.md (95%) rename {commands => src/content/docs/commands}/docs/split_chars.md (82%) rename {commands => src/content/docs/commands}/docs/split_column.md (85%) rename {commands => src/content/docs/commands}/docs/split_list.md (90%) rename {commands => src/content/docs/commands}/docs/split_row.md (78%) rename {commands => src/content/docs/commands}/docs/split_words.md (73%) rename {commands => src/content/docs/commands}/docs/start.md (89%) rename {commands => src/content/docs/commands}/docs/stor.md (98%) rename {commands => src/content/docs/commands}/docs/stor_create.md (81%) rename {commands => src/content/docs/commands}/docs/stor_delete.md (79%) rename {commands => src/content/docs/commands}/docs/stor_export.md (85%) rename {commands => src/content/docs/commands}/docs/stor_import.md (85%) rename {commands => src/content/docs/commands}/docs/stor_insert.md (79%) rename {commands => src/content/docs/commands}/docs/stor_open.md (94%) rename {commands => src/content/docs/commands}/docs/stor_reset.md (94%) rename {commands => src/content/docs/commands}/docs/stor_update.md (73%) rename {commands => src/content/docs/commands}/docs/str.md (97%) rename {commands => src/content/docs/commands}/docs/str_camel-case.md (70%) rename {commands => src/content/docs/commands}/docs/str_capitalize.md (74%) rename {commands => src/content/docs/commands}/docs/str_contains.md (80%) rename {commands => src/content/docs/commands}/docs/str_distance.md (84%) rename {commands => src/content/docs/commands}/docs/str_downcase.md (77%) rename {commands => src/content/docs/commands}/docs/str_ends-with.md (68%) rename {commands => src/content/docs/commands}/docs/str_escape-glob.md (64%) rename {commands => src/content/docs/commands}/docs/str_expand.md (89%) rename {commands => src/content/docs/commands}/docs/str_index-of.md (62%) rename {commands => src/content/docs/commands}/docs/str_join.md (79%) rename {commands => src/content/docs/commands}/docs/str_kebab-case.md (71%) rename {commands => src/content/docs/commands}/docs/str_length.md (62%) rename {commands => src/content/docs/commands}/docs/str_pascal-case.md (70%) rename {commands => src/content/docs/commands}/docs/str_replace.md (75%) rename {commands => src/content/docs/commands}/docs/str_reverse.md (72%) rename {commands => src/content/docs/commands}/docs/str_screaming-snake-case.md (72%) rename {commands => src/content/docs/commands}/docs/str_snake-case.md (71%) rename {commands => src/content/docs/commands}/docs/str_starts-with.md (67%) rename {commands => src/content/docs/commands}/docs/str_stats.md (96%) rename {commands => src/content/docs/commands}/docs/str_substring.md (61%) rename {commands => src/content/docs/commands}/docs/str_title-case.md (70%) rename {commands => src/content/docs/commands}/docs/str_trim.md (64%) rename {commands => src/content/docs/commands}/docs/str_upcase.md (63%) rename {commands => src/content/docs/commands}/docs/sys.md (92%) rename {commands => src/content/docs/commands}/docs/table.md (65%) rename {commands => src/content/docs/commands}/docs/take.md (84%) rename {commands => src/content/docs/commands}/docs/take_until.md (84%) rename {commands => src/content/docs/commands}/docs/take_while.md (84%) rename {commands => src/content/docs/commands}/docs/term_size.md (84%) rename {commands => src/content/docs/commands}/docs/timeit.md (87%) rename {commands => src/content/docs/commands}/docs/to.md (96%) rename {commands => src/content/docs/commands}/docs/to_csv.md (80%) rename {commands => src/content/docs/commands}/docs/to_html.md (67%) rename {commands => src/content/docs/commands}/docs/to_json.md (81%) rename {commands => src/content/docs/commands}/docs/to_md.md (83%) rename {commands => src/content/docs/commands}/docs/to_nuon.md (80%) rename {commands => src/content/docs/commands}/docs/to_text.md (92%) rename {commands => src/content/docs/commands}/docs/to_toml.md (95%) rename {commands => src/content/docs/commands}/docs/to_tsv.md (86%) rename {commands => src/content/docs/commands}/docs/to_xml.md (86%) rename {commands => src/content/docs/commands}/docs/to_yaml.md (95%) rename {commands => src/content/docs/commands}/docs/touch.md (60%) rename {commands => src/content/docs/commands}/docs/transpose.md (77%) rename {commands => src/content/docs/commands}/docs/try.md (82%) rename {commands => src/content/docs/commands}/docs/tutor.md (78%) rename {commands => src/content/docs/commands}/docs/ulimit.md (56%) rename {commands => src/content/docs/commands}/docs/umkdir.md (83%) rename {commands => src/content/docs/commands}/docs/umv.md (67%) rename {commands => src/content/docs/commands}/docs/uniq-by.md (68%) rename {commands => src/content/docs/commands}/docs/uniq.md (79%) rename {commands => src/content/docs/commands}/docs/update.md (87%) rename {commands => src/content/docs/commands}/docs/update_cells.md (92%) rename {commands => src/content/docs/commands}/docs/upsert.md (85%) rename {commands => src/content/docs/commands}/docs/url.md (98%) rename {commands => src/content/docs/commands}/docs/url_build-query.md (93%) rename {commands => src/content/docs/commands}/docs/url_decode.md (78%) rename {commands => src/content/docs/commands}/docs/url_encode.md (76%) rename {commands => src/content/docs/commands}/docs/url_join.md (96%) rename {commands => src/content/docs/commands}/docs/url_parse.md (95%) rename {commands => src/content/docs/commands}/docs/use.md (85%) rename {commands => src/content/docs/commands}/docs/values.md (94%) rename {commands => src/content/docs/commands}/docs/version.md (94%) rename {commands => src/content/docs/commands}/docs/view.md (93%) rename {commands => src/content/docs/commands}/docs/view_files.md (88%) rename {commands => src/content/docs/commands}/docs/view_source.md (90%) rename {commands => src/content/docs/commands}/docs/view_span.md (87%) rename {commands => src/content/docs/commands}/docs/watch.md (59%) rename {commands => src/content/docs/commands}/docs/where.md (85%) rename {commands => src/content/docs/commands}/docs/which.md (79%) rename {commands => src/content/docs/commands}/docs/while.md (83%) rename {commands => src/content/docs/commands}/docs/whoami.md (95%) rename {commands => src/content/docs/commands}/docs/window.md (87%) rename {commands => src/content/docs/commands}/docs/with-env.md (82%) rename {commands => src/content/docs/commands}/docs/wrap.md (84%) rename {commands => src/content/docs/commands}/docs/zip.md (89%) rename {contributor-book => src/content/docs/contributor-book}/README.md (100%) rename {contributor-book => src/content/docs/contributor-book}/commands.md (100%) rename {contributor-book => src/content/docs/contributor-book}/philosophy.md (100%) rename {contributor-book => src/content/docs/contributor-book}/philosophy_0_80.md (100%) rename {contributor-book => src/content/docs/contributor-book}/plugins.md (99%) rename {cookbook => src/content/docs/cookbook}/README.md (65%) rename {cookbook => src/content/docs/cookbook}/direnv.md (98%) rename {cookbook => src/content/docs/cookbook}/external_completers.md (98%) rename {cookbook => src/content/docs/cookbook}/files.md (97%) rename {cookbook => src/content/docs/cookbook}/git.md (99%) rename {cookbook => src/content/docs/cookbook}/help.md (98%) rename {cookbook => src/content/docs/cookbook}/http.md (99%) rename {cookbook => src/content/docs/cookbook}/jq_v_nushell.md (98%) rename {cookbook => src/content/docs/cookbook}/parsing.md (98%) rename {cookbook => src/content/docs/cookbook}/parsing_git_log.md (99%) rename {cookbook => src/content/docs/cookbook}/pattern_matching.md (97%) rename {cookbook => src/content/docs/cookbook}/polars_v_pandas_v_nushell.md (99%) rename {cookbook => src/content/docs/cookbook}/setup.md (99%) rename {cookbook => src/content/docs/cookbook}/ssh_agent.md (98%) rename {cookbook => src/content/docs/cookbook}/system.md (99%) rename {cookbook => src/content/docs/cookbook}/tables.md (98%) create mode 100644 src/content/docs/index.mdx rename book/README.md => src/content/docs/introduction.md (99%) rename {snippets => src/content/docs/snippets}/book/std_log.nu (100%) rename {snippets => src/content/docs/snippets}/installation/build_nu_from_source.sh (100%) rename {snippets => src/content/docs/snippets}/installation/build_nu_from_source_release.sh (100%) rename {snippets => src/content/docs/snippets}/installation/build_nu_yourself.sh (100%) rename {snippets => src/content/docs/snippets}/installation/cargo_install_nu.sh (100%) rename {snippets => src/content/docs/snippets}/installation/cargo_install_nu_more_features.sh (100%) rename {snippets => src/content/docs/snippets}/installation/chsh_invalid_shell_error.sh (100%) rename {snippets => src/content/docs/snippets}/installation/git_clone_nu.sh (100%) rename {snippets => src/content/docs/snippets}/installation/install_pkg_config_libssl_dev.sh (100%) rename {snippets => src/content/docs/snippets}/installation/install_rhel_dependencies.sh (100%) rename {snippets => src/content/docs/snippets}/installation/macos_deps.sh (100%) rename {snippets => src/content/docs/snippets}/installation/remove_welcome_message.nu (100%) rename {snippets => src/content/docs/snippets}/installation/run_nu.sh (100%) rename {snippets => src/content/docs/snippets}/installation/rustup_choose_rust_version.sh (100%) rename {snippets => src/content/docs/snippets}/installation/use_rawkey_and_clipboard.sh (100%) rename {snippets => src/content/docs/snippets}/installation/windows_change_default_profile.sh (100%) rename {snippets => src/content/docs/snippets}/installation/windows_example_extraction_location.sh (100%) rename {snippets => src/content/docs/snippets}/installation/windows_run_nu.sh (100%) rename {snippets => src/content/docs/snippets}/installation/windows_terminal_default_shell.sh (100%) rename {snippets => src/content/docs/snippets}/introduction/date_example.sh (100%) rename {snippets => src/content/docs/snippets}/introduction/date_table_example.sh (100%) rename {snippets => src/content/docs/snippets}/introduction/help_example.sh (100%) rename {snippets => src/content/docs/snippets}/introduction/ls_example.sh (100%) rename {snippets => src/content/docs/snippets}/introduction/ls_sort_by_reverse_example.sh (100%) rename {snippets => src/content/docs/snippets}/introduction/ls_where_example.sh (100%) rename {snippets => src/content/docs/snippets}/introduction/ps_example.sh (100%) rename {snippets => src/content/docs/snippets}/introduction/ps_where_example.sh (100%) rename {snippets => src/content/docs/snippets}/introduction/sys_example.sh (100%) rename {snippets => src/content/docs/snippets}/introduction/sys_get_example.sh (100%) rename {snippets => src/content/docs/snippets}/introduction/sys_get_external_echo_example.sh (100%) rename {snippets => src/content/docs/snippets}/introduction/sys_get_nested_example.sh (100%) rename {snippets => src/content/docs/snippets}/loading_data/cargo-toml.sh (100%) rename {snippets => src/content/docs/snippets}/loading_data/rust-lang-feed.sh (100%) rename {snippets => src/content/docs/snippets}/loading_data/vscode.sh (100%) rename {snippets => src/content/docs/snippets}/moving_around/cd_example.sh (100%) rename {snippets => src/content/docs/snippets}/moving_around/cd_without_command_example.sh (100%) rename {snippets => src/content/docs/snippets}/moving_around/cp_example.sh (100%) rename {snippets => src/content/docs/snippets}/moving_around/ls_deep_glob_example.sh (100%) rename {snippets => src/content/docs/snippets}/moving_around/ls_example.sh (100%) rename {snippets => src/content/docs/snippets}/moving_around/ls_shallow_glob_example.sh (100%) rename {snippets => src/content/docs/snippets}/moving_around/mkdir_example.sh (100%) rename {snippets => src/content/docs/snippets}/moving_around/mv_example.sh (100%) rename {snippets => src/content/docs/snippets}/moving_around/rm_example.sh (100%) rename {snippets => src/content/docs/snippets}/types_of_data/cell-paths.sh (100%) create mode 100644 src/env.d.ts create mode 100644 src/styles/index.css delete mode 100644 tr/README.md delete mode 100644 tr/book/README.md create mode 100644 tsconfig.json delete mode 100755 zh-CN/README.md delete mode 100644 zh-CN/book/3rdpartyprompts.md delete mode 100644 zh-CN/book/README.md delete mode 100644 zh-CN/book/aliases.md delete mode 100644 zh-CN/book/coloring_and_theming.md delete mode 100644 zh-CN/book/coming_from_bash.md delete mode 100644 zh-CN/book/command_reference.md delete mode 100644 zh-CN/book/configuration.md delete mode 100644 zh-CN/book/creating_errors.md delete mode 100644 zh-CN/book/custom_commands.md delete mode 100644 zh-CN/book/custom_completions.md delete mode 100644 zh-CN/book/dataframes.md delete mode 100644 zh-CN/book/environment.md delete mode 100644 zh-CN/book/escaping.md delete mode 100644 zh-CN/book/externs.md delete mode 100644 zh-CN/book/hooks.md delete mode 100644 zh-CN/book/installation.md delete mode 100644 zh-CN/book/introduction.md delete mode 100644 zh-CN/book/line_editor.md delete mode 100644 zh-CN/book/loading_data.md delete mode 100644 zh-CN/book/metadata.md delete mode 100644 zh-CN/book/modules.md delete mode 100644 zh-CN/book/moving_around.md delete mode 100644 zh-CN/book/nushell_map.md delete mode 100644 zh-CN/book/nushell_map_functional.md delete mode 100644 zh-CN/book/nushell_map_imperative.md delete mode 100644 zh-CN/book/nushell_operator_map.md delete mode 100644 zh-CN/book/operators.md delete mode 100644 zh-CN/book/overlays.md delete mode 100644 zh-CN/book/parallelism.md delete mode 100644 zh-CN/book/pipelines.md delete mode 100644 zh-CN/book/plugins.md delete mode 100644 zh-CN/book/regular_expressions.md delete mode 100644 zh-CN/book/scripts.md delete mode 100644 zh-CN/book/shells_in_shells.md delete mode 100644 zh-CN/book/stdout_stderr_exit_codes.md delete mode 100644 zh-CN/book/table_of_contents.md delete mode 100644 zh-CN/book/thinking_in_nu.md delete mode 100644 zh-CN/book/types_of_data.md delete mode 100644 zh-CN/book/variables_and_subexpressions.md delete mode 100644 zh-CN/book/working_with_lists.md delete mode 100644 zh-CN/book/working_with_strings.md delete mode 100644 zh-CN/book/working_with_tables.md diff --git a/.gitignore b/.gitignore index 84bf662d1a2..6240da8b10b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,21 @@ -.temp/ -.cache/ -.DS_Store -node_modules -npm-debug.log -.vuepress/dist/ +# build output +dist/ +# generated types +.astro/ + +# dependencies +node_modules/ + +# logs +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* -# ignore the git mailmap file -.mailmap + +# environment variables +.env +.env.production + +# macOS-specific files +.DS_Store diff --git a/.prettierignore b/.prettierignore index f0002ae865d..925ad3035a1 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,12 +1,32 @@ +# build output +dist +# generated types +.astro + +# dependencies node_modules -package-lock.json - -operators.md -dataframes.md -nushell_map.md -*_bash*.md -commands/docs/*.md -.vuepress/.temp -.vuepress/.cache -.vuepress/dist/ + +# logs +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* + +# environment variables +.env +.env.production + +# macOS-specific files +.DS_Store + +# files +**/*.js +**/*.ts +**/*.cjs +**/*.mjs +**/*.json +**/*.yaml +**/*.yml +!package.json +!tsconfig.json diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 544138be456..00000000000 --- a/.prettierrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "singleQuote": true -} diff --git a/.prettierrc.mjs b/.prettierrc.mjs new file mode 100644 index 00000000000..7e619305dc7 --- /dev/null +++ b/.prettierrc.mjs @@ -0,0 +1,12 @@ +/** @type {import("prettier").Config} */ +export default { + plugins: ["prettier-plugin-astro"], + overrides: [ + { + files: "*.astro", + options: { + parser: "astro", + }, + }, + ], +}; diff --git a/.typos.toml b/.typos.toml deleted file mode 100644 index c281b7ef1bc..00000000000 --- a/.typos.toml +++ /dev/null @@ -1,8 +0,0 @@ - -[files] -extend-exclude = ["pt-BR", "de", "ja", "es", "book/commands"] - -[default.extend-words] -# Avoid the false positive in book/commands/str_replace.md -ons = "ons" -nushell = "nushell" diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000000..22a15055d63 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,4 @@ +{ + "recommendations": ["astro-build.astro-vscode"], + "unwantedRecommendations": [] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000000..d6422097621 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,11 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "command": "./node_modules/.bin/astro dev", + "name": "Development server", + "request": "launch", + "type": "node-terminal" + } + ] +} diff --git a/.vuepress/client.js b/.vuepress/client.js deleted file mode 100755 index 8626e478dcf..00000000000 --- a/.vuepress/client.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Client app enhancement file. - * - * https://v2.vuepress.vuejs.org/advanced/cookbook/usage-of-client-config.html - */ - -import { defineClientConfig } from '@vuepress/client'; -import BlogPosts from './components/BlogPosts.vue'; - -export default defineClientConfig({ - enhance({ app }) { - app.component('BlogPosts', BlogPosts); - }, -}); diff --git a/.vuepress/components/BlogPosts.vue b/.vuepress/components/BlogPosts.vue deleted file mode 100644 index d64a6915842..00000000000 --- a/.vuepress/components/BlogPosts.vue +++ /dev/null @@ -1,76 +0,0 @@ - - - - - diff --git a/.vuepress/config.js b/.vuepress/config.js deleted file mode 100755 index e9b225646c8..00000000000 --- a/.vuepress/config.js +++ /dev/null @@ -1,209 +0,0 @@ -import path from 'path'; -import { defineUserConfig } from '@vuepress/cli'; -import { gitPlugin } from '@vuepress/plugin-git'; -import { feedPlugin } from 'vuepress-plugin-feed2'; -import { shikiPlugin } from '@vuepress/plugin-shiki'; -import { defaultTheme } from '@vuepress/theme-default'; -import { sitemapPlugin } from 'vuepress-plugin-sitemap2'; -import { docsearchPlugin } from '@vuepress/plugin-docsearch'; -import { backToTopPlugin } from '@vuepress/plugin-back-to-top'; -import { mediumZoomPlugin } from '@vuepress/plugin-medium-zoom'; - -import { - navbarDe, - navbarEn, - navbarEs, - navbarJa, - navbarPtBR, - navbarRU, - navbarZhCN, - sidebarDe, - sidebarEn, - sidebarEs, - sidebarJa, - sidebarPtBR, - sidebarRU, - sidebarZhCN, -} from './configs/index.js'; - -const compareDate = (dateA, dateB) => { - if (!dateA || !(dateA instanceof Date)) return 1; - if (!dateB || !(dateB instanceof Date)) return -1; - - return dateB.getTime() - dateA.getTime(); -}; - -export default defineUserConfig({ - locales: { - '/': { - lang: 'English', - title: 'Nushell', - description: 'A new type of shell.', - }, - '/zh-CN/': { - lang: 'zh-CN', - title: 'Nushell', - description: '一种新型的Shell', - }, - '/de/': { - lang: 'Deutsch', - title: 'Nushell', - description: 'Eine neue Art von Shell.', - }, - '/es/': { - lang: 'es', - title: 'Nushell', - description: 'Un nuevo tipo de shell.', - }, - '/ja/': { - lang: 'ja', - title: 'Nushell', - description: '新しいタイプのシェル', - }, - '/pt-BR/': { - lang: 'pt-BR', - title: 'Nushell', - description: 'Um novo tipo de shell.', - }, - '/ru': { - lang: 'ru', - title: 'Nushell', - description: 'Новый тип оболочки.', - }, - }, - head: [ - ['meta', { name: 'theme-color', content: '#3eaf7c' }], - ['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }], - [ - 'meta', - { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }, - ], - ['link', { rel: 'icon', href: '/icon.png' }], - ], - markdown: { - code: { - lineNumbers: false, - }, - importCode: { - handleImportPath: (str) => - str.replace(/^@snippets/, path.resolve(__dirname, '../snippets')), - }, - }, - // without this, we attempt to prefetch the whole site 😬 - shouldPrefetch: false, - theme: defaultTheme({ - repo: 'nushell/nushell', - repoLabel: 'GitHub', - editLinks: true, - docsRepo: 'nushell/nushell.github.io', - docsBranch: 'main', - lastUpdated: false, - locales: { - '/': { - selectText: 'Languages', - selectLanguageName: 'English', - editLinkText: 'Edit this page on GitHub', - navbar: navbarEn, - sidebar: sidebarEn, - }, - '/de/': { - selectText: 'Sprachen', - selectLanguageName: 'Deutsch', - editLinkText: 'Diese Seite auf GitHub bearbeiten', - navbar: navbarDe, - sidebar: sidebarDe, - }, - '/es/': { - selectText: 'Idiomas', - selectLanguageName: 'Español', - editLinkText: 'Edita esta página en GitHub', - navbar: navbarEs, - sidebar: sidebarEs, - }, - '/ja/': { - selectText: '言語', - selectLanguageName: '日本語', - editLinkText: 'GitHubでこのページを編集する', - navbar: navbarJa, - sidebar: sidebarJa, - }, - '/pt-BR/': { - selectText: 'Línguas', - selectLanguageName: 'Português do Brasil', - editLinkText: 'Edite esta página no GitHub', - navbar: navbarPtBR, - sidebar: sidebarPtBR, - }, - '/ru': { - selectText: 'Языки', - selectLanguageName: 'Русский язык', - editLinkText: 'Отредактируйте эту страницу на GitHub', - navbar: navbarRU, - sidebar: sidebarRU, - }, - '/zh-CN/': { - selectText: '语言', - selectLanguageName: '中文', - editLinkText: '在GitHub上编辑此页面', - navbar: navbarZhCN, - sidebar: sidebarZhCN, - }, - }, - }), - plugins: [ - gitPlugin(), - backToTopPlugin(), - mediumZoomPlugin(), - shikiPlugin({ - theme: 'dark-plus', - langs: [ - 'nushell', - 'rust', - 'bash', - 'shell', - 'sh', - 'toml', - 'json', - 'python', - 'cpp', - 'powershell', - ], - }), - docsearchPlugin({ - appId: 'GHCTOYCW6T', - indexName: 'nushell', - apiKey: 'dd6a8f770a42efaed5befa429d167232', - }), - feedPlugin({ - rss: true, - json: true, - atom: true, - count: 30, - hostname: 'https://www.nushell.sh', - filter: ({ frontmatter, filePathRelative }) => { - return ( - frontmatter.feed === true || filePathRelative?.indexOf('blog/') >= 0 - ); - }, - sorter: (a, b) => { - return compareDate( - a.data.git?.createdTime - ? new Date(a.data.git?.createdTime) - : a.frontmatter.date, - b.data.git?.createdTime - ? new Date(b.data.git?.createdTime) - : b.frontmatter.date, - ); - }, - }), - sitemapPlugin({ - hostname: 'https://www.nushell.sh/', - }), - ], - onPrepared: async (app) => { - await app.writeTemp( - 'pages.js', - `export default ${JSON.stringify(app.pages.map(({ data }) => data))}`, - ); - }, -}); diff --git a/.vuepress/configs/index.ts b/.vuepress/configs/index.ts deleted file mode 100644 index e9323f1da3c..00000000000 --- a/.vuepress/configs/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './navbar/index.js'; -export * from './sidebar/index.js'; diff --git a/.vuepress/configs/navbar/de.ts b/.vuepress/configs/navbar/de.ts deleted file mode 100644 index ce03892a4b3..00000000000 --- a/.vuepress/configs/navbar/de.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { NavbarConfig } from '@vuepress/theme-default'; - -export const navbarDe: NavbarConfig = [ - { text: 'Buch', link: '/de/book/' }, - // { text: "Contributor Book", link: "/contributor-book/" }, - { text: 'Cookbook', link: '/cookbook/' }, - { text: 'Blog', link: '/blog/' }, -]; diff --git a/.vuepress/configs/navbar/en.ts b/.vuepress/configs/navbar/en.ts deleted file mode 100644 index 1db569c200d..00000000000 --- a/.vuepress/configs/navbar/en.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { NavbarConfig } from '@vuepress/theme-default'; - -export const navbarEn: NavbarConfig = [ - { text: 'Book', link: '/book/' }, - // { text: "Contributor Book", link: "/contributor-book/" }, - { text: 'Commands', link: '/commands/' }, - { text: 'Cookbook', link: '/cookbook/' }, - { text: 'Blog', link: '/blog/' }, - { text: 'Ref', link: '/lang-guide/' }, -]; diff --git a/.vuepress/configs/navbar/es.ts b/.vuepress/configs/navbar/es.ts deleted file mode 100644 index c80a28b016a..00000000000 --- a/.vuepress/configs/navbar/es.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { NavbarConfig } from '@vuepress/theme-default'; - -export const navbarEs: NavbarConfig = [ - { text: 'Libro', link: '/es/book/' }, - { text: 'Cookbook', link: '/cookbook/' }, - { text: 'Blog', link: '/blog/' }, -]; diff --git a/.vuepress/configs/navbar/index.ts b/.vuepress/configs/navbar/index.ts deleted file mode 100644 index 5703043d438..00000000000 --- a/.vuepress/configs/navbar/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from './de.js'; -export * from './en.js'; -export * from './es.js'; -export * from './ja.js'; -export * from './pt-BR.js'; -export * from './ru.js'; -export * from './zh-CN.js'; diff --git a/.vuepress/configs/navbar/ja.ts b/.vuepress/configs/navbar/ja.ts deleted file mode 100644 index 8821e24ef56..00000000000 --- a/.vuepress/configs/navbar/ja.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { NavbarConfig } from '@vuepress/theme-default'; - -export const navbarJa: NavbarConfig = [ - { text: 'Book', link: '/ja/book/' }, - // { text: "Contributor Book", link: "/contributor-book/" }, - { text: 'Cookbook', link: '/cookbook/' }, - { text: 'Blog', link: '/blog/' }, -]; diff --git a/.vuepress/configs/navbar/pt-BR.ts b/.vuepress/configs/navbar/pt-BR.ts deleted file mode 100644 index 388373a5a05..00000000000 --- a/.vuepress/configs/navbar/pt-BR.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { NavbarConfig } from '@vuepress/theme-default'; - -export const navbarPtBR: NavbarConfig = [ - { text: 'Livro', link: '/pt-BR/book/' }, - { text: 'Cookbook', link: '/cookbook/' }, - { text: 'Blog', link: '/blog/' }, -]; diff --git a/.vuepress/configs/navbar/ru.ts b/.vuepress/configs/navbar/ru.ts deleted file mode 100644 index 46305040115..00000000000 --- a/.vuepress/configs/navbar/ru.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { NavbarConfig } from '@vuepress/theme-default'; - -export const navbarRU: NavbarConfig = [ - { text: 'Книга', link: '/ru/book/' }, - // { text: "Contributor Book", link: "/contributor-book/" }, - { text: 'Команды', link: '/commands/' }, - { text: 'Cookbook', link: '/cookbook/' }, - { text: 'Блог', link: '/blog/' }, -]; diff --git a/.vuepress/configs/navbar/zh-CN.ts b/.vuepress/configs/navbar/zh-CN.ts deleted file mode 100644 index a46745f3e13..00000000000 --- a/.vuepress/configs/navbar/zh-CN.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { NavbarConfig } from '@vuepress/theme-default'; - -export const navbarZhCN: NavbarConfig = [ - { text: '书', link: '/zh-CN/book/' }, - // { text: "Contributor Book", link: "/contributor-book/" }, - { text: 'Cookbook', link: '/cookbook/' }, - { text: '博客', link: '/blog/' }, -]; diff --git a/.vuepress/configs/sidebar/command_categories.ts b/.vuepress/configs/sidebar/command_categories.ts deleted file mode 100644 index dad4c818bfa..00000000000 --- a/.vuepress/configs/sidebar/command_categories.ts +++ /dev/null @@ -1,34 +0,0 @@ -export const commandCategories = [ - '/commands/categories/bits.md', - '/commands/categories/bytes.md', - '/commands/categories/chart.md', - '/commands/categories/conversions.md', - '/commands/categories/core.md', - '/commands/categories/database.md', - '/commands/categories/dataframe.md', - '/commands/categories/dataframe_or_lazyframe.md', - '/commands/categories/date.md', - '/commands/categories/debug.md', - '/commands/categories/default.md', - '/commands/categories/env.md', - '/commands/categories/expression.md', - '/commands/categories/filesystem.md', - '/commands/categories/filters.md', - '/commands/categories/formats.md', - '/commands/categories/generators.md', - '/commands/categories/hash.md', - '/commands/categories/history.md', - '/commands/categories/lazyframe.md', - '/commands/categories/math.md', - '/commands/categories/misc.md', - '/commands/categories/network.md', - '/commands/categories/path.md', - '/commands/categories/platform.md', - '/commands/categories/prompt.md', - '/commands/categories/random.md', - '/commands/categories/removed.md', - '/commands/categories/shells.md', - '/commands/categories/strings.md', - '/commands/categories/system.md', - '/commands/categories/viewers.md', -]; diff --git a/.vuepress/configs/sidebar/de.ts b/.vuepress/configs/sidebar/de.ts deleted file mode 100644 index 3667f4f9870..00000000000 --- a/.vuepress/configs/sidebar/de.ts +++ /dev/null @@ -1,76 +0,0 @@ -import type { SidebarConfig } from '@vuepress/theme-default'; -import type { commandCategories } from './command_categories'; - -export const sidebarDe: SidebarConfig = { - '/de/book/': [ - { - text: 'Einleitung', - link: '/de/book/README.md', - collapsible: false, - }, - { - text: 'Erste Schritte', - link: '/de/book/getting_started.md', - collapsible: false, - children: [ - '/de/book/installation', - '/de/book/moving_around', - '/de/book/thinking_in_nushell', - ], - }, - { - text: 'Nu Grundlagen', - link: '/de/book/nu_fundamentals.md', - collapsible: false, - children: [ - '/de/book/types_of_data', - '/de/book/loading_data', - '/de/book/pipeline.md', - '/de/book/working_with_strings', - '/de/book/working_with_lists', - '/de/book/working_with_tables', - ], - }, - { - text: 'Programmieren in Nu', - link: '/de/book/programming_in_nu.md', - collapsible: false, - children: [ - '/de/book/custom_commands', - '/de/book/aliases', - '/de/book/operators', - '/de/book/variables_and_subexpressions.md', - '/de/book/scripts', - '/de/book/overlays', - '/de/book/command_signature', - ], - }, - { - text: 'Nu als Shell', - link: '/de/book/nu_as_a_shell.md', - collapsible: false, - children: [ - '/de/book/configuration', - '/de/book/environment', - '/de/book/escaping', - '/de/book/3rdpartyprompts', - '/de/book/custom_completions', - '/de/book/coloring_and_theming', - '/de/book/hooks', - '/de/book/background_task.md', - ], - }, - { - text: 'Wechsel zu Nu', - link: '/de/book/coming_to_nu.md', - collapsible: false, - children: ['/de/book/coming_from_bash', '/de/book/command_reference'], - }, - { - text: '(Nicht nur für) Fortgeschrittene', - link: '/de/book/advanced.md', - collapsible: false, - children: ['/de/book/plugins', '/de/book/metadata.md'], - }, - ], -}; diff --git a/.vuepress/configs/sidebar/en.ts b/.vuepress/configs/sidebar/en.ts deleted file mode 100644 index d364eda9187..00000000000 --- a/.vuepress/configs/sidebar/en.ts +++ /dev/null @@ -1,161 +0,0 @@ -import type { SidebarConfig } from '@vuepress/theme-default'; -import { commandCategories } from './command_categories'; - -export const sidebarEn: SidebarConfig = { - '/book/': [ - { - text: 'Introduction', - link: '/book/README.md', - collapsible: false, - }, - { - text: 'Getting Started', - link: '/book/getting_started.md', - collapsible: false, - children: [ - '/book/installation.md', - '/book/default_shell.md', - '/book/quick_tour.md', - '/book/moving_around.md', - '/book/thinking_in_nu.md', - '/book/cheat_sheet.md', - ], - }, - { - text: 'Nu Fundamentals', - link: '/book/nu_fundamentals.md', - collapsible: false, - children: [ - '/book/types_of_data.md', - '/book/loading_data.md', - '/book/pipelines.md', - '/book/working_with_strings.md', - '/book/working_with_lists.md', - '/book/working_with_tables.md', - ], - }, - { - text: 'Programming in Nu', - link: '/book/programming_in_nu.md', - collapsible: false, - children: [ - '/book/custom_commands.md', - '/book/aliases.md', - '/book/operators.md', - '/book/variables_and_subexpressions.md', - '/book/control_flow.md', - '/book/scripts.md', - '/book/modules.md', - '/book/overlays.md', - '/book/command_signature.md', - '/book/testing.md', - '/book/style_guide.md', - ], - }, - { - text: 'Nu as a Shell', - link: '/book/nu_as_a_shell.md', - collapsible: false, - children: [ - '/book/configuration.md', - '/book/environment.md', - '/book/stdout_stderr_exit_codes.md', - '/book/escaping.md', - '/book/3rdpartyprompts.md', - '/book/shells_in_shells.md', - '/book/line_editor.md', - '/book/externs.md', - '/book/custom_completions.md', - '/book/coloring_and_theming.md', - '/book/hooks.md', - '/book/background_task.md', - ], - }, - { - text: 'Coming to Nu', - link: '/book/coming_to_nu.md', - collapsible: false, - children: [ - '/book/coming_from_bash.md', - '/book/coming_from_cmd.md', - '/book/nushell_map.md', - '/book/nushell_map_imperative.md', - '/book/nushell_map_functional.md', - '/book/nushell_operator_map.md', - ], - }, - { - text: 'Design Notes', - link: '/book/design_notes.md', - collapsible: false, - children: ['/book/how_nushell_code_gets_run.md'], - }, - { - text: '(Not So) Advanced', - link: '/book/advanced.md', - collapsible: false, - children: [ - '/book/standard_library.md', - '/book/dataframes.md', - '/book/metadata.md', - '/book/creating_errors.md', - '/book/parallelism.md', - '/book/plugins.md', - '/book/explore.md', - ], - }, - ], - '/commands/': [ - { - text: 'Categories', - collapsible: false, - children: commandCategories, - }, - ], - '/contributor-book/': [ - { - text: 'Contributor Book', - link: '/contributor-book/README.md', - collapsible: false, - children: [ - 'README.md', - 'philosophy', - 'philosophy_0_80', - 'commands', - 'plugins', - ], - }, - ], - '/cookbook/': [ - { - text: 'Cookbook', - collapsible: false, - children: [ - 'README.md', - 'setup', - 'help', - 'system', - 'parsing', - 'pattern_matching', - 'external_completers', - 'files', - 'git', - 'parsing_git_log', - 'http', - 'direnv', - 'ssh_agent', - 'tables', - 'polars_v_pandas_v_nushell', - 'jq_v_nushell', - ], - }, - ], - '/lang-guide/': [ - { - text: 'Language Reference Guide', - link: '/lang-guide/README.md', - collapsible: false, - children: ['README.md', 'lang-guide.md'], - }, - ], -}; diff --git a/.vuepress/configs/sidebar/es.ts b/.vuepress/configs/sidebar/es.ts deleted file mode 100644 index e602f5ecf24..00000000000 --- a/.vuepress/configs/sidebar/es.ts +++ /dev/null @@ -1,33 +0,0 @@ -import type { SidebarConfig } from '@vuepress/theme-default'; - -export const sidebarEs: SidebarConfig = { - '/es/book/': [ - { - text: 'Nu Libro', - collapsible: false, - children: [ - 'README.md', - 'instalacion', - 'explorando', - 'tipos_de_datos', - 'cargando_datos', // "trabajando_con_listas" - 'trabajando_con_tablas', - 'pipeline', - 'configuracion', // "custom_commands" - 'aliases', // "operadores" - 'matematicas', // "variables_y_subexpresiones" - 'entorno', // "scripts" - 'metadatos', - 'shells_en_shells', - 'escapando', - 'plugins', // "dataframes" - 'llegando_de_bash', - 'mapa_nushell', - 'mapa_imperativo_nushell', - 'mapa_funcional_nushell', - 'mapa_operador_nushell', - '/book/command_reference.md', - ], - }, - ], -}; diff --git a/.vuepress/configs/sidebar/index.ts b/.vuepress/configs/sidebar/index.ts deleted file mode 100644 index 5703043d438..00000000000 --- a/.vuepress/configs/sidebar/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from './de.js'; -export * from './en.js'; -export * from './es.js'; -export * from './ja.js'; -export * from './pt-BR.js'; -export * from './ru.js'; -export * from './zh-CN.js'; diff --git a/.vuepress/configs/sidebar/ja.ts b/.vuepress/configs/sidebar/ja.ts deleted file mode 100644 index 3053cd02d59..00000000000 --- a/.vuepress/configs/sidebar/ja.ts +++ /dev/null @@ -1,107 +0,0 @@ -import type { SidebarConfig } from '@vuepress/theme-default'; -// import { commandCategories } from './command_categories'; - -export const sidebarJa: SidebarConfig = { - '/ja/book/': [ - { - text: 'はじめに', - link: '/ja/book/README.md', - collapsible: false, - }, - { - text: 'Getting Started', - link: '/ja/book/getting_started.md', - collapsible: false, - children: [ - '/ja/book/installation.md', - '/book/default_shell.md', - '/ja/book/quick_tour.md', - '/ja/book/moving_around.md', - '/book/thinking_in_nu.md', - '/book/cheat_sheet.md', - ], - }, - { - text: 'Nu 基礎編', - link: '/ja/book/nu_fundamentals.md', - collapsible: false, - children: [ - '/ja/book/types_of_data.md', - '/ja/book/loading_data.md', - '/ja/book/pipeline.md', - '/book/working_with_strings.md', - '/book/working_with_lists.md', - '/ja/book/working_with_tables.md', - ], - }, - { - text: 'Programming in Nu', - link: '/ja/book/programming_in_nu.md', - collapsible: false, - children: [ - '/book/custom_commands.md', - '/ja/book/aliases.md', - '/book/operators.md', - '/book/variables_and_subexpressions.md', - '/book/scripts.md', - '/book/modules.md', - '/book/overlays.md', - '/book/command_signature.md', - '/book/testing.md', - '/book/style_guide.md', - ], - }, - { - text: 'シェルとしての Nu', - link: '/ja/book/nu_as_a_shell.md', - collapsible: false, - children: [ - '/ja/book/configuration.md', - '/ja/book/environment.md', - '/book/stdout_stderr_exit_codes.md', - '/ja/book/escaping.md', - '/book/3rdpartyprompts.md', - '/ja/book/shells_in_shells.md', - '/book/line_editor.md', - '/book/externs.md', - '/book/custom_completions.md', - '/book/coloring_and_theming.md', - '/book/hooks.md', - '/book/background_task.md', - ], - }, - { - text: 'Nu への移行', - link: '/ja/book/coming_to_nu.md', - collapsible: false, - children: [ - '/ja/book/coming_from_bash.md', - '/book/coming_from_cmd.md', - '/ja/book/nushell_map.md', - '/ja/book/nushell_map_imperative.md', - '/ja/book/nushell_map_functional.md', - '/ja/book/nushell_operator_map.md', - ], - }, - { - text: 'Design Notes', - link: '/ja/book/design_notes.md', - collapsible: false, - children: ['/book/how_nushell_code_gets_run.md'], - }, - { - text: '(Not So) Advanced', - link: '/ja/book/advanced.md', - collapsible: false, - children: [ - '/book/standard_library.md', - '/book/dataframes.md', - '/ja/book/metadata.md', - '/book/creating_errors.md', - '/book/parallelism.md', - '/ja/book/plugins.md', - '/book/explore.md', - ], - }, - ], -}; diff --git a/.vuepress/configs/sidebar/pt-BR.ts b/.vuepress/configs/sidebar/pt-BR.ts deleted file mode 100644 index 3a4dba3250a..00000000000 --- a/.vuepress/configs/sidebar/pt-BR.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { SidebarConfig } from '@vuepress/theme-default'; - -export const sidebarPtBR: SidebarConfig = { - '/pt-BR/book/': [ - { - text: 'Nu Livro', - collapsible: false, - children: [ - 'instalacao', - 'introducao', - 'explorando', - 'tipos_de_dados', - 'carregando_dados', - 'trabalhando_com_tabelas', - 'pipeline', - 'line_editor', - 'metadados', - 'shells_em_shells', - 'escapando', - 'plugins', - ], - }, - ], -}; diff --git a/.vuepress/configs/sidebar/ru.ts b/.vuepress/configs/sidebar/ru.ts deleted file mode 100644 index 7720a5a3bae..00000000000 --- a/.vuepress/configs/sidebar/ru.ts +++ /dev/null @@ -1,110 +0,0 @@ -import type { SidebarConfig } from '@vuepress/theme-default'; -import { commandCategories } from './command_categories'; - -export const sidebarRU: SidebarConfig = { - '/ru/book/': [ - { - text: 'Введение', - link: '/ru/book/README.md', - collapsible: false, - }, - // { - // text: 'Начало работы', - // link: '/ru/book/getting_started.md', - // collapsible: false, - // children: [ - // '/ru/book/installation.md', - // '/ru/book/default_shell.md', - // '/ru/book/quick_tour.md', - // '/ru/book/moving_around.md', - // '/ru/book/thinking_in_nu.md', - // '/ru/book/cheat_sheet.md', - // ], - // }, - // { - // text: 'Основы Nu', - // link: '/nu_fundamentals.md', - // collapsible: false, - // children: [ - // '/ru/book/types_of_data.md', - // '/ru/book/loading_data.md', - // '/ru/book/pipelines.md', - // '/ru/book/working_with_strings.md', - // '/ru/book/working_with_lists.md', - // '/ru/book/working_with_tables.md', - // ], - // }, - // { - // text: 'Программирование в Nu', - // link: '/programming_in_nu.md', - // collapsible: false, - // children: [ - // '/ru/book/custom_commands.md', - // '/ru/book/aliases.md', - // '/ru/book/operators.md', - // '/ru/book/variables_and_subexpressions.md', - // '/ru/book/control_flow.md', - // '/ru/book/scripts.md', - // '/ru/book/modules.md', - // '/ru/book/overlays.md', - // '/ru/book/command_signature.md', - // '/ru/book/testing.md', - // '/ru/book/style_guide.md', - // ], - // }, - // { - // text: 'Nu как оболочка', - // link: '/nu_as_a_shell.md', - // collapsible: false, - // children: [ - // '/ru/book/configuration.md', - // '/ru/book/environment.md', - // '/ru/book/stdout_stderr_exit_codes.md', - // '/ru/book/escaping.md', - // '/ru/book/3rdpartyprompts.md', - // '/ru/book/shells_in_shells.md', - // '/ru/book/line_editor.md', - // '/ru/book/externs.md', - // '/ru/book/custom_completions.md', - // '/ru/book/coloring_and_theming.md', - // '/ru/book/hooks.md', - // '/ru/book/background_task.md', - // ], - // }, - // { - // text: 'Переход в Nu', - // link: '/coming_to_nu.md', - // collapsible: false, - // children: [ - // '/ru/book/coming_from_bash.md', - // '/ru/book/coming_from_cmd.md', - // '/ru/book/nushell_map.md', - // '/ru/book/nushell_map_imperative.md', - // '/ru/book/nushell_map_functional.md', - // '/ru/book/nushell_operator_map.md', - // ], - // }, - // { - // text: 'Примечания к дизайну', - // link: '/design_notes.md', - // collapsible: false, - // children: [ - // '/ru/book/how_nushell_code_gets_run.md' - // ], - // }, - // { - // text: '(Не очень) Продвинутый', - // link: '/advanced.md', - // collapsible: false, - // children: [ - // '/ru/book/standard_library.md', - // '/ru/book/dataframes.md', - // '/ru/book/metadata.md', - // '/ru/book/creating_errors.md', - // '/ru/book/parallelism.md', - // '/ru/book/plugins.md', - // '/ru/book/explore.md', - // ], - // }, - ], -}; diff --git a/.vuepress/configs/sidebar/zh-CN.ts b/.vuepress/configs/sidebar/zh-CN.ts deleted file mode 100644 index 960bc73e59e..00000000000 --- a/.vuepress/configs/sidebar/zh-CN.ts +++ /dev/null @@ -1,81 +0,0 @@ -import type { SidebarConfig } from '@vuepress/theme-default'; - -export const sidebarZhCN: SidebarConfig = { - '/zh-CN/book/': [ - { - text: '入门篇', - collapsible: false, - children: [ - 'README.md', - 'installation', - 'thinking_in_nu', - 'moving_around', - ], - }, - { - text: 'Nu 基础篇', - collapsible: false, - children: [ - 'types_of_data', - 'loading_data', - 'working_with_strings', - 'working_with_lists', - 'working_with_tables', - 'pipelines', - 'command_reference', - ], - }, - { - text: 'Nushell 编程', - collapsible: false, - children: [ - 'custom_commands', - 'aliases', - 'operators', - 'variables_and_subexpressions', - 'scripts', - 'modules', - 'overlays', - ], - }, - { - text: 'Nu 作为 Shell 使用', - collapsible: false, - children: [ - 'configuration', - 'environment', - 'stdout_stderr_exit_codes', - 'escaping', - '3rdpartyprompts', - 'shells_in_shells', - 'line_editor', - 'externs', - 'custom_completions', - 'coloring_and_theming', - 'hooks.md', - ], - }, - { - text: '迁移到 Nu', - collapsible: false, - children: [ - 'coming_from_bash', - 'nushell_map', - 'nushell_map_imperative', - 'nushell_map_functional', - 'nushell_operator_map', - ], - }, - { - text: '高级篇', - collapsible: false, - children: [ - 'dataframes', - 'metadata', - 'creating_errors', - 'parallelism', - 'plugins', - ], - }, - ], -}; diff --git a/.vuepress/public/icon.png b/.vuepress/public/icon.png deleted file mode 100644 index d5cf15428e5a0417c464ef4ec6892895d7123ad9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 847 zcmeAS@N?(olHy`uVBq!ia0vp^A3&Ic4M^IBzMKT4I14-?iy0WWg+Z8+Vb&Z81_owE zPZ!6Kid%2*9^^gbAi#34T2PL0l1|6`;1@f!PIA6kk@~-e52zOv1bqFsXW#$hstQu? zKNpI29Mevc;D|UO&>w!nKwy1GqC$eAvrU}fVTS`wZ54Z*+8Qfdd6*fwB_Dn4l6dry zOVW)=%;?BtQ9~d$>S57I={T;P1jH#4oDoMl%w^V35d7eAz{%}^5}P2mWQ$Icz@`a; z8z(rPfbm;&QUoA;MQ%yB62~J-ZYP|OwRAWF`9LKuI!UNnx+OsTO%q^RV0^)i=vrWW zL8y`r$0JT)TVQ;!!+^GQOStHyfNg6U;wtl{Cgj

VSb3Dh3^*bW6nLMQ)>LpL ztf}C{wZ?)IVT}bx#DMg)2B26&!HISJ4=2RR9unMb!6DJ|T3D(@J7I@n9HX;I3?nd1 zA+!Y&8!C4A<^Q<{n>xY|D8w)}7qIfY{um|luuJ@ic8tKf3c+;+j(ZNV0{Jc6k3{u3 z!gnadbt}buY$|94@ehgWbpVAxe8)YHSRZnUw`7MN(T)=UYjfQJ76S40z&e4-)^=4K z+Kmw*6|(e zh?Qz$+-=~ZTo%dU_GXp4G(65P!NRKSaxh9SHKkJ*>p VSa53#yPYCPz|+;wWt~$(695$1CBy&# diff --git a/.vuepress/styles/index.scss b/.vuepress/styles/index.scss deleted file mode 100755 index bc09eb16627..00000000000 --- a/.vuepress/styles/index.scss +++ /dev/null @@ -1,46 +0,0 @@ -.navbar .navbar-items-wrapper { - flex-direction: row-reverse; -} - -.command-title { - margin-top: 15px; - white-space: pre-wrap; -} - -/* Reduce line height in code blocks - * to avoid gaps in tables rendered with box-drawing characters - */ -.theme-default-content pre, -.theme-default-content pre[class*=language-] { - line-height: 1; -} - -/* Add DejaVu Sans Mono to the list of monospaced fonts. - * This allows tables to be rendered seamlessly with box-drawing characters. - */ -:root { - --font-family-code: Consolas, Monaco, 'Andale Mono', 'DejaVu Sans Mono', 'Ubuntu Mono', monospace; -} - -@media screen and (min-width: 720px) and (max-width: 815px) { - #docsearch-container { - width: 150px; - } - button.toggle-color-mode-button { - margin-right: 20px; - margin-left: 20px; - } -} - -@media screen and (min-width: 816px) { - #docsearch-container { - width: 239px; - .DocSearch-Button-Container { - width: 150px; - } - } - - button.toggle-color-mode-button { - margin-right: 30px; - } -} diff --git a/.vuepress/styles/palette.scss b/.vuepress/styles/palette.scss deleted file mode 100755 index d9d86da65d9..00000000000 --- a/.vuepress/styles/palette.scss +++ /dev/null @@ -1,4 +0,0 @@ -$accentColor: #3eaf7c; -$textColor: #2c3e50; -$borderColor: #eaecef; -$codeBgColor: #282c34; diff --git a/CNAME b/CNAME deleted file mode 100644 index 41c31733319..00000000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -www.nushell.sh diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 231e24c5536..a30f3041f2d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,9 +14,9 @@ If you're adding a new page to the book, to make it appear, put it also to `.vue ## Display Nu Code Snippets With Syntax Highlighting -To display Nushell code snippets with syntax highlighting support you can wrap the Nu codes with \```nu \``` or \```nushell \```, for example: +To display Nushell code snippets with syntax highlighting support you can wrap the Nu codes with \```nushell \``` or \```nushellshell \```, for example: -```nu +```nushell # List the top five largest files ls | where type == file | sort-by -r size | first 5 ``` diff --git a/astro.config.mjs b/astro.config.mjs new file mode 100644 index 00000000000..4756800b1f6 --- /dev/null +++ b/astro.config.mjs @@ -0,0 +1,143 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import { ExpressiveCodeTheme } from "@astrojs/starlight/expressive-code"; +import fs from "node:fs"; + +const jsoncString = fs.readFileSync( + new URL("./public/nushell_minimal_dark_theme.json", import.meta.url), + "utf-8", +); +const nushellTheme = ExpressiveCodeTheme.fromJSONString(jsoncString); + +// https://astro.build/config +export default defineConfig({ + site: "https://www.nushell.sh/", + integrations: [ + starlight({ + title: "Nushell Docs", + expressiveCode: { + themes: [nushellTheme], + shiki: { + langs: [ + JSON.parse( + fs.readFileSync("./public/nushell-grammar.json", "utf-8"), + ), + ], + }, + }, + editLink: { + baseUrl: "https://github.com/nushell/nushell.github.io/edit/master/", + }, + customCss: ["./src/styles/index.css"], + logo: { + src: "./src/assets/images/nu_icon.png", + }, + social: { + github: "https://github.com/nushell/nushell", + discord: "https://discord.gg/NtAbbGn", + }, + sidebar: [ + { + label: "Start Here", + items: [ + // Each item here is one entry in the navigation menu. + { label: "Introduction", link: "/introduction/" }, + { label: "Installation", link: "/book/installation/" }, + { label: "Default Shell", link: "/book/default_shell/" }, + { label: "Quick Tour", link: "/book/quick_tour/" }, + { label: "Moving Around", link: "/book/moving_around/" }, + { label: "Thinking in Nu", link: "/book/thinking_in_nu/" }, + { label: "Cheat Sheet", link: "/book/cheat_sheet/" }, + ], + }, + { + label: "Nu Fundamentals", + items: [ + { label: "Data Types", link: "/book/types_of_data/" }, + { label: "Loading Data", link: "/book/loading_data" }, + { label: "Pipelines", link: "/book/pipelines/" }, + { label: "Strings", link: "/book/working_with_strings/" }, + { label: "Lists", link: "/book/working_with_lists/" }, + { label: "Tables", link: "/book/working_with_tables/" }, + ], + }, + { + label: "Programming in Nu", + items: [ + { label: "Custom commands", link: "/book/custom_commands/" }, + { label: "Aliases", link: "/book/aliases/" }, + { label: "Operators", link: "/book/operators/" }, + { + label: "Variables and Subexpressions", + link: "/book/variables_and_subexpressions/", + }, + { label: "Control Flow", link: "/book/control_flow/" }, + { label: "Scripts", link: "/book/scripts/" }, + { label: "Modules", link: "/book/modules/" }, + { label: "Overlays", link: "/book/overflows/" }, + { label: "Command signature", link: "/book/command_signatures/" }, + { label: "Testing", link: "/book/testing/" }, + { label: "Best Practices", link: "/book/style_guide/" }, + ], + }, + { + label: "Nu Shell", + items: [ + { label: "Configuration", link: "/book/configuration/" }, + { label: "Environment", link: "/book/environment/" }, + { + label: "Stout, Stderr, and Exit Codes", + link: "/book/stdout_stderr_exit_codes/", + }, + { label: "Escaping to the system", link: "/book/escaping/" }, + { label: "3rd party prompts", link: "/book/3rdpartyprompts/" }, + { label: "Shells in shells", link: "/book/shells_in_shells/" }, + { + label: "Reedline (Nu's line editor)", + link: "/book/line_editor/", + }, + { label: "Externs", link: "/book/externs/" }, + { label: "Custom completions", link: "/book/custom_completions/" }, + { + label: "Coloring and Theming", + link: "/book/coloring_and_theming/", + }, + { label: "Hooks", link: "/book/hooks/" }, + { label: "Background Tasks", link: "/book/background_task/" }, + ], + }, + { + label: "Coming to Nu from...", + items: [ + { label: "Coming from Bash", link: "/book/coming_from_bash/" }, + { label: "Coming from CMD.EXE", link: "/book/coming_from_cmd/" }, + { label: "Nu Map", link: "/book/nushell_map/" }, + { label: "Nu Map", link: "/book/nushell_map_imperative/" }, + { label: "Nu Map", link: "/book/nushell_map_functional/" }, + { label: "Nu Map", link: "/book/nushell_operator_map/" }, + ], + }, + { + label: "(Not so) Advanced", + items: [ + { + label: "Standard Library", + link: "/book/standard_library/", + badge: { text: "Preview", variant: "caution" }, + }, + { label: "Dataframes", link: "/book/dataframes/" }, + { label: "Metadata", link: "/book/metadata/" }, + { label: "Errors", link: "/book/creating_errors/" }, + { label: "Parallelism", link: "/book/parallelism/" }, + { label: "Plugins", link: "/book/plugins/" }, + { label: "Explore", link: "/book/explore/" }, + ], + }, + { + label: "Reference", + autogenerate: { directory: "reference" }, + }, + ], + }), + ], +}); diff --git a/biome.json b/biome.json new file mode 100644 index 00000000000..7ac2802890e --- /dev/null +++ b/biome.json @@ -0,0 +1,20 @@ +{ + "$schema": "./node_modules/@biomejs/biome/configuration_schema.json", + "organizeImports": { + "enabled": true + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true + } + }, + "formatter": { + "enabled": true, + "indentStyle": "space" + }, + "files": { + "ignoreUnknown": true, + "ignore": ["dist/", ".vercel/", ".astro/"] + } +} diff --git a/blog/2023-08-22-nushell_0_84_0.md b/blog/2023-08-22-nushell_0_84_0.md deleted file mode 100644 index 9158a94de8e..00000000000 --- a/blog/2023-08-22-nushell_0_84_0.md +++ /dev/null @@ -1,416 +0,0 @@ ---- -title: Nushell 0.84.0 -author: The Nu Authors -author_site: https://twitter.com/nu_shell -author_image: https://www.nushell.sh/blog/images/nu_logo.png -excerpt: Today, we're releasing version 0.84.0 of Nu. This release adds adds exporting constants from modules, `scope` commands improvements, cosmetic changes, and many smaller changes to our commands. ---- - -# Nushell 0.84.0 - -Nushell, or Nu for short, is a new shell that takes a modern, structured approach to your command line. It works seamlessly with the data from your filesystem, operating system, and a growing number of file formats to make it easy to build powerful command line pipelines. - -Today, we're releasing version 0.84.0 of Nu. This release adds exporting constants from modules, `scope` commands improvements, cosmetic changes, and many smaller changes to our commands. - - - -# Where to get it - -Nu 0.84.0 is available as [pre-built binaries](https://github.com/nushell/nushell/releases/tag/0.84.0) or from [crates.io](https://crates.io/crates/nu). If you have Rust installed you can install it using `cargo install nu`. - -NOTE: The optional dataframe functionality is available by `cargo install nu --features=dataframe`. - -As part of this release, we also publish a set of optional plugins you can install and use with Nu. To install, use `cargo install nu_plugin_`. - -# Themes of this release / New features - -## (Major Breaking Change!) `str replace` matches substring by default ([kubouch](https://github.com/nushell/nushell/pull/10038)) - -::: warning Breaking change -See a full overview of the [breaking changes](#breaking-changes) -::: - -`str replace` now matches a substring instead of a regular expression by default and the `-s`/`--string` flag is deprecated (will be removed altogether in 0.85). Matching a substring by default makes it more consistent with the rest of the Nushell's commands. - -> :bulb: **Note!** -> Since `str replace` is a widely used command, many scripts are going to break. Fixing it is easy: -> * If you used `str replace` **without** the `-s`/`--string` flag, you used regex matching and you should add `--regex` flag to keep the previous functionality. -> * If you used `str replace` **with** the `-s`/`--string` flag, you will get a deprecation warning. To get rid of the warning, simply remove the flag. - -## Constants from modules ([WindSoilder](https://github.com/nushell/nushell/pull/9773), [kubouch](https://github.com/nushell/nushell/pull/10049)) - -You can now use constants in modules and export them. Calling `use` on a module will create record containing all module's constants. You can also import the constants directly, for example with `use module.nu const-name`, without creating the module's record. Example: - -```nushell -> module spam { - export const X = 'x' - export module eggs { - export const Y = 'y' - export const viking = 'eats' - } -} - -> use spam - -> $spam -╭──────┬───────────────────╮ -│ eggs │ {record 2 fields} │ -│ X │ x │ -╰──────┴───────────────────╯ - -> $spam.eggs -╭────────┬──────╮ -│ Y │ y │ -│ viking │ eats │ -╰────────┴──────╯ - -> use spam eggs viking - -> $viking -eats -``` - -The exported values are true constants which means that you can use them in some scenarios where you cannot use normal variables, such as: -```nushell -> module files { - export const MY_CONFIG = '/home/viking/.config/nushell/my_config.nu' -} - -> use files MY_CONFIG - -> source $MY_CONFIG # sources '/home/viking/.config/nushell/my_config.nu' -``` - -## New options for more compact table display ([@zhiburt](https://github.com/nushell/nushell/pull/9983), [#9796](https://github.com/nushell/nushell/pull/9796)) - -To save screen space, you can now display tables with the header directly displayed on the border through the `$env.config.table.header_on_separator` option. - -![Table with header displayed on border](../assets/images/0_84_table_compact.png) - -Additionally you can now configure the `padding` left and right of the table cell content either separately or all at once to adjust the layout for your readability needs. - -![Table with different padding options](../assets/images/0_84_table_padding.png) - -## More consistent `format ...` commands ([@sholderbach](https://github.com/nushell/nushell/pull/9788), [@WindSoilder](https://github.com/nushell/nushell/pull/9902)) - -::: warning Breaking change -See a full overview of the [breaking changes](#breaking-changes) -::: - -With this release we moved several commands that serve to produce string output from a particular data type as `format` subcommands. - -1. `date format` has been renamed to `format date` ([#9788](https://github.com/nushell/nushell/pull/9788)). -2. `into duration --convert` was previously used to provide string representations of `duration`s. This option has been removed and you should now use `format duration`. ([#9902](https://github.com/nushell/nushell/pull/9902)) -3. `format filesize` that was previously moved into the `--features extra` set is back in the core ([#9978](https://github.com/nushell/nushell/pull/9978)). - -## `scope` commands enhancements ([kubouch](https://github.com/nushell/nushell/pull/10023), [kubouch](https://github.com/nushell/nushell/pull/10045)) - -`scope` commands received a significant amount of improvements making them more useful for advanced introspection of Nushell's definitions. - -* `scope externs` now lists known externals (defined with `extern`) -* `scope aliases` is now fixed and lists names and usages of the aliases, not of the aliased commands (this used to cause some confusion) -* `scope modules` now lists all the exportable of the module, including submodules with their contents -* all `scope` commands now list the definition's ID which can be used for reliable tracking of definitions. For example, a command `foo` imported from a module `spam` using `use spam` will be named `spam foo`, therefore, relying solely on names of the definitions can sometimes be misleading. -* `module_name` field is no longer present -* `scope variables` now denotes whether a variable is a constant or not - -## `http` commands now handle headers better ([@jflics6460](https://github.com/nushell/nushell/pull/9771), [@ineu](https://github.com/nushell/nushell/pull/10022) - -You can now pass headers directly as a record to the `-H` flag. -```nushell -http get -H {cookie: "acc=foobar"} http://example.com -``` -When running a `http` command with `--full` to get additional metadata about the response you can now get both the request and the reponse header -```nushell -http get --full -H {cooke: "my=cookie"} | get headers | get response -``` - -## Work on the optional dataframe features ([@ayax79](https://github.com/ayax79)) - -[@ayax79](https://github.com/ayax79) has been working hard to update our dataframe command to work again with the stricter type check by consolidating internal logic ([#9860](https://github.com/nushell/nushell/pull/9860), -[#9951](https://github.com/nushell/nushell/pull/9951)). - -Furthermore, `dfr open` now suppports the avro exchange format and a new `dfr to-avro` command was added in [#10019](https://github.com/nushell/nushell/pull/10019) - -## Changes to other commands -Since last release, some commands have changed, here is a list of some interesting changed - -- [@atahabaki](https://github.com/atahabaki) in [#9841](https://github.com/nushell/nushell/pull/9841), [#9856](https://github.com/nushell/nushell/pull/9856) and [#9940](https://github.com/nushell/nushell/pull/9940): Some refinement of the `str expand` command (it's a really cool command, i recommend you check it out :)) -- [@fdncred](https://github.com/fdncred) in [#9987](https://github.com/nushell/nushell/pull/9987): Allow `select` to take a variable with a list of columns -- [@fdncred](https://github.com/fdncred) in [#10048](https://github.com/nushell/nushell/pull/10048): Allow `int` as a *cellpath* for `select` - -## Command organization ([@storm](https://github.com/nushell/nushell/pull/9926), [@jntrnr](https://github.com/nushell/nushell/pull/10051)) - -In our efforts towards stabilization we moved several commands either behind the `--features extra` build-flag or back into the core set of commands. -The special `str *-case` commands for example have been moved out of the core set, while the `bytes` commands to deal with bytes in arbitrary encodings have returned to the core set. -Furthermore all commands in the core set should now have helpful categories associated with them. - -## Deprecation and removal of commands ([@amtoine](https://github.com/nushell/nushell/pull/9840), [@sholderbach](https://github.com/nushell/nushell/pull/10000)) - -We previously used the term "deprecation" pretty loosely to describe the removal of commands while emitting a helpful error. We intend to now start to use deprecation to warn you before the final removal of a particular option or command. -When we removed a command we will now properly refer to it as removal and started adding warnings where appropriate (e.g. `str replace --string`). As part of this update we removed some very old error helpers nudging you to upgrade to new commands. - -## Documentation - -Thanks to [@rgwood](https://github.com/rgwood), [@sholderbach](https://github.com/sholderbach), -[@kubouch](https://github.com/kubouch) and [@fdncred](https://github.com/fdncred) the documentation -has become a bit better in [#9961](https://github.com/nushell/nushell/pull/9961), -[#9996](https://github.com/nushell/nushell/pull/9996), [#10004](https://github.com/nushell/nushell/pull/10004) -and [#10057](https://github.com/nushell/nushell/pull/10057). - -## Notable bugfixes - -- A panic when parsing the context of `let` assignments has been fixed ([@mengsuenyan](https://github.com/mengsuenyan) in [#9851](https://github.com/nushell/nushell/pull/9851)) -- Invoking `--help` on a script with a `def main` command will now report the script's name instead of a more confusing `main` ([@jntrnr](https://github.com/jntrnr) in [#9948](https://github.com/nushell/nushell/pull/9948)) -- Serious bugs in `parse` that produced incorrect output when given a long input stream have been fixed ([@panicbit](https://github.com/panicbit) in [#9925](https://github.com/nushell/nushell/pull/9925), [#9950](https://github.com/nushell/nushell/pull/9950)) - -## Bugfixes - -Thanks to all the contributors who tackled one or more bugs! -| Name | Link | Description | -| ---------------------------------------------- | ------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| [@mengsuenyan](https://github.com/mengsuenyan) | [#9853](https://github.com/nushell/nushell/pull/9853) | Fix `~ \| path type` returning empty string | -| [@mengsuenyan](https://github.com/mengsuenyan) | [#9851](https://github.com/nushell/nushell/pull/9851) | Fix the panic when type a statement similar to `let f = 'f' $` in the nushell | -| [@jntrnr](https://github.com/jntrnr) | [#9893](https://github.com/nushell/nushell/pull/9893) | Revert [#9693](https://github.com/nushell/nushell/pull/9693) to prevent CPU hangs | -| [@NotLebedev](https://github.com/NotLebedev) | [#9935](https://github.com/nushell/nushell/pull/9935) | Nothing has the correct return type | -| [@amtoine](https://github.com/amtoine) | [#9947](https://github.com/nushell/nushell/pull/9947) | Force `version` to update when installing with `toolkit.nu` | -| [@amtoine](https://github.com/amtoine) | [#9967](https://github.com/nushell/nushell/pull/9967) | Fix panic with `lines` on an error | -| [@rgwood](https://github.com/rgwood) | [#9990](https://github.com/nushell/nushell/pull/9990) | Fix `watch` not handling all file changes | -| [@nibon7](https://github.com/nibon7) | [#9784](https://github.com/nushell/nushell/pull/9784) | Fix a crash when moving the cursor after accepting a suggestion from the help menu | -| [@meskill](https://github.com/meskill) | [#10007](https://github.com/nushell/nushell/pull/10007) | Fix parser to not update plugin.nu file on nu startup | -| [@zhiburt](https://github.com/zhiburt) | [#10011](https://github.com/nushell/nushell/pull/10011) | nu-table: Fix padding 0 width issues | -| [@3lvir4](https://github.com/3lvir4) | [#10012](https://github.com/nushell/nushell/pull/10012) | Remove potential panic from path join | -| [@kubouch](https://github.com/kubouch) | [#10046](https://github.com/nushell/nushell/pull/10046) | Fix wrong path expansion in `save` | -| [@zhiburt](https://github.com/zhiburt) | [#10050](https://github.com/nushell/nushell/pull/10050) | nu-table: Fix issue with truncation and text border | -| [@jntrnr](https://github.com/jntrnr) | [#10052](https://github.com/nushell/nushell/pull/10052) | Fix default_env.nu after latest changes to `str replace` | -| [@fdncred](https://github.com/fdncred) | [#10067](https://github.com/nushell/nushell/pull/10067) | Allow `return` to return any nushell value | -| [@fdncred](https://github.com/fdncred) | [#10063](https://github.com/nushell/nushell/pull/10063) | Fix `into datetime` to accept more date/time formats | - -And also to those who did tackle purely technical challenges!! -| Name | Link | Description | -| ---------------------------------------------- | ------------------------------------------------------- | -------------------------------------------------------- | -| [@IanManske](https://github.com/IanManske) | [#9909](https://github.com/nushell/nushell/pull/9909) | Enable macOS foreground process handling | -| [@jntrnr](https://github.com/jntrnr) | [#9933](https://github.com/nushell/nushell/pull/9933) | Add tests for script subcommands | -| [@jntrnr](https://github.com/jntrnr) | [#9936](https://github.com/nushell/nushell/pull/9936) | Fix a couple clippy warnings | -| [@IanManske](https://github.com/IanManske) | [#9927](https://github.com/nushell/nushell/pull/9927) | Make `Value::columns` return slice instead of cloned Vec | -| [@jntrnr](https://github.com/jntrnr) | [#9949](https://github.com/nushell/nushell/pull/9949) | Move `help commands` to use more structure in signatures | -| [@fdncred](https://github.com/fdncred) | [#9958](https://github.com/nushell/nushell/pull/9958) | Update `strip-ansi-escapes` to use new api | -| [@rgwood](https://github.com/rgwood) | [#9971](https://github.com/nushell/nushell/pull/9971) | Put heavy dataframe dependencies behind feature flag | -| [@sholderbach](https://github.com/sholderbach) | [#9974](https://github.com/nushell/nushell/pull/9974) | Fixup dataframe build after [#9971](https://github.com/nushell/nushell/pull/9971) | -| [@meskill](https://github.com/meskill) | [#9976](https://github.com/nushell/nushell/pull/9976) | test: Clear parent environment to prevent leakage to tests | -| [@kubouch](https://github.com/kubouch) | [#10036](https://github.com/nushell/nushell/pull/10036) | Add additional span to IncorrectValue error | - - -# Breaking changes -- [#9902](https://github.com/nushell/nushell/pull/9902) `date format` has been renamed to `format date` for consistency. -- [#9788](https://github.com/nushell/nushell/pull/9788) The option `into duration --convert` to format durations has been removed. Use the `format duration` command instead. -- [#10038](https://github.com/nushell/nushell/pull/10038) `str replace` now by default matches to __strings__ by default. If you want to use regexes you need to use the `-r` flag. The `--strings` flag has been removed -- [#9632](https://github.com/nushell/nushell/pull/9632) To be unambiguous the duration type now does not report months or years. The largest unit reported is weeks as they have a consistent length compared to months or years. -- [#9926](https://github.com/nushell/nushell/pull/9926) We moved some of the more exotic `str` case-commands behind the `--features extra` build-flag. This affects: - * `str camel-case` - * `str kebab-case` - * `str pascal-case` - * `str screaming-snake-case` - * `str snake-case` - * `str title-case` -- [#10053](https://github.com/nushell/nushell/pull/10053) make the charpage optional for `std clip` -- [#10023](https://github.com/nushell/nushell/pull/10023) The output of the `scope` commands has changed - -### Internal breaking change only affecting plugin authors -- [#9927](https://github.com/nushell/nushell/pull/9927) Make `Value::columns` return slice instead of cloned Vec - - -# Full changelog -## Nushell -- [amtoine](https://github.com/amtoine) created - - [remove Clippy flags from the PR template](https://github.com/nushell/nushell/pull/10087) - - [Revert "deprecate `--format` and `--list` in `into datetime` (#10017)"](https://github.com/nushell/nushell/pull/10055) - - [make the charpage optional for `std clip`](https://github.com/nushell/nushell/pull/10053) - - [deprecate `--format` and `--list` in `into datetime`](https://github.com/nushell/nushell/pull/10017) - - [fix the signature of `input list`](https://github.com/nushell/nushell/pull/9977) - - [fix the default config for `explore`](https://github.com/nushell/nushell/pull/9962) - - [fix panic with `lines` on an error](https://github.com/nushell/nushell/pull/9967) - - [add a test to make sure "nothing" shows up as "nothing" in help](https://github.com/nushell/nushell/pull/9941) - - [force version to update when installing with toolkit](https://github.com/nushell/nushell/pull/9947) - - [remove old deprecated commands](https://github.com/nushell/nushell/pull/9840) - - [Fix default prompt indicators](https://github.com/nushell/nushell/pull/9914) -- [fdncred](https://github.com/fdncred) created - - [update install/build scripts to include `--locked`](https://github.com/nushell/nushell/pull/10086) - - [allow `help` to return a `Type::Table`](https://github.com/nushell/nushell/pull/10082) - - [try and fix `into datetime` to accept more dt formats](https://github.com/nushell/nushell/pull/10063) - - [allow `return` to return any nushell value](https://github.com/nushell/nushell/pull/10067) - - [enable/update some example tests so they work again](https://github.com/nushell/nushell/pull/10058) - - [try to document the more obscure testbin commands](https://github.com/nushell/nushell/pull/10057) - - [allow int as a cellpath for `select`](https://github.com/nushell/nushell/pull/10048) - - [allow `select` to take a $variable with a list of columns](https://github.com/nushell/nushell/pull/9987) - - [update `strip-ansi-escapes` to 0.2.0 and the latest reedline](https://github.com/nushell/nushell/pull/9970) - - [update `strip-ansi-escapes` to use new api](https://github.com/nushell/nushell/pull/9958) - - [add keybinding for search-history](https://github.com/nushell/nushell/pull/9930) - - [add `header_on_separator` options to default_config.nu](https://github.com/nushell/nushell/pull/9922) - - [updates `let-env` signature to remove required params](https://github.com/nushell/nushell/pull/9917) - - [remove `vectorize_over_list` from python plugin](https://github.com/nushell/nushell/pull/9905) - - [update `format` signature to allow `record` to be passed in](https://github.com/nushell/nushell/pull/9898) - - [update `items` signature to allow `any` output](https://github.com/nushell/nushell/pull/9896) - - [update `char` signature with `Table`](https://github.com/nushell/nushell/pull/9895) - - [update to current reedline](https://github.com/nushell/nushell/pull/9877) - - [bump to dev version 0.83.2](https://github.com/nushell/nushell/pull/9866) -- [jntrnr](https://github.com/jntrnr) created - - [Revert "pin serde to avoid https://github.com/serde-rs/serde/issues/2538"](https://github.com/nushell/nushell/pull/10078) - - [move 'bytes' back to commands](https://github.com/nushell/nushell/pull/10051) - - [pin serde to avoid https://github.com/serde-rs/serde/issues/2538](https://github.com/nushell/nushell/pull/10061) - - [fix default-env after latest changes](https://github.com/nushell/nushell/pull/10052) - - [Rename `main` to script name when running scripts](https://github.com/nushell/nushell/pull/9948) - - [Auto-expand table based on terminal width](https://github.com/nushell/nushell/pull/9934) - - [fix the Cargo.lock file](https://github.com/nushell/nushell/pull/9955) - - [Move `help commands` to use more structure in signatures](https://github.com/nushell/nushell/pull/9949) - - [Fix a couple clippy warnings](https://github.com/nushell/nushell/pull/9936) - - [Add tests for script subcommands](https://github.com/nushell/nushell/pull/9933) - - [Revert "Add an option to move header on borders"](https://github.com/nushell/nushell/pull/9908) - - [Re-align how prompt indicators work](https://github.com/nushell/nushell/pull/9907) - - [Simplify default style and match Rust code to config](https://github.com/nushell/nushell/pull/9900) - - [Revert 9693 to prevent CPU hangs](https://github.com/nushell/nushell/pull/9893) -- [sholderbach](https://github.com/sholderbach) created - - [Polish `CONTRIBUTING`, add Rust style](https://github.com/nushell/nushell/pull/10071) - - [Remove global clippy `-A` from `toolkit.nu`](https://github.com/nushell/nushell/pull/10073) - - [Remove clippy global `-A` from CI](https://github.com/nushell/nushell/pull/10072) - - [Pin reedline to 0.23.0](https://github.com/nushell/nushell/pull/10070) - - [Rename misused "deprecation" to removal](https://github.com/nushell/nushell/pull/10000) - - [Improve I/O types of `into decimal`(/float)](https://github.com/nushell/nushell/pull/9998) - - [Add search terms to `reject`](https://github.com/nushell/nushell/pull/9996) - - [Move `format duration`/`filesize` back into core](https://github.com/nushell/nushell/pull/9978) - - [Fixup dataframe build after #9971](https://github.com/nushell/nushell/pull/9974) - - [Add `format duration` to replace `into duration --convert`](https://github.com/nushell/nushell/pull/9788) - - [Update `unicode-linebreak` to `0.1.5`](https://github.com/nushell/nushell/pull/9814) -- [kubouch](https://github.com/kubouch) created - - [Remove "let config" warning](https://github.com/nushell/nushell/pull/10068) - - [ Simplify virtualenv testing](https://github.com/nushell/nushell/pull/10035) - - [Recursively export constants from modules](https://github.com/nushell/nushell/pull/10049) - - [Add a few more fields to `scope` commands](https://github.com/nushell/nushell/pull/10045) - - [Add additional span to IncorrectValue error](https://github.com/nushell/nushell/pull/10036) - - [Allow exporting extern-wrapped](https://github.com/nushell/nushell/pull/10025) - - [Fix wrong path expansion in `save`](https://github.com/nushell/nushell/pull/10046) - - [Change `str replace` to match substring by default](https://github.com/nushell/nushell/pull/10038) - - [Remove dead code from tests](https://github.com/nushell/nushell/pull/10040) - - [Sort entries in `scope` commands; Fix usage of externs](https://github.com/nushell/nushell/pull/10039) - - [Refactor `scope` commands](https://github.com/nushell/nushell/pull/10023) - - [Fix example for `extern-wrapped`](https://github.com/nushell/nushell/pull/10004) -- [zhiburt](https://github.com/zhiburt) created - - [nu-table: fix issue with truncation and text border](https://github.com/nushell/nushell/pull/10050) - - [nu-table: Fix padding 0 width issues](https://github.com/nushell/nushell/pull/10011) - - [nu-table/ Add `table.padding` configuration](https://github.com/nushell/nushell/pull/9983) - - [Add an option to set header on border (style)](https://github.com/nushell/nushell/pull/9920) - - [Add an option to move header on borders](https://github.com/nushell/nushell/pull/9796) -- [sitiom](https://github.com/sitiom) created - - [Change Winget Releaser job to `ubuntu-latest`](https://github.com/nushell/nushell/pull/10032) -- [ineu](https://github.com/ineu) created - - [Make `http -f` display the request headers. Closes #9912](https://github.com/nushell/nushell/pull/10022) -- [3lvir4](https://github.com/3lvir4) created - - [Remove potential panic from path join](https://github.com/nushell/nushell/pull/10012) -- [ayax79](https://github.com/ayax79) created - - [Expose polars avro support](https://github.com/nushell/nushell/pull/10019) - - [Nushell table list columns -> dataframe list columns. Explode / Flatten dataframe support.](https://github.com/nushell/nushell/pull/9951) - - [Merged overloaded commands](https://github.com/nushell/nushell/pull/9860) -- [app/dependabot](https://github.com/app/dependabot) created - - [Bump quick-xml from 0.29.0 to 0.30.0](https://github.com/nushell/nushell/pull/9870) - - [Bump rstest from 0.17.0 to 0.18.1](https://github.com/nushell/nushell/pull/9782) -- [meskill](https://github.com/meskill) created - - [fix(nu-parser): do not update plugin.nu file on nu startup](https://github.com/nushell/nushell/pull/10007) - - [test: clear parent envs to prevent leakage to tests](https://github.com/nushell/nushell/pull/9976) -- [nibon7](https://github.com/nibon7) created - - [Fix a crash when moving the cursor after accepting a suggestion from the help menu](https://github.com/nushell/nushell/pull/9784) -- [rgwood](https://github.com/rgwood) created - - [Fix `watch` not handling all file changes](https://github.com/nushell/nushell/pull/9990) - - [Put heavy dataframe dependencies behind feature flag](https://github.com/nushell/nushell/pull/9971) - - [Fix cross-compiling with cross-rs](https://github.com/nushell/nushell/pull/9972) - - [Fix `match` example whitespace](https://github.com/nushell/nushell/pull/9961) -- [panicbit](https://github.com/panicbit) created - - [parse: collect external stream chunks before matching](https://github.com/nushell/nushell/pull/9950) - - [do not emit None mid-stream during parse](https://github.com/nushell/nushell/pull/9925) -- [bobhy](https://github.com/bobhy) created - - [Fix duration type to not report months or years](https://github.com/nushell/nushell/pull/9632) -- [IanManske](https://github.com/IanManske) created - - [Make `Value::columns` return slice instead of cloned Vec](https://github.com/nushell/nushell/pull/9927) - - [Enable macOS foreground process handling](https://github.com/nushell/nushell/pull/9909) - - [Replace `&Span` with `Span` since `Span` is `Copy`](https://github.com/nushell/nushell/pull/9770) -- [atahabaki](https://github.com/atahabaki) created - - [str-expand: update bracoxide to v0.1.2, fixes #9913](https://github.com/nushell/nushell/pull/9940) - - [str-expand: add path flag](https://github.com/nushell/nushell/pull/9856) - - [str-expand: Add Escaping Example](https://github.com/nushell/nushell/pull/9841) -- [stormasm](https://github.com/stormasm) created - - [Categorification: move commands histogram and version out of the default category](https://github.com/nushell/nushell/pull/9946) - - [Categorification: move from Default category to Filters](https://github.com/nushell/nushell/pull/9945) - - [Categorification: move Path commands out of the default category](https://github.com/nushell/nushell/pull/9937) - - [Categorification: graduate nuon --- from the experimental category to the formats category](https://github.com/nushell/nushell/pull/9932) - - [Categorification: move uncategorized String commands to Category::Strings](https://github.com/nushell/nushell/pull/9931) - - [Cratification: move some str case commands to nu-cmd-extra](https://github.com/nushell/nushell/pull/9926) -- [NotLebedev](https://github.com/NotLebedev) created - - [Nothing return type](https://github.com/nushell/nushell/pull/9935) -- [WindSoilder](https://github.com/WindSoilder) created - - [rename from `date format` to `format date`](https://github.com/nushell/nushell/pull/9902) - - [Module: support defining const and use const variables inside of function](https://github.com/nushell/nushell/pull/9773) -- [mengsuenyan](https://github.com/mengsuenyan) created - - [Fixed the panic when type a statement similar to `let f = 'f' $` in the nushell](https://github.com/nushell/nushell/pull/9851) - - [fixed the bug `~ | path type` return empty string](https://github.com/nushell/nushell/pull/9853) -- [app/](https://github.com/app/) created - - [Turn bare URLs into cliclable links](https://github.com/nushell/nushell/pull/9854) -- [jflics6460](https://github.com/jflics6460) created - - [Accept records for http subcommand headers (-H)](https://github.com/nushell/nushell/pull/9771) - -## Extension -- [balupton](https://github.com/balupton) created - - [readmde: close #148 - link extension page](https://github.com/nushell/vscode-nushell-lang/pull/149) - -## Documentation -- [jwarlander](https://github.com/jwarlander) created - - [Use '--locked' in cargo install snippet for dataframe feature](https://github.com/nushell/nushell.github.io/pull/1010) -- [hustcer](https://github.com/hustcer) created - - [Update table mode config doc, fix #1007](https://github.com/nushell/nushell.github.io/pull/1008) - - [Finish `let-env` removal in Chinese translation](https://github.com/nushell/nushell.github.io/pull/1005) - - [Upgrade some dependencies, and fix some broken assets import](https://github.com/nushell/nushell.github.io/pull/995) -- [conqp](https://github.com/conqp) created - - [Update command to list aliases](https://github.com/nushell/nushell.github.io/pull/1006) -- [sholderbach](https://github.com/sholderbach) created - - [Finish `let-env` removal in German translation](https://github.com/nushell/nushell.github.io/pull/1004) -- [amtoine](https://github.com/amtoine) created - - [remove last mentions to `let-env`](https://github.com/nushell/nushell.github.io/pull/999) - - [patch: release notes for 0.83.1](https://github.com/nushell/nushell.github.io/pull/994) -- [BrewingWeasel](https://github.com/BrewingWeasel) created - - [Remove unused empty column](https://github.com/nushell/nushell.github.io/pull/1003) -- [rgwood](https://github.com/rgwood) created - - [Cookbook cleanup](https://github.com/nushell/nushell.github.io/pull/1001) -- [oatovar](https://github.com/oatovar) created - - [Update testing examples](https://github.com/nushell/nushell.github.io/pull/997) -- [rprtr258](https://github.com/rprtr258) created - - [Update explore.md](https://github.com/nushell/nushell.github.io/pull/1000) -- [LeoniePhiline](https://github.com/LeoniePhiline) created - - [fix(docs): Fix link to "setting environment variables"](https://github.com/nushell/nushell.github.io/pull/996) - - [fix(docs): Link to Command Reference led to HTTP 404](https://github.com/nushell/nushell.github.io/pull/993) - -## Nu_Scripts -- [fdncred](https://github.com/fdncred) created - - [fix the other place in the weather script](https://github.com/nushell/nu_scripts/pull/581) - - [fix weather duration after latest nushell changes](https://github.com/nushell/nu_scripts/pull/580) - - [update prompts scripts with new `str replace` syntax](https://github.com/nushell/nu_scripts/pull/579) - - [update `date format` to `format date` in oh-my.nu](https://github.com/nushell/nu_scripts/pull/570) - - [delete codeowners file](https://github.com/nushell/nu_scripts/pull/568) -- [WindSoilder](https://github.com/WindSoilder) created - - [Update python-venv.nu so we can enter subdirectory without an error](https://github.com/nushell/nu_scripts/pull/574) -- [Neur1n](https://github.com/Neur1n) created - - [minor changes to nu_conda.nu and nu_msvs.nu](https://github.com/nushell/nu_scripts/pull/576) -- [EmilySeville7cfg](https://github.com/EmilySeville7cfg) created - - [Simple json schema generator](https://github.com/nushell/nu_scripts/pull/577) -- [uroybd](https://github.com/uroybd) created - - [feat(completions): Ô£¿ add PDM custom completions](https://github.com/nushell/nu_scripts/pull/573) -- [amtoine](https://github.com/amtoine) created - - [rename `date format` to `format date`](https://github.com/nushell/nu_scripts/pull/571) - - [fix the date schedule in the release scripts](https://github.com/nushell/nu_scripts/pull/561) -- [e2dk4r](https://github.com/e2dk4r) created - - [custom-completions: scoop: fix getting environmental variables](https://github.com/nushell/nu_scripts/pull/567) - -## Reedline -- [sholderbach](https://github.com/sholderbach) created - - [Bump version for 0.23 release](https://github.com/nushell/reedline/pull/626) -- [fdncred](https://github.com/fdncred) created - - [update to strip-ansi-escapes 0.2.0](https://github.com/nushell/reedline/pull/618) - - [update `strip-ansi-escapes` to their latest api](https://github.com/nushell/reedline/pull/617) - - [turn off default prompt styling (bold) to prevent leakage](https://github.com/nushell/reedline/pull/615) diff --git a/blog/2023-09-19-nushell_0_85_0.md b/blog/2023-09-19-nushell_0_85_0.md deleted file mode 100644 index 20c373cd938..00000000000 --- a/blog/2023-09-19-nushell_0_85_0.md +++ /dev/null @@ -1,595 +0,0 @@ ---- -title: Nushell 0.85 -author: The Nu Authors -author_site: https://twitter.com/nu_shell -author_image: https://www.nushell.sh/blog/images/nu_logo.png -excerpt: Today, we're releasing version 0.85 of Nu. This release adds the first uutils command, unlocks more constant evaluation at parse time, and polishes many commands. ---- - -# Nushell 0.85 -Nushell, or Nu for short, is a new shell that takes a modern, structured approach to your command line. It works seamlessly with the data from your filesystem, operating system, and a growing number of file formats to make it easy to build powerful command line pipelines. - -Today, we're releasing version 0.85 of Nu. This release adds the first uutils command, unlocks more constant evaluation at parse time, and polishes many commands. - - - -# Where to get it -Nu 0.85 is available as [pre-built binaries](https://github.com/nushell/nushell/releases/tag/0.85.0) or from [crates.io](https://crates.io/crates/nu). If you have Rust installed you can install it using `cargo install nu`. - -NOTE: The optional dataframe functionality is available by `cargo install nu --features=dataframe`. - -As part of this release, we also publish a set of optional plugins you can install and use with Nu. To install, use `cargo install nu_plugin_`. - -# Themes of this release / New features -## Nushell + Uutils = ❤️ -📢The Nushell team is thrilled to announce 🥳 that we've begun working with the [`uutils/coreutils` team on integrating some of their foundational core utilies into nushell](https://www.nushell.sh/blog/2023-09-05-why-uu.html). With this release, we've started with the coreutils `cp` command, which we've temporarily named `ucp`. We're starting with `ucp` to allow broad testing while the current nushell `cp` command remains the default. We've already found one [bug](https://github.com/uutils/coreutils/issues/5257) in the coreutils `cp` command and you might find others. Once it stabelizes, probably with the 0.86.0 release, we'll remove the nushell `cp` command and rename `ucp` to `cp`. In keeping with the nushell style, we've only added a handful of parameters. We can, and probably will, add more if the community determines we need them. We're so very excited and would like to thank [terts](https://github.com/tertsdiepraam), from the coreutils team, for his excellent help and special appreciation to [dmatos2012](https://github.com/dmatos2012) for the, very iterative, first `uutils/coreutils` integration PR [#10097](https://github.com/nushell/nushell/pull/10097) for the `cp` command. To read more about how this came to be, checkout [our blog post](https://www.nushell.sh/blog/2023-09-05-why-uu.html). - -## Quite a few bug fixes -Thanks to all the contributors below for helping us solve issues and bugs :pray: -| author | description | url | -| ------------------------------------------------ | --------------------------------------------------------------------------------- | ------------------------------------------------------- | -| [@rgwood](https://github.com/rgwood) | Fix watch not detecting modifications on Windows | [#10109](https://github.com/nushell/nushell/pull/10109) | -| [@ito-hiroki](https://github.com/ito-hiroki) | Fix tab completion order of directories to consistent with order of files | [#10102](https://github.com/nushell/nushell/pull/10102) | -| [@herobs](https://github.com/herobs) | Fix 9156 endian consistency | [#9873](https://github.com/nushell/nushell/pull/9873) | -| [@ayax79](https://github.com/ayax79) | fixed usages of deprecated chrono DateTime::from_utc | [#10161](https://github.com/nushell/nushell/pull/10161) | -| [@zhiburt](https://github.com/zhiburt) | Fix #10154 | [#10162](https://github.com/nushell/nushell/pull/10162) | -| [@ofek](https://github.com/ofek) | Fix example history command pipeline | [#10220](https://github.com/nushell/nushell/pull/10220) | -| [@dead10ck](https://github.com/dead10ck) | Fix unit tests on Android | [#10224](https://github.com/nushell/nushell/pull/10224) | -| [@amtoine](https://github.com/amtoine) | fix default after an empty where | [#10240](https://github.com/nushell/nushell/pull/10240) | -| [@IanManske](https://github.com/IanManske) | Fix `rm` on macOS | [#10282](https://github.com/nushell/nushell/pull/10282) | -| [@horasal](https://github.com/horasal) | handle empty pipeline while parsing let (fix Issue10083) | [#10116](https://github.com/nushell/nushell/pull/10116) | -| [@dmatos2012](https://github.com/dmatos2012) | Fix variables not allowed in ucp | [#10304](https://github.com/nushell/nushell/pull/10304) | -| [@sholderbach](https://github.com/sholderbach) | Update `crates-ci/typos` and fix new typos | [#10313](https://github.com/nushell/nushell/pull/10313) | -| [@GomesGoncalo](https://github.com/GomesGoncalo) | fix #10319: allow json request of value type list | [#10356](https://github.com/nushell/nushell/pull/10356) | -| [@jntrnr](https://github.com/jntrnr) | fix 'let' to properly redirect | [#10360](https://github.com/nushell/nushell/pull/10360) | -| [@amtoine](https://github.com/amtoine) | fix the pretty printing of failing tests in std | [#10373](https://github.com/nushell/nushell/pull/10373) | -| [@J-Kappes](https://github.com/J-Kappes) | fix input --until-bytes: now stops at any of given bytes | [#10235](https://github.com/nushell/nushell/pull/10235) | -| [@zhiburt](https://github.com/zhiburt) | nu-table: Fix expand table unnessary color in trail head config when wrap is used | [#10367](https://github.com/nushell/nushell/pull/10367) | -| [@fdncred](https://github.com/fdncred) | fix some new chrono warnings | [#10384](https://github.com/nushell/nushell/pull/10384) | -| [@horasal](https://github.com/horasal) | prevent crash when use redirection with let/mut | [#10139](https://github.com/nushell/nushell/pull/10139) | -| [@horasal](https://github.com/horasal) | Allow operator in constants | [#10212](https://github.com/nushell/nushell/pull/10212) | -| [@zhiburt](https://github.com/zhiburt) | nu-table: Patch restore lead trail space bg color | [#10351](https://github.com/nushell/nushell/pull/10351) | -| [@zhiburt](https://github.com/zhiburt) | nu-table: Strip custom color in the header when used on border | [#10357](https://github.com/nushell/nushell/pull/10357) | - -## Consistent use of `float` for our floating point type - -::: warning Breaking change -See a full overview of the [breaking changes](#breaking-changes) -::: - -Nushell currently supports two types to represent numbers without units: `int` for integer numbers and `float` for floating point numbers. -The latter type was in important places incorrectly referred to as `decimal`. This hid the fact that as floating point numbers they have limited precision in some circumstances but higher performance compared to a decimal-encoded number. - -With this release we fix this inaccuracy. - -This means we introduce the commands `into float` and `random float` and deprecate the commands `into decimal` and `random decimal`. The old commands will be removed with the next release but continue to work for this release with a warning. -Please use `into float` instead of `into decimal` and `random float` instead of `random decimal`. - -After the type returned by `describe` has been `float` for a while, we now also change which type name is allowed when specifying command argument or input/output types. - -```nu -# Argument with a specfic type -def foo [bar: float] {} -# Command taking only floating point input from the pipeline and returning the same type. -def baz [] float->float {} -``` -Previously both `float` and `decimal` were supported in those positions. - -## Some updates on `explore` - -::: warning Breaking change -See a full overview of the [breaking changes](#breaking-changes) -::: - -The `explore` built-in commands have changed a bit during this release. - -Now, it supports Vim bindings out of the box thanks to [@amtoine](https://github.com/amtoine) in -[#9966](https://github.com/nushell/nushell/pull/9966). -[@rgwood](https://github.com/rgwood) has simplified the available configuration entries which used -to make the command less easy to understand in -[#10258](https://github.com/nushell/nushell/pull/10258) -[#10259](https://github.com/nushell/nushell/pull/10259) and -[#10270](https://github.com/nushell/nushell/pull/10270). - -Thanks to him again, one can now quit the `explore`r by hitting any of `ctrl+c`, `ctrl+d` or -`ctrl+q` (see [#10257](https://github.com/nushell/nushell/pull/10257)). - -## Improvements to parse-time evaluation - -_Conditional `source` and `use` is now possible._ - -The Nushell core team has been asked quite a lot of times to be able to do parse-time conditional -`source`ing or `use`ing in the configuration, e.g. to load different things depending on the system: -```nushell -if $nu.os-info.name == "windows" { - source "my_windows_config.nu" -} else { - source "my_unix_config.nu" -} -``` - -The above snippet does not work because Nushell's scoping rules keep the sourced values inside the block and the sourcing would not have any visible effect outside of the if/else statement (except environment changes). - -While scoping still works the same, a series of PRs by [@kubouch](https://github.com/kubouch) made conditional `source`/`use`/`overlay use` possible: -- [#9499](https://github.com/nushell/nushell/pull/9499), allows parse-time evaluation of commands, pipelines and subexpressions (see also [Looking for help!](#looking-for-help)) -- with [#10326](https://github.com/nushell/nushell/pull/10326), `if` can now be evaluated at parse time -- finally, [#10160](https://github.com/nushell/nushell/pull/10160) makes the `$nu` built-in variable a true constant :partying_face: - -What does this all mean? One can now write something very similar to the proposed snippet -above! For example: -```nushell -const WINDOWS_CONFIG = "my_windows_config.nu" -const UNIX_CONFIG = "my_unix_config.nu" - -const ACTUAL_CONFIG = if $nu.os-info.name == "windows" { - $WINDOWS_CONFIG -} else { - $UNIX_CONFIG -} - -source $ACTUAL_CONFIG -``` - -### Looking for help! - -[#9499](https://github.com/nushell/nushell/pull/9499) allows running selected commands at parse time. For example, -```nushell -const f = ($nu.default-config-dir | path dirname) -``` -is possible because `path dirname` was manually ported to allow parse time evaluation. Only a very limited subset of Nushell's commands is currently allowed to do so: -* `str length` -* `path` commands -* Some core commands: `describe`, `ignore`, `version`, `if` - -We would like to expand this set to allow more commands to run at parse time. If you'd like to help us porting more commands, we'd welcome your help! Please, see [#10239](https://github.com/nushell/nushell/issues/10239) for more information. Porting the commands is not difficult, but requires a bit of consideration, so it's better to reply to the issue or reach out to the core team beforehand. - -## Improving accessibility -Up until now, an issue for users using a screen reader was that Nushell errors and tables are quite -fancy with some unicode characters. -The issue is that screen reader might have trouble reading them, making the understanding of what's -going on the REPL very hard... - -For tables, it's quite easy, you can set `$env.config.table.mode` to something like `"basic"` or -`"none"` and you should be good! -But errors remained fancy -```nushell -Error: nu::shell::external_command - - × External command failed - ╭─[entry #4:1:1] - 1 │ foo - · ─┬─ - · ╰── did you mean 'for'? - ╰──── - help: No such file or directory (os error 2) -``` - -[@JoaquinTrinanes](https://github.com/JoaquinTrinanes) did implement screen reader-friendly errors -in [#10122](https://github.com/nushell/nushell/pull/10122) which will hopefully make the experience -a lot better when it comes to errors. - -## More support for more platforms -In this release, [@dead10ck](https://github.com/dead10ck) made it possible to use Nushell in Termux -([#10013](https://github.com/nushell/nushell/pull/10013)) and fixed a bug on Android -([#10225](https://github.com/nushell/nushell/pull/10225)). - -## Improved history isolation -::: warning Breaking change -See a full overview of the [breaking changes](#breaking-changes) -::: - -Like many other shells, history between open sessions can be isolated in nushell. -However, the former implementation had the disadvantage that it also blocked access to history of former sessions. -It also didn't isolate hints. -This is now fixed with [!10402](https://github.com/nushell/nushell/pull/10402) by [@Hofer-Julian](https://github.com/Hofer-Julian). -Since this was merged shortly before the release, this feature isn't the default yet. -The `file_format` has to be changed to `"sqlite"` and `isolation` has to be set to `true`. -You can find those in the [config file](https://github.com/nushell/nushell/blob/39d93b536a02c95c263925a47b9e4c34587ce021/crates/nu-utils/src/sample_config/default_config.nu#L202) under `$nu.config-path`. -Please test this so we can fix problems before history isolation becomes the default. - -## Enhancing the documentation -Thanks to all the contributors below for helping us making the documentation of Nushell commands better :pray: -| author | description | url | -| ------------- | ------------------------------------------------------------- | ------------------------------------------------------- | -| @Hofer-Julian | Add notice to enable develop mode on Windows | [#10111](https://github.com/nushell/nushell/pull/10111) | -| @fdncred | update query web example because wikipedia changed their page | [#10173](https://github.com/nushell/nushell/pull/10173) | -| @alsuren | Point from keybindings help to the book's reedline chapter | [#10193](https://github.com/nushell/nushell/pull/10193) | -| @sholderbach | Document that `open` looks up `from` subcommands | [#10255](https://github.com/nushell/nushell/pull/10255) | -| @balupton | readme: add dorothy to supported by | [#10262](https://github.com/nushell/nushell/pull/10262) | -| @brunerm99 | feat: Search terms for use, while, and range (#5093) | [#10265](https://github.com/nushell/nushell/pull/10265) | -| @amtoine | add case-insensitive example to `where` | [#10299](https://github.com/nushell/nushell/pull/10299) | - -## Help with tests -Some more technical work but very helpful to make the source code of Nushell better, so thanks to our -contributors who did improve the tests, often going through the whole source base and doing tideous -find and replace :pray: -| author | description | url | -| ------------ | --------------------------------------------- | ------------------------------------------------------- | -| @J-Kappes | Tests: clean up unnecessary use of pipeline() | [#10170](https://github.com/nushell/nushell/pull/10170) | -| @sholderbach | Remove dead tests depending on `inc` | [#10179](https://github.com/nushell/nushell/pull/10179) | -| @sholderbach | Simplify rawstrings in tests | [#10180](https://github.com/nushell/nushell/pull/10180) | - -## Changes to commands -As usual, new release rhyms with changes to commands! -- a bunch of new columns have been added to the `ps` commands: - - [@fdncred](https://github.com/fdncred) in [#10275](https://github.com/nushell/nushell/pull/10275) - and [#10344](https://github.com/nushell/nushell/pull/10344) - - [@WindSoilder](https://github.com/WindSoilder) in - [#10347](https://github.com/nushell/nushell/pull/10347) -- [@nanoqsh](https://github.com/nanoqsh) has made the behaviour of `append` and `prepend` consistent - regarding ranges in [#10231](https://github.com/nushell/nushell/pull/10231) -- [@Tiggax](https://github.com/Tiggax) has started working on making `select`, `get` and `reject` - more consistent in [#10163](https://github.com/nushell/nushell/pull/10163) and - [#10216](https://github.com/nushell/nushell/pull/10216) -- **Breaking change:** `math` constants have been moved from built-in commands to *true* constants in - the standard library by [@amtoine](https://github.com/amtoine) in - [#9678](https://github.com/nushell/nushell/pull/9678) -- the `into duration` command now accepts integers as arguments and the unit can be specified via an - option with the changes introduced by [@amtoine](https://github.com/amtoine) in - [#10286](https://github.com/nushell/nushell/pull/10286) -- thanks to [@fdncred](https://github.com/fdncred) in - [#10354](https://github.com/nushell/nushell/pull/10354), the `commandline` command can now move - you to the end of the line, no need to "move 1000 characters to the right" anymore - -## Some table themes -Want more delight? [@fdncred](https://github.com/fdncred) got you covered. -He added a bunch of new table themes / modes in -[#10279](https://github.com/nushell/nushell/pull/10279). - -## `echo` is evolving -Coming from other shells, e.g. POSIX ones like Bash or Zsh, the distinction between Nushell's `echo` -and `print` commands and the behaviour of `echo` itself could be confusing :thinking: - -- `print` is a more programming-language-friendly command: it does print its arguments to the - terminal directly, consuming them and thus not allowing to pipe the "output" of print further. -- `echo` was only used to create values and pass them down a pipeline, e.g. `echo "foo" | str length` - -[@jntrnr](https://github.com/jntrnr) made the behaviour of `echo` a bit more general -- it will print to the terminal if not redirected -- it will pass the value down to the pipeline if redirected - -```nushell -echo "foo" # will behave exactly as `print` does -echo "foo" | str length # will compute the length of `"foo"` and forward the result without - # "printing" it unless it's the last command being run -``` - -## Pythonesque operators removal - -::: warning Breaking change -See a full overview of the [breaking changes](#breaking-changes) -::: - -Coming from Python, things like -```python -3 * "foo" -[1, 2] * 10 -``` -would probably appear familiar. - -However, they could lead to some strange internal behaviours and hard to debug issues :confused: -```nushell -> [3, "bob", 4] | reduce --fold 1 {|x, y| $x * $y} -bobbobbobbobbobbobbobbobbobbobbobbob -``` - -> **Note** -> in the example above, we are mixing integer and string multiplication, which might get weird! - -In this release, we decided to remove the string and list scalar multiplication in -[#10292](https://github.com/nushell/nushell/pull/10292) and -[#10293](https://github.com/nushell/nushell/pull/10293) from [@sholderbach](https://github.com/sholderbach). - -However, we do not want to leave you without any other way to achieve the same, this is why -[@amtoine](https://github.com/amtoine) did implement the `repeat` command in the standard library -in [#10339](https://github.com/nushell/nushell/pull/10339) -- bring it into your scope with `use std repeat` -- you can do scalar string multiplication with something like `"foo" | repeat 3 | str join` -- you can do scalar list multiplication with something like `[1, 2] | repeat 3 | flatten` - -## Optimizations -[#10378](https://github.com/nushell/nushell/pull/10378) Switched the default allocator to `mimalloc` as it's shown to reduce startup time by upwards of 30% on Windows. If it does not build on unique platforms nushell can be built without this feature, then using the platform's default allocator. - -# New commands -- [`into float`](https://github.com/nushell/nushell/pull/9979) as a replacement for `into decimal` -- [`random float`](https://github.com/nushell/nushell/pull/10320) as a replacement for `random decimal` - -In the standard library we added the following commands: -- [`std repeat`](https://github.com/nushell/nushell/pull/10339) as a command to repeat an element `n` times in a list. -- [`std formats from ndjson`](https://github.com/nushell/nushell/pull/10283) as a way to directly open newline-delimited JSON recrods. You can use `open` for files with the `.ndjson` ending if you `use std formats "from ndjson"`. -- [`std formats from jsonl`](https://github.com/nushell/nushell/pull/10283) as a way to directly open newline-delimited JSON records. You can use `open` for files with the `.jsonl` ending if you `use std formats "from jsonl"`. - -# Deprecations -## Deprecated commands -- [`into decimal`](https://github.com/nushell/nushell/pull/9979): Use `into float` instead -- [`random decimal`](https://github.com/nushell/nushell/pull/10320): Use `random float` instead - -# Breaking changes -* Plugin authors need to update plugins after the span refactor -* Updated plugins need to be recompiled -- [#10235](https://github.com/nushell/nushell/pull/10235) `input --until-bytes` now stops at any of given bytes -- [#10333](https://github.com/nushell/nushell/pull/10333) Consistently use `float` instead of `decimal` in type specifications -- [#10293](https://github.com/nushell/nushell/pull/10293) Remove pythonic `string * list` multiplication -- [#10292](https://github.com/nushell/nushell/pull/10292) Remove pythonic `int * list` multiplication -- [#10338](https://github.com/nushell/nushell/pull/10338) Change `echo` to print when not redirected -- [#10259](https://github.com/nushell/nushell/pull/10259) explore: remove `:config`, `:show-config`, `:tweak` commands -- [#9929](https://github.com/nushell/nushell/pull/9929) Rename the types with spaces in them to use `-` -- [#10254](https://github.com/nushell/nushell/pull/10254) Change LOG_FORMAT to NU_LOG_FORMAT in nu-std library -- [#9678](https://github.com/nushell/nushell/pull/9678) Move math constants to standard library -- [#10231](https://github.com/nushell/nushell/pull/10231) Make `append`/`prepend` consistent for ranges -- [#9966](https://github.com/nushell/nushell/pull/9966) Add support for Vim motions in `explore` -- [#10042](https://github.com/nushell/nushell/pull/10042) Spanned Value step 1: span all value cases -- [#10103](https://github.com/nushell/nushell/pull/10103) Create `Record` type -- [#10064](https://github.com/nushell/nushell/pull/10064) Fully remove `str replace --string` option after deprecation. Just use `str replace` instead. - -# Full changelog -## Nushell -- [tokatoka](https://github.com/tokatoka) created - - [Add 2 fuzzers for nu-path, nu-parser](https://github.com/nushell/nushell/pull/10376) -- [sholderbach](https://github.com/sholderbach) created - - [Clippy in tests](https://github.com/nushell/nushell/pull/10394) - - [Update internal use of `decimal` to `float`](https://github.com/nushell/nushell/pull/10333) - - [Optimize use of range in `std repeat`](https://github.com/nushell/nushell/pull/10353) - - [Remove python-like string multiplication](https://github.com/nushell/nushell/pull/10293) - - [Invert `&Option`s to `Option<&T>`](https://github.com/nushell/nushell/pull/10315) - - [Remove pythonic `int * list` behavior](https://github.com/nushell/nushell/pull/10292) - - [Rename `random decimal` to `random float`](https://github.com/nushell/nushell/pull/10320) - - [Rename `into decimal` to `into float`](https://github.com/nushell/nushell/pull/9979) - - [Deref `&String` arguments to `&str` where appropriate](https://github.com/nushell/nushell/pull/10321) - - [Use slices directly instead of `&Vec`](https://github.com/nushell/nushell/pull/10328) - - [Bump `calamine` and fix clippy](https://github.com/nushell/nushell/pull/10314) - - [Update `crates-ci/typos` and fix new typos](https://github.com/nushell/nushell/pull/10313) - - [Remove `Cargo.lock` in subcrates](https://github.com/nushell/nushell/pull/10280) - - [Move spellcheck config into `.github` folder](https://github.com/nushell/nushell/pull/10267) - - [Remove codecov.io setup](https://github.com/nushell/nushell/pull/10266) - - [Document that `open` looks up `from` subcommands](https://github.com/nushell/nushell/pull/10255) - - [Tweak contributor image to include more users](https://github.com/nushell/nushell/pull/10238) - - [Update `crossterm`/`ratatui`/dev-`reedline`](https://github.com/nushell/nushell/pull/10137) - - [Simplify rawstrings in tests](https://github.com/nushell/nushell/pull/10180) - - [Remove dead tests depending on `inc`](https://github.com/nushell/nushell/pull/10179) - - [Keep `arrow2` out of basic `--workspace` build](https://github.com/nushell/nushell/pull/10178) -- [fdncred](https://github.com/fdncred) created - - [fix some new chrono warnings](https://github.com/nushell/nushell/pull/10384) - - [add helper switch to move cursor to end of buffer](https://github.com/nushell/nushell/pull/10354) - - [add a few more columns to linux `ps -l` output](https://github.com/nushell/nushell/pull/10344) - - [silence some ucp warnings](https://github.com/nushell/nushell/pull/10294) - - [allow update to use metadata](https://github.com/nushell/nushell/pull/10264) - - [add 6 more table themes](https://github.com/nushell/nushell/pull/10279) - - [respect a users locale with the right prompt](https://github.com/nushell/nushell/pull/10273) - - [add more `ps` columns in Windows](https://github.com/nushell/nushell/pull/10275) - - [update format date when using %x %X %r](https://github.com/nushell/nushell/pull/10272) - - [Restore NU_LIB_DIRS and NU_PLUGIN_DIRS defaults](https://github.com/nushell/nushell/pull/10252) - - [allow `--login` to be used with nu's `--commands` parameter](https://github.com/nushell/nushell/pull/10253) - - [add plugin path when there are no signatures](https://github.com/nushell/nushell/pull/10201) - - [update query web example because wikipedia changed their page](https://github.com/nushell/nushell/pull/10173) - - [name hooks internally](https://github.com/nushell/nushell/pull/10127) - - [bump rust-toolchain to 1.70.0](https://github.com/nushell/nushell/pull/10113) -- [FilipAndersson245](https://github.com/FilipAndersson245) created - - [Adds mimalloc as default feature.](https://github.com/nushell/nushell/pull/10378) -- [zhiburt](https://github.com/zhiburt) created - - [nu-table: Fix expand table unnessary color in trail head config when wrap is used](https://github.com/nushell/nushell/pull/10367) - - [nu-table: Strip custom color in the header when used on border](https://github.com/nushell/nushell/pull/10357) - - [nu-table: Patch restore lead trail space bg color](https://github.com/nushell/nushell/pull/10351) - - [nu-explore: Refactorings](https://github.com/nushell/nushell/pull/10247) - - [Fix #10154](https://github.com/nushell/nushell/pull/10162) -- [J-Kappes](https://github.com/J-Kappes) created - - [fix input --until-bytes: now stops at any of given bytes](https://github.com/nushell/nushell/pull/10235) - - [Tests: clean up unnecessary use of pipeline()](https://github.com/nushell/nushell/pull/10170) -- [amtoine](https://github.com/amtoine) created - - [fix the pretty printing of failing tests in std](https://github.com/nushell/nushell/pull/10373) - - [add `std repeat` command to replace `"foo" * 3`](https://github.com/nushell/nushell/pull/10339) - - [add case-insensitive example to `where`](https://github.com/nushell/nushell/pull/10299) - - [allow `into duration` to take an integer amount of ns](https://github.com/nushell/nushell/pull/10286) - - [rename the types with spaces in them to use `-`](https://github.com/nushell/nushell/pull/9929) - - [fix default after an empty where](https://github.com/nushell/nushell/pull/10240) - - [move math constants to standard library](https://github.com/nushell/nushell/pull/9678) - - [support tab completion cycling](https://github.com/nushell/nushell/pull/10199) - - [add support for Vim motions in `explore`](https://github.com/nushell/nushell/pull/9966) -- [WindSoilder](https://github.com/WindSoilder) created - - [Ps: add `cwd` column on linux and macos](https://github.com/nushell/nushell/pull/10347) - - [return error when user break sleep by ctrl-c](https://github.com/nushell/nushell/pull/10234) -- [jntrnr](https://github.com/jntrnr) created - - [fix 'let' to properly redirect](https://github.com/nushell/nushell/pull/10360) - - [Change `echo` to print when not redirected](https://github.com/nushell/nushell/pull/10338) - - [remove profiling from nushell's hot loop](https://github.com/nushell/nushell/pull/10325) - - [Move Value to helpers, separate span call](https://github.com/nushell/nushell/pull/10121) - - [Spanned Value step 1: span all value cases](https://github.com/nushell/nushell/pull/10042) -- [GomesGoncalo](https://github.com/GomesGoncalo) created - - [fix #10319: allow json request of value type list](https://github.com/nushell/nushell/pull/10356) -- [Tiggax](https://github.com/Tiggax) created - - [Remove `select` error if same row/column is provided](https://github.com/nushell/nushell/pull/10350) - - [update `reject` to be able to recive arg list](https://github.com/nushell/nushell/pull/10216) - - [`reject` multiple row args support](https://github.com/nushell/nushell/pull/10163) -- [kubouch](https://github.com/kubouch) created - - [Allow parse-time evaluation of `if`](https://github.com/nushell/nushell/pull/10326) - - [Remove leftover const eval file](https://github.com/nushell/nushell/pull/10324) - - [Add NU_VERSION environment variable on startup](https://github.com/nushell/nushell/pull/10177) - - [Make $nu constant](https://github.com/nushell/nushell/pull/10160) - - [Allow parse-time evaluation of calls, pipelines and subexpressions](https://github.com/nushell/nushell/pull/9499) -- [hustcer](https://github.com/hustcer) created - - [Update Nu to v0.84 for release and nightly-build](https://github.com/nushell/nushell/pull/10334) - - [Upgrade softprops/action-gh-release to v0.1.15 for release and nightly build workflow](https://github.com/nushell/nushell/pull/10331) -- [geniusisme](https://github.com/geniusisme) created - - [provide env to commands and try to start provided path](https://github.com/nushell/nushell/pull/10302) -- [utouto97](https://github.com/utouto97) created - - [add 'from ndjson' into standard library](https://github.com/nushell/nushell/pull/10283) - - [refactor input command](https://github.com/nushell/nushell/pull/10150) -- [nanoqsh](https://github.com/nanoqsh) created - - [Keep order for `par-each`](https://github.com/nushell/nushell/pull/10249) - - [Make `append`/`prepend` consistent for ranges](https://github.com/nushell/nushell/pull/10231) -- [app/dependabot](https://github.com/app/dependabot) created - - [Bump bytesize from 1.2.0 to 1.3.0](https://github.com/nushell/nushell/pull/10306) - - [Bump tempfile from 3.7.0 to 3.8.0](https://github.com/nushell/nushell/pull/10307) - - [Bump actions/checkout from 3 to 4](https://github.com/nushell/nushell/pull/10308) - - [Bump itertools from 0.10.5 to 0.11.0](https://github.com/nushell/nushell/pull/9524) - - [Bump rust-embed from 6.8.1 to 8.0.0](https://github.com/nushell/nushell/pull/10208) - - [Bump git2 from 0.17.2 to 0.18.0](https://github.com/nushell/nushell/pull/10207) - - [Bump winreg from 0.50.0 to 0.51.0](https://github.com/nushell/nushell/pull/10209) - - [Bump notify-debouncer-full from 0.2.0 to 0.3.1](https://github.com/nushell/nushell/pull/10129) -- [dmatos2012](https://github.com/dmatos2012) created - - [Fix variables not allowed in ucp](https://github.com/nushell/nushell/pull/10304) - - [use uutils/coreutils cp command in place of nushell's cp command](https://github.com/nushell/nushell/pull/10097) -- [dzorya](https://github.com/dzorya) created - - [Added a comment that perl is required for feature static-link-openssl…](https://github.com/nushell/nushell/pull/10291) -- [nibon7](https://github.com/nibon7) created - - [Make cursor_shape optional](https://github.com/nushell/nushell/pull/10289) - - [Exit early when encountering parsing errors](https://github.com/nushell/nushell/pull/10213) - - [Auto format let-else block](https://github.com/nushell/nushell/pull/10214) - - [Use built-in is_terminal instead of is_terminal::is_terminal](https://github.com/nushell/nushell/pull/9550) - - [Don't use `oldtime` feature of chrono ](https://github.com/nushell/nushell/pull/9577) -- [alsuren](https://github.com/alsuren) created - - [signpost 'input list --types [key]' from 'keybindings list'](https://github.com/nushell/nushell/pull/10287) - - [Point from keybindings help to the book's reedline chapter](https://github.com/nushell/nushell/pull/10193) -- [IanManske](https://github.com/IanManske) created - - [Fix `rm` on macOS](https://github.com/nushell/nushell/pull/10282) - - [Restore initial foreground process group on exit](https://github.com/nushell/nushell/pull/10021) - - [Create `Record` type](https://github.com/nushell/nushell/pull/10103) -- [rgwood](https://github.com/rgwood) created - - [Start removing colour config from `explore`](https://github.com/nushell/nushell/pull/10270) - - [Exit explore on ctrl+c/d/q](https://github.com/nushell/nushell/pull/10257) - - [explore: remove `:config`, `:show-config`, `:tweak` commands](https://github.com/nushell/nushell/pull/10259) - - [Remove `exit_esc` and `show_banner` config from `explore`](https://github.com/nushell/nushell/pull/10258) - - [Fix watch not detecting modifications on Windows](https://github.com/nushell/nushell/pull/10109) -- [brunerm99](https://github.com/brunerm99) created - - [feat: Search terms for use, while, and range (#5093)](https://github.com/nushell/nushell/pull/10265) -- [balupton](https://github.com/balupton) created - - [readme: add dorothy to supported by](https://github.com/nushell/nushell/pull/10262) -- [stormasm](https://github.com/stormasm) created - - [change LOG_FORMAT to NU_LOG_FORMAT in nu-std library](https://github.com/nushell/nushell/pull/10254) - - [Move hook to nu_cmd_base](https://github.com/nushell/nushell/pull/10146) - - [remove warnings in nu_command tests](https://github.com/nushell/nushell/pull/10145) - - [update rust-toolchain doc to 4 weeks from 3](https://github.com/nushell/nushell/pull/10140) -- [horasal](https://github.com/horasal) created - - [Allow operator in constants](https://github.com/nushell/nushell/pull/10212) - - [treat path contains '?' as pattern](https://github.com/nushell/nushell/pull/10142) - - [prevent crash when use redirection with let/mut](https://github.com/nushell/nushell/pull/10139) - - [skip comments and eols while parsing pipeline](https://github.com/nushell/nushell/pull/10149) - - [handle empty pipeline while parsing let (fix Issue10083)](https://github.com/nushell/nushell/pull/10116) - - [Add encoding auto-detection for `decode`](https://github.com/nushell/nushell/pull/10030) -- [dead10ck](https://github.com/dead10ck) created - - [Clean up trash support on Android](https://github.com/nushell/nushell/pull/10225) - - [Fix unit tests on Android](https://github.com/nushell/nushell/pull/10224) - - [upgrade nix to 0.27](https://github.com/nushell/nushell/pull/10223) - - [Support Termux](https://github.com/nushell/nushell/pull/10013) -- [ofek](https://github.com/ofek) created - - [Fix example history command pipeline](https://github.com/nushell/nushell/pull/10220) -- [MasterMach50](https://github.com/MasterMach50) created - - [changed default env file to use $nu.home_path to find home](https://github.com/nushell/nushell/pull/10192) -- [matthias-Q](https://github.com/matthias-Q) created - - [feat: allow `from csv` to accept 4 byte unicode separator chars](https://github.com/nushell/nushell/pull/10138) - - [Allow for `.parq` file ending as alternative to `.parquet`](https://github.com/nushell/nushell/pull/10112) -- [ayax79](https://github.com/ayax79) created - - [fixed usages of deprecated chrono DateTime::from_utc](https://github.com/nushell/nushell/pull/10161) - - [Updating polars and sqlparser versions](https://github.com/nushell/nushell/pull/10114) -- [SED4906](https://github.com/SED4906) created - - [Update removed "MDI" icons to current MD icons](https://github.com/nushell/nushell/pull/10126) -- [JoaquinTrinanes](https://github.com/JoaquinTrinanes) created - - [Screen reader-friendly errors](https://github.com/nushell/nushell/pull/10122) -- [Hofer-Julian](https://github.com/Hofer-Julian) created - - [toolkit: Renames `pretty-print-command`](https://github.com/nushell/nushell/pull/10110) - - [Add notice to enable develop mode on Windows](https://github.com/nushell/nushell/pull/10111) -- [herobs](https://github.com/herobs) created - - [Fix 9156 endian consistency](https://github.com/nushell/nushell/pull/9873) -- [ito-hiroki](https://github.com/ito-hiroki) created - - [Fix tab completion order of directories to consistent with order of files](https://github.com/nushell/nushell/pull/10102) - -## Extension -- [nerditation](https://github.com/nerditation) created - - [use `which` to search `nu` location, add icon too.](https://github.com/nushell/vscode-nushell-lang/pull/153) -- [adamcstephens](https://github.com/adamcstephens) created - - [fix shebang/firstLine detection](https://github.com/nushell/vscode-nushell-lang/pull/151) - -## Documentation -- [Gryff](https://github.com/Gryff) created - - [Change direnv example to upload $env.PATH as a list](https://github.com/nushell/nushell.github.io/pull/1058) -- [edhowland](https://github.com/edhowland) created - - [Changed Python plugin example to be more portable](https://github.com/nushell/nushell.github.io/pull/1060) -- [dnsem](https://github.com/dnsem) created - - [Support for standard input in script with shebang](https://github.com/nushell/nushell.github.io/pull/1057) -- [petrisch](https://github.com/petrisch) created - - [DE translation for custom_completions.md](https://github.com/nushell/nushell.github.io/pull/1056) - - [Typos in custom_completions](https://github.com/nushell/nushell.github.io/pull/1052) -- [mb21](https://github.com/mb21) created - - [Cookbook setup: fix command to append to PATH](https://github.com/nushell/nushell.github.io/pull/1055) -- [connorjs](https://github.com/connorjs) created - - [Update variables_and_subexpressions.md - remove obsolete section](https://github.com/nushell/nushell.github.io/pull/1054) - - [Update working_with_lists.md - format date](https://github.com/nushell/nushell.github.io/pull/1053) -- [JoaquinTrinanes](https://github.com/JoaquinTrinanes) created - - [Fix external completers typo](https://github.com/nushell/nushell.github.io/pull/1051) - - [Simplify external completer](https://github.com/nushell/nushell.github.io/pull/1049) - - [Error style section](https://github.com/nushell/nushell.github.io/pull/1026) -- [hustcer](https://github.com/hustcer) created - - [Update min required node version and some node modules](https://github.com/nushell/nushell.github.io/pull/1050) -- [sholderbach](https://github.com/sholderbach) created - - [Document that `open` looks up `from`s in scope](https://github.com/nushell/nushell.github.io/pull/1048) -- [stormasm](https://github.com/stormasm) created - - [add a link to the contributor book at the end of the plugins chapter](https://github.com/nushell/nushell.github.io/pull/1045) -- [alsuren](https://github.com/alsuren) created - - [Point out where command docs should be edited](https://github.com/nushell/nushell.github.io/pull/1042) -- [dclausen](https://github.com/dclausen) created - - [Update cheat_sheet.md](https://github.com/nushell/nushell.github.io/pull/1039) -- [simonboots](https://github.com/simonboots) created - - [Fix small typo in modules.md](https://github.com/nushell/nushell.github.io/pull/1038) -- [leetemil](https://github.com/leetemil) created - - [Update docs for exiting shell in shells](https://github.com/nushell/nushell.github.io/pull/1037) -- [adamchalmers](https://github.com/adamchalmers) created - - [Clarify how to check config file paths](https://github.com/nushell/nushell.github.io/pull/1030) - - [Link to escape when discussing escapes](https://github.com/nushell/nushell.github.io/pull/1031) -- [follower](https://github.com/follower) created - - [Move launch instructions earlier in page.](https://github.com/nushell/nushell.github.io/pull/1032) -- [jamesarch](https://github.com/jamesarch) created - - [fix missing command](https://github.com/nushell/nushell.github.io/pull/1034) -- [narve](https://github.com/narve) created - - [Update loading_data.md, correct link to http command](https://github.com/nushell/nushell.github.io/pull/1033) -- [dlamei](https://github.com/dlamei) created - - [fix typo in book](https://github.com/nushell/nushell.github.io/pull/1028) -- [lomm28](https://github.com/lomm28) created - - [nu cheat sheet added](https://github.com/nushell/nushell.github.io/pull/1025) -- [fdncred](https://github.com/fdncred) created - - [update fdncred's item + typo](https://github.com/nushell/nushell.github.io/pull/1022) -- [rgwood](https://github.com/rgwood) created - - [Update Reilly's comments in birthday blog post](https://github.com/nushell/nushell.github.io/pull/1021) -- [app/github-actions](https://github.com/app/github-actions) created - - [Compressed Images](https://github.com/nushell/nushell.github.io/pull/1020) -- [jntrnr](https://github.com/jntrnr) created - - [Add Nushell birthday post](https://github.com/nushell/nushell.github.io/pull/1019) - -## Nu_Scripts -- [amtoine](https://github.com/amtoine) created - - [fix scripts](https://github.com/nushell/nu_scripts/pull/594) - - [add a `typeof` command](https://github.com/nushell/nu_scripts/pull/597) - - [add `$.type` to `package.nuon`](https://github.com/nushell/nu_scripts/pull/582) - - [add the `random-bytes` benchmark](https://github.com/nushell/nu_scripts/pull/595) -- [WindSoilder](https://github.com/WindSoilder) created - - [Improve background job.nu](https://github.com/nushell/nu_scripts/pull/607) - - [use closure instead of block](https://github.com/nushell/nu_scripts/pull/602) -- [Zinvoke](https://github.com/Zinvoke) created - - [FEATURE: add `catppuccin-mocha` theme](https://github.com/nushell/nu_scripts/pull/601) -- [brunerm99](https://github.com/brunerm99) created - - [Change nu_conda list to output active status of environment as well (#604)](https://github.com/nushell/nu_scripts/pull/605) -- [icp1994](https://github.com/icp1994) created - - [feat(hook): add `rusty-paths.nu`](https://github.com/nushell/nu_scripts/pull/596) -- [selfagency](https://github.com/selfagency) created - - [Add support for fnm](https://github.com/nushell/nu_scripts/pull/593) -- [fnuttens](https://github.com/fnuttens) created - - [Replace exa by eza aliases](https://github.com/nushell/nu_scripts/pull/591) -- [maxim-uvarov](https://github.com/maxim-uvarov) created - - [Update `bar` function](https://github.com/nushell/nu_scripts/pull/589) -- [StripedMonkey](https://github.com/StripedMonkey) created - - [Expand git completions](https://github.com/nushell/nu_scripts/pull/587) -- [AntoineSebert](https://github.com/AntoineSebert) created - - [Add `dfr` before `into df` and `into nu`](https://github.com/nushell/nu_scripts/pull/585) - -## Reedline -- [sholderbach](https://github.com/sholderbach) created - - [Remove old `actions-rs/cargo`](https://github.com/nushell/reedline/pull/637) - - [Add a configuration to codecov.io](https://github.com/nushell/reedline/pull/636) - - [Setup coverage with codecov.io](https://github.com/nushell/reedline/pull/635) - - [Bump `crossterm` to 0.27.0](https://github.com/nushell/reedline/pull/625) -- [ysthakur](https://github.com/ysthakur) created - - [Let prompts choose to repaint on enter](https://github.com/nushell/reedline/pull/627) -- [Hofer-Julian](https://github.com/Hofer-Julian) created - - [Minor improvements](https://github.com/nushell/reedline/pull/633) - - [Fix `read_line` docs](https://github.com/nushell/reedline/pull/629) -- [Abdillah](https://github.com/Abdillah) created - - [Add Kitty protocol keyboard enhancement support](https://github.com/nushell/reedline/pull/607) diff --git a/blog/2023-12-12-nushell_0_88_0.md b/blog/2023-12-12-nushell_0_88_0.md deleted file mode 100644 index 4511a055596..00000000000 --- a/blog/2023-12-12-nushell_0_88_0.md +++ /dev/null @@ -1,769 +0,0 @@ ---- -title: Nushell 0.88.0 -author: The Nu Authors -author_site: https://twitter.com/nu_shell -author_image: https://www.nushell.sh/blog/images/nu_logo.png -excerpt: Today, we're releasing version 0.88.0 of Nu. This release adds a spread operator, output stream improvements, dynamic switch support, and much more. ---- - - -# Nushell 0.88.0 - -Nushell, or Nu for short, is a new shell that takes a modern, structured approach to your command line. It works seamlessly with the data from your filesystem, operating system, and a growing number of file formats to make it easy to build powerful command line pipelines. - -Today, we're releasing version 0.88.0 of Nu. This release adds a spread operator, output stream improvements, dynamic switch support, and much more. - -# Where to get it - -Nu 0.88.0 is available as [pre-built binaries](https://github.com/nushell/nushell/releases/tag/0.88.0) or from [crates.io](https://crates.io/crates/nu). If you have Rust installed you can install it using `cargo install nu`. - -::: tip Note -The optional dataframe functionality is available by `cargo install nu --features=dataframe`. -::: - -As part of this release, we also publish a set of optional plugins you can install and use with Nu. To install, use `cargo install nu_plugin_`. - -# Table of content -- [*Themes of this release / New features*](#themes-of-this-release-new-features-toc) - - [*Hall of fame*](#hall-of-fame-toc) - - [*Bug fixes*](#bug-fixes-toc) - - [*Enhancing the documentation*](#enhancing-the-documentation-toc) - - [*New _spread_ operator for list and record literals*](#new-spread-operator-for-list-and-record-literals-toc) - - [*Passing boolean switches dynamically*](#passing-boolean-switches-dynamically-toc) - - [*Redirection to standard streams is getting better*](#redirection-to-standard-streams-is-getting-better-toc) - - [*One-time theming of tables is there*](#one-time-theming-of-tables-is-there-toc) - - [*Exposing name of script to the wild*](#exposing-name-of-script-to-the-wild-toc) - - [*Parsing human-friendly dates into Nushell values*](#parsing-human-friendly-dates-into-nushell-values-toc) - - [*Show found externals via syntax highlighting in the REPL*](#show-found-externals-via-syntax-highlighting-in-the-repl-toc) - - [*New "out of bound" error*](#new-out-of-bound-error-toc) - - [*Details on the `0.87.1` hotfix release*](#details-on-the-0-87-1-hotfix-release-toc) - - [*Need help to wrap... commands?*](#need-help-to-wrap-commands-toc) - - [*Restricting use of internal variables*](#restricting-use-of-internal-variables-toc) - - [*A small update on the LSP*](#a-small-update-on-the-lsp-toc) - - [*Our set of commands is evolving*](#our-set-of-commands-is-evolving-toc) - - [*New commands*](#new-commands-toc) - - [*Changes to existing commands*](#changes-to-existing-commands-toc) - - [*Deprecated commands*](#deprecated-commands-toc) - - [*Removed commands*](#removed-commands-toc) -- [*Breaking changes*](#breaking-changes-toc) -- [*Full changelog*](#full-changelog-toc) - -# Themes of this release / New features [[toc](#table-of-content)] - - - -## Hall of fame [[toc](#table-of-content)] -### Bug fixes [[toc](#table-of-content)] -Thanks to all the contributors below for helping us solve issues and bugs :pray: -| author | description | url | -| ------------------------------------ | ----------- | ------------------------------------------------------- | -| [@dead10ck](https://github.com/dead10ck) | into binary -c: return 0 as single byte | [#11068](https://github.com/nushell/nushell/pull/11068) | -| [@zhiburt](https://github.com/zhiburt) | Fix #11047 | [#11054](https://github.com/nushell/nushell/pull/11054) | -| [@fdncred](https://github.com/fdncred) | tweak `table` example/parameter text | [#11071](https://github.com/nushell/nushell/pull/11071) | -| [@fdncred](https://github.com/fdncred) | add "default" table theme | [#11072](https://github.com/nushell/nushell/pull/11072) | -| [@fdncred](https://github.com/fdncred) | correct table example syntax | [#11074](https://github.com/nushell/nushell/pull/11074) | -| [@fdncred](https://github.com/fdncred) | optimize/clean up a few of the `table` changes | [#11076](https://github.com/nushell/nushell/pull/11076) | -| [@sophiajt](https://github.com/sophiajt) | Fix the output type for 'view files' | [#11077](https://github.com/nushell/nushell/pull/11077) | -| [@danielsomerfield](https://github.com/danielsomerfield) | Fix toolkit to run workspace on 'check pr' (issue #10906) | [#11112](https://github.com/nushell/nushell/pull/11112) | -| [@hustcer](https://github.com/hustcer) | Exit the release job if creating binary package failed | [#11145](https://github.com/nushell/nushell/pull/11145) | -| [@hustcer](https://github.com/hustcer) | Fix release and nightly build workflow | [#11146](https://github.com/nushell/nushell/pull/11146) | -| [@amtoine](https://github.com/amtoine) | fix the link to the `nu_scripts` in `std clip` deprecation | [#11150](https://github.com/nushell/nushell/pull/11150) | -| [@NotLebedev](https://github.com/NotLebedev) | Cp target expansion | [#11152](https://github.com/nushell/nushell/pull/11152) | -| [@MarikaChlebowska](https://github.com/MarikaChlebowska) | Add metadata to some filters | [#11160](https://github.com/nushell/nushell/pull/11160) | -| [@sholderbach](https://github.com/sholderbach) | Revert "Adding support for Polars structs" | [#11171](https://github.com/nushell/nushell/pull/11171) | -| [@sigoden](https://github.com/sigoden) | Fix spans passed to external_completer | [#11008](https://github.com/nushell/nushell/pull/11008) | -| [@nibon7](https://github.com/nibon7) | Add boundary check for str index-of | [#11190](https://github.com/nushell/nushell/pull/11190) | -| [@WindSoilder](https://github.com/WindSoilder) | When using redirection, if a command generates non-zero exit code, the script should stop running | [#11191](https://github.com/nushell/nushell/pull/11191) | -| [@nibon7](https://github.com/nibon7) | Fix span of invalid range | [#11207](https://github.com/nushell/nushell/pull/11207) | -| [@nibon7](https://github.com/nibon7) | Fix capacity overflow caused by large range of ports | [#11210](https://github.com/nushell/nushell/pull/11210) | -| [@IanManske](https://github.com/IanManske) | Fix `get -i` ignoring errors for only the first cellpath | [#11213](https://github.com/nushell/nushell/pull/11213) | -| [@dtolnay](https://github.com/dtolnay) | Fix `Option<&str> == Option<&String>` build error when using rust_decimal/rkyv feature | [#11205](https://github.com/nushell/nushell/pull/11205) | -| [@nibon7](https://github.com/nibon7) | Add checks for ports | [#11214](https://github.com/nushell/nushell/pull/11214) | -| [@ysthakur](https://github.com/ysthakur) | Fix highlighting of spread subexpressions in records | [#11202](https://github.com/nushell/nushell/pull/11202) | -| [@nibon7](https://github.com/nibon7) | Fix overlay_use_main_not_exported hanging when an external spam command exists | [#11261](https://github.com/nushell/nushell/pull/11261) | -| [@AucaCoyan](https://github.com/AucaCoyan) | :bug: Fixes markdown formatting on LSP hover | [#11253](https://github.com/nushell/nushell/pull/11253) | -| [@MarikaChlebowska](https://github.com/MarikaChlebowska) | Add more descriptive error message when passing list to from_csv | [#10962](https://github.com/nushell/nushell/pull/10962) | -| [@sophiajt](https://github.com/sophiajt) | Respect non-zero exit code in subexpressions and blocks | [#8984](https://github.com/nushell/nushell/pull/8984) | -| [@WindSoilder](https://github.com/WindSoilder) | Error on `use path item1 item2`, if item1 is not a module | [#11183](https://github.com/nushell/nushell/pull/11183) | -| [@KAAtheWiseGit](https://github.com/KAAtheWiseGit) | Match `++=` capabilities with `++` | [#11130](https://github.com/nushell/nushell/pull/11130) | -| [@fdncred](https://github.com/fdncred) | Add nu lib dirs default | [#11248](https://github.com/nushell/nushell/pull/11248) | - -### Enhancing the documentation [[toc](#table-of-content)] -Thanks to all the contributors below for helping us making the documentation of Nushell commands better :pray: -| author | description | url | -| ------------------------------------------------ | ---------------------------------------------------------------------------- | ------------------------------------------------------- | -| [@sholderbach](https://github.com/sholderbach) | Curate developer documentation in tree | [#11052](https://github.com/nushell/nushell/pull/11052) | -| [@IanManske](https://github.com/IanManske) | Build `nu-protocol` docs with all features enabled | [#11180](https://github.com/nushell/nushell/pull/11180) | -| [@poliorcetics](https://github.com/poliorcetics) | feat: Add default docs for aliases, generated from the command they point to | [#10825](https://github.com/nushell/nushell/pull/10825) | -| [@amtoine](https://github.com/amtoine) | fix `nu-std` README | [#11244](https://github.com/nushell/nushell/pull/11244) | - -### Working on internals [[toc](#table-of-content)] -Thanks to all the contributors below for working on internals of Nushell, such as refactoring the code :pray: -| author | description | url | -| ---------------------------------------------------- | -------------------------------------------------------- | ------------------------------------------------------- | -| [@fdncred](https://github.com/fdncred) | bump rust-toolchain to 1.72.1 | [#11079](https://github.com/nushell/nushell/pull/11079) | -| [@nibon7](https://github.com/nibon7) | Apply nightly clippy fixes | [#11083](https://github.com/nushell/nushell/pull/11083) | -| [@drbrain](https://github.com/drbrain) | Convert ShellError::CommandNotFound to named fields | [#11094](https://github.com/nushell/nushell/pull/11094) | -| [@drbrain](https://github.com/drbrain) | Convert ShellError::NetworkFailure to named fields | [#11093](https://github.com/nushell/nushell/pull/11093) | -| [@drbrain](https://github.com/drbrain) | Add Argument::span() and Call::arguments_span() | [#10983](https://github.com/nushell/nushell/pull/10983) | -| [@IanManske](https://github.com/IanManske) | Refactor `Value` cell path functions to fix bugs | [#11066](https://github.com/nushell/nushell/pull/11066) | -| [@sholderbach](https://github.com/sholderbach) | Bump version to `0.87.2` | [#11114](https://github.com/nushell/nushell/pull/11114) | -| [@sholderbach](https://github.com/sholderbach) | Bump `procfs` to 0.16.0 | [#11115](https://github.com/nushell/nushell/pull/11115) | -| [@drbrain](https://github.com/drbrain) | Remove ShellError::FlagNotFound | [#11119](https://github.com/nushell/nushell/pull/11119) | -| [@drbrain](https://github.com/drbrain) | Convert ShellError::AliasNotFound to named fields | [#11118](https://github.com/nushell/nushell/pull/11118) | -| [@drbrain](https://github.com/drbrain) | Convert FileNotFound to named fields | [#11120](https://github.com/nushell/nushell/pull/11120) | -| [@hustcer](https://github.com/hustcer) | Upgrade Nu and script for release workflow | [#11121](https://github.com/nushell/nushell/pull/11121) | -| [@sholderbach](https://github.com/sholderbach) | Use record API in `describe --detailed` | [#11075](https://github.com/nushell/nushell/pull/11075) | -| [@drbrain](https://github.com/drbrain) | Convert FileNotFoundCustom to named fields | [#11123](https://github.com/nushell/nushell/pull/11123) | -| [@drbrain](https://github.com/drbrain) | Convert PluginFailedToLoad to named fields | [#11124](https://github.com/nushell/nushell/pull/11124) | -| [@drbrain](https://github.com/drbrain) | Convert PluginFailedToEncode to named fields | [#11125](https://github.com/nushell/nushell/pull/11125) | -| [@drbrain](https://github.com/drbrain) | Convert PluginFailedToDecode to named fields | [#11126](https://github.com/nushell/nushell/pull/11126) | -| [@sholderbach](https://github.com/sholderbach) | Move more commands to opaque `Record` type | [#11122](https://github.com/nushell/nushell/pull/11122) | -| [@rfaulhaber](https://github.com/rfaulhaber) | Bump `sysinfo` to 0.29.11 | [#11166](https://github.com/nushell/nushell/pull/11166) | -| [@drbrain](https://github.com/drbrain) | Convert more ShellError variants to named fields | [#11173](https://github.com/nushell/nushell/pull/11173) | -| [@WindSoilder](https://github.com/WindSoilder) | add echo_env_mixed testbin to reduce windows only tests | [#11172](https://github.com/nushell/nushell/pull/11172) | -| [@cosineblast](https://github.com/cosineblast) | Remove file I/O from tests that don't need it | [#11182](https://github.com/nushell/nushell/pull/11182) | -| [@drbrain](https://github.com/drbrain) | Convert more ShellError variants to named fields | [#11222](https://github.com/nushell/nushell/pull/11222) | -| [@nibon7](https://github.com/nibon7) | Explicitly indicate duplicate flags | [#11226](https://github.com/nushell/nushell/pull/11226) | -| [@ysthakur](https://github.com/ysthakur) | Reduce code duplication in eval.rs and eval_const.rs | [#11192](https://github.com/nushell/nushell/pull/11192) | -| [@ayax79](https://github.com/ayax79) | Upgrading to polars 0.35 | [#11241](https://github.com/nushell/nushell/pull/11241) | -| [@IanManske](https://github.com/IanManske) | Remove unnecessary boxing of `Stack::recursion_count` | [#11238](https://github.com/nushell/nushell/pull/11238) | -| [@schrieveslaach](https://github.com/schrieveslaach) | Upgrade lsp-server Dependency | [#11252](https://github.com/nushell/nushell/pull/11252) | -| [@drbrain](https://github.com/drbrain) | Convert `Shellerror::GenericError` to named fields | [#11230](https://github.com/nushell/nushell/pull/11230) | -| [@sholderbach](https://github.com/sholderbach) | Bump version to `0.87.1` | [#11056](https://github.com/nushell/nushell/pull/11056) | -| [@dead10ck](https://github.com/dead10ck) | Testing support tweaks: exit status in `Outcome` | [#10692](https://github.com/nushell/nushell/pull/10692) | -| [@nibon7](https://github.com/nibon7) | Simplify `clear` implementation | [#11273](https://github.com/nushell/nushell/pull/11273) | -| [@drbrain](https://github.com/drbrain) | Convert remainder of ShellError variants to named fields | [#11276](https://github.com/nushell/nushell/pull/11276) | - -## New _spread_ operator for list and record literals [[toc](#table-of-content)] - -[#10598](https://github.com/nushell/nushell/issues/10598) asked for a spread operator (`...`), and in [#11006](https://github.com/nushell/nushell/pull/11006) -and [#11144](https://github.com/nushell/nushell/pull/11144/), [@ysthakur](https://github.com/ysthakur/) implemented a spread operator in lists and records, respectively. -Spreading arguments to commands has not been implemented yet. - -The spread operator can help you avoid `append` in lists, e.g., this: -```nushell -let list = ["foo"] -[ - 1, - ...$list, - ...("foo" | split chars), - ...[3 9], - [] -] | to nuon -``` -will give: -```nushell -[1, foo, f, o, o, 3, 9, []] -``` - -In records, it can help you avoid `merge`, e.g., this: -```nushell -let record = { a: "foo" } -{ - ...$record, - y: "bar", - ...{ z: 2 } -} | to nuon -``` -will give: -```nushell -{a: foo, y: bar, z: 2} -``` - -You can spread variables, subexpressions, and either lists (inside list literals) or records (inside record literals). -Note that there needs to be no whitespace between the `...` and the expression being spread. - -## Passing boolean switches dynamically [[toc](#table-of-content)] -In last release, a distinction has been introduced between switches, e.g. `--enable-feature`, and -boolean options, e.g. `--do-something: bool`. -The former is simply used as `--enable-feature` and the latter expects a value as -`--do-something false`. - -Up until now, this had the downside of disallowing one to pass boolean switches to inner calls of -commands. -An example would be two commands, `foo` and `bar`, which both have a `--switch` and where `foo` is -calling `bar` internally with the opposite switch. It would have to look something like -```nushell -def bar [--switch] { - print $"switch in bar: ($switch)" -} - -def foo [--switch] { - print $"switch in foo: ($switch)" - if $switch { - bar - } else { - bar --switch - } -} -``` -or `bar` would have to take a boolean value instead of a switch, which would make the command less -nice to use as part of a public API... -```nushell -def bar [--switch: bool] { - print $"switch in bar: ($switch)" -} - -def foo [--switch] { - print $"switch in foo: ($switch)" - bar --switch (not $switch) -} -``` - -In this release and thanks to the work of [@WindSoilder](https://github.com/WindSoilder) in -[#11057](https://github.com/nushell/nushell/pull/11057), boolean switches can now be passed around. -This will simplify the code above and still preserve the nice signature of `bar` :partying: -```nushell -def bar [--switch] { - print $"switch in bar: ($switch)" -} - -def foo [--switch] { - print $"switch in foo: ($switch)" - bar --switch=(not $switch) -} -``` - -## Redirection to standard streams is getting better [[toc](#table-of-content)] -Once again, [@WindSoilder](https://github.com/WindSoilder) has been working on the redirection -system of Nushell, fixing a bug and adding a new very nice feature: -- [#10851](https://github.com/nushell/nushell/pull/10851): one pipeline output stream can be - redirected and the other one used as input to the rest of the pipe. - Given the following Bash script called `foo.sh` that outputs both to _stdout_ and _stderr_ - ```sh - echo aaaaa - echo bbb 1>&2 - echo cc - ``` - it is now possible to run the following command, redirecting `bbb` to a file and the rest - to the `lines | each { ... }` part of the pipeline: - ```nushell - bash test.sh err> err.txt | lines | each { str length} - ``` - resulting in `[5, 2]` as expected and `bbb` inside `err.txt`. -- [#10764](https://github.com/nushell/nushell/pull/10764): append to file with the `>>` syntax - instead of overwriting with `>` - ```nushell - (1 + 2 + 3) out> sum.txt - "\n" out>> sum.txt - (4 + 5 + 6) out>> sum.txt - ``` - will create a file called `sum.txt` with the following content - ``` - 6 - 15 - ``` - -## One-time theming of tables is there [[toc](#table-of-content)] -A common question and feature request from the community was: _how can i change the theme of Nushell -tables for just one command?_ - -Because of how Nushell works, the way to do that has been the following for a long time -```nushell -do { # use the scope of `do` to not alter the environment of the callee - $env.config.table.mode = "none" # set the theme - ls | table # call table to avoid just passing the value back to the callee and use the outside theme -} -``` - -In [#11058](https://github.com/nushell/nushell/pull/11058), [@zhiburt](https://github.com/zhiburt) -cracked the nut and added the long-wanted `table --theme` option. Below is a simple example: -- let's define a table -```nushell -let table = ls | where type == dir | reject type -``` -- and show it with a particular theme -```nushell -$table | table --theme ascii_rounded -``` -``` -.#--name----size-------modified------. -|0|assets |4.1 KB|2023-12-05 18:32:30| -|1|benches|4.1 KB|2023-12-09 22:33:44| -|2|crates |4.1 KB|2023-12-09 22:33:44| -|3|devdocs|4.1 KB|2023-12-09 22:33:44| -|4|docker |4.1 KB|2023-12-09 22:33:44| -|5|scripts|4.1 KB|2023-12-09 22:33:44| -|6|src |4.1 KB|2023-12-09 22:33:44| -|7|target |4.1 KB|2023-12-09 14:19:04| -|8|tests |4.1 KB|2023-12-05 18:32:30| -|9|wix |4.1 KB|2023-12-05 18:32:30| -'------------------------------------' -``` - -## Exposing name of script to the wild [[toc](#table-of-content)] -Coming from languages such as Python and Bash, it's quite expected to be able to access the name of -the script itself the same way it's been called from the CLI: with `sys.argv[0]` in Python and `$0` -in Bash. - -This was not possible in Nushell until the work of [@p00f](https://github.com/p00f) in -[#11203](https://github.com/nushell/nushell/pull/11203). -This will expose to any script a new environment variable called `$env.PROCESS_PATH` and which will -contain precisely something akin to `argv[0]`! -```nushell -#!/usr/bin/env nu -# in demo.nu - -def main [] { - printf $"I was called as ($env.PROCESS_PATH)" -} -``` -```nushell -demo.nu # will show "I was called as demo.nu" -./demo.nu # will show "I was called as ./demo.nu" -/path/to/demo.nu # will show "I was called as /path/to/demo.nu" -``` - -## Parsing human-friendly dates into Nushell values [[toc](#table-of-content)] -In [#11051](https://github.com/nushell/nushell/pull/11051), [@fdncred](https://github.com/fdncred) -added to `into datetime` the ability to parse _human readable_ dates into Nushell `datetime`. -This allows to write crazy things like -```nushell -"Now" | into datetime # same as `date now` -"A week ago" | into datetime # same as `(date now) - 1wk` -``` - -::: tip Note -see the full list of examples with `into datetime --list-human` -::: - -## Show found externals via syntax highlighting in the [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop) [[toc](#table-of-content)] -We've added a new experimental feature that changes the syntax highlighting of text in the command position in the repl. Here's how it works. As you type, if a command is found with the current letter you've typed, the command will be highlighted according to your configuration of your color theme, specifically `shape_external_resolved`. As you keep typing, `which` fires to find out if the command is found or not. This allows you to know whether you've created a typo before you ever hit enter in the nushell repl. - -Since this might have a performance impact, we've put this behind a configuration point named `highlight_resolved_externals` in the config.nu file. Set it to `true` to enable this functionality and `false` to disable it. It defaults to `false`. - -Right now, with a dark theme, here's one way of configuring these colors, in the config.nu color theme, that showcases this funcitonality. Also, make sure you have `highlight_resolved_externals` set to `true`. - -```nushell - shape_internalcall: cyan_bold # internal commands that are found will be this color - shape_external: darkorange # external "commands" that do not exist, will be this color - shape_external_resolved: light_yellow_bold # external commands that are found with `which`, will be this color -``` -You can read more about it and see a gif in [#11135](https://github.com/nushell/nushell/pull/11135) where [@fdncred](https://github.com/fdncred) implemented the feature. - -## New "out of bound" error [[toc](#table-of-content)] -[@nibon7](https://github.com/nibon7) introduces in -[#11201](https://github.com/nushell/nushell/pull/11201) a new error which is -pretty common to programming languages: the "out of bound" error. - -This will cause the following command to give an "out of bound" error: -```nushell -"foo" | str index-of '' --range 10..11 -``` - -## Details on the `0.87.1` hotfix release [[toc](#table-of-content)] -In between the last `0.87.0` release and the one from today, there has been a quick hotfix release -to address two major bugs to two quite important filesystem commands: `rm` and `cp`. - -Below are some details about these two bug fixes: -- [@IanManske](https://github.com/IanManske) fixed `rm` in - [#11064](https://github.com/nushell/nushell/pull/11064) which has - [trouble removing files after a `cd`](https://github.com/nushell/nushell/issues/11061) -- [@kubouch](https://github.com/kubouch) fixed a similar one about `cp` in - [#11080](https://github.com/nushell/nushell/pull/11080), addressing - [#10832](https://github.com/nushell/nushell/issues/10832) - -## Need help to wrap... commands? [[toc](#table-of-content)] -In the previous release, the `extern-wrapped` command has been deprecated and it is -[now being removed](#removed-commands-toc). -An issue did persist though, making `def --wrapped` not a suitable replacement for the old command... -which was fixed in [#11235](https://github.com/nushell/nushell/pull/11235) by the changes from -[@KAAtheWiseGit](https://github.com/KAAtheWiseGit): `def --wrapped` commands won't create a help -page anymore, allowing to send `-h` and `--help` to other commands: -```nushell -def --wrapped foo [...rest] { echo $rest } -foo --help -h -``` -will give no help page -``` -─┬────── -0│--help -1│-h -─┴────── -``` - -## Restricting use of internal variables [[toc](#table-of-content)] -Nushell features some internal variables that users can't redeclare, i.e. `$nu`, `$env` and `$in`. -::: tip Note -`$env` is the special of the three because one can mutate it with -```nushell -$env.FOO = "i'm foo" -``` -but it is impossible to do `let env = 123` -::: - -However, up until now and the work of [@KAAtheWiseGit](https://github.com/KAAtheWiseGit) -in [#11169](https://github.com/nushell/nushell/pull/11169) and -[#11228](https://github.com/nushell/nushell/pull/11228), it was possible to redefined these variables -in command definition: the code would parse and run, but you would get the internal values instead of -the ones passed to the command, which is a nasty silent bug! -From now on, the following will give an error -```nushell -def foo [nu] { print $nu } -``` -```nushell -def bar [env] { print $env } -``` -```nushell -def baz [in] { print $in } -``` - -Also, because `$nu` and `$env` don't have spans by construction, i.e. they are not defined in any -script where a span would make sense but rather internally when Nushell starts, accessing their -`metadata` does not make sense. This release makes the error more helpful: -```nushell -metadata $env -``` -``` -Error: × Built-in variables `$env` and `$nu` have no metadata - ╭─[entry #1:1:1] - 1 │ metadata $env - · ──┬─ - · ╰── no metadata available - ╰──── -``` - -## A small update on the LSP [[toc](#table-of-content)] -[@schrieveslaach](https://github.com/schrieveslaach) has been working again on the built-in LSP of -Nushell. -With [#10941](https://github.com/nushell/nushell/pull/10941), completions should get better with -this release :partying: - -## Our set of commands is evolving [[toc](#table-of-content)] -As usual, new release rhymes with changes to commands! - -### New commands [[toc](#table-of-content)] -- `is-terminal` by [@drbrain](https://github.com/drbrain) in [#10970](https://github.com/nushell/nushell/pull/10970) -- `std null-device` by [@WindSoilder](https://github.com/WindSoilder) in [#11070](https://github.com/nushell/nushell/pull/11070) -- `mktemp` by [@tskinn](https://github.com/tskinn) in [#11005](https://github.com/nushell/nushell/pull/11005) -- `stor` by [@fdncred](https://github.com/fdncred) in [#11170](https://github.com/nushell/nushell/pull/11170) => see the [section below](#a-local-in-memory-database-with-stor) - -#### A local in-memory database with `stor` - -With this release we've implemented a new sqlite family of commands called `stor`. `stor` is meant to be short for "storing data in an in-memory sqlite database". That's right, this family of commands supports an _in-memory_ database. This in-memory database will be accessible as long as they share the same executable instance. A new instance is created with each new nushell instance and the in-memory database cannot be shared between instances. We're exited to see what new things you'll invent with this technology, although we still consider it in the experimental phase. Please feel free to submit PRs to make the usage of it better and more robust. There are examples of how to use each command [in the PR](https://github.com/nushell/nushell/pull/11170). - -Here the summary you get when you execute the `stor` command. -```nushell -Usage: - > stor - -Subcommands: - stor create - Create a table in the in-memory sqlite database - stor delete - Delete a table or specified rows in the in-memory sqlite database - stor export - Export the in-memory sqlite database to a sqlite database file - stor import - Import a sqlite database file into the in-memory sqlite database - stor insert - Insert information into a specified table in the in-memory sqlite database - stor open - Opens the in-memory sqlite database - stor reset - Reset the in-memory database by dropping all tables - stor update - Update information in a specified table in the in-memory sqlite database - -Flags: - -h, --help - Display the help message for this command - -Input/output types: - ╭─#─┬──input──┬─output─╮ - │ 0 │ nothing │ string │ - ╰───┴─────────┴────────╯ -``` - -### Changes to existing commands [[toc](#table-of-content)] -- thanks to [@KAAtheWiseGit](https://github.com/KAAtheWiseGit) in [#11195](https://github.com/nushell/nushell/pull/11195), `input list` will accept more input/output types -- the `list -> string` I/O pair has been added to the `last` command by [@amtoine](https://github.com/amtoine) in [#11137](https://github.com/nushell/nushell/pull/11137) -- with the work of [@IanManske](https://github.com/IanManske) in [#11258](https://github.com/nushell/nushell/pull/11258), `insert`, `update` and `upsert` should now work more consistently with `list`s, e.g. -```nushell -[0, 2] | update 0 {|i| $i + 1 } # will give [1, 2] -[0, 1, 2] | insert 5 5 # will give "index too large" error -``` - -### Deprecated commands [[toc](#table-of-content)] -- `std clip` in [#11097](https://github.com/nushell/nushell/pull/11097): this command was handy but did not fit the [philosophy of the standard library](https://github.com/nushell/nushell/tree/main/crates/nu-std#--welcome-to-the-standard-library-of-nushell--) -- `std testing` in [#11151](https://github.com/nushell/nushell/pull/11151): even though in a VERY EARLY stage of its development, we would like to focus our efforts on the [Nupm](https://github.com/nushell/nupm) project and especially its simple `nupm test` command - -### Removed commands [[toc](#table-of-content)] -as part of the [deprecation plan of last release](https://www.nushell.sh/blog/2023-11-14-nushell_0_87_0.html#deprecated-commands-toc), -the following commands and options have been removed by [@amtoine](https://github.com/amtoine): -- `extern-wrapped` and `export extern-wrapped` in favor of `def --wrapped` in [#11000](https://github.com/nushell/nushell/pull/11000) -- `--not` from `glob` in favor of `--exclude` in [#10839](https://github.com/nushell/nushell/pull/10839) -- `size` in favor of `str stats` in [#10784](https://github.com/nushell/nushell/pull/10784) -- `unfold` in favor of `generate` in [#10773](https://github.com/nushell/nushell/pull/10773) -- `def-env` and `export def-env` in favor of `def --env` in [#10999](https://github.com/nushell/nushell/pull/10999) - -# Breaking changes [[toc](#table-of-content)] -- [#8984](https://github.com/nushell/nushell/pull/8984) Respect non-zero exit code in subexpressions and blocks - -Starting with this release, if a subexpression (eg `(echo foo.txt)`) or block (eg `if true { echo foo.txt }` evaluated to a non-zero exit code, it will no longer be lost and instead will be the exit code of that expression. This allows them to act more naturally when an external command fails. - -- [#11144](https://github.com/nushell/nushell/pull/11144) No longer allow `{a: 1, a: 2}` - -We now error if you repeat the same field name when creating a record, for example `{a: 1, a: 2}`. - -- [#10999](https://github.com/nushell/nushell/pull/10999) remove `def-env` and `export def-env` -- [#11000](https://github.com/nushell/nushell/pull/11000) remove `extern-wrapped` and `export extern-wrapped` - -We've removed the deprecated commands `def-env` and `export def-env`. Instead, use `def --env`. Likewise, we've done the same for `extern-wrapped` and `export extern-wrapped`. Instead, use `def --wrapped`. - -- [#10773](https://github.com/nushell/nushell/pull/10773) remove the `unfold` command - -We've renamed the previous `unfold` command. Instead, use the `generate` command. - -- [#10784](https://github.com/nushell/nushell/pull/10784) remove `size` command in favor of `str stats` - -We've also removed the `size` command, whch had an ambiguous name. Now, use `str stats` to get information about string content. - -- [#10839](https://github.com/nushell/nushell/pull/10839) remove `--not` from `glob` - -This releae replace the confusing `--not` flag of `glob` to instead be `glob --exclude`. - -- [#11058](https://github.com/nushell/nushell/pull/11058) nu-table/ Add `-t/theme` argument && Replace `-n/start-number` with `-i/index` - -To make how to update the table numbering more clear, we've replaced `table -n` with `table -i`/`table --index`. - -# Full changelog [[toc](#table-of-content)] -## Nushell -- [amtoine](https://github.com/amtoine) created - - [remove the `unfold` command](https://github.com/nushell/nushell/pull/10773) - - [remove `size` command in favor of `str stats`](https://github.com/nushell/nushell/pull/10784) - - [remove `--not` from `glob`](https://github.com/nushell/nushell/pull/10839) - - [remove `def-env` and `export def-env`](https://github.com/nushell/nushell/pull/10999) - - [remove `extern-wrapped` and `export extern-wrapped`](https://github.com/nushell/nushell/pull/11000) - - [deprecate `std clip`](https://github.com/nushell/nushell/pull/11097) - - [add `list -> string` to `last`](https://github.com/nushell/nushell/pull/11137) - - [fix the link to the `nu_scripts` in `std clip` deprecation](https://github.com/nushell/nushell/pull/11150) - - [deprecate `std testing`](https://github.com/nushell/nushell/pull/11151) - - [fix `nu-std` README](https://github.com/nushell/nushell/pull/11244) - - [add `nothing -> table` to `format date`](https://github.com/nushell/nushell/pull/11290) -- [app/dependabot](https://github.com/app/dependabot) created - - [Bump winreg from 0.51.0 to 0.52.0](https://github.com/nushell/nushell/pull/11102) - - [Bump uuid from 1.5.0 to 1.6.0](https://github.com/nushell/nushell/pull/11104) - - [Bump ureq from 2.8.0 to 2.9.1](https://github.com/nushell/nushell/pull/11163) - - [Bump openssl from 0.10.59 to 0.10.60](https://github.com/nushell/nushell/pull/11176) - - [Bump actions-rust-lang/setup-rust-toolchain from 1.5.0 to 1.6.0](https://github.com/nushell/nushell/pull/11223) -- [AucaCoyan](https://github.com/AucaCoyan) created - - [:bug: Fixes markdown formatting on LSP hover](https://github.com/nushell/nushell/pull/11253) -- [ayax79](https://github.com/ayax79) created - - [Upgrading to polars 0.35](https://github.com/nushell/nushell/pull/11241) -- [cosineblast](https://github.com/cosineblast) created - - [Remove file I/O from tests that don't need it](https://github.com/nushell/nushell/pull/11182) -- [danielsomerfield](https://github.com/danielsomerfield) created - - [Fix toolkit to run workspace on 'check pr' (issue #10906)](https://github.com/nushell/nushell/pull/11112) -- [dead10ck](https://github.com/dead10ck) created - - [Testing support tweaks: exit status in `Outcome`](https://github.com/nushell/nushell/pull/10692) - - [into binary -c: return 0 as single byte](https://github.com/nushell/nushell/pull/11068) -- [drbrain](https://github.com/drbrain) created - - [Add is-terminal to determine if stdin/out/err are a terminal](https://github.com/nushell/nushell/pull/10970) - - [Add Argument::span() and Call::arguments_span()](https://github.com/nushell/nushell/pull/10983) - - [Convert ShellError::NetworkFailure to named fields](https://github.com/nushell/nushell/pull/11093) - - [Convert ShellError::CommandNotFound to named fields](https://github.com/nushell/nushell/pull/11094) - - [Convert ShellError::AliasNotFound to named fields](https://github.com/nushell/nushell/pull/11118) - - [Remove ShellError::FlagNotFound](https://github.com/nushell/nushell/pull/11119) - - [Convert FileNotFound to named fields](https://github.com/nushell/nushell/pull/11120) - - [Convert FileNotFoundCustom to named fields](https://github.com/nushell/nushell/pull/11123) - - [Convert PluginFailedToLoad to named fields](https://github.com/nushell/nushell/pull/11124) - - [Convert PluginFailedToEncode to named fields](https://github.com/nushell/nushell/pull/11125) - - [Convert PluginFailedToDecode to named fields](https://github.com/nushell/nushell/pull/11126) - - [Convert more ShellError variants to named fields](https://github.com/nushell/nushell/pull/11173) - - [Convert more ShellError variants to named fields](https://github.com/nushell/nushell/pull/11222) - - [Convert `Shellerror::GenericError` to named fields](https://github.com/nushell/nushell/pull/11230) - - [Convert remainder of ShellError variants to named fields](https://github.com/nushell/nushell/pull/11276) - - [Ensure that command usage starts uppercase and ends period](https://github.com/nushell/nushell/pull/11278) -- [dtolnay](https://github.com/dtolnay) created - - [Fix `Option<&str> == Option<&String>` build error when using rust_decimal/rkyv feature](https://github.com/nushell/nushell/pull/11205) -- [fdncred](https://github.com/fdncred) created - - [allow parsing of human readable datetimes](https://github.com/nushell/nushell/pull/11051) - - [tweak `table` example/parameter text](https://github.com/nushell/nushell/pull/11071) - - [add "default" table theme](https://github.com/nushell/nushell/pull/11072) - - [correct table example syntax](https://github.com/nushell/nushell/pull/11074) - - [optimize/clean up a few of the `table` changes](https://github.com/nushell/nushell/pull/11076) - - [bump rust-toolchain to 1.72.1](https://github.com/nushell/nushell/pull/11079) - - [add shape `ExternalResolved` to show found externals via syntax highlighting in the repl](https://github.com/nushell/nushell/pull/11135) - - [Add `stor` family of commands](https://github.com/nushell/nushell/pull/11170) - - [add some tests for `stor create`](https://github.com/nushell/nushell/pull/11194) - - [Add nu lib dirs default](https://github.com/nushell/nushell/pull/11248) -- [hustcer](https://github.com/hustcer) created - - [Upgrade Nu and script for release workflow](https://github.com/nushell/nushell/pull/11121) - - [Exit the release job if creating binary package failed](https://github.com/nushell/nushell/pull/11145) - - [Fix release and nightly build workflow](https://github.com/nushell/nushell/pull/11146) -- [IanManske](https://github.com/IanManske) created - - [Fix `rm` path handling](https://github.com/nushell/nushell/pull/11064) - - [Refactor `Value` cell path functions to fix bugs](https://github.com/nushell/nushell/pull/11066) - - [Build `nu-protocol` docs with all features enabled](https://github.com/nushell/nushell/pull/11180) - - [Fix `get -i` ignoring errors for only the first cellpath](https://github.com/nushell/nushell/pull/11213) - - [Remove unnecessary boxing of `Stack::recursion_count`](https://github.com/nushell/nushell/pull/11238) - - [Fix replacement closures for `update`, `insert`, and `upsert`](https://github.com/nushell/nushell/pull/11258) -- [KAAtheWiseGit](https://github.com/KAAtheWiseGit) created - - [Match `++=` capabilities with `++`](https://github.com/nushell/nushell/pull/11130) - - [Forbid reserved variable names for function arguments](https://github.com/nushell/nushell/pull/11169) - - [Allow more types for `input list`](https://github.com/nushell/nushell/pull/11195) - - [Add special error for calling `metadata` on $env and $nu](https://github.com/nushell/nushell/pull/11228) - - [Do not create help for wrapped command](https://github.com/nushell/nushell/pull/11235) -- [kubouch](https://github.com/kubouch) created - - [Send only absolute paths to uu_cp](https://github.com/nushell/nushell/pull/11080) -- [MarikaChlebowska](https://github.com/MarikaChlebowska) created - - [Add more descriptive error message when passing list to from_csv](https://github.com/nushell/nushell/pull/10962) - - [Add metadata to some filters](https://github.com/nushell/nushell/pull/11160) -- [nibon7](https://github.com/nibon7) created - - [Apply nightly clippy fixes](https://github.com/nushell/nushell/pull/11083) - - [Add boundary check for str index-of](https://github.com/nushell/nushell/pull/11190) - - [Add OutOfBounds error](https://github.com/nushell/nushell/pull/11201) - - [Fix span of invalid range](https://github.com/nushell/nushell/pull/11207) - - [Fix capacity overflow caused by large range of ports](https://github.com/nushell/nushell/pull/11210) - - [Add checks for ports](https://github.com/nushell/nushell/pull/11214) - - [Explicitly indicate duplicate flags](https://github.com/nushell/nushell/pull/11226) - - [Fix overlay_use_main_not_exported hanging when an external spam command exists](https://github.com/nushell/nushell/pull/11261) - - [Simplify `clear` implementation](https://github.com/nushell/nushell/pull/11273) -- [NotLebedev](https://github.com/NotLebedev) created - - [Cp target expansion](https://github.com/nushell/nushell/pull/11152) -- [p00f](https://github.com/p00f) created - - [expose argv[0] as `$env.PROCESS_PATH`](https://github.com/nushell/nushell/pull/11203) -- [poliorcetics](https://github.com/poliorcetics) created - - [feat: Add default docs for aliases, generated from the command they point to](https://github.com/nushell/nushell/pull/10825) -- [rfaulhaber](https://github.com/rfaulhaber) created - - [Bump `sysinfo` to 0.29.11](https://github.com/nushell/nushell/pull/11166) -- [schrieveslaach](https://github.com/schrieveslaach) created - - [Implement LSP Text Document Synchronization](https://github.com/nushell/nushell/pull/10941) - - [Upgrade lsp-server Dependency](https://github.com/nushell/nushell/pull/11252) -- [sholderbach](https://github.com/sholderbach) created - - [Bump version for `0.87.0` release](https://github.com/nushell/nushell/pull/11031) - - [Move to clearer reedline keyboard enhancement API](https://github.com/nushell/nushell/pull/11045) - - [Curate developer documentation in tree](https://github.com/nushell/nushell/pull/11052) - - [Pin reedline to 0.26 release](https://github.com/nushell/nushell/pull/11053) - - [Bump version to `0.87.1`](https://github.com/nushell/nushell/pull/11056) - - [Use record API in `describe --detailed`](https://github.com/nushell/nushell/pull/11075) - - [Bump version to `0.87.2`](https://github.com/nushell/nushell/pull/11114) - - [Bump `procfs` to 0.16.0](https://github.com/nushell/nushell/pull/11115) - - [Move more commands to opaque `Record` type](https://github.com/nushell/nushell/pull/11122) - - [Revert "Adding support for Polars structs"](https://github.com/nushell/nushell/pull/11171) -- [sigoden](https://github.com/sigoden) created - - [Fix spans passed to external_completer](https://github.com/nushell/nushell/pull/11008) -- [sophiajt](https://github.com/sophiajt) created - - [Respect non-zero exit code in subexpressions and blocks](https://github.com/nushell/nushell/pull/8984) - - [Fix the output type for 'view files'](https://github.com/nushell/nushell/pull/11077) -- [tskinn](https://github.com/tskinn) created - - [Add `mktemp` command](https://github.com/nushell/nushell/pull/11005) -- [WindSoilder](https://github.com/WindSoilder) created - - [Support `o>>`, `e>>`, `o+e>>` to append output to an external file](https://github.com/nushell/nushell/pull/10764) - - [Redirect: support redirect stderr with piping stdout to next commands.](https://github.com/nushell/nushell/pull/10851) - - [fix custom command's default value](https://github.com/nushell/nushell/pull/11043) - - [enable to pass switch values dynamically](https://github.com/nushell/nushell/pull/11057) - - [std: add cross platform null-device name](https://github.com/nushell/nushell/pull/11070) - - [add echo_env_mixed testbin to reduce windows only tests](https://github.com/nushell/nushell/pull/11172) - - [Error on `use path item1 item2`, if item1 is not a module](https://github.com/nushell/nushell/pull/11183) - - [When using redirection, if a command generates non-zero exit code, the script should stop running](https://github.com/nushell/nushell/pull/11191) -- [ysthakur](https://github.com/ysthakur) created - - [Spread operator for list literals](https://github.com/nushell/nushell/pull/11006) - - [Spread operator in record literals](https://github.com/nushell/nushell/pull/11144) - - [Reduce code duplication in eval.rs and eval_const.rs](https://github.com/nushell/nushell/pull/11192) - - [Fix highlighting of spread subexpressions in records](https://github.com/nushell/nushell/pull/11202) -- [zhiburt](https://github.com/zhiburt) created - - [Fix #11047](https://github.com/nushell/nushell/pull/11054) - - [nu-table/ Add `-t/theme` argument && Replace `-n/start-number` with `-i/index`](https://github.com/nushell/nushell/pull/11058) - -## Extension -- [glcraft](https://github.com/glcraft) created - - [Syntax highlight: add "export" to "module"](https://github.com/nushell/vscode-nushell-lang/pull/166) - - [Improve type parsing in function def](https://github.com/nushell/vscode-nushell-lang/pull/167) - - [Textmate improvements](https://github.com/nushell/vscode-nushell-lang/pull/168) - - [Textmate: improvement on record entries and closure](https://github.com/nushell/vscode-nushell-lang/pull/169) - -## Documentation -- [132ikl](https://github.com/132ikl) created - - [Add a snippet to suggest using the ? operator for environmental variables](https://github.com/nushell/nushell.github.io/pull/1142) -- [amtoine](https://github.com/amtoine) created - - [Release notes for `0.87.0`](https://github.com/nushell/nushell.github.io/pull/1114) -- [app/dependabot](https://github.com/app/dependabot) created - - [Bump vite from 4.4.9 to 4.4.12](https://github.com/nushell/nushell.github.io/pull/1165) -- [app/github-actions](https://github.com/app/github-actions) created - - [Compressed Images](https://github.com/nushell/nushell.github.io/pull/1147) -- [arnau](https://github.com/arnau) created - - [Add a cookbook comparing jq and nushell](https://github.com/nushell/nushell.github.io/pull/1150) - - [Unifies all cookbook codeblocks to use the same style.](https://github.com/nushell/nushell.github.io/pull/1151) - - [Rename def-env to def --env](https://github.com/nushell/nushell.github.io/pull/1155) -- [CAESIUS-TIM](https://github.com/CAESIUS-TIM) created - - [:memo: Replace `decimal` with `float`](https://github.com/nushell/nushell.github.io/pull/1161) - - [[zh-CN] Update README, and Getting Started (入门篇)](https://github.com/nushell/nushell.github.io/pull/1168) -- [FMotalleb](https://github.com/FMotalleb) created - - [Update coming_from_bash.md](https://github.com/nushell/nushell.github.io/pull/1158) -- [Hofer-Julian](https://github.com/Hofer-Julian) created - - [Fix jq comparison](https://github.com/nushell/nushell.github.io/pull/1162) -- [hustcer](https://github.com/hustcer) created - - [Refresh command docs for Nu v0.87](https://github.com/nushell/nushell.github.io/pull/1144) -- [KAAtheWiseGit](https://github.com/KAAtheWiseGit) created - - [Fix append to mutable variable operator](https://github.com/nushell/nushell.github.io/pull/1164) -- [Ktoks](https://github.com/Ktoks) created - - [Update creating_errors.md](https://github.com/nushell/nushell.github.io/pull/1154) -- [MarikaChlebowska](https://github.com/MarikaChlebowska) created - - [Replace usage of removed `date format` with `format date` in examples](https://github.com/nushell/nushell.github.io/pull/1157) -- [ppenguin](https://github.com/ppenguin) created - - [Add `parse` examples to *Parsing*](https://github.com/nushell/nushell.github.io/pull/1152) -- [sholderbach](https://github.com/sholderbach) created - - [Clean up contributor book](https://github.com/nushell/nushell.github.io/pull/1153) -- [sophiajt](https://github.com/sophiajt) created - - [Add 2023 survey results](https://github.com/nushell/nushell.github.io/pull/1143) -- [stfacc](https://github.com/stfacc) created - - [Improve workaround for carapace ERR output](https://github.com/nushell/nushell.github.io/pull/1159) -- [ysthakur](https://github.com/ysthakur) created - - [Add section on spread operator](https://github.com/nushell/nushell.github.io/pull/1160) - -## Nu_Scripts -- [Abdillah](https://github.com/Abdillah) created - - [completions/git: fix support for path relative to current directory](https://github.com/nushell/nu_scripts/pull/666) -- [amtoine](https://github.com/amtoine) created - - [add a "bulk rename" command to the stdlib candidates](https://github.com/nushell/nu_scripts/pull/643) - - [add missing tasks to the release note PR](https://github.com/nushell/nu_scripts/pull/665) - - [add `clip` from standard library](https://github.com/nushell/nu_scripts/pull/674) -- [AucaCoyan](https://github.com/AucaCoyan) created - - [:sparkles: Add `rustup` completions](https://github.com/nushell/nu_scripts/pull/689) - - [Add rustup completions](https://github.com/nushell/nu_scripts/pull/690) - - [:sparkles: Add `pnpm` completions](https://github.com/nushell/nu_scripts/pull/692) -- [drbrain](https://github.com/drbrain) created - - [Improve git branch cleanup script](https://github.com/nushell/nu_scripts/pull/685) -- [Euphrasiologist](https://github.com/Euphrasiologist) created - - [Create basic-git.nu](https://github.com/nushell/nu_scripts/pull/687) - - [Adding the `A` case](https://github.com/nushell/nu_scripts/pull/688) -- [fj0r](https://github.com/fj0r) created - - [cwdhist: can place the path anywhere in the buffer](https://github.com/nushell/nu_scripts/pull/669) - - [rename `cmd parse` to `argx` to improve importing](https://github.com/nushell/nu_scripts/pull/671) - - [nu-complete kube deploys and pods](https://github.com/nushell/nu_scripts/pull/682) - - [generate completions from tree-shaped data](https://github.com/nushell/nu_scripts/pull/683) - - [container-create -w: mount $env.PWD as workdir](https://github.com/nushell/nu_scripts/pull/686) -- [fnuttens](https://github.com/fnuttens) created - - [Add bat aliases](https://github.com/nushell/nu_scripts/pull/678) -- [glcraft](https://github.com/glcraft) created - - [Add `record` module](https://github.com/nushell/nu_scripts/pull/679) -- [kjelly](https://github.com/kjelly) created - - [get deploy complete for ka/kl in kubernetes module](https://github.com/nushell/nu_scripts/pull/680) -- [RGBCube](https://github.com/RGBCube) created - - [Fix typo in bat aliases](https://github.com/nushell/nu_scripts/pull/684) -- [sholderbach](https://github.com/sholderbach) created - - [Change uses of `size` to `str stats`](https://github.com/nushell/nu_scripts/pull/647) - - [Change `nu-deps` script to not care about waves](https://github.com/nushell/nu_scripts/pull/667) - - [Update `nu_release.nu` for 0.87 release](https://github.com/nushell/nu_scripts/pull/668) -- [WindSoilder](https://github.com/WindSoilder) created - - [remove null-stream](https://github.com/nushell/nu_scripts/pull/670) - - [Using def --env instead of def-env](https://github.com/nushell/nu_scripts/pull/673) - -## Reedline -- [ClementNerma](https://github.com/ClementNerma) created - - [Allow to construct ReedlineError values from the outside](https://github.com/nushell/reedline/pull/676) - - [Allow to build HistoryItemId values from the outside](https://github.com/nushell/reedline/pull/677) - - [ Make history-related items (de-)serializable](https://github.com/nushell/reedline/pull/678) -- [crides](https://github.com/crides) created - - [vi mode: map `cw`/`cW` to `ce`/`cE` by default](https://github.com/nushell/reedline/pull/668) -- [Hofer-Julian](https://github.com/Hofer-Julian) created - - [Also run clippy on examples](https://github.com/nushell/reedline/pull/666) -- [sholderbach](https://github.com/sholderbach) created - - [Properly handle optional event modes](https://github.com/nushell/reedline/pull/659) - - [Bump version for `0.26.0` release](https://github.com/nushell/reedline/pull/664) - - [Build docs.rs docs with all features](https://github.com/nushell/reedline/pull/672) diff --git a/blog/2024-01-09-nushell_0_89_0.md b/blog/2024-01-09-nushell_0_89_0.md deleted file mode 100644 index 21bfd2f680d..00000000000 --- a/blog/2024-01-09-nushell_0_89_0.md +++ /dev/null @@ -1,444 +0,0 @@ ---- -title: Nushell 0.89.0 -author: The Nu Authors -author_site: https://twitter.com/nu_shell -author_image: https://www.nushell.sh/blog/images/nu_logo.png -excerpt: Today, we're releasing version 0.89.0 of Nu. This release adds spreading of argument lists to command calls, better editor integration, and many bugfixes. ---- - - -# Nushell 0.89.0 - -Nushell, or Nu for short, is a new shell that takes a modern, structured approach to your command line. It works seamlessly with the data from your filesystem, operating system, and a growing number of file formats to make it easy to build powerful command line pipelines. - - -Today, we're releasing version 0.89.0 of Nu. This release adds spreading of argument lists to command calls, better editor integration, and many bugfixes. - -# Where to get it - -Nu 0.89.0 is available as [pre-built binaries](https://github.com/nushell/nushell/releases/tag/0.89.0) or from [crates.io](https://crates.io/crates/nu). If you have Rust installed you can install it using `cargo install nu`. - -::: tip Note -The optional dataframe functionality is available by `cargo install nu --features=dataframe`. -::: - -As part of this release, we also publish a set of optional plugins you can install and use with Nu. To install, use `cargo install nu_plugin_`. - -# Table of content -- [Nushell 0.89.0](#nushell-0890) -- [Where to get it](#where-to-get-it) -- [Table of content](#table-of-content) -- [Themes of this release / New features \[toc\]](#themes-of-this-release--new-features-toc) - - [Removal of directory module auto-exports](#update-19012024-breaking-change-removal-of-directory-module-auto-exports-toc) - - [Spread operator for commands](#spread-operator-for-commands) - - [Editor Improvements](#editor-improvements) - - [Deprecation of `--flag: bool`](#deprecation-of---flag-bool) - - [Our set of commands is evolving \[toc\]](#our-set-of-commands-is-evolving-toc) - - [New commands \[toc\]](#new-commands-toc) - - [`ulimit` for Unix-based systems](#ulimit-for-unix-based-systems) -- [Breaking changes \[toc\]](#breaking-changes-toc) -- [Full changelog \[toc\]](#full-changelog-toc) - - [Nushell](#nushell) - - [Documentation](#documentation) - - [Nu\_Scripts](#nu_scripts) - - [Reedline](#reedline) - -- [*Breaking changes*](#breaking-changes-toc) -- [*Full changelog*](#full-changelog-toc) - -# Themes of this release / New features [[toc](#table-of-content)] - - - -## (Update 19.01.2024, Breaking change!) Removal of directory module auto-exports [[toc](#table-of-content)] - -_Release note gremlin hid this note from us and we forgot to add it. We're sorry!_ - -[@amtoine](https://github.com/amtoine) in [#11157](https://github.com/nushell/nushell/pull/11157) removed the directory module autoexport of all .nu files inside the directory. This removes the ability to "dump .nu files into a directory" and have them automatically exported. Previously, if you had the following file structure: - -``` -spam -├── bar.nu -├── baz.nu -├── foo.nu -└── mod.nu -``` -all you had to do was to call `use spam` and the `.nu` files would be added as submodules of `spam`. Now, to achieve the same effect, you would need to put -```nushell -export module foo.nu -export module bar.nu -export module baz.nu -``` -to the `mod.nu`. - -This change adds one manual step you need to perform to export submodules from modules, but it gives you more control and confidence. In the previous system, .nu files would be auto-exported _even if you didn't want to_! For example, to prevent `baz.nu` from being auto-exported, you would need to put it inside a new directory that doesn't contain `mod.nu` (and thus is not considered a Nushell module), like this: -``` -spam -├── bar.nu -├── foo.nu -└── utils - └── baz.nu -``` -We felt like this workaround was quite cumbersome, and the implicit behavior wasn't in the disciplined spirit of Nushell. Rather than having this auto-exporting as an _implicit_ feature of `use`, we're currently exploring ways to allow doing it _explicitly_, for example with a separate command. - -## Spread operator for commands - -In [#11289](https://github.com/nushell/nushell/pull/11289), [@ysthakur](https://github.com/ysthakur/) -implemented a spread operator for calling commands (previously, it could only be used in list and record literals). - -Now, if you have a command with a rest parameter: - -```nushell -def foo [ ...args ] { $args | to nuon } -``` - -You can spread arguments to it like this: - -```nushell -> let x = [foo bar baz] -> foo ...[1 2] ...$x -[1, 2, foo, bar, baz] -``` - -See [the docs](/book/operators.html#spread-operator) for more information. - -## Editor Improvements - -Thanks to @AucaCoyan's [#11284](https://github.com/nushell/nushell/pull/11284) and [#11320](https://github.com/nushell/nushell/pull/11320), Nushell's VSCode extension and builtin LSP server now show the same command's message on hover as abtained with `help` in Nushell. - -## Deprecation of `--flag: bool` - -In the last release, we allowed passing flags dynamically: -```nushell -def spam [--foo] { - print $foo -} - -let value = false -spam --foo=$value -# prints false -``` -However, it is easy to confuse with `--foo: bool`. To disambiguate, we are deprecating the setting optional parameters with boolean type (`--flag: bool`). Doing so will trigger a warning: -```nushell -def spam [--foo: bool] { $foo } -Error: × Deprecated: --flag: bool - ╭─[entry #3:1:1] - 1 │ def spam [--foo: bool] { $foo } - · ──┬─ - · ╰── `--flag: bool` is deprecated and will be removed in 0.90. Please use `--flag` instead, more info: https://www.nushell.sh/book/custom_commands.html - ╰──── -``` - -## Our set of commands is evolving [[toc](#table-of-content)] -As usual, new release rhyms with changes to commands! - -### New commands [[toc](#table-of-content)] - -#### `ulimit` for Unix-based systems - -The new `ulimit` command added by [@nibon7](https://github.com/nushell/nushell/pull/11324) can now be used on Unix-based systems for setting or checking the resource limits, such as the stack size or virtual memory size, for the current user. - -To list the currrent limits: -```nushell -ulimit -a -``` - -Setting the limits is done via flags available in `help ulimit`. - - - -# Breaking changes [[toc](#table-of-content)] - - -- [#11131](https://github.com/nushell/nushell/pull/11131) remove `std clip` -- [#11414](https://github.com/nushell/nushell/pull/11414) Lock out new direct construction of `Record` -- [#11367](https://github.com/nushell/nushell/pull/11367) Remove `Expr::MatchPattern` -- [#11355](https://github.com/nushell/nushell/pull/11355) Rename extra's `format` to `format pattern` -- [#11356](https://github.com/nushell/nushell/pull/11356) Remove `Value::MatchPattern` -- [#11313](https://github.com/nushell/nushell/pull/11313) Bubble up errors passed to `complete` -- [#11157](https://github.com/nushell/nushell/pull/11157) disable directory submodule auto export - - -# Full changelog [[toc](#table-of-content)] - - -## Nushell -- [amtoine](https://github.com/amtoine) created - - [remove `std clip`](https://github.com/nushell/nushell/pull/11131) - - [improve completions of `use` and `overlay use`](https://github.com/nushell/nushell/pull/11330) - - [disable directory submodule auto export](https://github.com/nushell/nushell/pull/11157) -- [abusch](https://github.com/abusch) created - - [fix: closure captures can also be constants](https://github.com/nushell/nushell/pull/11493) -- [WindSoilder](https://github.com/WindSoilder) created - - [update reedline version to latest main](https://github.com/nushell/nushell/pull/11490) - - [Deprecate `--flag: bool` in custom command](https://github.com/nushell/nushell/pull/11365) - - [enable flag value type checking](https://github.com/nushell/nushell/pull/11311) - - [Fix piping output logic](https://github.com/nushell/nushell/pull/11317) -- [NotLebedev](https://github.com/NotLebedev) created - - [Xml errors fix](https://github.com/nushell/nushell/pull/11487) -- [nibon7](https://github.com/nibon7) created - - [Bump terminal_size to 0.3](https://github.com/nushell/nushell/pull/11486) - - [Fix cross building for target x86_64-pc-windows-gnu on linux](https://github.com/nushell/nushell/pull/11485) - - [Bump sysinfo from 0.29 to 0.30](https://github.com/nushell/nushell/pull/11484) - - [Replace `winapi` with `windows`](https://github.com/nushell/nushell/pull/11481) - - [Don't panic when `http_client` fails](https://github.com/nushell/nushell/pull/11422) - - [Don't create a thread if stderr_stream is None](https://github.com/nushell/nushell/pull/11421) - - [Fix an infinite loop if the input stream and output stream are the same](https://github.com/nushell/nushell/pull/11384) - - [Bump windows from 0.48.0 to 0.52.0 ](https://github.com/nushell/nushell/pull/11325) - - [Fix build for BSDs](https://github.com/nushell/nushell/pull/11372) - - [Allow `filesize` type as a valid limit value](https://github.com/nushell/nushell/pull/11349) - - [Allow `int` type as a valid limit value](https://github.com/nushell/nushell/pull/11346) - - [Add ulimit command](https://github.com/nushell/nushell/pull/11324) -- [yukitomoda](https://github.com/yukitomoda) created - - [Refactor tests (using cococo instead of ^echo)](https://github.com/nushell/nushell/pull/11479) - - [Fix the test which fails on windows](https://github.com/nushell/nushell/pull/11478) - - [Fix rm for symlinks pointing to directory on windows (issue #11461)](https://github.com/nushell/nushell/pull/11463) -- [hustcer](https://github.com/hustcer) created - - [Try to fix riscv64 building by using unbuntu-latest](https://github.com/nushell/nushell/pull/11476) - - [Downgrade openssl-src to fix riscv64 build target, close #11345](https://github.com/nushell/nushell/pull/11353) -- [rsteube](https://github.com/rsteube) created - - [Revert "Return external file completions if not empty (#10898)"](https://github.com/nushell/nushell/pull/11446) -- [fdncred](https://github.com/fdncred) created - - [bump rust toolchain to 1.73.0](https://github.com/nushell/nushell/pull/11445) - - [Revert "Bump reedline development version"](https://github.com/nushell/nushell/pull/11425) - - [add special emoji handling for debug --raw](https://github.com/nushell/nushell/pull/11368) - - [Revert "Only run $env.PROMPT_COMMAND once per prompt"](https://github.com/nushell/nushell/pull/11340) - - [update reedline to latest + include PR 675 for testing](https://github.com/nushell/nushell/pull/11339) -- [ysthakur](https://github.com/ysthakur) created - - [Allow spreading arguments to commands](https://github.com/nushell/nushell/pull/11289) - - [More specific errors for missing values in records](https://github.com/nushell/nushell/pull/11423) - - [Only run $env.PROMPT_COMMAND once per prompt (copy of #10986)](https://github.com/nushell/nushell/pull/11366) - - [Don't redraw prompt when transient prompt disabled](https://github.com/nushell/nushell/pull/10788) -- [cyradotpink](https://github.com/cyradotpink) created - - [Allow `http` commands' automatic redirect-following to be disabled](https://github.com/nushell/nushell/pull/11329) -- [SebastianIonel](https://github.com/SebastianIonel) created - - [Fix the bug for "bytes remove --end" .](https://github.com/nushell/nushell/pull/11428) -- [IanManske](https://github.com/IanManske) created - - [Remove unnecessary `replace_in_variable`](https://github.com/nushell/nushell/pull/11424) - - [Simplify `SIGQUIT` handling](https://github.com/nushell/nushell/pull/11381) - - [Make `Call::get_flag_expr` return `&Expression` instead of owned value ](https://github.com/nushell/nushell/pull/11388) - - [Remove `Expr::MatchPattern`](https://github.com/nushell/nushell/pull/11367) - - [Refactor `group-by` with closure grouper](https://github.com/nushell/nushell/pull/11370) - - [Remove `Value::MatchPattern`](https://github.com/nushell/nushell/pull/11356) - - [Satisfy clippy lint in benchmark](https://github.com/nushell/nushell/pull/11350) -- [sholderbach](https://github.com/sholderbach) created - - [Simplify the feature gates for `stor` commands](https://github.com/nushell/nushell/pull/11416) - - [Make polars deps optional for `cargo test --all`](https://github.com/nushell/nushell/pull/11415) - - [Lock out new direct construction of `Record`](https://github.com/nushell/nushell/pull/11414) - - [Check for clean repo after tests](https://github.com/nushell/nushell/pull/11409) - - [Bump reedline development version](https://github.com/nushell/nushell/pull/11406) - - [Fix sandboxing of redirection tests](https://github.com/nushell/nushell/pull/11407) - - [Bump `fancy-regex` to single `0.12.0` version](https://github.com/nushell/nushell/pull/11389) - - [Construct `Record`s only through checked helpers](https://github.com/nushell/nushell/pull/11386) - - [Expand the workspace `members` in `Cargo.toml`](https://github.com/nushell/nushell/pull/11387) - - [Properly update to the reedline repo patch](https://github.com/nushell/nushell/pull/11342) - - [Bump version to `0.88.2`](https://github.com/nushell/nushell/pull/11333) - - [Bump version to `0.88.1`](https://github.com/nushell/nushell/pull/11303) - - [Revert lock file changes due to openssl build fail](https://github.com/nushell/nushell/pull/11328) - - [Bump version for `0.88.0` release](https://github.com/nushell/nushell/pull/11298) -- [lavafroth](https://github.com/lavafroth) created - - [fix: prevent greedy matching of directory names](https://github.com/nushell/nushell/pull/11403) -- [AucaCoyan](https://github.com/AucaCoyan) created - - [:memo: Update `str trim` CLI help doc](https://github.com/nushell/nushell/pull/11383) - - [:sparkles: Make `hover` equal to `help` command](https://github.com/nushell/nushell/pull/11320) - - [:recycle: Match `--ide-hover` with `help` command](https://github.com/nushell/nushell/pull/11284) -- [hardfau1t](https://github.com/hardfau1t) created - - [fix(cd): on android/termux fails to cd into /sdcard](https://github.com/nushell/nushell/pull/10329) -- [0323pin](https://github.com/0323pin) created - - [Fix build on NetBSD](https://github.com/nushell/nushell/pull/11364) -- [stormasm](https://github.com/stormasm) created - - [nu-cli repl get_command_finished_marker() does not need to be pub](https://github.com/nushell/nushell/pull/11362) -- [KAAtheWiseGit](https://github.com/KAAtheWiseGit) created - - [Rename extra's `format` to `format pattern`](https://github.com/nushell/nushell/pull/11355) - - [Bubble up errors passed to `complete`](https://github.com/nushell/nushell/pull/11313) - - [Add `format` meta command](https://github.com/nushell/nushell/pull/11334) - - [Replace bash with POSIX sh in tests](https://github.com/nushell/nushell/pull/11293) -- [crides](https://github.com/crides) created - - [fix shell integration markers](https://github.com/nushell/nushell/pull/11352) -- [CAD97](https://github.com/CAD97) created - - [Only run $env.PROMPT_COMMAND once per prompt](https://github.com/nushell/nushell/pull/10986) -- [Hofer-Julian](https://github.com/Hofer-Julian) created - - [Move history into their own module](https://github.com/nushell/nushell/pull/11308) - - [Move `stor` commands to category `Database`](https://github.com/nushell/nushell/pull/11315) -- [ayax79](https://github.com/ayax79) created - - [Polars Struct support without unsafe blocks](https://github.com/nushell/nushell/pull/11229) -- [drbrain](https://github.com/drbrain) created - - [Enforce required, optional, and rest positional arguments start with an uppercase and end with a period.](https://github.com/nushell/nushell/pull/11285) -- [AntoineSebert](https://github.com/AntoineSebert) created - - [fix-`open`-is-ambiguous](https://github.com/nushell/nushell/pull/11302) -- [sophiajt](https://github.com/sophiajt) created - - [bump reedline dep to 0.27](https://github.com/nushell/nushell/pull/11299) - -## Documentation -- [amtoine](https://github.com/amtoine) created - - [mark feature-gated commands more clearly](https://github.com/nushell/nushell.github.io/pull/1183) - - [logo contest announcement](https://github.com/nushell/nushell.github.io/pull/1180) - - [Release notes for `0.88.0`](https://github.com/nushell/nushell.github.io/pull/1146) -- [TWSiO](https://github.com/TWSiO) created - - [Adding warning to nu_plugin_formats commands](https://github.com/nushell/nushell.github.io/pull/1199) -- [yukitomoda](https://github.com/yukitomoda) created - - [JA update installation.md](https://github.com/nushell/nushell.github.io/pull/1198) - - [JA update shells_in_shells.md](https://github.com/nushell/nushell.github.io/pull/1197) - - [fix a description of usage scenario](https://github.com/nushell/nushell.github.io/pull/1196) - - [Update shells_in_shells.md](https://github.com/nushell/nushell.github.io/pull/1195) - - [update the list of commands which are interpreted by CMD](https://github.com/nushell/nushell.github.io/pull/1192) -- [hustcer](https://github.com/hustcer) created - - [Upgrade Vuepress, some Vuepress plugins and shiki syntax highlighter](https://github.com/nushell/nushell.github.io/pull/1194) - - [Refresh command docs for Nu v0.88](https://github.com/nushell/nushell.github.io/pull/1171) -- [aserowy](https://github.com/aserowy) created - - [external completer: fixed cookbook example to exchange the first span entry only](https://github.com/nushell/nushell.github.io/pull/1193) -- [YukiOnodera](https://github.com/YukiOnodera) created - - [I've revised the Japanese translation](https://github.com/nushell/nushell.github.io/pull/1179) -- [zolodev](https://github.com/zolodev) created - - [Update aliases adding new section](https://github.com/nushell/nushell.github.io/pull/1190) -- [ysthakur](https://github.com/ysthakur) created - - [Add info on spread operator in commands for 0.89 release notes](https://github.com/nushell/nushell.github.io/pull/1188) - - [Add information on spread operator](https://github.com/nushell/nushell.github.io/pull/1176) -- [frogshead](https://github.com/frogshead) created - - [fix typo](https://github.com/nushell/nushell.github.io/pull/1185) -- [Trent-Fellbootman](https://github.com/Trent-Fellbootman) created - - [Update types_of_data.md](https://github.com/nushell/nushell.github.io/pull/1184) - - [Update thinking_in_nu.md](https://github.com/nushell/nushell.github.io/pull/1172) -- [WindSoilder](https://github.com/WindSoilder) created - - [add information about switches](https://github.com/nushell/nushell.github.io/pull/1182) -- [app/github-actions](https://github.com/app/github-actions) created - - [Compressed Images](https://github.com/nushell/nushell.github.io/pull/1181) -- [MediosZ](https://github.com/MediosZ) created - - [Sync zh-CN shells_in_shells.](https://github.com/nushell/nushell.github.io/pull/1178) -- [braddunbar](https://github.com/braddunbar) created - - [Typo in history menu section](https://github.com/nushell/nushell.github.io/pull/1177) -- [IndigoLily](https://github.com/IndigoLily) created - - [Fix various spelling/grammar issues in release notes for `0.88.0`](https://github.com/nushell/nushell.github.io/pull/1175) -- [Tamnac](https://github.com/Tamnac) created - - [Add time command to nushell_map.md](https://github.com/nushell/nushell.github.io/pull/1173) -- [mb21](https://github.com/mb21) created - - [Extend globbing section in moving_around.md](https://github.com/nushell/nushell.github.io/pull/1125) -- [RGBCube](https://github.com/RGBCube) created - - [Update background_task.md](https://github.com/nushell/nushell.github.io/pull/1166) - -## Nu_Scripts -- [fj0r](https://github.com/fj0r) created - - [comma: upgrade template](https://github.com/nushell/nu_scripts/pull/725) - - [kubernetes to docker-compose](https://github.com/nushell/nu_scripts/pull/726) - - [comma test runner](https://github.com/nushell/nu_scripts/pull/715) - - [merge container-inspect into container-process-list](https://github.com/nushell/nu_scripts/pull/711) - - [comma: support filter, watch, poll](https://github.com/nushell/nu_scripts/pull/707) - - [new module comma and some updates](https://github.com/nushell/nu_scripts/pull/704) -- [bobhy](https://github.com/bobhy) created - - [Show activated python VE at beginning of prompt.](https://github.com/nushell/nu_scripts/pull/722) -- [AucaCoyan](https://github.com/AucaCoyan) created - - [:bug: fix `(default)` and `(installed)` on rustup completions](https://github.com/nushell/nu_scripts/pull/721) - - [:bug: rename `yarn` for `yarn-v4` and add `run` cmpl](https://github.com/nushell/nu_scripts/pull/720) - - [:sparkles: `code` completions](https://github.com/nushell/nu_scripts/pull/719) - - [:sparkles: add completion to `gh pr checkout `](https://github.com/nushell/nu_scripts/pull/714) - - [:sparkles: add more `gh` completions](https://github.com/nushell/nu_scripts/pull/713) - - [:sparkles: Add the first layer of depth to the cmds](https://github.com/nushell/nu_scripts/pull/708) - - [:sparkles: First `gh` completions](https://github.com/nushell/nu_scripts/pull/706) - - [:bug: Fix `rustup` use completions and modify README](https://github.com/nushell/nu_scripts/pull/696) -- [edhowland](https://github.com/edhowland) created - - [Adds Modules/recursion : Examples of Fun with Recursive functions in Nu](https://github.com/nushell/nu_scripts/pull/717) -- [frogshead](https://github.com/frogshead) created - - [fix broken links in modules readme](https://github.com/nushell/nu_scripts/pull/718) - - [fix broken link on README.md](https://github.com/nushell/nu_scripts/pull/716) -- [robbienohra](https://github.com/robbienohra) created - - [fix: missing regex flag](https://github.com/nushell/nu_scripts/pull/712) -- [adrian5](https://github.com/adrian5) created - - [Add tokyo-moon theme variant](https://github.com/nushell/nu_scripts/pull/710) -- [kjelly](https://github.com/kjelly) created - - [fix git-v2 and kubernetes](https://github.com/nushell/nu_scripts/pull/703) -- [zyfmix](https://github.com/zyfmix) created - - [Fix: nushell at 0.88.0 start and end are deprecated](https://github.com/nushell/nu_scripts/pull/698) -- [RGBCube](https://github.com/RGBCube) created - - [Rewrite and expand background task module](https://github.com/nushell/nu_scripts/pull/691) -- [TeaDrinkingProgrammer](https://github.com/TeaDrinkingProgrammer) created - - [Added updated and improved version of the conda scripts](https://github.com/nushell/nu_scripts/pull/694) - -## Reedline -- [WindSoilder](https://github.com/WindSoilder) created - - [Try fix prompt_start_row reset to 0 when opening a file without newline in Nushell ](https://github.com/nushell/reedline/pull/697) - - [fix clippy, add typo dict](https://github.com/nushell/reedline/pull/698) -- [sholderbach](https://github.com/sholderbach) created - - [Fix clippy from the future](https://github.com/nushell/reedline/pull/687) - - [Bump `itertools` to `0.12.0` from `0.10.x`](https://github.com/nushell/reedline/pull/686) - - [Bump version to 0.27.1](https://github.com/nushell/reedline/pull/683) - - [Try to fix the docs.rs build](https://github.com/nushell/reedline/pull/682) - - [Bump version for 0.27 release](https://github.com/nushell/reedline/pull/681) -- [nibon7](https://github.com/nibon7) created - - [Fix `prompt_start_row` reset to 0 when opening a file without newline in Nushell](https://github.com/nushell/reedline/pull/688) -- [danielsomerfield](https://github.com/danielsomerfield) created - - [Better behaviour on resize](https://github.com/nushell/reedline/pull/675) diff --git a/blog/README.md b/blog/README.md deleted file mode 100644 index 15f9f1b337d..00000000000 --- a/blog/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Nu Blog - -[RSS](/rss.xml) / [Atom](/atom.xml) - - diff --git a/book/cheat_sheet.md b/book/cheat_sheet.md deleted file mode 100644 index def5666f897..00000000000 --- a/book/cheat_sheet.md +++ /dev/null @@ -1,549 +0,0 @@ -# Nushell cheat sheet - -## Data types - -```nu - > "12" | into int -``` - -> **converts string to integer** - ---- - -```nu - > date now | date to-timezone "Europe/London" -``` - -> **converts present date to provided time zone** - ---- - -```nu - > {'name': 'nu', 'stars': 5, 'language': 'Python'} | upsert language 'Rust' -``` - -> **updates a record's language and if none is specified inserts provided value** - ---- - -```nu - > [one two three] | to yaml -``` - -> **converts list of strings to yaml** - ---- - -```nu - > [[framework, language]; [Django, Python] [Lavarel, PHP]] -``` - -> **prints the table** - ---- - -```nu - > [{name: 'Robert' age: 34 position: 'Designer'} - {name: 'Margaret' age: 30 position: 'Software Developer'} - {name: 'Natalie' age: 50 position: 'Accountant'} - ] | select name position -``` - -> **selects two columns from the table and prints their values** - -## Strings - -```nu - > let name = "Alice" - > $"greetings, ($name)!" -``` - -> **prints `greetings, Alice!`** - ---- - -```nu - > let string_list = "one,two,three" | split row "," - $string_list - - ╭───┬───────╮ - │ 0 │ one │ - │ 1 │ two │ - │ 2 │ three │ - ╰───┴───────╯ -``` - -> **splits the string with specified delimiter and saves the list to `string_list` variable** - ---- - -```nu - "Hello, world!" | str contains "o, w" -``` - -> **checks if a string contains a substring and returns `boolean`** - ---- - -```nu - let str_list = [zero one two] - $str_list | str join ',' -``` - -> **joins the list of strings using provided delimiter** - ---- - -```nu - > 'Hello World!' | str substring 4..8 -``` - -> **created a slice from a given string with start (4) and end (8) indices** - ---- - -```nu - > 'Nushell 0.80' | parse '{shell} {version}' - - ╭───┬─────────┬─────────╮ - │ # │ shell │ version │ - ├───┼─────────┼─────────┤ - │ 0 │ Nushell │ 0.80 │ - ╰───┴─────────┴─────────╯ -``` - -> **parses the string to columns** - -```nu - > "acronym,long\nAPL,A Programming Language" | from csv -``` - -> **parses comma separated values (csv)** - -```nu - > $'(ansi purple_bold)This text is a bold purple!(ansi reset)' -``` - -> **ansi command colors the text (alsways end with `ansi reset` to reset color to default)** - -## Lists - -```nu - > [foo bar baz] | insert 1 'beeze' - - ╭───┬───────╮ - │ 0 │ foo │ - │ 1 │ beeze │ - │ 2 │ bar │ - │ 3 │ baz │ - ╰───┴───────╯ -``` - -> **inserts `beeze` value at st index in the list** - ---- - -```nu - > [1, 2, 3, 4] | update 1 10 -``` - -> **updates 2nd value to 10** - ---- - -```nu - > let numbers = [1, 2, 3, 4, 5] - > $numbers | prepend 0 -``` - -> **adds value at the beginning of the list** - ---- - -```nu - > let numbers = [1, 2, 3, 4, 5] - > $numbers | append 6 -``` - -> **adds value at the end of the list** - ---- - -```nu - > let flowers = [cammomile marigold rose forget-me-not] - > let flowers = ($flowers | first 2) - > $flowers -``` - -> **creates slice of first two values from `flowers` list** - ---- - -```nu - > let planets = [Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune] - > $planets | each { |it| $"($it) is a planet of solar system" } -``` - -> **iterates over a list; `it` is current list value** - ---- - -```nu - > $planets | enumerate | each { |it| $"($it.index + 1) - ($it.item)" } -``` - -> **iterates over a list and provides index and value in `it`** - ---- - -```nu - > let scores = [3 8 4] - > $"total = ($scores | reduce { |it, acc| $acc + $it })" -``` - -> **reduces the list to a single value, `reduce` gives access to accumulator that is applied -> to each element in the list** - ---- - -```nu - > $"total = ($scores | reduce --fold 1 { |it, acc| $acc * $it })" -``` - -> **initial value for accumulator value can be set with `--fold`** - ---- - -```nu - > let planets = [Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune] - > $planets.2 - > Earth -``` - -> **gives access to the 3rd item in the list** - ---- - -```nu - > let planets = [Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune] - > $planets | any {|it| $it | str starts-with "E" } - > true -``` - -> **checks if any string in the list starts with `E`** - ---- - -```nu - > let cond = {|x| $x < 0 }; [-1 -2 9 1] | take while $cond - ╭───┬────╮ - │ 0 │ -1 │ - │ 1 │ -2 │ - ╰───┴────╯ -``` - -> **creates slice of items that satisfy provided condition** - -## Tables - -```nu - > ls | sort-by size -``` - -> **sorting table by size of files** - ---- - -```nu - > ls | sort-by size | first 5 -``` - -> **sorting table by size of files and show first 5 entries** - ---- - -```nu - > let $a = [[first_column second_column third_column]; [foo bar snooze]] - > let $b = [[first_column second_column third_column]; [hex seeze feeze]] - > $a | append $b - - ╭───┬──────────────┬───────────────┬──────────────╮ - │ # │ first_column │ second_column │ third_column │ - ├───┼──────────────┼───────────────┼──────────────┤ - │ 0 │ foo │ bar │ snooze │ - │ 1 │ hex │ seeze │ feeze │ - ╰───┴──────────────┴───────────────┴──────────────╯ -``` - -> **concatenate two tables with same columns** - ---- - -```nu - > let teams_scores = [[team score plays]; ['Boston Celtics' 311 3] ['Golden State Warriors', 245 2]] - > $teams_scores | drop column - - ╭───┬───────────────────────┬───────╮ - │ # │ team │ score │ - ├───┼───────────────────────┼───────┤ - │ 0 │ Boston Celtics │ 311 │ - │ 1 │ Golden State Warriors │ 245 │ - ╰───┴───────────────────────┴───────╯ -``` - -> **remove the last column of a table** - -## Files & Filesystem - -```nu - > start file.txt -``` - -> **opens a text file with the default text editor** - ---- - -```nu - > 'lorem ipsum ' | save file.txt -``` - -> **saves a string to text file** - ---- - -```nu - > 'dolor sit amet' | save --append file.txt -``` - -> **appends a string to the end of file.txt** - ---- - -```nu - > { a: 1, b: 2 } | save file.json -``` - -> **saves a record to file.json** - ---- - -```nu - > glob **/*.{rs,toml} --depth 2 -``` - -> **searches for `.rs` and `.toml` files recursively up to 2 folders deep** - ---- - -```nu - > watch . --glob=**/*.rs {|| cargo test } -``` - -> **runs cargo test whenever a Rust file changes** - ---- - -## Custom Commands - -```nu - def greet [name: string] { - $"hello ($name­)" - } -``` - -> **custom command with parameter type set to string** - ---- - -```nu - def greet [name = "nushell"] { - $"hello ($name­)" - } -``` - -> **custom command with default parameter set to nushell** - ---- - -```nu - def greet [ - name: string - --age: int - ] { - [$name $age] - } - - > greet world --age 10 -``` - -> **passing named parameter by defining flag for custom commands** - ---- - -```nu - def greet [ - name: string - --age (-a): int - --twice - ] { - if $twice { - [$name $age $name $age] - } else { - [$name $age] - } - } - > greet -a 10 --twice hello -``` - -> **using flag as a switch with a shorthand flag (-a) for the age** - ---- - -```nu - def greet [...name: string] { - print "­hello all:" - for $n in $name { - print $n - } - } - - > greet earth mars jupiter venus -``` - -> **custom command which takes any number of positional arguments using rest params** - -## Variables & Subexpressions - -```nu - > let val = 42 - > print $val - 42 -``` - -> **an immutable variable cannot change its value after declaration** - ---- - -```nu - > let val = 42 - > do { let val = 101; $val } - 101 - > $val - 42 -``` - -> **shadowing variable (declaring variable with the same name in a different scope)** - ---- - -```nu - > mut val = 42 - > $val += 27 - > $val - 69 -``` - -> **declaring a mutable variable with mut key word** - ---- - -```nu - > mut x = 0 - > [1 2 3] | each { $x += 1 } -``` - -> **closures and nested defs cannot capture mutable variables from their enviro­nment. -> This expression results in error.** - -```nu - > const plugin = 'path/­to/­plugin' - > register $plugin -``` - -> **a constant variable is immutable value which is fully evaluated at parse-time** - ---- - -```nu - > let files = (ls) - > $files.na­me?.0? -``` - -> **using question mark operator to return null instead of error if provided path is incorrect** - ---- - -```nu - > let big_files = (ls | where size > 10kb) - > $big_files -``` - -> **using subexp­ression by wrapping the expression with parent­heses ()** - ---- - -## Modules - -```nu - > module greetings { - export def hello [name: string] { - $"hello ($name­)!" - } - - export def hi [where: string] { - $"hi ($where)!­" - } - } - - > use greetings hello - > hello "­wor­ld" -``` - -> **using inline module** - ---- - -```nu - # greeti­ngs.nu - export-env { - $env.M­YNAME = "­Arthur, King of the Briton­s" - } - export def hello [] { - $"hello ($env.M­YN­AME­)" - } - - > use greeti­ngs.nu - > $env.M­YNAME - Arthur, King of the Britons - > greetings hello - hello Arthur, King of the Britons! -``` - -> **importing module from file and using its enviro­nment in current scope** - ---- - -```nu - # greeti­ngs.nu - export def hello [name: string] { - $"hello ($name­)!" - } - - export def hi [where: string] { - $"hi ($where)!­" - } - - export def main [] { - "­gre­etings and salutations!" - } - - > use greeti­ngs.nu - > greetings - greetings and saluta­tions! - > greetings hello world - hello world! -``` - -> **using main command in module** - ---- diff --git a/book/design_notes.md b/book/design_notes.md deleted file mode 100644 index c155e0e0e26..00000000000 --- a/book/design_notes.md +++ /dev/null @@ -1,7 +0,0 @@ -# Design Notes - -This chapter intends to give more in-depth overview of certain aspects of Nushell's design. The topics are not necessary for a basic usage, but reading them will help you understand how Nushell works and why. - -We intend to expand this chapter in the future. If there is some topic that you find confusing and hard to understand, let us know. It might be a good candidate for a page here. - -[How Nushell Code Gets Run](how_nushell_code_gets_run.md) explains what happens when you run Nushell source code. It explains how Nushell is in many ways closer to classic compiled languages, like C or Rust, than to other shells and dynamic languages and hopefully clears some confusion that stems from that. diff --git a/book/nushell_map.md b/book/nushell_map.md deleted file mode 100644 index c011e9ab91a..00000000000 --- a/book/nushell_map.md +++ /dev/null @@ -1,75 +0,0 @@ -# Nu map from other shells and domain specific languages - -The idea behind this table is to help you understand how Nu builtins and plugins relate to other known shells and domain specific languages. We've tried to produce a map of relevant Nu commands and what their equivalents are in other languages. Contributions are welcome. - -Note: this table assumes Nu 0.43 or later. - - -| Nushell | SQL | .Net LINQ (C#) | PowerShell (without external modules) | Bash | -| ---------------------- | ----------------------------- | ---------------------------------------------------- | ------------------------------------------ | ----------------------------------------------- | -| alias | | | alias | alias | -| append | | Append | -Append | | -| math avg | avg | Average | Measure-Object, measure | | -| calc, `` | math operators | Aggregate, Average, Count, Max, Min, Sum | | bc | -| cd | | | Set-Location, cd | cd | -| clear | | | Clear-Host | clear | -| config | | | $Profile | vi .bashrc, .profile | -| cp | | | Copy-Item, cp, copy | cp | -| date | NOW() / getdate() | DateTime class | Get-Date | date | -| du | | | | du | -| each | cursor | | ForEach-Object, foreach, for | | -| exit | | | exit | exit | -| http | | HttpClient,WebClient, HttpWebRequest/Response | Invoke-WebRequest | wget | -| first | top, limit | First, FirstOrDefault | Select-Object -First | head | -| format | | String.Format | String.Format | | -| from | import flatfile, openjson, cast(variable as xml) | | Import/ConvertFrom-{Csv,Xml,Html,Json} | | -| get | | Select | (cmd).column | | -| group-by | group by | GroupBy, group | Group-Object, group | | -| help | sp_help | | Get-Help, help, man | man | -| history | | | Get-History, history | history | -| is-empty | is null | String.InNullOrEmpty | String.InNullOrEmpty | | -| kill | | | Stop-Process, kill | kill | -| last | | Last, LastOrDefault | Select-Object -Last | tail | -| length | count | Count | Measure-Object, measure | wc | -| lines | | | File.ReadAllLines | | -| ls | | | Get-ChildItem, dir, ls | ls | -| mkdir | | | mkdir, md | mkdir | -| mv | | | Move-Item, mv, move, mi | mv | -| nth | limit x offset y, rownumber = | ElementAt | [x], indexing operator, ElementAt | | -| open | | | Get-Content, gc, cat, type | cat | -| print | print, union all | | Write-Output, write | echo | -| transpose | pivot | | | | -| ps | | | Get-Process, ps, gps | ps | -| pwd | | | Get-Location, pwd | pwd | -| range | | Range | 1..10, 'a'..'f' | | -| reduce | | Aggregate | | | -| rename | | | Rename-Item, ren, rni | mv | -| reverse | | Reverse | [Array]::Reverse($var) | | -| rm | | | Remove-Item, del, erase, rd, ri, rm, rmdir | rm | -| save | | | Write-Output, Out-File | > foo.txt | -| select | select | Select | Select-Object, select | | -| shuffle | | Random | Sort-Object {Get-Random} | | -| size | | | Measure-Object, measure | wc | -| skip | where row_number() | Skip | Select-Object -Skip | | -| skip until | | SkipWhile | | | -| skip while | | SkipWhile | | | -| sort-by | order by | OrderBy, OrderByDescending, ThenBy, ThenByDescending | Sort-Object, sort | | -| split-by | | Split | Split | | -| str | string functions | String class | String class | | -| str join | concat_ws | Join | Join-String | | -| str trim | rtrim, ltrim | Trim, TrimStart, TrimEnd | Trim | | -| sum | sum | Sum | Measure-Object, measure | | -| sys | | | Get-ComputerInfo | uname, lshw, lsblk, lscpu, lsusb, hdparam, free | -| table | | | Format-Table, ft, Format-List, fl | | -| take | top, limit | Take | Select-Object -First | head | -| take until | | TakeWhile | | | -| take while | | TakeWhile | | | -| timeit | | | Measure-Command | time | -| to | | | Export/ConvertTo-{Csv,Xml,Html,Json} | | -| touch | | | Set-Content | touch | -| uniq | distinct | Distinct | Get-Unique, gu | uniq | -| upsert | As | | | | -| version | select @@version | | $PSVersionTable | | -| with-env | | | $env:FOO = 'bar' | export foo = "bar" | -| where | where | Where | Where-Object, where, "?" operator | | -| which | | | | which | diff --git a/book/nushell_map_imperative.md b/book/nushell_map_imperative.md deleted file mode 100644 index 12d91c5f92d..00000000000 --- a/book/nushell_map_imperative.md +++ /dev/null @@ -1,76 +0,0 @@ -# Nu map from imperative languages - -The idea behind this table is to help you understand how Nu built-ins and plugins relate to imperative languages. We've tried to produce a map of programming-relevant Nu commands and what their equivalents are in other languages. Contributions are welcome. - -Note: this table assumes Nu 0.43 or later. - -| Nushell | Python | Kotlin (Java) | C++ | Rust | -| ------------ | ------------------------------------ | --------------------------------------------------- | ----------------------- | -------------------------------------------------- | -| append | list.append, set.add | add | push_back, emplace_back | push, push_back | -| math avg | statistics.mean | | | | -| calc, = math | math operators | math operators | math operators | math operators | -| count | len | size, length | length | len | -| cp | shutil.copy | | | fs::copy | -| date | datetime.date.today | java.time.LocalDate.now | | | -| drop | list[:-3] | | | | -| du | shutil.disk_usage | | | | -| each | for | for | for | for | -| exit | exit | System.exit, kotlin.system.exitProcess | exit | exit | -| http get | urllib.request.urlopen | | | | -| first | list[:x] | List[0], peek | vector[0], top | Vec[0] | -| format | format | format | format | format! | -| from | csv, json, sqlite3 | | | | -| get | dict[\"key\"] | Map[\"key\"] | map[\"key\"] | HashMap["key"], get, entry | -| group-by | itertools.groupby | groupBy | | group_by | -| headers | keys | | | | -| help | help | | | | -| insert | dict[\"key\"] = val | | map.insert({ 20, 130 }) | map.insert(\"key\", val) | -| is-empty | is None, is [] | isEmpty | empty | is_empty | -| take | list[:x] | | | &Vec[..x] | -| take until | itertools.takewhile | | | | -| take while | itertools.takewhile | | | | -| kill | os.kill | | | | -| last | list[-x:] | | | &Vec[Vec.len()-1] | -| lines | split, splitlines | split | views::split | split, split_whitespace, rsplit, lines | -| ls | os.listdir | | | fs::read_dir | -| match | match | when | | match | -| merge | dict.append | | | map.extend | -| mkdir | os.mkdir | | | fs::create_dir | -| mv | shutil.move | | | fs::rename | -| get | list[x] | List[x] | vector[x] | Vec[x] | -| open | open | | | | -| transpose | zip(\*matrix) | | | | -| http post | urllib.request.urlopen | | | | -| prepend | deque.appendleft | | | | -| print | print | println | printf | println! | -| ps | os.listdir('/proc') | | | | -| pwd | os.getcwd | | | env::current_dir | -| range | range | .., until, downTo, step | iota | .. | -| reduce | functools.reduce | reduce | reduce | fold, rfold, scan | -| reject | del | | | | -| rename | dict[\"key2\"] = dict.pop(\"key\") | | | map.insert(\"key2\", map.remove(\"key\").unwrap()); | -| reverse | reversed, list.reverse | reverse, reversed, asReversed | reverse | rev | -| rm | os.remove | | | | -| save | io.TextIOWrapper.write | | | | -| select | {k:dict[k] for k in keys} | | | | -| shuffle | random.shuffle | | | | -| size | len | | | len | -| skip | list[x:] | | | &Vec[x..],skip | -| skip until | itertools.dropwhile | | | | -| skip while | itertools.dropwhile | | | skip_while | -| sort-by | sorted, list.sort | sortedBy, sortedWith, Arrays.sort, Collections.sort | sort | sort | -| split row | str.split{,lines}, re.split | split | views::split | split | -| str | str functions | String functions | string functions | &str, String functions | -| str join | str.join | joinToString | | join | -| str trim | strip, rstrip, lstrip | trim, trimStart, trimEnd | regex | trim, trim*{start,end}, strip*{suffix,prefix} | -| sum | sum | sum | reduce | sum | -| sys | sys | | | | -| to | import csv, json, sqlite3 | | | | -| touch | open(path, 'a').close() | | | | -| uniq | set | Set | set | HashSet | -| upsert | dict[\"key\"] = val | | | | -| version | sys.version, sys.version_info | | | | -| with-env | os.environ | | | | -| where | filter | filter | filter | filter | -| which | shutil.which | | | | -| wrap | { "key" : val } | | | | diff --git a/book/quick_tour.md b/book/quick_tour.md deleted file mode 100644 index 231cb3e7b02..00000000000 --- a/book/quick_tour.md +++ /dev/null @@ -1,67 +0,0 @@ -# Quick Tour - -The easiest way to see what Nu can do is to start with some examples, so let's dive in. - -The first thing you'll notice when you run a command like [`ls`](/commands/docs/ls.md) is that instead of a block of text coming back, you get a structured table. - -@[code](@snippets/introduction/ls_example.sh) - -The table does more than show the directory in a different way. Just like tables in a spreadsheet, this table allows us to work with the data more interactively. - -The first thing we'll do is to sort our table by size. To do this, we'll take the output from [`ls`](/commands/docs/ls.md) and feed it into a command that can sort tables based on the contents of a column. - -@[code](@snippets/introduction/ls_sort_by_reverse_example.sh) - -You can see that to make this work we didn't pass commandline arguments to [`ls`](/commands/docs/ls.md). Instead, we used the [`sort-by`](/commands/docs/sort-by.md) command that Nu provides to do the sorting of the output of the [`ls`](/commands/docs/ls.md) command. To see the biggest files on top, we also used [`reverse`](/commands/docs/reverse.md). - -Nu provides many commands that can work on tables. For example, we could use [`where`](/commands/docs/where.md) to filter the contents of the [`ls`](/commands/docs/ls.md) table so that it only shows files over 1 kilobyte: - -@[code](@snippets/introduction/ls_where_example.sh) - -Just as in the Unix philosophy, being able to have commands talk to each other gives us ways to mix-and-match in many different combinations. Let's look at a different command: - -@[code](@snippets/introduction/ps_example.sh) - -You may be familiar with the [`ps`](/commands/docs/ps.md) command if you've used Linux. With it, we can get a list of all the current processes that the system is running, what their status is, and what their name is. We can also see the CPU load for the processes. - -What if we wanted to show the processes that were actively using the CPU? Just like we did with the [`ls`](/commands/docs/ls.md) command earlier, we can also work with the table that the [`ps`](/commands/docs/ps.md) command gives back to us: - -@[code](@snippets/introduction/ps_where_example.sh) - -So far, we've been using [`ls`](/commands/docs/ls.md) and [`ps`](/commands/docs/ps.md) to list files and processes. Nu also offers other commands that can create tables of useful information. Next, let's explore [`date`](/commands/docs/date.md) and [`sys`](/commands/docs/sys.md). - -Running [`date now`](/commands/docs/date_now.md) gives us information about the current day and time: - -@[code](@snippets/introduction/date_example.sh) - -To get the date as a table we can feed it into [`date to-table`](/commands/docs/date_to-table.md) - -@[code](@snippets/introduction/date_table_example.sh) - -Running [`sys`](/commands/docs/sys.md) gives information about the system that Nu is running on: - -@[code](@snippets/introduction/sys_example.sh) - -This is a bit different than the tables we saw before. The [`sys`](/commands/docs/sys.md) command gives us a table that contains structured tables in the cells instead of simple values. To take a look at this data, we need to _get_ the column to view: - -@[code](@snippets/introduction/sys_get_example.sh) - -The [`get`](/commands/docs/get.md) command lets us jump into the contents of a column of the table. Here, we're looking into the "host" column, which contains information about the host that Nu is running on. The name of the OS, the hostname, the CPU, and more. Let's get the name of the users on the system: - -@[code](@snippets/introduction/sys_get_nested_example.sh) - -Right now, there's just one user on the system named "jt". You'll notice that we can pass a column path (the `host.sessions.name` part) and not just the name of the column. Nu will take the column path and go to the corresponding bit of data in the table. - -You might have noticed something else that's different. Rather than having a table of data, we have just a single element: the string "jt". Nu works with both tables of data as well as strings. Strings are an important part of working with commands outside of Nu. - -Let's see how strings work outside of Nu in action. We'll take our example from before and run the external [`echo`](/commands/docs/echo.md) command (the `^` tells Nu to not use the built-in [`echo`](/commands/docs/echo.md) command): - -@[code](@snippets/introduction/sys_get_external_echo_example.sh) - -If this looks very similar to what we had before, you have a keen eye! It is similar, but with one important difference: we've called `^echo` with the value we saw earlier. This allows us to pass data out of Nu into [`echo`](/commands/docs/echo.md) (or any command outside of Nu, like `git` for example). - -### Getting Help - -Help text for any of Nu's built-in commands can be discovered with the [`help`](/commands/docs/help.md) command. To see all commands, run [`help commands`](/commands/docs/help_commands.md). You can also search for a topic by doing `help -f `. - -@[code](@snippets/introduction/help_example.sh) diff --git a/commands/docs/cp.md b/commands/docs/cp.md deleted file mode 100644 index 573eed3f663..00000000000 --- a/commands/docs/cp.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: cp -categories: | - filesystem -version: 0.90.0 -filesystem: | - Copy files using uutils/coreutils cp. -usage: | - Copy files using uutils/coreutils cp. -feature: default ---- - - -# {{ $frontmatter.title }} for filesystem - -

{{ $frontmatter.filesystem }}
- -## Signature - -```> cp {flags} ...rest``` - -## 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 - 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) - 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 - -## Parameters - - - `...rest`: Copy SRC file/s to DEST. - - -## Input/output types: - -| input | output | -| ------- | ------- | -| nothing | nothing | - -## Examples - -Copy myfile to dir_b -```nu -> cp myfile 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 -```nu -> cp -r -v dir_a dir_b - -``` - -Move many files into a directory -```nu -> cp *.txt dir_a - -``` - -Copy only if source file is newer than target file -```nu -> cp -u a b - -``` - -Copy file preserving mode and timestamps attributes -```nu -> cp --preserve [ mode timestamps ] a b - -``` - -Copy file erasing all attributes -```nu -> cp --preserve [] a b - -``` diff --git a/de/README.md b/de/README.md deleted file mode 100644 index 7dcf446501c..00000000000 --- a/de/README.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -home: true -heroImage: null -heroText: Nushell -tagline: Eine neue Art von Shell. -actionText: Loslegen → -actionLink: /de/book/ -features: - - title: Pipelines um jedes Betriebssystem zu steuern - details: Nu läuft auf Linux, macOS und Windows. Einmal lernen - überall verwenden. - - title: Alles sind Daten. - details: Pipelines in Nu nutzen strukturierte Daten die einfach ausgewählt, gefiltert und sortiert werden können. Nie wieder Strings parsen, sondern direkt anfangen Probleme zu lösen. - - title: Leistungsfähige Plugins - details: Nu kann dank des leistungsfähigen Plugin-Systems einfach erweitert werden. ---- - -Screenshot zeigt die Verwendung des ls-Befehls - -### Nu funktioniert mit existierenden Daten - -Nu versteht [JSON, YAML, XML, Excel und noch mehr](/book/loading_data.md). Es ist einfach Daten in eine Nu Pipeline zu laden ganz egal ob diese in einer Datei, einer Datenbank oder einer Web-API liegen: - -Screenshot zeigt das Laden von Daten von einer Web-API - -### Nu hat tolle Fehlermeldungen - -Nu arbeitet mit typisierten Daten, wodurch Fehler abgefangen werden, die andere Shells nicht erkennen. Und falls etwas schiefgeht bekommt genau mitgeteilt wo und weshalb: - -Screenshot zeigt eine Fehlermeldung, wenn Nu einen type error abfängt - -## Nu installieren - -Nushell ist verfügbar [als kompiliertes Programm](https://github.com/nushell/nushell/releases), [von einem Packetmanager](https://repology.org/project/nushell/versions), und als [Source Code](https://github.com/nushell/nushell). Die detaillierten Installationsanweisungen sind [hier](/de/book/installation.md) zu finden. Oder direkt loslegen: - -#### macOS / Linux: - -```sh -$ brew install nushell -``` - -#### Windows: - -```powershell -$ winget install nushell -``` - -## Community - -Wenn es irgendwelche Fragen gibt, am besten unserem (englischsprachigen) [Discord Server](https://discord.gg/NtAbbGn) beitreten. Dort gibt es sehr viele Menschen die gerne weiterhelfen ganz egal ob man neu zu Nu ist oder nicht. - -Dazu beitragen diese Seiten zu verbessern durch [Feedback](https://github.com/nushell/nushell.github.io/issues) oder eine [Pull Request](https://github.com/nushell/nushell.github.io/pulls). diff --git a/de/book/3rdpartyprompts.md b/de/book/3rdpartyprompts.md deleted file mode 100644 index acafab58c49..00000000000 --- a/de/book/3rdpartyprompts.md +++ /dev/null @@ -1,44 +0,0 @@ -# Konfiguration von Drittanbieter-Prompts - -## nerdfonts - -nerdfonts sind nicht zwangsweise notwendig, machen aber die Darstellung viel besser. -Sie enthalten unter anderem Symbole für Betriebssysteme oder den Git-Status und graphische Formen für einen ansprechenden Prompt. - -[Webseite](https://www.nerdfonts.com) - -[Repository](https://github.com/ryanoasis/nerd-fonts) - -## oh-my-posh - -[Webseite](https://ohmyposh.dev/) - -[Repository](https://github.com/JanDeDobbeleer/oh-my-posh) - -Wenn [oh-my-posh](https://ohmyposh.dev/) verwendet werden soll, kann dies in wenigen Schritten für Nushell erreicht werden. Die Integration in Nushell funktioniert sehr gut. Die folgenden Schritte werden dazu benötigt: - -1. oh-my-posh installieren und die Farbschemata herunterladen entsprechend dieser [Anleitung](https://ohmyposh.dev/docs/linux#installation) -2. Herunterladen und installieren einer [nerd font](https://github.com/ryanoasis/nerd-fonts). -3. Die Umgebungsvariable `PROMPT_COMMAND` durch hinzufügen der folgenden Zeile in `~/.config/nushell/config.nu` setzen. Den Style `M365Princess.omp.json` kann man entsprechend der [Demo](https://ohmyposh.dev/docs/themes) beliebig ändern . - -```nu -> $env.PROMPT_COMMAND = { oh-my-posh --config ~/.poshthemes/M365Princess.omp.json } -``` - -## Starship - -[Website](https://starship.rs/) - -[Repository](https://github.com/starship/starship) - -1. Den obigen Links folgen und starship installieren. -2. nerdfonts entsprechend persönlicher Präferenzen installieren. -3. Die `STARSHIP_SHELL` Umgebungsvariable auf `nu` setzen, indem der folgende Befehl ausgeführt wird: `$env.STARSHIP_SHELL = "nu"` -4. Wenn die standardmäßige Uhr mit Zeit und Datum auf der rechten Seite dargestellt werden soll, sollte der folgende Befehl ausgeführt werden: `hide PROMPT_COMMAND_RIGHT` -5. Wenn der standardmäßige Indikator verwendet werden soll, kann der folgende Befehl ausgeführt werden: `$env.PROMPT_INDICATOR = " "` -6. starship kann als Prompt auf der linken Seite mit dem folgenden Befehl festgelegt werden: `$env.PROMPT_COMMAND = { starship prompt --cmd-duration $env.CMD_DURATION_MS $'--status=($env.LAST_EXIT_CODE)' | str trim }`. Ein Hinweis: Unter Umständen muss `str trim` in der Nushell-Prompt nicht verwendet werden, wenn starship's standardmäßig aktive Einstellung für neue Zeilen in der `starship.toml` mittels `add_newline = false` deaktiviert wurde. Es gibt Berichte, dass dies teilweise nicht gut im Zusammenspiel mit Nushell-Prompts funktioniert. Wir arbeiten noch daran! -7. Da Nushell Prompts auf der rechten Seite unterstützt, kann auch mit starship's Möglichkeit einer solchen Prompt experimentiert werden. Die rechte Prompt in Nushell zu setzen funktioniert identisch, wie das Setzen der Linken. Es muss lediglich `PROMPT_COMMAND_RIGHT` gesetzt werden. - -## Purs - -[Repository](https://github.com/xcambar/purs) diff --git a/de/book/README.md b/de/book/README.md deleted file mode 100644 index 87ceeb43031..00000000000 --- a/de/book/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# Einführung - -Hallo und herzlich Willkommen beim Nushell Projekt. Das Ziel diese Projekts ist es, die Philosophie von Unix Shells, wo Pipes einfache Befehle miteinander verbinden, mit modernen Ansätzen zu verbinden. - -Nu ist von vielen Seiten beeinflusst: traditionelle Shells wie Bash, objektbasierte Shells wie PowerShell, funktionale Programmierung, Systems Programming und viele Weitere. Aber statt die eierlegende Wollmilchsau zu sein, liegt der Fokus von Nu darauf, die angebotenen Funktionen gut zu beherrschen: - -- Flexible cross-plattform Shell mit einem modernen Verhalten -- Ausgaben von Kommandozeilenprogrammen mit einer Shell zu verarbeiten, die Struktur von Daten versteht -- Ein Interface besitzen, das den modernen Bedürfnissen gerecht wird - -Der einfachste Weg zu verstehen, was Nu alles leisten kann, ist entlang von Beispielen. Los geht's! - -Das Erste was auffällt, wenn ein Befehl wie `ls` ausgeführt wird, ist, dass anstatt eines Blocks von Text eine strukturierte Tabelle als Ausgabe erscheint. - -@[code](@snippets/introduction/ls_example.sh) - -Diese Tabelle ist mehr als nur eine andere Darstellungsform. Wie Tabellen in Spreadsheets erlaubt es diese Tabelle mit den Daten interaktiver zu arbeiten. - -Um das zu demonstrieren, wird der Inhalt der Tabelle zunächst nach der Größe sortiert. Um das zu realisieren, wird die Ausgabe von `ls` genommen und in ein Befehl gegeben, der Tabellen auf Basis von Daten in einer Spalte neu anordnen kann. - -@[code](@snippets/introduction/ls_sort_by_reverse_example.sh) - -Um das Ganze zu realisieren, mussten hierzu nicht Argumente an `ls` übergeben werden. Stattdessen wird der `sort-by` Befehl verwendet, den Nu bereitstellt, um Daten zu sortieren. Damit die größten Dateien oben erscheinen wurde zusätzlich die Option `reverse` angegeben. - -Nu stellt sehr viele Befehle bereit, die mit Tabellen arbeiten können. Beispielsweise kann die Ausgabe von `ls` auch derart gefiltert werden, dass nur Datei mit einer Größe von mehr als einem Kilobyte angezeigt werden: - -@[code](@snippets/introduction/ls_where_example.sh) - -Wie in der Unix-Philosophie, erlauben Befehle, die untereinander Daten austauschen können, viele verschiedene Kombinationen um Aufgaben zu lösen. Wie in folgendem Beispiel: - -@[code](@snippets/introduction/ps_example.sh) - -Der `ps` Befehl erlaubt es auf Linux-Systemen alle laufenden Prozesse, deren Status und Name abzufragen. Des Weiteren gibt er Informationen zu CPU-Last der einzelnen Prozesse an. - -Was macht man, wenn man nur Prozesse sehen möchte, die aktuelle aktiv die CPU nutzen? Wie zuvor beim `ls` Befehl, kann mit der durch `ps` zurückgegebenen Tabelle gearbeitet werden: - -@[code](@snippets/introduction/ps_where_example.sh) - -Bis jetzt wurden `ls` und `ps` genutzt, um Dateien und Prozesse aufzulisten. Nu besitzt aber noch viele weitere Befehle die nützliche Informationen in Tabellenform ausgeben. Dazu wird nun ein Block auf die Befehle `date` und `sys` geworfen. - -Wenn `date now` aufgerufen wird, werden Informationen zum aktuellen Datum und der aktuellen Uhrzeit ausgegeben. - -@[code](@snippets/introduction/date_example.sh) - -Um das Datum in Tabellenform zu bekommen, kann es zusätzlich in `date to-table` gegeben werden: - -@[code](@snippets/introduction/date_table_example.sh) - -Der Aufruf von `sys` gibt Informationen zum System aus, auf dem Nu läuft: - -@[code](@snippets/introduction/sys_example.sh) - -Diese Ausgabe unterscheidet sich nun von den vorherigen. Der `sys` Befehl gibt eine Tabelle zurück, die selbst strukturierte Tabellen in den Zellen enthält anstatt nur einfache Werte. Um auf die Daten zuzugreifen, wird der _get_ Befehl verwendet: - -@[code](@snippets/introduction/sys_get_example.sh) - -Der `get` Befehl erlaubt es, in die Inhalte einer Tabellenzelle einzutauchen. Hier wird beispielsweise die Spalte "host" näher betrachtet, die Informationen über den Host, auf dem Nu läuft, enthält. Der Name des Betriebssystem (OS), die CPU und mehr. Nun sollen die Namen der Nutzer auf dem System ausgegeben werden: - -@[code](@snippets/introduction/sys_get_nested_example.sh) - -Aktuelle existiert nur ein Nutzer namens "jt". Wie zu sehen ist, kann ein ganzer Pfad für Spalten angegeben werden - nicht nur der Name der Spalte. Nu wird den Pfad nehmen und durch die entsprechenden Daten in der Tabelle gehen. - -Und noch etwas anderes ist anders. Anstatt einer Tabelle mit Daten wurde nur ein einzelnes Element ausgegeben: der String "jt". Nu arbeitet sowohl mit Tabellen voller Daten als auch mit Strings. Strings sind ein wichtiger Bestandteil, um mit Befehlen außerhalb von Nu zu arbeiten. - -Nun soll aufgezeigt werden, wie mit Strings außerhalb von Nu gearbeitet wird. Dazu wird das vorige Beispiel erweitert. Die Daten werden an den externen `echo` Befehl weitergegeben (das `^` teilt Nu mit, dass nicht der eingebaute `echo` Befehl verwendet werden soll): - -@[code](@snippets/introduction/sys_get_external_echo_example.sh) - -Das sieht jetzt genau gleich aus wie die Ausgabe zuvor. Was soll das? Es ist ähnlich aber mit einem entscheidenden Unterschied: `^echo` wurde aufgerufen. Das erlaubt es uns Daten aus Nu heraus an beliebige Befehle außerhalb von Nu zu geben wie `echo` oder `git`. - -_Hinweis: Hilfe zu allen in Nu eingebauten Befehlen kann mit dem Befehl `help` angezeigt werden_: - -@[code](@snippets/introduction/help_example.sh) diff --git a/de/book/advanced.md b/de/book/advanced.md deleted file mode 100644 index 3a44d130f04..00000000000 --- a/de/book/advanced.md +++ /dev/null @@ -1,20 +0,0 @@ -# (Nicht nur für) Fortgeschrittene - -Der Titel "Fortgeschritten" mag abschrecken und zum Überspringen des Kapitels animieren, doch tatsächlich sind einige der interessantesten und mächtigsten Merkmale hier zu finden. - -Abgesehen von den eingebauten Befehlen, besitzt Nushell eine [Standard Bibliothek](standard_library.md) aus in Nu geschriebenen Befehlen. - -Nushell arbeitet mit _strukturierten Daten_. -Nushell ist eine "Daten orientierte" Shell und Programmiersprache. -Diese Daten zentrierte Sicht zeigt sich auch in [Polars](https://github.com/pola-rs/polars), dem eingebauten vollständigen Datenpaket Verarbeiter. -Im Kapitel [Dataframes documentation](dataframes.md) wird erklärt, wie grosse Datenmengen effizient in Nushell verarbeitet werden können. - -Werte in Nushell enthalten einige [Metadaten](metadata.md). -Diese können verwendet werden, um z.B. [eigene Fehlermeldungen](creating_errors.md) erstellen zu können. - -Dank Nushells strikten Gültigkeitsregeln, ist es sehr einfach durch Sammlungen [parallel zu iterieren](parallelism.md), was mit wenig Aufwand lange laufende Skripte beschleunigen kann. - -Mit dem [`explore`](/commands/docs/explore.md) Befehl können Daten [interaktiv erkundet](explore.md) werden. - -Schliesslich kann Nushell mit [Plugins](plugins.md) erweitert werden. -Ein Plugin kann fast alles sein, solange es mit Nushell in einem Protokoll kommuniziert, welches diese versteht. diff --git a/de/book/aliases.md b/de/book/aliases.md deleted file mode 100644 index a197100ac1b..00000000000 --- a/de/book/aliases.md +++ /dev/null @@ -1,50 +0,0 @@ -# Aliase - -Aliase in Nushell bieten eine einfache Möglichkeit, um Texte zur ersetzen. Damit ist es möglich, einen Kurznamen für längere Befehle zu definieren - inklusive der Argumente. - -Beispielsweise kann ein Alias namens `ll` definiert werden, der den längeren Befehl `ls -l` ersetzt: - -``` -> alias ll = ls -l -``` - -Nun kann der Alias aufgerufen werden: - -``` -> ll -``` - -Wenn das getan wird, wirkt es, als sei `ls -l` aufgerufen worden. Das bietet auch die Möglichkeit weitere Parameter anzugeben. So kann auch geschrieben werden: - -``` -> ll -a -``` - -Das ist äquivalent zu `ls -l -a`. Deutlich kürzer. - -## Alle Aliase auflisten - -Die verfügbaren Aliase können mit `$nu.scope.aliases` aufgelistet werden. - -## Persistenz - -Um Aliase dauerhaft zu speichern muss man sie nur in die Datei _config.nu_ einfügen, das Kommando `config nu` öffnet einen Editor zum Einfügen, und dann die Nushell neu starten. - -## Shell pipes in Aliases - -Achtung: Der Alias `alias uuidgen = uuidgen | tr A-F a-f` (um das verhalten von `uuidgen` auf Mac an Linux anzugleichen) funktioniert nicht. -Die Lösung ist einen parameterlosen Befehl zu definieren, der das Systemprogramm `uuidgen` mit Hilfe von `^` aufruft. - -``` -def uuidgen [] { ^uuidgen | tr A-F a-f } -``` - -Mehr dazu im Kapitel [Eigene Befehle](custom_commands.md). - -Oder ein etwas idiomatischeres Beispiel von nushell internen Befehlen - -``` -def lsg [] { ls | sort-by type name -i | grid -c | str trim } -``` - -das alle Dateien und Ordner in Zeilen und Spalten darstellt. diff --git a/de/book/background_task.md b/de/book/background_task.md deleted file mode 100644 index 0c89c6bddfd..00000000000 --- a/de/book/background_task.md +++ /dev/null @@ -1,36 +0,0 @@ -# Hintergrund-Tasks in Nu - -Aktuell besitzt Nushell kein eingebautes Hintergrund-Task Feature. -Mit einigen Werkzeugen kann sie jedoch Hintergrund-Tasks unterstützen. -Hier einige Beispiele: - -1. Verwenden eines externen Task Werkzeugs wie [pueue](https://github.com/Nukesor/pueue) -2. Verwenden eines Terminal Multiplexers wie [tmux](https://github.com/tmux/tmux/wiki) or [zellij](https://zellij.dev/) - -## Nu mit pueu verwenden - -Dank [pueue](https://github.com/Nukesor/pueue) ist es möglich Hintergrund-Tasks zu planen und zu verwalten (wie Logs ansehen, Tasks beenden, den status aller Tasks einsehen) - -Anders als bei einem Terminal Multiplexer, ist es nicht notwendig, mehrere Sitzungen zu verbinden. -Den Status von Tasks erhält man sehr einfach. - -Hier ein einfaches Beispiel wie ein [nushell module](https://github.com/nushell/nu_scripts/tree/main/background_task) mit pueu zusammenarbeitet. - -Das Setup umfasst: -1. installiere pueue -2. führe `pueued` mit der default Konfiguration aus. Siehe unter [start-the-daemon page](https://github.com/Nukesor/pueue/wiki/Get-started#start-the-daemon) für mehr Informationen. -3. speichere die [job.nu](https://github.com/nushell/nu_scripts/blob/main/modules/background_task/job.nu) Datei unter `$env.NU_LIB_DIRS`. -4. Füge die Zeile: `use job.nu` zur `$nu.config-path` Datei hinzu. -5. starte Nu neu. - -Nun stehen einige Befehle zur Verarbeitung von Hintergrund-Tasks zur Verfügung. (e.g: `job spawn`, `job status`, `job log`) - -Nachteil: Es wird eine frische Nushell zusammen mit dem gewünschten Befehl ausgeführt. Diese erbt nicht die Variablen, eigenen Befehle oder Aliase, vom aktuellen Gültigkeitsbereich. Mit Ausnahme von Umgebungsvariablen, welche den Wert in Text umwandeln können. Sollen eigene Befehle oder Variablen im Hintergrund-Task verwendet werden, müssen sie mit [`use`](/commands/docs/use.md) oder [`def`](/commands/docs/def.md) im entsprechenden Block definiert werden. - -## Nu mit einem Terminal Multiplexer verwenden - -Es kann ein Terminal Multiplexer installiert und mit Nu verwendet werden. - -Diese erlauben es auf einfache Weise zwischen mehreren Programmen in einem Terminal zu wechseln. -Sie können abgekoppelt werden (und im Hintergrund weiterlaufen) und mit einem anderen Terminal wieder verbunden werden. -Dies ist sehr flexibel und nützlich. diff --git a/de/book/coloring_and_theming.md b/de/book/coloring_and_theming.md deleted file mode 100644 index 8a8b766afea..00000000000 --- a/de/book/coloring_and_theming.md +++ /dev/null @@ -1,497 +0,0 @@ -# Farben und Themen in Nu - -In vielen Teilen von Nushells Oberfläche sind die Farben anpassbar. Dies wird in der Konfigurationsdatei `config.nu` erstellt. -Ein Hashtag in der Konfigurationsdatei kommentiert den danach folgenden Text aus. - -1. Tabellen Rahmen -2. Werte einfacher Typen -3. Formen (Kommandozeilen Syntax) -4. Prompt -5. LS_COLORS - -## `Tabellen Rahmen` - ---- - -Tabellen Rahmen werden mit der Einstellung `table_mode` in der `config.nu` konfiguriert. -Hier ein Beispiel: - -```nu -> $env.config = { - table_mode: rounded -} -``` - -Dies sind die aktuellen Optionen für `table_mode`: - -- `rounded` # das ist natürlich der beste :) -- `basic` -- `compact` -- `compact_double` -- `light` -- `thin` -- `with_love` -- `reinforced` -- `heavy` -- `none` -- `other` - -### `Farb-Symbolik` - ---- - -- `r` - Normale Farbe Abkürzung für rot -- `rb` - Normale Farbe rot mit `b` für `bold`, fette Schrift -- `red` - Normale Farbe rot -- `red_bold` - Normale Farbe rot mit fetter Schrift -- `"#ff0000"` - "#hex" Format Vordergrund-Farbe rot (Anführungszeichen benötigt) -- `{ fg: "#ff0000" bg: "#0000ff" attr: b }` - "komplettes #hex" Format Vordergrund rot in "#hex" Format mit einem blauen Hintergund in "#hex" Format mit `b` als Abkürzung für fette Schrift. - -### `Attribute` - ---- - -| Code | Bedeutung | -| ---- | ------------------- | -| l | blink | -| b | bold | -| d | dimmed | -| h | hidden | -| i | italic | -| r | reverse | -| s | strikethrough | -| u | underline | -| n | nothing | -| | defaults to nothing | - -### `Normale Farben` and `Abkürzungen` - -| Code | Name | -| ------ | ---------------------- | -| g | green | -| gb | green_bold | -| gu | green_underline | -| gi | green_italic | -| gd | green_dimmed | -| gr | green_reverse | -| gbl | green_blink | -| gst | green_strike | -| lg | light_green | -| lgb | light_green_bold | -| lgu | light_green_underline | -| lgi | light_green_italic | -| lgd | light_green_dimmed | -| lgr | light_green_reverse | -| lgbl | light_green_blink | -| lgst | light_green_strike | -| r | red | -| rb | red_bold | -| ru | red_underline | -| ri | red_italic | -| rd | red_dimmed | -| rr | red_reverse | -| rbl | red_blink | -| rst | red_strike | -| lr | light_red | -| lrb | light_red_bold | -| lru | light_red_underline | -| lri | light_red_italic | -| lrd | light_red_dimmed | -| lrr | light_red_reverse | -| lrbl | light_red_blink | -| lrst | light_red_strike | -| u | blue | -| ub | blue_bold | -| uu | blue_underline | -| ui | blue_italic | -| ud | blue_dimmed | -| ur | blue_reverse | -| ubl | blue_blink | -| ust | blue_strike | -| lu | light_blue | -| lub | light_blue_bold | -| luu | light_blue_underline | -| lui | light_blue_italic | -| lud | light_blue_dimmed | -| lur | light_blue_reverse | -| lubl | light_blue_blink | -| lust | light_blue_strike | -| b | black | -| bb | black_bold | -| bu | black_underline | -| bi | black_italic | -| bd | black_dimmed | -| br | black_reverse | -| bbl | black_blink | -| bst | black_strike | -| ligr | light_gray | -| ligrb | light_gray_bold | -| ligru | light_gray_underline | -| ligri | light_gray_italic | -| ligrd | light_gray_dimmed | -| ligrr | light_gray_reverse | -| ligrbl | light_gray_blink | -| ligrst | light_gray_strike | -| y | yellow | -| yb | yellow_bold | -| yu | yellow_underline | -| yi | yellow_italic | -| yd | yellow_dimmed | -| yr | yellow_reverse | -| ybl | yellow_blink | -| yst | yellow_strike | -| ly | light_yellow | -| lyb | light_yellow_bold | -| lyu | light_yellow_underline | -| lyi | light_yellow_italic | -| lyd | light_yellow_dimmed | -| lyr | light_yellow_reverse | -| lybl | light_yellow_blink | -| lyst | light_yellow_strike | -| p | purple | -| pb | purple_bold | -| pu | purple_underline | -| pi | purple_italic | -| pd | purple_dimmed | -| pr | purple_reverse | -| pbl | purple_blink | -| pst | purple_strike | -| lp | light_purple | -| lpb | light_purple_bold | -| lpu | light_purple_underline | -| lpi | light_purple_italic | -| lpd | light_purple_dimmed | -| lpr | light_purple_reverse | -| lpbl | light_purple_blink | -| lpst | light_purple_strike | -| c | cyan | -| cb | cyan_bold | -| cu | cyan_underline | -| ci | cyan_italic | -| cd | cyan_dimmed | -| cr | cyan_reverse | -| cbl | cyan_blink | -| cst | cyan_strike | -| lc | light_cyan | -| lcb | light_cyan_bold | -| lcu | light_cyan_underline | -| lci | light_cyan_italic | -| lcd | light_cyan_dimmed | -| lcr | light_cyan_reverse | -| lcbl | light_cyan_blink | -| lcst | light_cyan_strike | -| w | white | -| wb | white_bold | -| wu | white_underline | -| wi | white_italic | -| wd | white_dimmed | -| wr | white_reverse | -| wbl | white_blink | -| wst | white_strike | -| dgr | dark_gray | -| dgrb | dark_gray_bold | -| dgru | dark_gray_underline | -| dgri | dark_gray_italic | -| dgrd | dark_gray_dimmed | -| dgrr | dark_gray_reverse | -| dgrbl | dark_gray_blink | -| dgrst | dark_gray_strike | - -### `"#hex"` Format - ---- - -Das "#hex" Format ist gebräuchlich um Farben zu repräsentieren. Es besteht immer aus dem `#` gefolgt von 6 Zeichen. -Die ersten zwei sind für `rot`, die nächsten zwei für `grün` und die letzten zwei für `blau`. Es ist wichtig, dass dieser Text mit -Anführungszeichen geschrieben wird, damit Nushell es nicht für einen Kommentar hält. - -Beispiel: Die primäre Farbe `rot` ist `"#ff0000"` oder `"#FF0000"`. Gross- und Kleinschreibung sollten hier keine Rolle spielen. - -Dieses `"#hex"` Format erlaubt es, 24-bit Echtfarben für verschiedene Bereiche von Nushell zu spezifizieren. - -## `Volles "#hex"` Format - ---- - -Das `volle "#hex"` Format ist eine Interpretation des `"#hex"` Formats, welches den Vordergrund, Hintergrund und Attribute in einer Zeile spezifizieren kann. - -Beispiel: `{ fg: "#ff0000" bg: "#0000ff" attr: b }` - -- Vordergrund rot in "#hex" format -- Hiuntergund blau in "#hex" format -- Attribute in fetter Schrift als Abkürzung spezifiziert - -## `Primitive Typen` - ---- - -Werte primitiver Typen sind z.B. `int` und `string`. Primitive Typen und Formen können ebenfalls mit verschiedenster Farben symbolisiert werden. - -Hier die aktuelle Liste von Primitiven Typen. Nicht alle davon sind konfigurierbar. Die konfigurierbaren sind mit \* markiert. - -| primitive | default color | configurable | -| ------------ | --------------------- | ------------ | -| `any` | | | -| `binary` | Color::White.normal() | \* | -| `block` | Color::White.normal() | \* | -| `bool` | Color::White.normal() | \* | -| `cellpath` | Color::White.normal() | \* | -| `condition` | | | -| `custom` | | | -| `date` | Color::White.normal() | \* | -| `duration` | Color::White.normal() | \* | -| `expression` | | | -| `filesize` | Color::White.normal() | \* | -| `float` | Color::White.normal() | \* | -| `glob` | | | -| `import` | | | -| `int` | Color::White.normal() | \* | -| `list` | Color::White.normal() | \* | -| `nothing` | Color::White.normal() | \* | -| `number` | | | -| `operator` | | | -| `path` | | | -| `range` | Color::White.normal() | \* | -| `record` | Color::White.normal() | \* | -| `signature` | | | -| `string` | Color::White.normal() | \* | -| `table` | | | -| `var` | | | -| `vardecl` | | | -| `variable` | | | - -#### Spezielle "primitives" (keine wirklichen Primitiven Typen, denn sie existieren nur für die Farbgebung) - -| primitive | default color | configurable | -| --------------------------- | -------------------------- | ------------ | -| `leading_trailing_space_bg` | Color::Rgb(128, 128, 128)) | \* | -| `header` | Color::Green.bold() | \* | -| `empty` | Color::Blue.normal() | \* | -| `row_index` | Color::Green.bold() | \* | -| `hints` | Color::DarkGray.normal() | \* | - -Hier ein kleines Beispiel, wie diese Werte angewendet werden können. - -```nu -> let config = { - color_config: { - separator: purple - leading_trailing_space_bg: "#ffffff" - header: gb - date: wd - filesize: c - row_index: cb - bool: red - int: green - duration: blue_bold - range: purple - float: red - string: white - nothing: red - binary: red - cellpath: cyan - hints: dark_gray - } -} -``` - -Hier ein anderes Beispiel, welches mehrere Farben Schreibweisen sowie Kommentare verwendet. - -```nu -> let config = { - color_config: { - separator: "#88b719" # Dies setzt nur die Vordergrundsfarbe wie in PR #486 - leading_trailing_space_bg: white # Dies setzt nur die Vordergrundsfarbe im ursprünglichen Stil - header: { # Analog PR #489 - fg: "#B01455", # Hinweis, Bei Werten mit hex Farben, werden Anführungszeichen benötigt - bg: "#ffb900",# Hinweis, Kommas werden nicht benötigt, es könnte auch alles auf eine Zeile passen - attr: bli # Hinweis, Um diesen Wert sind keine Anführungszeichen, hier geht es auch ohne - } - date: "#75507B" - filesize: "#729fcf" - row_index: { - # Hinweis, Dies ist eine andere Möglichkeit, nur den Vordergrund anzugeben, ohne Angabe von bg oder attr - fg: "#e50914" - } - } -} -``` - -## `Formen` Werte - -Wie oben bereits erwähnt, ist `Formen` oder `shapes` ein Begriff, der angibt, wie Syntax eingefärbt wird. - -Hier die aktuelle Formen Liste. - -| shape | default style | configurable | -| ---------------------------- | -------------------------------------- | ------------ | -| `shape_block` | fg(Color::Blue).bold() | \* | -| `shape_bool` | fg(Color::LightCyan) | \* | -| `shape_custom` | bold() | \* | -| `shape_external` | fg(Color::Cyan) | \* | -| `shape_externalarg` | fg(Color::Green).bold() | \* | -| `shape_filepath` | fg(Color::Cyan) | \* | -| `shape_flag` | fg(Color::Blue).bold() | \* | -| `shape_float` | fg(Color::Purple).bold() | \* | -| `shape_garbage` | fg(Color::White).on(Color::Red).bold() | \* | -| `shape_globpattern` | fg(Color::Cyan).bold() | \* | -| `shape_int` | fg(Color::Purple).bold() | \* | -| `shape_internalcall` | fg(Color::Cyan).bold() | \* | -| `shape_list` | fg(Color::Cyan).bold() | \* | -| `shape_literal` | fg(Color::Blue) | \* | -| `shape_nothing` | fg(Color::LightCyan) | \* | -| `shape_operator` | fg(Color::Yellow) | \* | -| `shape_range` | fg(Color::Yellow).bold() | \* | -| `shape_record` | fg(Color::Cyan).bold() | \* | -| `shape_signature` | fg(Color::Green).bold() | \* | -| `shape_string` | fg(Color::Green) | \* | -| `shape_string_interpolation` | fg(Color::Cyan).bold() | \* | -| `shape_table` | fg(Color::Blue).bold() | \* | -| `shape_variable` | fg(Color::Purple) | \* | - -Hier ein kleines Beispiel wie Farben auf diese Teile angewendet werden. Was nicht spezifiziert wird, erhält die Standardfarbe. - -```nu -> $env.config = { - color_config: { - shape_garbage: { fg: "#FFFFFF" bg: "#FF0000" attr: b} - shape_bool: green - shape_int: { fg: "#0000ff" attr: b} - } -} -``` - -## `Prompt` Konfiguration und Farbgebung - -Der Nushell Prompt ist konfigurierbar mit diesen Umgebungsvariablen: - -- `PROMPT_COMMAND`: Code der ausgeführt wird beim Aufsetzen des Prompts (Block) -- `PROMPT_COMMAND_RIGHT`: Code um die rechte Seite, _RIGHT_ prompt (Block), auf zu setzen. (Siehe auch oh-my.nu in nu_scripts) -- `PROMPT_INDICATOR` = "〉": Der Indikator, welcher nach dem Prompt ausgegeben wird (Standardmässig das ">" Unicode Symbol) -- `PROMPT_INDICATOR_VI_INSERT` = ": " -- `PROMPT_INDICATOR_VI_NORMAL` = "v " -- `PROMPT_MULTILINE_INDICATOR` = "::: " - -Beispiel: Für einen einfachen Prompt wäre folgendes mögllich. Hinweis `PROMPT_COMMAND` benötigt einen `block` wogegen die anderen einen `string` erwarten. - -```nu -> $env.PROMPT_COMMAND = { build-string (date now | format date '%m/%d/%Y %I:%M:%S%.3f') ': ' (pwd | path basename) } -``` - -Soll der standard `PROMPT_INDICATOR` geändert werden, sieht das so aus. - -```nu -> $env.PROMPT_INDICATOR = "> " -``` - -Den Prompt einfärben wird duch den `block` `PROMPT_COMMAND` kontrolliert und individualisiert. -In [nu_scripts repo](https://github.com/nushell/nu_scripts/blob/main/prompt/oh-my.nu) wurde ein recht ausgefallener geschrieben, welcher den git Status darstellt. - -## `LS_COLORS` Farben für den `ls` Befehl - -Nushell wird die Umgebungsvariable `LS_COLORS` auf Linu, Mac und Windows respektieren. -Diese Einstellung erlaubt es Farben anhand ihres Dateityps zu definieren, wenn ein [`ls`](commands/ls.md) ausgeführt wird. -Zum Beispiel können Verzeichnisse in einer Farbe, _.md Markdown Dateien in einer anderen Farbe, _.toml Dateien in einer dritten Farbe usw. dargestellt werden. - -Es gibt verschiedenste Wege um Dateitypen ein zu färben. - -[Hier](https://github.com/trapd00r/LS_COLORS) findet sich eine ausführliche Liste, welche ein rudimentäres Verständnis bietet, wie eine ls_colors Datei -ein `dircolors` in eine `LS_COLORS` Umgebungsvariable überführt. - -[Dies](https://www.linuxhowto.net/how-to-set-colors-for-ls-command/) ist eine sehr gute Einführung in `LS_COLORS`. -Es finden sich sicher noch viele mehr im Internet. - -Freunde der `vivid` Anwendung finden Informationen [hier](https://github.com/sharkdp/vivid). Die Konfiguration in `config.nu` erfolgt so: - -`$env.LS_COLORS = (vivid generate molokai | str trim)` - -Ist `LS_COLORS` nicht gesetzt, wird Nushell auf die eingebaute `LS_COLORS` Einstellung zurückgreifen, welche auf den erweiterten 8-bit ANSI Farben aufbaut. - -## Theming - -Theming kombiniert all die eben beschriebene Farbgebung. Hier ein einfaches Beispiel, welches die Fähigkeiten des Themings demonstriert. -Dies ist nur ein Ausschnitt der `base16` Themes, welche im Internet weit verbreitet sind. - -Entscheidend damit Theming funktioniert ist, dass alle Farben und Themen in der `config.nu` definiert werden _bevor_ die `let config =` Zeile definiert wird. - -```nu -# Definition von einigen Farben - -let base00 = "#181818" # Standard Hinergrund -let base01 = "#282828" # Heller Hintergrund (Verwendet für Status Bar, Linien Nummern und Faltmarken) -let base02 = "#383838" # Auswahl Hintergrund -let base03 = "#585858" # Kommentare, Verstecktes, Zeilen Hervorhebungen -let base04 = "#b8b8b8" # Dunkler Vordergrund (Für Status Bars) -let base05 = "#d8d8d8" # Standard Vordergrund, Einfügebarken, Trennzeichen, Operatoren -let base06 = "#e8e8e8" # Heller Vordergrund (Nicht oft verwendet) -let base07 = "#f8f8f8" # Heller Hintergrund (Nicht oft verwendet) -let base08 = "#ab4642" # Variablen, XML Tags, Markup Link Text, Markup Listen, Diff gelöscht -let base09 = "#dc9656" # Ganzzahlen, Boolean, Konstanten, XML Attribute, Markup Link Url -let base0a = "#f7ca88" # Klassen, Markup fett, Such-Text Hintergrund -let base0b = "#a1b56c" # Strings, vererbte Klasse, Markup Code, Diff eingefügt -let base0c = "#86c1b9" # Support, Reguläre Ausdrücke, Escape Zeichen, Markup Quotes -let base0d = "#7cafc2" # Funktionen, Methoden, Attribut IDs, Überschriften -let base0e = "#ba8baf" # Keywörter, Speicher, Selectoren, Markup Italic, Diff geändert -let base0f = "#a16946" # Veraltet, Öffnende/Schliessende eingebettete Sprach Tags, z.B. - -# und nund wird das Theme mit diesen Farbdefinitionen erstellt. - -let base16_theme = { - separator: $base03 - leading_trailing_space_bg: $base04 - header: $base0b - date: $base0e - filesize: $base0d - row_index: $base0c - bool: $base08 - int: $base0b - duration: $base08 - range: $base08 - float: $base08 - string: $base04 - nothing: $base08 - binary: $base08 - cellpath: $base08 - hints: dark_gray - - # shape_garbage: { fg: $base07 bg: $base08 attr: b} # base16 white on red - # but i like the regular white on red for parse errors - shape_garbage: { fg: "#FFFFFF" bg: "#FF0000" attr: b} - shape_bool: $base0d - shape_int: { fg: $base0e attr: b} - shape_float: { fg: $base0e attr: b} - shape_range: { fg: $base0a attr: b} - shape_internalcall: { fg: $base0c attr: b} - shape_external: $base0c - shape_externalarg: { fg: $base0b attr: b} - shape_literal: $base0d - shape_operator: $base0a - shape_signature: { fg: $base0b attr: b} - shape_string: $base0b - shape_filepath: $base0d - shape_globpattern: { fg: $base0d attr: b} - shape_variable: $base0e - shape_flag: { fg: $base0d attr: b} - shape_custom: {attr: b} -} - -# nun werden die regulären Konfigurations Einstellungen sowie das "color_config:" Theme angewendet. - -let config = { - filesize_metric: true - table_mode: rounded # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other - use_ls_colors: true - color_config: $base16_theme # <-- this is the theme - use_grid_icons: true - footer_mode: always #always, never, number_of_rows, auto - animate_prompt: false - float_precision: 2 - use_ansi_coloring: true - filesize_format: "b" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, auto - edit_mode: emacs # vi - max_history_size: 10000 - log_level: error -} -``` - -Wer in Sachen Theming aufs ganze gehen will, will bestimmt alle Parameter von LS_COLORS und den Prompt konfigurieren, viel Glück! diff --git a/de/book/coming_from_bash.md b/de/book/coming_from_bash.md deleted file mode 100644 index 5988fc381f3..00000000000 --- a/de/book/coming_from_bash.md +++ /dev/null @@ -1,51 +0,0 @@ -# Vergleich zu Bash - -Hinweis: Diese Tabelle geht von Nu 0.59 oder neuer aus. - -| Bash | Nu | Funktion | -| ------------------------------------ | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- | -| `ls` | `ls` | Auflisten der Dateien des aktuellen Pfads | -| `ls ` | `ls ` | Auflisten der Dateien am angegebenen Pfad | -| `ls pattern*` | `ls pattern*` | Auflisten von Dateien, die dem gegebenen Schema/Pattern folgen | -| `ls -la` | `ls --long --all` or `ls -la` | Auflisten aller Dateien (inklusive versteckte) mit allen verfügbaren Informationen | -| `ls -d */` | `ls \| where type == Dir` | Auflisten von Ordnern | -| `find . -name *.rs` | `ls **/*.rs` | Rekursives auflisten aller Dateien, die zum gegebenen Schema/Pattern passen | -| `cd ` | `cd ` | Wechseln an den angegebenen Pfad | -| `cd` | `cd` | Wechseln in den HOME-Ordner | -| `cd -` | `cd -` | Wechseln an den vorherigen Pfad | -| `mkdir ` | `mkdir ` | Erzeugen des angegebenen Pfads | -| `mkdir -p ` | `mkdir ` | Erzeugen des angegebenen Pfads und weiterer Ordner wenn nötig | -| `touch test.txt` | `touch test.txt` | Erstellen einer Datei | -| `> ` | `\| save ` | Speichern eines String in eine Datei | -| `>> ` | `\| save --append ` | Anhängen eines Strings an eine Datei | -| `cat ` | `open --raw ` | Einlesen des Inhalts der angegebenen Datei (in Textform) | -| | `open ` | Einlesen einer Datei in Form von strukturierten Daten | -| `mv ` | `mv ` | Bewegen einer Datei an einen neuen Ort | -| `cp ` | `cp ` | Kopieren einer Datei an einen Ort | -| `cp -r ` | `cp -r ` | Kopieren eines Ordners an einen Ort (rekursiv) | -| `rm ` | `rm ` | Entfernen der angegebenen Datei | -| | `rm -t ` | Angegebene Datei in den Papierkorb des Systems werfen | -| `rm -rf ` | `rm -r ` | Entfernen des angegebenen Pfads rekursiv | -| `chmod` | `` | Ändern von Dateiattributen | -| `date -d ` | `"" \| into datetime -f ` | Datum ausgeben ([Dokumentation des Formats](https://docs.rs/chrono/0.4.15/chrono/format/strftime/index.html)) | -| `sed` | `str find-replace` | Suchen und ersetzen eines Pattern in einem String | -| `grep ` | `where $it =~ ` or `find ` | Filtern von Strings die den Substring beinhalten | -| `man ` | `help ` | Hilfe zu einem Befehl ansehen | -| | `help commands` | Alle verfügbaren Befehle anzeigen | -| | `help --find ` | Nach einem Text in allen verfügbaren Befehlen suchen | -| `command1 && command2` | `command1; command2` | Ausführen eines Befehls und wenn Ausführung erfolgreich wird ein weiterer Befehl ausgeführt | -| `stat $(which git)` | `stat (which git).path` | Ausgabe eines Befehls als Eingabe für einen anderen Befehl verwenden | -| `echo $PATH` | `echo $env.PATH` | Aktuelle PATH-Variable anzeigen | -| `` | `vim $nu.config-path` | PATH permanent ändern | -| `export PATH = $PATH:/usr/other/bin` | `$env.PATH = ($env.PATH \| append /usr/other/bin)` | PATH temporär ändern | -| `export` | `echo $env` | Anzeigen der aktuellen Umgebungsvariablen | -| `` | `vim $nu.config-path` | Umgebungsvariablen permanent ändern | -| `FOO=BAR ./bin` | `FOO=BAR ./bin` | Umgebungsvariablen temporär ändern | -| `export FOO=BAR` | `$env.FOO = BAR` | Umgebungsvariable für aktuelle Sitzung setzen | -| `echo $FOO` | `echo $env.FOO` | Umgebungsvariablen nutzen | -| `unset FOO` | `hide FOO` | Umgebungsvariable für aktuelle Sitzung verbergen | -| `alias s="git status -sb"` | `alias s = git status -sb` | Alias temporär definieren | -| `` | `vim $nu.config-path` | Alias permanent hinzufügen und ändern (für neue Shells) | -| `bash -c ` | `nu -c ` | Ausführen einer Pipeline an Befehlen (benötigt 0.9.1 oder neuer) | -| `bash - - - - - - - - - - -
CommandBeschreibung
{{ command.title }}{{ command.frontmatter.usage }}
diff --git a/de/book/command_signature.md b/de/book/command_signature.md deleted file mode 100644 index d01e1afdbfc..00000000000 --- a/de/book/command_signature.md +++ /dev/null @@ -1,23 +0,0 @@ -# Befehls Signatur - -Nu Befehle enthalten einen Signatur Abschnitt. Zum Beispiel wie hier in [`str distance`](/commands/docs/str_distance.md): - -``` -Signatures(Cell paths are supported): - | str distance -> -``` - -Der erste Typenname vor dem `|` beschreibt den Typ der Eingangs-Pipeline. Nach dem Befehlsnamen folgt der benötigte Arguments Typ. Der Output-Typ ist in diesem Falle `int` und wird nach dem `->` ausgegeben. -`(Cell paths are supported)` zeigt an, dass Zell Pfade angegeben werden können für `str distance`. So kann in einer verschachtelten Struktur oder Tabelle einem Zell Pfad eine Operation hinzugefügt und wie hier der Spaltenname ersetzt werden: `ls | str distance 'nushell' 'name'` - -Hier ein weiteres Beispiel, [`str join`](/commands/docs/str_join.md): - -``` -Signatures: - list | str join -> -``` - -Hier bedeutet die Signatur von [`str join`](/commands/docs/str_join.md), dass eine Liste von Texten als Eingang erwartet wird. Der Befehl nimmt ausserdem optionale `string` Typ Argumente entgegen. Schliesslich wird ein `string` als Output generiert. - -Einige Befehle akzeptieren oder benötigen keine Daten in einer Pipeline, weshalb ihr Input-Typ `` sein wird. -Dies gilt auch, wenn der Output Typ `null` zurückgiebt (e.g. [`rm`](/commands/docs/rm.md)). diff --git a/de/book/configuration.md b/de/book/configuration.md deleted file mode 100644 index 2748bdac60d..00000000000 --- a/de/book/configuration.md +++ /dev/null @@ -1,105 +0,0 @@ -# Konfiguration - -## Nushell Konfiguration mittels `config.nu` - -Nushell nutzt ein Konfigurationssystem, das ein Nushell-Skript beim Start ausführt. Die Konfigurationsdatei wird für Nushell `config.nu` genannt. Der Pfad zu dieser Konfigurationsdatei kann durch den Aufruf von `echo $nu.config-path` herausgefunden werden. Es handelt sich dabei um eine Datei, die abgearbeitet wird und in jedem Schritt Definitionen, Umgebungsvariablen und mehr zum globalen Namespace hinzufügt. - -Ein Beispiel für eine Nushell `config.nu` kann [hier](https://github.com/nushell/nushell/blob/main/crates/nu-utils/src/sample_config/default_config.nu) in unserem Repository gefunden werden. - -### `$config` konfigurieren - -Die zentralen Konfigurationen von Nushell sind in der globalen `$config` Variable festgehalten. Dieser Eintrag kann wie folgt erstellt werden: - -``` -$env.config = { - ... -} -``` - -Es ist auch möglich `$config` zu überschreiben und zu ändern: - -``` -$env.config = ($config | update ) -``` - -### Umgebung - -Die Shell-Umgebung kann durch Aufrufe von `let-env` in der `config.nu`-Datei geändert werden. Es gibt einige wichtige Nushell-spezifischen Einstellungen: - -- `LS_COLORS`: Setzt die Farben für Dateitypen in ls -- `PROMPT_COMMAND`: Befehle, die ausgeführt werden, um die Prompt zu erzeugen (Block oder String) -- `PROMPT_COMMAND_RIGHT`: Befehle, die ausgeführt werden, um die Prompt zu erzeugen (Block) -- `PROMPT_INDICATOR = "〉"`: Indikator, der der Prompt folgt (default: ">"-like Unicode symbol) -- `PROMPT_INDICATOR_VI_INSERT = ": "` -- `PROMPT_INDICATOR_VI_NORMAL = "〉 "` -- `PROMPT_MULTILINE_INDICATOR = "::: "` - -### Farbkonfiguration - -Mehr Informationen zu Farbeinstellungen und Themes kann im [entsprechenden Kapitel](/book/coloring_and_theming.md) gefunden werden. - -## Nushell als Login-Shell - -Um Nushell als Login-Shell zu verwenden, muss die `$env` Variable konfiguriert werden, damit es möglich ist, externe Befehle als Login-Shell auszuführen. - -Der komplette Satz an Umgebungsvariablen kann erzeugt werden, wenn Nu in einer anderen Shell, wie beispielsweise Bash, ausgeführt wird. In diese Nu-Sitzung kann ein Befehl wie der folgende verwendet werden, um `$env` zu setzen: - -``` -> env | each { echo $"$env.($it.name) = '($it.raw)'" } | str join (char nl) -``` - -Das gibt Zeilen aus um `$env` in `env.nu` zu setzen - eine für jede Umgebungsvariable - inklusive der nötigen Werte. - -Als nächstes, muss auf manchen Distributionen sichergestellt werden, dass Nu in der Liste der Shells in /etc/shells ist: - -``` -> cat /etc/shells -# /etc/shells: valid login shells -/bin/sh -/bin/dash -/bin/bash -/bin/rbash -/usr/bin/screen -/usr/bin/fish -/home/jonathan/.cargo/bin/nu -``` - -Damit sollte es möglich sein, Nu als Login-Shell mit `chsh` festzulegen. Nach dem Ausloggen und erneutem Einloggen sollte Nu als Shell grüßen. - -### Konfiguration mittels `login.nu` - -Wenn Nushell als Login-Shell benutzt wird, kann eine spezifische Konfigurationsdatei angelegt werden, die nur in diesem Fall ausgelesen wird. Hierfür muss eine Datei namens `login.nu` im Standard-Konfigurationsverzeichnis abgelegt sein. - -Die Datei `login.nu` wird nach `env.nu` und `config.nu` eingelesen, so dass diese Konfigurationen überschrieben werden können. - -Der Pfad zu dieser Konfigurationsdatei steht in `$nu.loginshell-path`. - -### macOS: `/usr/bin/open` als `open` behalten - -Manche Tools (z.B. Emacs) vertrauen darauf, dass `open` Dateien auf dem Mac öffnet. -Da Nushell einen eigenen `open` Befehl hat, der eine andere Semantik hat und `/usr/bin/open` verbirgt, werden diese Tools einen Fehler werfen, wenn sie verwendet werden. -Eine Möglichkeit, dieses Problem zu umgehen, ist es, einen eigenen Befehl und einen `alias` in `config.nu` zu definieren: - -``` -def nuopen [arg, --raw (-r)] { if $raw { open -r $arg } else { open $arg } } -alias open = ^open -``` - -## Konfiguration der Prompt - -Die Konfiguration der Prompt wird durch das Setzen der Umgebungsvariable `PROMPT_COMMAND` bzw. `PROMPT_COMMAND_RIGHT` durchgeführt. -Diese akzeptieren entweder einen String oder einen Codeblock der ausgeführt wird. - -``` -$env.PROMPT_COMMAND = "Hallo Nu" # Die Hauptprompt auf einen festen String setzen -$env.PROMPT_COMMAND_RIGHT = {pwd} # Den rechte Promptteil mit dem aktuellen Verzeichnis anzeigen -``` - -Darüber hinaus wird als Markierung ein Promptindikator gesetzt, welcher den aktuellen Modus oder einen Zeilenumbruch anzeigt: - -- `PROMPT_INDICATOR = "〉"`: Indikator, der der Prompt folgt (default: ">"-like Unicode symbol) -- `PROMPT_INDICATOR_VI_INSERT = ": "` -- `PROMPT_INDICATOR_VI_NORMAL = "〉 "` -- `PROMPT_MULTILINE_INDICATOR = "::: "` - -Mehr Dokumentation zu fertigen Prompts von Drittanbietern kann [hier](3rdpartyprompts.md) gefunden werden. diff --git a/de/book/custom_commands.md b/de/book/custom_commands.md deleted file mode 100644 index 61e8da6258b..00000000000 --- a/de/book/custom_commands.md +++ /dev/null @@ -1,285 +0,0 @@ -# Eigene Befehle - -Die Fähigkeit von Nu, lange Pipelines zu verarbeiten, erlauben es große Kontrolle über Daten und das System zu haben. Das Ganze kommt allerdings zum Preis von viel Tipparbeit. Idealerweise sollte es eine Möglichkeit geben, mühsam gebaute Pipelines zu speichern und wieder und wieder auszuführen. - -Hier kommen eigene Befehle ins Spiel. - -Eine beispielhafte Definition eines eigenen Befehls sieht wie folgt aus: - -```nushell -def greet [name] { - echo "hello" $name -} -``` - -In dieser Definition, wird ein Befehl `greet` beschrieben, der einen Parameter `name` konsumiert. Nach diesem Parameter erfolgt die Beschreibung was passiert, wenn der Befehl ausgeführt wird. Wenn der Befehl aufgerufen wird, wird der Wert, der als Parameter `name` übergeben wurde, in die Variable `$name` geschrieben, die im Codeblock verfügbar ist. - -Um den obigen Befehl auszuführen wird er wie ein eingebauter Befehl aufgerufen: - -``` -> greet "world" -``` - -Wenn das getan wird, wird eine Ausgabe erzeugt, die wie die der eingebauten Befehle aussieht: - -``` -───┬─────── - 0 │ hello - 1 │ world -───┴─────── -``` - -## Namen von Befehlen - -In Nushell ist ein valider Name eines Befehls ein String aus Zeichen oder ein String in Anführungszeichen. Beispiele hierfür sind: `greet`, `get-size`, `mycommand123`, `"mycommand"`, `😊` und `123`. - -_Hinweis: Es wird empfohlen Worte in Befehlen mit `-` zur besseren Lesbarkeit zu trennen._ Beispiele: `get-size` anstatt `getsize` oder `get_size`. - -## Unterbefehle - -Es ist auch möglich Unterbefehle zu definieren. Dazu wird der Unterbefehl vom Superbefehl durch ein Leerzeichen getrennt. Wenn beispielsweise der Befehl `str` durch einen Unterbefehl `mycommand` erweitert werden soll, funktioniert das wie folgt: - -```nushell -def "str mycommand" [] { - echo hello -} -``` - -Jetzt kann der eigene Unterbefehl aufgerufen werden, als ob er ein eingebauter Befehl von `str` wäre: - -``` -> str mycommand -``` - -## Typen von Parametern - -Wenn eigene Befehle definiert werden, kann optional auch der Typ jedes Parameters angegeben werden. Das obige Beispiel kann beispielsweise wie folgt abgeändert werden: - -```nushell -def greet [name: string] { - echo "hello" $name -} -``` - -Die Typen der Parameter anzugeben ist optional. Nushell erlaubt es diese wegzulassen und behandelt diese dann als Typ `any`. Es kann also jede Art von Typ verarbeitet werden. Wenn ein Typ angegeben wurde, überprüft Nushell den Typ, wenn die Funktion aufgerufen wird. - -Beispielhaft soll nur noch ein `int` als Typ erlaubt sein: - -```nushell -def greet [name: int] { - echo "hello" $name -} - -greet world -``` - -Wenn versucht wird, den oberen Code auszuführen, wird Nu darauf aufmerksam machen, dass die Typen nicht passen und die Ausführung stoppen: - -``` -error: Type Error - ┌─ shell:6:7 - │ -5 │ greet world - │ ^^^^^ Expected int, found world -``` - -Dies kann dabei helfen Nutzer darauf aufmerksam zu machen, welche Art von Typ erlaubt ist. - -Die aktuell erlaubten Typen sind (mit Version 0.65.0 und neuer): - -- `any` -- `block` -- `cell-path` -- `duration` -- `path` -- `expr` -- `filesize` -- `glob` -- `int` -- `math` -- `number` -- `operator` -- `range` -- `cond` -- `bool` -- `signature` -- `string` -- `variable` -- `record` -- `list` -- `table` -- `error` - -## Flags - -Zusätzlich zu den obigen Parametern, können auch namenabhängige Parameter verwendet werden, indem Flags für eigene Befehle definiert werden. - -Zum Beispiel: - -```nushell -def greet [ - name: string - --age: int -] { - echo $name $age -} -``` - -In der obigen Definition von `greet`, werden ein fester Parameter `name` und eine Flag `age` definiert. Damit ist es möglich, dem Befehl `greet` optional den Parameter `age` zu übergeben. - -Das obige Beispiel kann wie folgt aufgerufen werden: - -``` -> greet world --age 10 -``` - -Oder: - -``` -> greet --age 10 world -``` - -Oder gleich ganz ohne Flag: - -``` -> greet world -``` - -Flags können auch so definiert werden, dass es eine Kurzform gibt. Das erlaubt es sowohl eine kurze als auch eine einfach lesbare lange Flag für die selbe Aufgabe zu haben. - -Das Beispiel wird hier, um eine Kurzform für die Flag `age` erweitert: - -```nushell -def greet [ - name: string - --age (-a): int -] { - echo $name $age -} -``` - -_Hinweis:_ Flags sind benannt nach der langen Form des Namens. Im obigen Beispiel erfolgt der Zugriff immer über `$age` und nicht über `$a`. - -Nun kann diese neue Version von `greet` wie folgt aufgerufen werden: - -``` -> greet -a 10 hello -``` - -## Dokumentation für den eigenen Befehl - -Um Nutzern eines eigenen Befehls zu helfen, können diese und ihre Parameter mit zusätzlichen Beschreibungen versehen werden. - -Es wird weiterhin das obige Beispiel verwendet: - -```nushell -def greet [ - name: string - --age (-a): int -] { - echo $name $age -} -``` - -Wenn der Befehl definiert ist kann `help greet` aufgerufen werden, um Informationen zum Befehl zu erhalten: - -``` -Usage: - > greet {flags} - -Parameters: - - -Flags: - -h, --help: Display this help message - -a, --age -``` - -Wie zu sehen ist, werden der Parameter und die Flag, die definiert wurden, aufgelistet. Zusätzlich gibt es noch die Flag `-h`, die jeder Befehl hat. - -Um diese Hilfe zu verbessern, können Beschreibungen zur Definition hinzugefügt werden: - -```nushell -# A greeting command that can greet the caller -def greet [ - name: string # The name of the person to greet - --age (-a): int # The age of the person -] { - echo $name $age -} -``` - -Diese Kommentare, die zur Definition und den Parametern hinzugefügt wurden, werden sichtbar, wenn die Hilfe zum Befehl aufgerufen wird. - -Wenn jetzt `help greet` ausgeführt wird, wird ein hilfreicherer Text angezeigt: - -``` -A greeting command that can greet the caller - -Usage: - > greet {flags} - -Parameters: - The name of the person to greet - -Flags: - -h, --help: Display this help message - -a, --age : The age of the person -``` - -## Ausgabe - -Eigene Befehle streamen ihre Ausgabe gleich wie eingebaute Befehle. Beispielsweise soll die folgende Pipeline umgebaut werden: - -```nushell -> ls | get name -``` - -`ls` soll jetzt in einen neuen, eigenen Befehl verschoben werden: - -```nushell -def my-ls [] { ls } -``` - -Die Ausgabe dieses Befehls, kann identisch zur Ausgabe von `ls` verwendet werden. - -```nu -> my-ls | get name -───┬─────────────────────── - 0 │ myscript.nu - 1 │ myscript2.nu - 2 │ welcome_to_nushell.md -───┴─────────────────────── -``` - -Das erlaubt es sehr einfach eigene Befehle zu definieren und deren Ausgabe zu verwenden. Ein Hinweis: Es werden keine return Statements wie in anderen Sprachen verwendet. Stattdessen werden in Nushell Pipelines gebaut, die ihre Ausgabe zur verbundenen Pipeline streamen. - -## Eingabe - -Eigene Befehle können, wie andere Befehle, auch Eingaben verarbeiten. Diese Eingabe wird durch die Pipeline an den Codeblock des eigenen Befehls übergeben. - -Hier soll nun beispielhaft ein eigener echo-Befehl definiert werden, der eine weitere Zeile nach jeder Zeile der Eingabe ausgibt: - -```nushell -def my-echo [] { - each { - echo $it "--" - } -} -``` - -Wenn dieser neue Befehl nun in einer Pipeline aufgerufen wird, sieht die Ausgabe wie folgt aus: - -``` -> echo foo bar | my-echo -───┬───── - 0 │ foo - 1 │ -- - 2 │ bar - 3 │ -- -───┴───── -``` - -## Persistenz - -Um Informationen darüber zu erhalten, wie eigene Befehle bei jedem Start von Nushell verfügbar bleiben, sei auf das [Konfigurationskapitel](configuration.md) verwiesen. diff --git a/de/book/custom_completions.md b/de/book/custom_completions.md deleted file mode 100644 index 45d7ccb990f..00000000000 --- a/de/book/custom_completions.md +++ /dev/null @@ -1,177 +0,0 @@ -# Eigene Vervollständigungen - -Eigene Vervollständigungen kombinieren zwei Merkmale von Nushell: -Eigene Befehle und Vervollständigungen. Mit ihnen können Befehle erzeugt werden, -die Vervollständigungen für Positions- sowie Markierungs-Argumente enthalten. -Die eigenen Vervollständigungen funktionieren für eigene Befehle und [bekannt gemachte externe Befehle (via `extern`)](externs.md). - -Eigene Vervollständigungen bestehen aus zwei Teilen: -Dem Befehl, der die Vervollständigung bereitstellt, und die Verknüpfung mit dem Argument des Befehls, der die Vervollständigung bekommt, mit Hilfe von `@`. - -## Beispiel eigene Vervollständigung - -Hier ein Beispiel: - -``` -> def tiere [] { ["katze", "hund", "aal" ] } -> def my-command [tier: string@tiere] { print $tier } ->| my-command -katze hund aal -``` - -In der ersten Zeile wird ein eigener Befehl erstellt, der eine Liste von drei verschiedenen Tieren zurückgibt. -Dies sind die Werte, die in der Vervollständigung verwendent werden. Ist dieser Befehl erstellt, kann er für weitere Vervollständigungen von Befehlen und [`extern`](/commands/docs/extern.md) verwendet werden. - -In der zweiten Zeile, wird `string@tiere` verwendet. -Dies sagt Nushell zwei Dinge: -Die Form des Arguments um den Typ überprüfen zu können, sowie die Vervollständigung, falls der Benutzer diese an der Stelle verwenden möchte. - -Auf der dritten Zeile wird der Name des zu vevollständigenden Befehls `my-command` eingegeben gefolgt von der `` Taste. Dies führt die Vervollständigung aus. Eigene Vervollständigungen funktionieren identisch zu anderen Vervollständigungen. Wird `a` gefolgt von der `` Taste gedrückt, wird automatisch "aal" ausgegeben. - - -## Module und eigene Vervollständigung - -Es empfiehlt sich die eigenen Vervollständigungen von der öffentlichen API zu trennen. Dafür bieten sich Module an. - -Hier das Beispiel von oben in einem Modul: - -``` -module commands { - def tiere [] { - ["katze", "hund", "aal" ] - } - - export def my-command [tier: string@tiere] { - print $tier - } -} -``` - -In diesem Modul wird nur der Befehl `my-command`, aber nicht die Vervollständigung `tiere` exportiert. Dies erlaubt es den Befehl auszuführen, sowie die Vervollständigung zu verwenden, ohne auf die eigene Vervollständigung Zugriff zu haben. -Dies hält die API sauberer und bietet dennoch alle Funktionen an. - -Dies ist möglich, weil die Vervollständigungen mit dem Marker `@` zusammen mit dem Befehl eingeschlossen werden. - -## Kontextsensitive eigene Vervollständigungen - -Es ist möglich den Kontext einer Vervollständigung mit zu geben. Dies ist nützlich, wenn vorangehende Argumente in die Vervollständigung mit einbezogen werden müssen. - -Bezogen auf das obige Beispiel sieht dies so aus: - -``` -module commands { - def tiere [] { - ["katze", "hund", "aal" ] - } - - def tier-name [context: string] { - { - katze: ["Missy", "Phoebe"] - hund: ["Lulu", "Enzo"] - aal: ["Eww", "Slippy"] - } | get -i ($context | split words | last) - } - - export def my-command [ - tier: string@tiere - name: string@tier-name - ] { - print $"Als ($tier) heisse ich ($name)." - } -} -``` -Der Befehl `tier-name` gibt die entsprechende Liste der Namen zurück. Dies funktioniert, weil der Wert der `$context` Variablen, dem Text entspricht, der bis zu dem Zeitpunkt eingegeben wurde. - -``` ->| my-command -katze hund aal ->| my-command hund -Lulu Enzo ->my-command hund enzo -Als hund heisse ich Enzo -``` - -Auf der zweiten Zeile wird, sobald die `` Taste gedrückt wurde, das Argument `"my-command hund"` dem `tier-namen` Kontext übergeben. - -## Eigene Vervollständigungen und [`extern`](/commands/docs/extern.md) - -Sehr mächtig ist die Kombination von eigenen Vervollständigungen mit [externen Befehlen](externs.md). Diese funktionieren gleich wie die Vervollständigungen zu eigenen Befehlen: -Erstellen der Vervollständigung und anbinden an ein Positions- oder Markierungs-Argument des `extern` mit dem `@` Zeichen. - -In der Default Konfiguration finden sich ebenfalls Vervollständigungen: - -``` -export extern "git push" [ - remote?: string@"nu-complete git remotes", # the name of the remote - refspec?: string@"nu-complete git branches" # the branch / refspec - ... -] -``` - -Die Vervollständigung erfüllt hier die gleiche Rolle wie in den Beispielen zuvor. Es werden zwei verschiedene Vervollständigungen verwendet, abhängig von der Position, die bisher eingegeben wurde. - -## Eigene Beschreibungen - -Alternativ zu einer Liste von Strings, kann eine Vervollständigung auch einen Record aus einem `value` und einer `description` zurückgeben. - -``` -def my_commits [] { - [ - { value: "5c2464", description: "Add .gitignore" }, - { value: "f3a377", description: "Initial commit" } - ] -} -``` - -> **Notiz** -> -> Mit dem folgenden Schnippsel: -> -> ```nu -> def my-command [commit: string@my_commits] { -> print $commit -> } -> ``` -> -> aufgepasst, auch wenn die Vervollständigung folgendes zeigt -> -> ```nu -> >_ my-command -> 5c2464 Add .gitignore -> f3a377 Initial commit -> ``` -> -> nur die Werte, hier "5c2464" und "f3a377", werden in Befehls Argumenten verwendet! - -## Extere Vervollständigungen - -Externe Vervollständigungen können ebenfalls integriert werden, anstatt derer von Nushell. - -Dafür muss dem Feld `external_completer` in `config.nu` eine [closure](/book/types_of_data.md#closures)) übergeben werden, welche ausgewertet wird, wenn keine Nushell Vervollständigungen gefunden werden. - -```nu -> $env.config.completions.external = { -> enable: true -> max_results: 100 -> completer: $completer -> } -``` - -Die Closure kann konfiguriert werden, einen externen Vervollständiger wie [carapace](https://github.com/rsteube/carapace-bin) zu verwenden. - -Wenn die Closure einen nicht lesbaren Wert (z.B. einen leeren String) zurückgibt, fällt Nushell auf die Datei Vervollständigung zurück. - -Ein externer Vervollständiger ist eine Funktion, die den aktuellen Befehl als String Liste entgegennimmt, und eine Liste von Records mit `value` und `description` zurückgibt. Wie bei eigenen Nushell Vervollständigungen. - -> **Notiz** -> Diese Closure nimmt den aktuellen Befehl als Liste entgegen. Zum Beispiel, wird `my-command --arg1 ` als Vervollständigung `[my-command --arg1 " "]` erhalten. - -Dieses Beispiel wird die externe Vervollständigung für carapace erstellen: - -```nu -let carapace_completer = {|spans| - carapace $spans.0 nushell $spans | from json -} -``` - -[Mehr Beispiele für eigene Vervollständigungen können im Kochbuch gefunden werden](../cookbook/external_completers.md). diff --git a/de/book/environment.md b/de/book/environment.md deleted file mode 100644 index 3e40c657e98..00000000000 --- a/de/book/environment.md +++ /dev/null @@ -1,222 +0,0 @@ -# Environment - -Eine häufige Aufgabe in einer Shell ist die Kontrolle der Umgebung, in der die externen Programme laufen. Dies wird meist automatisch geschehen, -da die Umgebung dem externen programm mitgegeben wird, wenn es gestartet wird. Manchmal jedoch will man eine genauere Kontrolle darüber, -welche Umgebungsvariablen ein Programm sehen kann. - -Die aktuellen Umbegungsvariablen werden mit dem [`env`](/commands/docs/env.md) Befehl ausgegeben: - -``` - # name type value raw -────────────────────────────────────────────────────────────────────────────────────────── - 16 DISPLAY string :0 :0 - 17 EDITOR string nvim nvim - 28 LANG string en_US.UTF-8 en_US.UTF-8 - 35 PATH list [list 16 items] /path1:/path2:/... - 36 PROMPT_COMMAND block -``` - -In der Nushell können Umgebungsvariablen jeden Wert jeden Typs annehmen (siehe die`type` Spalte) -Der aktuelle Wert der Umgebungsvariable, den Nushell verwendet, findet sich unter `value`. -Die `$env` Variable kann direkt abgefragt werden, z.B. mit `$env.PATH | length`. -Die letzte Spalte `raw` beinhaltet den Wert, den ein externes Programm erhält (siehe [Environment variable conversions](#environment-variable-conversions)) - -Die Umgebung wird erstellt durch Nus [Konfigurations-Datei](configuration.md) und von der Umgebung, in der Nu gestartet wurde. - -## Setzen von Umgebungsvariablen - -Umgebungsvariablen werden als Felder der Variable `$env` gesetzt. - -Um die Umgebungsvariable `FOO` zu setzen kann direkt der Wert zu `$env.FOO` zugewiesen werden. - -``` -> $env.FOO = 'BAR' -``` - -Um zum Beispiel die `PATH` Variable zu ergänzen, wird folgendes eingegeben: - -``` -$env.PATH = ($env.PATH | prepend '/pfad/der/hinzu/kommt') -``` - -Mit `prepend` wird der Ordner an den Anfang von PATH gestellt und hat damit die höchste Priorität. -Soll der Pfad ans Ende angehängt werden, so wird `append` verwendet. - -### [`load-env`](/commands/docs/load-env.md) - -Wenn mehrere Umgebungsvariablen gesetzt werden sollen, so kann `load-env` eine ganze Tabelle mitgegeben werden. -Diese besteht aus name/value Paaren, welche alle auf einmal geladen werden: - -``` -> load-env { "BOB": "FOO", "JAY": "BAR" } -``` - -### Einmalig verwendete Umgebungsvariablen - -Dies sind Variablen, welche nur innerhalb eines Blocks gültig sind. -Siehe [Einmalig verwendete Umgebungsvariablen](environment.md#single-use-environment-variables) für Details. - -### Aufruf eines Befehls mit [`def --env`](/commands/docs/def.md) - -Siehe [Definiere Umgebung aus eigenen Befehlen](environment.md#defining-environment-from-custom-commands) für Details. - -### Exports von Modulen - -Siehe [Module](modules.md) für Details. - -## Gültigkeitsbereiche - -Wenn eine Umgebungsvariable gesetzt wird, ist sie nur in ihrem Gültigkeitsbereich vorhanden (Im aktuellen Block und dessen Unterblocks) - -Hier ein kleines Beispiel um den Gültigkeitsbereich zu demonstrieren: - -``` -> $env.FOO = "BAR" -> do { - $env.FOO = "BAZ" - $env.FOO == "BAZ" -} -true -> $env.FOO == "BAR" -true -``` - -## Verzeichnis Wechsel - -Etwas was in einer Shell häufig vorkommt ist das wechseln des Verzeichnisses mit dem [`cd`](/commands/docs/cd.md) Befehl. -In der Nushell ist dies identisch mit dem setzen der `PWD` Umgebungsvariablen. -Dies wiederum folgt den gleichen Regeln wie das setzen anderer Umgebungsvariablen (wie z.B. Gültigkeitsbereich) - -## Einmalig verwendete Umgebungsvariablen - -Eine praktische Möglichkeit eine Umgebungsvariable einmalig zu setzen, ist inspiriert von Bash und anderen Shells: - -``` -> FOO=BAR echo $env.FOO -BAR -``` - -Es kann auch [`with-env`](/commands/docs/with-env.md) verwendet werden um expliziter zu sein: - -``` -> with-env { FOO: BAR } { echo $env.FOO } -BAR -``` - -Der [`with-env`](/commands/docs/with-env.md) Befehl setzt die Umgebungsvariable temporär (hier wird die Variable "FOO" auf den Wert "BAR" gesetzt) - -## Permanente Umgebungsvariablen - -Umgebungsvariablen können beim Start von Nushell gesetzt werden. Dafür werden sie in der [Nu Konfigurations Datei](configuration.md) gesetzt -und sind dann für die gesamte Laufzeit von Nushell verfügbar. -Zum Beispiel: - -``` -# In config.nu -$env.FOO = 'BAR' -``` - -## Definition einer Umgebungsvariablen für selbst definierten Befehl - -Aufgrund der Gültigkeitsregeln ist eine Umgebungsvariable, welche innerhalb eines selbstdefinierten Befehls gesetzt ist, auch nur in dessen Block gültig. -Wird sie jedoch mit [`def --env`](/commands/docs/def.md) anstatt [`def`](/commands/docs/def.md) gesetzt, so wird sie beim verlassen des Blocks erhalten bleiben. -(Gilt auch für `export def`, siehe [Modules](modules.md)) - -``` -> def --env foo [] { - $env.FOO = 'BAR' -} - -> foo - -> $env.FOO -BAR -``` - -## Umgebungsvariablen konvertieren - -Mit `ENV_CONVERSIONS` kann eine Umgebungsvariable von einem string zu einem Wert konvertiert werden. -Zum Beispiel beinhaltet die [default environment config](https://github.com/nushell/nushell/blob/main/crates/nu-utils/src/sample_config/default_env.nu) -bereits eine Konvertierung der PATH Umgebungsvariablen (sowie der Path Variablen in Windows) von einem String in eine List. - -Nachdem beide `env.nu` und `config.nu` geladen wurden, wird jede existierende Umgebungsvariable, die mit `ENV_CONVERSIONS` definiert ist, -gemäss ihrem `from_string` Feld in den Wert des entsprechenden Typs konvertiert. -Externe Programme benötigen Strings als Umgebungsvariable. Deshalb muss jede nicht-string Variable zuerst konvertiert werden. -Die Konvertierung von Wert -> String erfolgt mit `to_string` innerhalb `ENV_CONVERSIONS` und wirdbei jedem externen Befehl ausgeführt. - -Zur Illustration hier ein Beispiel. -Diese Zeilen gehören in config.nu: - -``` -$env.ENV_CONVERSIONS = { - # ... you might have Path and PATH already there, add: - FOO : { - from_string: { |s| $s | split row '-' } - to_string: { |v| $v | str join '-' } - } -} -``` - -In einer Nushell Instanz gilt nun: - -``` -> with-env { FOO : 'a-b-c' } { nu } # runs Nushell with FOO env. var. set to 'a-b-c' - -> $env.FOO - 0 a - 1 b - 2 c -``` - -Wie zu sehen ist `$env.FOO` nun eine Liste in einer neuen Nushell Instanz mit der neuen config. -Die Konvertierung kann auch manuell getestet werden mit: - -``` -> do $env.ENV_CONVERSIONS.FOO.from_string 'a-b-c' -``` - -Um die Konvertierun list -> string zu testen: - -``` -> nu -c '$env.FOO' -a-b-c -``` - -Weil `nu` selber ein externer Befehl ist, übersetzt Nushell die `[ a b c ]` Liste gemäss `ENV_CONVERSIONS.FOO.to_string` und übergibt sie dem `nu` Prozess. -Werden Befehle mit `nu -c` ausgeführt, so wird das config File nicht geladen. In diesem Fall wird die Konvertierung nicht durchgeführt und `FOO` als Text angezeigt. -So können wir überprüfen, ob die Konvertierung erfolgreich war. - -Dieser Schritt kann auch manuell ausgelöst werden mit `do $env.ENV_CONVERSIONS.FOO.to_string [a b c]` - -Zurückschauend auf den [`env`](/commands/docs/env.md) Befehl, die `raw` Spalte zeigt die Werte, die mit `ENV_CONVERSIONS..to_string` übersetzt wurden. -Die `value` Spalte zeigt die Werte, die Nushell benutzt (Das Resultat von `ENV_CONVERSIONS..from_string` wie bei `FOO`) -Wenn der Wert kein String ist und keine `to_string` Konvertierung angewendet wird, wird er nicht an einen externen Befehl weitergeleitet (siehe die `raw` Spalte von `PROMPT_COMMAND`) -Eine Ausnahme ist die `PATH` Variable (`Path` in Windows): Standardmässig wird diese von einem String in eine Liste konvertiert beim Start -und von einer Liste in einen String, wenn externe Befehle gestartet werden. - -_(Wichtig! Die Umgebungs-Konvertierung string -> value findet statt **nachdem** env.nu und config.nu ausgewertet wurden. -Alle Umgebungsvariablen in env.nu und config.nu sind immer noch Strings solange sie nicht manuell auf andere Werte gesetzt wurden.)_ - -## Entfernen von Umgebungsvariablen - -Umgebungsvariablen können im aktuellen Gültigkeitsbereich entfernt werden via [`hide`](/commands/docs/hide.md): - -``` -> $env.FOO = 'BAR' -... -> hide FOO -``` - -Dieses Verstecken im Gültigkeitsbereich erlaubt es gleichzeitig temporär eine Variabel zu entfernen ohne dass man die höher gelegene Umgebung modifiziert wird: - -``` -> $env.FOO = 'BAR' -> do { - hide FOO - # $env.FOO does not exist - } -> $env.FOO -BAR -``` - -Mehr Informationen über Verstecken findet sich im Kapitel [Modules](modules.md) diff --git a/de/book/escaping.md b/de/book/escaping.md deleted file mode 100644 index 031d3124c7b..00000000000 --- a/de/book/escaping.md +++ /dev/null @@ -1,15 +0,0 @@ -# Aufruf von Systembefehlen - -Nushell stellt einen identischen Satz an Befehlen für verschiedene Systeme zur Verfügung, die überall dieselbe Syntax und Funktionalität haben. Manchmal ist es jedoch nötig, den gleichnamigen, vom System selbst bereitgestellten, Befehl aufzurufen. Um beispielsweise den `ls` oder `date` Befehl des Systems auszuführen, wird das Zirkumflex (`^`) dem Befehl vorangestellt: - -Nushell Befehl: - -``` -> ls -``` - -Aufruf des Systembefehls: - -``` -> ^ls -``` diff --git a/de/book/getting_started.md b/de/book/getting_started.md deleted file mode 100644 index c3cce903887..00000000000 --- a/de/book/getting_started.md +++ /dev/null @@ -1,10 +0,0 @@ -# Fangen wir an - -Lasst uns anfangen! :elephant: - -Um Nushell verwenden zu können muss sie zuerst [installiert werden](installation.md) - -Der nächste Abschnitt gibt eine [kurze Tour durch Nushell anhand von Beispielen](quick_tour.md)(inklusive wie man Hilfe in Nushell bekommt), sowie wie im [Dateisystem navigiert werden kann](moving_around.md) - -Schliesslich, Nushell hat einige Design Entscheidungen getroffen, die zu traditionellen Shells und dynamischen Skriptsprachen recht unterschiedlich sind. -Schauen wir uns deshalb auf jedenfall [Denken in Nu](thinking_in_nu.md) an, welches einige dieser Konzepte erklärt. diff --git a/de/book/hooks.md b/de/book/hooks.md deleted file mode 100644 index 5a63362ab79..00000000000 --- a/de/book/hooks.md +++ /dev/null @@ -1,285 +0,0 @@ -# Hooks - -Hooks ermöglichen es, einen Code-Snippet in vordefinierten Situationen auszuführen. -Sie sind nur im interaktiven Modus verfügbar [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop), sie funktionieren nicht, wenn eine Nushell mit einem Skript `(nu script.nu`) oder dem Befehl `(nu -c "print foo`") Argument ausgefüht wird. - -Derzeit unterstützen wir diese Arten von Hooks: - -- `pre_prompt` : Ausgelöst bevor die Eingabeaufforderung gezeichnet wird -- `pre_execution` : Ausgelöst vor dem Ausführen der Zeileneingabe -- `env_change`: Ausgelöst, wenn sich eine Umgebungsvariable ändert -- `display_output` : Ein Block, an den die Ausgabe weitergeleitet wird (experimental.) -- `command_not_found` : Ausgelöst, wenn ein Befehl nicht gefunden wird. - -Der Nushell Ausführungszyklus macht es klarer. -Die Schritte zur Auswertung einer Zeile im REPL-Modus sind wie folgt: - -1. Prüfe auf `pre_prompt` Hooks und führe diese aus. -1. Prüfe auf `env_change` Hooks und führe diese aus. -1. Stelle die Eingabeaufforderung dar und warte auf eine Benutzer-Eingabe. -1. Nachdem der Benutzer etwas eingegeben und "Enter" gedrückt hat: Prüfe auf `pre_execution` Hooks und führe diese aus. -1. Parse und werte die Benutzer Eingabe aus. -1. Wurde ein Befehl nicht gefunden: Prüfe auf `command_not_found` Hooks. Wenn dieser Text zurückgibt, zeige ihn. -1. Wenn `display_output` definiert ist, verwende diesen um die Ausgabe zu erstellen. -1. Beginne wieder mit 1. - -## Grundsätzliches zu Hooks - -Um Hooks zu aktivieren, werden sie in der [config](configuration.md) definiert: - -``` -$env.config = { - # ...other config... - - hooks: { - pre_prompt: { print "pre prompt hook" } - pre_execution: { print "pre exec hook" } - env_change: { - PWD: {|before, after| print $"changing directory from ($before) to ($after)" } - } - } -} -``` - -Bewegen wir uns mit obiger Konfiguration im Dateisystem, wird beim Ändern eines Verzeichnisses die `PWD` Umgebungsvariable verändert. -Die Änderung löst den Hook aus und tauscht die entsprechenden Werte in `before` und `after` aus. - -Anstatt nur einen einzigen Hook pro Trigger zu definieren, ist es möglich, eine *Liste von Hooks* zu definieren, die nacheinander durchlaufen werden: - -``` -$env.config = { - ...other config... - - hooks: { - pre_prompt: [ - { print "pre prompt hook" } - { print "pre prompt hook2" } - ] - pre_execution: [ - { print "pre exec hook" } - { print "pre exec hook2" } - ] - env_change: { - PWD: [ - {|before, after| print $"changing directory from ($before) to ($after)" } - {|before, after| print $"changing directory from ($before) to ($after) 2" } - ] - } - } -} -``` - -Auch könnte es praktischer sein, die bestehende Konfiguration mit neuen Hooks zu aktualisieren, -anstatt die gesamte Konfiguration von Grund auf neu zu definieren: - -``` -$env.config = ($env.config | upsert hooks { - pre_prompt: ... - pre_execution: ... - env_change: { - PWD: ... - } -}) -``` - -## Changing Environment - -Eine Besonderheit der Hooks ist, dass sie die Umgebung bewahren. -Umgebungsvariablen im Hook **Block** werden in ähnlicher Weise wie [`def --env`](environment.md#defining-environment-from-custom-commands) erhalten. -Folgendes Beispiel zeigt dies: - -``` -> $env.config = ($env.config | upsert hooks { - pre_prompt: { $env.SPAM = "eggs" } -}) - -> $env.SPAM -eggs -``` - -Die Hookblöcke folgen ansonsten den allgemeinen Scoping-Regeln, d.h. Befehle, Aliase, etc., die innerhalb des Blocks definiert sind, -werden verworfen, sobald der Block endet. - -## Conditional Hooks - -Nun wäre es verlockend eine Umgebung zu aktivieren wenn in ein Verzeichnis eingestiegen wird: - -``` -$env.config = ($env.config | upsert hooks { - env_change: { - PWD: [ - {|before, after| - if $after == /some/path/to/directory { - load-env { SPAM: eggs } - } - } - ] - } -}) -``` - -Dies wird jedoch nicht funktionieren, weil die Umgebung nur innerhalb des Blocks [`if`](/Befehle/docs/if.md) aktiv ist. -In diesem Fall könnte es als `load-env` neu geschrieben werden (`load-env (if $after == ... { ... } else { {} })`), -aber dieses Muster ist ziemlich häufig und später werden wir sehen, dass nicht alle Fälle so geschrieben werden können. - -Um das obige Problem zu lösen, führen wir eine neue Möglichkeit ein, einen Hook zu definieren -- **einen record**: - -``` -$env.config = ($env.config | upsert hooks { - env_change: { - PWD: [ - { - condition: {|before, after| $after == /some/path/to/directory } - code: {|before, after| load-env { SPAM: eggs } } - } - ] - } -}) -``` -Wird der Hook getriggert, wird der `condition` Block ausgewertet. -Wenn dieser `true` zurückgibt, wird der `code` Block ausgewertet. -Wenn er `false`zurückgibt, passiert nichts. -Gibt er etwas anderes zurück, wird ein Fehler generiert. -Das `condition` Feld kann auch weggelassen werden, womit der Hook immer ausgewertet wird. - -Die `pre_prompt` und `pre_execution` Hook Typen unterstützen die Conditional Hooks, jedoch nicht die `before` und `after` Parameter. - -## Hooks als Strings - -Bisher wurde ein Hook als Block definiert, der nur die Umgebung bewahrt, aber nichts anderes. -Um Befehle oder Aliase definieren zu können, ist es möglich, das Codefeld **als string** zu definieren. -Dies funktioniert, als ob der String in den REPL eingeben und Enter gedrückt wird. -So kann der Hook aus dem vorherigen Abschnitt auch geschrieben werden als: - -``` -> $env.config = ($env.config | upsert hooks { - pre_prompt: '$env.SPAM = "eggs"' -}) - -> $env.SPAM -eggs -``` -Dieses Feature kann z.B. verwendet werden, um abhängig vom aktuellen Verzeichnis Definitionen einzubringen: - -``` -$env.config = ($env.config | upsert hooks { - env_change: { - PWD: [ - { - condition: {|_, after| $after == /some/path/to/directory } - code: 'def foo [] { print "foo" }' - } - { - condition: {|before, _| $before == /some/path/to/directory } - code: 'hide foo' - } - ] - } -}) -``` - -Wird ein Hook als String definiert, werden die `$before` und `$after` Variablen auf die vorherigen und aktuellen Umgebungsvariablen gesetzt, -analog dem vorherigen Beispiel: - -``` -$env.config = ($env.config | upsert hooks { - env_change: { - PWD: { - code: 'print $"changing directory from ($before) to ($after)"' - } - } -} -``` - -## Beispiele - -### Einen einzelnen Hook zur bestehenden Konfiguration hinzufügen - -Beispiel eines PWD env Wechsel Hooks: - -``` -$env.config = ($env.config | upsert hooks.env_change.PWD {|config| - let val = ($config | get -i hooks.env_change.PWD) - - if $val == $nothing { - $val | append {|before, after| print $"changing directory from ($before) to ($after)" } - } else { - [ - {|before, after| print $"changing directory from ($before) to ($after)" } - ] - } -}) -``` - -### Automatisch eine Umgebung aktivieren, wenn ein Verzeichnis betreten wird - -Dieses Beispiel sucht nach einem `test-env.nu` in einem Verzeichnis - -``` -$env.config = ($env.config | upsert hooks.env_change.PWD { - [ - { - condition: {|_, after| - ($after == '/path/to/target/dir' - and ($after | path join test-env.nu | path exists)) - } - code: "overlay use test-env.nu" - } - { - condition: {|before, after| - ('/path/to/target/dir' not-in $after - and '/path/to/target/dir' in $before - and 'test-env' in (overlay list)) - } - code: "overlay hide test-env --keep-env [ PWD ]" - } - ] -}) -``` -### Filtern oder Umlenken des Befehl-Outputs - -Der `display_output` Hook kann verwendet werden, um die Ausgabe von Befehlen umzuleiten. -Ein Block sollte so definiert werden, dass er mit allen Werttypen funktioniert. -Die Ausgabe externer Befehle wird nicht durch `display_output` gefiltert. - -Dieser Hook kann die Ausgabe in einem separaten Fenster anzeigen, -vielleicht als HTML-Text. Hier ist die Grundidee, wie dies erreicht wird: - -``` -$env.config = ($env.config | upsert hooks { - display_output: { to html --partial --no-color | save --raw /tmp/nu-output.html } -}) -``` - -Das Ergebnis wird in der Datei:///tmp/nu-output.html ersichtlich in einem Webbrowser. -Natürlich ist dies nicht sehr praktisch, es sei denn, der Browser wird automatisch neu geladen, wenn sich die Datei ändert. -Anstelle des Befehls [`save`](/commands/docs/save.md) würde normalerweise der HTML-Ausgang an ein gewünschtes Fenster gesendet. - -### `command_not_found` Hook in _Arch Linux_ - -Der folgende Hook verwendet den `pkgfile` Befehl, um in _Arch Linux_ herauzufinden, zu welchem Packet ein Befehl gehört. - -``` -$env.config = { - ...other config... - - hooks: { - ...other hooks... - - command_not_found: { - |cmd_name| ( - try { - let pkgs = (pkgfile --binaries --verbose $cmd_name) - if ($pkgs | is-empty) { - return null - } - ( - $"(ansi $env.config.color_config.shape_external)($cmd_name)(ansi reset) " + - $"may be found in the following packages:\n($pkgs)" - ) - } - ) - } - } -} -``` diff --git a/de/book/installation.md b/de/book/installation.md deleted file mode 100644 index 80e79028350..00000000000 --- a/de/book/installation.md +++ /dev/null @@ -1,129 +0,0 @@ -# Nu installieren - -Der aktuell beste Weg Nu zu bekommen ist, es von [crates.io](https://crates.io) zu installieren, Binärdateien von unserer [Release-Seite](https://github.com/nushell/nushell/releases) herunterzuladen oder es selbst zu kompilieren. - -## Binärdatei - -Von der [Release-Seite](https://github.com/nushell/nushell/releases) kann Nushell bereits kompiliert heruntergeladen werden. Alternativ kann Nushell, wenn [Homebrew](https://brew.sh/) verwendet wird, mit dem Befehl `brew install nushell` installiert werden. Unter Windows können [Winget](https://docs.microsoft.com/en-us/windows/package-manager/winget/) oder [Chocolatey](https://chocolatey.org/) zur Installation verwendet werden: `winget install nushell` beziehungsweise `choco install nushell`. - -### Windows - -**Achtung:** Nu funtioniert aktuell auf Windows 10 und hat keine Unterstützung für Windows 7/8.1. - -Die aktuelle, veröffentlichte `.zip`-Datei von der [Release-Seite](https://github.com/nushell/nushell/releases) herunterladen und den Inhalt extrahieren nach: - -@[code](@snippets/installation/windows_example_extraction_location.sh) - -Danach den `nu` beinhaltenden Ordner der Umgebungsvariable PATH hinzufügen. Wenn das passiert ist, kann `nu` wie folgt gestartet werden: - -@[code](@snippets/installation/windows_run_nu.sh) - -Für Nutzer des [Windows Terminal](https://github.com/microsoft/terminal) kann `nu` als Standard-Shell gesetzt werden, indem: - -@[code](@snippets/installation/windows_terminal_default_shell.sh) - -zu `"profiles"` in den Terminal Einstellungen (JSON-Datei) hinzufügt wird. Zu guter Letzt, muss nur noch `"defaultProfile"` angepasst werden: - -@[code](@snippets/installation/windows_change_default_profile.sh) - -Jetzt sollte sich `nu` beim Start von Windows Terminal öffnen. - -## Vorbereitungen - -Bevor Nu installiert werden kann, muss sichergestellt werden, dass das System die nötigen Anforderungen erfüllt. Aktuell bedeutet das sicherzustellen, dass die Rust-Toolchain und lokale Abhängigkeiten installiert sind. - -### Installieren einer Compiler-Suite - -Damit Rust richtig funktioniert, muss eine kompatible Compiler-Suite auf dem System installiert sein. Die empfohlenen Compiler-Suites sind: - -- Linux: GCC oder Clang -- macOS: Clang (Xcode installieren) -- Windows: MSVC (installieren von [Visual Studio Community Edition](https://visualstudio.microsoft.com/vs/community/) oder der [Visual Studio Build Tools](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022)) - - Sicherstellen, dass "Desktop development with C++" installiert wird - - Jede Visual Studio Edition sollte funktionieren (Community ist gratis) - -### Rust installieren - -Wenn Rust noch nicht auf dem System installiert ist, ist [rustup](https://rustup.rs/) der beste Weg es zu bekommen. Rustup ist ein Programm um Rust-Installationen zu managen wie beispielsweise verschiedene Rust-Versionen. - -Nu benötigt aktuell die **latest stable (1.55 oder neuer)** Version von Rust. Der einfachste Weg ist es, `rustup` die korrekte Version für finden zu lassen. Wenn `rustup` zum ersten Mal gestartet wird, wird nachgefragt, welche Version installiert werden soll: - -@[code](@snippets/installation/rustup_choose_rust_version.sh) - -Wenn Sie bereit sind, drücken Sie `1` und dann `Enter`. - -Wenn Rust nicht via `rustup` installiert werden soll, können auch andere Methoden verwendet werden um es zu installieren (z.B. vom Paketmanager der Linux-Distro). Dabei muss sichergestellt werden, dass es sich um Rust-Version 1.55 oder neuer handelt. - -## Abhängigkeiten - -### Debian/Ubuntu - -Es müssen die Pakete `pkg-config` und `libssl-dev` installiert werden: - -@[code](@snippets/installation/install_pkg_config_libssl_dev.sh) - -Linux-Nutzer die die optionalen Funktionen `rawkey` und `clipboard` verwenden möchten, müssen außerdem die Pakete `libx11-dev` und `libxcb-composite0-dev` installieren: - -@[code](@snippets/installation/use_rawkey_and_clipboard.sh) - -### RHEL basierte Distributionen - -Für RHEL basierte Distributionen müssen die Pakete `libxcb`, `openssl-devel` und `libX11-devel` installiert werden: - -@[code](@snippets/installation/install_rhel_dependencies.sh) - -### macOS - -Mittels [Homebrew](https://brew.sh/), müssen die Pakete `openssl` und `cmake` über folgenden Befehl installiert werden: - -@[code](@snippets/installation/macos_deps.sh) - -## Installieren von [crates.io](https://crates.io) - -Wenn alle die Abhängigkeitenn, die für Nu benötigt werden, installiert sind, kann `cargo` verwendet werden um Nu zu installieren. - -@[code](@snippets/installation/cargo_install_nu.sh) - -Das war's! Cargo wird Nu und seine anderen Abhängigkeiten herunterladen, kompilieren und schließlich im cargo `bin` Pfad installieren, damit es benutzt werden kann. - -Wenn mehr Funktionalitäten installiert werden sollen, kann der folgende Befehl verwendet werden: - -@[code](@snippets/installation/cargo_install_nu_more_features.sh) - -Um alle verfügbaren Funktionalitäten zu bekommen, ist es am einfachsten einen Checkout durchzuführen und es selbst mit Hilfe der Rust-Tools zu kompilieren: - -@[code](@snippets/installation/build_nu_yourself.sh) - -Damit das funktioniert, sollte sichergestellt werden, dass alle oben genannten Abhängigkeiten auf dem System installiert sind. - -Wenn Nu schließlich installiert ist, kann die Shell mit dem `nu`-Befehl gestartet werden: - -@[code](@snippets/installation/run_nu.sh) - -## Kompilieren von Quelldateien - -Nu kann auch direkt aus den Quelldateien, die auf GitHub verfügbar sind, kompiliert werden. Das stellt unmittelbar die neuesten Funktionen und Fehlerbehebungen von Nu zur Verfügung. - -@[code](@snippets/installation/git_clone_nu.sh) - -Git clont das main nushell Repo. Von da aus, kann Nu, wenn `rustup` verwendet wird, wie folgt kompiliert und gestartet werden: - -@[code](@snippets/installation/build_nu_from_source.sh) - -Nu kann auch in "release" Modus kompiliert und gestartet werden: - -@[code](@snippets/installation/build_nu_from_source_release.sh) - -Leute, die sich mit Rust auskennen, wundern sich womöglich, warum hier sowohl ein `build` als auch ein `run` durchgeführt wird, obwohl `run` standardmäßig auch einen Build durchführt. Das ist nötig, um ein Problem mit der neuen `default-run`-Option von Cargo zu umgehen, damit alle Plugins kompiliert werden. Dies wird unter Umständen in Zukunft nicht mehr nötig sein. - -## Als Login-Shell verwenden - -**!!! Nu befindet sich noch in der Entwicklung und ist unter Umständen nicht stabil genug für die tägliche Nutzung. !!!** - -Um die Login-Shell festzulegen, kann der Befehl [`chsh`](https://linux.die.net/man/1/chsh) verwendet werden. -Manche Linux-Distributionen haben eine Liste von erlaubten Shells in `/etc/shells` und verbieten es die Shell zu ändern, bis Nu in der Whitelist ist. Wenn die `shells`-Datei nicht abgeändert wurde, erscheint vielleicht einen ähnlichen Fehler, wie: - -@[code](@snippets/installation/chsh_invalid_shell_error.sh) - -Nu kann zur Liste der erlaubte Shells hinzugefügt werden, indem der Pfad von `nu` der `shells`-Datei angefügt wird. -Der Pfad, der hinzugefügt werden muss, kann mit dem Befehl `which nu` herausgefunden werden. Normalerweise ist es `$HOME/.cargo/bin/nu`. diff --git a/de/book/loading_data.md b/de/book/loading_data.md deleted file mode 100644 index 7e444d0d8fc..00000000000 --- a/de/book/loading_data.md +++ /dev/null @@ -1,205 +0,0 @@ -# Laden von Daten - -Im letzten Kapitel wurden Befehle wie [`ls`](/commands/docs/ls.md), [`ps`](/commands/docs/ps.md), -[`date`](/commands/docs/date.md), and [`sys`](/commands/docs/sys.md) vorgestellt um Informationen -über Dateien, Prozesse, Zeiten und die Systemumgebung selber zu laden. -Jeder Befehl ergibt eine Tabelle aus, mit der gearbeitet werden kann. -Es gibt jedoch noch andere Möglichkeiten Tabellen aus Daten zu erhalten. - -## Dateien öffnen - -Einer der mächtigsten Befehle in Nu um mir Daten zu arbeite ist der [`open`](/commands/docs/open.md) Befehl. -Er ist ein Multi-Werkzeug, welcher mit verschiedensten Datenformaten umgehen kann. -Hier zum Beispiel was passiert, wenn eine json Datei geöffnet wird: - -@[code](@snippets/loading_data/vscode.sh) - -Ähnlich wie beim [`ls`](/commands/docs/ls.md) Befehl, bekommen wir mehr als nur Text -(oder einen Stream von bytes) zurück, wenn wir einen Dateityp öffnen, den Nu versteht. -Hier wurde ein "package.json" von einem JavaScript Projekt geöffnet. Nu erkennt den json text -und parst die Daten in eine Tabelle. - -Soll nur die Version aus dem Projekt angezeigt werden, kann mit dem [`get`](/commands/docs/get.md) -direkt diese Information herausgelesen werden. - -``` -> open editors/vscode/package.json | get version -1.0.0 -``` - -Nu unterstützt aktuell die folgenden Formate um Daten direkt als Tabelle zu öffnen: - -- csv -- eml -- ics -- ini -- json -- nuon -- ods -- ssv -- toml -- tsv -- url -- vcf -- xlsx / xls -- xml -- yaml / yml - -Was aber passiert, wenn eine Text Datei geladen wird, die keinem der angegebenen Formate entspricht? - -``` -> open README.md -``` - -Die Datei wird wie gewohnt als Text ausgegeben. - -Im Hintergrund sieht Nu eine reine Text Datei als einen grossen String. -Wie man mit einem String umgeht und die benötigten Daten herauszieht, steht im nächsten Kapitel. - -## Mit Strings umgehen - -Ein wichtiger Teil der Arbeit mit Nu ist es, mit externen Daten um zu gehen, die Nu nicht versteht. -Oft werden diese Daten als String repräsentiert. - -Zum Beispiel wie in dieser Datei: - -``` -> open people.txt -Octavia | Butler | Writer -Bob | Ross | Painter -Antonio | Vivaldi | Composer -``` - -Jeder Datenpunkt ist durch ein pipe ('|') Symbol getrennt. Und jede Person steht auf einer -eigenen Zeile. Nu kennt standardmässig kein Dateiformat, welches pipe-getrennt ist, -weshalb diese Datei von Hand geparst werden muss. - -Zuerst wird die Datei so geladen, dass jede Zeile für sich verarbeitet werden kann: - -``` -> open people.txt | lines -───┬────────────────────────────── - 0 │ Octavia | Butler | Writer - 1 │ Bob | Ross | Painter - 2 │ Antonio | Vivaldi | Composer -───┴────────────────────────────── -``` - -Dadurch wird bereits wieder eine Liste ausgegeben. Im nächsten Schritt sollen die Zeilen -in etwas brauchbares aufgeteilt werden. -Dafür verwenden wir den [`split`](/commands/docs/split.md) Befehl. Wie der Name schon verräht, -kann damit ein String durch ein Trennzeichen aufgesplittet oder aufgetrennt werden. -Mit dem `column` Unterbefehl wird der Inhalt über mehrere Spalten aufgeteilt. -Als Parameter reicht das Trennzeichen, der Rest ist automatisch: - -``` -> open people.txt | lines | split column "|" -───┬──────────┬───────────┬─────────── - # │ column1 │ column2 │ column3 -───┼──────────┼───────────┼─────────── - 0 │ Octavia │ Butler │ Writer - 1 │ Bob │ Ross │ Painter - 2 │ Antonio │ Vivaldi │ Composer -───┴──────────┴───────────┴─────────── -``` - -Das sieht _fast_ korrekt aus.Es sieht so aus, als ob sich noch eine zusätzliche Lücke eingeschlichen hat. -Mit dem [`trim`](/commands/docs/str_trim.md) Befehl wird dieser beseitigt: - -``` -> open people.txt | lines | split column "|" | str trim -───┬─────────┬─────────┬────────── - # │ column1 │ column2 │ column3 -───┼─────────┼─────────┼────────── - 0 │ Octavia │ Butler │ Writer - 1 │ Bob │ Ross │ Painter - 2 │ Antonio │ Vivaldi │ Composer -───┴─────────┴─────────┴────────── -``` - -Nicht schlecht. Der [`split`](/commands/docs/split.md) Befehl gibt nicht nur brauchbare Daten zurück, -sondern bezeichnet auch noch standardmässig die Spaltennamen: - -``` -> open people.txt | lines | split column "|" | str trim | get column1 -───┬───────── - 0 │ Octavia - 1 │ Bob - 2 │ Antonio -───┴───────── -``` - -Die Spalten können jedoch auch benannt werden: - -``` -> open people.txt | lines | split column "|" first_name last_name job | str trim -───┬────────────┬───────────┬────────── - # │ first_name │ last_name │ job -───┼────────────┼───────────┼────────── - 0 │ Octavia │ Butler │ Writer - 1 │ Bob │ Ross │ Painter - 2 │ Antonio │ Vivaldi │ Composer -───┴────────────┴───────────┴────────── -``` - -Jetzt da die Daten in einer Tabelle sind, können alle Befehle, die wir davor schon auf Tabellen -angewendet haben wiederverwenden: - -``` -> open people.txt | lines | split column "|" first_name last_name job | str trim | sort-by first_name -───┬────────────┬───────────┬────────── - # │ first_name │ last_name │ job -───┼────────────┼───────────┼────────── - 0 │ Antonio │ Vivaldi │ Composer - 1 │ Bob │ Ross │ Painter - 2 │ Octavia │ Butler │ Writer -───┴────────────┴───────────┴────────── -``` - -Weitere Befehle, mit denen Texte aus Strings bearbeitet werden können sind: - -- `str` -- [`lines`](/commands/docs/lines.md) -- [`size`](/commands/docs/size.md) - -Es gibt ausserdem einige Hilfsbefehle, die verwendet werden können um mit Daten umzugehen, -die Nu eigentlich verstehen sollte. Zum Beispiel wenn eine Rust lock Datei geöffnet wird: - -``` -> open Cargo.lock -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -[[package]] -name = "adhoc_derive" -version = "0.1.2" -``` - -Eine "Cargo.lock" Datei ist eigentlich eine .toml Datei, aber die Dateiendung ist nicht .toml. -Das ist ok, denn mit dem `from` und seinem Unterbefehl `toml` können wir dies explizit angeben: - -@[code](@snippets/loading_data/cargo-toml.sh) - -Der `from` Befehl kann für jedes strukturierte Datenformat, welches Nu versteht, verwendet werden, -indem das Format als entsprechender Unterbefehl verwendet wird. - -## Öffnen im raw Modus - -Auch wenn es hilfreich ist, beim Öffnen einer Datei direkt eine Tabelle zu erhalten, -ist dies nicht immer gewünscht. Um den darunter liegenden Text zu erhalten, kann dem -[`open`](/commands/docs/open.md) Befehl das Flag `--raw` mitgegeben werden: - -``` -> open Cargo.toml --raw -[package] name = "nu" -version = "0.1.3" -authors = ["Yehuda Katz ", "Jonathan Turner "] -description = "A shell for the GitHub era" -license = "MIT" -``` - -## URLs abrufen - -Zusätzlich zum Laden von Dateien vom Dateisystem, können auch URLs mit dem [`http get`](/commands/docs/fetch.md) -Befehl geladen werden. Dies wird den Inhalt der URL aus dem Netz abrufen und zurückgeben: - -@[code](@snippets/loading_data/rust-lang-feed.sh) diff --git a/de/book/metadata.md b/de/book/metadata.md deleted file mode 100644 index aa2a9ecbe9c..00000000000 --- a/de/book/metadata.md +++ /dev/null @@ -1,39 +0,0 @@ -# Metadaten - -Bei der Verwendung von Nu ist es Ihnen vielleicht schon einmal passiert, dass Sie das Gefühl hatten, dass hinter den Kulissen noch etwas anderes vor sich geht. Nehmen wir zum Beispiel an, Sie versuchen, eine Datei zu öffnen, die Nu unterstützt, und vergessen es dann und versuchen erneut, sie zu konvertieren: - -```nu -> open Cargo.toml | from toml -error: Expected a string from pipeline -- shell:1:18 -1 | open Cargo.toml | from toml - | ^^^^^^^^^ requires string input -- shell:1:5 -1 | open Cargo.toml | from toml - | ---------- object originates from here -``` - -Die Fehlermeldung sagt uns nicht nur, dass das, was wir [`from toml`](/commands/docs/from_toml.md) angegeben haben, keine Zeichenkette war, sondern auch, woher der Wert ursprünglich kam. Woher sollte es das wissen? - -Werte, die in Nu durch eine Pipeline fließen, sind oft mit einer Reihe von zusätzlichen Informationen oder Metadaten versehen. Diese sind als Tags bekannt, ähnlich wie die Tags an einem Artikel in einem Geschäft. Diese Tags haben keinen Einfluss auf die Daten, aber sie bieten Nu eine Möglichkeit, die Arbeit mit diesen Daten zu verbessern. - -Führen wir den Befehl [`open`](/commands/docs/open.md) noch einmal aus, aber dieses Mal schauen wir uns die Tags an, die er zurückgibt: - -```nu -> metadata (open Cargo.toml) -╭──────┬───────────────────╮ -│ span │ {record 2 fields} │ -╰──────┴───────────────────╯ -``` - -Derzeit verfolgen wir nur die Spanne, aus der die Werte stammen. Schauen wir uns das einmal genauer an: - -```nu -> metadata (open Cargo.toml) | get span -╭───────┬────────╮ -│ start │ 212970 │ -│ end │ 212987 │ -╰───────┴────────╯ -``` - -Die Bereiche "start" und "end" geben an, wo die Unterstreichung in der Zeile sein wird. Wenn Sie über 5 und dann bis 15 zählen, werden Sie sehen, dass die Zeile mit dem Dateinamen "Cargo.toml" übereinstimmt. So wusste der Fehler, den wir vorhin gesehen haben, was unterstrichen werden sollte. diff --git a/de/book/moving_around.md b/de/book/moving_around.md deleted file mode 100644 index 0bb670533ca..00000000000 --- a/de/book/moving_around.md +++ /dev/null @@ -1,56 +0,0 @@ -# Im System navigieren - -Traditionelle Shells erlauben es im Dateisystem zu navigieren und Befehle auszuführen. So auch Nu. Hier die gängigsten Befehle, die beim Interagieren mit dem System am häufigsten benutzt werden. - -## Verzeichnisinhalt ansehen - -@[code](@snippets/moving_around/ls_example.sh) - -Wie im anderen Kapitel bereits gezeigt wurde, ist [`ls`](/commands/docs/ls.md) der Befehl um den Inhalt eines Pfades anzuzeigen. Der Output wird als Tabelle dargestellt. - -Der [`ls`](/commands/docs/ls.md) Befehl nimmt auch ein optionales Argument entgegen, um die Ansicht zu verändern. Zum Beispiel um nur ".md" Dateien an zu zeigen. - -@[code](@snippets/moving_around/ls_shallow_glob_example.sh) - -Der Asterisk (\*) im obigen Beispiel "\*.md" wird auch als Wildcard oder glob bezeichnet. Es kann für jedes Zeichen stehen. Man kann "\*.md" auch als "entspricht jeder Datei, die mit '.md' aufhört" lesen. - -Nu verwendet auch moderne globs, mit welchen man auch tiefer liegende Verzeichnisse erreichen kann. - -@[code](@snippets/moving_around/ls_deep_glob_example.sh) - -Hier werden alle ".md" Dateien ausgegeben, die "in jedem tiefer liegenden Verzeichnis" von hier aus liegen. - -## Wechseln des aktuellen Verzeichnisses - -@[code](@snippets/moving_around/cd_example.sh) - -Um vom aktuellen Verzeichnis in ein neues zu gelangen, wird der [`cd`](/commands/docs/cd.md) Befehl verwendet. Wie in jeder anderen Shell, kann entweder der Name des Verzeichnisses angeben, oder mit `..` ein Verzeichnis hochgesprungen werden. - -Es kann jedoch auch das Verzeichnis gewechselt werden ohne [`cd`](/commands/docs/cd.md) angeben zu müssen, indem einfach der neue Pfad angegeben wird: - -@[code](@snippets/moving_around/cd_without_command_example.sh) - -**Hinweis** wenn mit [`cd`](/commands/docs/cd.md) das Verzeichnis gewechselt wird, ändert sich die `PWD` Umgebungsvariable. Das heisst der Wechsel bleibt für den aktuellen Block bestehen. Beim Verlassen des Blocks, wird wieder ins vorherige Verzeichnis gewechselt. -Mehr zu dieser Funktionsweise findet sich im Kapitel [environment chapter](./environment.md). - -## Dateisystem Befehle - -Nu stellt auch einige Dateisystem Basis-Befehle zur Verfügung, die auf allen Platformen laufen. - -Ein Objekt von einem Ort an einen anderen verschieben mit [`mv`](/commands/docs/mv.md): - -@[code](@snippets/moving_around/mv_example.sh) - -Ein Objekt kopieren von einem an den nächsten Ort: - -@[code](@snippets/moving_around/cp_example.sh) - -Ein Objekt löschen: - -@[code](@snippets/moving_around/rm_example.sh) - -Diese drei Befehle können auch von der glob Fähigkeit profitieren, wie beim [`ls`](/commands/docs/ls.md). - -Zu guter Letzt wird ein neues Verzeichnis angelegt mit dem [`mkdir`](/commands/docs/mkdir.md) Befehl: - -@[code](@snippets/moving_around/mkdir_example.sh) diff --git a/de/book/nu_as_a_shell.md b/de/book/nu_as_a_shell.md deleted file mode 100644 index 71f84767287..00000000000 --- a/de/book/nu_as_a_shell.md +++ /dev/null @@ -1,30 +0,0 @@ -# Nu als Shell - -Die Kapitel [Nu Grundlagen](nu_fundamentals.md) und [Programmieren in Nu](programming_in_nu.md) fokusieren sich vor allem auf den Programmiersprach-Aspekt von Nushell. - -Dieses Kapitel wirft ein Licht auf den Nushell Interpreter oder (den Nushell [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop)). -Einige der Konzepte sind integraler Bestandteilt der Nushell Programmiersprache (so wie Umgebungsvariablen). Während andere ausschliesslich zur Verbesserung des interaktiven Verhaltens beitragen (so wie Hooks) und deshalb z.B. beim Ausführen von Skripten nicht zur Verfügung stehen. - -Viele Parameter von Nushell können [konfiguriert](configuration.md) werden. -Die Konfiguration selber ist gespeichert als Umgebungsvariable. -Desweiteren werden in Nushell diverse Konfigurationsdateien beim Start ausgeführt, in denen eigene Befehle oder Aliase etc. definiert werden können. - -Ein starkes Merkmal jeder Shell sind ihre [Umgebungsvariablen](environment.md). -In Nushell sind Umgebungsvariablen in Geltungsbereiche unterteilt und können jeden unterstützten Typ annehmen. -Dies bringt einige zusätzliche Design Überlegungen mit sich, welche in den verlinken Kapiteln erklärt werden. - -Die anderen Kapitel erklären wie mit [stdout, stderr und exit codes](stdout_stderr_exit_codes.md) gearbeitet werden kann, oder wie ein [Befehl zu einem externer Befehl "escaped"](escaping.md) werden kann. -Sowie wie ein [Drittanbieter Prompt](3rdpartyprompts.md) zur Zusammenarbeit mit Nushell bewegt werden kann. - -Ein interessantes Merkmal von Nushell ist [Shell in Shells](shells_in_shells.md) welches erlaubt in mehreren Verzeichnissen gleichzeitig zu arbeiten. - -Nushell hat auch seinen eigenen Zeilen Editor [Reedline](line_editor.md). -In Nushells Konfiguration ist es möglich einige Merkmale von Reedline wie Prompt, Tastenkombinationen, History oder Menus einzustellen. - -Es ist auch möglich, eigene [Signaturen für externe Befehle](externs.md) zu definieren, was es erlaubt [eigene Vervollständigungen](custom_completions.md) für diese zu erstellen (welche auch für die eigenen Befehle funktionieren). - -[Farben und Themen in Nu](coloring_and_theming.md)) geht ins Detail zum Thema, wie Nushells Aussehen konfiguriert werden kann. - -Sind einige Befehle geplant , die im Hintergrund ablaufen sollen, so kann darüber in [Hintergrund Tasks in Nu](background_task.md) nachgelesen werden. - -Schliesslich erklärt [Hooks](hooks.md) wie Fragmente von Nushell Code beim Auftreten gewisser Ereignisse ausgeführt werden kann. diff --git a/de/book/nu_fundamentals.md b/de/book/nu_fundamentals.md deleted file mode 100644 index 998b5d69e98..00000000000 --- a/de/book/nu_fundamentals.md +++ /dev/null @@ -1,20 +0,0 @@ -# Nu Grundlagen - -In diesem Kapitel sind die Grundlagen der Nushell Programmiersprache erklärt. -Damit sollte es möglich sein, einfache Nushell Programme zu schreiben. - -Nushell hat ein umfangreiches Typen System. -Es sind gebräuchliche Typen wie Text oder einfache Zahlen jedoch auch weniger geräuchliche wie Zellpfade zu finden. -Ausserdem ist eines der Hauptmerkmale von Nushell die Idee von _strukturierten Daten_, was bedeutet, dass Typen zusammengefasst werden können in: Listen, Records oder Tabellen. -Im Gegensatz zum traditionellen Unix Ansatz, in dem alle Befehle über Klartext kommunizieren, kommuniziert Nushell über diese Datentypen. -Dies ist alles erklärt in [Datentypen](types_of_data.md). - -[Laden von Daten](loading_data.md) erklärt, wie gebräuchliche Datenformate in _strukturierte Daten_ gelesen werden, wie JSON. Dies beinhaltet auch das eigene Datenformat "NUON". - -Wie bei Unix Shells, können in Nushell Befehle in [Pipelines](pipelines.md) zusammengeführt werden, um Daten in einem Strom zu modifizieren. - -Einige Datentypen haben interessante Eigenschaften, die ein eigenes Kapitel verdienen: [Text](working_with_strings.md), [Listen](working_with_lists.md), and [Tabellen](working_with_tables.md). -Diese Kapitel zeigen ausserdem auch gängige Operationen wie Texte zusammensetzen oder ändern von Einträgen in einer Liste . - -Schliesslich listet (Command Reference)(/commands/) alle eingebauten Befehle mit einer kurzen Beschreibung auf. -Eine Information, welche ebenso aus Nushell heraus erreicht werden kann mittels dem [`help`](/commands/docs/help.md) Befehl. diff --git a/de/book/operators.md b/de/book/operators.md deleted file mode 100644 index b66218db677..00000000000 --- a/de/book/operators.md +++ /dev/null @@ -1,123 +0,0 @@ -# Operatoren - -Nushell unterstützt folgende Operatoren für gängige Mathematik, Logik und Text Operationen: - -| Operator | Beschreibung | -| ------------- | ------------------------------------------------------- | -| `+` | addieren | -| `-` | subtrahieren | -| `*` | multiplizieren | -| `/` | dividieren | -| `//` | Abrundungs Division | -| `mod` | Modulo | -| `**` | potenzieren | -| `==` | gleich | -| `!=` | ungleich | -| `<` | kleiner als | -| `<=` | kleiner gleich | -| `>` | grösser als | -| `>=` | grösser gleich | -| `=~` | regex Vergleich / Text enthält | -| `!~` | inverser regex Vergleich / Text enthält *nicht* | -| `in` | Wert in Liste enthalten | -| `not-in` | Wert nicht in Liste enthalten | -| `not` | Logisches Nein | -| `and` | und zweier bool Ausdrücke (short-circuits) | -| `or` | oder zweier bool Ausdrücke (short-circuits) | -| `xor` | exclusives oder zweier bool Ausdrücke | -| `bit-or` | bitweises oder | -| `bit-xor` | bitweises xor | -| `bit-and` | bitweises und | -| `bit-shl` | bitweises shift links | -| `bit-shr` | bitweises shift rechts | -| `starts-with` | Text startet mit | -| `ends-with` | Text endet mit | -| `++` | an Listen anfügen | - - -Klammern können verwendet werden, um mathematische Ausdrücke zu gruppieren. Das erlaubt es `(1 + 2) * 3` zu verwenden, um beispielsweise die Addition vor der Multiplikation auszuführen. - -## Reihenfolge von Operationen - -Mathematische Operationen werden in der folgenden Reihenfolge ausgewertet (von der höchsten Priorität zur niedrigsten Priorität): - -- Klammern (`()`) -- Potenzieren (`**`) -- Multiplizieren (`*`), Dividieren (`/`), Abrundungs Division (`//`), und Modulo (`mod`) -- Addieren (`+`) and Subtrahieren (`-`) -- Bit Shiften (`bit-shl`, `bit-shr`) -- Vergleich Operations (`==`, `!=`, `<`, `>`, `<=`, `>=`), Mitglieds Tests (`in`, `not-in`, `starts-with`, `ends-with`), regex Übereinstimmungen (`=~`, `!~`), und Listen anfügen (`++`) -- Bitweises und (`bit-and`) -- Bitweises xor (`bit-xor`) -- Bitweises oder (`bit-or`) -- Logisches und (`&&`, `and`) -- Logisches xor (`xor`) -- Logisches oder (`||`, `or`) -- Zuweisungs Operationen - -``` -> 3 * (1 + 2) -9 -``` - -## Typen - -Nicht alle Operationen ergeben für alle Datentypen Sinn. -Wenn eine Operation auf einen nicht kompatiblen Datentyp angewendet werden soll, wird ein Fehler ausgegeben, der erklären soll, was falsch gelaufen ist: -``` -> "spam" - 1 -Error: nu::parser::unsupported_operation (link) - - × Types mismatched for operation. - ╭─[entry #49:1:1] - 1 │ "spam" - 1 - · ───┬── ┬ ┬ - · │ │ ╰── int - · │ ╰── doesn't support these values. - · ╰── string - ╰──── - help: Change string or int to be the right types and try again. -``` - -Die Regeln fühlen sich oft strickt an. Auf der anderen Seite sollten sich jedoch weniger unerwünschte Nebeneffekte einschleichen. - -## Reguläre Ausdrücke / Text enthält Operator - -Die `=~` und `!~` Operator bieten eine praktische Möglichkeit [Reguläre Ausdrücke](https://cheatography.com/davechild/cheat-sheets/regular-expressions/) auszuwerten. -Fundierte Kenntnisse in Regluären Ausdrücke werdne dafür nicht benötigt - es ist damit recht einfach herauszufinden, ob ein Text in einem anderen enthalten ist. - -- `text =~ muster` gibt **true** zurück, wenn `text` ein Teil von `muster` ist, und ansonsten **false**. -- `text !~ muster` gibt **false** zurück, wenn `text` ein Teil von `muster` ist, und ansonsten **true**. - -Zum Beispiel: - -```nu -foobarbaz =~ bar # gibt true zurück -foobarbaz !~ bar # gibt false zurück -ls | where name =~ ^nu # Gibt alle Dateien zurück, deren Namen mit "nu" beginnen. -``` - -Beide Operatoren benutzen [die Rust Regex-Crate Funktion `is_match()`](https://docs.rs/regex/latest/regex/struct.Regex.html#method.is_match). - -## Gross- Kleinschreibung - -Operatoren beachten grundsätzlich die Gross- Kleinschreibung bei Textoperationen. Es gibt einige Möglichkeiten dies zu ändern: - -1. Beim regulären Ausdruck Operator, kann die `(?i)` Modifikation angewendet werden: - -```nu -"FOO" =~ "foo" # gibt false zurück -"FOO" =~ "(?i)foo" # gibt true zurück -``` - -2. Verwenden des `--insensitive` Parameters für den [`str contains`](/commands/docs/str_contains.md) Befehl: - -```nu -"FOO" | str contains --insensitive "foo" -``` - -3. Konvertieren von allen Zeichen in einem Text zu Kleinbuchstaben mittels [`str downcase`](/commands/docs/str_downcase.md) vor einem Vergleich: - -```nu -("FOO" | str downcase) == ("Foo" | str downcase) -``` diff --git a/de/book/overlays.md b/de/book/overlays.md deleted file mode 100644 index c5d6400ff01..00000000000 --- a/de/book/overlays.md +++ /dev/null @@ -1,256 +0,0 @@ -# Überlagerungen - - -Überlagerungen operieren als "Schichten" von Definitionen (Eigene Befehle, Aliase, Umgebungsvariablen), -welche aktiviert und deaktiviert werden können. -Sie gleichen den virtuellen Umgebungen wie man sie von Sprachen wie Python kennt. - -_Note: Zum Verständnis von Überlagerungen emphielt es sich [Modules](modules.md) zuerst zu lesen, da es auf ihnen aufbaut._ - -## Basis - -Nushell kommt zuerst mit einer Standard-Überlagerung die sich `zero` nennt. -Welche Überlagerungen aktiv sind, kann mit dem Befehl [`overlay list`](/commands/docs/overlay_list.md) ermittelt werden. -Am Anfang sollte dort der die Standard-Überlagerung gelistet sein. - -Um eine neue Überlagerung zu kreieren, wird zuerst ein Modul benötigt: - -``` -> module spam { - export def foo [] { - "foo" - } - - export alias bar = "bar" - - export-env { - load-env { BAZ: "baz" } - } -} -``` - -Dieses Modul wird im ganzen Kapitel verwendet, also wenn immer `overlay use spam` steht, dann ist mit `spam` dieses Modul gemeint. - -Um die Überlagerung zu generieren, wird [`overlay use`](/commands/docs/overlay_use.md) aufgerufen: - -``` -> overlay use spam - -> foo -foo - -> bar -bar - -> $env.BAZ -baz - -> overlay list -───┬────── - 0 │ zero - 1 │ spam -───┴────── -``` - -Dies hat die Definition des Moduls in den aktuellen Gültigkeitsbereich gebracht und den [`export-env`](/commands/docs/export-env.md) Block ausgewertet. -Genau so wie dies auch der [`use`](/commands/docs/use.md) Befehl tut. (see [Modules](modules.md#environment-variables) chapter) - -::: tip -Im folgenden Abschnitt wird der `>` prompt mit dem Namen des zuletzt aktivierten Überlagerung vorangestellt. -`(spam)> some-command` bedeutet, die `spam` Überlagerung ist die zuletzt aktive Überlagerung wenn der Befehl eingegeben wurde. -::: - -## Eine Überlagerung entfernen - -Wenn die Überlagerung nicht mehr benötigt wird, entfernt sie der Befehl [`overlay hide`](/commands/docs/overlay_remove.md): - -``` -(spam)> overlay hide spam - -(zero)> foo -Error: Can't run executable... - -(zero)> overlay list -───┬────── - 0 │ zero -───┴────── -``` - -Überlagerungen haben ebenfalls einen Gültigkeitsbereich. -Jede hinzugefügte Überlagerung wird entfernt, wenn der Gütligkeitsbereich endet: - -``` -(zero)> do { overlay use spam; foo } # Überlagerung ist aktiv innerhalb des Blocks -foo - -(zero)> overlay list -───┬────── - 0 │ zero -───┴────── -``` - -Wird der Befehl [`overlay hide`](/commands/docs/overlay_remove.md) ohne Argument aufgerufen, so wird die zuletzt aktivierte Überlagerung entfernt. - -## Überlagerungen sind aufgezeichnet - -Eine neue Definition (Befehl, Alias, Umgebungsvariable) wird in der zuletzt aktivierten Überlagerung aufgezeichnet: - -``` -(zero)> overlay use spam - -(spam)> def eggs [] { "eggs" } -``` - -Der `eggs` Befehl gehört zur `spam` Überlagerung. -Wird diese entfernt, ist auch der Befehl nicht mehr aufrufbar: - -``` -(spam)> overlay hide spam - -(zero)> eggs -Error: Can't run executable... -``` - -Er ist jedoch nicht verloren! - -``` -(zero)> overlay use spam - -(spam)> eggs -eggs -``` - -Überlagerungen speichern die Informationen, die ihnen übergeben werden, auch wenn die Überlagerung entfernt wird. -So kann mehrfach zwischen verschiedenen Kontexten gewechselt werden. - -::: tip -Es gibt Momente, in denen Definitionen nicht zu einer Überlagerung hinzugefügt werden sollen. -Die Lösung dafür ist, eine leere Überlagerung zu erstellen und die Definitionen temporär nur dort zu speichern: - -``` -(zero)> overlay use spam - -(spam)> module scratchpad { } - -(spam)> overlay use scratchpad - -(scratchpad)> def eggs [] { "eggs" } -``` - -Der `eggs` Befehl wird zu `scratchpad` hinzugefügt, während `spam` intakt bleibt. - -Um dies weniger wortreich zu machen, reicht der Befehl [`overlay new`](/commands/docs/overlay_new.md): - -``` -(zero)> overlay use spam - -(spam)> overlay new scratchpad - -(scratchpad)> def eggs [] { "eggs" } -``` - -::: - -## Vorangestellte Überlagerungen - -Der [`overlay use`](/commands/docs/overlay_use.md) Befehl übernimmt alle Befehle und Aliase des Moduls und fügt sie seinem Namensbereich hinzu. -Sie können jedoch auch als Unterbefehl hinter dem Modulnamen stehen. -Dafür ist das `--prefix` Argument da: - -``` -(zero)> module spam { - export def foo [] { "foo" } -} - -(zero)> overlay use --prefix spam - -(spam)> spam foo -foo -``` - -Dies gilt jedoch nicht für Umgebungsvariablen. - -## Eine Überlagerung umbenennen - -Der Name einer Überlagerung kann mit `as` geändert werden: - -``` -(zero)> module spam { export def foo [] { "foo" } } - -(zero)> overlay use spam as eggs - -(eggs)> foo -foo - -(eggs)> overlay hide eggs - -(zero)> -``` - -Dies kann sinnvoll sein, wenn ein generischer Skript Name einer virtuellen Umgebung wie `activate.nu` verwendet wird, -um dieser einen Namen zu geben, der sie besser beschreibt. - -## Definitionen behalten - -Manchmal ist es nicht gewünscht, dass Definitionen, die in einer Überlagerungen gemacht wurden, verloren gehen, wenn diese entfernt wird: - -``` -(zero)> overlay use spam - -(spam)> def eggs [] { "eggs" } - -(spam)> overlay hide --keep-custom spam - -(zero)> eggs -eggs -``` - -Das `--keep-custom` Argument macht genau das. - -Es ist auch möglich, eine Liste von Umgebungsvariablen, welche in der Überlagerung definiert wurden, zu behalten, und den Rest zu entfernen. -Dafür wird das `--keep-env` Argument verwendet: - -``` -(zero)> module spam { - export def foo [] { "foo" } - export-env { $env.FOO = "foo" } -} - -(zero)> overlay use spam - -(spam)> overlay hide spam --keep-env [ FOO ] - -(zero)> foo -Error: Can't run executable... - -(zero)> $env.FOO -foo -``` - -## Überlagerungen ordnen - -Überlagerungen sind wie ein Stapel organisiert. -Wenn mehrere Überlagerungen die gleiche Definition enthalten, z.B. `foo`, dann wird die der zuletzt aktivierten verwendet. -Um eine Überlagerung im Stapel nach oben zu bringen, wird einfach der Befehl [`overlay use`](/commands/docs/overlay_use.md) nochmals aufgerufen: - -``` -(zero)> def foo [] { "foo-in-zero" } - -(zero)> overlay use spam - -(spam)> foo -foo - -(spam)> overlay use zero - -(zero)> foo -foo-in-zero - -(zero)> overlay list -───┬────── - 0 │ spam - 1 │ zero -───┴────── -``` - -Nun hat die `zero` Überlagerung wieder Vorrang. diff --git a/de/book/pipeline.md b/de/book/pipeline.md deleted file mode 100644 index 37690d06e41..00000000000 --- a/de/book/pipeline.md +++ /dev/null @@ -1,85 +0,0 @@ -# Pipelines - -Eine der grundlegenden Funktionen in Nu ist die Pipeline. Ein Konzept, welches seine Wurzeln tief in der Unix Philosophie hat. -So wie Nu die Arbeit mit Texten als dem Basis Datentyp in Unix erweitert, erweitert sie auch die Idee der Pipeline, um mehr als nur Text zu verarbeiten. - -## Grundlagen - -Eine Pipeline besteht aus drei Teilen: Dem Input, dem Filter und dem Output. - -``` -> open "Cargo.toml" | inc package.version --minor | save "Cargo_new.toml" -``` - -Der erste Befehl, `open "Cargo.toml"`, ist der Input (manchmal auch als "source" oder "producer" bezeichnet). -Dieser kreiert oder ladet Daten und speist sie in die Pipeline ein. Von hier aus hat Nu etwas zum damit arbeiten. -Befehle wie [`ls`](/commands/docs/ls.md) sind ebenfalls Inputs, da sie Daten aus dem Dateisystem ziehen und in die Pipeline einspeisen. - -Der zweite Befehl, `inc package.version --minor`, ist ein Filter. Filter verarbeiten die Daten auf eine bestimmte Weise. -Vielleicht ändern sie Teile (wie der [`inc`](/commands/docs/inc.md) im Beispiel), oder sie führen eine andere Operation aus wie Loggen. - -Der letzte Befehl, `save "Cargo_new.toml"`, ist ein Output (manchmal auch "sink" genannt). Ein Output nimmt die Daten aus der Pipeline entgegen und führt -eine abschliessende Operation daran aus. Im Beispiel wird der Inhalt der Pipeline als letzten Schritt in eine Datei gespeichert. -Andere Arten von Output geben die Daten aus der Pipeline zum Beispiel auf der Kommandozeile aus. - -Die `$in` Variable sammelt die Daten in der Pipeline in einen Wert, um den ganzen Strom als Parameter verwenden zu können: - -```nushell -> echo 1 2 3 | $in.1 * $in.2 -6 -``` - -## Mehrzeilen Pipelines - -Wenn eine Pipeline etwas lange wird für eine Zeile, kann sie mit `(` und `)` zu Unterausdrücken unterteilt werden: - -```nushell -( - "01/22/2021" | - parse "{month}/{day}/{year}" | - get year -) -``` - -Siehe auch [Subexpressions](https://www.nushell.sh/book/variables_and_subexpressions.html#subexpressions) - -## Mit externen Befehlen arbeiten - -Nu Befehle kommunizieren miteinander über die Nu Datentypen (see [types of data](types_of_data.md)), was aber ist mit Befehlen ausserhalb Nu? -Hier einige Beispiele im Umgang mit externen Befehlen: - -`interner_befehl| externer_befehl` - -Die Daten fliessen vom internen zum externen Befehl und werden dawischen zu Texten konvertiert, -so dass der externe Befehl diese von `stdin` lesen kann. - -`externer_befehl | interner_befehl` - -Daten die von einem externen Befehl in Nu ankommen, werden als Bytes verarbeitet, die Nushell automatisch in UTF-8 konvertieren versucht. -Wenn dies gelingt, wird ein Textstrom an den internen Befehl gesendet. Wenn nicht, wird ein Strom von binären Daten weitergeleitet. - -Befehle wie [`lines`](/commands/docs/lines.md) helfen dabei, mit externen Daten zu arbeiten, da er diskrete Zeilen der Daten zurückgibt. - -`externer_befehl_1 | externer_befehl_2` - -Wird zwischen zwei externen Befehlen eine Pipeline aufgebaut, so verhaltet sich Nushell gleich wie es z.B. Bash tun würde. -Der `stdout` des externen_befehl_1 wiird mit dem `stdin` des externen_befehl_2 verbunden. Dies lässt die Daten natürlich zwischen den Befehlen fliessen. - -## Hinter den Kulissen - -Warum gibt dann der [`ls`](/commands/docs/ls.md) Befehl eine Tabelle zurück, wenn er doch ein Input ist und kein Output? -Nu fügt diesen Output automatisch hinzu, indem sie den Befehl [`table`](/commands/docs/table.md) verwendet. -Der [`table`](/commands/docs/table.md) Befehl wird an jede Pipeline angefügt, die keinen eigenen Output besitzen. -Dies erlaubt es den Output in dieser Form zu sehen. Tatsächlich ist der Befehl: - -``` -> ls -``` - -und die Pipeline, - -``` -> ls -``` - -ein und dasselbe. diff --git a/de/book/plugins.md b/de/book/plugins.md deleted file mode 100644 index b4f3aac7a37..00000000000 --- a/de/book/plugins.md +++ /dev/null @@ -1,17 +0,0 @@ -# Plugins - -Die Funktionen von Nushell können mittels Plugins erweitert werden. Diese Plugins können einen Großteil der selben Operationen ausführen, wie die internen Befehle. Noch dazu haben Plugins den Vorteil, dass sie separat und flexibel zu Nushell hinzugefügt werden können. - -Um ein Plugin hinzuzufügen, muss es erstellt werden und dann der Befehl `register` auf dieses Plugin aufgerufen werden. Wenn das getan wird, muss Nushell auch mitgeteilt werden, welches Protokoll vom Plugin verwendet wird. - -Ein Beispiel: - -``` -> register ./my_plugins/nu-plugin-inc -e capnp -``` - -Wenn der Befehl registriert wurde, kann er als Teil der internen Befehle verwendet werden. - -``` -> inc --help -``` diff --git a/de/book/programming_in_nu.md b/de/book/programming_in_nu.md deleted file mode 100644 index 29371228d39..00000000000 --- a/de/book/programming_in_nu.md +++ /dev/null @@ -1,33 +0,0 @@ -# Programmieren in Nu - -Dieses Kapitel geht mehr ins Detail, wie mit Nushell programmiert werden kann. -Jedes grössere Sprach-Merkmal hat sein eigenes Kapitel. - -Wie die meisten Programmiersprachen, können in Nushell Funktionen definiert werden. -Nushell verwendet dafür [Eigene Befehle](custom_commands.md). - -Von anderen Shells sind [Aliase](aliases.md) vermutlich ein Begriff. -In Nushell sind Aliase nicht nur ein Shell Merkmal, sondern Teil der Programmiersprache. - -Gebräuchliche Tätigkeiten wie Additionen oder Regex Suchen, können mit [operators](operators.md) durchgeführt werden. -Nicht alle Operationen funktionieren für alle Datentypen. -Nushell unterstützt dabei mit hilfreichen Fehlermeldungen. - -Zwischenergebnisse können in [Variablen](variables_and_subexpressions.md) gespeichert sowie als [Unterausdrücke](variables_and_subexpressions.html#subexpressions) jederzeit ausgewertet werden. - -Die letzten drei Kapitel zielen darauf den Code zu organisieren: - -[Skripte](scripts.md) sind die einfachste Form der Organisation: Einfach den Code in eine Datei speichern und mit `source` einbinden. -Allerdins können Skripte auf als eigenständige Programme inklusive Befehls Signatur dank dem "speziellen" `main` Befehl verwendet werden. - -Mit [Modulen](modules.md) kann, wie in vielen anderen Programmiersprachen, der Code aus mehreren kleineren Stücken zusammengefügt werden. -In Modulen kann eine öffentliche Schnittstelle definiert und von nicht öffentlichen Befehlen getrennt werden. Eigene Befehle, Aliase und Umgebungsvariablen können von Modulen importiert werden. - -[Überlagerung](overlays.md) bauen auf Modulen auf. -Mit dem Verwenden einer Überlagerung, werden Modul Definitionen in eigenen austauschbaren "Ebenen" übereinander gestapelt. -Dies erlaubt Eigenschaften wie, Aktivieren von virtuellen Umgebungen oder Überschreiben von standard Befehlen mit eigenen Varianten. - -Der Hilfetext eines eingebauten Befehls zeigt die [Signatur](command_signature.md). -Er zeigt auf, wie Befehle im allgemeinen verwendet werden können. - -Die Standardbibliothek beinhaltet ebenso ein [Test Framework](testing.md), um zu testen, dass der Code auch wirklich perfekt funktioniert. diff --git a/de/book/scripts.md b/de/book/scripts.md deleted file mode 100644 index b6b4e47720e..00000000000 --- a/de/book/scripts.md +++ /dev/null @@ -1,96 +0,0 @@ -# Skripte - -In Nushell können Skripte geschrieben und ausgeführt werden, welche in der Nushell Sprache geschrieben sind. -Um ein Skript auszuführen, wird es dem Befehl `nu` als Argument übergeben: - -``` -> nu myscript.nu -``` - -Dies wird das Skript bis zum Ende in einer neuen Nuinstanz ausführen. -Das Skript kann auch in der _aktuellen_ Instanz ausgeführt werden mit dem [`source`](/commands/docs/source.md) Befehl: - -``` -> source myscript.nu -``` - -Hier ein Beispiel einer Skript Datei: - -``` -# myscript.nu -def greet [name] { - echo "hello" $name -} - -greet "world" -``` - -Eine Skriptdatei definiert eigene Befehle genauso wie die Main Routine, welche ausgeführt wird nachdem die eigenen Befehle definiert wurden. -Im obigen Beispiel wird `greet` zuerst definiert vom Nushell Interpreter. Dies erlaubt den späteren Aufruf der Definition. -Das Skript hätte auch geschrieben werden können als: - -``` -greet "world" - -def greet [name] { - echo "hello" $name -} -``` - -Es gibt keine Bedingung, dass Definitionen vor deren Aufruf definiert werden müssen. -Dies erlaubt es, sie dort zu platzieren, wo sie am sinnvollsten hingehören. - -## Wie Skripte ausgewertet werden - -In einem Skript werden Definitionen zuerst ausgeführt. Dadurch können Definitionen im Skript aufgerufen werden. - -Nachdem die Definitionen ausgeführt wurden, werden von oben nach unten alle Befehlsgruppen nacheinander ausgeführt. - -## Script lines - -Um besser zu verstehen wie Nushell die Linien im Code versteht, hier ein Beispiel: - -``` -a -b; c | d -``` - -Wird das Skript ausgeführt, führt Nushell zuerst den `a` Befehl zuende und zeigt die Resultate. -Als nächstes führt Nushell der Reihe nach `b; c | d` aus analog den Regeln aus ["Groups" section](types_of_data.html#groups). - -## Skripte parametrisieren - -Skripte können optional einen speziellen "main" Befehl enthalten. -`Main` wird ausgeführt nachdem der restliche Nu Code ausgeführt wurde und wird vor allem benutzt um Argumente an das Skript zu übergeben. -Argumente werden an ein Skript übergeben indem sie nach dem Skriptnamen angefügt werden (`nu - - - - - - - - - - -
コマンド説明
{{ command.title }}{{ command.frontmatter.usage }}
diff --git a/ja/book/configuration.md b/ja/book/configuration.md deleted file mode 100644 index 7708ae46a03..00000000000 --- a/ja/book/configuration.md +++ /dev/null @@ -1,149 +0,0 @@ -# 設定 - -Nu には、見た目や挙動を変更させるための内部的な変数があります。 -以下がそのリストです。 - -| Variable | Type | Description | -| --------------------- | --------------------------- | --------------------------------------------------------------------- | -| completion_mode | "list" or "circular" | 利用する自動補完のモード | -| ctrlc_exit | boolean | ctrl-c を複数回押したときに Nu を exit するかどうか | -| disable_table_indexes | boolean | テーブルインデックスカラムを無効にするかどうか | -| edit_mode | "vi" or "emacs" | 行の編集モードを"vi"か"emacs"モードに変更する | -| env | row | 外部コマンドに渡す環境変数 | -| header_align | "center", "right", or other | テーブルのヘッダーの揃え方 | -| key_timeout | integer | edit モードのスイッチ時のタイムアウト | -| nonzero_exit_errors | boolean | 外部コマンドが 0 以外の終了ステータスの場合にエラーを表示するかどうか | -| path | list of strings | バイナリーを検索する PATH | -| startup | list of strings | `alias`のような nushell 起動時に実行するコマンド | -| table_mode | "light" or other | テーブルのモード | -| no_auto_pivot | boolean | 自動で 1 行のデータを pivot するかどうか | -| skip_welcome_message | boolean | nushell 起動時にウェルカムメッセージの表示をスキップするかどうか | - -## 利用方法 - -### 変数の設定 - -これらの変数のいずれかを設定するには`config set` コマンドを利用します。例えば - -``` -> config set edit_mode "vi" -``` - -### パイプラインからの変数を設定 - -設定したい値をパイプラインを通じて設定することもできます。このためには`set_into`フラグを利用します。 - -``` -> echo "bar" | config set_into foo -``` - -この方法は、`env`や`path`変数を設定する際に便利です。 - -### すべての変数の表示 - -`config`コマンドを引数なしで実行すると現在の設定されている変数を表示します。 - -``` -> config -─────────────────┬────────────────── - completion_mode │ circular - env │ [row 51 columns] - path │ [table 9 rows] - startup │ [table 1 rows] -─────────────────┴────────────────── -``` - -注: もしまだ変数を設定していない場合、出力が空の場合があります。 - -### 変数の取得 - -`get`フラグを利用して特定の変数の値を取得できます。 - -``` -> config get edit_mode -``` - -### 変数の削除 - -変数を削除する場合、`remove`フラグを利用します。 - -``` -> config remove edit_mode -``` - -### 設定全体のクリア - -設定全体をクリアして、最初からやりなおしたい場合は`--clear`フラグを利用できます。このコマンドを実行すると設定ファイルもクリアされるので注意してください。 - -``` -> config clear -``` - -### 設定が保存されている場所をみつける - -設定ファイルはデフォルトの場所から読み込まれます。この場所をみつけるには`-path`フラグを利用します。 - -``` -> config path -/home/jonathant/.config/nu/config.toml -``` - -### ファイルから設定を読み込む - -デフォルトとは違う設定ファイルを読み込みたい場合は、`load` パラメーターを利用します。 - -``` -> config load myconfiguration.toml -``` - -## Nu をログインシェルとして設定する - -Nu をログインシェルとして利用するには、`path`と`env`変数を設定する必要があります。これらによりログインシェルとして外部コマンドを実行するのに十分なサポートが得られます。 - -切り替える前に、Bash 等の別のシェルから Nu を実行します。そして次のコマンドで環境変数と PATH をシェルから取得します。 - -``` -> config set path $nu.path -> config set env $nu.env -``` - -0.7.2 より以前のバージョンでは - -``` -> config --set [path $nu:path] -> config --set [env $nu:env] -``` - -`$nu.path`および`$nu.env`にはそれぞれ、現在の PATH と環境変数がセットされています。これらをセットすると、のちに Nu をログインシェルとして利用したさいに利用できるようになります。 - -次にいくつかのディストリビューションでは、Nu が`/etc/shells`のリストに含まれているかを確認する必要があります。 - -``` -❯ cat /etc/shells -# /etc/shells: valid login shells -/bin/sh -/bin/dash -/bin/bash -/bin/rbash -/usr/bin/screen -/usr/bin/fish -/home/jonathan/.cargo/bin/nu -``` - -これにより、`chsh`で Nu をログインシェルとして設定できるようになります。ログアウト後、次回のログイン時に Nu の素敵なプロンプトが表示されます。 - -## プロンプトの設定 - -プロンプトの設定は`prompt`の値を設定することで行います。 -例えば、[starship](https://starship.rs)を使うには、ダウンロードして次のコマンドを実行します。(0.18.2 and later) - -``` -config set prompt "starship prompt" -``` - -Nu を再起動すると - -``` -nushell on 📙 master [$] is 📦 v0.18.2 via 🦀 v1.48.0-nightly -❯ -``` diff --git a/ja/book/environment.md b/ja/book/environment.md deleted file mode 100644 index 8c64cd4aeb1..00000000000 --- a/ja/book/environment.md +++ /dev/null @@ -1,32 +0,0 @@ -# 環境変数 - -外部アプリケーションが使用する環境を制御することはシェルの一般的なタスクです。多くの場合、環境はパッケージ化されて外部のアプリケーション起動時に与えられることで自動的に行われます。しかし時には、アプリケーションが利用する環境変数をより正確に制御したい場合があります。 - -アプリケーションに送られる現在の環境変数は`$nu.env`の値を echo して確認することができます。 - -``` -> echo $nu.env -──────────────────────────┬────────────────────────────── - COLORTERM │ truecolor - DBUS_SESSION_BUS_ADDRESS │ unix:path=/run/user/1000/bus - DESKTOP_SESSION │ gnome - DISPLAY │ :1 -``` - -環境は Nu の設定と Nu が実行されている環境から作られます。[設定の章](configuration.md)に記載されている方法で環境を恒久的に更新できます。 - -コマンドやパイプラインを実行するときに一時的に環境変数を更新することもできます。 - -``` -> with-env [FOO BAR] { echo $nu.env.FOO } -BAR -``` - -`with-env`コマンドは、環境変数を一時的に与えられた値に設定します(ここでは変数"FOO"に"BAR"という値がセットされます)。ブロックは新しい環境変数が設定された状態で実行されます。 - -Bash などにヒントを得た一般的な省略記法も用意されています。上の例は次のように書くことができます。 - -``` -> FOO=BAR echo $nu.env.FOO -BAR -``` diff --git a/ja/book/escaping.md b/ja/book/escaping.md deleted file mode 100644 index ed41126ac3c..00000000000 --- a/ja/book/escaping.md +++ /dev/null @@ -1,15 +0,0 @@ -# エスケープ - -Nu は様々な OS で使用できる一連のコマンドを提供します。このような一貫性があると便利です。ただし、ときには Nu コマンドと同じ名前のコマンドを実行したいときがあります。例えば、ローカルの`ls`や`date`コマンドなどです。このような場合にはキャレット(^)コマンドを使用します。 - -Nu のコマンド: - -``` -> ls -``` - -ローカルコマンドへのエスケープ: - -``` -> ^ls -``` diff --git a/ja/book/getting_started.md b/ja/book/getting_started.md deleted file mode 100644 index 6b2915a7039..00000000000 --- a/ja/book/getting_started.md +++ /dev/null @@ -1,9 +0,0 @@ -# はじめに - -さあ、始めましょう! 🐘 - -まず最初に、Nushellを使用するためには、[インストールする](installation.md)必要があります。 - -次のセクションでは、Nushellの[簡単な例によるツアー](quick_tour.md)(Nushell内でのヘルプの取得方法を含む)を提供し、ファイルシステムの[移動方法](moving_around.md)を示します。 - -最後に、Nushellは一般的なシェルや動的スクリプト言語とはかなり異なる設計決定を採用しているため、これらのコンセプトを説明する[Thinking in Nu](thinking_in_nu.md)を確認してください。 diff --git a/ja/book/installation.md b/ja/book/installation.md deleted file mode 100644 index 9d61ab94303..00000000000 --- a/ja/book/installation.md +++ /dev/null @@ -1,107 +0,0 @@ -# Nu のインストール - -Nu を入手して実行するには多くの方法があります。[リリースページ](https://github.com/nushell/nushell/releases) からビルド済みのバイナリーをダウンロードすることもできますし、 [あなたの好きなパッケージマネージャーを使う](https://repology.org/project/nushell/versions) ことも、あるいはソースからビルドする方法もあります。 - -Nushell のメインのバイナリーは `nu` (Windowsでは `nu.exe`) という名前です。インストールが済めば、 `nu` と打って起動することができます。 - -@[code](@snippets/installation/run_nu.sh) - -## ビルド済みのバイナリー - -Linux、macOS、Windows向けのビルド済み Nu バイナリーはそれぞれの[GitHub リリース](https://github.com/nushell/nushell/releases)で提供されています。ダウンロードして、バイナリを解凍して、PATH の場所にそれらをコピーするだけです。 - -## パッケージマネージャー - -Nu はいくつかのパッケージマネージャーで入手することができます。 - -[![Packaging status](https://repology.org/badge/vertical-allrepos/nushell.svg)](https://repology.org/project/nushell/versions) - -macOS、Linuxでは、 [Homebrew](https://brew.sh/) が人気です (`brew install nushell`)。 - -Windowsでは: - -- [Winget](https://docs.microsoft.com/en-us/windows/package-manager/winget/) (`winget install nushell`) -- [Chocolatey](https://chocolatey.org/) (`choco install nushell`) -- [Scoop](https://scoop.sh/) (`scoop install nu`) - -クロスプラットフォームのインストールとしては: - -- [npm](https://www.npmjs.com/) (`npm install -g nushell` この方法でインストールした場合、 Nu プラグインは含まれないことに注意してください) - -## ソースからビルドする - -Nu をソースからビルドすることもできます。まず、 Rust のツールチェインと依存関係をセットアップする必要があります。 - -### コンパイラスイートのインストール - -Rust を正しく動作させるためには、互換性のあるコンパイラスイートがシステムにインストールされている必要があります。推奨されるコンパイラスイートは以下のとおりです。 - -- Linux: GCC or Clang -- macOS: Clang (Xcode をインストール) -- Windows: MSVC ([Visual Studio](https://visualstudio.microsoft.com/vs/community/) または [Visual Studio Build Tools](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022) をインストール) - - "C++ によるデスクトップ開発" ワークロードを必ずインストールしてください。 - - どの Visual Studio エディションでも動作します(Community は無料です)。 - -### Rust のインストール - -Rust がシステムにまだインストールされていない場合は、[rustup](https://rustup.rs/)を利用して Rust をインストールする方法がベストです。Rustup は、異なる Rust のバージョンのインストールを管理するツールです。 - -Nu は現在、 **最新の stable (1.66.1 or later)** バージョンの Rust を必要とします。 -`rustup`で正しい version を選択するのが良い方法です。 -最初に"rustup"を実行すると、インストールする Rust のバージョンを尋ねられます。 - -@[code](@snippets/installation/rustup_choose_rust_version.sh) - -準備ができたら、1 を押してからエンターを押します。 - -もし、`rustup`を経由して Rust をインストールしたくない場合、他の方法でもインストールすることができます。(例えば、Linux ディストリビューションのパッケージから)。 -その場合でも Rust の 1.66.1 以上のバージョンがインストールされるようにしてください。 - -### 依存関係 - -#### Debian/Ubuntu - -"pkg-config"および"libssl-dev"パッケージをインストールしてください。 - -@[code](@snippets/installation/install_pkg_config_libssl_dev.sh) - -#### RHEL ベースのディストロ - -"libxcb", "openssl-devel"および"libX11-devel"パッケージをインストールする必要があります。 - -@[code](@snippets/installation/install_rhel_dependencies.sh) - -#### macOS - -[Homebrew](https://brew.sh/)を利用して、"openssl"と"cmake"をインストールしてください。 - -@[code](@snippets/installation/macos_deps.sh) - -### [crates.io](https://crates.io) を利用してのビルド - -Nu はソースの形で、Rust で人気のパッケージレジストリ [crates.io](https://crates.io/) にリリースされています。これにより、`cargo` を使って簡単に最新の Nu リリースをビルド、インストールすることができます。 - -@[code](@snippets/installation/cargo_install_nu.sh) - -これでおしまいです!`cargo`は Nu のソースコードとその依存関係をダウンロードしてビルドし、`cargo`のバイナリーパスにインストールすることで Nu を実行できるようにします。 - -もし [dataframes](book/dataframes.md) サポートをともにインストールしたいなら、 `--features=dataframe` フラグを使ってインストールすることができます。 - -@[code](@snippets/installation/cargo_install_nu_more_features.sh) - -### GitHub リポジトリからのビルド - -GitHub の最新のソースから直接ビルドすることもできます。こうすることで、最新の機能やバグ修正にすぐにアクセスすることができます。まず、リポジトリをクローンします。 - -@[code](@snippets/installation/git_clone_nu.sh) - -これで、Nu をビルドして実行できます。 - -@[code](@snippets/installation/build_nu_from_source.sh) - -さらに最適化されたリリースモードで Nu をビルドし実行することもできます。 - -@[code](@snippets/installation/build_nu_from_source_release.sh) - -Rust に慣れている人は、"run"がデフォルトでビルドを行うのに、なぜ"build"と"run"の両方を行うのか疑問に思うかもしれません。 -これは Cargo の新しい`default-run`オプションの欠点を回避し、全てのプラグインがビルドされるようにするためですが、将来的には必要なくなるかもしれません。 diff --git a/ja/book/introduction.md b/ja/book/introduction.md deleted file mode 100644 index 87cee7715b7..00000000000 --- a/ja/book/introduction.md +++ /dev/null @@ -1,69 +0,0 @@ -# はじめに - -こんにちは、Nushell プロジェクトへようこそ。このプロジェクトのゴールは、シンプルなコマンドをパイプでつなぎ合わせるというシェルの Unix 哲学を現代の開発スタイルにもちこむことです。 - -Nu は Bash のような伝統的なシェル、PowerShell などの高度なシェル、関数型プログラミング、システムプログラミングなど、多くの分野からヒントを得ています。しかし Nu は何でもこなせることを目指すのではなく、いくつかのことをうまくこなせることに注力しています。 - -- モダンな雰囲気をもつ柔軟なクロスプラットフォームシェルを作ること -- データ構造を理解するコマンドラインアプリケーションを組みあわせることができること -- 現代的な CLI アプリケーションが提供する UX をそなえること - -Nu になにができるかをみるには、実際に使ってみることが一番です。 - -`ls`コマンドを実行して最初に気づくことは、テキストブロックではなく、構造化されたテーブルデータが返ってくることです。 - -@[code](@snippets/introduction/ls_example.sh) - -このテーブルはディレクトリの内容を別の方法で表示しているだけではありません。このテーブルを利用するとスプレッドシートと同じように、よりインタラクティブにデータを操作できます。 - -最初に行うことはテーブルをサイズでソートすることです。これを行うには`ls`の出力を取得して、カラムの内容に基づいてテーブルをソートするコマンドに入力します。 - -@[code](@snippets/introduction/ls_sort_by_reverse_example.sh) - -この作業をおこなうために、`ls`にコマンドライン引数を渡していないことがわかります。代わりに、Nu が提供する`sort-by`コマンドを利用して、`ls`コマンドの出力をソートしています。また、一番大きなファイルを表示するために逆順に並び替えています。 - -Nu にはテーブルを扱うための多くのコマンドが用意されています。例えば、1 キロバイトを超えるファイルのみを表示するように`ls`コマンドの出力をフィルターできます。 - -@[code](@snippets/introduction/ls_where_example.sh) - -Unix 哲学にあるように、コマンドをつなぎ合わせることで様々な組み合わせを作り出すことができます。別のコマンドをみてみましょう。 - -@[code](@snippets/introduction/ps_example.sh) - -もしあなたが Linux を利用しているなら`ps`コマンドには馴染みがあるでしょう。これを使うと、現在システムが実行しているすべてのプロセスの状態や名前の一覧を取得することができます。プロセスの CPU 負荷も確認することができます。 - -CPU をアクティブに利用しているプロセスを表示したい場合はどうでしょうか。さきほどの`ls`コマンドと同じように、`ps`コマンドが返すテーブルを利用することができます。 - -@[code](@snippets/introduction/ps_where_example.sh) - -これまで、`ls`と`ps`を利用してファイルやプロセスの一覧を表示しました。Nu はこの他にも便利なテーブルを作り出すコマンドを提供します。次に`date`と`sys`をみてみましょう。 - -`date now`を実行すると、現在の日時と時間に関する情報が得られます。 - -@[code](@snippets/introduction/date_example.sh) - -`sys`は Nu が実行されているシステムに関する情報を提供します。 - -@[code](@snippets/introduction/sys_example.sh) - -これはさきほどまでのテーブルと少し異なります。`sys`コマンドは単純な値ではなくセルに構造化されたテーブルを含むテーブルを提供します。このデータを見るには表示する列を選択する必要があります。 - -@[code](@snippets/introduction/sys_get_example.sh) - -`get`コマンドを利用するとテーブルのカラムの内容を調べることができます。ここでは、Nu が実行されているホストに関する情報を含む"host"列を調べています。OS の名前、ホスト名、CPU などです。システム上のユーザーの名前を取得してみましょう。 - -@[code](@snippets/introduction/sys_get_nested_example.sh) - -現在、システムには"jonathan"という名前のユーザが1人だけいます。列の名前だけではなくパスも渡せることに気づくでしょう。Nu はパスを受け取るとテーブルの対応するデータを取得します。 - -テーブルデータではなく、文字列"jonathan"を取得したことに気づかれたかもしれません。Nu はテーブルだけでなく文字列も扱います。文字列は Nu 以外のコマンドを扱う上で重要な役割をはたします。 - -実際に Nu の外で文字列がどのように機能するか見てみましょう。先ほどの例で外部の`echo`コマンドを実行します。(`^`は組込みの`echo`コマンドを使用しないよう指示しています)。 - -@[code](@snippets/introduction/sys_get_external_echo_example.sh) - -するどい読者にはこれが以前ものと似ていると思われるでしょう。しかし、さきほどの出力で`echo`を呼び出しているという重要な違いがあります。このように、Nu からデータを`echo`(または`git`のような Nu 以外の任意のコマンド)にわたすことができるのです。 - -注:Nu の組み込みコマンドのヘルプテキストは、`help`コマンドで検出できます。 - -@[code](@snippets/introduction/help_example.sh) diff --git a/ja/book/loading_data.md b/ja/book/loading_data.md deleted file mode 100644 index c0ad08c60c5..00000000000 --- a/ja/book/loading_data.md +++ /dev/null @@ -1,169 +0,0 @@ -# データの読み込み - -これまでに、`ls`、`ps`、`date`、および`sys`コマンドを使って、ファイル、プロセス、日付そしてシステム自身の情報を取得する方法をみてきました。各コマンドはテーブル情報を提供しますが、他にもデータをテーブルに読み込む方法があります。 - -## ファイルを開く - -データを操作するための Nu の最も強力なコマンドのひとつが`open`コマンドです。これは様々なデータ形式に対応したマルチツールです。これがなにを意味するかをみるために、json ファイルを開いてみましょう。 - -@[code](@snippets/loading_data/vscode.sh) - -`ls`と同様、Nu が理解できるタイプのファイルを開くと、単なるテキスト(またはバイトストリーム)以上のものが返ってきます。ここでは、JavaScript プロジェクト内の"package.json"ファイルを開いています。Nu は JSON テキストを認識し、テーブルデータを返すことができます。 - -プロジェクトのバージョンを確認したい場合は、`get`コマンドを利用します。 - -``` -> open editors/vscode/package.json | get version -1.0.0 -``` - -Nu が現在、直接データをテーブルに読み込める形式は次の通りです。 - -- json -- yaml -- toml -- xml -- csv -- ini - -しかし、これらのいずれでもないテキストファイルを読み込むとどうなるでしょうか、試してみましょう。 - -``` -> open README.md -``` - -ファイルの内容が表示されます。ファイルが大きすぎる場合は、便利なスクロールビューでファイルの中身を確認してからターミナルに戻ってることができます。読みやすさのために、ソースファイルやマークダウンといった一般的なファイル形式ではシンタックスハイライトを提供します。 - -裏側では、Nu はこれらのファイルをひとつの大きな文字列としてみています。次に、これらの文字列から必要なデータを取得する方法について説明します。 - -## 文字列を扱う - -Nu の外からきたデータを Nu がいつも理解できるとは限らないことを理解しておくのは重要なことです。多くの場合このデータは文字列として与えられます。 - -以下のファイルが与えられたと想定してみましょう。 - -``` -> open people.txt -Octavia | Butler | Writer -Bob | Ross | Painter -Antonio | Vivaldi | Composer -``` - -必要なデータはパイプ('|')記号で区切られており、各行はそれぞれの人物を表しています。Nu はデフォルトではパイプで区切られたファイル形式を知らないので、明示的にこのファイルをパースする必要があります。 - -ファイルを読み込むときに最初に行うことは、1行ずつ作業することです。 - -``` -> open people.txt | lines -───┬────────────────────────────── - 0 │ Octavia | Butler | Writer - 1 │ Bob | Ross | Painter - 2 │ Antonio | Vivaldi | Composer -───┴────────────────────────────── -``` - -テーブルにもどってきたので、行を使って作業していることがわかります。次のステップは、行をもうすこし便利なものに分割できるかみてみることです。そのために、`split`コマンドを利用します。名前からわかるように、`split`は区切り文字を含む文字列を列に分割する方法を提供します。`split`の`column`サブコマンドを使って、複数の列に分割するします。必要なのは区切り文字を指定することだけです。 - -``` -> open people.txt | lines | split column "|" -───┬──────────┬───────────┬─────────── - # │ Column1 │ Column2 │ Column3 -───┼──────────┼───────────┼─────────── - 0 │ Octavia │ Butler │ Writer - 1 │ Bob │ Ross │ Painter - 2 │ Antonio │ Vivaldi │ Composer -───┴──────────┴───────────┴─────────── -``` - -ほとんど正しいように見えますが、余分なスペースを含んでいます。余分なスペースを`trim`してみましょう。 - -``` -> open people.txt | lines | split column "|" | str trim -───┬─────────┬─────────┬────────── - # │ Column1 │ Column2 │ Column3 -───┼─────────┼─────────┼────────── - 0 │ Octavia │ Butler │ Writer - 1 │ Bob │ Ross │ Painter - 2 │ Antonio │ Vivaldi │ Composer -───┴─────────┴─────────┴────────── -``` - -悪くありません。`split`コマンドは利用可能なデータとデフォルトのカラム名をつけてくれます。 - -``` -> open people.txt | lines | split column "|" | str trim | get Column1 -───┬───────── - 0 │ Octavia - 1 │ Bob - 2 │ Antonio -───┴───────── -``` - -デフォルトの名前を利用するかわりに、列に名前をつけることもできます。 - -``` -> open people.txt | lines | split column "|" first_name last_name job | str trim -───┬────────────┬───────────┬────────── - # │ first_name │ last_name │ job -───┼────────────┼───────────┼────────── - 0 │ Octavia │ Butler │ Writer - 1 │ Bob │ Ross │ Painter - 2 │ Antonio │ Vivaldi │ Composer -───┴────────────┴───────────┴────────── -``` - -データをテーブルに変換できたので、これまでテーブルに利用してきたすべてのコマンドをつかうことができます。 - -``` -> open people.txt | lines | split column "|" first_name last_name job | str trim | sort-by first_name -───┬────────────┬───────────┬────────── - # │ first_name │ last_name │ job -───┼────────────┼───────────┼────────── - 0 │ Antonio │ Vivaldi │ Composer - 1 │ Bob │ Ross │ Painter - 2 │ Octavia │ Butler │ Writer -───┴────────────┴───────────┴────────── -``` - -文字列を操作するために使用できるその他のコマンドです。 - -- str -- lines -- size - -データが Nu が理解できる構造をもっていることがわかっている場合に呼び出すことのできるヘルパーコマンドのセットもあります。例えば、Rust のロックファイルを開いてみましょう。 - -``` -> open Cargo.lock -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -[[package]] -name = "adhoc_derive" -version = "0.1.2" -``` - -"Cargo.lock"ファイルは実際には.toml ファイルですが、ファイル拡張子が.toml ではありません。でも大丈夫です、`from toml`コマンドが使えます。 - -@[code](@snippets/loading_data/cargo-toml.sh) - -`from`コマンドはサポートされているテキストフォーマットをサブコマンドとして渡すことで Nu が扱える構造化データごとに利用できます。 - -## raw モードで開く - -ファイルを開いてそのデータのテーブルをすぐに操作できると便利ですが、これは必ずしもやりたいことであるとは限りません。テキストをそのまま取得するために、`open`コマンドに`--raw`オプションフラグを渡すことができます。 - -``` -> open Cargo.toml --raw -[package] name = "nu" -version = "0.1.3" -authors = ["Yehuda Katz ", "Jonathan Turner "] -description = "A shell for the GitHub era" -license = "MIT" -``` - -## URL からの取得 - -ファイルシステムからファイルを読み込むことに加えて、`http get`コマンドを利用して URL からリソースを取得できます。 -これはインターネットから URL の内容をフェッチして返してくれます。 - -@[code](@snippets/loading_data/rust-lang-feed.sh) diff --git a/ja/book/math.md b/ja/book/math.md deleted file mode 100644 index 1db1c656e61..00000000000 --- a/ja/book/math.md +++ /dev/null @@ -1,61 +0,0 @@ -# Math - -何かの作業をしているとき、いくつかの数字を足し算したくなるときがあります。Nu には基本的な数学演算が用意されています。 - -"math mode"にするには、コマンドの先頭に`=`をつけます。これにより演算子を使用するコマンドを書くことができます。`where`コマンドのように自動でおこなってくれるコマンドもあります。 - -## 四則演算 - -``` -> = 1 + 3 -4 -``` - -Nu では足し算、引き算、掛け算、割り算をそれぞれ`+`,`-`,`*`そして`/`演算子でおこなうことができます。演算子の優先順位が考慮されるので`1 + 2 * 3`は`1 + (2 * 3)`として扱われます。 - -## 括弧 - -math mode では括弧を利用して数式をグループ化できます。これにより足し算を優先したいときは`(1 + 2) * 3`と書くことができます。 - -## `in`と`not-in` - -`in`と`not-in`演算子を使って、値が集合に含まれるかどうかを調べることができます。 - -``` -> = 1 in [1 2 3] -true -``` - -``` -> = 1 not-in [1 2 3] -false -``` - -## `=~`と`!~` - -`=~`と`!~`演算子を使って文字列が他の文字列の中にあるかどうかを調べることができます。 - -``` -> = "foobar" =~ "foo" -true -``` - -``` -> = "foobar" !~ "baz" -true -``` - -## 比較演算子 - -以下の比較演算子が利用可能です。 - -- `<` - less than -- `<=` - less than or equal to -- `>` - greater than -- `>=` - greater than or equal to -- `==` - equal to -- `!=` - not equal to - -## 複合演算子 - -`&&`と`||`を使ってブーリアンを返す2つの操作を結合できます。例えば: `ls | where name in ["one" "two" "three"] && size > 10kb` diff --git a/ja/book/metadata.md b/ja/book/metadata.md deleted file mode 100644 index 6dbe823bff3..00000000000 --- a/ja/book/metadata.md +++ /dev/null @@ -1,42 +0,0 @@ -# メタデータ - -Nu を使用していると裏でなにか特別なことがおきているのではないかと思うことがあるでしょう。例えば、Nu がサポートしているファイル形式を忘れていて、余計に変換しようとしてしまったとしましょう。 - -``` -> open Cargo.toml | from toml -error: Expected a string from pipeline -- shell:1:18 -1 | open Cargo.toml | from toml - | ^^^^^^^^^ requires string input -- shell:1:5 -1 | open Cargo.toml | from toml - | ---------- object originates from here -``` - -エラーメッセージは、`from toml`に渡したものが文字列ではなかったことだけではなく、元の値がどこから来たかも示しています。どうやってこれを知るのでしょうか。 - -Nu のパイプラインを流れる値には、多くの場合、メタデータと呼ばれる一連の追加情報が付加されます。これらはストアにあるアイテムにつけられているタグのようにタグと呼ばれています。これらのタグはデータには影響しませんが、データを操作する際の体験を向上させます。 - -もう一度`open`コマンドを実行してみましょう、ただし今回は、返されるタグを確認します。 - -``` -> open Cargo.toml | tags -────────┬─────────────────────────────────────────── - span │ [row end start] - anchor │ /home/jonathant/Source/nushell/Cargo.toml -────────┴─────────────────────────────────────────── -``` - -現在、パイプライン上の値について2つのメタデータを追跡しています。このデータがどこから読み込まれたかをしめす anchor があることに気づくでしょう。これにより Nu はデータの表示方法をよりよく理解できるのです。 - -今度は span をみてみましょう。 - -``` -> open Cargo.toml | tags | get span -───────┬──── - start │ 5 - end │ 15 -───────┴──── -``` - -ここでの"start"と"end"の span は下線が行のどこにあるのかを示しています。5 から 15 まで数えてみるとそれが"Cargo.toml"ファイル名と一致することがわかるでしょう。このようにして、さきほどみたエラーはどこに下線をひくべきかをしったのです。 diff --git a/ja/book/moving_around.md b/ja/book/moving_around.md deleted file mode 100644 index 1b570fdb450..00000000000 --- a/ja/book/moving_around.md +++ /dev/null @@ -1,53 +0,0 @@ -# システム内の移動 - -初期のシェルを使うとシステム内を移動してコマンドを実行することができますが、Nu のような現代的なシェルでも同じことができます。システムを操作する際によく使われるコマンドをいくつか見てみましょう。 - -## ディレクトリの内容を確認する - -@[code](@snippets/moving_around/ls_example.sh) - -他の章でみてきたように、`ls`はパスの内容を表示するためのコマンドです。Nu はパスの内容をテーブルとして返してくれます。 - -`ls`コマンドには表示する内容を変更するためにオプションで引数を渡すことができます。例えば".md"で終わるファイルの一覧を表示することができます。glob"\*.md"はファイルが'.md'で終わっていればマッチすると読むことができます。 - -@[code](@snippets/moving_around/ls_shallow_glob_example.sh) - -上記のオプション引数"\*.txt"の中で利用されているアスタリスク(\*)はしばしばワイルドカードやグロブと呼ばれ、何にでもマッチします。グロブ"\*.txt"は"'.txt'で終わる任意のファイルにマッチする"と読むことができます。 - -Nu はより深いディレクトリにアクセスできる最新のグロブも利用します。 - -@[code](@snippets/moving_around/ls_deep_glob_example.sh) - -ここでは".md"で終わるファイルを探していますが、2つのアスタリスクはさらに"ここから始まる任意のディレクトリにある"という意味です。 - -## 現在のディレクトリを変更する - -@[code](@snippets/moving_around/cd_example.sh) - -現在のディレクトリを変更するには`cd`コマンドを使います。他のシェルと同じように、ディレクトリの名前か上の階層に移動する場合は`..`ショートカットを利用します。 - -`cd`を省略してパスだけを指定することでも現在の作業ディレクトリを変更することができます。 - -@[code](@snippets/moving_around/cd_without_command_example.sh) - -## ファイルシステムのコマンド - -Nu はクロスプラットフォームで動作するいくつかの基本的なファイルシステムのコマンドも提供します。 - -`mv`コマンドを利用すればアイテムをある場所から別の場所へ移動できます。 - -@[code](@snippets/moving_around/mv_example.sh) - -ある場所から別の場所へアイテムのコピーができます。 - -@[code](@snippets/moving_around/cp_example.sh) - -アイテムの削除ができます。 - -@[code](@snippets/moving_around/rm_example.sh) - -3つのコマンドは`ls`コマンドでみたグロブ機能も利用できます。 - -最後に、`mkdir`コマンドで新しいディレクトリを作成できます。 - -@[code](@snippets/moving_around/mkdir_example.sh) diff --git a/ja/book/nushell_map.md b/ja/book/nushell_map.md deleted file mode 100644 index f69b7b26f26..00000000000 --- a/ja/book/nushell_map.md +++ /dev/null @@ -1,108 +0,0 @@ -# 他のシェルと DSL から Nu への対応表 - -このテーブルは Nu の組込みコマンドやプラグインと他のシェルや DLS(Domain Specific Languages)との対応関係を理解することを助けるためのものです。ここでは全ての Nu コマンドとそのコマンドが他の言語でどう使われているかをマッピングしています。コントリビューション歓迎です。 - -注: Nu が 0.14.1 以降であることを想定しています。 - -| Nushell | SQL | .Net LINQ (C#) | PowerShell (without external modules) | Bash | -| ----------------- | ------------------------------------------------ | ---------------------------------------------------- | ------------------------------------------ | ----------------------------------------------- | -| alias | - | - | alias | alias | -| append | - | Append | -Append | | -| args | - | - | | | -| autoview | - | - | | | -| average(`*`) | avg | Average | Measure-Object, measure | | -| binaryview(`*`) | - | | Format-Hex | | -| calc, = math | math operators | Aggregate, Average, Count, Max, Min, Sum | | bc | -| cd | - | - | Set-Location, cd | cd | -| clear | - | - | Clear-Host | clear | -| clip | - | - | Set-Clipboard, scb | clip, clipboard, xclip, pbcopy | -| compact | | | | | -| config | - | - | $Profile | vi .bashrc, .profile | -| count | count | Count | Measure-Object, measure | wc | -| cp | - | - | Copy-Item, cp, copy | cp | -| date | NOW() / getdate() | DateTime class | Get-Date | date | -| debug | | | | | -| = dec | | x-- | | | -| default | | | | | -| drop | | | | | -| du | - | - | | du | -| each | cursor | | ForEach-Object, foreach, for | | -| echo | print | - | Write-Output, write | echo | -| enter | - | - | | | -| evaluate_by | | | | | -| exit | - | | exit | exit | -| first | top, limit | First, FirstOrDefault | Select-Object -First | head | -| format | | String.Format | String.Format | | -| from | import flatfile, openjson, cast(variable as xml) | - | Import/ConvertFrom-{Csv,Xml,Html,Json} | | -| get | | Select | (cmd).column | | -| group_by | group by | GroupBy, group | Group-Object, group | | -| headers | | | | | -| help | sp_help | - | Get-Help, help, man | man | -| histogram | - | - | | | -| history | - | - | Get-History, history | history | -| http(`*`) | - | HttpClient,WebClient, HttpWebRequest/Response | Invoke-WebRequest | wget | -| inc(`*`) | - | | - | - | -| insert | | | Add-Member | | -| is_empty | is null | String.InNullOrEmpty | String.InNullOrEmpty | | -| keep, =take | top, limit | Take | Select-Object -First | head | -| keep_until | | | | | -| keep_while | | TakeWhile | | | -| kill | - | - | Stop-Process, kill | kill | -| last | | Last, LastOrDefault | Select-Object -Last | tail | -| lines | - | - | File.ReadAllLines | | -| ls | - | - | Get-ChildItem, dir, ls | ls | -| map_max_by | | | | | -| match(`*`) | case when | Regex.IsMatch | [regex] | | -| merge | | | | | -| mkdir | - | - | mkdir, md | mkdir | -| mv | - | - | Move-Item, mv, move, mi | mv | -| next | | | | | -| nth | limit x offset y, rownumber = | ElementAt | [x], indexing operator, ElementAt | | -| open | | | Get-Content, gc, cat, type | cat | -| parse | | | | | -| pivot, =transpose | pivot | - | | | -| post(`*`) | - | HttpClient,WebClient, HttpWebRequest/Response | Invoke-WebRequest | | -| prepend | | | | | -| prev | | | | | -| ps(`*`) | - | - | Get-Process, ps, gps | ps | -| pwd | - | - | Get-Location, pwd | pwd | -| range | | Range | 1..10, 'a'..'f' | | -| reduce_by | | Aggregate | | | -| reject | | | | | -| rename | - | - | Rename-Item, ren, rni | mv | -| reverse | | Reverse | [Array]::Reverse($var) | | -| rm | - | - | Remove-Item, del, erase, rd, ri, rm, rmdir | rm | -| save | - | - | Write-Output, Out-File | > foo.txt | -| select(`***`) | select | Select | Select-Object, select | | -| shells | - | - | - | | -| shuffle | | Random | $var | Sort-Object {Get-Random} | -| size | | | Measure-Object, measure | wc | -| skip | where row_number() | Skip | Select-Object -Skip | | -| skip_until | | | | | -| skip_while | | SkipWhile | | | -| sort-by | order by | OrderBy, OrderByDescending, ThenBy, ThenByDescending | Sort-Object, sort | | -| split_by | | Split | Split | | -| split_column | | - | | | -| split_row | | - | | | -| str(`*`) | string functions | String class | String class | | -| sum | sum | Sum | Measure-Object, measure | | -| sys(`*`) | - | - | Get-ComputerInfo | uname, lshw, lsblk, lscpu, lsusb, hdparam, free | -| table | | | Format-Table, ft, Format-List, fl | | -| tags | - | - | - | | -| textview(`*`) | - | - | Get-Content, cat | | -| tree(`*`) | - | - | tree | | -| to | - | - | Export/ConvertTo-{Csv,Xml,Html,Json} | | -| touch | - | - | Set-Content | touch | -| trim | rtrim, ltrim | Trim, TrimStart, TrimEnd | Trim | | -| uniq | distinct | Distinct | Get-Unique, gu | uniq | -| update(`**`) | As | - | | | -| version | select @@version | - | $PSVersionTable | | -| with_env | - | - | $env:FOO = 'bar' | export foo = "bar" | -| what | | | | | -| where | where | Where | Where-Object, where, "?" operator | | -| which | - | - | - | which | -| wrap | | | | | - -- `*` - these commands are part of the standard plugins -- `**` - renamed from `edit` to `update` in 0.13.1 -- `***` - renamed from `pick` to `select` in 0.13.1 diff --git a/ja/book/nushell_map_functional.md b/ja/book/nushell_map_functional.md deleted file mode 100644 index ad292f845e3..00000000000 --- a/ja/book/nushell_map_functional.md +++ /dev/null @@ -1,107 +0,0 @@ -# 関数型言語から Nu への対応表 - -このテーブルは Nu の組込みコマンドやプラグインと他の関数型言語との対応関係を理解することを助けるためのものです。ここでは全ての Nu コマンドとそのコマンドが他の言語でどう使われているかをマッピングしています。コントリビューション歓迎です。 - -注: Nu が 0.14.1 以降であることを想定しています。 - -| Nushell | Clojure | Tablecloth (Ocaml / Elm) | Haskell | | -| ----------------- | ---------------------------- | ------------------------------- | ------------------------ | --- | -| alias | | | | | -| append | conj, into, concat | append, (++), concat, concatMap | (++) | | -| args | | | | | -| autoview | | | | | -| average(`*`) | | | | | -| binaryview(`*`) | Integer/toHexString | | showHex | | -| calc, = math | math operators | | | | -| cd | | | | | -| clear | | | | | -| clip | | | | | -| compact | | | | | -| config | | | | | -| count | count | length, size | length, size | | -| cp | | | | | -| date | java.time.LocalDate/now | | | | -| debug | | | | | -| default | | | | | -| drop | | | | | -| du | | | | | -| each | map, mapv, iterate | map, forEach | map | | -| echo | println | | putStrLn, print | | -| enter | | | | | -| evaluate_by | | | | | -| exit | System/exit | | | | -| first | first | head | head | | -| format | format | | Text.Printf.printf | | -| from | | | | | -| get | | | | | -| group_by | group-by | | group, groupBy | | -| headers | | | | | -| help | doc | | | | -| histogram | | | | | -| history | | | | | -| http(`*`) | | | | | -| inc(`*`) | inc | | succ | | -| insert | | | | | -| is-empty | empty? | isEmpty | | | -| keep | take, drop-last, pop | take, init | take, init | | -| keep_until | | | | | -| keep_while | take-while | takeWhile | takeWhile | | -| kill | | | | | -| last | last, peek, take-last | last | last | | -| lines | | | lines, words, split-with | | -| ls | | | | | -| map_max_by | | | | | -| match(`*`) | re-matches, re-seq, re-find | | | | -| merge | | | | | -| mkdir | | | | | -| mv | | | | | -| next | | | | | -| nth | nth | Array.get | lookup | | -| open | with-open | | | | -| parse | | | | | -| pivot, =transpose | (apply mapv vector matrix) | | transpose | | -| post(`*`) | | | | | -| prepend | cons | cons, :: | :: | | -| prev | | | | | -| ps(`*`) | | | | | -| pwd | | | | | -| range | range | range | 1..10, 'a'..'f' | | -| reduce_by | reduce, reduce-kv | foldr | foldr | | -| reject | | | | | -| rename | | | | | -| reverse | reverse, rseq | reverse, reverseInPlace | reverse | | -| rm | | | | | -| save | | | | | -| select(`***`) | select-keys | | | | -| shells | | | | | -| shuffle | shuffle | | | | -| size | count | | size, length | | -| skip | rest | tail | tail | | -| skip_until | | | | | -| skip_while | drop-while | dropWhile | dropWhile, dropWhileEnd | | -| sort-by | sort, sort-by, sorted-set-by | sort, sortBy, sortWith | sort, sortBy | | -| split_by | split, split-{at,with,lines} | split, words, lines | split, words, lines | | -| split_column | | | | | -| split_row | | | | | -| str(`*`) | clojure.string functions | String functions | | | -| sum | apply + | sum | sum | | -| sys(`*`) | | | | | -| table | | | | | -| tags | | | | | -| textview(`*`) | | | | | -| tree(`*`) | | | | | -| to | | | | | -| touch | | | | | -| trim | trim, triml, trimr | trim, trimLeft, trimRight | strip | | -| uniq | set | Set.empty | Data.Set | | -| update(`**`) | | | | | -| version | | | | | -| with_env | | | | | -| what | | | | | -| where | filter, filterv, select | filter, filterMap | filter | | -| which | | | | | -| wrap | | | | | - -- `*` - these commands are part of the standard plugins -- `**` - renamed from `edit` to `update` in 0.13.1 -- `***` - renamed from `pick` to `select` in 0.13.1 diff --git a/ja/book/nushell_map_imperative.md b/ja/book/nushell_map_imperative.md deleted file mode 100644 index 9fecae66120..00000000000 --- a/ja/book/nushell_map_imperative.md +++ /dev/null @@ -1,107 +0,0 @@ -# 命令形言語から Nu への対応表 - -このテーブルは Nu の組込みコマンドやプラグインと他の命令型言語との対応関係を理解することを助けるためのものです。ここでは全ての Nu コマンドとそのコマンドが他の言語でどう使われているかをマッピングしています。コントリビューション歓迎です。 - -注: Nu が 0.14.1 以降であることを想定しています。 - -| Nushell | Python | Kotlin (Java) | C++ | Rust | -| ----------------- | ----------------------------- | --------------------------------------------------- | ----------------------- | --------------------------------------------- | -| alias | | | | | -| append | list.append, set.add | add | push_back, emplace_back | push, push_back | -| args | | | | | -| autoview | | | | | -| average(`*`) | statistics.mean | | | | -| binaryview(`*`) | \"{:x}\".format | Integer.toHexString | | | -| calc, = math | math operators | math operators | math operators | math operators | -| cd | | | | | -| clear | | | | | -| clip | | | | | -| compact | | | | | -| config | | | | | -| count | len | size, length | length | len | -| cp | shutil.copy | | | | -| date | datetime.date.today | java.time.LocalDate.now | | | -| debug | | | | | -| default | | | | | -| drop | | | | | -| du | shutil.disk_usage | | | | -| each | for | for | for | for | -| echo | print | println | printf | println! | -| enter | | | | | -| evaluate_by | | | | | -| exit | exit | System.exit, kotlin.system.exitProcess | exit | exit | -| first | list[0] | List[0], peek | vector[0], top | Vec[0] | -| format | format | format | format | format! | -| from | csv, json, sqlite3 | | | | -| get | dict[\"key\"] | Map[\"key\"] | map[\"key\"] | HashMap["key"], get, entry | -| group_by | itertools.groupby | groupBy | | group_by | -| headers | | | | | -| help | help | | | | -| histogram | | | | | -| history | | | | | -| http(`*`) | urllib.request.urlopen | | | | -| inc(`*`) | x += 1 | x++ | x++ | x += 1 | -| insert | list.insert | | | | -| is_empty | is None | isEmpty | empty | is_empty | -| keep | list[:x] | | | &Vec[..x] | -| keep_until | | | | | -| keep_while | itertools.takewhile | | | | -| kill | os.kill | | | | -| last | list[-1] | | | &Vec[Vec.len()-1] | -| lines | split, splitlines | split | views::split | split, split_whitespace, rsplit, lines | -| ls | os.listdir | | | | -| map_max_by | | | | | -| match(`*`) | re.findall | Regex.matches | regex_match | | -| merge | | | | | -| mkdir | os.mkdir | | | | -| mv | shutil.move | | | | -| next | | | | | -| nth | list[x] | List[x] | vector[x] | Vec[x] | -| open | open | | | | -| parse | | | | | -| pivot, =transpose | zip(\*matrix) | | | | -| post(`*`) | urllib.request.urlopen | | | | -| prepend | deque.appendleft | | | | -| prev | | | | | -| ps(`*`) | os.listdir('/proc') | | | | -| pwd | os.getcwd | | | | -| range | range | .., until, downTo, step | iota | .. | -| reduce_by | functools.reduce | reduce | reduce | fold, rfold, scan | -| reject | | | | | -| rename | shutil.move | | | | -| reverse | reversed, list.reverse | reverse, reversed, asReversed | reverse | rev | -| rm | os.remove | | | | -| save | io.TextIOWrapper.write | | | | -| select(`***`) | {k:dict[k] for k in keylist} | | | | -| shells | | | | | -| shuffle | random.shuffle | | | | -| size | len | | | | -| skip | list[x:] | | | &Vec[x..] | -| skip_until | | | | | -| skip_while | itertools.dropwhile | | | | -| sort-by | sorted, list.sort | sortedBy, sortedWith, Arrays.sort, Collections.sort | sort | sort | -| split_by | str.split{,lines}, re.split | split | views::split | split | -| split_column | | | | | -| split_row | | | | | -| str(`*`) | str functions | String functions | string functions | &str, String functions | -| sum | sum | sum | reduce | sum | -| sys(`*`) | sys | | | | -| table | | | | | -| tags | | | | | -| textview(`*`) | | | | | -| tree(`*`) | | | | | -| to | csv, json, sqlite3 | | | | -| touch | open(path, 'a').close() | | | | -| trim | strip, rstrip, lstrip | trim, trimStart, trimEnd | regex | trim, trim*{start,end}, strip*{suffix,prefix} | -| uniq | set | Set | set | HashSet | -| update(`**`) | | | | | -| version | sys.version, sys.version_info | | | | -| with_env | os.environ | | | | -| what | | | | | -| where | filter | filter | filter | filter | -| which | shutil.which | | | | -| wrap | | | | | - -- `*` - these commands are part of the standard plugins -- `**` - renamed from `edit` to `update` in 0.13.1 -- `***` - renamed from `pick` to `select` in 0.13.1 diff --git a/ja/book/nushell_operator_map.md b/ja/book/nushell_operator_map.md deleted file mode 100644 index 9a736fa97c4..00000000000 --- a/ja/book/nushell_operator_map.md +++ /dev/null @@ -1,24 +0,0 @@ -# Nushell 演算子対応表 - -このテーブルは Nu の演算子と他言語の演算子の対応関係を理解するのを助けるためのものです。ここでは全ての Nu の演算子とその演算子が他の言語でどう使われているかをマッピングしています。コントリビューション歓迎です。 - -注: Nu が 0.14.1 以降であることを想定しています。 - -| Nushell | SQL | Python | .Net LINQ (C#) | PowerShell | Bash | -| ------- | -------- | ------------------ | -------------------- | ---------------------- | ------------------ | -| == | = | == | == | -eq, -is | -eq | -| != | !=, <> | != | != | -ne, -isnot | -ne | -| < | < | < | < | -lt | -lt | -| <= | <= | <= | <= | -le | -le | -| > | > | > | > | -gt | -gt | -| >= | >= | >= | >= | -ge | -ge | -| =~ | like | re, in, startswith | Contains, StartsWith | -like, -contains | =~ | -| !~ | not like | not in | Except | -notlike, -notcontains | ! "str1" =~ "str2" | -| + | + | + | + | + | + | -| - | - | - | - | - | - | -| \* | \* | \* | \* | \* | \* | -| / | / | / | / | / | / | -| in | in | re, in, startswith | Contains, StartsWith | -In | case in | -| not-in | not in | not in | Except | -NotIn | | -| and | and | and | && | -And | -a, && | -| or | or | or | \|\| | -Or | -o, \|\| | diff --git a/ja/book/pipeline.md b/ja/book/pipeline.md deleted file mode 100644 index f49b16d46d0..00000000000 --- a/ja/book/pipeline.md +++ /dev/null @@ -1,51 +0,0 @@ -# パイプライン - -Nu のコアデザインのひとつがパイプラインです。パイプラインは Unix の背後にある哲学にまでそのルーツを遡ることができるデザインアイデアです。Nu は、Unix の文字列データを拡張したように、パイプラインの概念も拡張してテキスト以外のものも扱えるようにします。 - -## 基礎 - -パイプラインは、入力、フィルター、出力の3つの部分から構成されます。 - -``` -> open "Cargo.toml" | inc package.version | save "Cargo_new.toml" -``` - -最初のコマンド`open "Cargo.toml"`が入力です(しばしば"source"や"producer"と呼ばれます)。これによりデータが作成またはロードされパイプラインに送られます。パイプラインは入力から渡された値を扱います。`ls`のようなコマンドも入力です。ファイルシステムからデータを取得し、パイプラインを経由して扱えるようにするからです。 - -2番目のコマンド`inc package.version`はフィルターです。フィルターは与えられたデータをうけとると大抵の場合はなにかします。それは変更(`inc`コマンドの例のように)であったり、ロギングなどの別の操作かもしれません。 - -最後のコマンド`save "Cargo_new.toml"`が出力です("sink"と呼ばれることもあります)。出力はパイプラインから入力を受け取り、最終的な操作を実行します。この例では、最終ステップとして、パイプラインを介しておくられてきたものをファイルに保存しています。他の出力コマンドとしては、値をうけとりユーザのために表示するものがあります。 - -## 外部コマンドの使用 - -Nu のコマンドは互いに Nu のデータ型([types of data](types_of_data.md)を参照してください)を利用してやりとりします。しかし、Nu 以外のコマンドはどうでしょうか。外部コマンドの使用例をみてみましょう。 - -`internal_command | external_command` - -データは内部コマンドから外部コマンドにむかって流れます。このデータは文字列であることが期待されるので、外部コマンドの`stdin`に送られます。 - -`external_command | internal_command` - -外部コマンドから Nu に送られるデータは単一の文字列にまとめられ、内部コマンドに渡されます。`lines`のようなコマンドは外部からのデータを取り込む際に便利です。 - -`external_command_1 | external_command_2` - -Nu は Bash のような他のシェルと同じように2つの外部コマンドでパイプされるデータを処理します。外部コマンド1の`stdout`は外部コマンド2の`stdin`につながれます。これにより2つのコマンドの間でデータは自然にやりとりされます。 - -## 内部の仕組み - -`ls`が出力ではなく入力の場合、テーブルがどのように表示されるのか疑問に思われるかもしれません。Nu は`autoview`とよばれるコマンドを自動的に出力に加えます。`autoview`コマンドは結果を確認できる出力をもたないパイプラインに追加されるのです。 - -実質的にこのコマンドと - -``` -> ls -``` - -このパイプラインは - -``` -> ls | autoview -``` - -同じものです。 diff --git a/ja/book/plugins.md b/ja/book/plugins.md deleted file mode 100644 index 658768b3c45..00000000000 --- a/ja/book/plugins.md +++ /dev/null @@ -1,12 +0,0 @@ -# プラグイン - -プラグインを用いることで Nu の機能を拡張することができます。プラグインは、Nu の組み込みコマンドと同じ操作の多くを実行することができ、Nu 本体とは別に追加できるという利点もあります。 - -プラグインを追加するには、ビルドして PATH にバイナリーを配置するだけです。Nu のプラグインは、PATH 内の他のバイナリーと区別できるように`nu_plugin_`というファイル名ではじまります。 - -**注:** 将来的には、プラグインは Nu がみつけられるように特定の場所に配置されることになるかもしれません。 - -Nu が起動すると、システムがスキャンされ、見つかったプラグインがロードされます。 - -Nu プラグインが利用するプロトコルは Nu の開発中に変更される可能性があります。プロトコルの詳細と独自のプラグインの作成方法を学ぶのに最適なのは、[Nu リポジトリのプラグインのソース](https://github.com/nushell/nushell/tree/master/crates)を読むことです。 -[コントリビュータブックのプラグインの章](https://github.com/nushell/contributor-book/blob/master/en/plugins.md)も参照してください。 diff --git a/ja/book/quick_tour.md b/ja/book/quick_tour.md deleted file mode 100644 index d0d41e9494e..00000000000 --- a/ja/book/quick_tour.md +++ /dev/null @@ -1,67 +0,0 @@ -# クイックツアー - -Nu で何ができるかを知るための最も簡単な方法は、例をいくつか見ることです。では始めましょう。 - -[`ls`](/commands/docs/ls.md) などのコマンドを実行してまず気づくことは、テキストブロックの代わりに構造化されたテーブルが返ってくることです。 - -@[code](@snippets/introduction/ls_example.sh) - -このテーブルは、ただ別の形でディレクトリを表示しているだけではありません。スプレッドシートのように、このテーブルではデータをより対話的に扱うことができます。 - -はじめに、テーブルをサイズでソートしてみましょう。 [`ls`](/commands/docs/ls.md) の出力を取得し、カラムの値に基づいてテーブルをソートするコマンドに渡してみます。 - -@[code](@snippets/introduction/ls_sort_by_reverse_example.sh) - -これをするのに、 [`ls`](/commands/docs/ls.md) にコマンドライン引数を渡してはいないことが確認できます。代わりに、 Nu が [`ls`](/commands/docs/ls.md) コマンドの出力をソートするために提供している [`sort-by`](/commands/docs/sort-by.md) コマンドを使用しています。また、最も大きいファイルが一番上に来るように、 [`reverse`](/commands/docs/reverse.md) も使用しています。 - -Nu はテーブルを操作するコマンドを多数提供しています。例えば、 [`where`](/commands/docs/where.md) を使用して [`ls`](/commands/docs/ls.md) テーブルのコンテンツをフィルターすることができるので、1キロバイトを超えるファイルのみを表示することができます。 - -@[code](@snippets/introduction/ls_where_example.sh) - -Unix の哲学と同様、互いに対話可能なコマンドにより、さまざまな異なる組み合わせの使用が可能になります。では、別のコマンドを見てみましょう。 - -@[code](@snippets/introduction/ps_example.sh) - -もし Linux を使用したことがあるなら、 [`ps`](/commands/docs/ps.md) コマンドは馴染みがあるでしょう。これを使用して、システム上で現在実行されている全てのプロセスのリストと、それらのステータス、名前を取得することができます。プロセスのCPU使用率を見ることもできます。 - -いま表示したいのは、CPUをたくさん使用しているプロセスですか? [`ls`](/commands/docs/ls.md) コマンドで以前したのと同じように、 [`ps`](/commands/docs/ps.md) コマンドが返したテーブルに対しても操作することができます。 - -@[code](@snippets/introduction/ps_where_example.sh) - -いま、[`ls`](/commands/docs/ls.md) と [`ps`](/commands/docs/ps.md) を使用してファイルとプロセスのリストを表示しました。Nu はほかにも有用な情報をもつテーブルを作成するコマンドを提供しています。次は、 [`date`](/commands/docs/date.md) と [`sys`](/commands/docs/sys.md) について見てみましょう。 - -[`date now`](/commands/docs/date_now.md) を実行すると、現在の日時に関する情報が得られます。 - -@[code](@snippets/introduction/date_example.sh) - -テーブルとして取得したい場合は、これを [`date to-table`](/commands/docs/date_to-table.md) に渡します。 - -@[code](@snippets/introduction/date_table_example.sh) - -[`sys`](/commands/docs/sys.md) を実行すると、 Nu が実行されているシステムに関する情報が得られます。 - -@[code](@snippets/introduction/sys_example.sh) - -これはいままでに見たテーブルと少し異なります。 [`sys`](/commands/docs/sys.md) コマンドは、単純な値の代わりに構造化されたテーブルをセルに持つテーブルを返します。このデータを覗くには、カラムを _get_ する必要があります。 - -@[code](@snippets/introduction/sys_get_example.sh) - -[`get`](/commands/docs/get.md) コマンドを使用すると、テーブルのカラムの内容にジャンプすることができます。この例では、 Nu が実行されているホストに関する情報が含まれる "host" カラムを見ています。OSの名前、ホスト名、CPUなどです。では、システム上に存在するユーザーの名前を取得してみましょう。 - -@[code](@snippets/introduction/sys_get_nested_example.sh) - -いま、システムには "jt" という名前のユーザー一人だけがいます。ここで、ただのカラム名ではなく、カラムのパス( `host.sessions.name` の部分)を渡していることに気づくでしょう。Nu はカラムのパスを受け取って、テーブル中の対応する部分に移動します。 - -もう一つ違いがあることに気づいたかもしれません。データのテーブルではなく、文字列 "jt" という、ただ一つの要素を受け取っています。Nu はデータのテーブルでも、文字列でも動作します。文字列は Nu の外部コマンドで作業する際の重要な役割を担います。 - -実際に Nu の外部での文字列の働きを見てみましょう。先程の例にならい、[`echo`](/commands/docs/echo.md) コマンド( `^` は Nu に、ビルトインの [`echo`](/commands/docs/echo.md) コマンドを使用しないことを伝えます)を実行してみます - -@[code](@snippets/introduction/sys_get_external_echo_example.sh) - -これが前に試したものとよく似ているように見えるなら鋭いです!これは似ていますが、一つ重要な違いがあります。先程の値で `^echo` を呼び出しました。これで、データをNu から [`echo`](/commands/docs/echo.md) (あるいは `git` のような、あらゆる Nu の外部のコマンド)に渡すことができるのです。 - -### ヘルプの取得 - -Nu のビルトインコマンド全てのヘルプテキストは、 [`help`](/commands/docs/help.md) で見つけることができます。すべてのコマンドを見たい場合は、 [`help commands`](/commands/docs/help_commands.md) を実行してください。また、 `help -f ` を実行すれば、あるトピックについて検索することもできます。 - -@[code](@snippets/introduction/help_example.sh) diff --git a/ja/book/shells_in_shells.md b/ja/book/shells_in_shells.md deleted file mode 100644 index 4552f816a6e..00000000000 --- a/ja/book/shells_in_shells.md +++ /dev/null @@ -1,52 +0,0 @@ -# シェルの中のシェル - -## 複数のディレクトリで作業する - -ひとつのディレクトリで作業することが一般的ですが、同時に複数の場所で作業できれば便利です。このため、Nu は"shells"という概念を提供します。その名の通り、これらは同じ場所で複数のシェルを実行する方法であり、作業ディレクトリ間をすばやく移動することができます。 - -まずはじめに、ディレクトリを入力しましょう。 - -``` -/home/jonathan/Source/nushell(main)> enter ../book -/home/jonathan/Source/book(main)> ls -────┬────────────────────┬──────┬────────┬───────────── - # │ name │ type │ size │ modified -────┼────────────────────┼──────┼────────┼───────────── - 0 │ 404.html │ File │ 429 B │ 2 hours ago - 1 │ CONTRIBUTING.md │ File │ 955 B │ 2 hours ago - 2 │ Gemfile │ File │ 1.1 KB │ 2 hours ago - 3 │ Gemfile.lock │ File │ 6.9 KB │ 2 hours ago -``` - -`enter`はディレクトリの変更に似ています(`cd`コマンドでみたように)。これによりディレクトリにジャンプして作業することができます。ディレクトリを変更するかわりに、今2つのディレクトリの中にいます。このことをより明確にするために、`shells`コマンドを実行して、アクティブな現在のディレクトリの一覧を表示してみましょう。 - -``` -/home/jonathan/Source/book(main)> enter ../music -/home/jonathan/Source/music(main)> shells -───┬────────┬─────────────────────────────── - # │ active │ path -───┼────────┼─────────────────────────────── - 0 │ false │ /home/jonathan/Source/nushell - 1 │ false │ /home/jonathan/Source/book - 2 │ true │ /home/jonathan/Source/music -───┴────────┴─────────────────────────────── -``` - -`shells`コマンドは現在3つのシェルが存在していることを示しています。もともといた"nushell"のソースディレクトリと、"book"ディレクトリ、それに現在アクティブになっている"music"ディレクトリです。 - -"next"、"previous"、"goto"のショートカットである`n`、`p`、`g`を利用して、これらのシェルを行き来できます。 - -``` -/home/jonathan/Source/music(main)> p -/home/jonathan/Source/book(main)> n -/home/jonathan/Source/music(main)> g 0 -/home/jonathan/Source/nushell(main)> -``` - -ディレクトリを変更できることがわかります。そしていつでも元いた作業ディレクトリに戻ることができるのです。これにより、同じセッションにいながら複数のディレクトリで作業できます。 - -## シェルを終了する - -`dexit`コマンドを利用して`enter`したシェルを終了することができます。 - -複数のシェルが存在しているときでも、`exit`を使用すればいつでもNuを終了することができます。 diff --git a/ja/book/table_of_contents.md b/ja/book/table_of_contents.md deleted file mode 100644 index a3c08d15c04..00000000000 --- a/ja/book/table_of_contents.md +++ /dev/null @@ -1,14 +0,0 @@ -# 目次 - -- [インストール](installation.md) - nushell のインストール -- [はじめに](introduction.md) - nushell をはじめよう -- [ファイルシステムの操作](moving_around.md) - nushell からファイルシステムを扱おう -- [データ型](types_of_data.md) - nushell のデータ型 -- [データの読み込み](loading_data.md) - データの読み込みとその利用方法 -- [テーブル](working_with_tables.md) - テーブルを利用してみよう -- [パイプライン](pipeline.md) - パイプラインの仕組み -- [設定](configuration.md) - nushell の設定 -- [メタデータ](metadata.md) - nushell におけるメタデータについて -- [シェル](shells_in_shells.md) - 複数の場所で作業しよう -- [コマンドのエスケープ](escaping.md) - Nu コマンドと同じ名前のコマンドを実行するには -- [プラグイン](plugins.md) - プラグインを利用して nushell を拡張する diff --git a/ja/book/types_of_data.md b/ja/book/types_of_data.md deleted file mode 100644 index 47932ce3844..00000000000 --- a/ja/book/types_of_data.md +++ /dev/null @@ -1,110 +0,0 @@ -# データ型 - -従来、Unix シェルコマンドは文字列テキストを通じて互いに通信してきました。あるコマンドは標準出力(しばしば'stdout'と略されます)を介してテキストを出力し、他方のコマンドは標準入力(または'stdin')を介してテキストを読み込みます。このようにして、2つのコマンドは通信できます。 - -この種の通信は文字列ベースと考えることができます。 - -Nu はコマンドに対してこのアプローチを採用しつつ、他の種類のデータを扱えるよう拡張しています。現在、Nu はシンプルなデータと構造化されたデータ、2つの種類をサポートしています。 - -## シンプルなデータ - -多くのプログラミング言語と同様に、Nu はシンプルなデータと構造化されたデータを用いてデータをモデル化します。シンプルなデータ型には、整数、浮動小数点、文字列、真偽値、日付、およびパスが含まれます。ファイルサイズのための特別な型もこれに含まれます。 - -### 整数 - -整数(または丸めた数)。例として、1,5,および 100 があります。 - -### 浮動小数点 - -浮動小数点は小数部を含む数です。例として、1.5、2.0、および 15.333 があります。 - -### 文字列 - -文字列はテキストを表す基本的な方法です。文字列はダブルクォートを使って表されます。例として、"Fred", "myname.txt", and "Lynchburg, VA"があります。 - -Nu の文字列はデフォルトで Unicode に対応しているため UTF-8 のテキストを簡単に渡すことができます。 - -### Lines - -Lines は OS に依存した行末をもつ文字列です。使用される場合は、OS 固有の行末が使用されます。 - -### Column paths - -Column paths はテーブルにおける特定のサブテーブル、列、行、またはセルへのパスです。 - -### パターン - -"glob"パターンと呼ばれたりもするパターンはシェルでよく利用されるファイル名のマッチング方法です。 -`*`は何にでもマッチし、`?`は一文字にマッチすることを表しています。 - -例) `ls test*`における`test*`がパターンです。 - -### 真偽値 - -真偽値は真か偽かの状態をとります。しばしば比較の結果を表すために使われます。 - -真偽値の2つの値は、`$true`と`$false`です。 - -### 日付 - -日付と時間は日付型のデータに一緒に保持されます。システムで利用される日付データはタイムゾーンをもち、デフォルトでは UTC タイムゾーンが使用されます。 - -### Duration - -Duration は時間の長さを表します。1 秒、5 週間、1 年はすべて Duration の値です。 - -例) `1wk`は 1 週間を表す Duration です。 - -この表は現在サポートされているすべての Duration を示しています。 - -| Duration | Length | -| -------- | ---------- | -| 1sec | one second | -| 1min | one minute | -| 1hr | one hour | -| 1day | one day | -| 1wk | one week | - -### Ranges - -値の範囲を表すこともできます。大抵は、開始と終了の間の数値を表すために利用します。 - -例) `ls | range 1..4` - -### パス - -パスは、特定の OS でファイルパスを表すプラットフォームに依存しない方法です。例として、`/usr/bin`や`C:\Users\file.txt`があげられます。 - -### バイト - -ファイルサイズはバイトと呼ばれる特別な整数型で保持されます。例として、`100`, `15kb`、`100mb`があります。 - -### バイナリデータ - -バイナリデータは、画像ファイルのデータのように、生のバイトの集まりです。 - -## 構造化データ - -構造化データはシンプルなデータから作られます。例えば、構造化データは、複数の整数を表す方法を提供します。現在サポートされている構造化データは次のとおりです。rows, lists, そして blocks です。 - -### Rows - -row データ型は表の1行のデータで見えるものを表しています。異なる要素のデータをもち、データにはそれぞれ列名が与えられます。 - -### Lists - -Lists は一つ以上の値を保持できます。単純な値だけでなく、rows も保持することができます。rows の lists はしばしばテーブルと呼ばれます。 - -``` -> echo [sam fred george] -───┬──────── - 0 │ sam - 1 │ fred - 2 │ george -───┴──────── -``` - -### Blocks - -Blocks は Nu のコードブロックを表します。例えば、`each { echo $it }`というコマンドでは、`{ echo $it }`が block になります。 -block はデータの行ごとに実行するコードを表すのに便利です。 diff --git a/ja/book/working_with_tables.md b/ja/book/working_with_tables.md deleted file mode 100644 index effe6ef2d63..00000000000 --- a/ja/book/working_with_tables.md +++ /dev/null @@ -1,257 +0,0 @@ -# テーブルを扱う - -Nu でデータを表示する一般的な方法はテーブルを使用することです。Nu には、探しているものを見つけやすくしたり、必要なデータを絞り込んだりするのに便利なテーブルを操作するためのコマンドがたくさん用意されています。 - -まずはじめに、今回利用するテーブルを確認しましょう。 - -``` -> ls -───┬───────────────┬──────┬─────────┬──────────── - # │ name │ type │ size │ modified -───┼───────────────┼──────┼─────────┼──────────── - 0 │ files.rs │ File │ 4.6 KB │ 5 days ago - 1 │ lib.rs │ File │ 330 B │ 5 days ago - 2 │ lite_parse.rs │ File │ 6.3 KB │ 5 days ago - 3 │ parse.rs │ File │ 49.8 KB │ 1 day ago - 4 │ path.rs │ File │ 2.1 KB │ 5 days ago - 5 │ shapes.rs │ File │ 4.7 KB │ 5 days ago - 6 │ signature.rs │ File │ 1.2 KB │ 5 days ago -───┴───────────────┴──────┴─────────┴──────────── -``` - -## データのソート - -ソートに利用する列名を指定して、`sort-by`コマンドを呼びだすことでテーブルをソートできます。ファイルのサイズでテーブルをソートしたいとしましょう。 - -``` -> ls | sort-by size -───┬───────────────┬──────┬─────────┬──────────── - # │ name │ type │ size │ modified -───┼───────────────┼──────┼─────────┼──────────── - 0 │ lib.rs │ File │ 330 B │ 5 days ago - 1 │ signature.rs │ File │ 1.2 KB │ 5 days ago - 2 │ path.rs │ File │ 2.1 KB │ 5 days ago - 3 │ files.rs │ File │ 4.6 KB │ 5 days ago - 4 │ shapes.rs │ File │ 4.7 KB │ 5 days ago - 5 │ lite_parse.rs │ File │ 6.3 KB │ 5 days ago - 6 │ parse.rs │ File │ 49.8 KB │ 1 day ago -───┴───────────────┴──────┴─────────┴──────────── -``` - -比較さえできれば任意の列でソートが行なえます。例えば、"name"、"accessed"、または"modified"列でソートすることができます。 - -## 必要なデータを選択する - -列や行を選択することでテーブルから必要なデータを選択できます。テーブルからいくつかの列を選択してみましょう。 - -``` -> ls | select name size -───┬───────────────┬───────── - # │ name │ size -───┼───────────────┼───────── - 0 │ files.rs │ 4.6 KB - 1 │ lib.rs │ 330 B - 2 │ lite_parse.rs │ 6.3 KB - 3 │ parse.rs │ 49.8 KB - 4 │ path.rs │ 2.1 KB - 5 │ shapes.rs │ 4.7 KB - 6 │ signature.rs │ 1.2 KB -───┴───────────────┴───────── -``` - -こうすることで、より必要とするデータにフォーカスしたテーブルを作ることができます。次にディレクトリからもっとも小さい 5 つのファイルを表示してみます。 - -``` -> ls | sort-by size | first 5 -───┬──────────────┬──────┬────────┬──────────── - # │ name │ type │ size │ modified -───┼──────────────┼──────┼────────┼──────────── - 0 │ lib.rs │ File │ 330 B │ 5 days ago - 1 │ signature.rs │ File │ 1.2 KB │ 5 days ago - 2 │ path.rs │ File │ 2.1 KB │ 5 days ago - 3 │ files.rs │ File │ 4.6 KB │ 5 days ago - 4 │ shapes.rs │ File │ 4.7 KB │ 5 days ago -───┴──────────────┴──────┴────────┴──────────── -``` - -もっとも小さいファイルを取得するためにまずサイズでソートし、それから`first 5`を利用してテーブルから最初の 5 行を返しています。 - -不要な行を`skip`することもできます。上記で返された5行のうち最初の2行をスキップしてみましょう。 - -``` -> ls | sort-by size | first 5 | skip 2 -───┬───────────┬──────┬────────┬──────────── - # │ name │ type │ size │ modified -───┼───────────┼──────┼────────┼──────────── - 0 │ path.rs │ File │ 2.1 KB │ 5 days ago - 1 │ files.rs │ File │ 4.6 KB │ 5 days ago - 2 │ shapes.rs │ File │ 4.7 KB │ 5 days ago -───┴───────────┴──────┴────────┴──────────── -``` - -関心のある3行に絞り込みました。 - -データを選択するための他のコマンドもみてみましょう。テーブルの各行が数字をもつことを疑問に思っているかもしれません。これは単一の行を簡単に指定する方法として機能します。テーブルをファイル名でソートして、`nth`コマンドを利用して n 行目を選択してみましょう。 - -``` -> ls | sort-by name -───┬───────────────┬──────┬─────────┬──────────── - # │ name │ type │ size │ modified -───┼───────────────┼──────┼─────────┼──────────── - 0 │ files.rs │ File │ 4.6 KB │ 5 days ago - 1 │ lib.rs │ File │ 330 B │ 5 days ago - 2 │ lite_parse.rs │ File │ 6.3 KB │ 5 days ago - 3 │ parse.rs │ File │ 49.8 KB │ 1 day ago - 4 │ path.rs │ File │ 2.1 KB │ 5 days ago - 5 │ shapes.rs │ File │ 4.7 KB │ 5 days ago - 6 │ signature.rs │ File │ 1.2 KB │ 5 days ago -───┴───────────────┴──────┴─────────┴──────────── - -> ls | sort-by name | nth 5 -──────────┬──────────── - name │ shapes.rs - type │ File - size │ 4.7 KB - modified │ 5 days ago -──────────┴──────────── -``` - -## テーブルからデータを取得する - -これまでは、テーブルを必要なものだけにトリミングする操作を行ってきました。ときには一歩進んで、列全体ではなく、セル自体の値が必要になるかもしれません。たとえば、ファイル名のリストだけを取得したいとしましょう。この場合`get`コマンドを利用することができます。 - -``` -> ls | get name -───┬─────────────── - 0 │ files.rs - 1 │ lib.rs - 2 │ lite_parse.rs - 3 │ parse.rs - 4 │ path.rs - 5 │ shapes.rs - 6 │ signature.rs -───┴─────────────── -``` - -これで各ファイルの名前が取得できました。 - -これはさきほどみた`select`コマンドと同じにみえるかもしれません、比較のために`select`コマンドの出力もみておきましょう。 - -``` -> ls | select name -───┬─────────────── - # │ name -───┼─────────────── - 0 │ files.rs - 1 │ lib.rs - 2 │ lite_parse.rs - 3 │ parse.rs - 4 │ path.rs - 5 │ shapes.rs - 6 │ signature.rs -───┴─────────────── -``` - -両者は非常に似ています!両者の違いを明確にしておきましょう。 - -- `select` - 指定された列のみを含む新しいテーブルを作成します -- `get` - 指定された列内の値を返します - -テーブルからこれらを区別する方法の一つは、`value`列名です。これにより値のリストであることがわかります。 - -`get`コマンドは、パスを受け取りテーブル内のより深いデータへアクセスすることができます。これにより.json ファイルにあるような複雑なデータを簡単に操作することができます。 - -## テーブルのデータを変更する - -テーブルからデータを選択することに加えて、テーブルの内容を更新することもできます。新しい列を加えたり、セルの内容を編集したりできるのです。Nu では、その場で編集するのではなく、パイプラインの各コマンドは新しいテーブルを返します。 - -### 新しい列を追加する - -`add`コマンドを使用して、新しい列をテーブルに追加できます。例をみてみましょう。 - -``` -> open rustfmt.toml -─────────┬────── - edition │ 2018 -─────────┴────── -``` - -値が 2021 の"next_edition"列を追加してみましょう。 - -``` -> open rustfmt.toml | insert next_edition 2021 -──────────────┬────── - edition │ 2018 - next_edition │ 2021 -──────────────┴────── -``` - -元のファイルは変更されていないことに注意してください。 - -``` -> open rustfmt.toml -─────────┬────── - edition │ 2018 -─────────┴────── -``` - -Nu の変更は永続的な変更ではなく、値自体に作用する関数的な変更です。これにより、結果を書き出す準備ができるまでパイプライン上で様々な種類の作業をおこなうことができます。ここでは、`save`コマンドを使用して結果を書き出すことができます。 - -``` -> open rustfmt.toml | insert next_edition 2021 | save rustfmt2.toml -> open rustfmt2.toml -──────────────┬────── - edition │ 2018 - next_edition │ 2021 -──────────────┴────── -``` - -### 列を更新する - -`insert`コマンドと同様に、`update`コマンドを利用して列の内容を新しい値に変更することもできます。実際に動作を確認するために同じファイルを開いてみましょう。 - -``` -> open rustfmt.toml -─────────┬────── - edition │ 2018 -─────────┴────── -``` - -今度は、サポートした次の edition を指定するよう更新しましょう。 - -``` -> open rustfmt.toml | update edition 2021 -─────────┬────── - edition │ 2021 -─────────┴────── -``` - -### 値を増やす - -数字やバージョンを扱う際に便利なコマンドがもうひとつあります、`inc`です。 - -``` -> open rustfmt.toml -─────────┬────── - edition │ 2018 -─────────┴────── -> open rustfmt.toml | inc edition -─────────┬────── - edition │ 2019 -─────────┴────── -``` - -"edition"の値は数字なので、`inc`を使って更新することができます。バージョンを扱う際には`inc`がその真価を発揮します。 - -``` -> open Cargo.toml | get package.version -0.1.3 -> open Cargo.toml | inc package.version --minor | get package.version -0.2.0 -``` - -バージョンを扱う際には、フラグを利用して、バージョンのインクリメント方法を指定できます。 - -- **--major** - メジャーバージョンをインクリメント (0.1.3 -> 1.0.0) -- **--minor** - マイナーバージョンをインクリメント (0.1.3 -> 0.2.0) -- **--patch** - パッチバージョンをインクリメント (0.1.3 -> 0.1.4) diff --git a/lang-guide/lang-guide.md b/lang-guide/lang-guide.md index 3fc7619d537..8119d9abda7 100644 --- a/lang-guide/lang-guide.md +++ b/lang-guide/lang-guide.md @@ -12,14 +12,14 @@ What are possible values: `true` or `false` Example 1: -```nu +```nushell > if true { print hello } hello ``` Example 2: -```nu +```nushell > let truth = true > echo $truth true @@ -53,7 +53,7 @@ Specialized numeric type to represent the size of files or a number of bytes. The literals and display representations support both metric prefixes with a base of `1000` and the binary compatible kibibytes, mebibytes, etc. with a base of `1024` -```nu +```nushell 1 kb 0.2 gb 20 mib @@ -84,7 +84,7 @@ Ranges can range over int or float values. Ranges can also work backward. For example, the values from 10 to 1 in reverse could be created with: -```nu +```nushell 10..1 ``` @@ -92,19 +92,19 @@ Ranges can exclude either the `from` or the `to` side of the range: Numbers from 0 to 10: -```nu +```nushell ..10 ``` Numbers starting from 1: -```nu +```nushell 1.. ``` Ranges are lazy. They do not generate their values until needed. You can use a range with no specified end point and combine it with a command that takes only the first n elements. For example, you could generate the numbers from 1 to 10 using: -```nu +```nushell 1.. | take 10 ``` @@ -145,7 +145,7 @@ Effectively, commas in the above are treated like spaces. Lists can span multiple lines to enumerate values. For example, this is equivalent to `[1, 2, 3]`: -```nu +```nushell [ 1 2 @@ -157,11 +157,11 @@ Lists can span multiple lines to enumerate values. For example, this is equivale A table is a two-dimensional container with both columns and rows. There are two ways to write a table. These two examples are equivalent: -```nu +```nushell [[a, b]; [1, 2], [3, 4]] ``` -```nu +```nushell [{a: 1, b: 2}, {a: 3, b: 4}] ``` @@ -253,7 +253,7 @@ The`if` expression evaluates a condition and then chooses to run a block based o For example, you can print "yes", based on a true condition: -```nu +```nushell if true { print yes } else { @@ -263,7 +263,7 @@ if true { Alternately, you can print "no", based on a false condition: -```nu +```nushell if false { print yes } else { @@ -319,7 +319,7 @@ String interpolation uses either double quotes or single quotes with a preceedin Example: -```nu +```nushell let name = "nushell" print $"My favorite shell is ($name)" ``` @@ -336,7 +336,7 @@ Sometimes you need to build a path to execute external commands. Example: -```nu +```nushell let path1 = "/part1" let path2 = "/part2" let fn = "filename" @@ -354,7 +354,7 @@ Double quotes are used as you would think normal quotes should be used except fo Example: -```nu +```nushell "\e[31mHello\e[35m Nushell\e[0m" ``` @@ -416,14 +416,14 @@ Sometimes you need to nest quotes. I think this could use some work because some Example: -```nu +```nushell "This is just a string 'that needs an inner part quoted'" 'This is also a string "that needs an inner part quoted"' ``` The key to always remember is that double quotes recognize and interpret escapes so if you have any `\` characters in your string, they will be interpreted as excapes. The following is an example of a question we get frequently on Discord. -```nu +```nushell Why doesn't this work? > cd "C:\Program Files\somedir" ``` diff --git a/lefthook.yml b/lefthook.yml deleted file mode 100644 index 3b5c1f05e6d..00000000000 --- a/lefthook.yml +++ /dev/null @@ -1,34 +0,0 @@ -# EXAMPLE USAGE -# Refer for explanation to following link: -# https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md -# -# pre-push: -# commands: -# packages-audit: -# tags: frontend security -# run: yarn audit -# gems-audit: -# tags: backend security -# run: bundle audit -# -min_version: 1.5.0 -no_tty: false -skip_output: - - meta # Skips lefthook version printing - - skips # Skips "skip" printing (i.e. no files matched) - - summary # Skips summary block (successful and failed steps) printing - - success # Skips successful steps printing - - failure # Skips failed steps printing - # - execution # I want to skip all execution printing - - execution_info # Skips printing `EXECUTE > ...` logging - # - execution_out # I don't want to Skip printing successfully executed commands' output -pre-commit: - parallel: true - commands: - fmt: - skip: - - merge - - rebase - stage_fixed: true - glob: "**/*" - run: npx prettier --write --ignore-unknown {staged_files} diff --git a/make_docs.nu b/make_docs.nu deleted file mode 100644 index e11a1eb0dea..00000000000 --- a/make_docs.nu +++ /dev/null @@ -1,410 +0,0 @@ -# remove invalid characters from a path -# -# # Examples -# using the standard library -# ```nushell -# use std.nu -# -# std assert eq ("foo/bar baz/foooo" | safe-path) "foo/bar_baz/foooo" -# std assert eq ("invalid ? path" | safe-path) "invalid__path" -# ``` -def safe-path [] { - $in | str replace --all '\?' '' | str replace --all ' ' '_' -} - -# NOTE: You should have nushell source code directory sit along with the docs' directory to make it work -# Get commands in `extra` crate by parsing the source code -def get-extra-cmds [] { - if ('../nushell/crates/nu-cmd-extra/src' | path exists) { - cd .. - glob nushell/crates/nu-cmd-extra/src/**/*.rs - | each { $in | open -r | parse -r 'fn name\(&self\) -> &str \{[\r|\n]\s+\"(?P.+)\"[\r|\n]\s+\}' } - | flatten - | get name - } else { - [] - } -} - -let extra_cmds = get-extra-cmds - -# generate the YAML frontmatter of a command -# -# # Examples -# - the `bits` command in `commands/docs/bits.md` -# ```yaml -# --- -# title: bits -# categories: | -# bits -# version: 0.76.1 -# bits: | -# Various commands for working with bits. -# usage: | -# Various commands for working with bits. -# --- -# ``` -# - the `dfr min` command in `commands/docs/dfr_min.md` -# ```yaml -# --- -# title: dfr min -# categories: | -# expression -# lazyframe -# version: 0.76.0 -# expression: | -# Creates a min expression -# lazyframe: | -# Aggregates columns to their min value -# usage: | -# Creates a min expression -# Aggregates columns to their min value -# --- -# ``` -def command-frontmatter [commands_group, command_name] { - let commands_list = ($commands_group | get $command_name) - - let category_list = ($commands_list | get category | str join $"(char newline) " ) - let nu_version = (version).version - let category_matter = ( - $commands_list - | get category - | each { |category| - let usage = ($commands_list | where category == $category | get usage | str join (char newline)) - $'($category | str snake-case): |(char newline) ($usage)' - } - | str join (char newline) - ) - let indented_usage = ( - $commands_list - | get usage - | each {|it| $" ($it)"} - | str join (char newline) - ) - - let feature = if $command_name =~ '^dfr' { - "dataframe" - } else if $command_name in $extra_cmds { - "extra" - } else { - "default" - } - - # This is going in the frontmatter as a multiline YAML string, so indentation matters -$"--- -title: ($command_name) -categories: | - ($category_list) -version: ($nu_version) -($category_matter) -usage: | -($indented_usage) -feature: ($feature) ----" -} - - -# generate the whole command documentation -# -# TODO: be more detailed here -def command-doc [command] { - let top = $" -# {{ $frontmatter.title }} for ($command.category) - -
{{ $frontmatter.($command.category | str snake-case) }}
- -" - - let columns = ($command.signatures | columns) - let no_sig = ($command | get signatures | is-empty) - let sig = if $no_sig { '' } else { - ($command.signatures | get $columns.0 | each { |param| - if $param.parameter_type == "positional" { - $"('(')($param.parameter_name)(')')" - } else if $param.parameter_type == "rest" { - $"...rest" - } - } | str join " ") - } - - let signatures = $"## Signature - -```> ($command.name) {flags} ($sig)``` - -" - let flag_types = ['named', 'switch'] - let no_flags = if $no_sig { true } else { - $command.signatures | get $columns.0 | where parameter_type in $flag_types | is-empty - } - - let flags = if $no_flags { '' } else { - ($command.signatures | get $columns.0 | each { |param| - if $param.parameter_type == "switch" { - $" - `--($param.parameter_name), -($param.short_flag)`: ($param.description)" - } else if $param.parameter_type == "named" { - $" - `--($param.parameter_name), -($param.short_flag) {($param.syntax_shape)}`: ($param.description)" - } - } | str join (char newline)) - } - - let flags = if $no_flags { "" } else { -$"## Flags - -($flags) - -" - } - - let param_types = ['rest', 'positional'] - let no_param = if $no_sig { true } else { - $command.signatures | get $columns.0 | where parameter_type in $param_types | is-empty - } - - let params = if $no_param { '' } else { - ($command.signatures | get $columns.0 | each { |param| - if $param.parameter_type == "positional" { - $" - `($param.parameter_name)`: ($param.description)" - } else if $param.parameter_type == "rest" { - $" - `...rest`: ($param.description)" - } - } | str join (char newline)) - } - - let parameters = if $no_param { "" } else { -$"## Parameters - -($params) - -" - } - - let ex = $command.extra_usage - - # Certain commands' extra_usage is wrapped in code block markup to prevent their code from - # being interpreted as markdown. This is strictly hard-coded for now. - let extra_usage = if $ex == "" { - "" - } else if $command.name in ['def-env' 'export def-env' 'as-date' 'as-datetime' ansi] { -$"## Notes -```text -($ex) -``` -" - } else { -$"## Notes -($ex) -" - } - - let sigs = scope commands | where name == $command.name | select signatures | get 0 | get signatures | values - mut input_output = [] - for s in $sigs { - let input = $s | where parameter_type == 'input' | get 0 | get syntax_shape - let output = $s | where parameter_type == 'output' | get 0 | get syntax_shape - # FIXME: Parentheses are required here to mutate $input_output, otherwise it won't work, maybe a bug? - $input_output = ($input_output | append [[input output]; [$input $output]]) - } - let in_out = if ($input_output | length) > 0 { - let markdown = ($input_output | sort-by input | to md --pretty | str replace -a '<' '\<' | str replace -a '>' '\>') - ['', '## Input/output types:', '', $markdown, ''] | str join (char newline) - } else { '' } - - let examples = if ($command.examples | length) > 0 { - let example_top = $"## Examples(char newline)(char newline)" - - let $examples = ( - $command.examples - | each { |example| - let result = (do -i { $example.result | try { table --expand } catch { $in } } ) -$"($example.description) -```nu -> ($example.example) -($result | if ($result | describe) == "string" { ansi strip } else { $in }) -``` - -" - } | str join - ) - - $example_top + $examples - } else { - "" - } - - # Typically a root command that has sub commands should be one word command - let one_word_cmd = ($command.name | split row ' ' | length) == 1 - let sub_commands = if $one_word_cmd { scope commands | where name =~ $'^($command.name) ' } else { [] } - let type_mapping = {is_builtin: 'Builtin', is_plugin: 'Plugin', is_custom: 'Custom'} - let sub_commands = if $one_word_cmd and ($sub_commands | length) > 0 { - let commands = $sub_commands - | select name usage is_builtin is_plugin is_custom - | update name {|it| $"[`($it.name)`]\(/commands/docs/($it.name | safe-path).md\)" } - | upsert usage {|it| $it.usage | str replace -a '<' '\<' | str replace -a '>' '\>' } - | upsert type {|it| $type_mapping | columns | each {|t| if ($it | get $t) { $type_mapping | get $t } } | str join ',' } - | select name type usage - | to md --pretty - ['', '## Subcommands:', '', $commands, ''] | str join (char newline) - } else { '' } - - let features = if $command.name =~ '^dfr' { - $'(char nl)::: warning(char nl)Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag(char nl):::(char nl)' - } else if $command.name in $extra_cmds { - $'(char nl)::: warning(char nl) Command `($command.name)` was not included in the official binaries by default, you have to build it with `--features=extra` flag(char nl):::(char nl)' - } else { '' } - - let plugins = if $command.name in ['from ini', 'from ics', 'from eml', 'from vcf'] { - $"(char nl)::: warning(char nl)Command `($command.name)` resides in [plugin]\(/book/plugins.html) [`nu_plugin_formats`]\(https://crates.io/crates/nu_plugin_formats). To use this command, you must install/compile and register nu_plugin_formats(char nl):::(char nl)" - } else { '' } - - let doc = ( - ($top + $plugins + $features + $signatures + $flags + $parameters + $in_out + $examples + $extra_usage + $sub_commands) - | lines - | each {|it| ($it | str trim -r) } - | str join (char newline) - ) - - $doc -} - - -# generate the full documentation page of a given command -# -# this command will -# 1. compute the frontmatter of the command, i.e. the YAML header -# 2. compute the actual content of the documentation -# 3. concatenate them -# 4. save that to `commands/docs/.md` -# -# # Examples -# - the `bits` command at https://nushell.sh/commands/docs/bits.html -# - the `bits and` subcommand at https://nushell.sh/commands/docs/bits_and.html -def generate-command [commands_group command_name] { - let safe_name = ($command_name | safe-path) - let doc_path = (['.', 'commands', 'docs', $'($safe_name).md'] | path join) - - let frontmatter = (command-frontmatter $commands_group $command_name) - let note = "" - let doc = ( - $commands_group - | get $command_name - | each { |command| command-doc $command } - | str join - ) - - [$frontmatter $note $doc] | str join "\n" | save --raw --force $doc_path - $doc_path -} - - -# generate the list of all categories in a TS file used by `vuepress` -# -# this will modify `.vuepress/configs/sidebar/command_categories.ts` -# -# # Example -# the sidebar file has following format -# ```typescript -# export const commandCategories = [ -# '/commands/categories/.md', -# '/commands/categories/.md', -# ... -# ]; -# ``` -# and contains all the categories given by `$nu.scope.commands.category | uniq` -# -# this file is responsible for the sidebar containing the categories that one can see in -# -# https://nushell.sh/commands/ -def generate-category-sidebar [unique_categories] { - let sidebar_path = (['.', '.vuepress', 'configs', "sidebar", "command_categories.ts"] | path join) - let list_content = ( - $unique_categories - | each { || safe-path } - | each { |category| $" '/commands/categories/($category).md',"} - | str join (char newline) - ) - -$"export const commandCategories = [ -($list_content) -];" - | save --raw --force $sidebar_path -} - - -# generate one category file in `commands/categories/` -# -# # Example -# for the `bits` category, that might look, once rendered, like -# -# https://nushell.sh/commands/categories/bits.html -def generate-category [category] { - let safe_name = ($category | safe-path) - let doc_path = (['.', 'commands', 'categories', $'($safe_name).md'] | path join) - -$"# ($category | str title-case) - - - - - - - - - - - - -
CommandDescription
{{ command.title }}{{ command.frontmatter.usage }}
-" - | save --raw --force $doc_path - - $doc_path -} - - -def main [] { - # Old commands are currently not deleted because some of them - # are platform-specific (currently `exec`, `registry query`), and a single run of this script will not regenerate - # all of them. - #do -i { rm commands/docs/*.md } - - let commands = ( - scope commands - | where is_custom == false and is_extern == false - | sort-by category - ) - let commands_group = ($commands | group-by name) - let unique_commands = ($commands_group | columns) - let unique_categories = ($commands | get category | uniq) - - let number_generated_commands = ( - $unique_commands - | par-each { |command_name| - generate-command $commands_group $command_name - } - | length - ) - print $"($number_generated_commands) commands written" - - generate-category-sidebar $unique_categories - - let number_generated_categories = ( - $unique_categories - | each { |category| - generate-category $category - } - | length - ) - print $"($number_generated_categories) categories written" -} diff --git a/package-lock.json b/package-lock.json index b892c87d1d3..8f1fbf03099 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,207 +7,478 @@ "": { "name": "nushell.github.io", "version": "0.0.0", - "hasInstallScript": true, "license": "MIT", + "dependencies": { + "@astrojs/check": "^0.5.0", + "@astrojs/starlight": "^0.17.3", + "astro": "^4.3.4", + "sharp": "^0.32.5", + "typescript": "^5.3.3" + }, "devDependencies": { - "@vuepress/plugin-back-to-top": "2.0.0-rc.0", - "@vuepress/plugin-docsearch": "2.0.0-rc.0", - "@vuepress/plugin-git": "2.0.0-rc.0", - "@vuepress/plugin-medium-zoom": "2.0.0-rc.0", - "@vuepress/plugin-shiki": "^2.0.0-rc.0", - "@vuepress/theme-default": "2.0.0-rc.0", - "lefthook": "^1.6.1", - "patch-package": "^8.0.0", - "prettier": "^3.2.4", - "shiki": "^1.0.0-beta.2", - "vuepress": "2.0.0-rc.0", - "vuepress-plugin-feed2": "2.0.0-rc.10", - "vuepress-plugin-sitemap2": "2.0.0-rc.10" + "@biomejs/biome": "1.5.3", + "prettier": "^3.2.5", + "prettier-plugin-astro": "^0.13.0" }, "engines": { "node": ">=18.12.0", "npm": ">=9.0.0" } }, - "node_modules/@algolia/autocomplete-core": { - "version": "1.9.3", - "resolved": "https://registry.npmmirror.com/@algolia/autocomplete-core/-/autocomplete-core-1.9.3.tgz", - "integrity": "sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==", - "dev": true, + "node_modules/@ampproject/remapping": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", "dependencies": { - "@algolia/autocomplete-plugin-algolia-insights": "1.9.3", - "@algolia/autocomplete-shared": "1.9.3" + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" } }, - "node_modules/@algolia/autocomplete-plugin-algolia-insights": { - "version": "1.9.3", - "resolved": "https://registry.npmmirror.com/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.9.3.tgz", - "integrity": "sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==", - "dev": true, + "node_modules/@astrojs/check": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@astrojs/check/-/check-0.5.0.tgz", + "integrity": "sha512-Vik3siZOoPuaUU2SicE3aBd1vOOMOGkRKDz2Pl9gLXPWbjtzdydWhC2Muoe+H8wVUfOzzZ3Jh5KYbrYw8akf4Q==", "dependencies": { - "@algolia/autocomplete-shared": "1.9.3" + "@astrojs/language-server": "^2.7.0", + "chokidar": "^3.5.3", + "fast-glob": "^3.3.1", + "kleur": "^4.1.5", + "yargs": "^17.7.2" + }, + "bin": { + "astro-check": "dist/bin.js" + }, + "peerDependencies": { + "typescript": "^5.0.0" + } + }, + "node_modules/@astrojs/compiler": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-2.5.3.tgz", + "integrity": "sha512-jzj01BRv/fmo+9Mr2FhocywGzEYiyiP2GVHje1ziGNU6c97kwhYGsnvwMkHrncAy9T9Vi54cjaMK7UE4ClX4vA==" + }, + "node_modules/@astrojs/internal-helpers": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@astrojs/internal-helpers/-/internal-helpers-0.2.1.tgz", + "integrity": "sha512-06DD2ZnItMwUnH81LBLco3tWjcZ1lGU9rLCCBaeUCGYe9cI0wKyY2W3kDyoW1I6GmcWgt1fu+D1CTvz+FIKf8A==" + }, + "node_modules/@astrojs/language-server": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@astrojs/language-server/-/language-server-2.7.0.tgz", + "integrity": "sha512-4bM2kXteuBCf1l89dKIbAQZpenMBgqrIZCPp+BAbCar6lvdHNfvrUyxo/7/jUJQl7MR/AHaf81odfQywIcJVKg==", + "dependencies": { + "@astrojs/compiler": "^2.4.0", + "@jridgewell/sourcemap-codec": "^1.4.15", + "@volar/kit": "~2.0.2", + "@volar/language-core": "~2.0.2", + "@volar/language-server": "~2.0.2", + "@volar/language-service": "~2.0.2", + "@volar/typescript": "~2.0.2", + "fast-glob": "^3.2.12", + "volar-service-css": "0.0.28", + "volar-service-emmet": "0.0.28", + "volar-service-html": "0.0.28", + "volar-service-prettier": "0.0.28", + "volar-service-typescript": "0.0.28", + "volar-service-typescript-twoslash-queries": "0.0.28", + "vscode-html-languageservice": "^5.1.1", + "vscode-uri": "^3.0.8" + }, + "bin": { + "astro-ls": "bin/nodeServer.js" }, "peerDependencies": { - "search-insights": ">= 1 < 3" + "prettier": "^3.0.0", + "prettier-plugin-astro": ">=0.11.0" + }, + "peerDependenciesMeta": { + "prettier": { + "optional": true + }, + "prettier-plugin-astro": { + "optional": true + } } }, - "node_modules/@algolia/autocomplete-preset-algolia": { - "version": "1.9.3", - "resolved": "https://registry.npmmirror.com/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.9.3.tgz", - "integrity": "sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==", - "dev": true, - "dependencies": { - "@algolia/autocomplete-shared": "1.9.3" + "node_modules/@astrojs/markdown-remark": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@astrojs/markdown-remark/-/markdown-remark-4.2.1.tgz", + "integrity": "sha512-2RQBIwrq+2qPYtp99bH+eL5hfbK0BoxXla85lHsRpIX/IsGqFrPX6pXI2cbWPihBwGbKCdxS6uZNX2QerZWwpQ==", + "dependencies": { + "@astrojs/prism": "^3.0.0", + "github-slugger": "^2.0.0", + "import-meta-resolve": "^4.0.0", + "mdast-util-definitions": "^6.0.0", + "rehype-raw": "^7.0.0", + "rehype-stringify": "^10.0.0", + "remark-gfm": "^4.0.0", + "remark-parse": "^11.0.0", + "remark-rehype": "^11.0.0", + "remark-smartypants": "^2.0.0", + "shikiji": "^0.9.18", + "unified": "^11.0.4", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.1" + } + }, + "node_modules/@astrojs/mdx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@astrojs/mdx/-/mdx-2.1.1.tgz", + "integrity": "sha512-AgGFdE7HOGmoFooGvMSatkA9FiSKwyVW7ImHot/bXJ6uAbFfu6iG2ht18Cf1pT22Hda/6iSCGWusFvBv0/EnKQ==", + "dependencies": { + "@astrojs/markdown-remark": "4.2.1", + "@mdx-js/mdx": "^3.0.0", + "acorn": "^8.11.2", + "es-module-lexer": "^1.4.1", + "estree-util-visit": "^2.0.0", + "github-slugger": "^2.0.0", + "gray-matter": "^4.0.3", + "hast-util-to-html": "^9.0.0", + "kleur": "^4.1.4", + "rehype-raw": "^7.0.0", + "remark-gfm": "^4.0.0", + "remark-smartypants": "^2.0.0", + "source-map": "^0.7.4", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.1" + }, + "engines": { + "node": ">=18.14.1" }, "peerDependencies": { - "@algolia/client-search": ">= 4.9.1 < 6", - "algoliasearch": ">= 4.9.1 < 6" + "astro": "^4.0.0" } }, - "node_modules/@algolia/autocomplete-shared": { - "version": "1.9.3", - "resolved": "https://registry.npmmirror.com/@algolia/autocomplete-shared/-/autocomplete-shared-1.9.3.tgz", - "integrity": "sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==", - "dev": true, + "node_modules/@astrojs/prism": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@astrojs/prism/-/prism-3.0.0.tgz", + "integrity": "sha512-g61lZupWq1bYbcBnYZqdjndShr/J3l/oFobBKPA3+qMat146zce3nz2kdO4giGbhYDt4gYdhmoBz0vZJ4sIurQ==", + "dependencies": { + "prismjs": "^1.29.0" + }, + "engines": { + "node": ">=18.14.1" + } + }, + "node_modules/@astrojs/sitemap": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@astrojs/sitemap/-/sitemap-3.0.5.tgz", + "integrity": "sha512-60eLzNjMza3ABypiQPUC6ElOSZNZeY5CwSwgJ03hfeonl+Db9x12CCzBFdTw7A5Mq+O54xEZVUrR0tB+yWgX8w==", + "dependencies": { + "sitemap": "^7.1.1", + "zod": "^3.22.4" + } + }, + "node_modules/@astrojs/starlight": { + "version": "0.17.3", + "resolved": "https://registry.npmjs.org/@astrojs/starlight/-/starlight-0.17.3.tgz", + "integrity": "sha512-TEI34d0N9Q2YXOGMS6wYEwv1rLsSkbCMa1JWnJ67UWIZ+bWfcM+kwHLnenwEHs9fQ5e0HvS2GWQxvRBb/mwYkw==", + "dependencies": { + "@astrojs/mdx": "^2.0.4", + "@astrojs/sitemap": "^3.0.4", + "@pagefind/default-ui": "^1.0.3", + "@types/hast": "^3.0.3", + "@types/mdast": "^4.0.3", + "astro-expressive-code": "^0.32.2", + "bcp-47": "^2.1.0", + "hast-util-select": "^6.0.2", + "hastscript": "^8.0.0", + "mdast-util-directive": "^3.0.0", + "pagefind": "^1.0.3", + "rehype": "^13.0.1", + "remark-directive": "^3.0.0", + "unified": "^11.0.4", + "unist-util-remove": "^4.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.1" + }, "peerDependencies": { - "@algolia/client-search": ">= 4.9.1 < 6", - "algoliasearch": ">= 4.9.1 < 6" + "astro": "^4.0.0" } }, - "node_modules/@algolia/cache-browser-local-storage": { - "version": "4.22.0", - "resolved": "https://registry.npmmirror.com/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.22.0.tgz", - "integrity": "sha512-uZ1uZMLDZb4qODLfTSNHxSi4fH9RdrQf7DXEzW01dS8XK7QFtFh29N5NGKa9S+Yudf1vUMIF+/RiL4i/J0pWlQ==", - "dev": true, + "node_modules/@astrojs/telemetry": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@astrojs/telemetry/-/telemetry-3.0.4.tgz", + "integrity": "sha512-A+0c7k/Xy293xx6odsYZuXiaHO0PL+bnDoXOc47sGDF5ffIKdKQGRPFl2NMlCF4L0NqN4Ynbgnaip+pPF0s7pQ==", "dependencies": { - "@algolia/cache-common": "4.22.0" + "ci-info": "^3.8.0", + "debug": "^4.3.4", + "dlv": "^1.1.3", + "dset": "^3.1.2", + "is-docker": "^3.0.0", + "is-wsl": "^3.0.0", + "which-pm-runs": "^1.1.0" + }, + "engines": { + "node": ">=18.14.1" } }, - "node_modules/@algolia/cache-common": { - "version": "4.22.0", - "resolved": "https://registry.npmmirror.com/@algolia/cache-common/-/cache-common-4.22.0.tgz", - "integrity": "sha512-TPwUMlIGPN16eW67qamNQUmxNiGHg/WBqWcrOoCddhqNTqGDPVqmgfaM85LPbt24t3r1z0zEz/tdsmuq3Q6oaA==", - "dev": true + "node_modules/@astrojs/telemetry/node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } }, - "node_modules/@algolia/cache-in-memory": { - "version": "4.22.0", - "resolved": "https://registry.npmmirror.com/@algolia/cache-in-memory/-/cache-in-memory-4.22.0.tgz", - "integrity": "sha512-kf4Cio9NpPjzp1+uXQgL4jsMDeck7MP89BYThSvXSjf2A6qV/0KeqQf90TL2ECS02ovLOBXkk98P7qVarM+zGA==", - "dev": true, + "node_modules/@babel/code-frame": { + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", + "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", "dependencies": { - "@algolia/cache-common": "4.22.0" + "@babel/highlight": "^7.23.4", + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@algolia/client-account": { - "version": "4.22.0", - "resolved": "https://registry.npmmirror.com/@algolia/client-account/-/client-account-4.22.0.tgz", - "integrity": "sha512-Bjb5UXpWmJT+yGWiqAJL0prkENyEZTBzdC+N1vBuHjwIJcjLMjPB6j1hNBRbT12Lmwi55uzqeMIKS69w+0aPzA==", - "dev": true, + "node_modules/@babel/compat-data": { + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz", + "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.9.tgz", + "integrity": "sha512-5q0175NOjddqpvvzU+kDiSOAk4PfdO6FvwCWoQ6RO7rTzEe8vlo+4HVfcnAREhD4npMs0e9uZypjTwzZPCf/cw==", + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.6", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helpers": "^7.23.9", + "@babel/parser": "^7.23.9", + "@babel/template": "^7.23.9", + "@babel/traverse": "^7.23.9", + "@babel/types": "^7.23.9", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz", + "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", "dependencies": { - "@algolia/client-common": "4.22.0", - "@algolia/client-search": "4.22.0", - "@algolia/transporter": "4.22.0" + "@babel/types": "^7.23.6", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@algolia/client-analytics": { - "version": "4.22.0", - "resolved": "https://registry.npmmirror.com/@algolia/client-analytics/-/client-analytics-4.22.0.tgz", - "integrity": "sha512-os2K+kHUcwwRa4ArFl5p/3YbF9lN3TLOPkbXXXxOvDpqFh62n9IRZuzfxpHxMPKAQS3Et1s0BkKavnNP02E9Hg==", - "dev": true, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", + "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", "dependencies": { - "@algolia/client-common": "4.22.0", - "@algolia/client-search": "4.22.0", - "@algolia/requester-common": "4.22.0", - "@algolia/transporter": "4.22.0" + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@algolia/client-common": { - "version": "4.22.0", - "resolved": "https://registry.npmmirror.com/@algolia/client-common/-/client-common-4.22.0.tgz", - "integrity": "sha512-BlbkF4qXVWuwTmYxVWvqtatCR3lzXwxx628p1wj1Q7QP2+LsTmGt1DiUYRuy9jG7iMsnlExby6kRMOOlbhv2Ag==", - "dev": true, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", + "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", "dependencies": { - "@algolia/requester-common": "4.22.0", - "@algolia/transporter": "4.22.0" + "@babel/compat-data": "^7.23.5", + "@babel/helper-validator-option": "^7.23.5", + "browserslist": "^4.22.2", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@algolia/client-personalization": { - "version": "4.22.0", - "resolved": "https://registry.npmmirror.com/@algolia/client-personalization/-/client-personalization-4.22.0.tgz", - "integrity": "sha512-pEOftCxeBdG5pL97WngOBi9w5Vxr5KCV2j2D+xMVZH8MuU/JX7CglDSDDb0ffQWYqcUN+40Ry+xtXEYaGXTGow==", - "dev": true, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dependencies": { - "@algolia/client-common": "4.22.0", - "@algolia/requester-common": "4.22.0", - "@algolia/transporter": "4.22.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@algolia/client-search": { - "version": "4.22.0", - "resolved": "https://registry.npmmirror.com/@algolia/client-search/-/client-search-4.22.0.tgz", - "integrity": "sha512-bn4qQiIdRPBGCwsNuuqB8rdHhGKKWIij9OqidM1UkQxnSG8yzxHdb7CujM30pvp5EnV7jTqDZRbxacbjYVW20Q==", - "dev": true, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", + "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", + "dependencies": { + "@babel/types": "^7.22.15" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", + "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", "dependencies": { - "@algolia/client-common": "4.22.0", - "@algolia/requester-common": "4.22.0", - "@algolia/transporter": "4.22.0" + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.20" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "node_modules/@algolia/logger-common": { - "version": "4.22.0", - "resolved": "https://registry.npmmirror.com/@algolia/logger-common/-/logger-common-4.22.0.tgz", - "integrity": "sha512-HMUQTID0ucxNCXs5d1eBJ5q/HuKg8rFVE/vOiLaM4Abfeq1YnTtGV3+rFEhOPWhRQxNDd+YHa4q864IMc0zHpQ==", - "dev": true + "node_modules/@babel/helper-plugin-utils": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "engines": { + "node": ">=6.9.0" + } }, - "node_modules/@algolia/logger-console": { - "version": "4.22.0", - "resolved": "https://registry.npmmirror.com/@algolia/logger-console/-/logger-console-4.22.0.tgz", - "integrity": "sha512-7JKb6hgcY64H7CRm3u6DRAiiEVXMvCJV5gRE672QFOUgDxo4aiDpfU61g6Uzy8NKjlEzHMmgG4e2fklELmPXhQ==", - "dev": true, + "node_modules/@babel/helper-simple-access": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", "dependencies": { - "@algolia/logger-common": "4.22.0" + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@algolia/requester-browser-xhr": { - "version": "4.22.0", - "resolved": "https://registry.npmmirror.com/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.22.0.tgz", - "integrity": "sha512-BHfv1h7P9/SyvcDJDaRuIwDu2yrDLlXlYmjvaLZTtPw6Ok/ZVhBR55JqW832XN/Fsl6k3LjdkYHHR7xnsa5Wvg==", - "dev": true, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dependencies": { - "@algolia/requester-common": "4.22.0" + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@algolia/requester-common": { - "version": "4.22.0", - "resolved": "https://registry.npmmirror.com/@algolia/requester-common/-/requester-common-4.22.0.tgz", - "integrity": "sha512-Y9cEH/cKjIIZgzvI1aI0ARdtR/xRrOR13g5psCxkdhpgRN0Vcorx+zePhmAa4jdQNqexpxtkUdcKYugBzMZJgQ==", - "dev": true + "node_modules/@babel/helper-string-parser": { + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", + "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", + "engines": { + "node": ">=6.9.0" + } }, - "node_modules/@algolia/requester-node-http": { - "version": "4.22.0", - "resolved": "https://registry.npmmirror.com/@algolia/requester-node-http/-/requester-node-http-4.22.0.tgz", - "integrity": "sha512-8xHoGpxVhz3u2MYIieHIB6MsnX+vfd5PS4REgglejJ6lPigftRhTdBCToe6zbwq4p0anZXjjPDvNWMlgK2+xYA==", - "dev": true, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", + "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.9.tgz", + "integrity": "sha512-87ICKgU5t5SzOT7sBMfCOZQ2rHjRU+Pcb9BoILMYz600W6DkVRLFBPwQ18gwUVvggqXivaUakpnxWQGbpywbBQ==", "dependencies": { - "@algolia/requester-common": "4.22.0" + "@babel/template": "^7.23.9", + "@babel/traverse": "^7.23.9", + "@babel/types": "^7.23.9" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@algolia/transporter": { - "version": "4.22.0", - "resolved": "https://registry.npmmirror.com/@algolia/transporter/-/transporter-4.22.0.tgz", - "integrity": "sha512-ieO1k8x2o77GNvOoC+vAkFKppydQSVfbjM3YrSjLmgywiBejPTvU1R1nEvG59JIIUvtSLrZsLGPkd6vL14zopA==", - "dev": true, + "node_modules/@babel/highlight": { + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", + "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", "dependencies": { - "@algolia/cache-common": "4.22.0", - "@algolia/logger-common": "4.22.0", - "@algolia/requester-common": "4.22.0" + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.23.6", - "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.23.6.tgz", - "integrity": "sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==", - "dev": true, + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.9.tgz", + "integrity": "sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA==", "bin": { "parser": "bin/babel-parser.js" }, @@ -215,254 +486,455 @@ "node": ">=6.0.0" } }, - "node_modules/@docsearch/css": { - "version": "3.5.2", - "resolved": "https://registry.npmmirror.com/@docsearch/css/-/css-3.5.2.tgz", - "integrity": "sha512-SPiDHaWKQZpwR2siD0KQUwlStvIAnEyK6tAE2h2Wuoq8ue9skzhlyVQ1ddzOxX6khULnAALDiR/isSF3bnuciA==", - "dev": true - }, - "node_modules/@docsearch/js": { - "version": "3.5.2", - "resolved": "https://registry.npmmirror.com/@docsearch/js/-/js-3.5.2.tgz", - "integrity": "sha512-p1YFTCDflk8ieHgFJYfmyHBki1D61+U9idwrLh+GQQMrBSP3DLGKpy0XUJtPjAOPltcVbqsTjiPFfH7JImjUNg==", - "dev": true, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz", + "integrity": "sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==", "dependencies": { - "@docsearch/react": "3.5.2", - "preact": "^10.0.0" + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@docsearch/react": { - "version": "3.5.2", - "resolved": "https://registry.npmmirror.com/@docsearch/react/-/react-3.5.2.tgz", - "integrity": "sha512-9Ahcrs5z2jq/DcAvYtvlqEBHImbm4YJI8M9y0x6Tqg598P40HTEkX7hsMcIuThI+hTFxRGZ9hll0Wygm2yEjng==", - "dev": true, + "node_modules/@babel/plugin-transform-react-jsx": { + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.23.4.tgz", + "integrity": "sha512-5xOpoPguCZCRbo/JeHlloSkTA8Bld1J/E1/kLfD1nsuiW1m8tduTA1ERCgIZokDflX/IBzKcqR3l7VlRgiIfHA==", "dependencies": { - "@algolia/autocomplete-core": "1.9.3", - "@algolia/autocomplete-preset-algolia": "1.9.3", - "@docsearch/css": "3.5.2", - "algoliasearch": "^4.19.1" + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-jsx": "^7.23.3", + "@babel/types": "^7.23.4" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { - "@types/react": ">= 16.8.0 < 19.0.0", - "react": ">= 16.8.0 < 19.0.0", - "react-dom": ">= 16.8.0 < 19.0.0", - "search-insights": ">= 1 < 3" + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.23.9.tgz", + "integrity": "sha512-+xrD2BWLpvHKNmX2QbpdpsBaWnRxahMwJjO+KZk2JOElj5nSmKezyS1B4u+QbHMTX69t4ukm6hh9lsYQ7GHCKA==", + "dependencies": { + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.23.9", + "@babel/types": "^7.23.9" }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "react": { - "optional": true - }, - "react-dom": { - "optional": true - }, - "search-insights": { - "optional": true - } + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.19.11", - "resolved": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.19.11.tgz", - "integrity": "sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==", + "node_modules/@babel/traverse": { + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.9.tgz", + "integrity": "sha512-I/4UJ9vs90OkBtY6iiiTORVMyIhJ4kAVmsKo9KFc8UOxMeUfi2hvtIBsET5u9GizXE6/GFSuKCTNfgCswuEjRg==", + "dependencies": { + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.6", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.9", + "@babel/types": "^7.23.9", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.9.tgz", + "integrity": "sha512-dQjSq/7HaSjRM43FFGnv5keM2HsxpmyV1PfaSVm0nzzjwwTmjOe6J4bC8e3+pTEIgHaHj+1ZlLThRJ2auc/w1Q==", + "dependencies": { + "@babel/helper-string-parser": "^7.23.4", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@biomejs/biome": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-1.5.3.tgz", + "integrity": "sha512-yvZCa/g3akwTaAQ7PCwPWDCkZs3Qa5ONg/fgOUT9e6wAWsPftCjLQFPXBeGxPK30yZSSpgEmRCfpGTmVbUjGgg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "biome": "bin/biome" + }, + "engines": { + "node": ">=14.*" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/biome" + }, + "optionalDependencies": { + "@biomejs/cli-darwin-arm64": "1.5.3", + "@biomejs/cli-darwin-x64": "1.5.3", + "@biomejs/cli-linux-arm64": "1.5.3", + "@biomejs/cli-linux-arm64-musl": "1.5.3", + "@biomejs/cli-linux-x64": "1.5.3", + "@biomejs/cli-linux-x64-musl": "1.5.3", + "@biomejs/cli-win32-arm64": "1.5.3", + "@biomejs/cli-win32-x64": "1.5.3" + } + }, + "node_modules/@biomejs/cli-darwin-arm64": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.5.3.tgz", + "integrity": "sha512-ImU7mh1HghEDyqNmxEZBoMPr8SxekkZuYcs+gynKlNW+TALQs7swkERiBLkG9NR0K1B3/2uVzlvYowXrmlW8hw==", "cpu": [ - "ppc64" + "arm64" ], "dev": true, "optional": true, "os": [ - "aix" + "darwin" ], "engines": { - "node": ">=12" + "node": ">=14.*" } }, - "node_modules/@esbuild/android-arm": { - "version": "0.19.11", - "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.19.11.tgz", - "integrity": "sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==", + "node_modules/@biomejs/cli-darwin-x64": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.5.3.tgz", + "integrity": "sha512-vCdASqYnlpq/swErH7FD6nrFz0czFtK4k/iLgj0/+VmZVjineFPgevOb+Sr9vz0tk0GfdQO60bSpI74zU8M9Dw==", "cpu": [ - "arm" + "x64" ], "dev": true, "optional": true, "os": [ - "android" + "darwin" ], "engines": { - "node": ">=12" + "node": ">=14.*" } }, - "node_modules/@esbuild/android-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.19.11.tgz", - "integrity": "sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==", + "node_modules/@biomejs/cli-linux-arm64": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.5.3.tgz", + "integrity": "sha512-cupBQv0sNF1OKqBfx7EDWMSsKwRrBUZfjXawT4s6hKV6ALq7p0QzWlxr/sDmbKMLOaLQtw2Qgu/77N9rm+f9Rg==", "cpu": [ "arm64" ], "dev": true, "optional": true, "os": [ - "android" + "linux" ], "engines": { - "node": ">=12" + "node": ">=14.*" } }, - "node_modules/@esbuild/android-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.19.11.tgz", - "integrity": "sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==", + "node_modules/@biomejs/cli-linux-arm64-musl": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.5.3.tgz", + "integrity": "sha512-DYuMizUYUBYfS0IHGjDrOP1RGipqWfMGEvNEJ398zdtmCKLXaUvTimiox5dvx4X15mBK5M2m8wgWUgOP1giUpQ==", "cpu": [ - "x64" + "arm64" ], "dev": true, "optional": true, "os": [ - "android" + "linux" ], "engines": { - "node": ">=12" + "node": ">=14.*" } }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.19.11.tgz", - "integrity": "sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==", + "node_modules/@biomejs/cli-linux-x64": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-1.5.3.tgz", + "integrity": "sha512-YQrSArQvcv4FYsk7Q91Yv4uuu5F8hJyORVcv3zsjCLGkjIjx2RhjYLpTL733SNL7v33GmOlZY0eFR1ko38tuUw==", "cpu": [ - "arm64" + "x64" ], "dev": true, "optional": true, "os": [ - "darwin" + "linux" ], "engines": { - "node": ">=12" + "node": ">=14.*" } }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.19.11.tgz", - "integrity": "sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==", + "node_modules/@biomejs/cli-linux-x64-musl": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.5.3.tgz", + "integrity": "sha512-UUHiAnlDqr2Y/LpvshBFhUYMWkl2/Jn+bi3U6jKuav0qWbbBKU/ByHgR4+NBxpKBYoCtWxhnmatfH1bpPIuZMw==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ - "darwin" + "linux" ], "engines": { - "node": ">=12" + "node": ">=14.*" } }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.11.tgz", - "integrity": "sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==", + "node_modules/@biomejs/cli-win32-arm64": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.5.3.tgz", + "integrity": "sha512-HxatYH7vf/kX9nrD+pDYuV2GI9GV8EFo6cfKkahAecTuZLPxryHx1WEfJthp5eNsE0+09STGkKIKjirP0ufaZA==", "cpu": [ "arm64" ], "dev": true, "optional": true, "os": [ - "freebsd" + "win32" ], "engines": { - "node": ">=12" + "node": ">=14.*" } }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.19.11.tgz", - "integrity": "sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==", + "node_modules/@biomejs/cli-win32-x64": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-1.5.3.tgz", + "integrity": "sha512-fMvbSouZEASU7mZH8SIJSANDm5OqsjgtVXlbUqxwed6BP7uuHRSs396Aqwh2+VoW8fwTpp6ybIUoC9FrzB0kyA==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ - "freebsd" + "win32" ], "engines": { - "node": ">=12" + "node": ">=14.*" } }, - "node_modules/@esbuild/linux-arm": { - "version": "0.19.11", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.19.11.tgz", - "integrity": "sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==", + "node_modules/@ctrl/tinycolor": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-3.6.1.tgz", + "integrity": "sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/@emmetio/abbreviation": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@emmetio/abbreviation/-/abbreviation-2.3.3.tgz", + "integrity": "sha512-mgv58UrU3rh4YgbE/TzgLQwJ3pFsHHhCLqY20aJq+9comytTXUDNGG/SMtSeMJdkpxgXSXunBGLD8Boka3JyVA==", + "dependencies": { + "@emmetio/scanner": "^1.0.4" + } + }, + "node_modules/@emmetio/css-abbreviation": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@emmetio/css-abbreviation/-/css-abbreviation-2.1.8.tgz", + "integrity": "sha512-s9yjhJ6saOO/uk1V74eifykk2CBYi01STTK3WlXWGOepyKa23ymJ053+DNQjpFcy1ingpaO7AxCcwLvHFY9tuw==", + "dependencies": { + "@emmetio/scanner": "^1.0.4" + } + }, + "node_modules/@emmetio/scanner": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@emmetio/scanner/-/scanner-1.0.4.tgz", + "integrity": "sha512-IqRuJtQff7YHHBk4G8YZ45uB9BaAGcwQeVzgj/zj8/UdOhtQpEIupUhSk8dys6spFIWVZVeK20CzGEnqR5SbqA==" + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", + "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", "cpu": [ - "arm" + "ppc64" ], - "dev": true, "optional": true, "os": [ - "linux" + "aix" ], "engines": { "node": ">=12" } }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.19.11.tgz", - "integrity": "sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==", + "node_modules/@esbuild/android-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", + "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", "cpu": [ - "arm64" + "arm" ], - "dev": true, "optional": true, "os": [ - "linux" + "android" ], "engines": { "node": ">=12" } }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.19.11", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.19.11.tgz", - "integrity": "sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==", + "node_modules/@esbuild/android-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", + "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", "cpu": [ - "ia32" + "arm64" ], - "dev": true, "optional": true, "os": [ - "linux" + "android" ], "engines": { "node": ">=12" } }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.19.11", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.19.11.tgz", - "integrity": "sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==", + "node_modules/@esbuild/android-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", + "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", "cpu": [ - "loong64" + "x64" ], - "dev": true, "optional": true, "os": [ - "linux" + "android" ], "engines": { "node": ">=12" } }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.19.11", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.19.11.tgz", - "integrity": "sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==", + "node_modules/@esbuild/darwin-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", + "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", + "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", + "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", + "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", + "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", + "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", + "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", + "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "cpu": [ + "loong64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", + "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", "cpu": [ "mips64el" ], - "dev": true, "optional": true, "os": [ "linux" @@ -472,13 +944,12 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.19.11", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.19.11.tgz", - "integrity": "sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", + "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", "cpu": [ "ppc64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -488,13 +959,12 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.19.11", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.19.11.tgz", - "integrity": "sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", + "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", "cpu": [ "riscv64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -504,13 +974,12 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.19.11", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.19.11.tgz", - "integrity": "sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", + "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", "cpu": [ "s390x" ], - "dev": true, "optional": true, "os": [ "linux" @@ -520,13 +989,12 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.19.11.tgz", - "integrity": "sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", + "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -536,13 +1004,12 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.19.11.tgz", - "integrity": "sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", + "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "netbsd" @@ -552,13 +1019,12 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.19.11.tgz", - "integrity": "sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", + "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "openbsd" @@ -568,13 +1034,12 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.19.11.tgz", - "integrity": "sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", + "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "sunos" @@ -584,13 +1049,12 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.19.11.tgz", - "integrity": "sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", + "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "win32" @@ -600,13 +1064,12 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.19.11", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.19.11.tgz", - "integrity": "sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", + "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", "cpu": [ "ia32" ], - "dev": true, "optional": true, "os": [ "win32" @@ -616,13 +1079,12 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz", - "integrity": "sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", + "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "win32" @@ -631,1074 +1093,1528 @@ "node": ">=12" } }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true + "node_modules/@expressive-code/core": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@expressive-code/core/-/core-0.32.4.tgz", + "integrity": "sha512-S0OwgZCy29OCcwFUBTLDrShUovIUWZcQn3EvSoKsGfzf/wTisK7XqZ1uH0Y7Mlof3Hf9uJMjOhJZvxTLtQUdSQ==", + "dependencies": { + "@ctrl/tinycolor": "^3.6.0", + "hast-util-to-html": "^8.0.4", + "hastscript": "^7.2.0", + "postcss": "^8.4.21", + "postcss-nested": "^6.0.1" + } }, - "node_modules/@mdit-vue/plugin-component": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/@mdit-vue/plugin-component/-/plugin-component-1.0.0.tgz", - "integrity": "sha512-ZXsJwxkG5yyTHARIYbR74cT4AZ0SfMokFFjiHYCbypHIeYWgJhso4+CZ8+3V9EWFG3EHlGoKNGqKp9chHnqntQ==", - "dev": true, + "node_modules/@expressive-code/core/node_modules/@types/hast": { + "version": "2.3.10", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.10.tgz", + "integrity": "sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw==", "dependencies": { - "@types/markdown-it": "^13.0.1", - "markdown-it": "^13.0.1" + "@types/unist": "^2" } }, - "node_modules/@mdit-vue/plugin-frontmatter": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/@mdit-vue/plugin-frontmatter/-/plugin-frontmatter-1.0.0.tgz", - "integrity": "sha512-MMA7Ny+YPZA7eDOY1t4E+rKuEWO39mzDdP/M68fKdXJU6VfcGkPr7gnpnJfW2QBJ5qIvMrK/3lDAA2JBy5TfpA==", - "dev": true, + "node_modules/@expressive-code/core/node_modules/@types/unist": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" + }, + "node_modules/@expressive-code/core/node_modules/hast-util-from-parse5": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-7.1.2.tgz", + "integrity": "sha512-Nz7FfPBuljzsN3tCQ4kCBKqdNhQE2l0Tn+X1ubgKBPRoiDIu1mL08Cfw4k7q71+Duyaw7DXDN+VTAp4Vh3oCOw==", "dependencies": { - "@mdit-vue/types": "1.0.0", - "@types/markdown-it": "^13.0.1", - "gray-matter": "^4.0.3", - "markdown-it": "^13.0.1" + "@types/hast": "^2.0.0", + "@types/unist": "^2.0.0", + "hastscript": "^7.0.0", + "property-information": "^6.0.0", + "vfile": "^5.0.0", + "vfile-location": "^4.0.0", + "web-namespaces": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/@mdit-vue/plugin-headers": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/@mdit-vue/plugin-headers/-/plugin-headers-1.0.0.tgz", - "integrity": "sha512-0rK/iKy6x13d/Pp5XxdLBshTD0+YjZvtHIaIV+JO+/H2WnOv7oaRgs48G5d44z3XJVUE2u6fNnTlI169fef0/A==", - "dev": true, + "node_modules/@expressive-code/core/node_modules/hast-util-parse-selector": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-3.1.1.tgz", + "integrity": "sha512-jdlwBjEexy1oGz0aJ2f4GKMaVKkA9jwjr4MjAAI22E5fM/TXVZHuS5OpONtdeIkRKqAaryQ2E9xNQxijoThSZA==", "dependencies": { - "@mdit-vue/shared": "1.0.0", - "@mdit-vue/types": "1.0.0", - "@types/markdown-it": "^13.0.1", - "markdown-it": "^13.0.1" + "@types/hast": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/@mdit-vue/plugin-sfc": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/@mdit-vue/plugin-sfc/-/plugin-sfc-1.0.0.tgz", - "integrity": "sha512-agMUe0fY4YHxsZivSvplBwRwrFvsIf/JNUJCAYq1+2Sg9+2hviTBZwjZDxYqHDHOVLtiNr+wuo68tE24mAx3AQ==", - "dev": true, + "node_modules/@expressive-code/core/node_modules/hast-util-raw": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-7.2.3.tgz", + "integrity": "sha512-RujVQfVsOrxzPOPSzZFiwofMArbQke6DJjnFfceiEbFh7S05CbPt0cYN+A5YeD3pso0JQk6O1aHBnx9+Pm2uqg==", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/parse5": "^6.0.0", + "hast-util-from-parse5": "^7.0.0", + "hast-util-to-parse5": "^7.0.0", + "html-void-elements": "^2.0.0", + "parse5": "^6.0.0", + "unist-util-position": "^4.0.0", + "unist-util-visit": "^4.0.0", + "vfile": "^5.0.0", + "web-namespaces": "^2.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@expressive-code/core/node_modules/hast-util-to-html": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-8.0.4.tgz", + "integrity": "sha512-4tpQTUOr9BMjtYyNlt0P50mH7xj0Ks2xpo8M943Vykljf99HW6EzulIoJP1N3eKOSScEHzyzi9dm7/cn0RfGwA==", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/unist": "^2.0.0", + "ccount": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-raw": "^7.0.0", + "hast-util-whitespace": "^2.0.0", + "html-void-elements": "^2.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "stringify-entities": "^4.0.0", + "zwitch": "^2.0.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@expressive-code/core/node_modules/hast-util-to-parse5": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-7.1.0.tgz", + "integrity": "sha512-YNRgAJkH2Jky5ySkIqFXTQiaqcAtJyVE+D5lkN6CdtOqrnkLfGYYrEcKuHOJZlp+MwjSwuD3fZuawI+sic/RBw==", "dependencies": { - "@mdit-vue/types": "1.0.0", - "@types/markdown-it": "^13.0.1", - "markdown-it": "^13.0.1" + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "web-namespaces": "^2.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/@mdit-vue/plugin-title": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/@mdit-vue/plugin-title/-/plugin-title-1.0.0.tgz", - "integrity": "sha512-8yC60fCZ95xcJ/cvJH4Lv43Rs4k+33UGyKrRWj5J8TNyMwUyGcwur0XyPM+ffJH4/Bzq4myZLsj/TTFSkXRxvw==", - "dev": true, + "node_modules/@expressive-code/core/node_modules/hast-util-whitespace": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-2.0.1.tgz", + "integrity": "sha512-nAxA0v8+vXSBDt3AnRUNjyRIQ0rD+ntpbAp4LnPkumc5M9yUbSMa4XDU9Q6etY4f1Wp4bNgvc1yjiZtsTTrSng==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@expressive-code/core/node_modules/hastscript": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-7.2.0.tgz", + "integrity": "sha512-TtYPq24IldU8iKoJQqvZOuhi5CyCQRAbvDOX0x1eW6rsHSxa/1i2CCiptNTotGHJ3VoHRGmqiv6/D3q113ikkw==", "dependencies": { - "@mdit-vue/shared": "1.0.0", - "@mdit-vue/types": "1.0.0", - "@types/markdown-it": "^13.0.1", - "markdown-it": "^13.0.1" + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-parse-selector": "^3.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/@mdit-vue/plugin-toc": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/@mdit-vue/plugin-toc/-/plugin-toc-1.0.0.tgz", - "integrity": "sha512-WN8blfX0X/5Nolic0ClDWP7eVo9IB+U4g0jbycX3lolIZX5Bai1UpsD3QYZr5VVsPbQJMKMGvTrCEtCNTGvyWQ==", - "dev": true, + "node_modules/@expressive-code/core/node_modules/html-void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-2.0.1.tgz", + "integrity": "sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/@expressive-code/core/node_modules/parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" + }, + "node_modules/@expressive-code/core/node_modules/unist-util-is": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", + "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", "dependencies": { - "@mdit-vue/shared": "1.0.0", - "@mdit-vue/types": "1.0.0", - "@types/markdown-it": "^13.0.1", - "markdown-it": "^13.0.1" + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/@mdit-vue/shared": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/@mdit-vue/shared/-/shared-1.0.0.tgz", - "integrity": "sha512-nbYBfmEi+pR2Lm0Z6TMVX2/iBjfr/kGEsHW8CC0rQw+3+sG5dY6VG094HuFAkiAmmvZx9DZZb+7ZMWp9vkwCRw==", - "dev": true, + "node_modules/@expressive-code/core/node_modules/unist-util-position": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-4.0.4.tgz", + "integrity": "sha512-kUBE91efOWfIVBo8xzh/uZQ7p9ffYRtUbMRZBNFYwf0RK8koUMx6dGUfwylLOKmaT2cs4wSW96QoYUSXAyEtpg==", "dependencies": { - "@mdit-vue/types": "1.0.0", - "@types/markdown-it": "^13.0.1", - "markdown-it": "^13.0.1" + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/@mdit-vue/types": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/@mdit-vue/types/-/types-1.0.0.tgz", - "integrity": "sha512-xeF5+sHLzRNF7plbksywKCph4qli20l72of2fMlZQQ7RECvXYrRkE9+bjRFQCyULC7B8ydUYbpbkux5xJlVWyw==", - "dev": true + "node_modules/@expressive-code/core/node_modules/unist-util-stringify-position": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, + "node_modules/@expressive-code/core/node_modules/unist-util-visit": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", + "integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==", "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0", + "unist-util-visit-parents": "^5.1.1" }, - "engines": { - "node": ">= 8" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmmirror.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" + "node_modules/@expressive-code/core/node_modules/unist-util-visit-parents": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", + "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmmirror.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, + "node_modules/@expressive-code/core/node_modules/vfile": { + "version": "5.3.7", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", + "integrity": "sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==", "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^3.0.0", + "vfile-message": "^3.0.0" }, - "engines": { - "node": ">= 8" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.9.2", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.2.tgz", - "integrity": "sha512-RKzxFxBHq9ysZ83fn8Iduv3A283K7zPPYuhL/z9CQuyFrjwpErJx0h4aeb/bnJ+q29GRLgJpY66ceQ/Wcsn3wA==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ] + "node_modules/@expressive-code/core/node_modules/vfile-location": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-4.1.0.tgz", + "integrity": "sha512-YF23YMyASIIJXpktBa4vIGLJ5Gs88UB/XePgqPmTa7cDA+JeO3yclbpheQYCHjVHBn/yePzrXuygIL+xbvRYHw==", + "dependencies": { + "@types/unist": "^2.0.0", + "vfile": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.9.2", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.2.tgz", - "integrity": "sha512-yZ+MUbnwf3SHNWQKJyWh88ii2HbuHCFQnAYTeeO1Nb8SyEiWASEi5dQUygt3ClHWtA9My9RQAYkjvrsZ0WK8Xg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ] + "node_modules/@expressive-code/core/node_modules/vfile-message": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-3.1.4.tgz", + "integrity": "sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.9.2", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.2.tgz", - "integrity": "sha512-vqJ/pAUh95FLc/G/3+xPqlSBgilPnauVf2EXOQCZzhZJCXDXt/5A8mH/OzU6iWhb3CNk5hPJrh8pqJUPldN5zw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ] + "node_modules/@expressive-code/plugin-frames": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@expressive-code/plugin-frames/-/plugin-frames-0.32.4.tgz", + "integrity": "sha512-XOQrLqlVEy5JbqsBhDcSJQinceQ5j/Z8cE0/27Lnlcj4oXRdiQNjMVtstC/xZUeWEbm+FI9ZZP4Z9yihol61Aw==", + "dependencies": { + "@expressive-code/core": "^0.32.4", + "hastscript": "^7.2.0" + } }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.9.2", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.2.tgz", - "integrity": "sha512-otPHsN5LlvedOprd3SdfrRNhOahhVBwJpepVKUN58L0RnC29vOAej1vMEaVU6DadnpjivVsNTM5eNt0CcwTahw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ] + "node_modules/@expressive-code/plugin-frames/node_modules/@types/hast": { + "version": "2.3.10", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.10.tgz", + "integrity": "sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw==", + "dependencies": { + "@types/unist": "^2" + } }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.9.2", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.2.tgz", - "integrity": "sha512-ewG5yJSp+zYKBYQLbd1CUA7b1lSfIdo9zJShNTyc2ZP1rcPrqyZcNlsHgs7v1zhgfdS+kW0p5frc0aVqhZCiYQ==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] + "node_modules/@expressive-code/plugin-frames/node_modules/@types/unist": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.9.2", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.2.tgz", - "integrity": "sha512-pL6QtV26W52aCWTG1IuFV3FMPL1m4wbsRG+qijIvgFO/VBsiXJjDPE/uiMdHBAO6YcpV4KvpKtd0v3WFbaxBtg==", - "cpu": [ - "arm64" - ], - "dev": true, + "node_modules/@expressive-code/plugin-frames/node_modules/hast-util-parse-selector": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-3.1.1.tgz", + "integrity": "sha512-jdlwBjEexy1oGz0aJ2f4GKMaVKkA9jwjr4MjAAI22E5fM/TXVZHuS5OpONtdeIkRKqAaryQ2E9xNQxijoThSZA==", + "dependencies": { + "@types/hast": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@expressive-code/plugin-frames/node_modules/hastscript": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-7.2.0.tgz", + "integrity": "sha512-TtYPq24IldU8iKoJQqvZOuhi5CyCQRAbvDOX0x1eW6rsHSxa/1i2CCiptNTotGHJ3VoHRGmqiv6/D3q113ikkw==", + "dependencies": { + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-parse-selector": "^3.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@expressive-code/plugin-shiki": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@expressive-code/plugin-shiki/-/plugin-shiki-0.32.4.tgz", + "integrity": "sha512-zZzTXFFTpG+fmBG6C+4KzIyh1nFPdn4gLJ8E9LhBVufmRkn3gZplkE99lulfillsKyUZTRw3+dC3xYZWEZKzPw==", + "dependencies": { + "@expressive-code/core": "^0.32.4", + "shikiji": "^0.8.0" + } + }, + "node_modules/@expressive-code/plugin-shiki/node_modules/shikiji": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/shikiji/-/shikiji-0.8.7.tgz", + "integrity": "sha512-j5usxwI0yHkDTHOuhuSJl9+wT5CNYeYO82dJMSJBlJ/NYT5SIebGcPoL6y9QOyH15wGrJC4LOP2nz5k8mUDGRQ==", + "dependencies": { + "hast-util-to-html": "^9.0.0" + } + }, + "node_modules/@expressive-code/plugin-text-markers": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@expressive-code/plugin-text-markers/-/plugin-text-markers-0.32.4.tgz", + "integrity": "sha512-lFlo3uwTp7vUmfXtLPn2aXs0CPFqdFvKiR3y8gtNzmBeYWPqVahF4RFUCN9ZpztCmXp5V8p2ADvNHzoNwCBwzA==", + "dependencies": { + "@expressive-code/core": "^0.32.4", + "hastscript": "^7.2.0", + "unist-util-visit-parents": "^5.1.3" + } + }, + "node_modules/@expressive-code/plugin-text-markers/node_modules/@types/hast": { + "version": "2.3.10", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.10.tgz", + "integrity": "sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw==", + "dependencies": { + "@types/unist": "^2" + } + }, + "node_modules/@expressive-code/plugin-text-markers/node_modules/@types/unist": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" + }, + "node_modules/@expressive-code/plugin-text-markers/node_modules/hast-util-parse-selector": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-3.1.1.tgz", + "integrity": "sha512-jdlwBjEexy1oGz0aJ2f4GKMaVKkA9jwjr4MjAAI22E5fM/TXVZHuS5OpONtdeIkRKqAaryQ2E9xNQxijoThSZA==", + "dependencies": { + "@types/hast": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@expressive-code/plugin-text-markers/node_modules/hastscript": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-7.2.0.tgz", + "integrity": "sha512-TtYPq24IldU8iKoJQqvZOuhi5CyCQRAbvDOX0x1eW6rsHSxa/1i2CCiptNTotGHJ3VoHRGmqiv6/D3q113ikkw==", + "dependencies": { + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-parse-selector": "^3.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@expressive-code/plugin-text-markers/node_modules/unist-util-is": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", + "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@expressive-code/plugin-text-markers/node_modules/unist-util-visit-parents": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", + "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.22", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.22.tgz", + "integrity": "sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@mdx-js/mdx": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-3.0.0.tgz", + "integrity": "sha512-Icm0TBKBLYqroYbNW3BPnzMGn+7mwpQOK310aZ7+fkCtiU3aqv2cdcX+nd0Ydo3wI5Rx8bX2Z2QmGb/XcAClCw==", + "dependencies": { + "@types/estree": "^1.0.0", + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/mdx": "^2.0.0", + "collapse-white-space": "^2.0.0", + "devlop": "^1.0.0", + "estree-util-build-jsx": "^3.0.0", + "estree-util-is-identifier-name": "^3.0.0", + "estree-util-to-js": "^2.0.0", + "estree-walker": "^3.0.0", + "hast-util-to-estree": "^3.0.0", + "hast-util-to-jsx-runtime": "^2.0.0", + "markdown-extensions": "^2.0.0", + "periscopic": "^3.0.0", + "remark-mdx": "^3.0.0", + "remark-parse": "^11.0.0", + "remark-rehype": "^11.0.0", + "source-map": "^0.7.0", + "unified": "^11.0.0", + "unist-util-position-from-estree": "^2.0.0", + "unist-util-stringify-position": "^4.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@pagefind/darwin-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@pagefind/darwin-arm64/-/darwin-arm64-1.0.4.tgz", + "integrity": "sha512-2OcthvceX2xhm5XbgOmW+lT45oLuHqCmvFeFtxh1gsuP5cO8vcD8ZH8Laj4pXQFCcK6eAdSShx+Ztx/LsQWZFQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@pagefind/darwin-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@pagefind/darwin-x64/-/darwin-x64-1.0.4.tgz", + "integrity": "sha512-xkdvp0D9Ld/ZKsjo/y1bgfhTEU72ITimd2PMMQtts7jf6JPIOJbsiErCvm37m/qMFuPGEq/8d+fZ4pydOj08HQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@pagefind/default-ui": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@pagefind/default-ui/-/default-ui-1.0.4.tgz", + "integrity": "sha512-edkcaPSKq67C49Vehjo+LQCpT615v4d7JRhfGzFPccePvdklaL+VXrfghN/uIfsdoG+HoLI1PcYy2iFcB9CTkw==" + }, + "node_modules/@pagefind/linux-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@pagefind/linux-arm64/-/linux-arm64-1.0.4.tgz", + "integrity": "sha512-jGBrcCzIrMnNxLKVtogaQyajVfTAXM59KlBEwg6vTn8NW4fQ6nuFbbhlG4dTIsaamjEM5e8ZBEAKZfTB/qd9xw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@pagefind/linux-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@pagefind/linux-x64/-/linux-x64-1.0.4.tgz", + "integrity": "sha512-LIn/QcvcEtLEBqKe5vpSbSC2O3fvqbRCWOTIklslqSORisCsvzsWbP6j+LYxE9q0oWIfkdMoWV1vrE/oCKRxHg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@pagefind/windows-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@pagefind/windows-x64/-/windows-x64-1.0.4.tgz", + "integrity": "sha512-QlBCVeZfj9fc9sbUgdOz76ZDbeK4xZihOBAFqGuRJeChfM8pnVeH9iqSnXgO3+m9oITugTf7PicyRUFAG76xeQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.6.tgz", + "integrity": "sha512-MVNXSSYN6QXOulbHpLMKYi60ppyO13W9my1qogeiAqtjb2yR4LSmfU2+POvDkLzhjYLXz9Rf9+9a3zFHW1Lecg==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.6.tgz", + "integrity": "sha512-T14aNLpqJ5wzKNf5jEDpv5zgyIqcpn1MlwCrUXLrwoADr2RkWA0vOWP4XxbO9aiO3dvMCQICZdKeDrFl7UMClw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.6.tgz", + "integrity": "sha512-CqNNAyhRkTbo8VVZ5R85X73H3R5NX9ONnKbXuHisGWC0qRbTTxnF1U4V9NafzJbgGM0sHZpdO83pLPzq8uOZFw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.6.tgz", + "integrity": "sha512-zRDtdJuRvA1dc9Mp6BWYqAsU5oeLixdfUvkTHuiYOHwqYuQ4YgSmi6+/lPvSsqc/I0Omw3DdICx4Tfacdzmhog==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.6.tgz", + "integrity": "sha512-oNk8YXDDnNyG4qlNb6is1ojTOGL/tRhbbKeE/YuccItzerEZT68Z9gHrY3ROh7axDc974+zYAPxK5SH0j/G+QQ==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.6.tgz", + "integrity": "sha512-Z3O60yxPtuCYobrtzjo0wlmvDdx2qZfeAWTyfOjEDqd08kthDKexLpV97KfAeUXPosENKd8uyJMRDfFMxcYkDQ==", + "cpu": [ + "arm64" + ], "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.9.2", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.2.tgz", - "integrity": "sha512-On+cc5EpOaTwPSNetHXBuqylDW+765G/oqB9xGmWU3npEhCh8xu0xqHGUA+4xwZLqBbIZNcBlKSIYfkBm6ko7g==", + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.6.tgz", + "integrity": "sha512-gpiG0qQJNdYEVad+1iAsGAbgAnZ8j07FapmnIAQgODKcOTjLEWM9sRb+MbQyVsYCnA0Im6M6QIq6ax7liws6eQ==", "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.9.2", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.2.tgz", - "integrity": "sha512-Wnx/IVMSZ31D/cO9HSsU46FjrPWHqtdF8+0eyZ1zIB5a6hXaZXghUKpRrC4D5DcRTZOjml2oBhXoqfGYyXKipw==", + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.6.tgz", + "integrity": "sha512-+uCOcvVmFUYvVDr27aiyun9WgZk0tXe7ThuzoUTAukZJOwS5MrGbmSlNOhx1j80GdpqbOty05XqSl5w4dQvcOA==", "cpu": [ "riscv64" ], - "dev": true, "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.9.2", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.2.tgz", - "integrity": "sha512-ym5x1cj4mUAMBummxxRkI4pG5Vht1QMsJexwGP8547TZ0sox9fCLDHw9KCH9c1FO5d9GopvkaJsBIOkTKxksdw==", + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.6.tgz", + "integrity": "sha512-HUNqM32dGzfBKuaDUBqFB7tP6VMN74eLZ33Q9Y1TBqRDn+qDonkAUyKWwF9BR9unV7QUzffLnz9GrnKvMqC/fw==", "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.9.2", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.2.tgz", - "integrity": "sha512-m0hYELHGXdYx64D6IDDg/1vOJEaiV8f1G/iO+tejvRCJNSwK4jJ15e38JQy5Q6dGkn1M/9KcyEOwqmlZ2kqaZg==", + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.6.tgz", + "integrity": "sha512-ch7M+9Tr5R4FK40FHQk8VnML0Szi2KRujUgHXd/HjuH9ifH72GUmw6lStZBo3c3GB82vHa0ZoUfjfcM7JiiMrQ==", "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.9.2", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.2.tgz", - "integrity": "sha512-x1CWburlbN5JjG+juenuNa4KdedBdXLjZMp56nHFSHTOsb/MI2DYiGzLtRGHNMyydPGffGId+VgjOMrcltOksA==", + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.6.tgz", + "integrity": "sha512-VD6qnR99dhmTQ1mJhIzXsRcTBvTjbfbGGwKAHcu+52cVl15AC/kplkhxzW/uT0Xl62Y/meBKDZvoJSJN+vTeGA==", "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.9.2", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.2.tgz", - "integrity": "sha512-VVzCB5yXR1QlfsH1Xw1zdzQ4Pxuzv+CPr5qpElpKhVxlxD3CRdfubAG9mJROl6/dmj5gVYDDWk8sC+j9BI9/kQ==", + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.6.tgz", + "integrity": "sha512-J9AFDq/xiRI58eR2NIDfyVmTYGyIZmRcvcAoJ48oDld/NTR8wyiPUu2X/v1navJ+N/FGg68LEbX3Ejd6l8B7MQ==", "cpu": [ "ia32" ], - "dev": true, "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.9.2", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.2.tgz", - "integrity": "sha512-SYRedJi+mweatroB+6TTnJYLts0L0bosg531xnQWtklOI6dezEagx4Q0qDyvRdK+qgdA3YZpjjGuPFtxBmddBA==", + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.6.tgz", + "integrity": "sha512-jqzNLhNDvIZOrt69Ce4UjGRpXJBzhUBzawMwnaDAwyHriki3XollsewxWzOzz+4yOFDkuJHtTsZFwMxhYJWmLQ==", "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "win32" ] }, - "node_modules/@shikijs/core": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmmirror.com/@shikijs/core/-/core-1.0.0-beta.2.tgz", - "integrity": "sha512-H0r+V4/47hXZzFW2qXRqjLwNtiUE5bQankMw2m2RE1hLgHSjp/skyBZYDXjhG9y7ei3sIZAj8s4vx31EzxxrhQ==", - "dev": true + "node_modules/@types/acorn": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@types/acorn/-/acorn-4.0.6.tgz", + "integrity": "sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==", + "dependencies": { + "@types/estree": "*" + } }, - "node_modules/@sindresorhus/merge-streams": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/@sindresorhus/merge-streams/-/merge-streams-1.0.0.tgz", - "integrity": "sha512-rUV5WyJrJLoloD4NDN1V1+LDMDWOa4OTsT4yYJwQNpTU6FWxkxHpL7eu4w+DmiH8x/EAM1otkPE1+LaspIbplw==", - "dev": true, - "engines": { - "node": ">=18" + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz", + "integrity": "sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==", + "dependencies": { + "@babel/types": "^7.20.7" } }, "node_modules/@types/debug": { "version": "4.1.12", - "resolved": "https://registry.npmmirror.com/@types/debug/-/debug-4.1.12.tgz", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", - "dev": true, "dependencies": { "@types/ms": "*" } }, - "node_modules/@types/fs-extra": { - "version": "11.0.4", - "resolved": "https://registry.npmmirror.com/@types/fs-extra/-/fs-extra-11.0.4.tgz", - "integrity": "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==", - "dev": true, - "dependencies": { - "@types/jsonfile": "*", - "@types/node": "*" - } + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" }, - "node_modules/@types/hash-sum": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/@types/hash-sum/-/hash-sum-1.0.2.tgz", - "integrity": "sha512-UP28RddqY8xcU0SCEp9YKutQICXpaAq9N8U2klqF5hegGha7KzTOL8EdhIIV3bOSGBzjEpN9bU/d+nNZBdJYVw==", - "dev": true - }, - "node_modules/@types/jsonfile": { - "version": "6.1.4", - "resolved": "https://registry.npmmirror.com/@types/jsonfile/-/jsonfile-6.1.4.tgz", - "integrity": "sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==", - "dev": true, + "node_modules/@types/estree-jsx": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/estree-jsx/-/estree-jsx-1.0.4.tgz", + "integrity": "sha512-5idy3hvI9lAMqsyilBM+N+boaCf1MgoefbDxN6KEO5aK17TOHwFAYT9sjxzeKAiIWRUBgLxmZ9mPcnzZXtTcRQ==", "dependencies": { - "@types/node": "*" + "@types/estree": "*" } }, - "node_modules/@types/linkify-it": { - "version": "3.0.5", - "resolved": "https://registry.npmmirror.com/@types/linkify-it/-/linkify-it-3.0.5.tgz", - "integrity": "sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==", - "dev": true - }, - "node_modules/@types/markdown-it": { - "version": "13.0.7", - "resolved": "https://registry.npmmirror.com/@types/markdown-it/-/markdown-it-13.0.7.tgz", - "integrity": "sha512-U/CBi2YUUcTHBt5tjO2r5QV/x0Po6nsYwQU4Y04fBS6vfoImaiZ6f8bi3CjTCxBPQSO1LMyUqkByzi8AidyxfA==", - "dev": true, + "node_modules/@types/hast": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", + "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", "dependencies": { - "@types/linkify-it": "*", - "@types/mdurl": "*" + "@types/unist": "*" } }, - "node_modules/@types/markdown-it-emoji": { - "version": "2.0.4", - "resolved": "https://registry.npmmirror.com/@types/markdown-it-emoji/-/markdown-it-emoji-2.0.4.tgz", - "integrity": "sha512-H6ulk/ZmbDxOayPwI/leJzrmoW1YKX1Z+MVSCHXuYhvqckV4I/c+hPTf6UiqJyn2avWugfj30XroheEb6/Ekqg==", - "dev": true, + "node_modules/@types/mdast": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.3.tgz", + "integrity": "sha512-LsjtqsyF+d2/yFOYaN22dHZI1Cpwkrj+g06G8+qtUKlhovPW89YhqSnfKtMbkgmEtYpH2gydRNULd6y8mciAFg==", "dependencies": { - "@types/markdown-it": "*" + "@types/unist": "*" } }, - "node_modules/@types/mdurl": { - "version": "1.0.5", - "resolved": "https://registry.npmmirror.com/@types/mdurl/-/mdurl-1.0.5.tgz", - "integrity": "sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==", - "dev": true + "node_modules/@types/mdx": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/mdx/-/mdx-2.0.11.tgz", + "integrity": "sha512-HM5bwOaIQJIQbAYfax35HCKxx7a3KrK3nBtIqJgSOitivTD1y3oW9P3rxY9RkXYPUk7y/AjAohfHKmFpGE79zw==" }, "node_modules/@types/ms": { "version": "0.7.34", - "resolved": "https://registry.npmmirror.com/@types/ms/-/ms-0.7.34.tgz", - "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==", - "dev": true + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", + "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" + }, + "node_modules/@types/nlcst": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/nlcst/-/nlcst-1.0.4.tgz", + "integrity": "sha512-ABoYdNQ/kBSsLvZAekMhIPMQ3YUZvavStpKYs7BjLLuKVmIMA0LUgZ7b54zzuWJRbHF80v1cNf4r90Vd6eMQDg==", + "dependencies": { + "@types/unist": "^2" + } + }, + "node_modules/@types/nlcst/node_modules/@types/unist": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/@types/node": { - "version": "20.10.6", - "resolved": "https://registry.npmmirror.com/@types/node/-/node-20.10.6.tgz", - "integrity": "sha512-Vac8H+NlRNNlAmDfGUP7b5h/KA+AtWIzuXy0E6OyP8f1tCLYAtPvKRRDJjAPqhpCb0t6U2j7/xqAuLEebW2kiw==", - "dev": true, + "version": "20.11.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.16.tgz", + "integrity": "sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==", "dependencies": { "undici-types": "~5.26.4" } }, + "node_modules/@types/parse5": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-6.0.3.tgz", + "integrity": "sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==" + }, "node_modules/@types/sax": { "version": "1.2.7", - "resolved": "https://registry.npmmirror.com/@types/sax/-/sax-1.2.7.tgz", + "resolved": "https://registry.npmjs.org/@types/sax/-/sax-1.2.7.tgz", "integrity": "sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==", - "dev": true, "dependencies": { "@types/node": "*" } }, - "node_modules/@types/web-bluetooth": { - "version": "0.0.20", - "resolved": "https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz", - "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==", - "dev": true + "node_modules/@types/unist": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz", + "integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==" }, - "node_modules/@vitejs/plugin-vue": { - "version": "4.6.2", - "resolved": "https://registry.npmmirror.com/@vitejs/plugin-vue/-/plugin-vue-4.6.2.tgz", - "integrity": "sha512-kqf7SGFoG+80aZG6Pf+gsZIVvGSCKE98JbiWqcCV9cThtg91Jav0yvYFC9Zb+jKetNGF6ZKeoaxgZfND21fWKw==", - "dev": true, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==" + }, + "node_modules/@volar/kit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@volar/kit/-/kit-2.0.2.tgz", + "integrity": "sha512-RgufgQCgsRBrbDmTKhnpsNixFdHAfCnLzKF8Kj4n5HDfWqSGj7WrhnS+qNTbHN7IjbSiSYcSeaO+ZZmXCTT24Q==", + "dependencies": { + "@volar/language-service": "2.0.2", + "@volar/typescript": "2.0.2", + "typesafe-path": "^0.2.2", + "vscode-languageserver-textdocument": "^1.0.11", + "vscode-uri": "^3.0.8" + }, "peerDependencies": { - "vite": "^4.0.0 || ^5.0.0", - "vue": "^3.2.25" + "typescript": "*" } }, - "node_modules/@vue/compiler-core": { - "version": "3.4.3", - "resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.4.3.tgz", - "integrity": "sha512-u8jzgFg0EDtSrb/hG53Wwh1bAOQFtc1ZCegBpA/glyvTlgHl+tq13o1zvRfLbegYUw/E4mSTGOiCnAJ9SJ+lsg==", - "dev": true, + "node_modules/@volar/language-core": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.0.2.tgz", + "integrity": "sha512-sFtXrTDu59wNrUodrOzf62XpVpLAj47vT9P5dbcLxv3YfmbbW8Ssk9aLdqTksKDMhIe+hJVKrQm4UqBJ8iXaig==", "dependencies": { - "@babel/parser": "^7.23.6", - "@vue/shared": "3.4.3", - "entities": "^4.5.0", - "estree-walker": "^2.0.2", - "source-map-js": "^1.0.2" + "@volar/source-map": "2.0.2" } }, - "node_modules/@vue/compiler-core/node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, - "engines": { - "node": ">=0.12" + "node_modules/@volar/language-server": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@volar/language-server/-/language-server-2.0.2.tgz", + "integrity": "sha512-NbM0v92ppABbZVKSNNPqt2vdBjLQ9O4Oi+iWu4xpCdMZw5GfrTfmhF5nfQQeJ+42XJmlV2pybUOJajLh320D1Q==", + "dependencies": { + "@volar/language-core": "2.0.2", + "@volar/language-service": "2.0.2", + "@volar/snapshot-document": "2.0.2", + "@volar/typescript": "2.0.2", + "@vscode/l10n": "^0.0.16", + "path-browserify": "^1.0.1", + "request-light": "^0.7.0", + "vscode-languageserver": "^9.0.1", + "vscode-languageserver-protocol": "^3.17.5", + "vscode-languageserver-textdocument": "^1.0.11", + "vscode-uri": "^3.0.8" + } + }, + "node_modules/@volar/language-service": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@volar/language-service/-/language-service-2.0.2.tgz", + "integrity": "sha512-Ytc3UHWweAxYQSSwmJSl0rNpTVCSzHEu3RJzAkbf/LkSGGJgZ4cxkzuQM0AU1IKsHJl3XCoW0zvArWvtr30JJw==", + "dependencies": { + "@volar/language-core": "2.0.2", + "vscode-languageserver-protocol": "^3.17.5", + "vscode-languageserver-textdocument": "^1.0.11", + "vscode-uri": "^3.0.8" } }, - "node_modules/@vue/compiler-dom": { - "version": "3.4.3", - "resolved": "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.4.3.tgz", - "integrity": "sha512-oGF1E9/htI6JWj/lTJgr6UgxNCtNHbM6xKVreBWeZL9QhRGABRVoWGAzxmtBfSOd+w0Zi5BY0Es/tlJrN6WgEg==", - "dev": true, + "node_modules/@volar/snapshot-document": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@volar/snapshot-document/-/snapshot-document-2.0.2.tgz", + "integrity": "sha512-Wxk64/wWUgYZczCwa9miUeZtKb0V3ZjtrrInmGzY75rXVu0MHxVii5FKYleBWFnpGlu35uqWOB8e+rIH4O96Yw==", "dependencies": { - "@vue/compiler-core": "3.4.3", - "@vue/shared": "3.4.3" + "vscode-languageserver-protocol": "^3.17.5", + "vscode-languageserver-textdocument": "^1.0.11" } }, - "node_modules/@vue/compiler-sfc": { - "version": "3.4.3", - "resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.4.3.tgz", - "integrity": "sha512-NuJqb5is9I4uzv316VRUDYgIlPZCG8D+ARt5P4t5UDShIHKL25J3TGZAUryY/Aiy0DsY7srJnZL5ryB6DD63Zw==", - "dev": true, + "node_modules/@volar/source-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.0.2.tgz", + "integrity": "sha512-jzEQwaAXIq7YJUCU6kvJ0aCfesu/cXT0YrSLxdGa+zxeMa8Q0DtWJE4RlIrvaEtowf9MpcNV7wBXKu4i3R9oTw==", "dependencies": { - "@babel/parser": "^7.23.6", - "@vue/compiler-core": "3.4.3", - "@vue/compiler-dom": "3.4.3", - "@vue/compiler-ssr": "3.4.3", - "@vue/shared": "3.4.3", - "estree-walker": "^2.0.2", - "magic-string": "^0.30.5", - "postcss": "^8.4.32", - "source-map-js": "^1.0.2" + "muggle-string": "^0.4.0" } }, - "node_modules/@vue/compiler-ssr": { - "version": "3.4.3", - "resolved": "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.4.3.tgz", - "integrity": "sha512-wnYQtMBkeFSxgSSQbYGQeXPhQacQiog2c6AlvMldQH6DB+gSXK/0F6DVXAJfEiuBSgBhUc8dwrrG5JQcqwalsA==", - "dev": true, + "node_modules/@volar/typescript": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-2.0.2.tgz", + "integrity": "sha512-lcCrYdg1ZgKZVm0mnk7pOxBGrojZk/YaeFJdxLH0gd/Kd13Go7uNvfotlYSGQshwHKcbJ0zaqY0et9w9oW1yyA==", "dependencies": { - "@vue/compiler-dom": "3.4.3", - "@vue/shared": "3.4.3" + "@volar/language-core": "2.0.2", + "path-browserify": "^1.0.1" } }, - "node_modules/@vue/devtools-api": { - "version": "6.5.1", - "resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.5.1.tgz", - "integrity": "sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA==", - "dev": true - }, - "node_modules/@vue/reactivity": { - "version": "3.4.3", - "resolved": "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.4.3.tgz", - "integrity": "sha512-q5f9HLDU+5aBKizXHAx0w4whkIANs1Muiq9R5YXm0HtorSlflqv9u/ohaMxuuhHWCji4xqpQ1eL04WvmAmGnFg==", - "dev": true, + "node_modules/@vscode/emmet-helper": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/@vscode/emmet-helper/-/emmet-helper-2.9.2.tgz", + "integrity": "sha512-MaGuyW+fa13q3aYsluKqclmh62Hgp0BpKIqS66fCxfOaBcVQ1OnMQxRRgQUYnCkxFISAQlkJ0qWWPyXjro1Qrg==", "dependencies": { - "@vue/shared": "3.4.3" + "emmet": "^2.4.3", + "jsonc-parser": "^2.3.0", + "vscode-languageserver-textdocument": "^1.0.1", + "vscode-languageserver-types": "^3.15.1", + "vscode-uri": "^2.1.2" } }, - "node_modules/@vue/runtime-core": { - "version": "3.4.3", - "resolved": "https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.4.3.tgz", - "integrity": "sha512-C1r6QhB1qY7D591RCSFhMULyzL9CuyrGc+3PpB0h7dU4Qqw6GNyo4BNFjHZVvsWncrUlKX3DIKg0Y7rNNr06NQ==", - "dev": true, - "dependencies": { - "@vue/reactivity": "3.4.3", - "@vue/shared": "3.4.3" + "node_modules/@vscode/emmet-helper/node_modules/vscode-uri": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-2.1.2.tgz", + "integrity": "sha512-8TEXQxlldWAuIODdukIb+TR5s+9Ds40eSJrw+1iDDA9IFORPjMELarNQE3myz5XIkWWpdprmJjm1/SxMlWOC8A==" + }, + "node_modules/@vscode/l10n": { + "version": "0.0.16", + "resolved": "https://registry.npmjs.org/@vscode/l10n/-/l10n-0.0.16.tgz", + "integrity": "sha512-JT5CvrIYYCrmB+dCana8sUqJEcGB1ZDXNLMQ2+42bW995WmNoenijWMUdZfwmuQUTQcEVVIa2OecZzTYWUW9Cg==" + }, + "node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" } }, - "node_modules/@vue/runtime-dom": { - "version": "3.4.3", - "resolved": "https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.4.3.tgz", - "integrity": "sha512-wrsprg7An5Ec+EhPngWdPuzkp0BEUxAKaQtN9dPU/iZctPyD9aaXmVtehPJerdQxQale6gEnhpnfywNw3zOv2A==", - "dev": true, - "dependencies": { - "@vue/runtime-core": "3.4.3", - "@vue/shared": "3.4.3", - "csstype": "^3.1.3" + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/@vue/server-renderer": { - "version": "3.4.3", - "resolved": "https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.4.3.tgz", - "integrity": "sha512-BUxt8oVGMKKsqSkM1uU3d3Houyfy4WAc2SpSQRebNd+XJGATVkW/rO129jkyL+kpB/2VRKzE63zwf5RtJ3XuZw==", - "dev": true, + "node_modules/ansi-align": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", "dependencies": { - "@vue/compiler-ssr": "3.4.3", - "@vue/shared": "3.4.3" - }, - "peerDependencies": { - "vue": "3.4.3" + "string-width": "^4.1.0" } }, - "node_modules/@vue/shared": { - "version": "3.4.3", - "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.4.3.tgz", - "integrity": "sha512-rIwlkkP1n4uKrRzivAKPZIEkHiuwY5mmhMJ2nZKCBLz8lTUlE73rQh4n1OnnMurXt1vcUNyH4ZPfdh8QweTjpQ==", - "dev": true + "node_modules/ansi-align/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } }, - "node_modules/@vuepress/bundler-vite": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/bundler-vite/-/bundler-vite-2.0.0-rc.0.tgz", - "integrity": "sha512-rX8S8IYpqqlJfNPstS/joorpxXx/4WuE7+gDM31i2HUrxOKGZVzq8ZsRRRU2UdoTwHZSd3LpUS4sMtxE5xLK1A==", - "dev": true, - "dependencies": { - "@vitejs/plugin-vue": "^4.5.0", - "@vuepress/client": "2.0.0-rc.0", - "@vuepress/core": "2.0.0-rc.0", - "@vuepress/shared": "2.0.0-rc.0", - "@vuepress/utils": "2.0.0-rc.0", - "autoprefixer": "^10.4.16", - "connect-history-api-fallback": "^2.0.0", - "postcss": "^8.4.31", - "postcss-load-config": "^4.0.1", - "rollup": "^4.4.1", - "vite": "~5.0.0", - "vue": "^3.3.8", - "vue-router": "^4.2.5" - } - }, - "node_modules/@vuepress/cli": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/cli/-/cli-2.0.0-rc.0.tgz", - "integrity": "sha512-XWSIFO9iOR7N4O2lXIwS5vZuLjU9WU/aGAtmhMWEMxrdMx7TQaJbgrfpTUEbHMf+cPI1DXBbUbtmkqIvtfOV0w==", - "dev": true, + "node_modules/ansi-align/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/ansi-align/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dependencies": { - "@vuepress/core": "2.0.0-rc.0", - "@vuepress/shared": "2.0.0-rc.0", - "@vuepress/utils": "2.0.0-rc.0", - "cac": "^6.7.14", - "chokidar": "^3.5.3", - "envinfo": "^7.11.0", - "esbuild": "~0.19.5" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, - "bin": { - "vuepress-cli": "bin/vuepress.js" + "engines": { + "node": ">=8" } }, - "node_modules/@vuepress/client": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/client/-/client-2.0.0-rc.0.tgz", - "integrity": "sha512-TwQx8hJgYONYxX+QltZ2aw9O5Ym6SKelfiUduuIRb555B1gece/jSVap3H/ZwyBhpgJMtG4+/Mrmf8nlDSHjvw==", - "dev": true, + "node_modules/ansi-align/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dependencies": { - "@vue/devtools-api": "^6.5.1", - "@vuepress/shared": "2.0.0-rc.0", - "@vueuse/core": "^10.6.1", - "vue": "^3.3.8", - "vue-router": "^4.2.5" + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "node_modules/@vuepress/core": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/core/-/core-2.0.0-rc.0.tgz", - "integrity": "sha512-uoOaZP1MdxZYJIAJcRcmYKKeCIVnxZeOuLMOOB9CPuAKSalT1RvJ1lztw6RX3q9SPnlqtSZPQXDncPAZivw4pA==", - "dev": true, - "dependencies": { - "@vuepress/client": "2.0.0-rc.0", - "@vuepress/markdown": "2.0.0-rc.0", - "@vuepress/shared": "2.0.0-rc.0", - "@vuepress/utils": "2.0.0-rc.0", - "vue": "^3.3.8" + "node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/@vuepress/markdown": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/markdown/-/markdown-2.0.0-rc.0.tgz", - "integrity": "sha512-USmqdKKMT6ZFHYRztTjKUlO8qgGfnEygMAAq4AzC/uYXiEfrbMBLAWJhteyGS56P3rGLj0OPAhksE681bX/wOg==", - "dev": true, - "dependencies": { - "@mdit-vue/plugin-component": "^1.0.0", - "@mdit-vue/plugin-frontmatter": "^1.0.0", - "@mdit-vue/plugin-headers": "^1.0.0", - "@mdit-vue/plugin-sfc": "^1.0.0", - "@mdit-vue/plugin-title": "^1.0.0", - "@mdit-vue/plugin-toc": "^1.0.0", - "@mdit-vue/shared": "^1.0.0", - "@mdit-vue/types": "^1.0.0", - "@types/markdown-it": "^13.0.6", - "@types/markdown-it-emoji": "^2.0.4", - "@vuepress/shared": "2.0.0-rc.0", - "@vuepress/utils": "2.0.0-rc.0", - "markdown-it": "^13.0.2", - "markdown-it-anchor": "^8.6.7", - "markdown-it-emoji": "^2.0.2", - "mdurl": "^1.0.1" - } - }, - "node_modules/@vuepress/plugin-active-header-links": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-active-header-links/-/plugin-active-header-links-2.0.0-rc.0.tgz", - "integrity": "sha512-UJdXLYNGL5Wjy5YGY8M2QgqT75bZ95EHebbqGi8twBdIJE9O+bM+dPJyYtAk2PIVqFORiw3Hj+PchsNSxdn9+g==", - "dev": true, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dependencies": { - "@vuepress/client": "2.0.0-rc.0", - "@vuepress/core": "2.0.0-rc.0", - "@vuepress/utils": "2.0.0-rc.0", - "ts-debounce": "^4.0.0", - "vue": "^3.3.8", - "vue-router": "^4.2.5" + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" } }, - "node_modules/@vuepress/plugin-back-to-top": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-back-to-top/-/plugin-back-to-top-2.0.0-rc.0.tgz", - "integrity": "sha512-6GPfuzV5lkAnR00BxRUhqMXwMWt741alkq2R6bln4N8BneSOwEpX/7vi19MGf232aKdS/Va4pF5p0/nJ8Sed/g==", - "dev": true, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dependencies": { - "@vuepress/client": "2.0.0-rc.0", - "@vuepress/core": "2.0.0-rc.0", - "@vuepress/utils": "2.0.0-rc.0", - "ts-debounce": "^4.0.0", - "vue": "^3.3.8" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" } }, - "node_modules/@vuepress/plugin-container": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-container/-/plugin-container-2.0.0-rc.0.tgz", - "integrity": "sha512-b7vrLN11YE7qiUDPfA3N9P7Z8fupe9Wbcr9KAE/bmfZ9VT4d6kzpVyoU7XHi99XngitsmnkaXP4aBvBF1c2AnA==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^13.0.6", - "@vuepress/core": "2.0.0-rc.0", - "@vuepress/markdown": "2.0.0-rc.0", - "@vuepress/shared": "2.0.0-rc.0", - "@vuepress/utils": "2.0.0-rc.0", - "markdown-it": "^13.0.2", - "markdown-it-container": "^3.0.0" - } + "node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==" }, - "node_modules/@vuepress/plugin-docsearch": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-docsearch/-/plugin-docsearch-2.0.0-rc.0.tgz", - "integrity": "sha512-bFbb+RxNyoLVbojv3Fh3UNfMmx9tszdae5ni9nG2xa05giCRwGKT0wFG3Q6n0a9kIQ6V7z3PjCj9x1k4SALPEA==", - "dev": true, - "dependencies": { - "@docsearch/css": "^3.5.2", - "@docsearch/js": "^3.5.2", - "@docsearch/react": "^3.5.2", - "@vuepress/client": "2.0.0-rc.0", - "@vuepress/core": "2.0.0-rc.0", - "@vuepress/shared": "2.0.0-rc.0", - "@vuepress/utils": "2.0.0-rc.0", - "@vueuse/core": "^10.6.1", - "ts-debounce": "^4.0.0", - "vue": "^3.3.8", - "vue-router": "^4.2.5" - } - }, - "node_modules/@vuepress/plugin-external-link-icon": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-external-link-icon/-/plugin-external-link-icon-2.0.0-rc.0.tgz", - "integrity": "sha512-o8bk0oIlj/BkKc02mq91XLDloq1VOz/8iNcRwKAeqBE6svXzdYiyoTGet0J/4iPuAetsCn75S57W6RioDJHMnQ==", - "dev": true, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/aria-query": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", "dependencies": { - "@vuepress/client": "2.0.0-rc.0", - "@vuepress/core": "2.0.0-rc.0", - "@vuepress/markdown": "2.0.0-rc.0", - "@vuepress/shared": "2.0.0-rc.0", - "@vuepress/utils": "2.0.0-rc.0", - "vue": "^3.3.8" + "dequal": "^2.0.3" } }, - "node_modules/@vuepress/plugin-git": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-git/-/plugin-git-2.0.0-rc.0.tgz", - "integrity": "sha512-r7UF77vZxaYeJQLygzodKv+15z3/dTLuGp4VcYO21W6BlJZvd4u9zqgiV7A//bZQvK4+3Hprylr0G3KgXqMewA==", - "dev": true, - "dependencies": { - "@vuepress/core": "2.0.0-rc.0", - "@vuepress/utils": "2.0.0-rc.0", - "execa": "^8.0.1" + "node_modules/array-iterate": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/array-iterate/-/array-iterate-2.0.1.tgz", + "integrity": "sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/@vuepress/plugin-medium-zoom": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-medium-zoom/-/plugin-medium-zoom-2.0.0-rc.0.tgz", - "integrity": "sha512-peU1lYKsmKikIe/0pkJuHzD/k6xW2TuqdvKVhV4I//aOE1WxsREKJ4ACcldmoIsnysoDydAUqKT6xDPGyDsH2g==", - "dev": true, - "dependencies": { - "@vuepress/client": "2.0.0-rc.0", - "@vuepress/core": "2.0.0-rc.0", - "@vuepress/utils": "2.0.0-rc.0", - "medium-zoom": "^1.1.0", - "vue": "^3.3.8" + "node_modules/astring": { + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/astring/-/astring-1.8.6.tgz", + "integrity": "sha512-ISvCdHdlTDlH5IpxQJIex7BWBywFWgjJSVdwst+/iQCoEYnyOaQ95+X1JGshuBjGp6nxKUy1jMgE3zPqN7fQdg==", + "bin": { + "astring": "bin/astring" + } + }, + "node_modules/astro": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/astro/-/astro-4.3.5.tgz", + "integrity": "sha512-7jPffNlcmDO94NlkWe/hUWta/pIjlx1LVD/DZb/fyjT1Jv+7mGhKZBIjkDfeVpequW70mep8cAS5RM7Pxa0Gdg==", + "dependencies": { + "@astrojs/compiler": "^2.5.3", + "@astrojs/internal-helpers": "0.2.1", + "@astrojs/markdown-remark": "4.2.1", + "@astrojs/telemetry": "3.0.4", + "@babel/core": "^7.23.3", + "@babel/generator": "^7.23.3", + "@babel/parser": "^7.23.3", + "@babel/plugin-transform-react-jsx": "^7.22.5", + "@babel/traverse": "^7.23.3", + "@babel/types": "^7.23.3", + "@types/babel__core": "^7.20.4", + "acorn": "^8.11.2", + "aria-query": "^5.3.0", + "axobject-query": "^4.0.0", + "boxen": "^7.1.1", + "chokidar": "^3.5.3", + "ci-info": "^4.0.0", + "clsx": "^2.0.0", + "common-ancestor-path": "^1.0.1", + "cookie": "^0.6.0", + "cssesc": "^3.0.0", + "debug": "^4.3.4", + "deterministic-object-hash": "^2.0.1", + "devalue": "^4.3.2", + "diff": "^5.1.0", + "dlv": "^1.1.3", + "dset": "^3.1.3", + "es-module-lexer": "^1.4.1", + "esbuild": "^0.19.6", + "estree-walker": "^3.0.3", + "execa": "^8.0.1", + "fast-glob": "^3.3.2", + "flattie": "^1.1.0", + "github-slugger": "^2.0.0", + "gray-matter": "^4.0.3", + "html-escaper": "^3.0.3", + "http-cache-semantics": "^4.1.1", + "js-yaml": "^4.1.0", + "kleur": "^4.1.4", + "magic-string": "^0.30.3", + "mdast-util-to-hast": "13.0.2", + "mime": "^3.0.0", + "ora": "^7.0.1", + "p-limit": "^5.0.0", + "p-queue": "^8.0.1", + "path-to-regexp": "^6.2.1", + "preferred-pm": "^3.1.2", + "probe-image-size": "^7.2.3", + "prompts": "^2.4.2", + "rehype": "^13.0.1", + "resolve": "^1.22.4", + "semver": "^7.5.4", + "server-destroy": "^1.0.1", + "shikiji": "^0.9.18", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0", + "tsconfck": "^3.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.1", + "vite": "^5.0.12", + "vitefu": "^0.2.5", + "which-pm": "^2.1.1", + "yargs-parser": "^21.1.1", + "zod": "^3.22.4" + }, + "bin": { + "astro": "astro.js" + }, + "engines": { + "node": ">=18.14.1", + "npm": ">=6.14.0" + }, + "optionalDependencies": { + "sharp": "^0.32.6" } }, - "node_modules/@vuepress/plugin-nprogress": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-nprogress/-/plugin-nprogress-2.0.0-rc.0.tgz", - "integrity": "sha512-rI+eK0Pg1KiZE+7hGmDUeSbgdWCid8Vnw0hFKNmjinDzGVmx4m03M6qfvclsI0SryH+lR7itZGLaR4gbTlrz/w==", - "dev": true, + "node_modules/astro-expressive-code": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/astro-expressive-code/-/astro-expressive-code-0.32.4.tgz", + "integrity": "sha512-/Kq8wLMz0X2gbLWGmPryqEdFV/om/GROsoLtPFqLrLCRD5CpwxXAW185BIGZKf4iYsyJim1vvcpQm5Y9hV5B1g==", "dependencies": { - "@vuepress/client": "2.0.0-rc.0", - "@vuepress/core": "2.0.0-rc.0", - "@vuepress/utils": "2.0.0-rc.0", - "vue": "^3.3.8", - "vue-router": "^4.2.5" + "hast-util-to-html": "^8.0.4", + "remark-expressive-code": "^0.32.4" + }, + "peerDependencies": { + "astro": "^3.3.0 || ^4.0.0-beta" } }, - "node_modules/@vuepress/plugin-palette": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-palette/-/plugin-palette-2.0.0-rc.0.tgz", - "integrity": "sha512-wW70SCp3/K7s1lln5YQsBGTog2WXaQv5piva5zhXcQ47YGf4aAJpThDa5C/ot4HhkPOKn8Iz5s0ckxXZzW8DIg==", - "dev": true, + "node_modules/astro-expressive-code/node_modules/@types/hast": { + "version": "2.3.10", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.10.tgz", + "integrity": "sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw==", "dependencies": { - "@vuepress/core": "2.0.0-rc.0", - "@vuepress/utils": "2.0.0-rc.0", - "chokidar": "^3.5.3" + "@types/unist": "^2" } }, - "node_modules/@vuepress/plugin-prismjs": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-prismjs/-/plugin-prismjs-2.0.0-rc.0.tgz", - "integrity": "sha512-c5WRI7+FhVjdbymOKQ8F2KY/Bnv7aQtWScVk8vCMUimNi7v7Wff/A/i3KSFNz/tge3LxiAeH/Dc2WS/OnQXwCg==", - "dev": true, + "node_modules/astro-expressive-code/node_modules/@types/unist": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" + }, + "node_modules/astro-expressive-code/node_modules/hast-util-from-parse5": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-7.1.2.tgz", + "integrity": "sha512-Nz7FfPBuljzsN3tCQ4kCBKqdNhQE2l0Tn+X1ubgKBPRoiDIu1mL08Cfw4k7q71+Duyaw7DXDN+VTAp4Vh3oCOw==", "dependencies": { - "@vuepress/core": "2.0.0-rc.0", - "prismjs": "^1.29.0" + "@types/hast": "^2.0.0", + "@types/unist": "^2.0.0", + "hastscript": "^7.0.0", + "property-information": "^6.0.0", + "vfile": "^5.0.0", + "vfile-location": "^4.0.0", + "web-namespaces": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/@vuepress/plugin-shiki": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-shiki/-/plugin-shiki-2.0.0-rc.0.tgz", - "integrity": "sha512-K06icizhp0zVUtWa6rqL/SKWzzSP+XgYizRoqwdMsGlYNThLXAf4cIseRjF+I4VOFS5aj5hZs8MnxymKmRrwIQ==", - "dev": true, + "node_modules/astro-expressive-code/node_modules/hast-util-parse-selector": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-3.1.1.tgz", + "integrity": "sha512-jdlwBjEexy1oGz0aJ2f4GKMaVKkA9jwjr4MjAAI22E5fM/TXVZHuS5OpONtdeIkRKqAaryQ2E9xNQxijoThSZA==", "dependencies": { - "@vuepress/core": "2.0.0-rc.0", - "shiki": "^0.14.5" + "@types/hast": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/@vuepress/plugin-shiki/node_modules/shiki": { - "version": "0.14.7", - "resolved": "https://registry.npmmirror.com/shiki/-/shiki-0.14.7.tgz", - "integrity": "sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==", - "dev": true, - "dependencies": { - "ansi-sequence-parser": "^1.1.0", - "jsonc-parser": "^3.2.0", - "vscode-oniguruma": "^1.7.0", - "vscode-textmate": "^8.0.0" + "node_modules/astro-expressive-code/node_modules/hast-util-raw": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-7.2.3.tgz", + "integrity": "sha512-RujVQfVsOrxzPOPSzZFiwofMArbQke6DJjnFfceiEbFh7S05CbPt0cYN+A5YeD3pso0JQk6O1aHBnx9+Pm2uqg==", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/parse5": "^6.0.0", + "hast-util-from-parse5": "^7.0.0", + "hast-util-to-parse5": "^7.0.0", + "html-void-elements": "^2.0.0", + "parse5": "^6.0.0", + "unist-util-position": "^4.0.0", + "unist-util-visit": "^4.0.0", + "vfile": "^5.0.0", + "web-namespaces": "^2.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/astro-expressive-code/node_modules/hast-util-to-html": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-8.0.4.tgz", + "integrity": "sha512-4tpQTUOr9BMjtYyNlt0P50mH7xj0Ks2xpo8M943Vykljf99HW6EzulIoJP1N3eKOSScEHzyzi9dm7/cn0RfGwA==", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/unist": "^2.0.0", + "ccount": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-raw": "^7.0.0", + "hast-util-whitespace": "^2.0.0", + "html-void-elements": "^2.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "stringify-entities": "^4.0.0", + "zwitch": "^2.0.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/@vuepress/plugin-theme-data": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-theme-data/-/plugin-theme-data-2.0.0-rc.0.tgz", - "integrity": "sha512-FXY3/Ml+rM6gNKvwdBF6vKAcwnSvtXCzKgQwJAw3ppQTKUkLcbOxqM+h4d8bzHWAAvdnEvQFug5uEZgWllBQbA==", - "dev": true, + "node_modules/astro-expressive-code/node_modules/hast-util-to-parse5": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-7.1.0.tgz", + "integrity": "sha512-YNRgAJkH2Jky5ySkIqFXTQiaqcAtJyVE+D5lkN6CdtOqrnkLfGYYrEcKuHOJZlp+MwjSwuD3fZuawI+sic/RBw==", "dependencies": { - "@vue/devtools-api": "^6.5.1", - "@vuepress/client": "2.0.0-rc.0", - "@vuepress/core": "2.0.0-rc.0", - "@vuepress/shared": "2.0.0-rc.0", - "@vuepress/utils": "2.0.0-rc.0", - "vue": "^3.3.8" + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "web-namespaces": "^2.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/@vuepress/shared": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/shared/-/shared-2.0.0-rc.0.tgz", - "integrity": "sha512-ikdSfjRv5LGM1iv4HHwF9P6gqTjaFCXKPK+hzlkHFHNZO1GLqk7/BPc4F51tAG1s8TcLhUZc+54LrfgS7PkXXA==", - "dev": true, - "dependencies": { - "@mdit-vue/types": "^1.0.0", - "@vue/shared": "^3.3.8" + "node_modules/astro-expressive-code/node_modules/hast-util-whitespace": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-2.0.1.tgz", + "integrity": "sha512-nAxA0v8+vXSBDt3AnRUNjyRIQ0rD+ntpbAp4LnPkumc5M9yUbSMa4XDU9Q6etY4f1Wp4bNgvc1yjiZtsTTrSng==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/@vuepress/theme-default": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/theme-default/-/theme-default-2.0.0-rc.0.tgz", - "integrity": "sha512-I8Y08evDmMuD1jh3NftPpFFSlCWOizQDJLjN7EQwcg7jiAP4A7c2REo6nBN2EmP24Mi7UrRM+RnytHR5V+pElA==", - "dev": true, + "node_modules/astro-expressive-code/node_modules/hastscript": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-7.2.0.tgz", + "integrity": "sha512-TtYPq24IldU8iKoJQqvZOuhi5CyCQRAbvDOX0x1eW6rsHSxa/1i2CCiptNTotGHJ3VoHRGmqiv6/D3q113ikkw==", "dependencies": { - "@vuepress/client": "2.0.0-rc.0", - "@vuepress/core": "2.0.0-rc.0", - "@vuepress/plugin-active-header-links": "2.0.0-rc.0", - "@vuepress/plugin-back-to-top": "2.0.0-rc.0", - "@vuepress/plugin-container": "2.0.0-rc.0", - "@vuepress/plugin-external-link-icon": "2.0.0-rc.0", - "@vuepress/plugin-git": "2.0.0-rc.0", - "@vuepress/plugin-medium-zoom": "2.0.0-rc.0", - "@vuepress/plugin-nprogress": "2.0.0-rc.0", - "@vuepress/plugin-palette": "2.0.0-rc.0", - "@vuepress/plugin-prismjs": "2.0.0-rc.0", - "@vuepress/plugin-theme-data": "2.0.0-rc.0", - "@vuepress/shared": "2.0.0-rc.0", - "@vuepress/utils": "2.0.0-rc.0", - "@vueuse/core": "^10.6.1", - "sass": "^1.69.5", - "vue": "^3.3.8", - "vue-router": "^4.2.5" - }, - "peerDependencies": { - "sass-loader": "^13.3.2" + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-parse-selector": "^3.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0" }, - "peerDependenciesMeta": { - "sass-loader": { - "optional": true - } + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/@vuepress/utils": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/utils/-/utils-2.0.0-rc.0.tgz", - "integrity": "sha512-Q1ay/woClDHcW0Qe91KsnHoupdNN0tp/vhjvVLuAYxlv/1Obii7hz9WFcajyyGEhmsYxdvG2sGmcxFA02tuKkw==", - "dev": true, - "dependencies": { - "@types/debug": "^4.1.12", - "@types/fs-extra": "^11.0.4", - "@types/hash-sum": "^1.0.2", - "@vuepress/shared": "2.0.0-rc.0", - "debug": "^4.3.4", - "fs-extra": "^11.1.1", - "globby": "^14.0.0", - "hash-sum": "^2.0.0", - "ora": "^7.0.1", - "picocolors": "^1.0.0", - "upath": "^2.0.1" + "node_modules/astro-expressive-code/node_modules/html-void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-2.0.1.tgz", + "integrity": "sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/@vueuse/core": { - "version": "10.7.1", - "resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-10.7.1.tgz", - "integrity": "sha512-74mWHlaesJSWGp1ihg76vAnfVq9NTv1YT0SYhAQ6zwFNdBkkP+CKKJmVOEHcdSnLXCXYiL5e7MaewblfiYLP7g==", - "dev": true, + "node_modules/astro-expressive-code/node_modules/parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" + }, + "node_modules/astro-expressive-code/node_modules/unist-util-is": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", + "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", "dependencies": { - "@types/web-bluetooth": "^0.0.20", - "@vueuse/metadata": "10.7.1", - "@vueuse/shared": "10.7.1", - "vue-demi": ">=0.14.6" + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/@vueuse/core/node_modules/vue-demi": { - "version": "0.14.6", - "resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.6.tgz", - "integrity": "sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==", - "dev": true, - "hasInstallScript": true, - "bin": { - "vue-demi-fix": "bin/vue-demi-fix.js", - "vue-demi-switch": "bin/vue-demi-switch.js" - }, - "engines": { - "node": ">=12" - }, - "peerDependencies": { - "@vue/composition-api": "^1.0.0-rc.1", - "vue": "^3.0.0-0 || ^2.6.0" + "node_modules/astro-expressive-code/node_modules/unist-util-position": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-4.0.4.tgz", + "integrity": "sha512-kUBE91efOWfIVBo8xzh/uZQ7p9ffYRtUbMRZBNFYwf0RK8koUMx6dGUfwylLOKmaT2cs4wSW96QoYUSXAyEtpg==", + "dependencies": { + "@types/unist": "^2.0.0" }, - "peerDependenciesMeta": { - "@vue/composition-api": { - "optional": true - } + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/@vueuse/metadata": { - "version": "10.7.1", - "resolved": "https://registry.npmmirror.com/@vueuse/metadata/-/metadata-10.7.1.tgz", - "integrity": "sha512-jX8MbX5UX067DYVsbtrmKn6eG6KMcXxLRLlurGkZku5ZYT3vxgBjui2zajvUZ18QLIjrgBkFRsu7CqTAg18QFw==", - "dev": true - }, - "node_modules/@vueuse/shared": { - "version": "10.7.1", - "resolved": "https://registry.npmmirror.com/@vueuse/shared/-/shared-10.7.1.tgz", - "integrity": "sha512-v0jbRR31LSgRY/C5i5X279A/WQjD6/JsMzGa+eqt658oJ75IvQXAeONmwvEMrvJQKnRElq/frzBR7fhmWY5uLw==", - "dev": true, + "node_modules/astro-expressive-code/node_modules/unist-util-stringify-position": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", "dependencies": { - "vue-demi": ">=0.14.6" + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/@vueuse/shared/node_modules/vue-demi": { - "version": "0.14.6", - "resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.6.tgz", - "integrity": "sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==", - "dev": true, - "hasInstallScript": true, - "bin": { - "vue-demi-fix": "bin/vue-demi-fix.js", - "vue-demi-switch": "bin/vue-demi-switch.js" - }, - "engines": { - "node": ">=12" - }, - "peerDependencies": { - "@vue/composition-api": "^1.0.0-rc.1", - "vue": "^3.0.0-0 || ^2.6.0" + "node_modules/astro-expressive-code/node_modules/unist-util-visit": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", + "integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0", + "unist-util-visit-parents": "^5.1.1" }, - "peerDependenciesMeta": { - "@vue/composition-api": { - "optional": true - } + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/@yarnpkg/lockfile": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", - "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", - "dev": true - }, - "node_modules/algoliasearch": { - "version": "4.22.0", - "resolved": "https://registry.npmmirror.com/algoliasearch/-/algoliasearch-4.22.0.tgz", - "integrity": "sha512-gfceltjkwh7PxXwtkS8KVvdfK+TSNQAWUeNSxf4dA29qW5tf2EGwa8jkJujlT9jLm17cixMVoGNc+GJFO1Mxhg==", - "dev": true, + "node_modules/astro-expressive-code/node_modules/unist-util-visit-parents": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", + "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", "dependencies": { - "@algolia/cache-browser-local-storage": "4.22.0", - "@algolia/cache-common": "4.22.0", - "@algolia/cache-in-memory": "4.22.0", - "@algolia/client-account": "4.22.0", - "@algolia/client-analytics": "4.22.0", - "@algolia/client-common": "4.22.0", - "@algolia/client-personalization": "4.22.0", - "@algolia/client-search": "4.22.0", - "@algolia/logger-common": "4.22.0", - "@algolia/logger-console": "4.22.0", - "@algolia/requester-browser-xhr": "4.22.0", - "@algolia/requester-common": "4.22.0", - "@algolia/requester-node-http": "4.22.0", - "@algolia/transporter": "4.22.0" + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" + "node_modules/astro-expressive-code/node_modules/vfile": { + "version": "5.3.7", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", + "integrity": "sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==", + "dependencies": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^3.0.0", + "vfile-message": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/ansi-sequence-parser": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz", - "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==", - "dev": true - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, + "node_modules/astro-expressive-code/node_modules/vfile-location": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-4.1.0.tgz", + "integrity": "sha512-YF23YMyASIIJXpktBa4vIGLJ5Gs88UB/XePgqPmTa7cDA+JeO3yclbpheQYCHjVHBn/yePzrXuygIL+xbvRYHw==", "dependencies": { - "color-convert": "^2.0.1" + "@types/unist": "^2.0.0", + "vfile": "^5.0.0" }, - "engines": { - "node": ">=8" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmmirror.com/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, + "node_modules/astro-expressive-code/node_modules/vfile-message": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-3.1.4.tgz", + "integrity": "sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==", "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^3.0.0" }, - "engines": { - "node": ">= 8" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/arg": { - "version": "5.0.2", - "resolved": "https://registry.npmmirror.com/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", - "dev": true - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmmirror.com/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, + "node_modules/axobject-query": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.0.0.tgz", + "integrity": "sha512-+60uv1hiVFhHZeO+Lz0RYzsVHy5Wr1ayX0mwda9KPDVLNJgZ1T9Ny7VmFbLDzxsH0D87I86vgj3gFrjTJUYznw==", "dependencies": { - "sprintf-js": "~1.0.2" + "dequal": "^2.0.3" } }, - "node_modules/at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } + "node_modules/b4a": { + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.6.tgz", + "integrity": "sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==" }, - "node_modules/autoprefixer": { - "version": "10.4.16", - "resolved": "https://registry.npmmirror.com/autoprefixer/-/autoprefixer-10.4.16.tgz", - "integrity": "sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==", - "dev": true, - "dependencies": { - "browserslist": "^4.21.10", - "caniuse-lite": "^1.0.30001538", - "fraction.js": "^4.3.6", - "normalize-range": "^0.1.2", - "picocolors": "^1.0.0", - "postcss-value-parser": "^4.2.0" - }, - "bin": { - "autoprefixer": "bin/autoprefixer" - }, - "engines": { - "node": "^10 || ^12 || >=14" - }, - "peerDependencies": { - "postcss": "^8.1.0" + "node_modules/bail": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz", + "integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "node_modules/base-64": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/base-64/-/base-64-1.0.0.tgz", + "integrity": "sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg==" }, "node_modules/base64-js": { "version": "1.5.1", - "resolved": "https://registry.npmmirror.com/base64-js/-/base64-js-1.5.1.tgz", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bcp-47": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/bcp-47/-/bcp-47-2.1.0.tgz", + "integrity": "sha512-9IIS3UPrvIa1Ej+lVDdDwO7zLehjqsaByECw0bu2RRGP73jALm6FYbzI5gWbgHLvNdkvfXB5YrSbocZdOS0c0w==", + "dependencies": { + "is-alphabetical": "^2.0.0", + "is-alphanumerical": "^2.0.0", + "is-decimal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/bcp-47-match": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/bcp-47-match/-/bcp-47-match-2.0.3.tgz", + "integrity": "sha512-JtTezzbAibu8G0R9op9zb3vcWZd9JF6M0xOYGPn0fNCd7wOpRB1mU2mH9T8gaBGbAAyIIVgB2G7xG0GP98zMAQ==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } }, "node_modules/binary-extensions": { "version": "2.2.0", - "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.2.0.tgz", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, "engines": { "node": ">=8" } }, "node_modules/bl": { "version": "5.1.0", - "resolved": "https://registry.npmmirror.com/bl/-/bl-5.1.0.tgz", + "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz", "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==", - "dev": true, "dependencies": { "buffer": "^6.0.3", "inherits": "^2.0.4", @@ -1707,25 +2623,66 @@ }, "node_modules/boolbase": { "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "dev": true - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" + }, + "node_modules/boxen": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.1.1.tgz", + "integrity": "sha512-2hCgjEmP8YLWQ130n2FerGv7rYpfBmnmp9Uy2Le1vge6X3gZIfSmEzP5QTDElFxcvVcXlEn8Aq6MU/PZygIOog==", + "dependencies": { + "ansi-align": "^3.0.1", + "camelcase": "^7.0.1", + "chalk": "^5.2.0", + "cli-boxes": "^3.0.0", + "string-width": "^5.1.2", + "type-fest": "^2.13.0", + "widest-line": "^4.0.1", + "wrap-ansi": "^8.1.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boxen/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/boxen/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, + "node_modules/boxen/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/braces": { "version": "3.0.2", - "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.2.tgz", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, "dependencies": { "fill-range": "^7.0.1" }, @@ -1734,13 +2691,26 @@ } }, "node_modules/browserslist": { - "version": "4.22.2", - "resolved": "https://registry.npmmirror.com/browserslist/-/browserslist-4.22.2.tgz", - "integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==", - "dev": true, + "version": "4.22.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.3.tgz", + "integrity": "sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "dependencies": { - "caniuse-lite": "^1.0.30001565", - "electron-to-chromium": "^1.4.601", + "caniuse-lite": "^1.0.30001580", + "electron-to-chromium": "^1.4.648", "node-releases": "^2.0.14", "update-browserslist-db": "^1.0.13" }, @@ -1753,86 +2723,119 @@ }, "node_modules/buffer": { "version": "6.0.3", - "resolved": "https://registry.npmmirror.com/buffer/-/buffer-6.0.3.tgz", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" } }, - "node_modules/cac": { - "version": "6.7.14", - "resolved": "https://registry.npmmirror.com/cac/-/cac-6.7.14.tgz", - "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", - "dev": true, + "node_modules/camelcase": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.1.tgz", + "integrity": "sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==", "engines": { - "node": ">=8" - } - }, - "node_modules/call-bind": { - "version": "1.0.5", - "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.5.tgz", - "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.1", - "set-function-length": "^1.1.1" + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/caniuse-lite": { - "version": "1.0.30001572", - "resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001572.tgz", - "integrity": "sha512-1Pbh5FLmn5y4+QhNyJE9j3/7dK44dGB83/ZMjv/qJk86TvDbjk0LosiZo0i0WB0Vx607qMX9jYrn1VLHCkN4rw==", - "dev": true + "version": "1.0.30001585", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001585.tgz", + "integrity": "sha512-yr2BWR1yLXQ8fMpdS/4ZZXpseBgE7o4g41x3a6AJOqZuOi+iE/WdJYAuZ6Y95i4Ohd2Y+9MzIWRR+uGABH4s3Q==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] }, - "node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmmirror.com/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", - "dev": true, - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" + "node_modules/ccount": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", + "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/cheerio": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmmirror.com/cheerio/-/cheerio-1.0.0-rc.12.tgz", - "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", - "dev": true, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dependencies": { - "cheerio-select": "^2.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "htmlparser2": "^8.0.1", - "parse5": "^7.0.0", - "parse5-htmlparser2-tree-adapter": "^7.0.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" }, "engines": { - "node": ">= 6" + "node": ">=4" + } + }, + "node_modules/character-entities": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", + "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/cheerio-select": { + "node_modules/character-entities-html4": { "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/cheerio-select/-/cheerio-select-2.1.0.tgz", - "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0", - "css-select": "^5.1.0", - "css-what": "^6.1.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1" + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", + "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", + "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-reference-invalid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz", + "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -1845,45 +2848,107 @@ "engines": { "node": ">= 8.10.0" }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, "optionalDependencies": { "fsevents": "~2.3.2" } }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, "node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmmirror.com/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true, + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.0.0.tgz", + "integrity": "sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], "engines": { "node": ">=8" } }, + "node_modules/cli-boxes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", + "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cli-cursor": { "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/cli-cursor/-/cli-cursor-4.0.0.tgz", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", - "dev": true, "dependencies": { "restore-cursor": "^4.0.0" }, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/cli-spinners": { "version": "2.9.2", - "resolved": "https://registry.npmmirror.com/cli-spinners/-/cli-spinners-2.9.2.tgz", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", - "dev": true, "engines": { "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/color-convert": { + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/cliui/node_modules/color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, "dependencies": { "color-name": "~1.1.4" }, @@ -1891,32 +2956,154 @@ "node": ">=7.0.0" } }, + "node_modules/cliui/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/clsx": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz", + "integrity": "sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/collapse-white-space": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-2.1.0.tgz", + "integrity": "sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/color": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", + "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", + "dependencies": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "engines": { + "node": ">=12.5.0" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "node_modules/color/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color/node_modules/color-name": { "version": "1.1.4", - "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/comma-separated-tokens": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", + "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "node_modules/common-ancestor-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz", + "integrity": "sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w==" }, - "node_modules/connect-history-api-fallback": { + "node_modules/convert-source-map": { "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz", - "integrity": "sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==", - "dev": true, + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==" + }, + "node_modules/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", "engines": { - "node": ">=0.8" + "node": ">= 0.6" } }, "node_modules/cross-spawn": { "version": "7.0.3", - "resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-7.0.3.tgz", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -1926,45 +3113,36 @@ "node": ">= 8" } }, - "node_modules/css-select": { - "version": "5.1.0", - "resolved": "https://registry.npmmirror.com/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" - } + "node_modules/css-selector-parser": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/css-selector-parser/-/css-selector-parser-3.0.4.tgz", + "integrity": "sha512-pnmS1dbKsz6KA4EW4BznyPL2xxkNDRg62hcD0v8g6DEw2W7hxOln5M953jsp9hmw5Dg57S6o/A8GOn37mbAgcQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/mdevils" + }, + { + "type": "patreon", + "url": "https://patreon.com/mdevils" + } + ] }, - "node_modules/css-what": { - "version": "6.1.0", - "resolved": "https://registry.npmmirror.com/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", - "dev": true, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "bin": { + "cssesc": "bin/cssesc" + }, "engines": { - "node": ">= 6" + "node": ">=4" } }, - "node_modules/csstype": { - "version": "3.1.3", - "resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "dev": true - }, - "node_modules/dayjs": { - "version": "1.11.10", - "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.10.tgz", - "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==", - "dev": true - }, "node_modules/debug": { "version": "4.3.4", - "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -1977,113 +3155,169 @@ } } }, - "node_modules/define-data-property": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/define-data-property/-/define-data-property-1.1.1.tgz", - "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", - "dev": true, + "node_modules/decode-named-character-reference": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz", + "integrity": "sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==", "dependencies": { - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "character-entities": "^2.0.0" }, - "engines": { - "node": ">= 0.4" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/dom-serializer/node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "engines": { - "node": ">=0.12" + "node": ">=4.0.0" } }, - "node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmmirror.com/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true - }, - "node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmmirror.com/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "dependencies": { - "domelementtype": "^2.3.0" - }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", "engines": { - "node": ">= 4" + "node": ">=6" } }, - "node_modules/domutils": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/domutils/-/domutils-3.1.0.tgz", - "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", - "dev": true, - "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3" - } + "node_modules/detect-libc": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", + "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/deterministic-object-hash": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/deterministic-object-hash/-/deterministic-object-hash-2.0.2.tgz", + "integrity": "sha512-KxektNH63SrbfUyDiwXqRb1rLwKt33AmMv+5Nhsw1kqZ13SJBRTgZHtGbE+hH3a1mVW1cz+4pqSWVPAtLVXTzQ==", + "dependencies": { + "base-64": "^1.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/devalue": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-4.3.2.tgz", + "integrity": "sha512-KqFl6pOgOW+Y6wJgu80rHpo2/3H07vr8ntR9rkkFIRETewbf5GaYYcakYfiKz89K+sLsuPkQIZaXDMjUObZwWg==" + }, + "node_modules/devlop": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", + "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", + "dependencies": { + "dequal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/diff": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/direction": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/direction/-/direction-2.0.1.tgz", + "integrity": "sha512-9S6m9Sukh1cZNknO1CWAr2QAWsbKLafQiyM5gZ7VgXHeuaoUwffKN4q6NC4A/Mf9iiPlOXQEKW/Mv/mh9/3YFA==", + "bin": { + "direction": "cli.js" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/dlv": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==" + }, + "node_modules/dset": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/dset/-/dset-3.1.3.tgz", + "integrity": "sha512-20TuZZHCEZ2O71q9/+8BwKwZ0QtD9D8ObhrihJPr+vLLYlSuAU3/zL4cSlgbfeoGHTjCSJBa7NGcrF9/Bx/WJQ==", + "engines": { + "node": ">=4" + } }, "node_modules/eastasianwidth": { "version": "0.2.0", - "resolved": "https://registry.npmmirror.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" }, "node_modules/electron-to-chromium": { - "version": "1.4.617", - "resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.4.617.tgz", - "integrity": "sha512-sYNE3QxcDS4ANW1k4S/wWYMXjCVcFSOX3Bg8jpuMFaXt/x8JCmp0R1Xe1ZXDX4WXnSRBf+GJ/3eGWicUuQq5cg==", - "dev": true + "version": "1.4.661", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.661.tgz", + "integrity": "sha512-AFg4wDHSOk5F+zA8aR+SVIOabu7m0e7BiJnigCvPXzIGy731XENw/lmNxTySpVFtkFEy+eyt4oHhh5FF3NjQNw==" + }, + "node_modules/emmet": { + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/emmet/-/emmet-2.4.6.tgz", + "integrity": "sha512-dJfbdY/hfeTyf/Ef7Y7ubLYzkBvPQ912wPaeVYpAxvFxkEBf/+hJu4H6vhAvFN6HlxqedlfVn2x1S44FfQ97pg==", + "dependencies": { + "@emmetio/abbreviation": "^2.3.3", + "@emmetio/css-abbreviation": "^2.1.8" + } }, "node_modules/emoji-regex": { "version": "10.3.0", - "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-10.3.0.tgz", - "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", - "dev": true + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==" + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dependencies": { + "once": "^1.4.0" + } }, "node_modules/entities": { - "version": "3.0.1", - "resolved": "https://registry.npmmirror.com/entities/-/entities-3.0.1.tgz", - "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", - "dev": true, + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "engines": { "node": ">=0.12" - } - }, - "node_modules/envinfo": { - "version": "7.11.0", - "resolved": "https://registry.npmmirror.com/envinfo/-/envinfo-7.11.0.tgz", - "integrity": "sha512-G9/6xF1FPbIw0TtalAMaVPpiq2aDEuKLXM314jPVAO9r2fo2a4BLqMNkmRS7O/xPPZ+COAhGIz3ETvHEV3eUcg==", - "dev": true, - "bin": { - "envinfo": "dist/cli.js" }, - "engines": { - "node": ">=4" + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" } }, + "node_modules/es-module-lexer": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz", + "integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==" + }, "node_modules/esbuild": { - "version": "0.19.11", - "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.19.11.tgz", - "integrity": "sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==", - "dev": true, + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" @@ -2092,45 +3326,51 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.19.11", - "@esbuild/android-arm": "0.19.11", - "@esbuild/android-arm64": "0.19.11", - "@esbuild/android-x64": "0.19.11", - "@esbuild/darwin-arm64": "0.19.11", - "@esbuild/darwin-x64": "0.19.11", - "@esbuild/freebsd-arm64": "0.19.11", - "@esbuild/freebsd-x64": "0.19.11", - "@esbuild/linux-arm": "0.19.11", - "@esbuild/linux-arm64": "0.19.11", - "@esbuild/linux-ia32": "0.19.11", - "@esbuild/linux-loong64": "0.19.11", - "@esbuild/linux-mips64el": "0.19.11", - "@esbuild/linux-ppc64": "0.19.11", - "@esbuild/linux-riscv64": "0.19.11", - "@esbuild/linux-s390x": "0.19.11", - "@esbuild/linux-x64": "0.19.11", - "@esbuild/netbsd-x64": "0.19.11", - "@esbuild/openbsd-x64": "0.19.11", - "@esbuild/sunos-x64": "0.19.11", - "@esbuild/win32-arm64": "0.19.11", - "@esbuild/win32-ia32": "0.19.11", - "@esbuild/win32-x64": "0.19.11" + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" } }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmmirror.com/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "engines": { "node": ">=6" } }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/esprima": { "version": "4.0.1", - "resolved": "https://registry.npmmirror.com/esprima/-/esprima-4.0.1.tgz", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -2139,17 +3379,86 @@ "node": ">=4" } }, + "node_modules/estree-util-attach-comments": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/estree-util-attach-comments/-/estree-util-attach-comments-3.0.0.tgz", + "integrity": "sha512-cKUwm/HUcTDsYh/9FgnuFqpfquUbwIqwKM26BVCGDPVgvaCl/nDCCjUfiLlx6lsEZ3Z4RFxNbOQ60pkaEwFxGw==", + "dependencies": { + "@types/estree": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/estree-util-build-jsx": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/estree-util-build-jsx/-/estree-util-build-jsx-3.0.1.tgz", + "integrity": "sha512-8U5eiL6BTrPxp/CHbs2yMgP8ftMhR5ww1eIKoWRMlqvltHF8fZn5LRDvTKuxD3DUn+shRbLGqXemcP51oFCsGQ==", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "devlop": "^1.0.0", + "estree-util-is-identifier-name": "^3.0.0", + "estree-walker": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/estree-util-is-identifier-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/estree-util-is-identifier-name/-/estree-util-is-identifier-name-3.0.0.tgz", + "integrity": "sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/estree-util-to-js": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/estree-util-to-js/-/estree-util-to-js-2.0.0.tgz", + "integrity": "sha512-WDF+xj5rRWmD5tj6bIqRi6CkLIXbbNQUcxQHzGysQzvHmdYG2G7p/Tf0J0gpxGgkeMZNTIjT/AoSvC9Xehcgdg==", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "astring": "^1.8.0", + "source-map": "^0.7.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/estree-util-visit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/estree-util-visit/-/estree-util-visit-2.0.0.tgz", + "integrity": "sha512-m5KgiH85xAhhW8Wta0vShLcUvOsh3LLPI2YVwcbio1l7E09NTLL1EyMZFM1OyWowoH0skScNbhOPl4kcBgzTww==", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" }, "node_modules/execa": { "version": "8.0.1", - "resolved": "https://registry.npmmirror.com/execa/-/execa-8.0.1.tgz", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", - "dev": true, "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^8.0.1", @@ -2163,13 +3472,39 @@ }, "engines": { "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/expressive-code": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/expressive-code/-/expressive-code-0.32.4.tgz", + "integrity": "sha512-r+yUP2JV181tVR2EyYked7lT2W8bvL9o7xpdKU6q60FMU7Wh/DbGtH0jg+WmDxKK1C57iXF9chbBv+BsDPlUEQ==", + "dependencies": { + "@expressive-code/core": "^0.32.4", + "@expressive-code/plugin-frames": "^0.32.4", + "@expressive-code/plugin-shiki": "^0.32.4", + "@expressive-code/plugin-text-markers": "^0.32.4" } }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, "node_modules/extend-shallow": { "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, "dependencies": { "is-extendable": "^0.1.0" }, @@ -2177,11 +3512,15 @@ "node": ">=0.10.0" } }, + "node_modules/fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==" + }, "node_modules/fast-glob": { "version": "3.3.2", - "resolved": "https://registry.npmmirror.com/fast-glob/-/fast-glob-3.3.2.tgz", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -2194,25 +3533,17 @@ } }, "node_modules/fastq": { - "version": "1.16.0", - "resolved": "https://registry.npmmirror.com/fastq/-/fastq-1.16.0.tgz", - "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", - "dev": true, + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dependencies": { "reusify": "^1.0.4" } }, - "node_modules/fflate": { - "version": "0.8.1", - "resolved": "https://registry.npmmirror.com/fflate/-/fflate-0.8.1.tgz", - "integrity": "sha512-/exOvEuc+/iaUm105QIiOt4LpBdMTWsXxqR0HDF35vx3fmaKzw7354gTilCh5rkzEt8WYyG//ku3h3nRmd7CHQ==", - "dev": true - }, "node_modules/fill-range": { "version": "7.0.1", - "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.0.1.tgz", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -2220,49 +3551,47 @@ "node": ">=8" } }, - "node_modules/find-yarn-workspace-root": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", - "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", - "dev": true, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dependencies": { - "micromatch": "^4.0.2" - } - }, - "node_modules/fraction.js": { - "version": "4.3.7", - "resolved": "https://registry.npmmirror.com/fraction.js/-/fraction.js-4.3.7.tgz", - "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", - "dev": true, + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, "engines": { - "node": "*" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/fs-extra": { - "version": "11.2.0", - "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-11.2.0.tgz", - "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", - "dev": true, + "node_modules/find-yarn-workspace-root2": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/find-yarn-workspace-root2/-/find-yarn-workspace-root2-1.2.16.tgz", + "integrity": "sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==", "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, + "micromatch": "^4.0.2", + "pkg-dir": "^4.2.0" + } + }, + "node_modules/flattie": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/flattie/-/flattie-1.1.0.tgz", + "integrity": "sha512-xU99gDEnciIwJdGcBmNHnzTJ/w5AT+VFJOu6sTB6WM8diOYNA3Sa+K1DiEBQ7XH4QikQq3iFW1U+jRVcotQnBw==", "engines": { - "node": ">=14.14" + "node": ">=8" } }, - "node_modules/fs.realpath": { + "node_modules/fs-constants": { "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" }, "node_modules/fsevents": { "version": "2.3.3", - "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, "hasInstallScript": true, "optional": true, "os": [ @@ -2274,53 +3603,64 @@ }, "node_modules/function-bind": { "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "node_modules/get-intrinsic": { - "version": "1.2.2", - "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.2.tgz", - "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-east-asian-width": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", + "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/get-stream": { "version": "8.0.1", - "resolved": "https://registry.npmmirror.com/get-stream/-/get-stream-8.0.1.tgz", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", - "dev": true, "engines": { "node": ">=16" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" }, - "engines": { - "node": "*" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==" + }, + "node_modules/github-slugger": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-2.0.0.tgz", + "integrity": "sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==" + }, "node_modules/glob-parent": { "version": "5.1.2", - "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, "dependencies": { "is-glob": "^4.0.1" }, @@ -2328,43 +3668,23 @@ "node": ">= 6" } }, - "node_modules/globby": { - "version": "14.0.0", - "resolved": "https://registry.npmmirror.com/globby/-/globby-14.0.0.tgz", - "integrity": "sha512-/1WM/LNHRAOH9lZta77uGbq0dAEQM+XjNesWwhlERDVenqothRbnzTrL3/LrIoEPPjeUHC3vrS6TwoyxeHs7MQ==", - "dev": true, - "dependencies": { - "@sindresorhus/merge-streams": "^1.0.0", - "fast-glob": "^3.3.2", - "ignore": "^5.2.4", - "path-type": "^5.0.0", - "slash": "^5.1.0", - "unicorn-magic": "^0.1.0" - }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "engines": { - "node": ">=18" - } - }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.3" + "node": ">=4" } }, "node_modules/graceful-fs": { "version": "4.2.11", - "resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, "node_modules/gray-matter": { "version": "4.0.3", - "resolved": "https://registry.npmmirror.com/gray-matter/-/gray-matter-4.0.3.tgz", + "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.3.tgz", "integrity": "sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==", - "dev": true, "dependencies": { "js-yaml": "^3.13.1", "kind-of": "^6.0.2", @@ -2375,53 +3695,38 @@ "node": ">=6.0" } }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", - "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", - "dev": true, + "node_modules/gray-matter/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dependencies": { - "get-intrinsic": "^1.2.2" + "sprintf-js": "~1.0.2" } }, - "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", - "dev": true, - "engines": { - "node": ">= 0.4" + "node_modules/gray-matter/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "engines": { - "node": ">= 0.4" + "node": ">=4" } }, - "node_modules/hash-sum": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-2.0.0.tgz", - "integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==", - "dev": true - }, "node_modules/hasown": { "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", - "dev": true, "dependencies": { "function-bind": "^1.1.2" }, @@ -2429,120 +3734,467 @@ "node": ">= 0.4" } }, - "node_modules/htmlparser2": { - "version": "8.0.2", - "resolved": "https://registry.npmmirror.com/htmlparser2/-/htmlparser2-8.0.2.tgz", - "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", - "dev": true, + "node_modules/hast-util-from-html": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hast-util-from-html/-/hast-util-from-html-2.0.1.tgz", + "integrity": "sha512-RXQBLMl9kjKVNkJTIO6bZyb2n+cUH8LFaSSzo82jiLT6Tfc+Pt7VQCS+/h3YwG4jaNE2TA2sdJisGWR+aJrp0g==", "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "entities": "^4.4.0" - } - }, - "node_modules/htmlparser2/node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/human-signals": { - "version": "5.0.0", - "resolved": "https://registry.npmmirror.com/human-signals/-/human-signals-5.0.0.tgz", - "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", - "dev": true, - "engines": { - "node": ">=16.17.0" + "@types/hast": "^3.0.0", + "devlop": "^1.1.0", + "hast-util-from-parse5": "^8.0.0", + "parse5": "^7.0.0", + "vfile": "^6.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmmirror.com/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true - }, - "node_modules/ignore": { - "version": "5.3.0", - "resolved": "https://registry.npmmirror.com/ignore/-/ignore-5.3.0.tgz", - "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", - "dev": true, - "engines": { - "node": ">= 4" + "node_modules/hast-util-from-parse5": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-8.0.1.tgz", + "integrity": "sha512-Er/Iixbc7IEa7r/XLtuG52zoqn/b3Xng/w6aZQ0xGVxzhw5xUFxcRqdPzP6yFi/4HBYRaifaI5fQ1RH8n0ZeOQ==", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "devlop": "^1.0.0", + "hastscript": "^8.0.0", + "property-information": "^6.0.0", + "vfile": "^6.0.0", + "vfile-location": "^5.0.0", + "web-namespaces": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/immutable": { - "version": "4.3.4", - "resolved": "https://registry.npmmirror.com/immutable/-/immutable-4.3.4.tgz", - "integrity": "sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==", - "dev": true - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmmirror.com/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, + "node_modules/hast-util-has-property": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hast-util-has-property/-/hast-util-has-property-3.0.0.tgz", + "integrity": "sha512-MNilsvEKLFpV604hwfhVStK0usFY/QmM5zX16bo7EjnAEGofr5YyI37kzopBlZJkHD4t887i+q/C8/tr5Q94cA==", "dependencies": { - "once": "^1.3.0", - "wrappy": "1" + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, + "node_modules/hast-util-parse-selector": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-4.0.0.tgz", + "integrity": "sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A==", "dependencies": { - "binary-extensions": "^2.0.0" + "@types/hast": "^3.0.0" }, - "engines": { - "node": ">=8" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-raw": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-9.0.2.tgz", + "integrity": "sha512-PldBy71wO9Uq1kyaMch9AHIghtQvIwxBUkv823pKmkTM3oV1JxtsTNYdevMxvUHqcnOAuO65JKU2+0NOxc2ksA==", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "@ungap/structured-clone": "^1.0.0", + "hast-util-from-parse5": "^8.0.0", + "hast-util-to-parse5": "^8.0.0", + "html-void-elements": "^3.0.0", + "mdast-util-to-hast": "^13.0.0", + "parse5": "^7.0.0", + "unist-util-position": "^5.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0", + "web-namespaces": "^2.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-select": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/hast-util-select/-/hast-util-select-6.0.2.tgz", + "integrity": "sha512-hT/SD/d/Meu+iobvgkffo1QecV8WeKWxwsNMzcTJsKw1cKTQKSR/7ArJeURLNJF9HDjp9nVoORyNNJxrvBye8Q==", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "bcp-47-match": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "css-selector-parser": "^3.0.0", + "devlop": "^1.0.0", + "direction": "^2.0.0", + "hast-util-has-property": "^3.0.0", + "hast-util-to-string": "^3.0.0", + "hast-util-whitespace": "^3.0.0", + "not": "^0.1.0", + "nth-check": "^2.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "unist-util-visit": "^5.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-estree": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hast-util-to-estree/-/hast-util-to-estree-3.1.0.tgz", + "integrity": "sha512-lfX5g6hqVh9kjS/B9E2gSkvHH4SZNiQFiqWS0x9fENzEl+8W12RqdRxX6d/Cwxi30tPQs3bIO+aolQJNp1bIyw==", + "dependencies": { + "@types/estree": "^1.0.0", + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "comma-separated-tokens": "^2.0.0", + "devlop": "^1.0.0", + "estree-util-attach-comments": "^3.0.0", + "estree-util-is-identifier-name": "^3.0.0", + "hast-util-whitespace": "^3.0.0", + "mdast-util-mdx-expression": "^2.0.0", + "mdast-util-mdx-jsx": "^3.0.0", + "mdast-util-mdxjs-esm": "^2.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "style-to-object": "^0.4.0", + "unist-util-position": "^5.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-html": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.0.tgz", + "integrity": "sha512-IVGhNgg7vANuUA2XKrT6sOIIPgaYZnmLx3l/CCOAK0PtgfoHrZwX7jCSYyFxHTrGmC6S9q8aQQekjp4JPZF+cw==", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "ccount": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-raw": "^9.0.0", + "hast-util-whitespace": "^3.0.0", + "html-void-elements": "^3.0.0", + "mdast-util-to-hast": "^13.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "stringify-entities": "^4.0.0", + "zwitch": "^2.0.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-jsx-runtime": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.0.tgz", + "integrity": "sha512-H/y0+IWPdsLLS738P8tDnrQ8Z+dj12zQQ6WC11TIM21C8WFVoIxcqWXf2H3hiTVZjF1AWqoimGwrTWecWrnmRQ==", + "dependencies": { + "@types/estree": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "comma-separated-tokens": "^2.0.0", + "devlop": "^1.0.0", + "estree-util-is-identifier-name": "^3.0.0", + "hast-util-whitespace": "^3.0.0", + "mdast-util-mdx-expression": "^2.0.0", + "mdast-util-mdx-jsx": "^3.0.0", + "mdast-util-mdxjs-esm": "^2.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "style-to-object": "^1.0.0", + "unist-util-position": "^5.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-jsx-runtime/node_modules/inline-style-parser": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.2.tgz", + "integrity": "sha512-EcKzdTHVe8wFVOGEYXiW9WmJXPjqi1T+234YpJr98RiFYKHV3cdy1+3mkTE+KHTHxFFLH51SfaGOoUdW+v7ViQ==" + }, + "node_modules/hast-util-to-jsx-runtime/node_modules/style-to-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-1.0.5.tgz", + "integrity": "sha512-rDRwHtoDD3UMMrmZ6BzOW0naTjMsVZLIjsGleSKS/0Oz+cgCfAPRspaqJuE8rDzpKha/nEvnM0IF4seEAZUTKQ==", + "dependencies": { + "inline-style-parser": "0.2.2" + } + }, + "node_modules/hast-util-to-parse5": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-8.0.0.tgz", + "integrity": "sha512-3KKrV5ZVI8if87DVSi1vDeByYrkGzg4mEfeu4alwgmmIeARiBLKCZS2uw5Gb6nU9x9Yufyj3iudm6i7nl52PFw==", + "dependencies": { + "@types/hast": "^3.0.0", + "comma-separated-tokens": "^2.0.0", + "devlop": "^1.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "web-namespaces": "^2.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-string": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hast-util-to-string/-/hast-util-to-string-3.0.0.tgz", + "integrity": "sha512-OGkAxX1Ua3cbcW6EJ5pT/tslVb90uViVkcJ4ZZIMW/R33DX/AkcJcRrPebPwJkHYwlDHXz4aIwvAAaAdtrACFA==", + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-whitespace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz", + "integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==", + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hastscript": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-8.0.0.tgz", + "integrity": "sha512-dMOtzCEd3ABUeSIISmrETiKuyydk1w0pa+gE/uormcTpSYuaNJPbX1NU3JLyscSLjwAQM8bWMhhIlnCqnRvDTw==", + "dependencies": { + "@types/hast": "^3.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-parse-selector": "^4.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/html-escaper": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-3.0.3.tgz", + "integrity": "sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==" + }, + "node_modules/html-void-elements": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz", + "integrity": "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" + }, + "node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "engines": { + "node": ">=16.17.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/import-meta-resolve": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.0.0.tgz", + "integrity": "sha512-okYUR7ZQPH+efeuMJGlq4f8ubUgO50kByRPyt/Cy1Io4PSRsPjxME+YlVaCOx+NIToW7hCsZNFJyTPFFKepRSA==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "node_modules/inline-style-parser": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz", + "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==" + }, + "node_modules/is-alphabetical": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz", + "integrity": "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-alphanumerical": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz", + "integrity": "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==", + "dependencies": { + "is-alphabetical": "^2.0.0", + "is-decimal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "engines": { + "node": ">=4" + } + }, + "node_modules/is-core-module": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-decimal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz", + "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, "node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmmirror.com/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", "bin": { "is-docker": "cli.js" }, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-extendable": { "version": "0.1.1", - "resolved": "https://registry.npmmirror.com/is-extendable/-/is-extendable-0.1.1.tgz", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/is-extglob": { "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, "engines": { "node": ">=0.10.0" } }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, "node_modules/is-glob": { "version": "4.0.3", - "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, "dependencies": { "is-extglob": "^2.1.1" }, @@ -2550,878 +4202,3040 @@ "node": ">=0.10.0" } }, + "node_modules/is-hexadecimal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz", + "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-interactive": { "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/is-interactive/-/is-interactive-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", - "dev": true, "engines": { "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-number": { "version": "7.0.0", - "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, "engines": { "node": ">=0.12.0" } }, + "node_modules/is-plain-obj": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", + "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-reference": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz", + "integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==", + "dependencies": { + "@types/estree": "*" + } + }, "node_modules/is-stream": { "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/is-stream/-/is-stream-3.0.0.tgz", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "dev": true, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-unicode-supported": { "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", - "dev": true, "engines": { "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmmirror.com/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", + "integrity": "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==", "dependencies": { - "is-docker": "^2.0.0" + "is-inside-container": "^1.0.0" }, "engines": { - "node": ">=8" + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmmirror.com/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - }, "node_modules/isexe": { "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmmirror.com/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, - "node_modules/json-stable-stringify": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/json-stable-stringify/-/json-stable-stringify-1.1.0.tgz", - "integrity": "sha512-zfA+5SuwYN2VWqN1/5HZaDzQKLJHaBVMZIIM+wuYjdptkaQsqzDdqjqf+lZZJUuJq1aanHiY8LhH8LmH+qBYJA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.5", - "isarray": "^2.0.5", - "jsonify": "^0.0.1", - "object-keys": "^1.1.1" + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "bin": { + "jsesc": "bin/jsesc" }, "engines": { - "node": ">= 0.4" + "node": ">=4" } }, - "node_modules/jsonc-parser": { - "version": "3.2.1", - "resolved": "https://registry.npmmirror.com/jsonc-parser/-/jsonc-parser-3.2.1.tgz", - "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", - "dev": true - }, - "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "dependencies": { - "universalify": "^2.0.0" + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "bin": { + "json5": "lib/cli.js" }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" + "engines": { + "node": ">=6" } }, - "node_modules/jsonify": { - "version": "0.0.1", - "resolved": "https://registry.npmmirror.com/jsonify/-/jsonify-0.0.1.tgz", - "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", - "dev": true + "node_modules/jsonc-parser": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-2.3.1.tgz", + "integrity": "sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg==" }, "node_modules/kind-of": { "version": "6.0.3", - "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-6.0.3.tgz", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/klaw-sync": { - "version": "6.0.0", - "resolved": "https://registry.npmmirror.com/klaw-sync/-/klaw-sync-6.0.0.tgz", - "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", - "dev": true, + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/load-yaml-file": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/load-yaml-file/-/load-yaml-file-0.2.0.tgz", + "integrity": "sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==", "dependencies": { - "graceful-fs": "^4.1.11" + "graceful-fs": "^4.1.5", + "js-yaml": "^3.13.0", + "pify": "^4.0.1", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" } }, - "node_modules/lefthook": { - "version": "1.6.1", - "resolved": "https://registry.npmmirror.com/lefthook/-/lefthook-1.6.1.tgz", - "integrity": "sha512-1T+tk0V6ubZgiZJGi39QlLMAcgEw+lhoDeSpT3L8Y/f8nUpJW9ntcMOmt+uvMfQ3TVjNcR1r/Lhtm7gTqgdcPg==", - "dev": true, - "hasInstallScript": true, + "node_modules/load-yaml-file/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/load-yaml-file/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, "bin": { - "lefthook": "bin/index.js" + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dependencies": { + "p-locate": "^5.0.0" }, - "optionalDependencies": { - "lefthook-darwin-arm64": "1.6.1", - "lefthook-darwin-x64": "1.6.1", - "lefthook-freebsd-arm64": "1.6.1", - "lefthook-freebsd-x64": "1.6.1", - "lefthook-linux-arm64": "1.6.1", - "lefthook-linux-x64": "1.6.1", - "lefthook-windows-arm64": "1.6.1", - "lefthook-windows-x64": "1.6.1" - } - }, - "node_modules/lefthook-darwin-arm64": { - "version": "1.6.1", - "resolved": "https://registry.npmmirror.com/lefthook-darwin-arm64/-/lefthook-darwin-arm64-1.6.1.tgz", - "integrity": "sha512-q6+sYr2Dpt6YnBGXRjMFcXZUnVB97nH+s7EP/tX8m9ewvQxLPqIiUPyAumfyJ2Siomkc5WgAinG+kT63VjUN3A==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ] + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "node_modules/lefthook-darwin-x64": { - "version": "1.6.1", - "resolved": "https://registry.npmmirror.com/lefthook-darwin-x64/-/lefthook-darwin-x64-1.6.1.tgz", - "integrity": "sha512-utm7FwtbW8SxGMALIw5/iG4loYS2FI0crDKp/YIamrZgQr6M4pS2C3rxGj5OwiHFIm3arVU+3VZywdvRLJAw0w==", - "cpu": [ - "x64" + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + }, + "node_modules/log-symbols": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-5.1.0.tgz", + "integrity": "sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==", + "dependencies": { + "chalk": "^5.0.0", + "is-unicode-supported": "^1.1.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/longest-streak": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-3.1.0.tgz", + "integrity": "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/magic-string": { + "version": "0.30.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.7.tgz", + "integrity": "sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/markdown-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/markdown-extensions/-/markdown-extensions-2.0.0.tgz", + "integrity": "sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q==", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/markdown-table": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.3.tgz", + "integrity": "sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/mdast-util-definitions": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-6.0.0.tgz", + "integrity": "sha512-scTllyX6pnYNZH/AIp/0ePz6s4cZtARxImwoPJ7kS42n+MnVsI4XbnG6d4ibehRIldYMWM2LD7ImQblVhUejVQ==", + "dependencies": { + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "unist-util-visit": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-directive": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-directive/-/mdast-util-directive-3.0.0.tgz", + "integrity": "sha512-JUpYOqKI4mM3sZcNxmF/ox04XYFFkNwr0CFlrQIkCwbvH0xzMCqkMqAde9wRd80VAhaUrwFwKm2nxretdT1h7Q==", + "dependencies": { + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "devlop": "^1.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0", + "parse-entities": "^4.0.0", + "stringify-entities": "^4.0.0", + "unist-util-visit-parents": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-find-and-replace": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.1.tgz", + "integrity": "sha512-SG21kZHGC3XRTSUhtofZkBzZTJNM5ecCi0SK2IMKmSXR8vO3peL+kb1O0z7Zl83jKtutG4k5Wv/W7V3/YHvzPA==", + "dependencies": { + "@types/mdast": "^4.0.0", + "escape-string-regexp": "^5.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mdast-util-from-markdown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.0.tgz", + "integrity": "sha512-n7MTOr/z+8NAX/wmhhDji8O3bRvPTV/U0oTCaZJkjhPSKTPhS3xufVhKGF8s1pJ7Ox4QgoIU7KHseh09S+9rTA==", + "dependencies": { + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "decode-named-character-reference": "^1.0.0", + "devlop": "^1.0.0", + "mdast-util-to-string": "^4.0.0", + "micromark": "^4.0.0", + "micromark-util-decode-numeric-character-reference": "^2.0.0", + "micromark-util-decode-string": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-3.0.0.tgz", + "integrity": "sha512-dgQEX5Amaq+DuUqf26jJqSK9qgixgd6rYDHAv4aTBuA92cTknZlKpPfa86Z/s8Dj8xsAQpFfBmPUHWJBWqS4Bw==", + "dependencies": { + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-gfm-autolink-literal": "^2.0.0", + "mdast-util-gfm-footnote": "^2.0.0", + "mdast-util-gfm-strikethrough": "^2.0.0", + "mdast-util-gfm-table": "^2.0.0", + "mdast-util-gfm-task-list-item": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-autolink-literal": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-2.0.0.tgz", + "integrity": "sha512-FyzMsduZZHSc3i0Px3PQcBT4WJY/X/RCtEJKuybiC6sjPqLv7h1yqAkmILZtuxMSsUyaLUWNp71+vQH2zqp5cg==", + "dependencies": { + "@types/mdast": "^4.0.0", + "ccount": "^2.0.0", + "devlop": "^1.0.0", + "mdast-util-find-and-replace": "^3.0.0", + "micromark-util-character": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-footnote": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-footnote/-/mdast-util-gfm-footnote-2.0.0.tgz", + "integrity": "sha512-5jOT2boTSVkMnQ7LTrd6n/18kqwjmuYqo7JUPe+tRCY6O7dAuTFMtTPauYYrMPpox9hlN0uOx/FL8XvEfG9/mQ==", + "dependencies": { + "@types/mdast": "^4.0.0", + "devlop": "^1.1.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-strikethrough": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-2.0.0.tgz", + "integrity": "sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg==", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-table": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-2.0.0.tgz", + "integrity": "sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg==", + "dependencies": { + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "markdown-table": "^3.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-task-list-item": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-2.0.0.tgz", + "integrity": "sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ==", + "dependencies": { + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-mdx": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-mdx/-/mdast-util-mdx-3.0.0.tgz", + "integrity": "sha512-JfbYLAW7XnYTTbUsmpu0kdBUVe+yKVJZBItEjwyYJiDJuZ9w4eeaqks4HQO+R7objWgS2ymV60GYpI14Ug554w==", + "dependencies": { + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-mdx-expression": "^2.0.0", + "mdast-util-mdx-jsx": "^3.0.0", + "mdast-util-mdxjs-esm": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-mdx-expression": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.0.tgz", + "integrity": "sha512-fGCu8eWdKUKNu5mohVGkhBXCXGnOTLuFqOvGMvdikr+J1w7lDJgxThOKpwRWzzbyXAU2hhSwsmssOY4yTokluw==", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-mdx-jsx": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.0.0.tgz", + "integrity": "sha512-XZuPPzQNBPAlaqsTTgRrcJnyFbSOBovSadFgbFu8SnuNgm+6Bdx1K+IWoitsmj6Lq6MNtI+ytOqwN70n//NaBA==", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "ccount": "^2.0.0", + "devlop": "^1.1.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0", + "parse-entities": "^4.0.0", + "stringify-entities": "^4.0.0", + "unist-util-remove-position": "^5.0.0", + "unist-util-stringify-position": "^4.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-mdxjs-esm": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-mdxjs-esm/-/mdast-util-mdxjs-esm-2.0.1.tgz", + "integrity": "sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg==", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-phrasing": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-4.1.0.tgz", + "integrity": "sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==", + "dependencies": { + "@types/mdast": "^4.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-hast": { + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.0.2.tgz", + "integrity": "sha512-U5I+500EOOw9e3ZrclN3Is3fRpw8c19SMyNZlZ2IS+7vLsNzb2Om11VpIVOR+/0137GhZsFEF6YiKD5+0Hr2Og==", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "@ungap/structured-clone": "^1.0.0", + "devlop": "^1.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "trim-lines": "^3.0.0", + "unist-util-position": "^5.0.0", + "unist-util-visit": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-markdown": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-2.1.0.tgz", + "integrity": "sha512-SR2VnIEdVNCJbP6y7kVTJgPLifdr8WEU440fQec7qHoHOUz/oJ2jmNRqdDQ3rbiStOXb2mCDGTuwsK5OPUgYlQ==", + "dependencies": { + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "longest-streak": "^3.0.0", + "mdast-util-phrasing": "^4.0.0", + "mdast-util-to-string": "^4.0.0", + "micromark-util-decode-string": "^2.0.0", + "unist-util-visit": "^5.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz", + "integrity": "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==", + "dependencies": { + "@types/mdast": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromark": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.0.tgz", + "integrity": "sha512-o/sd0nMof8kYff+TqcDx3VSrgBTcZpSvYcAHIfHhv5VAuNmisCxjhx6YmxS8PFEpb9z5WKWKPdzf0jM23ro3RQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "@types/debug": "^4.0.0", + "debug": "^4.0.0", + "decode-named-character-reference": "^1.0.0", + "devlop": "^1.0.0", + "micromark-core-commonmark": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-combine-extensions": "^2.0.0", + "micromark-util-decode-numeric-character-reference": "^2.0.0", + "micromark-util-encode": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-resolve-all": "^2.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "micromark-util-subtokenize": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-core-commonmark": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.0.tgz", + "integrity": "sha512-jThOz/pVmAYUtkroV3D5c1osFXAMv9e0ypGDOIZuCeAe91/sD6BoE2Sjzt30yuXtwOYUmySOhMas/PVyh02itA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "devlop": "^1.0.0", + "micromark-factory-destination": "^2.0.0", + "micromark-factory-label": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-factory-title": "^2.0.0", + "micromark-factory-whitespace": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-classify-character": "^2.0.0", + "micromark-util-html-tag-name": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-resolve-all": "^2.0.0", + "micromark-util-subtokenize": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-extension-directive": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-directive/-/micromark-extension-directive-3.0.0.tgz", + "integrity": "sha512-61OI07qpQrERc+0wEysLHMvoiO3s2R56x5u7glHq2Yqq6EHbH4dW25G9GfDdGCDYqA21KE6DWgNSzxSwHc2hSg==", + "dependencies": { + "devlop": "^1.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-factory-whitespace": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "parse-entities": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-3.0.0.tgz", + "integrity": "sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==", + "dependencies": { + "micromark-extension-gfm-autolink-literal": "^2.0.0", + "micromark-extension-gfm-footnote": "^2.0.0", + "micromark-extension-gfm-strikethrough": "^2.0.0", + "micromark-extension-gfm-table": "^2.0.0", + "micromark-extension-gfm-tagfilter": "^2.0.0", + "micromark-extension-gfm-task-list-item": "^2.0.0", + "micromark-util-combine-extensions": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-autolink-literal": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-2.0.0.tgz", + "integrity": "sha512-rTHfnpt/Q7dEAK1Y5ii0W8bhfJlVJFnJMHIPisfPK3gpVNuOP0VnRl96+YJ3RYWV/P4gFeQoGKNlT3RhuvpqAg==", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-footnote": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-2.0.0.tgz", + "integrity": "sha512-6Rzu0CYRKDv3BfLAUnZsSlzx3ak6HAoI85KTiijuKIz5UxZxbUI+pD6oHgw+6UtQuiRwnGRhzMmPRv4smcz0fg==", + "dependencies": { + "devlop": "^1.0.0", + "micromark-core-commonmark": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-strikethrough": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-2.0.0.tgz", + "integrity": "sha512-c3BR1ClMp5fxxmwP6AoOY2fXO9U8uFMKs4ADD66ahLTNcwzSCyRVU4k7LPV5Nxo/VJiR4TdzxRQY2v3qIUceCw==", + "dependencies": { + "devlop": "^1.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-classify-character": "^2.0.0", + "micromark-util-resolve-all": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-table": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.0.0.tgz", + "integrity": "sha512-PoHlhypg1ItIucOaHmKE8fbin3vTLpDOUg8KAr8gRCF1MOZI9Nquq2i/44wFvviM4WuxJzc3demT8Y3dkfvYrw==", + "dependencies": { + "devlop": "^1.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-tagfilter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-2.0.0.tgz", + "integrity": "sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg==", + "dependencies": { + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-task-list-item": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-2.0.1.tgz", + "integrity": "sha512-cY5PzGcnULaN5O7T+cOzfMoHjBW7j+T9D2sucA5d/KbsBTPcYdebm9zUd9zzdgJGCwahV+/W78Z3nbulBYVbTw==", + "dependencies": { + "devlop": "^1.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-mdx-expression": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-mdx-expression/-/micromark-extension-mdx-expression-3.0.0.tgz", + "integrity": "sha512-sI0nwhUDz97xyzqJAbHQhp5TfaxEvZZZ2JDqUo+7NvyIYG6BZ5CPPqj2ogUoPJlmXHBnyZUzISg9+oUmU6tUjQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "@types/estree": "^1.0.0", + "devlop": "^1.0.0", + "micromark-factory-mdx-expression": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-events-to-acorn": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-extension-mdx-jsx": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-mdx-jsx/-/micromark-extension-mdx-jsx-3.0.0.tgz", + "integrity": "sha512-uvhhss8OGuzR4/N17L1JwvmJIpPhAd8oByMawEKx6NVdBCbesjH4t+vjEp3ZXft9DwvlKSD07fCeI44/N0Vf2w==", + "dependencies": { + "@types/acorn": "^4.0.0", + "@types/estree": "^1.0.0", + "devlop": "^1.0.0", + "estree-util-is-identifier-name": "^3.0.0", + "micromark-factory-mdx-expression": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-mdx-md": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-mdx-md/-/micromark-extension-mdx-md-2.0.0.tgz", + "integrity": "sha512-EpAiszsB3blw4Rpba7xTOUptcFeBFi+6PY8VnJ2hhimH+vCQDirWgsMpz7w1XcZE7LVrSAUGb9VJpG9ghlYvYQ==", + "dependencies": { + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-mdxjs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-mdxjs/-/micromark-extension-mdxjs-3.0.0.tgz", + "integrity": "sha512-A873fJfhnJ2siZyUrJ31l34Uqwy4xIFmvPY1oj+Ean5PHcPBYzEsvqvWGaWcfEIr11O5Dlw3p2y0tZWpKHDejQ==", + "dependencies": { + "acorn": "^8.0.0", + "acorn-jsx": "^5.0.0", + "micromark-extension-mdx-expression": "^3.0.0", + "micromark-extension-mdx-jsx": "^3.0.0", + "micromark-extension-mdx-md": "^2.0.0", + "micromark-extension-mdxjs-esm": "^3.0.0", + "micromark-util-combine-extensions": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-mdxjs-esm": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-mdxjs-esm/-/micromark-extension-mdxjs-esm-3.0.0.tgz", + "integrity": "sha512-DJFl4ZqkErRpq/dAPyeWp15tGrcrrJho1hKK5uBS70BCtfrIFg81sqcTVu3Ta+KD1Tk5vAtBNElWxtAa+m8K9A==", + "dependencies": { + "@types/estree": "^1.0.0", + "devlop": "^1.0.0", + "micromark-core-commonmark": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-events-to-acorn": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "unist-util-position-from-estree": "^2.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-factory-destination": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.0.tgz", + "integrity": "sha512-j9DGrQLm/Uhl2tCzcbLhy5kXsgkHUrjJHg4fFAeoMRwJmJerT9aw4FEhIbZStWN8A3qMwOp1uzHr4UL8AInxtA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-label": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-2.0.0.tgz", + "integrity": "sha512-RR3i96ohZGde//4WSe/dJsxOX6vxIg9TimLAS3i4EhBAFx8Sm5SmqVfR8E87DPSR31nEAjZfbt91OMZWcNgdZw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "devlop": "^1.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-mdx-expression": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-mdx-expression/-/micromark-factory-mdx-expression-2.0.1.tgz", + "integrity": "sha512-F0ccWIUHRLRrYp5TC9ZYXmZo+p2AM13ggbsW4T0b5CRKP8KHVRB8t4pwtBgTxtjRmwrK0Irwm7vs2JOZabHZfg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "@types/estree": "^1.0.0", + "devlop": "^1.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-events-to-acorn": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "unist-util-position-from-estree": "^2.0.0", + "vfile-message": "^4.0.0" + } + }, + "node_modules/micromark-factory-space": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.0.tgz", + "integrity": "sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-title": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-2.0.0.tgz", + "integrity": "sha512-jY8CSxmpWLOxS+t8W+FG3Xigc0RDQA9bKMY/EwILvsesiRniiVMejYTE4wumNc2f4UbAa4WsHqe3J1QS1sli+A==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-whitespace": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.0.tgz", + "integrity": "sha512-28kbwaBjc5yAI1XadbdPYHX/eDnqaUFVikLwrO7FDnKG7lpgxnvk/XGRhX/PN0mOZ+dBSZ+LgunHS+6tYQAzhA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-character": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", + "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-chunked": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-2.0.0.tgz", + "integrity": "sha512-anK8SWmNphkXdaKgz5hJvGa7l00qmcaUQoMYsBwDlSKFKjc6gjGXPDw3FNL3Nbwq5L8gE+RCbGqTw49FK5Qyvg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-classify-character": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-2.0.0.tgz", + "integrity": "sha512-S0ze2R9GH+fu41FA7pbSqNWObo/kzwf8rN/+IGlW/4tC6oACOs8B++bh+i9bVyNnwCcuksbFwsBme5OCKXCwIw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-combine-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.0.tgz", + "integrity": "sha512-vZZio48k7ON0fVS3CUgFatWHoKbbLTK/rT7pzpJ4Bjp5JjkZeasRfrS9wsBdDJK2cJLHMckXZdzPSSr1B8a4oQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-chunked": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-decode-numeric-character-reference": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.1.tgz", + "integrity": "sha512-bmkNc7z8Wn6kgjZmVHOX3SowGmVdhYS7yBpMnuMnPzDq/6xwVA604DuOXMZTO1lvq01g+Adfa0pE2UKGlxL1XQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } ], - "dev": true, - "optional": true, - "os": [ - "darwin" + "dependencies": { + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-decode-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-2.0.0.tgz", + "integrity": "sha512-r4Sc6leeUTn3P6gk20aFMj2ntPwn6qpDZqWvYmAG6NgvFTIlj4WtrAudLi65qYoaGdXYViXYw2pkmn7QnIFasA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-decode-numeric-character-reference": "^2.0.0", + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-encode": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.0.tgz", + "integrity": "sha512-pS+ROfCXAGLWCOc8egcBvT0kf27GoWMqtdarNfDcjb6YLuV5cM3ioG45Ys2qOVqeqSbjaKg72vU+Wby3eddPsA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/micromark-util-events-to-acorn": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-events-to-acorn/-/micromark-util-events-to-acorn-2.0.2.tgz", + "integrity": "sha512-Fk+xmBrOv9QZnEDguL9OI9/NQQp6Hz4FuQ4YmCb/5V7+9eAh1s6AYSvL20kHkD67YIg7EpE54TiSlcsf3vyZgA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "@types/acorn": "^4.0.0", + "@types/estree": "^1.0.0", + "@types/unist": "^3.0.0", + "devlop": "^1.0.0", + "estree-util-visit": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "vfile-message": "^4.0.0" + } + }, + "node_modules/micromark-util-html-tag-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.0.tgz", + "integrity": "sha512-xNn4Pqkj2puRhKdKTm8t1YHC/BAjx6CEwRFXntTaRf/x16aqka6ouVoutm+QdkISTlT7e2zU7U4ZdlDLJd2Mcw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/micromark-util-normalize-identifier": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.0.tgz", + "integrity": "sha512-2xhYT0sfo85FMrUPtHcPo2rrp1lwbDEEzpx7jiH2xXJLqBuy4H0GgXk5ToU8IEwoROtXuL8ND0ttVa4rNqYK3w==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-resolve-all": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.0.tgz", + "integrity": "sha512-6KU6qO7DZ7GJkaCgwBNtplXCvGkJToU86ybBAUdavvgsCiG8lSSvYxr9MhwmQ+udpzywHsl4RpGJsYWG1pDOcA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-sanitize-uri": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.0.tgz", + "integrity": "sha512-WhYv5UEcZrbAtlsnPuChHUAsu/iBPOVaEVsntLBIdpibO0ddy8OzavZz3iL2xVvBZOpolujSliP65Kq0/7KIYw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-encode": "^2.0.0", + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-subtokenize": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-2.0.0.tgz", + "integrity": "sha512-vc93L1t+gpR3p8jxeVdaYlbV2jTYteDje19rNSS/H5dlhxUYll5Fy6vJ2cDwP8RnsXi818yGty1ayP55y3W6fg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "devlop": "^1.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-symbol": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", + "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/micromark-util-types": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", + "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } ] }, - "node_modules/lefthook-freebsd-arm64": { - "version": "1.6.1", - "resolved": "https://registry.npmmirror.com/lefthook-freebsd-arm64/-/lefthook-freebsd-arm64-1.6.1.tgz", - "integrity": "sha512-F2BoDnGznkJyn6lyhmXpu62yq7SMCeHAl3Bl8c+P6mXfmatjjxEpVmrzRuzKMPd/MRGpy2B/glkuyO4wZZazow==", - "cpu": [ - "arm64" + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", + "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/muggle-string": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/muggle-string/-/muggle-string-0.4.1.tgz", + "integrity": "sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==" + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/napi-build-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" + }, + "node_modules/needle": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/needle/-/needle-2.9.1.tgz", + "integrity": "sha512-6R9fqJ5Zcmf+uYaFgdIHmLwNldn5HbK8L5ybn7Uz+ylX/rnOsSp1AHcvQSrCaFN+qNM1wpymHqD7mVasEOlHGQ==", + "dependencies": { + "debug": "^3.2.6", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + }, + "bin": { + "needle": "bin/needle" + }, + "engines": { + "node": ">= 4.4.x" + } + }, + "node_modules/needle/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/nlcst-to-string": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/nlcst-to-string/-/nlcst-to-string-3.1.1.tgz", + "integrity": "sha512-63mVyqaqt0cmn2VcI2aH6kxe1rLAmSROqHMA0i4qqg1tidkfExgpb0FGMikMCn86mw5dFtBtEANfmSSK7TjNHw==", + "dependencies": { + "@types/nlcst": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/node-abi": { + "version": "3.54.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.54.0.tgz", + "integrity": "sha512-p7eGEiQil0YUV3ItH4/tBb781L5impVmmx2E9FRKF7d18XXzp4PGT2tdYMFY6wQqgxD0IwNZOiSJ0/K0fSi/OA==", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-addon-api": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz", + "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==" + }, + "node_modules/node-releases": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/not": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/not/-/not-0.1.0.tgz", + "integrity": "sha512-5PDmaAsVfnWUgTUbJ3ERwn7u79Z0dYxN9ErxCpVJJqe2RK0PJ3z+iFUxuqjwtlDDegXvtWoxD/3Fzxox7tFGWA==" + }, + "node_modules/npm-run-path": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.2.0.tgz", + "integrity": "sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==", + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-7.0.1.tgz", + "integrity": "sha512-0TUxTiFJWv+JnjWm4o9yvuskpEJLXTcng8MJuKd+SzAzp2o+OP3HWqNhB4OdJRt1Vsd9/mR0oyaEYlOnL7XIRw==", + "dependencies": { + "chalk": "^5.3.0", + "cli-cursor": "^4.0.0", + "cli-spinners": "^2.9.0", + "is-interactive": "^2.0.0", + "is-unicode-supported": "^1.3.0", + "log-symbols": "^5.1.0", + "stdin-discarder": "^0.1.0", + "string-width": "^6.1.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/ora/node_modules/string-width": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-6.1.0.tgz", + "integrity": "sha512-k01swCJAgQmuADB0YIc+7TuatfNvTBVOoaUWJjTB9R4VJzR5vNWzf5t42ESVZFPS8xTySF7CAdV4t/aaIm3UnQ==", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^10.2.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-limit": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-5.0.0.tgz", + "integrity": "sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==", + "dependencies": { + "yocto-queue": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-queue": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-8.0.1.tgz", + "integrity": "sha512-NXzu9aQJTAzbBqOt2hwsR63ea7yvxJc0PwN/zobNAudYfb1B7R08SzB4TsLeSbUCuG467NhnoT0oO6w1qRO+BA==", + "dependencies": { + "eventemitter3": "^5.0.1", + "p-timeout": "^6.1.2" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-timeout": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-6.1.2.tgz", + "integrity": "sha512-UbD77BuZ9Bc9aABo74gfXhNvzC9Tx7SxtHSh1fxvx3jTLLYvmVhiQZZrJzqqU0jKbN32kb5VOKiLEQI/3bIjgQ==", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/pagefind": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/pagefind/-/pagefind-1.0.4.tgz", + "integrity": "sha512-oRIizYe+zSI2Jw4zcMU0ebDZm27751hRFiSOBLwc1OIYMrsZKk+3m8p9EVaOmc6zZdtqwwdilNUNxXvBeHcP9w==", + "bin": { + "pagefind": "lib/runner/bin.cjs" + }, + "optionalDependencies": { + "@pagefind/darwin-arm64": "1.0.4", + "@pagefind/darwin-x64": "1.0.4", + "@pagefind/linux-arm64": "1.0.4", + "@pagefind/linux-x64": "1.0.4", + "@pagefind/windows-x64": "1.0.4" + } + }, + "node_modules/parse-entities": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.1.tgz", + "integrity": "sha512-SWzvYcSJh4d/SGLIOQfZ/CoNv6BTlI6YEQ7Nj82oDVnRpwe/Z/F1EMx42x3JAOwGBlCjeCH0BRJQbQ/opHL17w==", + "dependencies": { + "@types/unist": "^2.0.0", + "character-entities": "^2.0.0", + "character-entities-legacy": "^3.0.0", + "character-reference-invalid": "^2.0.0", + "decode-named-character-reference": "^1.0.0", + "is-alphanumerical": "^2.0.0", + "is-decimal": "^2.0.0", + "is-hexadecimal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/parse-entities/node_modules/@types/unist": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" + }, + "node_modules/parse-latin": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/parse-latin/-/parse-latin-5.0.1.tgz", + "integrity": "sha512-b/K8ExXaWC9t34kKeDV8kGXBkXZ1HCSAZRYE7HR14eA1GlXX5L8iWhs8USJNhQU9q5ci413jCKF0gOyovvyRBg==", + "dependencies": { + "nlcst-to-string": "^3.0.0", + "unist-util-modify-children": "^3.0.0", + "unist-util-visit-children": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/parse5": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", + "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "dependencies": { + "entities": "^4.4.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "node_modules/path-to-regexp": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.1.tgz", + "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==" + }, + "node_modules/periscopic": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz", + "integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^3.0.0", + "is-reference": "^3.0.0" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/postcss": { + "version": "8.4.35", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz", + "integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ] + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } }, - "node_modules/lefthook-freebsd-x64": { - "version": "1.6.1", - "resolved": "https://registry.npmmirror.com/lefthook-freebsd-x64/-/lefthook-freebsd-x64-1.6.1.tgz", - "integrity": "sha512-/NBjMUtnwvdc/p821sfPnZCbWZ6FQkAvnvjoaQu6tkajKZbZYSKsl7UtAicO0nT+79BQFt7TbaZjpua2T9tM5w==", - "cpu": [ - "x64" + "node_modules/postcss-nested": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz", + "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==", + "dependencies": { + "postcss-selector-parser": "^6.0.11" + }, + "engines": { + "node": ">=12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.2.14" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.0.15", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz", + "integrity": "sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/prebuild-install": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", + "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==", + "dependencies": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^1.0.1", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/prebuild-install/node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/prebuild-install/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ] + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/prebuild-install/node_modules/tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/prebuild-install/node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/preferred-pm": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/preferred-pm/-/preferred-pm-3.1.2.tgz", + "integrity": "sha512-nk7dKrcW8hfCZ4H6klWcdRknBOXWzNQByJ0oJyX97BOupsYD+FzLS4hflgEu/uPUEHZCuRfMxzCBsuWd7OzT8Q==", + "dependencies": { + "find-up": "^5.0.0", + "find-yarn-workspace-root2": "1.2.16", + "path-exists": "^4.0.0", + "which-pm": "2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/preferred-pm/node_modules/which-pm": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-pm/-/which-pm-2.0.0.tgz", + "integrity": "sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w==", + "dependencies": { + "load-yaml-file": "^0.2.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8.15" + } + }, + "node_modules/prettier": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "devOptional": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-plugin-astro": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/prettier-plugin-astro/-/prettier-plugin-astro-0.13.0.tgz", + "integrity": "sha512-5HrJNnPmZqTUNoA97zn4gNQv9BgVhv+et03314WpQ9H9N8m2L9OSV798olwmG2YLXPl1iSstlJCR1zB3x5xG4g==", + "devOptional": true, + "dependencies": { + "@astrojs/compiler": "^1.5.5", + "prettier": "^3.0.0", + "sass-formatter": "^0.7.6" + }, + "engines": { + "node": "^14.15.0 || >=16.0.0" + } + }, + "node_modules/prettier-plugin-astro/node_modules/@astrojs/compiler": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-1.8.2.tgz", + "integrity": "sha512-o/ObKgtMzl8SlpIdzaxFnt7SATKPxu4oIP/1NL+HDJRzxfJcAkOTAb/ZKMRyULbz4q+1t2/DAebs2Z1QairkZw==", + "devOptional": true + }, + "node_modules/prismjs": { + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", + "integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==", + "engines": { + "node": ">=6" + } }, - "node_modules/lefthook-linux-arm64": { - "version": "1.6.1", - "resolved": "https://registry.npmmirror.com/lefthook-linux-arm64/-/lefthook-linux-arm64-1.6.1.tgz", - "integrity": "sha512-ke+2ni/bmxgYJSRsH+uIYYfTLj2It7WP+mcF4rfJHRbzn5yDYIjFgylUMC2CgW5urS4DSbxcRIbAqLY3OXAHnw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] + "node_modules/probe-image-size": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/probe-image-size/-/probe-image-size-7.2.3.tgz", + "integrity": "sha512-HubhG4Rb2UH8YtV4ba0Vp5bQ7L78RTONYu/ujmCu5nBI8wGv24s4E9xSKBi0N1MowRpxk76pFCpJtW0KPzOK0w==", + "dependencies": { + "lodash.merge": "^4.6.2", + "needle": "^2.5.2", + "stream-parser": "~0.3.1" + } }, - "node_modules/lefthook-linux-x64": { - "version": "1.6.1", - "resolved": "https://registry.npmmirror.com/lefthook-linux-x64/-/lefthook-linux-x64-1.6.1.tgz", - "integrity": "sha512-/HLkl9jt3XRjT0RPaLpAgUQmvp4zV/KKZ/8x6xslPl89krv3ZkHKKrqeaHdhiengq3hzx3N+KbOfFcxBRzdT6A==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } }, - "node_modules/lefthook-windows-arm64": { - "version": "1.6.1", - "resolved": "https://registry.npmmirror.com/lefthook-windows-arm64/-/lefthook-windows-arm64-1.6.1.tgz", - "integrity": "sha512-RyQ8S4/45BpJpRPy7KsOuJeXQ5FOa7MASoPtOYvrXt4A8kayCv1jlGs7MTv3XJbUosCJhfNpw3ReeHVGfw1KIw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] + "node_modules/prompts/node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "engines": { + "node": ">=6" + } }, - "node_modules/lefthook-windows-x64": { - "version": "1.6.1", - "resolved": "https://registry.npmmirror.com/lefthook-windows-x64/-/lefthook-windows-x64-1.6.1.tgz", - "integrity": "sha512-poYLk2tfg1Ncr4aZeFuhHjv1qH6f9hX3tV1FOK2MfWkXkRTYPl6MF5h/ONMIv71BsLjGbAA7LNXM5Mj4/B//lQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] + "node_modules/property-information": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.4.1.tgz", + "integrity": "sha512-OHYtXfu5aI2sS2LWFSN5rgJjrQ4pCy8i1jubJLe2QvMF8JJ++HXTUIVWFLfXJoaOfvYYjk2SN8J2wFUWIGXT4w==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } }, - "node_modules/lilconfig": { + "node_modules/pump": { "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/lilconfig/-/lilconfig-3.0.0.tgz", - "integrity": "sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==", - "dev": true, - "engines": { - "node": ">=14" + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, - "node_modules/linkify-it": { - "version": "4.0.1", - "resolved": "https://registry.npmmirror.com/linkify-it/-/linkify-it-4.0.1.tgz", - "integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==", - "dev": true, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/queue-tick": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", + "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==" + }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dependencies": { - "uc.micro": "^1.0.1" + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" } }, - "node_modules/log-symbols": { - "version": "5.1.0", - "resolved": "https://registry.npmmirror.com/log-symbols/-/log-symbols-5.1.0.tgz", - "integrity": "sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==", - "dev": true, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dependencies": { - "chalk": "^5.0.0", - "is-unicode-supported": "^1.1.0" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" }, "engines": { - "node": ">=12" + "node": ">= 6" } }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dependencies": { - "yallist": "^4.0.0" + "picomatch": "^2.2.1" }, "engines": { - "node": ">=10" + "node": ">=8.10.0" } }, - "node_modules/magic-string": { - "version": "0.30.5", - "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.5.tgz", - "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", - "dev": true, + "node_modules/rehype": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/rehype/-/rehype-13.0.1.tgz", + "integrity": "sha512-AcSLS2mItY+0fYu9xKxOu1LhUZeBZZBx8//5HKzF+0XP+eP8+6a5MXn2+DW2kfXR6Dtp1FEXMVrjyKAcvcU8vg==", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15" + "@types/hast": "^3.0.0", + "rehype-parse": "^9.0.0", + "rehype-stringify": "^10.0.0", + "unified": "^11.0.0" }, - "engines": { - "node": ">=12" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/markdown-it": { - "version": "13.0.2", - "resolved": "https://registry.npmmirror.com/markdown-it/-/markdown-it-13.0.2.tgz", - "integrity": "sha512-FtwnEuuK+2yVU7goGn/MJ0WBZMM9ZPgU9spqlFs7/A/pDIUNSOQZhUgOqYCficIuR2QaFnrt8LHqBWsbTAoI5w==", - "dev": true, + "node_modules/rehype-parse": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/rehype-parse/-/rehype-parse-9.0.0.tgz", + "integrity": "sha512-WG7nfvmWWkCR++KEkZevZb/uw41E8TsH4DsY9UxsTbIXCVGbAs4S+r8FrQ+OtH5EEQAs+5UxKC42VinkmpA1Yw==", "dependencies": { - "argparse": "^2.0.1", - "entities": "~3.0.1", - "linkify-it": "^4.0.1", - "mdurl": "^1.0.1", - "uc.micro": "^1.0.5" + "@types/hast": "^3.0.0", + "hast-util-from-html": "^2.0.0", + "unified": "^11.0.0" }, - "bin": { - "markdown-it": "bin/markdown-it.js" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/markdown-it-anchor": { - "version": "8.6.7", - "resolved": "https://registry.npmmirror.com/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz", - "integrity": "sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==", - "dev": true, - "peerDependencies": { - "@types/markdown-it": "*", - "markdown-it": "*" + "node_modules/rehype-raw": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/rehype-raw/-/rehype-raw-7.0.0.tgz", + "integrity": "sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww==", + "dependencies": { + "@types/hast": "^3.0.0", + "hast-util-raw": "^9.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/rehype-stringify": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/rehype-stringify/-/rehype-stringify-10.0.0.tgz", + "integrity": "sha512-1TX1i048LooI9QoecrXy7nGFFbFSufxVRAfc6Y9YMRAi56l+oB0zP51mLSV312uRuvVLPV1opSlJmslozR1XHQ==", + "dependencies": { + "@types/hast": "^3.0.0", + "hast-util-to-html": "^9.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/markdown-it-container": { + "node_modules/remark-directive": { "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/markdown-it-container/-/markdown-it-container-3.0.0.tgz", - "integrity": "sha512-y6oKTq4BB9OQuY/KLfk/O3ysFhB3IMYoIWhGJEidXt1NQFocFK2sA2t0NYZAMyMShAGL6x5OPIbrmXPIqaN9rw==", - "dev": true + "resolved": "https://registry.npmjs.org/remark-directive/-/remark-directive-3.0.0.tgz", + "integrity": "sha512-l1UyWJ6Eg1VPU7Hm/9tt0zKtReJQNOA4+iDMAxTyZNWnJnFlbS/7zhiel/rogTLQ2vMYwDzSJa4BiVNqGlqIMA==", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-directive": "^3.0.0", + "micromark-extension-directive": "^3.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } }, - "node_modules/markdown-it-emoji": { - "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/markdown-it-emoji/-/markdown-it-emoji-2.0.2.tgz", - "integrity": "sha512-zLftSaNrKuYl0kR5zm4gxXjHaOI3FAOEaloKmRA5hijmJZvSjmxcokOLlzycb/HXlUFWzXqpIEoyEMCE4i9MvQ==", - "dev": true + "node_modules/remark-expressive-code": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/remark-expressive-code/-/remark-expressive-code-0.32.4.tgz", + "integrity": "sha512-khV7fVBpVDOyz9EXU+6MFwLj7BtY3DLVlNMMJYQcfp9ksLMxG/i83rIJbMUZCRof9bDBmFFlrF0VDvqJ0/MNeQ==", + "dependencies": { + "expressive-code": "^0.32.4", + "hast-util-to-html": "^8.0.4", + "unist-util-visit": "^4.1.2" + } }, - "node_modules/markdown-it/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "node_modules/remark-expressive-code/node_modules/@types/hast": { + "version": "2.3.10", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.10.tgz", + "integrity": "sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw==", + "dependencies": { + "@types/unist": "^2" + } }, - "node_modules/mdurl": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", - "dev": true + "node_modules/remark-expressive-code/node_modules/@types/unist": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, - "node_modules/medium-zoom": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/medium-zoom/-/medium-zoom-1.1.0.tgz", - "integrity": "sha512-ewyDsp7k4InCUp3jRmwHBRFGyjBimKps/AJLjRSox+2q/2H4p/PNpQf+pwONWlJiOudkBXtbdmVbFjqyybfTmQ==", - "dev": true + "node_modules/remark-expressive-code/node_modules/hast-util-from-parse5": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-7.1.2.tgz", + "integrity": "sha512-Nz7FfPBuljzsN3tCQ4kCBKqdNhQE2l0Tn+X1ubgKBPRoiDIu1mL08Cfw4k7q71+Duyaw7DXDN+VTAp4Vh3oCOw==", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/unist": "^2.0.0", + "hastscript": "^7.0.0", + "property-information": "^6.0.0", + "vfile": "^5.0.0", + "vfile-location": "^4.0.0", + "web-namespaces": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "node_modules/remark-expressive-code/node_modules/hast-util-parse-selector": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-3.1.1.tgz", + "integrity": "sha512-jdlwBjEexy1oGz0aJ2f4GKMaVKkA9jwjr4MjAAI22E5fM/TXVZHuS5OpONtdeIkRKqAaryQ2E9xNQxijoThSZA==", + "dependencies": { + "@types/hast": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmmirror.com/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" + "node_modules/remark-expressive-code/node_modules/hast-util-raw": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-7.2.3.tgz", + "integrity": "sha512-RujVQfVsOrxzPOPSzZFiwofMArbQke6DJjnFfceiEbFh7S05CbPt0cYN+A5YeD3pso0JQk6O1aHBnx9+Pm2uqg==", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/parse5": "^6.0.0", + "hast-util-from-parse5": "^7.0.0", + "hast-util-to-parse5": "^7.0.0", + "html-void-elements": "^2.0.0", + "parse5": "^6.0.0", + "unist-util-position": "^4.0.0", + "unist-util-visit": "^4.0.0", + "vfile": "^5.0.0", + "web-namespaces": "^2.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-expressive-code/node_modules/hast-util-to-html": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-8.0.4.tgz", + "integrity": "sha512-4tpQTUOr9BMjtYyNlt0P50mH7xj0Ks2xpo8M943Vykljf99HW6EzulIoJP1N3eKOSScEHzyzi9dm7/cn0RfGwA==", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/unist": "^2.0.0", + "ccount": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-raw": "^7.0.0", + "hast-util-whitespace": "^2.0.0", + "html-void-elements": "^2.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "stringify-entities": "^4.0.0", + "zwitch": "^2.0.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmmirror.com/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, + "node_modules/remark-expressive-code/node_modules/hast-util-to-parse5": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-7.1.0.tgz", + "integrity": "sha512-YNRgAJkH2Jky5ySkIqFXTQiaqcAtJyVE+D5lkN6CdtOqrnkLfGYYrEcKuHOJZlp+MwjSwuD3fZuawI+sic/RBw==", "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "web-namespaces": "^2.0.0", + "zwitch": "^2.0.0" }, - "engines": { - "node": ">=8.6" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", - "dev": true, - "engines": { - "node": ">=12" + "node_modules/remark-expressive-code/node_modules/hast-util-whitespace": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-2.0.1.tgz", + "integrity": "sha512-nAxA0v8+vXSBDt3AnRUNjyRIQ0rD+ntpbAp4LnPkumc5M9yUbSMa4XDU9Q6etY4f1Wp4bNgvc1yjiZtsTTrSng==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, + "node_modules/remark-expressive-code/node_modules/hastscript": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-7.2.0.tgz", + "integrity": "sha512-TtYPq24IldU8iKoJQqvZOuhi5CyCQRAbvDOX0x1eW6rsHSxa/1i2CCiptNTotGHJ3VoHRGmqiv6/D3q113ikkw==", "dependencies": { - "brace-expansion": "^1.1.7" + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-parse-selector": "^3.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0" }, - "engines": { - "node": "*" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmmirror.com/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true + "node_modules/remark-expressive-code/node_modules/html-void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-2.0.1.tgz", + "integrity": "sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "node_modules/remark-expressive-code/node_modules/parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" }, - "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" + "node_modules/remark-expressive-code/node_modules/unist-util-is": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", + "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", + "dependencies": { + "@types/unist": "^2.0.0" }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", - "dev": true + "node_modules/remark-expressive-code/node_modules/unist-util-position": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-4.0.4.tgz", + "integrity": "sha512-kUBE91efOWfIVBo8xzh/uZQ7p9ffYRtUbMRZBNFYwf0RK8koUMx6dGUfwylLOKmaT2cs4wSW96QoYUSXAyEtpg==", + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" + "node_modules/remark-expressive-code/node_modules/unist-util-stringify-position": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmmirror.com/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", - "dev": true, - "engines": { - "node": ">=0.10.0" + "node_modules/remark-expressive-code/node_modules/unist-util-visit": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", + "integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0", + "unist-util-visit-parents": "^5.1.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/npm-run-path": { - "version": "5.2.0", - "resolved": "https://registry.npmmirror.com/npm-run-path/-/npm-run-path-5.2.0.tgz", - "integrity": "sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==", - "dev": true, + "node_modules/remark-expressive-code/node_modules/unist-util-visit-parents": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", + "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", "dependencies": { - "path-key": "^4.0.0" + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0" }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/npm-run-path/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "dev": true, - "engines": { - "node": ">=12" + "node_modules/remark-expressive-code/node_modules/vfile": { + "version": "5.3.7", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", + "integrity": "sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==", + "dependencies": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^3.0.0", + "vfile-message": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", - "dev": true, + "node_modules/remark-expressive-code/node_modules/vfile-location": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-4.1.0.tgz", + "integrity": "sha512-YF23YMyASIIJXpktBa4vIGLJ5Gs88UB/XePgqPmTa7cDA+JeO3yclbpheQYCHjVHBn/yePzrXuygIL+xbvRYHw==", "dependencies": { - "boolbase": "^1.0.0" + "@types/unist": "^2.0.0", + "vfile": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" + "node_modules/remark-expressive-code/node_modules/vfile-message": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-3.1.4.tgz", + "integrity": "sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-gfm": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-4.0.0.tgz", + "integrity": "sha512-U92vJgBPkbw4Zfu/IiW2oTZLSL3Zpv+uI7My2eq8JxKgqraFdU8YUGicEJCEgSbeaG+QDFqIcwwfMTOEelPxuA==", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-gfm": "^3.0.0", + "micromark-extension-gfm": "^3.0.0", + "remark-parse": "^11.0.0", + "remark-stringify": "^11.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-mdx": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-mdx/-/remark-mdx-3.0.0.tgz", + "integrity": "sha512-O7yfjuC6ra3NHPbRVxfflafAj3LTwx3b73aBvkEFU5z4PsD6FD4vrqJAkE5iNGLz71GdjXfgRqm3SQ0h0VuE7g==", + "dependencies": { + "mdast-util-mdx": "^3.0.0", + "micromark-extension-mdxjs": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmmirror.com/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, + "node_modules/remark-parse": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-11.0.0.tgz", + "integrity": "sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==", "dependencies": { - "wrappy": "1" + "@types/mdast": "^4.0.0", + "mdast-util-from-markdown": "^2.0.0", + "micromark-util-types": "^2.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmmirror.com/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", - "dev": true, + "node_modules/remark-rehype": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-11.1.0.tgz", + "integrity": "sha512-z3tJrAs2kIs1AqIIy6pzHmAHlF1hWQ+OdY4/hv+Wxe35EhyLKcajL33iUEn3ScxtFox9nUvRufR/Zre8Q08H/g==", "dependencies": { - "mimic-fn": "^4.0.0" + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "mdast-util-to-hast": "^13.0.0", + "unified": "^11.0.0", + "vfile": "^6.0.0" }, - "engines": { - "node": ">=12" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/open": { - "version": "7.4.2", - "resolved": "https://registry.npmmirror.com/open/-/open-7.4.2.tgz", - "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", - "dev": true, + "node_modules/remark-smartypants": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/remark-smartypants/-/remark-smartypants-2.1.0.tgz", + "integrity": "sha512-qoF6Vz3BjU2tP6OfZqHOvCU0ACmu/6jhGaINSQRI9mM7wCxNQTKB3JUAN4SVoN2ybElEDTxBIABRep7e569iJw==", "dependencies": { - "is-docker": "^2.0.0", - "is-wsl": "^2.1.1" + "retext": "^8.1.0", + "retext-smartypants": "^5.2.0", + "unist-util-visit": "^5.0.0" }, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, - "node_modules/ora": { - "version": "7.0.1", - "resolved": "https://registry.npmmirror.com/ora/-/ora-7.0.1.tgz", - "integrity": "sha512-0TUxTiFJWv+JnjWm4o9yvuskpEJLXTcng8MJuKd+SzAzp2o+OP3HWqNhB4OdJRt1Vsd9/mR0oyaEYlOnL7XIRw==", - "dev": true, + "node_modules/remark-stringify": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-11.0.0.tgz", + "integrity": "sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==", "dependencies": { - "chalk": "^5.3.0", - "cli-cursor": "^4.0.0", - "cli-spinners": "^2.9.0", - "is-interactive": "^2.0.0", - "is-unicode-supported": "^1.3.0", - "log-symbols": "^5.1.0", - "stdin-discarder": "^0.1.0", - "string-width": "^6.1.0", - "strip-ansi": "^7.1.0" + "@types/mdast": "^4.0.0", + "mdast-util-to-markdown": "^2.0.0", + "unified": "^11.0.0" }, - "engines": { - "node": ">=16" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "dev": true, + "node_modules/request-light": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/request-light/-/request-light-0.7.0.tgz", + "integrity": "sha512-lMbBMrDoxgsyO+yB3sDcrDuX85yYt7sS8BfQd11jtbW/z5ZWgLZRcEGLsLoYw7I0WSUGQBs8CC8ScIxkTX1+6Q==" + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "engines": { "node": ">=0.10.0" } }, - "node_modules/parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmmirror.com/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", - "dev": true, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dependencies": { - "entities": "^4.4.0" + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "7.0.0", - "resolved": "https://registry.npmmirror.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", - "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", - "dev": true, + "node_modules/restore-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", + "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", "dependencies": { - "domhandler": "^5.0.2", - "parse5": "^7.0.0" + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/parse5/node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, + "node_modules/restore-cursor/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "engines": { - "node": ">=0.12" + "node": ">=6" } }, - "node_modules/patch-package": { - "version": "8.0.0", - "resolved": "https://registry.npmmirror.com/patch-package/-/patch-package-8.0.0.tgz", - "integrity": "sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA==", - "dev": true, + "node_modules/restore-cursor/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dependencies": { - "@yarnpkg/lockfile": "^1.1.0", - "chalk": "^4.1.2", - "ci-info": "^3.7.0", - "cross-spawn": "^7.0.3", - "find-yarn-workspace-root": "^2.0.0", - "fs-extra": "^9.0.0", - "json-stable-stringify": "^1.0.2", - "klaw-sync": "^6.0.0", - "minimist": "^1.2.6", - "open": "^7.4.2", - "rimraf": "^2.6.3", - "semver": "^7.5.3", - "slash": "^2.0.0", - "tmp": "^0.0.33", - "yaml": "^2.2.2" - }, - "bin": { - "patch-package": "index.js" + "mimic-fn": "^2.1.0" }, "engines": { - "node": ">=14", - "npm": ">5" + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/patch-package/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, + "node_modules/restore-cursor/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, + "node_modules/retext": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/retext/-/retext-8.1.0.tgz", + "integrity": "sha512-N9/Kq7YTn6ZpzfiGW45WfEGJqFf1IM1q8OsRa1CGzIebCJBNCANDRmOrholiDRGKo/We7ofKR4SEvcGAWEMD3Q==", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "@types/nlcst": "^1.0.0", + "retext-latin": "^3.0.0", + "retext-stringify": "^3.0.0", + "unified": "^10.0.0" }, - "engines": { - "node": ">=10" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/patch-package/node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dev": true, + "node_modules/retext-latin": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/retext-latin/-/retext-latin-3.1.0.tgz", + "integrity": "sha512-5MrD1tuebzO8ppsja5eEu+ZbBeUNCjoEarn70tkXOS7Bdsdf6tNahsv2bY0Z8VooFF6cw7/6S+d3yI/TMlMVVQ==", "dependencies": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" + "@types/nlcst": "^1.0.0", + "parse-latin": "^5.0.0", + "unherit": "^3.0.0", + "unified": "^10.0.0" }, - "engines": { - "node": ">=10" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/patch-package/node_modules/slash": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true, - "engines": { - "node": ">=6" + "node_modules/retext-latin/node_modules/@types/unist": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" + }, + "node_modules/retext-latin/node_modules/unified": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", + "integrity": "sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==", + "dependencies": { + "@types/unist": "^2.0.0", + "bail": "^2.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^4.0.0", + "trough": "^2.0.0", + "vfile": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" + "node_modules/retext-latin/node_modules/unist-util-stringify-position": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmmirror.com/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" + "node_modules/retext-latin/node_modules/vfile": { + "version": "5.3.7", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", + "integrity": "sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==", + "dependencies": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^3.0.0", + "vfile-message": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/path-type": { - "version": "5.0.0", - "resolved": "https://registry.npmmirror.com/path-type/-/path-type-5.0.0.tgz", - "integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==", - "dev": true, - "engines": { - "node": ">=12" + "node_modules/retext-latin/node_modules/vfile-message": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-3.1.4.tgz", + "integrity": "sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "node_modules/retext-smartypants": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/retext-smartypants/-/retext-smartypants-5.2.0.tgz", + "integrity": "sha512-Do8oM+SsjrbzT2UNIKgheP0hgUQTDDQYyZaIY3kfq0pdFzoPk+ZClYJ+OERNXveog4xf1pZL4PfRxNoVL7a/jw==", + "dependencies": { + "@types/nlcst": "^1.0.0", + "nlcst-to-string": "^3.0.0", + "unified": "^10.0.0", + "unist-util-visit": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" + "node_modules/retext-smartypants/node_modules/@types/unist": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" + }, + "node_modules/retext-smartypants/node_modules/unified": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", + "integrity": "sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==", + "dependencies": { + "@types/unist": "^2.0.0", + "bail": "^2.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^4.0.0", + "trough": "^2.0.0", + "vfile": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/postcss": { - "version": "8.4.32", - "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.32.tgz", - "integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==", - "dev": true, + "node_modules/retext-smartypants/node_modules/unist-util-is": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", + "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", "dependencies": { - "nanoid": "^3.3.7", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "@types/unist": "^2.0.0" }, - "engines": { - "node": "^10 || ^12 || >=14" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/postcss-load-config": { - "version": "4.0.2", - "resolved": "https://registry.npmmirror.com/postcss-load-config/-/postcss-load-config-4.0.2.tgz", - "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==", - "dev": true, + "node_modules/retext-smartypants/node_modules/unist-util-stringify-position": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", "dependencies": { - "lilconfig": "^3.0.0", - "yaml": "^2.3.4" + "@types/unist": "^2.0.0" }, - "engines": { - "node": ">= 14" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/retext-smartypants/node_modules/unist-util-visit": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", + "integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0", + "unist-util-visit-parents": "^5.1.1" }, - "peerDependencies": { - "postcss": ">=8.0.9", - "ts-node": ">=9.0.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/retext-smartypants/node_modules/unist-util-visit-parents": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", + "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0" }, - "peerDependenciesMeta": { - "postcss": { - "optional": true - }, - "ts-node": { - "optional": true - } + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmmirror.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true + "node_modules/retext-smartypants/node_modules/vfile": { + "version": "5.3.7", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", + "integrity": "sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==", + "dependencies": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^3.0.0", + "vfile-message": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } }, - "node_modules/preact": { - "version": "10.19.3", - "resolved": "https://registry.npmmirror.com/preact/-/preact-10.19.3.tgz", - "integrity": "sha512-nHHTeFVBTHRGxJXKkKu5hT8C/YWBkPso4/Gad6xuj5dbptt9iF9NZr9pHbPhBrnT2klheu7mHTxTZ/LjwJiEiQ==", - "dev": true + "node_modules/retext-smartypants/node_modules/vfile-message": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-3.1.4.tgz", + "integrity": "sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } }, - "node_modules/prettier": { - "version": "3.2.4", - "resolved": "https://registry.npmmirror.com/prettier/-/prettier-3.2.4.tgz", - "integrity": "sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==", - "dev": true, - "bin": { - "prettier": "bin/prettier.cjs" + "node_modules/retext-stringify": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/retext-stringify/-/retext-stringify-3.1.0.tgz", + "integrity": "sha512-767TLOaoXFXyOnjx/EggXlb37ZD2u4P1n0GJqVdpipqACsQP+20W+BNpMYrlJkq7hxffnFk+jc6mAK9qrbuB8w==", + "dependencies": { + "@types/nlcst": "^1.0.0", + "nlcst-to-string": "^3.0.0", + "unified": "^10.0.0" }, - "engines": { - "node": ">=14" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/prismjs": { - "version": "1.29.0", - "resolved": "https://registry.npmmirror.com/prismjs/-/prismjs-1.29.0.tgz", - "integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==", - "dev": true, - "engines": { - "node": ">=6" + "node_modules/retext-stringify/node_modules/@types/unist": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" + }, + "node_modules/retext-stringify/node_modules/unified": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", + "integrity": "sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==", + "dependencies": { + "@types/unist": "^2.0.0", + "bail": "^2.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^4.0.0", + "trough": "^2.0.0", + "vfile": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmmirror.com/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true + "node_modules/retext-stringify/node_modules/unist-util-stringify-position": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, + "node_modules/retext-stringify/node_modules/vfile": { + "version": "5.3.7", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", + "integrity": "sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==", "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^3.0.0", + "vfile-message": "^3.0.0" }, - "engines": { - "node": ">= 6" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, + "node_modules/retext-stringify/node_modules/vfile-message": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-3.1.4.tgz", + "integrity": "sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==", "dependencies": { - "picomatch": "^2.2.1" + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^3.0.0" }, - "engines": { - "node": ">=8.10.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/restore-cursor": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/restore-cursor/-/restore-cursor-4.0.0.tgz", - "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", - "dev": true, + "node_modules/retext/node_modules/@types/unist": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" + }, + "node_modules/retext/node_modules/unified": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", + "integrity": "sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==", "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" + "@types/unist": "^2.0.0", + "bail": "^2.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^4.0.0", + "trough": "^2.0.0", + "vfile": "^5.0.0" }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/restore-cursor/node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "engines": { - "node": ">=6" + "node_modules/retext/node_modules/unist-util-stringify-position": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/restore-cursor/node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmmirror.com/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, + "node_modules/retext/node_modules/vfile": { + "version": "5.3.7", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", + "integrity": "sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==", "dependencies": { - "mimic-fn": "^2.1.0" + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^3.0.0", + "vfile-message": "^3.0.0" }, - "engines": { - "node": ">=6" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/retext/node_modules/vfile-message": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-3.1.4.tgz", + "integrity": "sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/restore-cursor/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmmirror.com/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, "node_modules/reusify": { "version": "1.0.4", - "resolved": "https://registry.npmmirror.com/reusify/-/reusify-1.0.4.tgz", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" } }, - "node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, + "node_modules/rollup": { + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.6.tgz", + "integrity": "sha512-05lzkCS2uASX0CiLFybYfVkwNbKZG5NFQ6Go0VWyogFTXXbR039UVsegViTntkk4OglHBdF54ccApXRRuXRbsg==", "dependencies": { - "glob": "^7.1.3" + "@types/estree": "1.0.5" }, - "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/rollup": { - "version": "4.9.2", - "resolved": "https://registry.npmmirror.com/rollup/-/rollup-4.9.2.tgz", - "integrity": "sha512-66RB8OtFKUTozmVEh3qyNfH+b+z2RXBVloqO2KCC/pjFaGaHtxP9fVfOQKPSGXg2mElmjmxjW/fZ7iKrEpMH5Q==", - "dev": true, "bin": { "rollup": "dist/bin/rollup" }, @@ -3430,72 +7244,92 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.9.2", - "@rollup/rollup-android-arm64": "4.9.2", - "@rollup/rollup-darwin-arm64": "4.9.2", - "@rollup/rollup-darwin-x64": "4.9.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.9.2", - "@rollup/rollup-linux-arm64-gnu": "4.9.2", - "@rollup/rollup-linux-arm64-musl": "4.9.2", - "@rollup/rollup-linux-riscv64-gnu": "4.9.2", - "@rollup/rollup-linux-x64-gnu": "4.9.2", - "@rollup/rollup-linux-x64-musl": "4.9.2", - "@rollup/rollup-win32-arm64-msvc": "4.9.2", - "@rollup/rollup-win32-ia32-msvc": "4.9.2", - "@rollup/rollup-win32-x64-msvc": "4.9.2", + "@rollup/rollup-android-arm-eabi": "4.9.6", + "@rollup/rollup-android-arm64": "4.9.6", + "@rollup/rollup-darwin-arm64": "4.9.6", + "@rollup/rollup-darwin-x64": "4.9.6", + "@rollup/rollup-linux-arm-gnueabihf": "4.9.6", + "@rollup/rollup-linux-arm64-gnu": "4.9.6", + "@rollup/rollup-linux-arm64-musl": "4.9.6", + "@rollup/rollup-linux-riscv64-gnu": "4.9.6", + "@rollup/rollup-linux-x64-gnu": "4.9.6", + "@rollup/rollup-linux-x64-musl": "4.9.6", + "@rollup/rollup-win32-arm64-msvc": "4.9.6", + "@rollup/rollup-win32-ia32-msvc": "4.9.6", + "@rollup/rollup-win32-x64-msvc": "4.9.6", "fsevents": "~2.3.2" } }, "node_modules/run-parallel": { "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/run-parallel/-/run-parallel-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "dependencies": { "queue-microtask": "^1.2.2" } }, + "node_modules/s.color": { + "version": "0.0.15", + "resolved": "https://registry.npmjs.org/s.color/-/s.color-0.0.15.tgz", + "integrity": "sha512-AUNrbEUHeKY8XsYr/DYpl+qk5+aM+DChopnWOPEzn8YKzOhv4l2zH6LzZms3tOZP3wwdOyc0RmTciyi46HLIuA==", + "devOptional": true + }, "node_modules/safe-buffer": { "version": "5.2.1", - "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "node_modules/sass": { - "version": "1.69.7", - "resolved": "https://registry.npmmirror.com/sass/-/sass-1.69.7.tgz", - "integrity": "sha512-rzj2soDeZ8wtE2egyLXgOOHQvaC2iosZrkF6v3EUG+tBwEvhqUCzm0VP3k9gHF9LXbSrRhT5SksoI56Iw8NPnQ==", - "dev": true, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/sass-formatter": { + "version": "0.7.9", + "resolved": "https://registry.npmjs.org/sass-formatter/-/sass-formatter-0.7.9.tgz", + "integrity": "sha512-CWZ8XiSim+fJVG0cFLStwDvft1VI7uvXdCNJYXhDvowiv+DsbD1nXLiQ4zrE5UBvj5DWZJ93cwN0NX5PMsr1Pw==", + "devOptional": true, "dependencies": { - "chokidar": ">=3.0.0 <4.0.0", - "immutable": "^4.0.0", - "source-map-js": ">=0.6.2 <2.0.0" - }, - "bin": { - "sass": "sass.js" - }, - "engines": { - "node": ">=14.0.0" + "suf-log": "^2.5.3" } }, "node_modules/sax": { "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/sax/-/sax-1.3.0.tgz", - "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==", - "dev": true - }, - "node_modules/search-insights": { - "version": "2.13.0", - "resolved": "https://registry.npmmirror.com/search-insights/-/search-insights-2.13.0.tgz", - "integrity": "sha512-Orrsjf9trHHxFRuo9/rzm0KIWmgzE8RMlZMzuhZOJ01Rnz3D0YBAe+V6473t6/H6c7irs6Lt48brULAiRWb3Vw==", - "dev": true, - "peer": true + "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", + "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==" }, "node_modules/section-matter": { "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/section-matter/-/section-matter-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", "integrity": "sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==", - "dev": true, "dependencies": { "extend-shallow": "^2.0.1", "kind-of": "^6.0.0" @@ -3505,10 +7339,9 @@ } }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmmirror.com/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -3519,26 +7352,53 @@ "node": ">=10" } }, - "node_modules/set-function-length": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/set-function-length/-/set-function-length-1.1.1.tgz", - "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", - "dev": true, + "node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dependencies": { - "define-data-property": "^1.1.1", - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "yallist": "^4.0.0" }, "engines": { - "node": ">= 0.4" + "node": ">=10" + } + }, + "node_modules/semver/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/server-destroy": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", + "integrity": "sha512-rb+9B5YBIEzYcD6x2VKidaa+cqYBJQKnU4oe4E3ANwRRN56yk/ua1YCJT1n21NTS8w6CcOclAKNP3PhdCXKYtQ==" + }, + "node_modules/sharp": { + "version": "0.32.6", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.6.tgz", + "integrity": "sha512-KyLTWwgcR9Oe4d9HwCwNM2l7+J0dUQwn/yf7S0EnTtb0eVS4RxO0eUSvxPtzT4F3SY+C4K6fqdv/DO27sJ/v/w==", + "hasInstallScript": true, + "dependencies": { + "color": "^4.2.3", + "detect-libc": "^2.0.2", + "node-addon-api": "^6.1.0", + "prebuild-install": "^7.1.1", + "semver": "^7.5.4", + "simple-get": "^4.0.1", + "tar-fs": "^3.0.4", + "tunnel-agent": "^0.6.0" + }, + "engines": { + "node": ">=14.15.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" } }, "node_modules/shebang-command": { "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/shebang-command/-/shebang-command-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, "dependencies": { "shebang-regex": "^3.0.0" }, @@ -3548,36 +7408,96 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/shebang-regex/-/shebang-regex-3.0.0.tgz", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, "engines": { "node": ">=8" } }, - "node_modules/shiki": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmmirror.com/shiki/-/shiki-1.0.0-beta.2.tgz", - "integrity": "sha512-hPJcD6F5BRp2yfeBcERqQIVeEPjE2g+r5MVq/tonz2SxT6o79e84Y9iW+a5TyGXWtXAKiW5jd4lGevJ4yIUixA==", - "dev": true, + "node_modules/shikiji": { + "version": "0.9.19", + "resolved": "https://registry.npmjs.org/shikiji/-/shikiji-0.9.19.tgz", + "integrity": "sha512-Kw2NHWktdcdypCj1GkKpXH4o6Vxz8B8TykPlPuLHOGSV8VkhoCLcFOH4k19K4LXAQYRQmxg+0X/eM+m2sLhAkg==", "dependencies": { - "@shikijs/core": "1.0.0-beta.2" + "shikiji-core": "0.9.19" } }, + "node_modules/shikiji-core": { + "version": "0.9.19", + "resolved": "https://registry.npmjs.org/shikiji-core/-/shikiji-core-0.9.19.tgz", + "integrity": "sha512-AFJu/vcNT21t0e6YrfadZ+9q86gvPum6iywRyt1OtIPjPFe25RQnYJyxHQPMLKCCWA992TPxmEmbNcOZCAJclw==" + }, "node_modules/signal-exit": { "version": "4.1.0", - "resolved": "https://registry.npmmirror.com/signal-exit/-/signal-exit-4.1.0.tgz", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, "engines": { "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "dependencies": { + "is-arrayish": "^0.3.1" } }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" + }, "node_modules/sitemap": { "version": "7.1.1", - "resolved": "https://registry.npmmirror.com/sitemap/-/sitemap-7.1.1.tgz", + "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-7.1.1.tgz", "integrity": "sha512-mK3aFtjz4VdJN0igpIJrinf3EO8U8mxOPsTBzSsy06UtjZQJ3YY3o3Xa7zSc5nMqcMrRwlChHZ18Kxg0caiPBg==", - "dev": true, "dependencies": { "@types/node": "^17.0.5", "@types/sax": "^1.2.1", @@ -3594,192 +7514,518 @@ }, "node_modules/sitemap/node_modules/@types/node": { "version": "17.0.45", - "resolved": "https://registry.npmmirror.com/@types/node/-/node-17.0.45.tgz", - "integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==", - "dev": true + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.45.tgz", + "integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==" }, - "node_modules/slash": { - "version": "5.1.0", - "resolved": "https://registry.npmmirror.com/slash/-/slash-5.1.0.tgz", - "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", - "dev": true, + "node_modules/source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", "engines": { - "node": ">=14.16" + "node": ">= 8" } }, "node_modules/source-map-js": { "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "dev": true, "engines": { "node": ">=0.10.0" } }, + "node_modules/space-separated-tokens": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", + "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/sprintf-js": { "version": "1.0.3", - "resolved": "https://registry.npmmirror.com/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" }, "node_modules/stdin-discarder": { "version": "0.1.0", - "resolved": "https://registry.npmmirror.com/stdin-discarder/-/stdin-discarder-0.1.0.tgz", + "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.1.0.tgz", "integrity": "sha512-xhV7w8S+bUwlPTb4bAOUQhv8/cSS5offJuX8GQGq32ONF0ZtDWKfkdomM3HMRA+LhX6um/FZ0COqlwsjD53LeQ==", - "dev": true, "dependencies": { "bl": "^5.0.0" }, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/stream-parser": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/stream-parser/-/stream-parser-0.3.1.tgz", + "integrity": "sha512-bJ/HgKq41nlKvlhccD5kaCr/P+Hu0wPNKPJOH7en+YrJu/9EgqUF+88w5Jb6KNcjOFMhfX4B2asfeAtIGuHObQ==", + "dependencies": { + "debug": "2" + } + }, + "node_modules/stream-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/stream-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/streamx": { + "version": "2.15.7", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.7.tgz", + "integrity": "sha512-NPEKS5+yjyo597eafGbKW5ujh7Sm6lDLHZQd/lRSz6S0VarpADBJItqfB4PnwpS+472oob1GX5cCY9vzfJpHUA==", + "dependencies": { + "fast-fifo": "^1.1.0", + "queue-tick": "^1.0.1" } }, "node_modules/string_decoder": { "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, "dependencies": { "safe-buffer": "~5.2.0" } }, "node_modules/string-width": { - "version": "6.1.0", - "resolved": "https://registry.npmmirror.com/string-width/-/string-width-6.1.0.tgz", - "integrity": "sha512-k01swCJAgQmuADB0YIc+7TuatfNvTBVOoaUWJjTB9R4VJzR5vNWzf5t42ESVZFPS8xTySF7CAdV4t/aaIm3UnQ==", - "dev": true, + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", + "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^10.2.1", - "strip-ansi": "^7.0.1" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=16" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/stringify-entities": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.3.tgz", + "integrity": "sha512-BP9nNHMhhfcMbiuQKCqMjhDP5yBCAxsPu4pHFFzJ6Alo9dZgY4VLDPutXqIjpRiMoKdp7Av85Gr73Q5uH9k7+g==", + "dependencies": { + "character-entities-html4": "^2.0.0", + "character-entities-legacy": "^3.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, "node_modules/strip-ansi": { "version": "7.1.0", - "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-7.1.0.tgz", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, "dependencies": { "ansi-regex": "^6.0.1" }, "engines": { "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "engines": { + "node": ">=4" } }, "node_modules/strip-bom-string": { "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/strip-bom-string/-/strip-bom-string-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", "integrity": "sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==", - "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/strip-final-newline": { "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", - "dev": true, "engines": { "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "engines": { + "node": ">=0.10.0" } }, - "node_modules/striptags": { - "version": "3.2.0", - "resolved": "https://registry.npmmirror.com/striptags/-/striptags-3.2.0.tgz", - "integrity": "sha512-g45ZOGzHDMe2bdYMdIvdAfCQkCTDMGBazSw1ypMowwGIee7ZQ5dU0rBJ8Jqgl+jAKIv4dbeE1jscZq9wid1Tkw==", - "dev": true + "node_modules/style-to-object": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.4.4.tgz", + "integrity": "sha512-HYNoHZa2GorYNyqiCaBgsxvcJIn7OHq6inEga+E6Ke3m5JkoqpQbnFssk4jwe+K7AhGa2fcha4wSOf1Kn01dMg==", + "dependencies": { + "inline-style-parser": "0.1.1" + } + }, + "node_modules/suf-log": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/suf-log/-/suf-log-2.5.3.tgz", + "integrity": "sha512-KvC8OPjzdNOe+xQ4XWJV2whQA0aM1kGVczMQ8+dStAO6KfEB140JEVQ9dE76ONZ0/Ylf67ni4tILPJB41U0eow==", + "devOptional": true, + "dependencies": { + "s.color": "0.0.15" + } }, "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dependencies": { - "has-flag": "^4.0.0" + "has-flag": "^3.0.0" }, "engines": { - "node": ">=8" + "node": ">=4" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tar-fs": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", + "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", + "dependencies": { + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + } + }, + "node_modules/tar-stream": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", + "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", + "dependencies": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/trim-lines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", + "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/trough": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/trough/-/trough-2.2.0.tgz", + "integrity": "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/tsconfck": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-3.0.2.tgz", + "integrity": "sha512-6lWtFjwuhS3XI4HsX4Zg0izOI3FU/AI9EGVlPEUMDIhvLPMD4wkiof0WCoDgW7qY+Dy198g4d9miAqUHWHFH6Q==", + "bin": { + "tsconfck": "bin/tsconfck.js" + }, + "engines": { + "node": "^18 || >=20" + }, + "peerDependencies": { + "typescript": "^5.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/type-fest": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typesafe-path": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/typesafe-path/-/typesafe-path-0.2.2.tgz", + "integrity": "sha512-OJabfkAg1WLZSqJAJ0Z6Sdt3utnbzr/jh+NAHoyWHJe8CMSy79Gm085094M9nvTPy22KzTVn5Zq5mbapCI/hPA==" + }, + "node_modules/typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-auto-import-cache": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/typescript-auto-import-cache/-/typescript-auto-import-cache-0.3.2.tgz", + "integrity": "sha512-+laqe5SFL1vN62FPOOJSUDTZxtgsoOXjneYOXIpx5rQ4UMiN89NAtJLpqLqyebv9fgQ/IMeeTX+mQyRnwvJzvg==", + "dependencies": { + "semver": "^7.3.8" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, + "node_modules/unherit": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/unherit/-/unherit-3.0.1.tgz", + "integrity": "sha512-akOOQ/Yln8a2sgcLj4U0Jmx0R5jpIg2IUyRrWOzmEbjBtGzBdHtSeFKgoEcoH4KYIG/Pb8GQ/BwtYm0GCq1Sqg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/unified": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/unified/-/unified-11.0.4.tgz", + "integrity": "sha512-apMPnyLjAX+ty4OrNap7yumyVAMlKx5IWU2wlzzUdYJO9A8f1p9m/gywF/GM2ZDFcjQPrx59Mc90KwmxsoklxQ==", + "dependencies": { + "@types/unist": "^3.0.0", + "bail": "^2.0.0", + "devlop": "^1.0.0", + "extend": "^3.0.0", + "is-plain-obj": "^4.0.0", + "trough": "^2.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-is": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.0.tgz", + "integrity": "sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-modify-children": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/unist-util-modify-children/-/unist-util-modify-children-3.1.1.tgz", + "integrity": "sha512-yXi4Lm+TG5VG+qvokP6tpnk+r1EPwyYL04JWDxLvgvPV40jANh7nm3udk65OOWquvbMDe+PL9+LmkxDpTv/7BA==", + "dependencies": { + "@types/unist": "^2.0.0", + "array-iterate": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-modify-children/node_modules/@types/unist": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" + }, + "node_modules/unist-util-position": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz", + "integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-position-from-estree": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unist-util-position-from-estree/-/unist-util-position-from-estree-2.0.0.tgz", + "integrity": "sha512-KaFVRjoqLyF6YXCbVLNad/eS4+OfPQQn2yOd7zF/h5T/CSL2v8NpN6a5TPvtbXthAGw5nG+PuTtq+DdIZr+cRQ==", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmmirror.com/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, + "node_modules/unist-util-remove": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-util-remove/-/unist-util-remove-4.0.0.tgz", + "integrity": "sha512-b4gokeGId57UVRX/eVKej5gXqGlc9+trkORhFJpu9raqZkZhU0zm8Doi05+HaiBsMEIJowL+2WtQ5ItjsngPXg==", "dependencies": { - "os-tmpdir": "~1.0.2" + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.0.0" }, - "engines": { - "node": ">=0.6.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, + "node_modules/unist-util-remove-position": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-5.0.0.tgz", + "integrity": "sha512-Hp5Kh3wLxv0PHj9m2yZhhLt58KzPtEYKQQ4yxfYFEO7EvHwzyDYnduhHnY1mDxoqr7VUwVuHXk9RXKIiYS1N8Q==", "dependencies": { - "is-number": "^7.0.0" + "@types/unist": "^3.0.0", + "unist-util-visit": "^5.0.0" }, - "engines": { - "node": ">=8.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/ts-debounce": { + "node_modules/unist-util-stringify-position": { "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/ts-debounce/-/ts-debounce-4.0.0.tgz", - "integrity": "sha512-+1iDGY6NmOGidq7i7xZGA4cm8DAa6fqdYcvO5Z6yBevH++Bdo9Qt/mN0TzHUgcCcKv1gmh9+W5dHqz8pMWbCbg==", - "dev": true - }, - "node_modules/uc.micro": { - "version": "1.0.6", - "resolved": "https://registry.npmmirror.com/uc.micro/-/uc.micro-1.0.6.tgz", - "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", - "dev": true - }, - "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", + "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } }, - "node_modules/unicorn-magic": { - "version": "0.1.0", - "resolved": "https://registry.npmmirror.com/unicorn-magic/-/unicorn-magic-0.1.0.tgz", - "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", - "dev": true, - "engines": { - "node": ">=18" + "node_modules/unist-util-visit": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz", + "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "dev": true, - "engines": { - "node": ">= 10.0.0" + "node_modules/unist-util-visit-children": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-children/-/unist-util-visit-children-2.0.2.tgz", + "integrity": "sha512-+LWpMFqyUwLGpsQxpumsQ9o9DG2VGLFrpz+rpVXYIEdPy57GSy5HioC0g3bg/8WP9oCLlapQtklOzQ8uLS496Q==", + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/upath": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/upath/-/upath-2.0.1.tgz", - "integrity": "sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==", - "dev": true, - "engines": { - "node": ">=4", - "yarn": "*" + "node_modules/unist-util-visit-children/node_modules/@types/unist": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" + }, + "node_modules/unist-util-visit-parents": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.1.tgz", + "integrity": "sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, "node_modules/update-browserslist-db": { "version": "1.0.13", - "resolved": "https://registry.npmmirror.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", - "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "dependencies": { "escalade": "^3.1.1", "picocolors": "^1.0.0" @@ -3793,18 +8039,56 @@ }, "node_modules/util-deprecate": { "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/vfile": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.1.tgz", + "integrity": "sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-location": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-5.0.2.tgz", + "integrity": "sha512-NXPYyxyBSH7zB5U6+3uDdd6Nybz6o6/od9rk8bp9H8GR3L+cm/fC0uUTbqBmUTnMCUDslAGBOIKNfvvb+gGlDg==", + "dependencies": { + "@types/unist": "^3.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.2.tgz", + "integrity": "sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } }, "node_modules/vite": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.12.tgz", - "integrity": "sha512-4hsnEkG3q0N4Tzf1+t6NdN9dg/L3BM+q8SWgbSPnJvrgH2kgdyzfVJwbR1ic69/4uMJJ/3dqDZZE5/WwqW8U1w==", - "dev": true, + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.1.0.tgz", + "integrity": "sha512-STmSFzhY4ljuhz14bg9LkMTk3d98IO6DIArnTY6MeBwiD1Za2StcQtz7fzOUnRCqrHSD5+OS2reg4HOz1eoLnw==", "dependencies": { "esbuild": "^0.19.3", - "postcss": "^8.4.32", + "postcss": "^8.4.35", "rollup": "^4.2.0" }, "bin": { @@ -3852,207 +8136,218 @@ } } }, - "node_modules/vscode-oniguruma": { - "version": "1.7.0", - "resolved": "https://registry.npmmirror.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", - "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", - "dev": true - }, - "node_modules/vscode-textmate": { - "version": "8.0.0", - "resolved": "https://registry.npmmirror.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz", - "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", - "dev": true - }, - "node_modules/vue": { - "version": "3.4.3", - "resolved": "https://registry.npmmirror.com/vue/-/vue-3.4.3.tgz", - "integrity": "sha512-GjN+culMAGv/mUbkIv8zMKItno8npcj5gWlXkSxf1SPTQf8eJ4A+YfHIvQFyL1IfuJcMl3soA7SmN1fRxbf/wA==", - "dev": true, - "dependencies": { - "@vue/compiler-dom": "3.4.3", - "@vue/compiler-sfc": "3.4.3", - "@vue/runtime-dom": "3.4.3", - "@vue/server-renderer": "3.4.3", - "@vue/shared": "3.4.3" - }, + "node_modules/vitefu": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.5.tgz", + "integrity": "sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==", "peerDependencies": { - "typescript": "*" + "vite": "^3.0.0 || ^4.0.0 || ^5.0.0" }, "peerDependenciesMeta": { - "typescript": { + "vite": { "optional": true } } }, - "node_modules/vue-router": { - "version": "4.2.5", - "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-4.2.5.tgz", - "integrity": "sha512-DIUpKcyg4+PTQKfFPX88UWhlagBEBEfJ5A8XDXRJLUnZOvcpMF8o/dnL90vpVkGaPbjvXazV/rC1qBKrZlFugw==", - "dev": true, + "node_modules/volar-service-css": { + "version": "0.0.28", + "resolved": "https://registry.npmjs.org/volar-service-css/-/volar-service-css-0.0.28.tgz", + "integrity": "sha512-qgTe7em0HdutJHfAiG4V2xsFYfS+MRC8hGUvPM5ciD39r8IqD1MjxBDWP++9C6q1GK5z2eIedeQZqzlM7b1afQ==", "dependencies": { - "@vue/devtools-api": "^6.5.0" + "vscode-css-languageservice": "^6.2.10", + "vscode-uri": "^3.0.8" }, "peerDependencies": { - "vue": "^3.2.0" + "@volar/language-service": "~2.0.1" + }, + "peerDependenciesMeta": { + "@volar/language-service": { + "optional": true + } } }, - "node_modules/vuepress": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/vuepress/-/vuepress-2.0.0-rc.0.tgz", - "integrity": "sha512-sydt/B7+pIw926G5PntYmptLkC5o2buXKh+WR1+P2KnsvkXU+UGnQrJJ0FBvu/4RNuY99tkUZd59nyPhEmRrCg==", - "dev": true, + "node_modules/volar-service-emmet": { + "version": "0.0.28", + "resolved": "https://registry.npmjs.org/volar-service-emmet/-/volar-service-emmet-0.0.28.tgz", + "integrity": "sha512-CKbroAvQyYVZ4WqCRw7KIytEwx/Kz1Ccb9nWRQZ9kAisNcU3hjYycDacMSILmSfUfgPhr2tbtNLJ9LAQReQJqw==", "dependencies": { - "vuepress-vite": "2.0.0-rc.0" + "@vscode/emmet-helper": "^2.9.2", + "volar-service-html": "0.0.28" }, - "bin": { - "vuepress": "bin/vuepress.js" + "peerDependencies": { + "@volar/language-service": "~2.0.1" }, - "engines": { - "node": ">=18.16.0" + "peerDependenciesMeta": { + "@volar/language-service": { + "optional": true + } } }, - "node_modules/vuepress-plugin-feed2": { - "version": "2.0.0-rc.10", - "resolved": "https://registry.npmmirror.com/vuepress-plugin-feed2/-/vuepress-plugin-feed2-2.0.0-rc.10.tgz", - "integrity": "sha512-4PN5RaxuOzZMVouh8D8LajRSTPPzvA4m4m8UgVTXlexmrJmMsbwSOhtnTzQooB4iBhb6NyqURcJZk/LGRDQwJg==", - "dev": true, + "node_modules/volar-service-html": { + "version": "0.0.28", + "resolved": "https://registry.npmjs.org/volar-service-html/-/volar-service-html-0.0.28.tgz", + "integrity": "sha512-yIeffFkQESLZ8weP6izRM59oQxnREn3Ep8tesltzMPEbazjRrnJCVF1ZeU0qRJi/HEQNbYqxxc3jJ5J0rR7xcg==", "dependencies": { - "@vuepress/shared": "2.0.0-rc.0", - "@vuepress/utils": "2.0.0-rc.0", - "cheerio": "1.0.0-rc.12", - "vuepress-shared": "2.0.0-rc.10", - "xml-js": "^1.6.11" - }, - "engines": { - "node": ">=18.16.0", - "npm": ">=8", - "pnpm": ">=7", - "yarn": ">=2" + "vscode-html-languageservice": "^5.1.0", + "vscode-uri": "^3.0.8" }, "peerDependencies": { - "vuepress": "2.0.0-rc.0", - "vuepress-vite": "2.0.0-rc.0", - "vuepress-webpack": "2.0.0-rc.0" + "@volar/language-service": "~2.0.1" }, "peerDependenciesMeta": { - "vuepress": { - "optional": true - }, - "vuepress-vite": { - "optional": true - }, - "vuepress-webpack": { + "@volar/language-service": { "optional": true } } }, - "node_modules/vuepress-plugin-sitemap2": { - "version": "2.0.0-rc.10", - "resolved": "https://registry.npmmirror.com/vuepress-plugin-sitemap2/-/vuepress-plugin-sitemap2-2.0.0-rc.10.tgz", - "integrity": "sha512-HW9ck76DKpSp40a8jHm+OPQ6+PfJERj+RobuhAgLCEhm7Dx9uz/5ie4gl45A1rJ4ZP7NjteVNFYRzCBwNOejVg==", - "dev": true, + "node_modules/volar-service-prettier": { + "version": "0.0.28", + "resolved": "https://registry.npmjs.org/volar-service-prettier/-/volar-service-prettier-0.0.28.tgz", + "integrity": "sha512-wfHTMhZKxv2JqgJW7kljEb1nd/tZVjiWcygeBQnIGNp+qJ8nGWE9Fi9DOgLzJ7qlzKrnvIZN3nT0lW+NP71rYA==", "dependencies": { - "@vuepress/shared": "2.0.0-rc.0", - "@vuepress/utils": "2.0.0-rc.0", - "sitemap": "^7.1.1", - "vuepress-shared": "2.0.0-rc.10" - }, - "engines": { - "node": ">=18.16.0", - "npm": ">=8", - "pnpm": ">=7", - "yarn": ">=2" + "vscode-uri": "^3.0.8" }, "peerDependencies": { - "vuepress": "2.0.0-rc.0", - "vuepress-vite": "2.0.0-rc.0", - "vuepress-webpack": "2.0.0-rc.0" + "@volar/language-service": "~2.0.1", + "prettier": "^2.2 || ^3.0" }, "peerDependenciesMeta": { - "vuepress": { - "optional": true - }, - "vuepress-vite": { + "@volar/language-service": { "optional": true }, - "vuepress-webpack": { + "prettier": { "optional": true } } }, - "node_modules/vuepress-shared": { - "version": "2.0.0-rc.10", - "resolved": "https://registry.npmmirror.com/vuepress-shared/-/vuepress-shared-2.0.0-rc.10.tgz", - "integrity": "sha512-cBm3r0LkMGySwVdPLs69z4pWLKeLZNMm7H5nOx166Isv1y5A8vgvhU1z4ud9AJBeUz+SoL8+Q0IlN8PmBVAOjQ==", - "dev": true, + "node_modules/volar-service-typescript": { + "version": "0.0.28", + "resolved": "https://registry.npmjs.org/volar-service-typescript/-/volar-service-typescript-0.0.28.tgz", + "integrity": "sha512-9Z0URkvTCKL6cXBeQ/wsBRSeI/ng9l/cRjQF2WSblldo54ndx2nf8D9XrniTqYJp6xqJDg55gnu6g5Vy1hIB+Q==", "dependencies": { - "@vuepress/client": "2.0.0-rc.0", - "@vuepress/shared": "2.0.0-rc.0", - "@vuepress/utils": "2.0.0-rc.0", - "@vueuse/core": "^10.7.1", - "cheerio": "1.0.0-rc.12", - "dayjs": "^1.11.10", - "execa": "^8.0.1", - "fflate": "^0.8.1", - "gray-matter": "^4.0.3", + "path-browserify": "^1.0.1", "semver": "^7.5.4", - "striptags": "^3.2.0", - "vue": "^3.4.1", - "vue-router": "^4.2.5" - }, - "engines": { - "node": ">=18.16.0", - "npm": ">=8", - "pnpm": ">=7", - "yarn": ">=2" + "typescript-auto-import-cache": "^0.3.1", + "vscode-languageserver-textdocument": "^1.0.11", + "vscode-nls": "^5.2.0", + "vscode-uri": "^3.0.8" }, "peerDependencies": { - "vuepress": "2.0.0-rc.0", - "vuepress-vite": "2.0.0-rc.0", - "vuepress-webpack": "2.0.0-rc.0" + "@volar/language-service": "~2.0.1", + "@volar/typescript": "~2.0.1" }, "peerDependenciesMeta": { - "vuepress": { - "optional": true - }, - "vuepress-vite": { + "@volar/language-service": { "optional": true - }, - "vuepress-webpack": { + } + } + }, + "node_modules/volar-service-typescript-twoslash-queries": { + "version": "0.0.28", + "resolved": "https://registry.npmjs.org/volar-service-typescript-twoslash-queries/-/volar-service-typescript-twoslash-queries-0.0.28.tgz", + "integrity": "sha512-vJD0ezCzYHFYoUZ6kqMYRVuRShMxlKMDjxdT7vcCc+O+VLqOHR7BD4nqd20CxdUtfTPQHHDLnqTF3trkJ0LAvA==", + "peerDependencies": { + "@volar/language-service": "~2.0.1" + }, + "peerDependenciesMeta": { + "@volar/language-service": { "optional": true } } }, - "node_modules/vuepress-vite": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/vuepress-vite/-/vuepress-vite-2.0.0-rc.0.tgz", - "integrity": "sha512-+2XBejeiskPyr2raBeA2o4uDFDsjtadpUVmtio3qqFtQpOhidz/ORuiTLr2UfLtFn1ASIHP6Vy2YjQ0e/TeUVw==", - "dev": true, + "node_modules/vscode-css-languageservice": { + "version": "6.2.12", + "resolved": "https://registry.npmjs.org/vscode-css-languageservice/-/vscode-css-languageservice-6.2.12.tgz", + "integrity": "sha512-PS9r7HgNjqzRl3v91sXpCyZPc8UDotNo6gntFNtGCKPhGA9Frk7g/VjX1Mbv3F00pn56D+rxrFzR9ep4cawOgA==", "dependencies": { - "@vuepress/bundler-vite": "2.0.0-rc.0", - "@vuepress/cli": "2.0.0-rc.0", - "@vuepress/core": "2.0.0-rc.0", - "@vuepress/theme-default": "2.0.0-rc.0", - "vue": "^3.3.8" - }, - "bin": { - "vuepress": "bin/vuepress.js", - "vuepress-vite": "bin/vuepress.js" - }, + "@vscode/l10n": "^0.0.18", + "vscode-languageserver-textdocument": "^1.0.11", + "vscode-languageserver-types": "3.17.5", + "vscode-uri": "^3.0.8" + } + }, + "node_modules/vscode-css-languageservice/node_modules/@vscode/l10n": { + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/@vscode/l10n/-/l10n-0.0.18.tgz", + "integrity": "sha512-KYSIHVmslkaCDyw013pphY+d7x1qV8IZupYfeIfzNA+nsaWHbn5uPuQRvdRFsa9zFzGeudPuoGoZ1Op4jrJXIQ==" + }, + "node_modules/vscode-html-languageservice": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/vscode-html-languageservice/-/vscode-html-languageservice-5.1.2.tgz", + "integrity": "sha512-wkWfEx/IIR3s2P5yD4aTGHiOb8IAzFxgkSt1uSC3itJ4oDAm23yG7o0L29JljUdnXDDgLafPAvhv8A2I/8riHw==", + "dependencies": { + "@vscode/l10n": "^0.0.18", + "vscode-languageserver-textdocument": "^1.0.11", + "vscode-languageserver-types": "^3.17.5", + "vscode-uri": "^3.0.8" + } + }, + "node_modules/vscode-html-languageservice/node_modules/@vscode/l10n": { + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/@vscode/l10n/-/l10n-0.0.18.tgz", + "integrity": "sha512-KYSIHVmslkaCDyw013pphY+d7x1qV8IZupYfeIfzNA+nsaWHbn5uPuQRvdRFsa9zFzGeudPuoGoZ1Op4jrJXIQ==" + }, + "node_modules/vscode-jsonrpc": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", + "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", "engines": { - "node": ">=18.16.0" + "node": ">=14.0.0" + } + }, + "node_modules/vscode-languageserver": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", + "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", + "dependencies": { + "vscode-languageserver-protocol": "3.17.5" }, - "peerDependencies": { - "@vuepress/client": "2.0.0-rc.0", - "vue": "^3.3.4" + "bin": { + "installServerIntoExtension": "bin/installServerIntoExtension" + } + }, + "node_modules/vscode-languageserver-protocol": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", + "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", + "dependencies": { + "vscode-jsonrpc": "8.2.0", + "vscode-languageserver-types": "3.17.5" + } + }, + "node_modules/vscode-languageserver-textdocument": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.11.tgz", + "integrity": "sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==" + }, + "node_modules/vscode-languageserver-types": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", + "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==" + }, + "node_modules/vscode-nls": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-5.2.0.tgz", + "integrity": "sha512-RAaHx7B14ZU04EU31pT+rKz2/zSl7xMsfIZuo8pd+KZO6PXtQmpevpq3vxvWNcrGbdmhM/rr5Uw5Mz+NBfhVng==" + }, + "node_modules/vscode-uri": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", + "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==" + }, + "node_modules/web-namespaces": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz", + "integrity": "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, "node_modules/which": { "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/which/-/which-2.0.2.tgz", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, "dependencies": { "isexe": "^2.0.0" }, @@ -4063,37 +8358,215 @@ "node": ">= 8" } }, + "node_modules/which-pm": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/which-pm/-/which-pm-2.1.1.tgz", + "integrity": "sha512-xzzxNw2wMaoCWXiGE8IJ9wuPMU+EYhFksjHxrRT8kMT5SnocBPRg69YAMtyV4D12fP582RA+k3P8H9J5EMdIxQ==", + "dependencies": { + "load-yaml-file": "^0.2.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8.15" + } + }, + "node_modules/which-pm-runs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.1.0.tgz", + "integrity": "sha512-n1brCuqClxfFfq/Rb0ICg9giSZqCS+pLtccdag6C2HyufBrh3fBOiy9nb6ggRMvWOVH5GrdJskj5iGTZNxd7SA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/widest-line": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", + "integrity": "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==", + "dependencies": { + "string-width": "^5.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/widest-line/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, + "node_modules/widest-line/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "node_modules/xml-js": { - "version": "1.6.11", - "resolved": "https://registry.npmmirror.com/xml-js/-/xml-js-1.6.11.tgz", - "integrity": "sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==", - "dev": true, + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dependencies": { - "sax": "^1.2.4" + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" }, - "bin": { - "xml-js": "bin/cli.js" + "engines": { + "node": ">=12" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/yaml": { - "version": "2.3.4", - "resolved": "https://registry.npmmirror.com/yaml/-/yaml-2.3.4.tgz", - "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==", - "dev": true, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yocto-queue": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", + "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", "engines": { - "node": ">= 14" + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zod": { + "version": "3.22.4", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", + "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/zwitch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", + "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } } } diff --git a/package.json b/package.json old mode 100755 new mode 100644 index 38d3fdea3a4..71b811f0452 --- a/package.json +++ b/package.json @@ -1,35 +1,37 @@ { "name": "nushell.github.io", + "type": "module", "version": "0.0.0", "description": "The Nushell website (nushell.sh)", "repository": "github:nushell/nushell.github.io", - "type": "module", - "scripts": { - "update": "nu make_docs.nu", - "dev": "vuepress dev", - "build": "vuepress build", - "postinstall": "patch-package", - "prepare": "git config --unset core.hooksPath && rm -rf .husky || true; npx lefthook install", - "pretty": "prettier --write ." - }, "license": "MIT", - "devDependencies": { - "@vuepress/plugin-back-to-top": "2.0.0-rc.0", - "@vuepress/plugin-docsearch": "2.0.0-rc.0", - "@vuepress/plugin-git": "2.0.0-rc.0", - "@vuepress/plugin-medium-zoom": "2.0.0-rc.0", - "@vuepress/plugin-shiki": "^2.0.0-rc.0", - "@vuepress/theme-default": "2.0.0-rc.0", - "lefthook": "^1.6.1", - "patch-package": "^8.0.0", - "prettier": "^3.2.4", - "shiki": "^1.0.0-beta.2", - "vuepress": "2.0.0-rc.0", - "vuepress-plugin-feed2": "2.0.0-rc.10", - "vuepress-plugin-sitemap2": "2.0.0-rc.10" - }, "engines": { "npm": ">=9.0.0", "node": ">=18.12.0" + }, + "scripts": { + "dev": "astro dev", + "start": "astro dev", + "build": "astro check && astro build", + "preview": "astro preview", + "astro": "astro", + "format": "prettier -w . --plugin=prettier-plugin-astro && biome format --write .", + "lint": "biome lint . && astro check", + "lint:fix": "biome lint --apply .", + "check-format": "prettier --check . && biome check .", + "check-format:fix": "biome check --apply .", + "precommit": "pnpm run check-format && pnpm run lint" + }, + "dependencies": { + "@astrojs/check": "^0.5.0", + "@astrojs/starlight": "^0.17.3", + "astro": "^4.3.4", + "sharp": "^0.32.5", + "typescript": "^5.3.3" + }, + "devDependencies": { + "@biomejs/biome": "1.5.3", + "prettier": "^3.2.5", + "prettier-plugin-astro": "^0.13.0" } } diff --git a/pt-BR/README.md b/pt-BR/README.md deleted file mode 100755 index 9554c0e4522..00000000000 --- a/pt-BR/README.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -home: true -heroImage: null -heroText: Nushell -tagline: Um novo tipo de shell. -actionText: Começar → -actionLink: /pt-BR/book/ -features: - - title: Controle seu sistema com pipelines poderosos - details: Pipelines permitem que você comande seu sistema como nunca antes. Seu sistema pertence a você, e ele aguarda seu comando. - - title: Tudo é dado - details: Em vez de ter que lembrar todos os parâmetros de todos os comandos, nós podemos usar apenas os mesmos, independentemente de onde ele veio. - - title: Plugins Poderosos - details: Nu pode não vir com tudo que você possa querer fazer com ele. Por isso, você pode extendê-lo com seu poderoso sistema de plugins. -footer: Se você tem sugestões ou deseja mudar algo, por favor nos dê feedback ---- - -### Instalação Rápida - -#### Instalar a Última Versão - -Instale a última versão a partir da [página de _releases_](https://github.com/nushell/nushell/releases). - -Alternativamente, você pode instalar a partir do código fonte com o [crates.io](https://crates.io): - -```sh -$ cargo install nu -``` - -#### Instale com Gerenciador de Pacotes - -Com [Homebrew](https://brew.sh/): - -```sh -$ brew install nushell -``` - -Com [Scoop](https://scoop.sh): - -```powershell -$ scoop install nu -``` - -#### Inicializar o shell - -``` -$ nu -``` diff --git a/pt-BR/book/README.md b/pt-BR/book/README.md deleted file mode 100644 index 36ae32528f2..00000000000 --- a/pt-BR/book/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Índice - -- [Instalação](instalacao.md) - Instalando o nushell -- [Introdução](introducao.md) - Começando a usar o nushell -- [Explorando](explorando.md) - Explorando o nushell -- [Tipos de dados](tipos_de_dados.md) - Tipos de dados no nushell -- [Carregando dados](carregando_dados.md) - Carregando e usando dados -- [Trabalhando com tabelas](trabalhando_com_tabelas.md) - Trabalhando com as tabelas do nushell -- [Pipeline](pipeline.md) - Como o pipeline funciona -- [Metadados](metadados.md) - Uma explicação sobre o sistema de metadados do nushell -- [Shells](shells_em_shells.md) - Trabalhando com múltiplos locais -- [Escapando comandos](escapando.md) - Escapando para comandos nativos com o mesmo nome -- [Plugins](plugins.md) - Melhorando o nushell com mais funcionalidades usando plugins -- [Command Reference](command_reference.md) - A list of all Nushell's commands. diff --git a/pt-BR/book/carregando_dados.md b/pt-BR/book/carregando_dados.md deleted file mode 100644 index 620867e6935..00000000000 --- a/pt-BR/book/carregando_dados.md +++ /dev/null @@ -1,197 +0,0 @@ -# Carregando dados - -Anteriormente vimos como você pode usar comandos como `ls`, `ps`, `date` e `sys` para carregar informações sobre seus arquivos, processos, data e hora e sobre o sistema em si. Cada comando retorna uma tabela de informações que podemos explorar. Há outras maneiras de se carregar uma tabela de dados com a qual trabalhar. - -## Abrindo arquivos - -Uma das funcionalidades mais poderosas do Nu para lidar com dados é o comando `open`. Ele é uma ferramenta múltipla, capaz de trabalhar com diversos formatos de dados. Para vermos o que isso significa, vamos tentar abrir um arquivo json: - -```nu -> open editors/vscode/package.json -------+----------+----------+---------+---------+----------+----------+----------+----------+----------+----------+----------+----------+----------+---------- - name | descript | author | license | version | reposito | publishe | categori | keywords | engines | activati | main | contribu | scripts | devDepen - | ion | | | | ry | r | es | | | onEvents | | tes | | dencies -------+----------+----------+---------+---------+----------+----------+----------+----------+----------+----------+----------+----------+----------+---------- - lark | Lark | Lark | MIT | 1.0.0 | [object] | vscode | [0 | [1 item] | [object] | [1 item] | ./out/ex | [object] | [object] | [object] - | support | develope | | | | | items] | | | | tension | | | - | for VS | rs | | | | | | | | | | | | - | Code | | | | | | | | | | | | | -------+----------+----------+---------+---------+----------+----------+----------+----------+----------+----------+----------+----------+----------+---------- -``` - -De um jeito similar ao comando `ls`, abrir um tipo de arquivo que o Nu entende vai nos retornar algo que é mais do que apenas texto (ou um fluxo de bytes). Aqui nós abrimos um arquivo "package.json" de um projeto JavaScript. O Nu abre e reconhece o texto JSON e retorna uma tabela de dados. - -Se quisermos checar a versão do projeto que estamos olhando, podemos usar o comando `get`. - -```nu -> open editors/vscode/package.json | get version -1.0.0 -``` - -O Nu atualmente suporta carregar dados diretamente para tabelas a partir dos seguintes formatos: - -- json -- yaml -- toml -- xml -- csv -- ini - -Mas o que acontece se você carregar um arquivo texto cujo formato não é um desses? Vamos tentar: - -```nu -> open README.md -``` - -O conteúdo do arquivo é mostrado. Se o arquivo for muito grande, obteremos uma visão rolável para examinar o arquivo e depois voltar para o terminal. Para ajudar na legibilidade, Nu faz realce de sintaxe para formatos comuns como arquivos de código fonte, markdown e outros. - -Por baixo dos panos, o que o Nu enxerga nesses arquivos texto é uma grande string. A seguir, vamos falar sobre como trabalhar com essas strings para obter os dados que precisamos delas. - -## Trabalhando com strings - -Uma parte importante de se trabalhar com dados vindos de fora do Nu é que eles nem sempre vêm num formato que o Nu entende. Com frequência, esses dados são passados como uma string. - -Vamos imaginar que obtivemos esse arquivo de dados: - -```nu -> open people.txt -Octavia | Butler | Writer -Bob | Ross | Painter -Antonio | Vivaldi | Composer -``` - -Cada pedacinho de dado que queremos está separado pelo símbolo de pipe ('|') e cada pessoa está numa linha em separado. Nu não possui por padrão um formato de arquivos delimitados por pipe, então teremos que interpretá-lo nós mesmos. - -A primeira coisa que queremos fazer ao carregar o arquivo é trabalhar com ele linha a linha: - -```nu -> open people.txt | lines ----+------------------------------ - # | value ----+------------------------------ - 0 | Octavia | Butler | Writer - 1 | Bob | Ross | Painter - 2 | Antonio | Vivaldi | Composer ----+------------------------------ -``` - -Podemos notar que estamos lidando com linhas porque voltamos a ver uma lista. Nosso próximo passo é tentar dividir as linhas em algo um pouco mais útil. Para isso, vamos usar o comando `split column`. Como o nome implica, esse comando nos dá uma forma de dividir em colunas uma string delimitada. Informamos qual é o delimitador e o comando faz o resto: - -```nu -> open people.txt | lines | split column "|" ----+----------+-----------+----------- - # | Column1 | Column2 | Column3 ----+----------+-----------+----------- - 0 | Octavia | Butler | Writer - 1 | Bob | Ross | Painter - 2 | Antonio | Vivaldi | Composer ----+----------+-----------+----------- -``` - -Está quase certo. Parece que tem um espaço extra ali. Vamos mudar nosso delimitador: - -```nu -> open people.txt | lines | split column " | " ----+---------+---------+---------- - # | Column1 | Column2 | Column3 ----+---------+---------+---------- - 0 | Octavia | Butler | Writer - 1 | Bob | Ross | Painter - 2 | Antonio | Vivaldi | Composer ----+---------+---------+---------- -``` - -Nada mal. O comando `split column` retorna dados que podemos usar. Ele também vai além e nos dá nomes de coluna padrão: - -```nu -> open people.txt | lines | split column " | " | get Column1 ----+--------- - # | value ----+--------- - 0 | Octavia - 1 | Bob - 2 | Antonio ----+--------- -``` - -Podemos também nomear nossas colunas ao invés de usar os nomes padrão: - -```nu -> open people.txt | lines | split column " | " first_name last_name job ----+------------+-----------+---------- - # | first_name | last_name | job ----+------------+-----------+---------- - 0 | Octavia | Butler | Writer - 1 | Bob | Ross | Painter - 2 | Antonio | Vivaldi | Composer ----+------------+-----------+---------- -``` - -Agora que nossos dados estão em uma tabela, podemos usar todos os comandos que já usávamos antes em tabelas: - -```nu -> open people.txt | lines | split column " | " first_name last_name job | sort-by first_name ----+------------+-----------+---------- - # | first_name | last_name | job ----+------------+-----------+---------- - 0 | Antonio | Vivaldi | Composer - 1 | Bob | Ross | Painter - 2 | Octavia | Butler | Writer ----+------------+-----------+---------- -``` - -Há outros comandos que você pode usar para trabalhar com strings: - -- str -- lines -- size - -Há também um conjunto de comandos auxiliares que podemos chamar se soubermos que os dados têm uma estrutura que o Nu deve ser capaz de entender. Por exemplo, vamos abrir um arquivo de lock do Rust: - -```nu -> open Cargo.lock -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -[[package]] -name = "adhoc_derive" -version = "0.1.2" -``` - -O arquivo "Cargo.lock" é na verdade um arquivo .toml, mas a extensão do arquivo não é .toml. Tudo bem, podemos usar o comando `from toml`: - -```nu -> open Cargo.lock | from toml -----------+------------- - metadata | package -----------+------------- - [object] | [405 items] -----------+------------- -``` - -Há um comando `from` para cada formato de dados estruturados em texto que o Nu entende e pode abrir. - -## Abrindo no modo bruto - -Embora seja útil poder abrir um arquivo e trabalhar imediatamente com uma tabela dos seus dados, nem sempre é isso o que queremos fazer. Para ter acesso ao texto subjacente, o comando `open` pode receber um modificador opcional `--raw`: - -```nu -> open Cargo.toml --raw -[package] name = "nu" -version = "0.1.3" -authors = ["Yehuda Katz ", "Jonathan Turner "] -description = "A shell for the GitHub era" -license = "MIT" -``` - -## Abrindo URLs - -Além de carregar dados a partir do sistema de arquivos, você também pode passar uma URL para o comando `open`. Ele trará da internet o conteúdo dessa URL e o retornará para você: - -```nu -> open https://www.jonathanturner.org/feed.xml ----------- - rss ----------- - [1 item] ----------- -``` diff --git a/pt-BR/book/command_reference.md b/pt-BR/book/command_reference.md deleted file mode 100644 index 939e5b25d55..00000000000 --- a/pt-BR/book/command_reference.md +++ /dev/null @@ -1,25 +0,0 @@ -# Command Reference - - - - - - - - - - - - -
CommandDescription
{{ command.title }}{{ command.frontmatter.usage }}
diff --git a/pt-BR/book/escapando.md b/pt-BR/book/escapando.md deleted file mode 100644 index ec3f44d4752..00000000000 --- a/pt-BR/book/escapando.md +++ /dev/null @@ -1,15 +0,0 @@ -# Escapando para o sistema - -O Nu fornece um conjunto de comandos que você pode usar entre diferentes SOs e contar com essa consistência é útil. Às vezes, porém, você quer executar comando que tem o mesmo nome que um dos comandos do Nu. Para executar os comandos locais `ls` ou `date`, por exemplo, use o comando circunflexo (^). - -Comando Nu: - -```nu -> ls -``` - -Escapando para o comando local: - -```nu -> ^ls -``` diff --git a/pt-BR/book/explorando.md b/pt-BR/book/explorando.md deleted file mode 100644 index a4e23160bd6..00000000000 --- a/pt-BR/book/explorando.md +++ /dev/null @@ -1,78 +0,0 @@ -# Explorando seu sistema - -Shells mais antigos permitem que você navegue pelo sistema de arquivos e execute comandos. Shells modernos como o Nu permitem que você faça o mesmo. Vamos dar uma olhada em alguns dos comandos comuns que você vai usar quando estiver interagindo com seu sistema. - -## Visualizando o conteúdo de directórios - -@[code](@snippets/moving_around/ls_example.sh) - -Como vimos em outros capítulos, `ls` é um comando para visualizar o conteúdo de um caminho. Nu retorna o conteúdo como uma tabela que podemos usar adiante. - -O comando `ls` também recebe um parâmetro opcional para mudar o que você gostaria de ver. Por exemplo, podemos listar os arquivos cujo nome termina em ".txt". - -```nu -> ls *.txt ----+--------------+------+----------+---------+--------------+-------------- - # | name | type | readonly | size | accessed | modified ----+--------------+------+----------+---------+--------------+-------------- - 0 | history.txt | File | | 1.3 KB | 2 months ago | a day ago - 1 | readonly.txt | File | readonly | | 2 months ago | 2 months ago ----+--------------+------+----------+---------+--------------+-------------- -``` - -O asterisco (\*) usado no parâmetro opcional acima "\*.txt" é chamado de coringa. Ele faz uma correspondência com qualquer coisa. Você pode ler o coringa "\*.txt" como "aceite qualquer nome de arquivo, desde que termine com '.txt'". - -Nu também usa coringas modernos, que permitem acesso a diretórios mais profundos. - -```nu -> ls **/*.rs ------+-----------------------------------------------------+------+----------+----------+----------------+---------------- - # | name | type | readonly | size | accessed | modified ------+-----------------------------------------------------+------+----------+----------+----------------+---------------- - 0 | src/cli.rs | File | | 19.1 KB | 15 hours ago | 15 hours ago - 1 | src/commands/args.rs | File | | 244 B | 2 months ago | 2 months ago - 2 | src/commands/autoview.rs | File | | 2.5 KB | 15 hours ago | 15 hours ago - 3 | src/commands/cd.rs | File | | 277 B | a week ago | a week ago - 4 | src/commands/classified.rs | File | | 13.5 KB | 15 hours ago | 15 hours ago - 5 | src/commands/clip.rs | File | | 2.0 KB | 2 days ago | 2 days ago -``` - -Aqui estamos procurando qualquer arquivo cujo nome termine com ".rs" e os dois asteriscos dizem ainda "em qualquer diretório começando a partir daqui". - -## Mudando o diretório atual - -```nu -> cd new_directory -``` - -Para mudar do diretório atual para um outro, usamos o comando `cd`. Assim como em outros shells, podemos usar o nome do diretório ou, se quisermos ir para um diretório acima, podemos usar o atalho `..`. - -## Comandos de sistema de arquivo - -Nu também fornece alguns comandos básicos de sistemas de arquivos que funcionam entre plataformas diferentes. - -Podemos mover um item de um lugar para outro usando o comando `mv`. - -```nu -> mv item location -``` - -Podemos copiar um item de um local para outro: - -```nu -> cp item location -``` - -Podemos remover um item: - -```nu -> rm item -``` - -Os três comandos também podem usar os coringas que vimos anteriormente com `ls`. - -Por fim, podemos criar um novo diretório usando o comando `mkdir`: - -```nu -> mkdir new_directory -``` diff --git a/pt-BR/book/instalacao.md b/pt-BR/book/instalacao.md deleted file mode 100644 index f0ec874053b..00000000000 --- a/pt-BR/book/instalacao.md +++ /dev/null @@ -1,153 +0,0 @@ -# Instalando Nu - -Atualmente, as melhores maneiras de instalar o Nu são a partir do [crates.io](https://crates.io), fazer o download dos binários da nossa [página de releases](https://github.com/nushell/nushell/releases), fazer o build a partir dos fontes ou baixar um container pronto com o Docker. - -## Binários - -Você pode baixar o Nu da [página de releases](https://github.com/nushell/nushell/releases). Alternativamente, se você usa o [Homebrew](https://brew.sh/) para macOS, pode instalar o binário executando o comando `brew install nushell`. - -## Preparando - -Antes de instalar o Nu, precisamos nos certificar de que nosso sistema tem os requisitos necessários. Atualmente, isso significa ter certeza de que temos tanto o conjunto de ferramentas do Rust como as dependências locais instaladas. - -### Instalando o Rust - -Se ainda não tivermos o Rust instalado no sistema, a melhor maneira de instalar é via [rustup](https://rustup.rs/). Rustup é uma maneira de gerenciar instalações, inclusive de versões diferentes de Rust. - -O Nu atualmente requer a versão **nightly** do Rust. Quando você abrir o "rustup" pela primeira vez, ele vai perguntar qual versão do Rust você quer instalar: - -```nu -Current installation options: - - default host triple: x86_64-unknown-linux-gnu - default toolchain: stable - modify PATH variable: yes - -1) Proceed with installation (default) -2) Customize installation -3) Cancel installation -``` - -Selecione a opção #2 para customizar a instalação. - -```nu -Default host triple? -``` - -Aperte enter aqui para selecionar o default. - -```nu -Default toolchain? (stable/beta/nightly/none) -``` - -Certifique-se de digitar "nightly" aqui e pressionar enter. Isso vai levar à configuração seguinte: - -```nu -Modify PATH variable? (y/n) -``` - -Você pode opcionalmente atualizar o seu _path_. Normalmente é uma boa ideia, pois torna os passos seguintes mais fáceis. - -```nu -Current installation options: - - default host triple: x86_64-unknown-linux-gnu - default toolchain: nightly - modify PATH variable: yes - -1) Proceed with installation (default) -2) Customize installation -3) Cancel installation -``` - -Você pode ver que o toolchain agora mudou para a versão nightly. Se isso parece um pouco arriscado, não se preocupe. O compilador do Rust passa por uma bateria completa de testes. O compilador nightly é praticamente tão confiável quanto a versão estável. - -Quando estiver pronto, pressione 1 e enter. Depois desse ponto, podemos seguir as instruções que o "rustup" nos der e teremos um compilador Rust funcionando no nosso sistema. - -Se você preferir não instalar o Rust via "rustup", você pode também instalar por outros métodos (por exemplo, a partir de um pacote em uma distribuição Linux). Apenas se certifique de instalar uma versão nightly recente. - -## Dependências - -### Debian/Ubuntu - -Você vai precisar instalar os pacotes "pkg-config" e "libssl-dev": - -```bash -apt install pkg-config libssl-dev -``` - -Usuários Linux que quiserem usar as funcionalidades opcionais `rawkey` ou `clipboard` precisarão instalar os pacotes "libx11-dev" and "libxcb-composite0-dev": - -```bash -apt install libxcb-composite0-dev libx11-dev -``` - -### macOS - -Ao usar o [Homebrew](https://brew.sh/), você precisará instalar o "openssl" e o "cmake" usando: - -```bash -brew install openssl cmake -``` - -## Instalando a partir do [crates.io](https://crates.io) - -Quando tivermos todas as dependências de que o Nu precisa, podemos instalá-lo usando o comando `cargo`, que vem junto com o compilador Rust. - -```nu -> cargo install nu -``` - -Pronto! A ferramenta cargo fará o download do Nu e das dependências do fonte, o build e a instalação no caminho bin do cargo, de forma que possamos rodá-lo. - -Se quiser instalar todas as funcionalidades, inclusive algumas opcionais divertidas, você pode usar: - -```nu -> cargo install nu --features=stable -``` - -Para esse comando funcionar, certifique-se de ter todas as dependências (mostradas acima) instaladas no seu sistema. - -Uma vez instalado, podemos rodar o Nu usando o comando `nu`: - -```bash -$ nu -/home/jonathan/Source> -``` - -## Fazendo o Build a partir dos fontes - -Também podemos fazer o build do código fonte diretamente do GitHub. Isso nos dá acesso imediato às últimas funcionalidades e correções do Nu. - -```nu -> git clone https://github.com/nushell/nushell.git -``` - -O Git vai clonar o repositório principal do nushell e daí podemos fazer o build e rodar o Nu: - -```bash -> cd nushell -nushell> cargo build --workspace --features=stable; cargo run --features=stable -``` - -Você também pode fazer o build e rodar o Nu em modo release: - -```nu -nushell> cargo build --release --workspace --features=stable; cargo run --release --features=stable -``` - -Pessoas mais acostumadas com Rust podem se perguntar por que fazemos tanto o "build" como o "run" se o "run" já faz o build por padrão. Isso serve para contornar uma falha da nova opção `default-run` no Cargo e assegurar que será feito o build de todos os plugins, embora possa não ser necessário no futuro. - -## Configurando como login shell - -**!!! Nushell ainda está em desenvovlimento e pode não estar estável para uso diário. !!!** - -Você pode definir o seu login shell usando o comando [`chsh`](https://linux.die.net/man/1/chsh). - -Algumas distribuições Linux possuem uma lista de shells válidos em `/etc/shells` e não permitirão modificar o shell até que o Nu esteja nessa lista branca. Você pode ver um erro similar ao mostrado abaixo se não tiver atualizado seu arquivo `shells`. - -```bash -chsh: /home/username/.cargo/bin/nu is an invalid shell -``` - -Você pode adicionar o Nu à lista de shell permitidos acrescentando o binário do Nu ao arquivo `shells`. O caminho a ser adicionado pode ser encontrado com o comando `which nu` e geralmente é `$HOME/.cargo/bin/nu`. diff --git a/pt-BR/book/introducao.md b/pt-BR/book/introducao.md deleted file mode 100644 index d3bab60e393..00000000000 --- a/pt-BR/book/introducao.md +++ /dev/null @@ -1,168 +0,0 @@ -# Introdução - -Olá! Seja bem vindo ao projeto Nushell. O objetivo desse projeto é trazer a filosofia de shells do Unix, onde pipes conectam comandos simples, para o estilo moderno de desenvolvimento. - -Nu usa dicas de vários terrenos familiares: shells tradicionais como bash, shells avançados como PowerShell, programação funcional, programação de sistemas, e outros. Porém, mais do que tentar ser "pau pra toda obra", Nu foca sua energia em fazer poucas coisas muito bem: - -- Criar um shell multiplataforma flexível para o programador moderno da era GitHub -- Permitir que você combine aplicações de linha de comando com um shell que entende a estrutura dos seus dados -- Ter o mesmo nível de polimento de UX (experência do usuário) fornecido pelas aplicações CLI modernas - -O jeito mais fácil de ver o que o Nu pode fazer é começar com alguns exemplos, então vamos nessa. - -A primeira coisa que você vai perceber quando rodar um comando como `ls` é que ao invés de um bloco de texto, você recebe de volta uma tabela estruturada. - -```nu -> ls -----+------------------+-----------+----------+----------+----------------+---------------- - # | name | type | readonly | size | accessed | modified -----+------------------+-----------+----------+----------+----------------+---------------- - 0 | .azure | Directory | | 4.1 KB | 2 months ago | a week ago - 1 | IMG_1291.jpg | File | | 115.5 KB | a month ago | 4 months ago - 2 | Cargo.toml | File | | 3.1 KB | 17 minutes ago | 17 minutes ago - 3 | LICENSE | File | | 1.1 KB | 2 months ago | 2 months ago - 4 | readonly.txt | File | readonly | | a month ago | a month ago - 5 | target | Directory | | 4.1 KB | 2 days ago | 15 minutes ago -... -``` - -Essa tabela faz mais do que somente mostrar o diretório de um jeito diferente. Assim como uma planilha, ela nos permite trabalhar com os dados interativamente. - -A primeira coisa que vamos fazer é ordenar a tabela por nome. Para isso, vamos direcionar a saída do `ls` para um comando capaz de ordenar tabelas com base no conteúdo de uma coluna. - -```nu -> ls | sort-by name -----+------------------+-----------+----------+----------+----------------+---------------- - # | name | type | readonly | size | accessed | modified -----+------------------+-----------+----------+----------+----------------+---------------- - 0 | .azure | Directory | | 4.1 KB | 2 months ago | a week ago - 1 | .cargo | Directory | | 4.1 KB | 2 months ago | 2 months ago - 2 | .editorconfig | File | | 148 B | 2 months ago | 2 months ago - 3 | .git | Directory | | 4.1 KB | 2 months ago | 20 minutes ago - 4 | .gitignore | File | | 58 B | a week ago | a week ago - 5 | .vscode | Directory | | 4.1 KB | a month ago | a month ago -... -``` - -Você pode ver que, para fazer isso funcionar, não passamos parâmetros de linha de comando para o `ls`. Ao invés disso, usamos o comando `sort-by`, fornecido pelo Nu, para ordenar a saída do comando `ls`. - -O Nu fornece muitos comandos que trabalham com tabelas. Por exemplo, podemos filtrar o conteúdo da tabela do `ls` para que ela mostre apenas os arquivos com mais de 4 kilobytes: - -```nu -> ls | where size > 4kb -----+----------------+------+----------+----------+----------------+---------------- - # | name | type | readonly | size | accessed | modified -----+----------------+------+----------+----------+----------------+---------------- - 0 | IMG_1291.jpg | File | | 115.5 KB | a month ago | 4 months ago - 1 | README.md | File | | 11.1 KB | 2 days ago | 2 days ago - 2 | IMG_1291.png | File | | 589.0 KB | a month ago | a month ago - 3 | IMG_1381.jpg | File | | 81.0 KB | a month ago | 4 months ago - 4 | butterfly.jpeg | File | | 4.2 KB | a month ago | a month ago - 5 | Cargo.lock | File | | 199.6 KB | 22 minutes ago | 22 minutes ago -``` - -Assim como na filosofia Unix, fazer os comandos conversarem uns com os outros nos permite combiná-los de muitas maneiras diferentes. Vamos ver outro comando: - -```nu -> ps ------+-------+----------+------+-------------------------------------------------------------------------------- - # | pid | status | cpu | name ------+-------+----------+------+-------------------------------------------------------------------------------- - 0 | 1003 | Unknown | 0.00 | - 1 | 1515 | Sleeping | 0.00 | /usr/lib/gnome-settings-daemon/gsd-screensaver-proxy - 2 | 2128 | Sleeping | 0.00 | /usr/lib/gnome-settings-daemon/gsd-screensaver-proxy - 3 | 2285 | Unknown | 0.00 | - 4 | 8872 | Sleeping | 0.00 | /usr/lib/gvfs/gvfsd-dnssd--spawner:1.23/org/gtk/gvfs/exec_spaw/4 - 5 | 1594 | Sleeping | 0.00 | /usr/lib/ibus/ibus-engine-simple -``` - -Você deve conhecer o comando `ps` se já usou Linux. Com ele, vemos uma lista com todos os processos que o sistema está rodando atualmente, seus estados e seus nomes. Também podemos ver a carga de CPU para cada processo. - -E se quiséssemos mostrar somente os processos que estão usando a CPU de fato? Exatamente como fizemos com o comando `ls` anteriormente, podemos também manipular a tabela que o comando `ps` nos retorna: - -```nu -> ps | where cpu > 10 ----+-------+----------+-------+----------------------------- - # | pid | status | cpu | name ----+-------+----------+-------+----------------------------- - 0 | 1992 | Sleeping | 44.52 | /usr/bin/gnome-shell - 1 | 1069 | Sleeping | 16.15 | - 2 | 24116 | Sleeping | 13.70 | /opt/google/chrome/chrome - 3 | 21976 | Sleeping | 12.67 | /usr/share/discord/Discord -``` - -Até agora vimos como usar `ls` e `ps` para listar arquivos e processos. O Nu também oferece outros comandos que podem criar tabelas com informações úteis. A seguir vamos explorar `date` e `sys`. - -Ao executar `date` obtemos informações sobre a data e hora correntes: - -```nu -> date -------+-------+-----+------+--------+--------+---------- - year | month | day | hour | minute | second | timezone -------+-------+-----+------+--------+--------+---------- - 2019 | 8 | 17 | 19 | 20 | 50 | +12:00 -------+-------+-----+------+--------+--------+---------- -``` - -E ao executar `sys` obtemos informações sobre o sistema em que o Nu está rodando: - -```nu -> sys -----------+----------+-----------+----------+-----------+----------- - host | cpu | disks | mem | temp | net -----------+----------+-----------+----------+-----------+----------- - [object] | [object] | [3 items] | [object] | [3 items] | [3 items] -----------+----------+-----------+----------+-----------+----------- -``` - -Essa tabela é um pouco diferente das que vimos antes. O comando `sys` retorna uma tabela que contém tabelas estruturadas em suas células, ao invés de valores simples. Para dar uma olhada nesses dados, precisamos selecionar a coluna que queremos ver: - -```nu -> sys | get host --------+------------------+----------+--------+----------+---------- - name | release | hostname | arch | uptime | users --------+------------------+----------+--------+----------+---------- - Linux | 5.0.0-21-generic | pop-os | x86_64 | [object] | [1 item] --------+------------------+----------+--------+----------+---------- -``` - -O comando `get` permite que tenhamos acesso ao conteúdo de uma coluna da tabela. Aqui, estamos olhando para dentro da coluna `host`, que contém informações a respeito da máquina host em que o Nu está rodando, como nome do SO (sistema operacional), o nome de host, a CPU e outros dados mais. Vamos ver os nomes dos usuários do sistema: - -```nu -> sys | get host.users -jonathan -``` - -Nesse momento só tem um único usuário no sistema, chamado "jonathan". Note que nós podemos passar um caminho e não apenas o nome de uma coluna. O Nu vai seguir esse caminho até o dado correspondente na tabela. - -Talvez você tenha notado mais alguma coisa de diferente. Ao invés de uma tabela, recebemos apenas um elemento simples: a string "jonathan". O Nu trabalha tanto com tabelas de dados como com strings, que são uma parte importante da interação com comandos externos ao Nu. - -Vejamos como as strings funcionam fora do Nu. Vamos usar nosso exemplo anterior e executar o comando externo `echo`, presente na maioria dos SOs: - -```nu -> sys | get host.users | echo $it -jonathan -``` - -Se isso lhe parece bastante similar ao que tínhamos anteriormente, você tem um olho afiado! É similar, mas com uma diferença importante: chamamos `echo` com o valor retornado antes. Isso permite que passemos dados para o `echo` fora do Nu (ou para qualquer outro comando de fora do Nu, como `git`, por exemplo). - -_Nota: você pode obter um texto de ajuda para quaisquer comandos embutidos do Nu usando o comando `help`_: - -```nu -> help config -Configuration management. -Usage: - > config {flags} - -Subcommands: - config get - - config set - - config set_into - - config clear - - config load - - config remove - - config path - - -Flags: - -h, --help: Display this help message -``` diff --git a/pt-BR/book/line_editor.md b/pt-BR/book/line_editor.md deleted file mode 100644 index 7ae31058edf..00000000000 --- a/pt-BR/book/line_editor.md +++ /dev/null @@ -1,672 +0,0 @@ -# Reedline, o editor de linha do Nu - -O editor de linha Reedline do Nushell é um leitor de linha multiplataforma projetado para ser modular e flexível. O motor é responsável por controlar o histórico de comandos, validações, preenchimentos, dicas e pintura da tela. - -## Configuração -### Modo de edição - -Reedline permite você editar o texto usando dois modos: vi e emacs. Se não especificado, o modo padrão é o modo emacs. No intuito de selecionar o seu favorito, você precisa modificar o arquivo config e escrever nele seu modo favorito. - -Por exemplo: -```nu -$env.config = { - ... - edit_mode: emacs - ... - } -``` -### Padrão da combinação de teclas - -Cada modo de edição vem com teclas de atalho usuais para edição de texto no vi e emacs. - -### Combinação de teclas para Emacs e Vi -| Tecla | Evento | -|---------------|------------------------------| -| Esc | Esc | -| Backspace | Backspace | -| End | Mover para o final da linha | -| End | Completar dica de histórico | -| Home | Mover para o início da linha | -| Ctrl + c | Cancelar linha atual | -| Ctrl + l | Limpar tela | -| Ctrl + r | Pesquisar histórico | -| Ctrl + Right | Completar palavra do histórico| -| Ctrl + Right | Mover palavra para a direita | -| Ctrl + Left | Mover palavra para a esquerda | -| Up | Mover menu para cima | -| Up | Mover para cima | -| Down | Mover menu para baixo | -| Down | Mover para baixo | -| Left | Mover menu para a esquerda | -| Left | Mover para a esquerda | -| Right | Completar dica de histórico | -| Right | Mover menu para a direita | -| Right | Mover para a direita | -| Ctrl + b | Mover menu para a esquerda | -| Ctrl + b | Mover para a esquerda | -| Ctrl + f | Completar dica de histórico | -| Ctrl + f | Mover menu para a direita | -| Ctrl + f | Mover para a direita | -| Ctrl + p | Mover menu para cima | -| Ctrl + p | Mover para cima | -| Ctrl + n | Mover menu para baixo | -| Ctrl + n | Mover para baixo | - -### Vi Bindings Normais -| Tecla | Evento | -|---------------|------------------------------| -| Ctrl + c | Cancelar linha atual | -| Ctrl + l | Limpar tela | -| Up | Mover menu para cima | -| Up | Mover para cima | -| Down | Mover menu para baixo | -| Down | Mover para baixo | -| Left | Mover menu para a esquerda | -| Left | Mover para a esquerda | -| Right | Mover menu para a direita | -| Right | Mover para a direita | - -Além das teclas de atalho anteriores, enquanto estiver no modo normal do Vi, você pode usar o modo clássico do Vi para executar ações selecionando um movimento ou uma ação. As opções disponíveis para as combinações são: - -### Vi Movimentos Normais -| Tecla | Movimento | -|-------|-------------------| -| w | Palavra | -| d | Fim da linha | -| 0 | Início da linha | -| $ | Fim da linha | -| f | Direita até char | -| t | Antes à direita char| -| F | À esquerda até char| -| T | Antes à esquerda char| - -### Vi Ações Normais -| Tecla | Ação | -|-------|---------------------| -| d | Deletar | -| p | Colar depois | -| P | Colar antes | -| h | Mover para a esquerda| -| l | Mover para a direita | -| j | Mover para baixo | -| k | Mover para cima | -| w | Mover palavra para a direita| -| b | Mover palavra para a esquerda| -| i | Entrar no modo de inserção Vi no caractere atual| -| a | Entrar no modo de inserção Vi após o caractere atual| -| 0 | Mover para o início da linha| -| ^ | Mover para o início da linha| -| $ | Mover para o final da linha| -| u | Desfazer | -| c | Mudar | -| x | Deletar caractere | -| s | Pesquisar histórico | -| D | Deletar até o final | -| A | Anexar ao final | - -## Histórico de comando -Conforme mencionado anteriormente, o Reedline gerencia e armazena todos os comandos que são editados e enviados para o Nushell. Para configurar o número máximo de registros que o Reedline deve armazenar, você precisará ajustar esse valor no seu arquivo de configuração: - -```nu - $env.config = { - ... - history: { - ... - max_size: 1000 - ... - } - ... - } -``` - -## Customizando o prompt - -O reedline prompt também é altamente customizável. Na ideia de construir o prompt perfeito, você pode definir as próximas variáveis de ambiente no seu arquivo config: - -``` nu -# Use nushell functions to define your right and left prompt -def create_left_prompt [] { - let path_segment = ($env.PWD) - - $path_segment -} - -def create_right_prompt [] { - let time_segment = ([ - (date now | format date '%m/%d/%Y %r') - ] | str join) - - $time_segment -} - -$env.PROMPT_COMMAND = { create_left_prompt } -$env.PROMPT_COMMAND_RIGHT = { create_right_prompt } -``` ->**DICA** -
Você não precisa definir as variáveis de ambiente usando funções do Nushell. Você pode usar strings simples para defini-las. - -Você também pode personalizar o indicador do prompt para o editor de linha modificando as seguintes variáveis de ambiente. - -```nu -$env.PROMPT_INDICATOR = "〉" -$env.PROMPT_INDICATOR_VI_INSERT = ": " -$env.PROMPT_INDICATOR_VI_NORMAL = "〉" -$env.PROMPT_MULTILINE_INDICATOR = "::: " -``` ->**DICA** -
Os indicadores de prompt são variáveis de ambiente que representam o estado do prompt. - -## Teclas de atalho -Teclas de atalho do Reedline são constructos poderosos que te permitem construir uma cadeia de eventos que pode ser desencadeada com uma específica combinação de teclas. - -Por exemplo, vamos dizer que você gostaria de mapear o menu de conclusão para a combinação de teclas `Ctrl + t` (o padrão é `tab`). Você pode adicionar a seguinte entrada ao seu arquivo de configuração. - -```nu -$env.config = { - ... - - keybindings: [ - { - name: completion_menu - modifier: control - keycode: char_t - mode: emacs - event: { send: menu name: completion_menu } - } - ] - - ... - } -``` -Após carregar esse novo config.nu, seu novo atalho (`Ctrl + t`) irá abrir o menu de conclusão. - -Cada atalho requer os seguintes elementos: - -- name: Nome único para seu atalho para fácil referência for easy reference in `$config.keybindings` -- modifier: Uma chave modificadora para o atalho. As opções são: - + none - + control - + alt - + shift - + shift_alt - + alt_shift - + control_alt - + alt_control - + control_shift - + shift_control - + control_alt_shift - + control_shift_alt -- keycode: Representa a tecla a ser apertada. -- mode: emacs, vi_insert, vi_normal (uma simples string ou lista. ex: [`vi_insert` `vi_normal`]) --event: O tipo de evento que vai ser associado pelo atalho. As opções são: - + send - + edit - + until - ->**DICA** -
Todas as opções disponíveis de modificadores, códigos de teclas e eventos podem ser encontradas com o comando `keybindings list`. - ->**DICA** -
As teclas de atalho adicionadas ao modo `vi_insert` estarão disponíveis quando o editor de linha estiver no modo de inserção (quando você pode escrever texto), e as teclas de atalho marcadas com `vi_normal` estarão disponíveis quando estiver no modo normal (quando o cursor se move usando h, j, k ou l). - -A seção de evento (event) da entrada de teclas é onde as ações a serem realizadas são definidas. Neste campo, você pode usar tanto um registro (record) quanto uma lista de registros. Algo como: - -```nu - ... - event: { send: Enter } - ... -``` -ou - -```nu - ... - event: [ - { edit: Clear } - { send: Enter } - ] - ... -``` -O primeiro exemplo de teclas de atalho mostrado nesta página segue o primeiro caso; um único evento é enviado para o mecanismo. - -A próxima tecla de atalho é um exemplo de uma série de eventos enviados para o mecanismo. Primeiro, ela limpa o prompt, insere uma string e, em seguida, entra com esse valor. -```nu - $env.config = { - ... - - keybindings: [ - { - name: change_dir_with_fzf - modifier: CONTROL - keycode: Char_t - mode: emacs - event:[ - { edit: Clear } - { edit: InsertString, - value: "cd (ls | where type == dir | each { |it| $it.name} | str join (char nl) | fzf | decode utf-8 | str trim)" - - } - { send: Enter } - ] - } - - ... - } -``` -Uma desvantagem da tecla de atalho anterior é o fato de que o texto inserido será processado pelo validador e salvo no histórico, tornando a tecla de atalho um pouco mais lenta e populando o histórico de comandos com o mesmo comando. Por esse motivo, existe o tipo de evento `executehostcommand`. O próximo exemplo faz o mesmo que o anterior, de uma maneira mais simples, enviando um único evento para o mecanismo. - -```nu - $env.config = { - ... - - keybindings: [ - { - name: change_dir_with_fzf - modifier: CONTROL - keycode: Char_y - mode: emacs - event: { - send: executehostcommand, - cmd: "cd (ls | where type == dir | each { |it| $it.name} | str join (char nl) | fzf | decode utf-8 | str trim)" - } - } - ] - - ... - } -``` -Antes de continuarmos, você deve ter percebido que a sintaxe muda para edições e envios, e por esse motivo é importante explicá-las um pouco mais. Um "send" é todo evento do Reedline que pode ser processado pelo mecanismo, e uma "edit" são todos os EditCommands que podem ser processados pelo mecanismo. - -### Tipo de envio -Para encontrar todas as opções disponíveis para o envio, você pode usar: -```nu -keybindings list | where type == events -``` -E a sintaxe para eventos de envio é a seguinte: -```nu - ... - event: { send: } - ... -``` ->**DICA** -
Você pode escrever o nome dos eventos em letras maiúsculas. O analisador de teclas de atalho é insensível a maiúsculas e minúsculas. - -Há duas exceções a essa regra: o Menu e o ExecuteHostCommand. Esses dois eventos exigem um campo extra para serem completos. O Menu precisa do nome do menu a ser ativado (completion_menu ou history_menu). - -```nu - ... - event: { - send: menu - name: completion_menu - } - ... -``` -E o ExecuteHostCommand requer um comando válido que será enviado para o mecanismo. - -```nu - ... - event: { - send: executehostcommand - cmd: "cd ~" - } - ... - -``` -Vale mencionar que na lista de eventos você também verá Edit([]), Multiple([]) e UntilFound([]). Essas opções não estão disponíveis para o analisador, pois são construídas com base na definição da tecla de atalho. Por exemplo, um evento Multiple([]) é construído para você ao definir uma lista de registros no evento da tecla de atalho. Um evento Edit([]) é o mesmo que o tipo de edição mencionado anteriormente. E o evento UntilFound([]) é o mesmo que o tipo until mencionado antes. - -### Tipo de edição - -O tipo `edit` é a simplificação do evento `Edit([])`. O tipo de evento simplifica a definição de eventos de edição complexos para as teclas de atalho. Para listar as opções disponíveis, você pode usar o seguinte comando: - -```nu -keybindings list | where type == edits -``` -A sintaxe usual para uma edição é a seguinte: - -```nu - ... - event: { edit: } - ... -``` -A sintaxe para as edições na lista que têm um `()` muda um pouco. Como essas edições exigem um valor extra para serem totalmente definidas. Por exemplo, se quisermos inserir uma string onde o prompt está localizado, então você terá que usar: - -```nu - ... - event: { - edit: insertstring - value: "MY NEW STRING" - } - ... -``` -Ou digamos que você queira mover para a direita até o primeiro "S": -```nu - ... - event: { - edit: moverightuntil - value: "S" - } - ... -``` -### Tipo Until -Para concluir esta explanação sobre teclas de atalho, precisamos discutir o tipo `until` para eventos. Como você viu até agora, você pode enviar um único evento ou uma lista de eventos. E, como vimos, quando uma lista de eventos é enviada, cada um deles é processado. - -No entanto, pode haver casos em que você deseja atribuir eventos diferentes à mesma tecla de atalho. Isso é especialmente útil com menus do Nushell. Por exemplo, digamos que você ainda queira ativar seu menu de conclusão com Ctrl + t, mas também deseja mover para o próximo elemento no menu assim que ele for ativado, usando a mesma tecla de atalho. - -Para esses casos, temos a palavra-chave `until`. Os eventos listados dentro do evento `until` serão processados um por um, com a diferença de que assim que um for bem-sucedido, o processamento do evento é interrompido. - -A próxima tecla de atalho representa esse caso. -```nu - $env.config = { - ... - - keybindings: [ - { - name: completion_menu - modifier: control - keycode: char_t - mode: emacs - event: { - until: [ - { send: menu name: completion_menu } - { send: menunext } - ] - } - } - ] - - ... - } -``` -A tecla de atalho anterior primeiro tentará abrir um menu de conclusão. Se o menu não estiver ativo, ele o ativará e enviará um sinal de sucesso. Se a tecla de atalho for pressionada novamente, como há um menu ativo, o próximo evento enviado será o `MenuNext`, o que significa que moverá o seletor para o próximo elemento no menu. - -Como você pode ver, a palavra-chave `until` nos permite definir dois eventos para a mesma tecla de atalho. No momento desta redação, apenas os eventos de Menu permitem esse tipo de camada. Os outros tipos de evento não relacionados a menus sempre retornarão um valor de sucesso, significando que o evento `until` será interrompido assim que atingir o comando. - -Por exemplo, a próxima tecla de atalho sempre enviará um comando "down" porque esse evento é sempre bem-sucedido. -```nu -$env.config = { - ... - - keybindings: [ - { - name: completion_menu - modifier: control - keycode: char_t - mode: emacs - event: { - until: [ - { send: down } - { send: menu name: completion_menu } - { send: menunext } - ] - } - } - ] - - ... - } -``` -### Removendo o atalho padrão -Se você deseja remover uma determinada tecla de atalho padrão sem substituí-la por uma ação diferente, você pode definir `event: null`. - -Por exemplo, para desativar a limpeza da tela com Ctrl + l para todos os modos de edição: -```nu - $env.config = { - ... - - keybindings: [ - { - modifier: control - keycode: char_l - mode: [emacs, vi_normal, vi_insert] - event: null - } - ] - - ... - } -``` -### Resolução de problemas com problemas de teclas de atalho - -Seu ambiente de terminal nem sempre pode propagar suas combinações de teclas para o Nushell da maneira que você espera. Você pode usar o comando `keybindings listen` para descobrir se determinadas teclas são realmente recebidas pelo Nushell e como. - -## Menus - -Graças ao Reedline, o Nushell possui menus que podem auxiliar em suas tarefas diárias de scripting no shell. A seguir, apresentamos os menus padrão que estão sempre disponíveis ao usar o Nushell. - -### Menu de Ajuda - -O menu de ajuda está lá para facilitar sua transição para o Nushell. Suponha que você esteja montando uma incrível sequência de comandos e, de repente, esqueça o comando interno que inverteria uma string para você. Em vez de excluir sua sequência de comandos, você pode ativar o menu de ajuda com F1. Uma vez ativo, basta digitar palavras-chave para o comando que você está procurando, e o menu mostrará os comandos que correspondem à sua entrada. A correspondência é feita no nome dos comandos ou na descrição dos comandos. - -Para navegar pelo menu, você pode selecionar o próximo elemento usando a tecla Tab, pode rolar a descrição pressionando para a esquerda ou para a direita e até mesmo colar exemplos de comandos disponíveis na linha. - -O menu de ajuda pode ser configurado modificando os seguintes parâmetros: -```nu -$env.config = { - ... - - menus = [ - ... - { - name: help_menu - only_buffer_difference: true # Search is done on the text written after activating the menu - marker: "? " # Indicator that appears with the menu is active - type: { - layout: description # Type of menu - columns: 4 # Number of columns where the options are displayed - col_width: 20 # Optional value. If missing all the screen width is used to calculate column width - col_padding: 2 # Padding between columns - selection_rows: 4 # Number of rows allowed to display found options - description_rows: 10 # Number of rows allowed to display command description - } - style: { - text: green # Text style - selected_text: green_reverse # Text style for selected option - description_text: yellow # Text style for description - } - } - ... - ] - ... -``` -### Menu de Conclusão - -O menu de conclusão é um menu sensível ao contexto que apresentará sugestões com base no estado do prompt. Essas sugestões podem variar de sugestões de caminho a alternativas de comando. Ao escrever um comando, você pode ativar o menu para ver as opções de flags disponíveis para um comando interno. Além disso, se você definiu completions personalizados para comandos externos, esses também aparecerão no menu. - -O menu de conclusão, por padrão, é acessado pressionando a tecla Tab e pode ser configurado modificando esses valores no objeto de configuração: -Ao modificar esses parâmetros, você pode personalizar o layout do seu menu de acordo com suas preferências. - -### Menu de Histórico - -O menu de histórico é uma maneira útil de acessar o histórico do editor. Ao ativar o menu (padrão `Ctrl+r``), o histórico de comandos é apresentado em ordem cronológica reversa, tornando extremamente fácil selecionar um comando anterior. - -O menu de histórico pode ser configurado modificando esses valores no objeto de configuração: - -```nu - $env.config = { - ... - - menus: [ - ... - { - name: completion_menu - only_buffer_difference: false # Search is done on the text written after activating the menu - marker: "| " # Indicator that appears with the menu is active - type: { - layout: columnar # Type of menu - columns: 4 # Number of columns where the options are displayed - col_width: 20 # Optional value. If missing all the screen width is used to calculate column width - col_padding: 2 # Padding between columns - } - style: { - text: green # Text style - selected_text: green_reverse # Text style for selected option - description_text: yellow # Text style for description - } - } - ... - ] - ... -``` -Ao modificar esses parâmetros, você pode personalizar o layout do seu menu de acordo com suas preferências. - -### Menu de histórico - -O menu de histórico é uma maneira útil de acessar o histórico do editor. Ao ativar o menu (padrão `Ctrl+r``), o histórico de comandos é apresentado em ordem cronológica reversa, tornando extremamente fácil selecionar um comando anterior. - -O menu de histórico pode ser configurado modificando esses valores no objeto de configuração: - -```nu -$env.config = { - ... - - menus = [ - ... - { - name: history_menu - only_buffer_difference: true # Search is done on the text written after activating the menu - marker: "? " # Indicator that appears with the menu is active - type: { - layout: list # Type of menu - page_size: 10 # Number of entries that will presented when activating the menu - } - style: { - text: green # Text style - selected_text: green_reverse # Text style for selected option - description_text: yellow # Text style for description - } - } - ... - ] - ... -``` -Quando o menu de histórico é ativado, ele busca registros da história em lotes (`page_size`) e os apresenta no menu. Se houver espaço no terminal, quando você pressiona Ctrl+x novamente, o menu buscará o mesmo número de registros e os acrescentará à página atual. Se não for possível apresentar todos os registros obtidos, o menu criará uma nova página. As páginas podem ser navegadas pressionando Ctrl+z para ir para a página anterior ou Ctrl+x para ir para a próxima página. - -### Pesquisando no Histórico - -Para pesquisar no seu histórico, você pode começar a digitar palavras-chave para o comando que está procurando. Uma vez que o menu é ativado, tudo o que você digitar será substituído pelo comando selecionado do seu histórico. Por exemplo, suponha que você já tenha digitado isso: - -```nu -let a = () -``` -você pode posicionar o cursor dentro dos parênteses `()` e ativar o menu. Você pode filtrar o histórico digitando palavras-chave e assim que selecionar uma entrada, as palavras digitadas serão substituídas. - -```nu -let a = (ls | where size > 10MiB) -``` -Outra característica interessante do menu é a capacidade de selecionar rapidamente algo dele. Suponha que você tenha ativado o seu menu e ele pareça assim: - -```nu -> -0: ls | where size > 10MiB -1: ls | where size > 20MiB -2: ls | where size > 30MiB -3: ls | where size > 40MiB -``` -Em vez de pressionar para baixo para selecionar a quarta entrada, você pode digitar `!3`` e pressionar Enter. Isso irá inserir o texto selecionado na posição do prompt, economizando tempo rolando pelo menu. - -A pesquisa no histórico e a seleção rápida podem ser usadas juntas. Você pode ativar o menu, fazer uma pesquisa rápida e, em seguida, fazer uma seleção rápida usando o caractere de seleção rápida. - -### Menus Definidos pelo Usuário - -Caso você ache que os menus padrão não são suficientes para suas necessidades e tenha a necessidade de criar seu próprio menu, o Nushell pode ajudar nisso. - -Para adicionar um novo menu que atenda às suas necessidades, você pode usar um dos layouts padrão como modelo. Os modelos disponíveis no Nushell são columnar (colunar), list (lista) ou description (descrição). - -O menu do tipo columnar mostrará dados de maneira colunar, ajustando o número de colunas com base no tamanho do texto exibido em suas colunas. - -O tipo de menu list sempre exibirá sugestões como uma lista, dando a opção de selecionar valores usando `!` mais a combinação de número. - -O tipo description fornecerá mais espaço para exibir uma descrição para alguns valores, juntamente com informações extras que podem ser inseridas no buffer. - -Digamos que queremos criar um menu que exiba todas as variáveis criadas durante sua sessão, chamaremos isso de `vars_menu``. Este menu usará um layout de lista (layout: list). Para pesquisar valores, queremos usar apenas as coisas que são escritas após o menu ter sido ativado (only_buffer_difference: true). - -Com isso em mente, o menu desejado seria algo assim: - -```nu -$env.config = { - ... - - menus = [ - ... - { - name: vars_menu - only_buffer_difference: true - marker: "# " - type: { - layout: list - page_size: 10 - } - style: { - text: green - selected_text: green_reverse - description_text: yellow - } - source: { |buffer, position| - $nu.scope.vars - | where name =~ $buffer - | sort-by name - | each { |it| {value: $it.name description: $it.type} } - } - } - ... - ] - ... -``` -Como você pode ver, o novo menu é idêntico ao `history_menu` descrito anteriormente. A única diferença significativa é o novo campo chamado `source`. O campo `source` é uma definição do Nushell dos valores que você deseja exibir no menu. Para este menu, estamos extraindo os dados de `$nu.scope.vars` e estamos usando esses dados para criar registros que serão usados para popular o menu. - -A estrutura necessária para o registro é a seguinte: - -```nu -{ - value: # The value that will be inserted in the buffer - description: # Optional. Description that will be display with the selected value - span: { # Optional. Span indicating what section of the string will be replaced by the value - start: - end: - } - extra: [string] # Optional. A list of strings that will be displayed with the selected value. Only works with a description menu -} -``` -Para que o menu exiba algo, pelo menos o campo value deve estar presente no registro resultante. - -Para tornar o menu interativo, duas variáveis estão disponíveis no bloco: `$buffer` e `$position`. O `$buffer` contém o valor capturado pelo menu; quando a opção `only_buffer_difference` é verdadeira, `$buffer` é o texto escrito após a ativação do menu. Se `only_buffer_difference` for falso, `$buffer` é toda a string na linha. A variável `$position` pode ser usada para criar spans de substituição com base na ideia que você tinha para o seu menu. O valor de `$position` muda com base em se `only_buffer_difference` é verdadeiro ou falso. Quando é verdadeiro, `$position` é a posição inicial na string onde o texto foi inserido após a ativação do menu. Quando o valor é falso, `$position` indica a posição real do cursor. - -Usando essas informações, você pode projetar seu menu para apresentar as informações que você precisa e substituir esse valor na localização desejada. A única coisa extra que você precisa para interagir com seu menu é definir uma tecla de atalho que ative seu menu recém-criado. - -## Teclas de Atalho para Menus - -Caso deseje alterar a maneira padrão como ambos os menus são ativados, você pode fazer isso definindo novas teclas de atalho. Por exemplo, as duas teclas de atalho a seguir atribuem os menus de conclusão e de histórico para Ctrl+t e Ctrl+y, respectivamente: - -```nu -$env.config = { - ... - - keybindings: [ - { - name: completion_menu - modifier: control - keycode: char_t - mode: [vi_insert vi_normal] - event: { - until: [ - { send: menu name: completion_menu } - { send: menupagenext } - ] - } - } - { - name: history_menu - modifier: control - keycode: char_y - mode: [vi_insert vi_normal] - event: { - until: [ - { send: menu name: history_menu } - { send: menupagenext } - ] - } - } - ] - - ... - } -``` \ No newline at end of file diff --git a/pt-BR/book/metadados.md b/pt-BR/book/metadados.md deleted file mode 100644 index 5f762c5d334..00000000000 --- a/pt-BR/book/metadados.md +++ /dev/null @@ -1,44 +0,0 @@ -# Metadados - -Usando o Nu vocë pode se deparar com momentos em que sente como se houvesse algo a mais acontecendo nos bastidores. Por exemplo, digamos que vocë vai tentar abrir um arquivo mas se esquece que ele é suportado pelo Nu e tenta convertê-lo novamente: - -```nu -> open Cargo.toml | from toml -error: Expected a string from pipeline -- shell:1:18 -1 | open Cargo.toml | from toml - | ^^^^^^^^^ requires string input -- shell:1:5 -1 | open Cargo.toml | from toml - | ---------- object originates from here -``` - -A mensagem de erro nos diz não só que o que passamos para o `from toml` não era uma string, mas também de onde o valor veio originalmente. Como o Nu sabe isso? - -Valores que fluem pelo pipeline do Nu normalmente trazem consigo um conjunto adicional de informações, ou metadados, conhecidos como tags, semnelhantes às etiquetas penduradas nos produtos de uma loja. Essas tags não afetam os dados, mas proporcionam ao Nu uma forma de aprimorar a experiência de se trabalhar com esses dados. - -Vamos executar o comando `open` de novo, mas, dessa vez, vamos olhar as tags que ele retorna: - -```nu -> open Cargo.toml | tags -----------+------------------------------------------ - span | origin -----------+------------------------------------------ - [object] | /home/jonathan/Source/nushell/Cargo.toml -----------+------------------------------------------ -``` - -Atualmente, rastreamos dois pedaços de metadados dos valores no pipeline. Você pode observar que temos a origem, que nos dá a localização de onde os dados foram carregados, o que pode ajudar o Nu a entender melhor como apresentá-los. - -Há também um coluna intervalo (span). Vamos ver mais de perto: - -```nu -> open Cargo.toml | tags | get span --------+----- - start | end --------+----- - 5 | 15 --------+----- -``` - -O início (start) e fim (end) do intervalo aqui se referem a onde o sublinhado ficará na linha da mensagem de erro. Se você contar até depois do 5 e então até 15, verá que esse intervalo coincide com o nome do arquivo "Cargo.toml". É assim que o erro que vimos antes sabe onde sublinhar a mensagem. diff --git a/pt-BR/book/pipeline.md b/pt-BR/book/pipeline.md deleted file mode 100644 index be4de8c2750..00000000000 --- a/pt-BR/book/pipeline.md +++ /dev/null @@ -1,51 +0,0 @@ -# O pipeline - -Um dos principais designs do Nu é o pipeline, uma ideia de design que tem suas raízes décadas atrás, na filosofia original por trás do Unix. Assim como Nu se extende a partir do tipo de dado string do Unix, também extende a ideia do pipeline para incluir mais do que apenas texto. - -## Básico - -Um pipeline é construído com três partes: a entrada, o filtro e a saída. - -```nu -> open "Cargo.toml" | inc package.version | save "Cargo_new.toml" -``` - -O primeiro comando, `open "Cargo.toml"`, é uma entrada (às vezes também chamado de "fonte" ou "produtor"). Ele cria ou carrega dados com os quais alimenta o pipeline. É a partir da entrada que os pipelines conseguem dados para trabalhar. Comandos como `ls` também são entradas, já que pegam dados do sistema de arquivos e os enviam através dos pipelines para que possam ser usados adiante. - -O segundo comando, `inc package.version`, é um filtro. Filtros recebem dados e normalmente fazem alguma coisa com eles. Podem mudá-los (como o comando `inc` no nosso exemplo), ou podem executar outra operação, como registro de log, conforme os valores passam. - -O último comando, `save "Cargo_new.toml"`, é uma saída (às vezes chamado de "pia" ou "ralo"). Uma saída recebe dados do pipeline e executa alguma operação final sobre eles. No nosso exemplo, salvamos o que chega pelo pipeline em um arquivo como passo final. Outros tipos de comandos de saída podem exibir os dados para o usuário. - -## Trabalhando com comandos externos - -Os comandos do Nu se comunicam entre si usando tipos de dados fornecidos pelo próprio Nu (veja [tipos de dados](tipos_de_dados.md)), mas e os comandos de fora do Nu? Vejamos alguns exemplos de como trabalhar com comandos externos: - -`comando_interno | comando_externo` - -Dados fluem do comando_interno para o comando_externo. Espera-se que esses dados sejam strings, para que possam ser enviados para a entrada padrão (`stdin`) do comando_externo. - -`comando_externo | comando_interno` - -Dados vindo de um comando externo para o Nu são agrupados em uma string única e, então, passados para o comando_interno. Comandos como `lines` ajudam a trazer dados de comandos externos de modo a facilitar sua utilização. - -`comando_externo_1 | comando_externo_2` - -Nu trabalha com dados canalizados entre dois comandos externos da mesma maneira que em outros shells, como Bash. A saída padrão (`stdout`) do comando_externo_1 é conectada à entrada padrão (`stdin`) do comando_externo_2, permitindo que os dados fluam naturalmente entre os dois comandos. - -## Nos bastidores - -Você pode ter se perguntado como vemos uma tabela se o `ls` é uma entrada e não uma saída. Nu adiciona automaticamente por nós uma saída usando outro comando chamado `autoview`, que é adicionado a qualquer pipeline que não tenha uma saída que nos permita ver o resultado. - -Com efeito, o comando: - -```nu -> ls -``` - -E o pipeline: - -```nu -> ls | autoview -``` - -São a mesma coisa. diff --git a/pt-BR/book/plugins.md b/pt-BR/book/plugins.md deleted file mode 100644 index 65e1f0d9d3a..00000000000 --- a/pt-BR/book/plugins.md +++ /dev/null @@ -1,11 +0,0 @@ -# Plugins - -A funcionalidade do Nu pode ser extendida usando plugins. Os plugins podem desenpenhar muitas das mesmas operações que os comandos embutidos do Nu, com o benefício adicional de que eles podem ser incluídos separadamente do Nu em si. - -Para adicionar um plugin, simplesmente implemente-o e coloque o binário no seu PATH. Os nomes dos arquivos de plugins do Nu começam com `nu_plugin_` para que o Nu possa encontrá-los em meio aos outros binários no seu PATH. - -**Nota:** no futuro, plugins podem ter um local específico em precisem ser colocados a fim de que o Nu possa encontrá-los. - -Quando o Nu inicia, ele faz uma busca no sistema e carrega os plugins que encontra. - -O protocolo que os plugins do Nu usam estão sujeitos a mudar enquanto o Nu estiver em pleno desenvolvimento. O melhor lugar para aprender mais sobre o protocolo e como criar seus próprios plugins é lendo o código fonte para os [plugins no repositório do Nu](https://github.com/nushell/nushell/tree/master/src/plugins). Você pode também se dirigir ao [capítulo de plugins no livro do colaborador](https://github.com/nushell/contributor-book/blob/master/en/plugins.md). diff --git a/pt-BR/book/shells_em_shells.md b/pt-BR/book/shells_em_shells.md deleted file mode 100644 index e9fc43a2e89..00000000000 --- a/pt-BR/book/shells_em_shells.md +++ /dev/null @@ -1,158 +0,0 @@ -# Shells em shells - -## Trabalhando em múltiplos diretórios - -Embora seja comum trabalhar em um único diretório, pode ser útil trabalhar em múltiplos locais ao mesmo tempo. Para isso, Nu oferece o conceito de "shells". Como o nome implica, eles são uma maneira de executar múltiplos shells em um, permitindo que você salte rapidamente entre diretórios e muito mais. - -Para começar, vamos entrar num diretório: - -```nu -/home/jonathan/Source/nushell(master)> enter ../lark -/home/jonathan/Source/lark(master)> ls -----+----------------+-----------+----------+---------+---------------+--------------- - # | name | type | readonly | size | accessed | modified -----+----------------+-----------+----------+---------+---------------+--------------- - 0 | Cargo.toml | File | | 2.2 KB | 6 months ago | 6 months ago - 1 | target | Directory | | 4.1 KB | 10 months ago | 6 months ago - 2 | notes | Directory | | 4.1 KB | 10 months ago | 6 months ago -``` - -Entrar é semlhante a mudar de diretório (como vimos com o comando `cd`), permitindo que você salte para o diretório dentro do qual vai trabalhar. Ao invés de mudar de diretório, nós agora estamos em dois diretórios. Para ver isso mais claramente, podemos usar o comando `shells` para listar os diretórios ativos agora: - -```nu -/home/jonathan/Source/lark(master)> shells ----+---+------------+------------------------------- - # | | name | path ----+---+------------+------------------------------- - 0 | | filesystem | /home/jonathan/Source/nushell - 1 | X | filesystem | /home/jonathan/Source/lark ----+---+------------+------------------------------- -``` - -O comando `shells` nos mostra que há dois diretórios ativos agora: nosso diretório original "nushell" e agora esse novo diretório "lark". - -Podemos saltar entre esses shells com os atalhos `n` e `p`, abrevisções para "next" (próximo) e "previous" (anterior): - -``` -/home/jonathan/Source/lark(master)> n -/home/jonathan/Source/nushell(master)> p -/home/jonathan/Source/lark(master)> -``` - -Podemos ver a alteração de diretórios, mas sempre somos capazes de voltar para um diretório anterior em que estávamos trabalhando. Isso nos permite trabalhar em múltiplos diretórios na mesma sessão. - -## Saindo do shell - -Você pode sair de um shell em que tenha entrado (usando `enter`) através do comando `exit`. Se esse for o último shell aberto, Nu será encerrado. - -Você sempre pode emcerrar o Nu, mesmo que múltiplos shells estejam ativos, passando o modificador `--now` para o comando `exit`. Assim: `exit --now`. - -## Indo além de diretórios - -O Nu também pode criar shells a partir de outras coisas além de caminhos do sistema de arquivos. Digamos, por exemplo, que você está trabalhando com uma grande massa de dadose não quer perder seu lugar dentro dela. - -Para ver como isso funciona, vamos fazer o seguinte exercício. Atualmente, listamos os [plugins](plugins.md) que desenvolvemos para o Nu no arquivo "Cargo.toml". Digamos que tenhamos acabado de criar um novo plugin no diretório src/plugins chamado "doc.rs" e queremos saber se ele também está listado, de forma que possa ser compilado e instalado corretamente. - -Vamos entrar no arquivo "Cargo.toml" do código fonte do Nu: - -```nu -/Users/andresrobalino/Code/nushell(master)> enter Cargo.toml -/> ls -------------+--------------+------------------+----------+---------- - bin | dependencies | dev-dependencies | lib | package -------------+--------------+------------------+----------+---------- - [11 items] | [object] | [object] | [object] | [object] -------------+--------------+------------------+----------+---------- -``` - -Até o momento, apenas entramos no arquivo (usando o comando `enter`) e podemos ver o que há dentro dele pela tabela que o `ls` nos retorna. Se você prestar bastante atenção, dessa vez entramos num arquivo cujo formato o Nu entende (.toml). O Nu também projeta o conteúdo do arquivo em algo semelhante a um sistema de arquivos para que possamos explorá-lo como se fosse um sistema de arquivos regular. - -Antes de continuarmos, vamos checar os shells ativos: - -```nu -/> shells ----+---+-------------------------------------------------+------------------------------------ - # | | name | path ----+---+-------------------------------------------------+------------------------------------ - 0 | | filesystem | /Users/andresrobalino/Code/nushell - 1 | X | {/Users/andresrobalino/Code/nushell/Cargo.toml} | / ----+---+-------------------------------------------------+------------------------------------ - -``` - -Podemos observar que temos dois shells ativos e que estamos agora dentro do arquivo "Cargo.toml" com um caminho raíz padrão "/". Vamos ver seu contéudo novamente: - -```nu -/> ls -------------+--------------+------------------+----------+---------- - bin | dependencies | dev-dependencies | lib | package -------------+--------------+------------------+----------+---------- - [11 items] | [object] | [object] | [object] | [object] -------------+--------------+------------------+----------+---------- -``` - -O que estamos procurando pode estar dentro da coluna "bin", então vamos entrar lá: - -```nu -> cd bin -/bin> ls -----+----------------------+--------------------------- - # | name | path -----+----------------------+--------------------------- - 0 | nu_plugin_inc | src/plugins/inc.rs - 1 | nu_plugin_sum | src/plugins/sum.rs - 2 | nu_plugin_add | src/plugins/add.rs - 3 | nu_plugin_edit | src/plugins/edit.rs - 4 | nu_plugin_str | src/plugins/str.rs - 5 | nu_plugin_skip | src/plugins/skip.rs - 6 | nu_plugin_sys | src/plugins/sys.rs - 7 | nu_plugin_tree | src/plugins/tree.rs - 8 | nu_plugin_binaryview | src/plugins/binaryview.rs - 9 | nu_plugin_textview | src/plugins/textview.rs - 10 | nu | src/main.rs -----+----------------------+--------------------------- -``` - -Daqui, sempre podemos voltar para o diretório em que estávamos trabalhando antes usando p (de prévio, anterior). - -```nu -/bin> p -``` - -Vamos verificar os shells de novo: - -```nu -/Users/andresrobalino/Code/nushell(master)> shells ----+---+-------------------------------------------------+------------------------------------ - # | | name | path ----+---+-------------------------------------------------+------------------------------------ - 0 | X | filesystem | /Users/andresrobalino/Code/nushell - 1 | | {/Users/andresrobalino/Code/nushell/Cargo.toml} | /bin ----+---+-------------------------------------------------+------------------------------------ - -``` - -Estamos de volta ao diretório onde estávamos trabalhando antes de entrar no arquivo "Cargo.toml". Agora vamos mudar para o diretório onde então os códigos fonte dos plugins e rastreá-los: - -```nu -/Users/andresrobalino/Code/nushell(master)> cd src/plugins/ -/Users/andresrobalino/Code/nushell/src/plugins(master)> ls -----+---------------+------+----------+---------+------------+------------ - # | name | type | readonly | size | accessed | modified -----+---------------+------+----------+---------+------------+------------ - 0 | doc.rs | File | | 3.0 KB | a week ago | a week ago - 1 | sum.rs | File | | 3.0 KB | a week ago | a week ago - 2 | inc.rs | File | | 11.8 KB | a week ago | a week ago - 3 | sys.rs | File | | 9.2 KB | 2 days ago | 2 days ago - 4 | edit.rs | File | | 2.7 KB | a week ago | a week ago - 5 | str.rs | File | | 21.4 KB | 5 days ago | 5 days ago - 6 | secret.rs | File | | 1.8 KB | 2 days ago | 2 days ago - 7 | skip.rs | File | | 1.7 KB | a week ago | a week ago - 8 | binaryview.rs | File | | 13.0 KB | a week ago | a week ago - 9 | tree.rs | File | | 3.0 KB | a week ago | a week ago - 10 | add.rs | File | | 2.7 KB | a week ago | a week ago - 11 | textview.rs | File | | 9.4 KB | 5 days ago | 5 days ago -----+---------------+------+----------+---------+------------+------------ -``` - -Podemos agora comparar os dois para ver se há algum plugin faltando ou a mais que precisemos adicionao ao nosso arquivo (claramente precisamos adicionar o plugin `doc.rs` que criamos ao arquivo "Cargo.toml"!). diff --git a/pt-BR/book/tipos_de_dados.md b/pt-BR/book/tipos_de_dados.md deleted file mode 100644 index 0e11a6bc82a..00000000000 --- a/pt-BR/book/tipos_de_dados.md +++ /dev/null @@ -1,61 +0,0 @@ -# Tipos de dados - -Tradicionalmente, comandos de shell do Unix comunicavam-se entre si através de strings de texto. Um comando gerava texto como saída através da saída padrão (normalmente abreviada como 'stdout') e o outro comando lia o texto pela entrada padrão (ou 'stdin'). Desse modo, os dois comandos podiam se comunicar. - -Podemos pensar nesse tipo de comunicação como baseada em texto ou baseada em strings. - -Nu adota essa abordagem para seus comandos e a amplia para incluir outros tipos de dados. Atualmente, Nu suporta dois tipos de dados: simples e estruturados. - -## Dados simples - -Como muitas linguagens de programação, Nu modela dados usando um conjunto de tipos de dados simples e estruturados. Tipos de dados simples incluem inteiros, decimais, strings, booleanos, datas e caminhos. Inclui também um tipo especial para tamanhos de arquivos. - -### Inteiros - -Números inteiros. Exemplos incluem 1, 5 e 100. - -### Decimais - -Decimais são números com um componente fracionário. Exemplos incluem 1.5, 2.0 e 15.333. - -### Strings - -Strings são a maneira fundamental de se representar texto. Aparecem entre aspas duplas. Exemplos incluem "Fred", "myname.txt" e "Lynchburg, VA". - -Strings no Nu são compatíveis com Unicode por padrão, então pode-se usar texto UTF-8 com facilidade. - -### Booleanos - -Booleanos representam os valores verdadeiro ou falso. Ao invés de se escrever seus valores diretamente, são frequentemente o resultado de uma comparação. - -### Datas - -Datas e horários são mantidos juntos no tipo de dado Data. Valores de Data usados pelo sistema são compatíceis com fusos horários e usam o fuso UTC por padrão. - -### Caminhos - -Caminhos são uma forma independente de plataforma de se representar o caminho de um arquivo num dado sistema operacional. Exemplos incluem /usr/bin e C:\Users\file.txt. - -### Bytes - -Tamanhos de arquivos são mantidos num tipo especial de inteiros chamado bytes. Exemplos incluem 100, 15kb e 100mb. - -## Dados estruturados - -Dados estruturados são criados a partir de dados simples. Por exemplo, em vez de um inteiro simples, dados estruturados nos dão uma maneira de representar múltiplos inteiros no mesmo valor. Aqui está uma lista dos tipos de daods estruturados suportados atualmente: objetos, dados binários, listas e blocos. - -### Objetos - -O tipo de dados Objeto representa o que você veria em uma linha de dados em uma tabela. Ele tem diferentes elementos de dados e a cada elemento é dado um nome de coluna. - -### Dados binários - -Dados binários, como os dados de um arquivo de imagem, são um agrupamento cru de bytes. - -### Listas - -Listas podem guardar mais de um valor. Isso faz com que sejam um bom container para linhas de dados em uma tabela. - -### Blocos - -Blocos representam a bloco de código no Nu. Por exemplo, no comando `where { $it.size > 10kb }` o bloco é a porção contida entre chaves, `{ $it.size > 10kb }`. Blocos são uma maneira útil de representar código que pode ser executado em linha de dados. diff --git a/pt-BR/book/trabalhando_com_tabelas.md b/pt-BR/book/trabalhando_com_tabelas.md deleted file mode 100644 index e05e8f6d81b..00000000000 --- a/pt-BR/book/trabalhando_com_tabelas.md +++ /dev/null @@ -1,290 +0,0 @@ -# Trabalhando com tabelas - -Uma forma comum de ver os dados no Nu é por meio de uma tabela. O Nu traz um conjunto de comandos para se trabalhar com tabelas, facilitar a localização do que você procura e restringir os dados apenas ao que você precisa. - -Para começar, vamos usar a seguinte tabela: - -```nu -> ls ----+---------------+------+----------+---------+------------+------------ - # | name | type | readonly | size | accessed | modified ----+---------------+------+----------+---------+------------+------------ - 0 | add.rs | File | | 2.7 KB | 2 days ago | 2 days ago - 1 | sum.rs | File | | 3.0 KB | 2 days ago | 2 days ago - 2 | inc.rs | File | | 11.8 KB | 2 days ago | 2 days ago - 3 | str.rs | File | | 21.4 KB | 2 days ago | 2 days ago - 4 | skip.rs | File | | 1.7 KB | 2 days ago | 2 days ago - 5 | textview.rs | File | | 9.4 KB | 2 days ago | 2 days ago - 6 | binaryview.rs | File | | 13.0 KB | a day ago | a day ago - 7 | edit.rs | File | | 2.7 KB | 2 days ago | 2 days ago - 8 | tree.rs | File | | 3.0 KB | 2 days ago | 2 days ago - 9 | sys.rs | File | | 9.2 KB | 2 days ago | 2 days ago ----+---------------+------+----------+---------+------------+------------ -``` - -## Ordenando os dados - -Podemos ordenar uma tabela chamando o comando `sort-by` e informando quais colunas queremos usar na ordenação. Digamos que queremos ordenar nossa tabela pelo tamanho do arquivo: - -```nu -> ls | sort-by size ----+---------------+------+----------+---------+------------+------------ - # | name | type | readonly | size | accessed | modified ----+---------------+------+----------+---------+------------+------------ - 0 | skip.rs | File | | 1.7 KB | 2 days ago | 2 days ago - 1 | add.rs | File | | 2.7 KB | 2 days ago | 2 days ago - 2 | edit.rs | File | | 2.7 KB | 2 days ago | 2 days ago - 3 | sum.rs | File | | 3.0 KB | 2 days ago | 2 days ago - 4 | tree.rs | File | | 3.0 KB | 2 days ago | 2 days ago - 5 | sys.rs | File | | 9.2 KB | 2 days ago | 2 days ago - 6 | textview.rs | File | | 9.4 KB | 2 days ago | 2 days ago - 7 | inc.rs | File | | 11.8 KB | 2 days ago | 2 days ago - 8 | binaryview.rs | File | | 13.0 KB | a day ago | a day ago - 9 | str.rs | File | | 21.4 KB | 2 days ago | 2 days ago ----+---------------+------+----------+---------+------------+------------ -``` - -Podemos ordenar uma tabela por qualquer coluna que possa ser comparada. Por exemplo, poderíamos também ter ordenado a tabela acima usando as colunas "name", "accessed" ou "modified". - -## Selecionando os dados que deseja - -Podemos selecionar dados de uma tabela escolhendo colunas ou linhas específicas. Vamos escolher algumas colunas da nossa tabela: - -```nu -> ls | select name size ----+---------------+--------- - # | name | size ----+---------------+--------- - 0 | add.rs | 2.7 KB - 1 | sum.rs | 3.0 KB - 2 | inc.rs | 11.8 KB - 3 | str.rs | 21.4 KB - 4 | skip.rs | 1.7 KB - 5 | textview.rs | 9.4 KB - 6 | binaryview.rs | 13.0 KB - 7 | edit.rs | 2.7 KB - 8 | tree.rs | 3.0 KB - 9 | sys.rs | 9.2 KB ----+---------------+--------- -``` - -Isso ajuda a criar uma tabela mais focada no que precisamos. A seguir, digamos que queremos ver apenas os 5 menores arquivos do diretório: - -```nu -> ls | sort-by size | first 5 ----+---------+------+----------+--------+------------+------------ - # | name | type | readonly | size | accessed | modified ----+---------+------+----------+--------+------------+------------ - 0 | skip.rs | File | | 1.7 KB | 2 days ago | 2 days ago - 1 | add.rs | File | | 2.7 KB | 2 days ago | 2 days ago - 2 | edit.rs | File | | 2.7 KB | 2 days ago | 2 days ago - 3 | sum.rs | File | | 3.0 KB | 2 days ago | 2 days ago - 4 | tree.rs | File | | 3.0 KB | 2 days ago | 2 days ago ----+---------+------+----------+--------+------------+------------ -``` - -Note que primeiro ordenamos a tabela por tamanho e depois usamos o `first 5` para retornar as primeiras 5 linhas da tabela. - -Você também pode usar `skip` para pular as linhas que não quiser. Vamos pular as duas primeiras das 5 linhas que retornamos acima: - -```nu -> ls | sort-by size | first 5 | skip 2 ----+---------+------+----------+--------+------------+------------ - # | name | type | readonly | size | accessed | modified ----+---------+------+----------+--------+------------+------------ - 0 | edit.rs | File | | 2.7 KB | 2 days ago | 2 days ago - 1 | sum.rs | File | | 3.0 KB | 2 days ago | 2 days ago - 2 | tree.rs | File | | 3.0 KB | 2 days ago | 2 days ago ----+---------+------+----------+--------+------------+------------ -``` - -Restringimos os dados às 3 linhas que nos interessam. - -Vamos examinar alguns outros comandos para selecionar dados. Você pode ter se perguntado por que as linhas da tabela são numeradas. Isso serve como uma maneira prática de acessar uma linha específica. Vamos ordenar nossa tabela pelo nome do arquivo e então escolher uma das linhas com o comando `nth`, usando o número da linha: - -```nu -> ls | sort-by name ----+---------------+------+----------+---------+------------+------------ - # | name | type | readonly | size | accessed | modified ----+---------------+------+----------+---------+------------+------------ - 0 | add.rs | File | | 2.7 KB | 2 days ago | 2 days ago - 1 | binaryview.rs | File | | 13.0 KB | a day ago | a day ago - 2 | edit.rs | File | | 2.7 KB | 2 days ago | 2 days ago - 3 | inc.rs | File | | 11.8 KB | 2 days ago | 2 days ago - 4 | skip.rs | File | | 1.7 KB | 2 days ago | 2 days ago - 5 | str.rs | File | | 21.4 KB | 2 days ago | 2 days ago - 6 | sum.rs | File | | 3.0 KB | 2 days ago | 2 days ago - 7 | sys.rs | File | | 9.2 KB | 2 days ago | 2 days ago - 8 | textview.rs | File | | 9.4 KB | 2 days ago | 2 days ago - 9 | tree.rs | File | | 3.0 KB | 2 days ago | 2 days ago ----+---------------+------+----------+---------+------------+------------ - -> ls | sort-by name | nth 5 ---------+------+----------+---------+------------+------------ - name | type | readonly | size | accessed | modified ---------+------+----------+---------+------------+------------ - str.rs | File | | 21.4 KB | 2 days ago | 2 days ago ---------+------+----------+---------+------------+------------ -``` - -## Obtendo dados de uma tabela - -Até agora, trabalhamos as tabelas reduzindo-as para somente o que precisamos. Às vezes queremos ir um passo além e só ver os valores das células e não de uma coluna toda. Digamos, por exemplo, que queremos somente uma lista com os nomes do arquivos. Para isso, usamos o comando `get`: - -```nu -> ls | get name ----+--------------- - # | value ----+--------------- - 0 | add.rs - 1 | sum.rs - 2 | inc.rs - 3 | str.rs - 4 | skip.rs - 5 | textview.rs - 6 | binaryview.rs - 7 | edit.rs - 8 | tree.rs - 9 | sys.rs ----+--------------- -``` - -Agora temos os valores para cada um dos nomes de arquivo. - -Parece muito com o comando `select` que vimos antes, então vamos colocá-lo aqui de novo para compararmos os dois: - -```nu -> ls | select name ----+--------------- - # | name ----+--------------- - 0 | add.rs - 1 | sum.rs - 2 | inc.rs - 3 | str.rs - 4 | skip.rs - 5 | textview.rs - 6 | binaryview.rs - 7 | edit.rs - 8 | tree.rs - 9 | sys.rs ----+--------------- -``` - -São muito parecidos! Vamos tentar explicar a diferença entre esses dois comandos para esclarecer: - -- `select` - cria uam nova tabela que inclui apenas as colunas especificadas -- `get` - retorna os valores dentro da coluna especificada - -A única maneira de diferenciá-los olhando para a tabela é o nome característico da coluna `value`, que nos permite saber que se trata de uma lista de valores com a qual podemos trabalhar. - -O comando `get` pode ir um passo além e receber um caminho para os dados mais profundos na tabela. Isso simplifica o trabalho com dados mais complexos, como as estruturas que você pode encontrar num arquivo .json. - -## Modificando dados em uma tabela - -Além de selecionar dados de uma tabela, podemos também alterar o que a tabela traz. Podemos querer adicionar novas colunas ou editar o conteúdo de uma célula. No Nu, em vez de editar localmente, cada comando nesta seção retornará uma nova tabela no pipeline. - -### Adicionando uma nova coluna - -Podemos usar o comando `add` para adicionar uma nova coluna na tabela. Vejamos um exemplo: - -```nu -> open rustfmt.toml ---------- - edition ---------- - 2018 ---------- -``` - -Vamos adicionar uma coluna chamada "next_edition" com o valor 2021: - -```nu -> open rustfmt.toml | add next_edition 2021 ----------+-------------- - edition | next_edition ----------+-------------- - 2018 | 2021 ----------+-------------- -``` - -Note que, se abrirmos o arquivo original, seu conteúdo permanece o mesmo: - -```nu -> open rustfmt.toml ---------- - edition ---------- - 2018 ---------- -``` - -Alterações no Nu são alterações funcionais, isto é, atuam sobre os valores em si ao invés de tentar causar uma alteração permanente, o que nos permite executar muitos tipos diferentes de ações no nosso pipeline até que estejamos prontos para escrever o resultado com quaisquer mudanças, se assim quisermos. Aqui poderíamos salvar o resultado usando o comando `save`: - -```nu -> open rustfmt.toml | add next_edition 2021 | save rustfmt2.toml -> open rustfmt2.toml ----------+-------------- - edition | next_edition ----------+-------------- - 2018 | 2021 ----------+-------------- -``` - -### Editando uma coluna - -Semelhante ao comando `add`, podemos usar o comando `edit` para alterar o conteúdo de uma coluna para um novo valor. Para ver isso funcionando, vamos abrir o mesmo arquivo: - -```nu -open rustfmt.toml ---------- - edition ---------- - 2018 ---------- -``` - -E agora vamos alterar a coluna `edition` para mostrar a próxima edição à qual esperamos dar suporte: - -```nu -> open rustfmt.toml | edit edition 2021 ---------- - edition ---------- - 2021 ---------- -``` - -### Incrementando valores - -Existe mais um comando do Nu que nos ajudará a trabalhar com números e versões: `inc`. - -```nu -> open rustfmt.toml ---------- - edition ---------- - 2018 ---------- -> open rustfmt.toml | inc edition ---------- - edition ---------- - 2019 ---------- -``` - -Como o valor em "edition" é um número, podemos usar `inc` para alterá-lo. Onde `inc` realmente se destaca é trabalhando com versões: - -```nu -> open Cargo.toml | get package.version -0.1.3 -> open Cargo.toml | inc package.version --minor | get package.version -0.2.0 -``` - -Quando estamos trabalhando com versões, podemos usar um dos modificadores a seguir para informar como incrementar a versão: - -- **--major** - incrementa a versão major (0.1.3 -> 1.0.0) -- **--minor** - incrementa a versão minor (0.1.3 -> 0.2.0) -- **--patch** - incrementa a versão patch (0.1.3 -> 0.1.4) diff --git a/book/table_of_contents.md b/public/Book_table_of_contents.md similarity index 100% rename from book/table_of_contents.md rename to public/Book_table_of_contents.md diff --git a/public/favicon.svg b/public/favicon.svg new file mode 100644 index 00000000000..b7631b2a5c3 --- /dev/null +++ b/public/favicon.svg @@ -0,0 +1,15 @@ + + + + + + + + diff --git a/public/nushell-grammar.json b/public/nushell-grammar.json new file mode 100644 index 00000000000..973b26699ba --- /dev/null +++ b/public/nushell-grammar.json @@ -0,0 +1,1047 @@ +{ + "displayName": "nushell", + "name": "nushell", + "patterns": [ + { + "include": "#define-variable" + }, + { + "include": "#define-alias" + }, + { + "include": "#function" + }, + { + "include": "#extern" + }, + { + "include": "#module" + }, + { + "include": "#use-module" + }, + { + "include": "#expression" + }, + { + "include": "#comment" + } + ], + "repository": { + "binary": { + "begin": "\\b(0x)(\\[)", + "beginCaptures": { + "1": { + "name": "constant.numeric.nushell" + }, + "2": { + "name": "meta.brace.square.begin.nushell" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "meta.brace.square.begin.nushell" + } + }, + "name": "constant.binary.nushell", + "patterns": [ + { + "match": "[0-9a-fA-F]{2}", + "name": "constant.numeric.nushell" + } + ] + }, + "braced-expression": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.nushell" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.nushell" + } + }, + "name": "meta.expression.braced.nushell", + "patterns": [ + { + "begin": "(?<=\\{)\\s*\\|", + "end": "\\|", + "name": "meta.closure.parameters.nushell", + "patterns": [ + { + "include": "#function-parameter" + } + ] + }, + { + "captures": { + "1": { + "name": "variable.other.nushell" + }, + "2": { + "name": "keyword.control.nushell" + } + }, + "match": "(\\w+)\\s*(:)\\s*" + }, + { + "captures": { + "1": { + "name": "variable.other.nushell" + }, + "2": { + "name": "variable.other.nushell", + "patterns": [ + { + "include": "#paren-expression" + } + ] + }, + "3": { + "name": "keyword.control.nushell" + } + }, + "match": "(\\$\"((?:[^\"\\\\]|\\\\.)*)\")\\s*(:)\\s*", + "name": "meta.record-entry.nushell" + }, + { + "captures": { + "1": { + "name": "variable.other.nushell" + }, + "2": { + "name": "keyword.control.nushell" + } + }, + "match": "(\"(?:[^\"\\\\]|\\\\.)*\")\\s*(:)\\s*", + "name": "meta.record-entry.nushell" + }, + { + "captures": { + "1": { + "name": "variable.other.nushell" + }, + "2": { + "name": "variable.other.nushell", + "patterns": [ + { + "include": "#paren-expression" + } + ] + }, + "3": { + "name": "keyword.control.nushell" + } + }, + "match": "(\\$'([^']*)')\\s*(:)\\s*", + "name": "meta.record-entry.nushell" + }, + { + "captures": { + "1": { + "name": "variable.other.nushell" + }, + "2": { + "name": "keyword.control.nushell" + } + }, + "match": "('[^']*')\\s*(:)\\s*", + "name": "meta.record-entry.nushell" + }, + { + "include": "source.nushell" + } + ] + }, + "command": { + "begin": "(?", + "name": "keyword.operator.nushell" + }, + { + "include": "#function-multiple-inout" + } + ] + }, + "function-multiple-inout": { + "begin": "(?<=]\\s*)(:)\\s+(\\[)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.in-out.nushell" + }, + "2": { + "name": "meta.brace.square.begin.nushell" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "meta.brace.square.end.nushell" + } + }, + "patterns": [ + { + "include": "#types" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.nushell" + } + }, + "match": "\\s*(,)\\s*" + }, + { + "captures": { + "1": { + "name": "keyword.operator.nushell" + } + }, + "match": "\\s+(->)\\s+" + } + ] + }, + "function-parameter": { + "patterns": [ + { + "match": "((?:-{0,2}|\\.{3})[\\w-]+)(?:\\((-[\\w?])\\))?", + "name": "variable.parameter.nushell" + }, + { + "begin": "\\??:\\s*", + "end": "(?=(?:\\s+(?:-{0,2}|\\.{3})[\\w-]+)|(?:\\s*(?:,|\\]|\\||@|=|#|$)))", + "patterns": [ + { + "include": "#types" + } + ] + }, + { + "begin": "@(?=\"|')", + "end": "(?<=\"|')", + "patterns": [ + { + "include": "#string" + } + ] + }, + { + "begin": "=\\s*", + "end": "(?=(?:\\s+-{0,2}[\\w-]+)|(?:\\s*(?:,|\\]|\\||#|$)))", + "name": "default.value.nushell", + "patterns": [ + { + "include": "#value" + } + ] + } + ] + }, + "function-parameters": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "meta.brace.square.begin.nushell" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "meta.brace.square.end.nushell" + } + }, + "name": "meta.function.parameters.nushell", + "patterns": [ + { + "include": "#function-parameter" + }, + { + "include": "#comment" + } + ] + }, + "internal-variables": { + "match": "\\$(?:nu|env)\\b", + "name": "variable.language.nushell" + }, + "keyword": { + "match": "(?:def(?:-env)?)", + "name": "keyword.other.nushell" + }, + "module": { + "begin": "((?:export\\s+)?module)\\s+([\\w\\-]+)\\s*\\{", + "beginCaptures": { + "1": { + "name": "entity.name.function.nushell" + }, + "2": { + "name": "entity.name.namespace.nushell" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.module.end.nushell" + } + }, + "name": "meta.module.nushell", + "patterns": [ + { + "include": "source.nushell" + } + ] + }, + "numbers": { + "match": "(?=]=?|[!=]~|\\+\\+=?)(?= |$)", + "name": "keyword.control.nushell" + }, + "operators-word": { + "match": "(?<= |\\()(?:mod|in|not-in|not|and|or|xor|bit-or|bit-and|bit-xor|bit-shl|bit-shr|starts-with|ends-with)(?= |\\)|$)", + "name": "keyword.control.nushell" + }, + "parameters": { + "match": "\\b-{1,2}[\\w-]*", + "name": "variable.parameter.nushell" + }, + "paren-expression": { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "meta.brace.round.begin.nushell" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.end.nushell" + } + }, + "name": "meta.expression.parenthesis.nushell", + "patterns": [ + { + "include": "#expression" + } + ] + }, + "pre-command": { + "begin": "(\\w+)(=)", + "beginCaptures": { + "1": { + "name": "variable.other.nushell" + }, + "2": { + "patterns": [ + { + "include": "#operators" + } + ] + } + }, + "end": "(?=\\s+)", + "patterns": [ + { + "include": "#value" + } + ] + }, + "ranges": { + "match": "\\.\\.", + "name": "meta.list.nushell", + "patterns": [ + { + "include": "#types" + } + ] + }, + { + "begin": "\\b(record)\\s*<", + "beginCaptures": { + "1": { + "name": "entity.name.type.nushell" + } + }, + "end": ">", + "name": "meta.record.nushell", + "patterns": [ + { + "captures": { + "1": { + "name": "variable.parameter.nushell" + } + }, + "match": "([\\w\\-]+|\"[\\w\\- ]+\"|'[^']+')\\s*:\\s*" + }, + { + "include": "#types" + } + ] + }, + { + "match": "\\b(\\w+)\\b", + "name": "entity.name.type.nushell" + } + ] + }, + "use-module": { + "patterns": [ + { + "captures": { + "1": { + "name": "entity.name.function.nushell" + }, + "2": { + "name": "entity.name.namespace.nushell" + }, + "3": { + "name": "keyword.other.nushell" + } + }, + "match": "^\\s*((?:export )?use)\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+')(?:\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|\\*))?\\s*;?$" + }, + { + "begin": "^\\s*((?:export )?use)\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+')\\s*\\[", + "beginCaptures": { + "1": { + "name": "entity.name.function.nushell" + }, + "2": { + "name": "entity.name.namespace.nushell" + } + }, + "end": "(\\])\\s*;?\\s*$", + "endCaptures": { + "1": { + "name": "meta.brace.square.end.nushell" + } + }, + "patterns": [ + { + "captures": { + "1": { + "name": "keyword.other.nushell" + } + }, + "match": "([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|\\*),?" + }, + { + "include": "#comment" + } + ] + }, + { + "captures": { + "2": { + "name": "entity.name.function.nushell" + }, + "3": { + "name": "string.bare.nushell", + "patterns": [ + { + "captures": { + "1": { + "name": "entity.name.namespace.nushell" + } + }, + "match": "([\\w\\- ]+)(?:\\.nu)?(?=$|\"|')" + } + ] + }, + "4": { + "name": "keyword.other.nushell" + } + }, + "match": "(?(?:/|\\\\|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\w\\- ]+(?:\\.nu)?){0}^\\s*((?:export )?use)\\s+(\"\\g\"|'\\g\\'|(?![\"'])\\g)(?:\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[^']+'|\\*))?\\s*;?$" + }, + { + "begin": "(?(?:/|\\\\|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\w\\- ]+(?:\\.nu)?){0}^\\s*((?:export )?use)\\s+(\"\\g\"|'\\g\\'|(?![\"'])\\g)\\s+\\[", + "beginCaptures": { + "2": { + "name": "entity.name.function.nushell" + }, + "3": { + "name": "string.bare.nushell", + "patterns": [ + { + "captures": { + "1": { + "name": "entity.name.namespace.nushell" + } + }, + "match": "([\\w\\- ]+)(?:\\.nu)?(?=$|\"|')" + } + ] + } + }, + "end": "(\\])\\s*;?\\s*$", + "endCaptures": { + "1": { + "name": "meta.brace.square.end.nushell" + } + }, + "patterns": [ + { + "captures": { + "0": { + "name": "keyword.other.nushell" + } + }, + "match": "([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|\\*),?" + }, + { + "include": "#comment" + } + ] + }, + { + "captures": { + "0": { + "name": "entity.name.function.nushell" + } + }, + "match": "^\\s*(?:export )?use\\b" + } + ] + }, + "value": { + "patterns": [ + { + "include": "#variables" + }, + { + "include": "#variable-fields" + }, + { + "include": "#control-keywords" + }, + { + "include": "#constant-value" + }, + { + "include": "#table" + }, + { + "include": "#parameters" + }, + { + "include": "#operators" + }, + { + "include": "#paren-expression" + }, + { + "include": "#braced-expression" + }, + { + "include": "#string" + }, + { + "include": "#comment" + } + ] + }, + "variable-fields": { + "match": "(?<=\\)|\\}|\\])(?:\\.(?:[\\w-]+|\"[\\w\\- ]+\"))+", + "name": "variable.other.nushell" + }, + "variables": { + "captures": { + "1": { + "patterns": [ + { + "include": "#internal-variables" + }, + { + "match": "\\$.+", + "name": "variable.other.nushell" + } + ] + }, + "2": { + "name": "variable.other.nushell" + } + }, + "match": "(\\$[a-zA-Z0-9_]+)((?:\\.(?:[\\w-]+|\"[\\w\\- ]+\"))*)" + } + }, + "scopeName": "source.nushell" +} diff --git a/public/nushell_minimal_dark_theme.json b/public/nushell_minimal_dark_theme.json new file mode 100644 index 00000000000..0dd16c58708 --- /dev/null +++ b/public/nushell_minimal_dark_theme.json @@ -0,0 +1,718 @@ +{ + "$schema": "vscode://schemas/color-theme", + "type": "dark", + // "include": "./dark_vs.json", + "tokenColors": [ + // "FlatShape__InternalCommand": "#61d6d6", //"Cyan.bold" + { + "scope": ["keyword.control.nushell"], + "settings": { + "foreground": "#61d6d6" + } + }, + + // I used this for things like + // alias = blah + { + "scope": ["source.nushell"], + "settings": { + "foreground": "#06989a" //#61d6d6 + // "fontStyle": "bold" + } + }, + + { + "scope": "keyword.control.other.nushell", + "settings": { + "foreground": "#FF0000", + "fontStyle": "bold" + } + }, + + // these are the sub commands + { + "scope": ["keyword.other"], + "settings": { + "foreground": "#00b7ff" + } + }, + + // "FlatShape__String": "#12820e", //"Green" + { + // "scope": ["string", "meta.embedded.assembly"], + "scope": ["string.quoted"], + "settings": { + "foreground": "#12820e" + } + }, + + // "FlatShape__Operator": "#AAAA00", //"Yellow" #c19c00 + { + "scope": ["punctuation.nushell"], + "settings": { + "foreground": "#c19c00" + // "fontStyle": "bold" + } + }, + + // "FlatShape__Comment": "#55FF55", //"Green.bold", #16c60c + { + "scope": ["comment"], + "settings": { + "foreground": "#16c60c" + // "fontStyle": "bold" + } + }, + + // for range 0..10 + { + "scope": ["constant", "constant.numeric"], + "settings": { + "foreground": "#b4009e" + // "fontStyle": "bold" + } + }, + + // "FlatShape__Flag": "#3878ff", //"Blue.bold" + // "FlatShape__ShorthandFlag": "#3878ff", //"Blue.bold" + // for --flag + { + "scope": ["variable.parameter.function"], + "settings": { + "foreground": "#3878ff" + // "fontStyle": "bold" + } + }, + + // "FlatShape__Variable_or_FlatShape__Identifier": "#821791", //"Purple" + { + "scope": ["variable.name", "variable.name.nushell"], + "settings": { + "foreground": "#aa44dd" + } + }, + + { + "scope": ["variable.other"], + "settings": { + "foreground": "#61d6d6" + } + }, + + // { + // "scope": ["variable.language"], + // "settings": { + // "foreground": "#aa44dd" + // } + // }, + + // "FlatShape__Int": "#b4009e", //"Purple.bold" + // "FlatShape__Decimal": "#b4009e", //"Purple.bold" + { + "scope": [ + "constant.numeric", + "variable.other.enummember", + "keyword.operator.plus.exponent", + "keyword.operator.minus.exponent" + ], + "settings": { + "foreground": "#b4009e" + } + }, + + // for def + { + "scope": ["entity.name.function"], + "settings": { + "foreground": "#61d6d6" + } + }, + + { + "scope": ["entity.name.type"], + "settings": { + "foreground": "#f9f1a5" + } + }, + + // for var:storage_type + { + "scope": ["storage.type"], + "settings": { + "foreground": "#a538ff" + } + }, + + { + "scope": ["storage.modifier"], + "settings": { + "foreground": "#5555FF" + } + } + + // { + // "scope": [ + // "meta.embedded", + // "source.groovy.embedded" + // ], + // "settings": { + // "foreground": "#D4D4D4" + // } + // }, + // { + // "scope": "emphasis", + // "settings": { + // "fontStyle": "italic" + // } + // }, + // { + // "scope": "strong", + // "settings": { + // "fontStyle": "bold" + // } + // }, + // { + // "scope": "header", + // "settings": { + // "foreground": "#000080" + // } + // }, + // { + // "scope": "comment", + // "settings": { + // "foreground": "#6A9955" + // } + // }, + // { + // "scope": "constant.language", + // "settings": { + // "foreground": "#569CD6" + // } + // }, + // { + // "scope": [ + // "constant.numeric", + // "variable.other.enummember", + // "keyword.operator.plus.exponent", + // "keyword.operator.minus.exponent" + // ], + // "settings": { + // "foreground": "#FF55FF" + // } + // }, + // { + // "scope": "constant.regexp", + // "settings": { + // "foreground": "#646695" + // } + // }, + // { + // "scope": "entity.name.tag", + // "settings": { + // "foreground": "#569CD6" + // } + // }, + // { + // "scope": "entity.name.tag.css", + // "settings": { + // "foreground": "#D7BA7D" + // } + // }, + // { + // "scope": "entity.other.attribute-name", + // "settings": { + // "foreground": "#9CDCFE" + // } + // }, + // { + // "scope": [ + // "entity.other.attribute-name.class.css", + // "entity.other.attribute-name.class.mixin.css", + // "entity.other.attribute-name.id.css", + // "entity.other.attribute-name.parent-selector.css", + // "entity.other.attribute-name.pseudo-class.css", + // "entity.other.attribute-name.pseudo-element.css", + // "source.css.less entity.other.attribute-name.id", + // "entity.other.attribute-name.scss" + // ], + // "settings": { + // "foreground": "#D7BA7D" + // } + // }, + // { + // "scope": "invalid", + // "settings": { + // "foreground": "#F44747" + // } + // }, + // { + // "scope": "markup.underline", + // "settings": { + // "fontStyle": "underline" + // } + // }, + // { + // "scope": "markup.bold", + // "settings": { + // "foreground": "#569CD6", + // "fontStyle": "bold" + // } + // }, + // { + // "scope": "markup.heading", + // "settings": { + // "foreground": "#569CD6", + // "fontStyle": "bold" + // } + // }, + // { + // "scope": "markup.italic", + // "settings": { + // "fontStyle": "italic" + // } + // }, + // { + // "scope": "markup.inserted", + // "settings": { + // "foreground": "#B5CEA8" + // } + // }, + // { + // "scope": "markup.deleted", + // "settings": { + // "foreground": "#CE9178" + // } + // }, + // { + // "scope": "markup.changed", + // "settings": { + // "foreground": "#569CD6" + // } + // }, + // { + // "scope": "punctuation.definition.quote.begin.markdown", + // "settings": { + // "foreground": "#6A9955" + // } + // }, + // { + // "scope": "punctuation.definition.list.begin.markdown", + // "settings": { + // "foreground": "#6796E6" + // } + // }, + // { + // "scope": "markup.inline.raw", + // "settings": { + // "foreground": "#CE9178" + // } + // }, + // { + // "scope": "punctuation.definition.tag", + // "settings": { + // "foreground": "#808080" + // } + // }, + // { + // "scope": [ + // "meta.preprocessor", + // "entity.name.function.preprocessor" + // ], + // "settings": { + // "foreground": "#569CD6" + // } + // }, + // { + // "scope": "meta.preprocessor.string", + // "settings": { + // "foreground": "#CE9178" + // } + // }, + // { + // "scope": "meta.preprocessor.numeric", + // "settings": { + // "foreground": "#B5CEA8" + // } + // }, + // { + // "scope": "meta.structure.dictionary.key.python", + // "settings": { + // "foreground": "#9CDCFE" + // } + // }, + // { + // "scope": "meta.diff.header", + // "settings": { + // "foreground": "#569CD6" + // } + // }, + // { + // "scope": "storage", + // "settings": { + // "foreground": "#569CD6" + // } + // }, + // { + // "scope": "storage.type", + // "settings": { + // "foreground": "#569CD6" + // } + // }, + // { + // "scope": [ + // "storage.modifier", + // "keyword.operator.noexcept" + // ], + // "settings": { + // "foreground": "#569CD6" + // } + // }, + // { + // "scope": [ + // "string", + // "meta.embedded.assembly" + // ], + // "settings": { + // "foreground": "#00AA00" + // } + // }, + // { + // "scope": "string.tag", + // "settings": { + // "foreground": "#CE9178" + // } + // }, + // { + // "scope": "string.value", + // "settings": { + // "foreground": "#CE9178" + // } + // }, + // { + // "scope": "string.regexp", + // "settings": { + // "foreground": "#D16969" + // } + // }, + // { + // "scope": [ + // "punctuation.definition.template-expression.begin", + // "punctuation.definition.template-expression.end", + // "punctuation.section.embedded" + // ], + // "settings": { + // "foreground": "#569CD6" + // } + // }, + // { + // "scope": [ + // "meta.template.expression" + // ], + // "settings": { + // "foreground": "#D4D4D4" + // } + // }, + // { + // "scope": [ + // "support.type.vendored.property-name", + // "support.type.property-name", + // "variable.css", + // "variable.scss", + // "variable.other.less", + // "source.coffee.embedded" + // ], + // "settings": { + // "foreground": "#9CDCFE" + // } + // }, + // { + // "scope": "keyword", + // "settings": { + // "foreground": "#569CD6" + // } + // }, + // { + // "scope": "keyword.control", + // "settings": { + // "foreground": "#0ff" + // } + // }, + // { + // "scope": "keyword.operator", + // "settings": { + // "foreground": "#D4D4D4" + // } + // }, + // { + // "scope": [ + // "keyword.operator.new", + // "keyword.operator.expression", + // "keyword.operator.cast", + // "keyword.operator.sizeof", + // "keyword.operator.alignof", + // "keyword.operator.typeid", + // "keyword.operator.alignas", + // "keyword.operator.instanceof", + // "keyword.operator.logical.python", + // "keyword.operator.wordlike" + // ], + // "settings": { + // "foreground": "#569CD6" + // } + // }, + // { + // "scope": "keyword.other.unit", + // "settings": { + // "foreground": "#B5CEA8" + // } + // }, + // { + // "scope": [ + // "punctuation.section.embedded.begin.php", + // "punctuation.section.embedded.end.php" + // ], + // "settings": { + // "foreground": "#569CD6" + // } + // }, + // { + // "scope": "support.function.git-rebase", + // "settings": { + // "foreground": "#9CDCFE" + // } + // }, + // { + // "scope": "constant.sha.git-rebase", + // "settings": { + // "foreground": "#B5CEA8" + // } + // }, + // { + // "scope": [ + // "storage.modifier.import.java", + // "variable.language.wildcard.java", + // "storage.modifier.package.java" + // ], + // "settings": { + // "foreground": "#D4D4D4" + // } + // }, + // { + // "scope": "variable.language", + // "settings": { + // "foreground": "#569CD6" + // } + // }, + // { + // "scope": [ + // "entity.name.function", + // "support.function", + // "support.constant.handlebars", + // "source.powershell variable.other.member", + // "entity.name.operator.custom-literal" + // ], + // "settings": { + // "foreground": "#DCDCAA" + // } + // }, + // { + // "scope": [ + // "meta.return-type", + // "support.class", + // "support.type", + // "entity.name.type", + // "entity.name.namespace", + // "entity.other.attribute", + // "entity.name.scope-resolution", + // "entity.name.class", + // "storage.type.numeric.go", + // "storage.type.byte.go", + // "storage.type.boolean.go", + // "storage.type.string.go", + // "storage.type.uintptr.go", + // "storage.type.error.go", + // "storage.type.rune.go", + // "storage.type.cs", + // "storage.type.generic.cs", + // "storage.type.modifier.cs", + // "storage.type.variable.cs", + // "storage.type.annotation.java", + // "storage.type.generic.java", + // "storage.type.java", + // "storage.type.object.array.java", + // "storage.type.primitive.array.java", + // "storage.type.primitive.java", + // "storage.type.token.java", + // "storage.type.groovy", + // "storage.type.annotation.groovy", + // "storage.type.parameters.groovy", + // "storage.type.generic.groovy", + // "storage.type.object.array.groovy", + // "storage.type.primitive.array.groovy", + // "storage.type.primitive.groovy" + // ], + // "settings": { + // "foreground": "#4EC9B0" + // } + // }, + // { + // "scope": [ + // "meta.type.cast.expr", + // "meta.type.new.expr", + // "support.constant.math", + // "support.constant.dom", + // "support.constant.json", + // "entity.other.inherited-class" + // ], + // "settings": { + // "foreground": "#4EC9B0" + // } + // }, + // { + // "scope": [ + // "keyword.control", + // "source.cpp keyword.operator.new", + // "keyword.operator.delete", + // "keyword.other.using", + // "keyword.other.operator", + // "entity.name.operator" + // ], + // "settings": { + // "foreground": "#55FFFF" + // } + // }, + // { + // "scope": [ + // "variable", + // "meta.definition.variable.name", + // "support.variable", + // "entity.name.variable" + // ], + // "settings": { + // "foreground": "#AA00AA" + // } + // }, + // { + // "scope": [ + // "variable.parameter.function.nushell" + // ], + // "settings": { + // "foreground": "#5555FF", + // // "fontStyle": "bold" + // } + // }, + // { + // "scope": [ + // "variable.other.constant", + // "variable.other.enummember" + // ], + // "settings": { + // "foreground": "#4FC1FF" + // } + // }, + // { + // "scope": [ + // "meta.object-literal.key" + // ], + // "settings": { + // "foreground": "#9CDCFE" + // } + // }, + // { + // "scope": [ + // "support.constant.property-value", + // "support.constant.font-name", + // "support.constant.media-type", + // "support.constant.media", + // "constant.other.color.rgb-value", + // "constant.other.rgb-value", + // "support.constant.color" + // ], + // "settings": { + // "foreground": "#CE9178" + // } + // }, + // { + // "scope": [ + // "punctuation.definition.group.regexp", + // "punctuation.definition.group.assertion.regexp", + // "punctuation.definition.character-class.regexp", + // "punctuation.character.set.begin.regexp", + // "punctuation.character.set.end.regexp", + // "keyword.operator.negation.regexp", + // "support.other.parenthesis.regexp" + // ], + // "settings": { + // "foreground": "#CE9178" + // } + // }, + // { + // "scope": [ + // "constant.character.character-class.regexp", + // "constant.other.character-class.set.regexp", + // "constant.other.character-class.regexp", + // "constant.character.set.regexp" + // ], + // "settings": { + // "foreground": "#D16969" + // } + // }, + // { + // "scope": [ + // "keyword.operator.or.regexp", + // "keyword.control.anchor.regexp" + // ], + // "settings": { + // "foreground": "#DCDCAA" + // } + // }, + // { + // "scope": "keyword.operator.quantifier.regexp", + // "settings": { + // "foreground": "#D7BA7D" + // } + // }, + // { + // "scope": "constant.character", + // "settings": { + // "foreground": "#569CD6" + // } + // }, + // { + // "scope": "constant.character.escape", + // "settings": { + // "foreground": "#D7BA7D" + // } + // }, + // { + // "scope": "entity.name.label", + // "settings": { + // "foreground": "#C8C8C8" + // } + // }, + // { + // "scope": "token.info-token", + // "settings": { + // "foreground": "#6796E6" + // } + // }, + // { + // "scope": "token.warn-token", + // "settings": { + // "foreground": "#CD9731" + // } + // }, + // { + // "scope": "token.error-token", + // "settings": { + // "foreground": "#F44747" + // } + // }, + // { + // "scope": "token.debug-token", + // "settings": { + // "foreground": "#B267E6" + // } + // } + ] +} diff --git a/ru/README.md b/ru/README.md deleted file mode 100644 index 365c4917103..00000000000 --- a/ru/README.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -home: true -heroImage: null -heroText: Nushell -tagline: Новый тип оболочки -actionText: Начать → -actionLink: /book/ -features: - - title: Конвейеры для управления любой ОС - details: Nu работает на Linux, macOS, BSD и Windows. Выучите его один раз, а затем используйте везде. - - title: Все есть данные - details: Конвейеры Nu используют структурированные данные, поэтому вы можете спокойно выбирать, фильтровать и сортировать их каждый раз одним и тем же способом. Перестаньте парсить строки и начните решать проблемы. - - title: Мощные плагины - details: Nu легко расширяется с помощью мощной системы плагинов. ---- - -Снимок экрана, показывающий использование команды ls - -### Nu работает с существующими данными - -Nu говорит на языках [JSON, YAML, SQLite, Excel, и других](/book/loading_data.html) из коробки. В конвейер Nu легко внести данные, будь они в файле, базе данных или веб-API: - -Снимок экрана, показывающий выборку с помощью веб-API - -### Nu имеет отличные сообщения об ошибках - -Nu оперирует типизированными данными, поэтому отлавливает ошибки, которые другие оболочки не могут. А когда что-то ломается, Nu точно сообщает, где и почему: - -Снимок экрана, показывающий, как Nu ловит ошибку типа - -## Получить Nu - -Nushell доступен в виде [загружаемых двоичных файлов](https://github.com/nushell/nushell/releases), [через ваш любимый менеджер пакетов](https://repology.org/project/nushell/versions), в [Действие GitHub](https://github.com/marketplace/actions/setup-nu), а также в виде [исходного кода](https://github.com/nushell/nushell). Прочитайте [подробные инструкции по установке](/book/installation.html) или сразу приступайте к работе: - -#### macOS / Linux: - -```shell -$ brew install nushell -``` - -#### Windows: - -```shell -$ winget install nushell -``` - -После установки запустите Nu, набрав `nu`. - -## Сообщество - -Присоединяйтесь к нам [в Discord](https://discord.gg/NtAbbGn), если у вас есть вопросы о Nu! - -Вы можете помочь улучшить этот сайт, [оставив отзыв](https://github.com/nushell/nushell.github.io/issues) или [отправив PR](https://github.com/nushell/nushell.github.io/pulls). diff --git a/ru/book/README.md b/ru/book/README.md deleted file mode 100644 index 7efd40a5558..00000000000 --- a/ru/book/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# Введение - -Здравствуйте, добро пожаловать в проект Nushell. -Цель этого проекта - взять философию оболочек Unix, где простые команды соединяются с помощью конвейеров, и адаптировать ее к современному стилю разработки. -Таким образом, Nushell не является ни оболочкой, ни языком программирования, а соединяет в себе и то, и другое, объединяя в одном пакете богатый язык программирования и полнофункциональную оболочку. - -Nu берет пример со многих знакомых мест: традиционные оболочки, такие как bash, объектно-ориентированные оболочки, такие как PowerShell, постепенно типизируемые языки, такие как TypeScript, функциональное программирование, системное программирование и многое другое. Но вместо того, чтобы пытаться быть универсальным специалистом, Nu сосредоточила свою энергию на том, чтобы делать несколько вещей хорошо: - -- Быть гибкой кроссплатформенной оболочкой с современным дизайном -- Решение проблем с помощью современного языка программирования, который работает со структурой ваших данных -- Четкие сообщения об ошибках и чистая поддержка IDE - -## Эта книга - -Книга разделена на главы, которые далее разбиты на разделы. -Вы можете нажать на заголовки глав, чтобы получить более подробную информацию о них. - -- [Начало работы](getting_started.md) научит вас, как установить Nushell, и покажет вам, что к чему. В ней также объясняются некоторые принципы проектирования, по которым Nushell отличается от типичных оболочек, таких как bash. -- [Основы Nu](nu_fundamentals.md) объясняет основные понятия языка Nushell. -- [Программирование в Nu](programming_in_nu.md) более глубоко погружает в особенности языка и показывает несколько способов организации и структурирования вашего кода. -- [Nu как оболочка](nu_as_a_shell.md) В центре внимания - возможности оболочки, в первую очередь конфигурация и окружение. -- [Переход в Nu](coming_to_nu.md) предназначен для быстрого старта пользователей, перешедших с других оболочек или языков. -- [Примечания к дизайну](design_notes.md) подробно объясняет некоторые конструктивные решения Nushell. -- [(Не очень) Продвинутый](advanced.md) включает в себя несколько более продвинутых тем (они не такие _уж_ и продвинутые, обязательно ознакомьтесь и с ними!). - -## Множество частей Nushell - -Проект Nushell состоит из множества различных репозиториев и подпроектов. -Вы можете найти их в разделе [Наша организация на GitHub](https://github.com/nushell). - -- Основной репозиторий Nushell можно найти [здесь](https://github.com/nushell/nushell). Он разбит на несколько ящиков, которые при желании можно использовать в качестве независимых библиотек в собственном проекте. -- Репозиторий нашей страницы [nushell.sh](https://www.nushell.sh), включая эту книгу, можно найти [здесь](https://github.com/nushell/nushell.github.io). -- Nushell имеет свой собственный редактор строк, [имеющий свой собственный репозиторий](https://github.com/nushell/reedline) -- [`nu_scripts`](https://github.com/nushell/nu_scripts) это место для обмена скриптами и модулями с другими пользователями, пока у нас не появится какой-нибудь менеджер пакетов. -- [Nana](https://github.com/nushell/nana) это экспериментальная попытка исследовать графический пользовательский интерфейс для Nushell. -- [Awesome Nu](https://github.com/nushell/awesome-nu) содержит список инструментов, которые работают с экосистемой Nushell: плагины, скрипты, расширения редактора, сторонние интеграции и т.д. -- [Nu Showcase](https://github.com/nushell/showcase) это место для обмена работами о Nushell, будь то блоги, иллюстрации или что-то еще. -- [Запрос на комментарии (RFC)](https://github.com/nushell/rfcs) служит местом для предложений и обсуждений серьезных изменений в дизайне. Хотя в настоящее время он недостаточно используется, мы ожидаем увеличения его использования по мере приближения и превышения версии 1.0. - -## Вклад - -Мы приветствуем вклад в развитие! -[Как видите](#the-many-parts-of-nushell), есть много мест, куда можно внести свой вклад. -Большинство репозиториев содержат файл `CONTRIBUTING.md` с советами и подробностями, которые должны помочь вам начать работу (если нет, подумайте о внесении исправления!). - -Сам Nushell написан на языке [Rust](https://www.rust-lang.org). -Однако вам не обязательно быть программистом Rust, чтобы помочь. -Если вы разбираетесь в веб-разработке, вы можете внести свой вклад в улучшение этого сайта или проекта Nana. -[Dataframes](dataframes.md) может использовать ваш опыт обработки данных. - -Если вы написали крутой скрипт, плагин или интегрировали Nushell куда-то, мы будем рады вашему вкладу в `nu_scripts` или Awesome Nu. -Обнаружение ошибок с помощью шагов воспроизведения и создание запросов в GitHub об этих ошибках является ценной помощью! -Вы можете внести свой вклад в развитие Nushell, просто используя Nushell! - -Поскольку Nushell быстро развивается, эта книга постоянно нуждается в обновлении. -Работа над этой книгой не требует никаких специальных навыков, кроме базового знакомства с Markdown. -Кроме того, вы можете перевести некоторые его части на свой язык. - -## Сообщество - -Основным местом для обсуждения всего, что связано с Nushell, является наш [Discord](https://discord.com/invite/NtAbbGn). -Вы также можете следить за нашими новостями и обновлениями в [Twitter](https://twitter.com/nu_shell). -Наконец, вы можете воспользоваться обсуждениями на GitHub или создать проблемы на GitHub. diff --git a/assets/images/0_12_0_jupyter.png b/src/assets/images/0_12_0_jupyter.png similarity index 100% rename from assets/images/0_12_0_jupyter.png rename to src/assets/images/0_12_0_jupyter.png diff --git a/assets/images/0_14_0_help_examples.png b/src/assets/images/0_14_0_help_examples.png similarity index 100% rename from assets/images/0_14_0_help_examples.png rename to src/assets/images/0_14_0_help_examples.png diff --git a/assets/images/0_15_0_prettier_errors.png b/src/assets/images/0_15_0_prettier_errors.png similarity index 100% rename from assets/images/0_15_0_prettier_errors.png rename to src/assets/images/0_15_0_prettier_errors.png diff --git a/assets/images/0_16_0_after_table.png b/src/assets/images/0_16_0_after_table.png similarity index 100% rename from assets/images/0_16_0_after_table.png rename to src/assets/images/0_16_0_after_table.png diff --git a/assets/images/0_16_0_before_table.png b/src/assets/images/0_16_0_before_table.png similarity index 100% rename from assets/images/0_16_0_before_table.png rename to src/assets/images/0_16_0_before_table.png diff --git a/assets/images/0_16_0_prompt_3.png b/src/assets/images/0_16_0_prompt_3.png similarity index 100% rename from assets/images/0_16_0_prompt_3.png rename to src/assets/images/0_16_0_prompt_3.png diff --git a/assets/images/0_16_0_prompt_4.png b/src/assets/images/0_16_0_prompt_4.png similarity index 100% rename from assets/images/0_16_0_prompt_4.png rename to src/assets/images/0_16_0_prompt_4.png diff --git a/assets/images/0_16_0_rendering_time.png b/src/assets/images/0_16_0_rendering_time.png similarity index 100% rename from assets/images/0_16_0_rendering_time.png rename to src/assets/images/0_16_0_rendering_time.png diff --git a/assets/images/0_17_0_playground.png b/src/assets/images/0_17_0_playground.png similarity index 100% rename from assets/images/0_17_0_playground.png rename to src/assets/images/0_17_0_playground.png diff --git a/assets/images/0_19_autocomplete.gif b/src/assets/images/0_19_autocomplete.gif similarity index 100% rename from assets/images/0_19_autocomplete.gif rename to src/assets/images/0_19_autocomplete.gif diff --git a/assets/images/0_19_heart_theme.png b/src/assets/images/0_19_heart_theme.png similarity index 100% rename from assets/images/0_19_heart_theme.png rename to src/assets/images/0_19_heart_theme.png diff --git a/assets/images/0_19_table_colors.png b/src/assets/images/0_19_table_colors.png similarity index 100% rename from assets/images/0_19_table_colors.png rename to src/assets/images/0_19_table_colors.png diff --git a/assets/images/0_21_bar_charts.gif b/src/assets/images/0_21_bar_charts.gif similarity index 100% rename from assets/images/0_21_bar_charts.gif rename to src/assets/images/0_21_bar_charts.gif diff --git a/assets/images/0_21_line_chart.png b/src/assets/images/0_21_line_chart.png similarity index 100% rename from assets/images/0_21_line_chart.png rename to src/assets/images/0_21_line_chart.png diff --git a/assets/images/0_22_flatten.gif b/src/assets/images/0_22_flatten.gif similarity index 100% rename from assets/images/0_22_flatten.gif rename to src/assets/images/0_22_flatten.gif diff --git a/assets/images/0_23_website.png b/src/assets/images/0_23_website.png similarity index 100% rename from assets/images/0_23_website.png rename to src/assets/images/0_23_website.png diff --git a/assets/images/0_30_0_speed.png b/src/assets/images/0_30_0_speed.png similarity index 100% rename from assets/images/0_30_0_speed.png rename to src/assets/images/0_30_0_speed.png diff --git a/assets/images/0_32_themes.png b/src/assets/images/0_32_themes.png similarity index 100% rename from assets/images/0_32_themes.png rename to src/assets/images/0_32_themes.png diff --git a/assets/images/0_36_tutor.png b/src/assets/images/0_36_tutor.png similarity index 100% rename from assets/images/0_36_tutor.png rename to src/assets/images/0_36_tutor.png diff --git a/assets/images/0_37_find.png b/src/assets/images/0_37_find.png similarity index 100% rename from assets/images/0_37_find.png rename to src/assets/images/0_37_find.png diff --git a/assets/images/0_4_0_new_colors.png b/src/assets/images/0_4_0_new_colors.png similarity index 100% rename from assets/images/0_4_0_new_colors.png rename to src/assets/images/0_4_0_new_colors.png diff --git a/assets/images/0_4_0_streaming_table.gif b/src/assets/images/0_4_0_streaming_table.gif similarity index 100% rename from assets/images/0_4_0_streaming_table.gif rename to src/assets/images/0_4_0_streaming_table.gif diff --git a/assets/images/0_59_1_for_multiline_indicator.png b/src/assets/images/0_59_1_for_multiline_indicator.png similarity index 100% rename from assets/images/0_59_1_for_multiline_indicator.png rename to src/assets/images/0_59_1_for_multiline_indicator.png diff --git a/assets/images/0_59_1_ls_gridc.png b/src/assets/images/0_59_1_ls_gridc.png similarity index 100% rename from assets/images/0_59_1_ls_gridc.png rename to src/assets/images/0_59_1_ls_gridc.png diff --git a/assets/images/0_59_1_ls_sort.png b/src/assets/images/0_59_1_ls_sort.png similarity index 100% rename from assets/images/0_59_1_ls_sort.png rename to src/assets/images/0_59_1_ls_sort.png diff --git a/assets/images/0_60_0_completions_external.gif b/src/assets/images/0_60_0_completions_external.gif similarity index 100% rename from assets/images/0_60_0_completions_external.gif rename to src/assets/images/0_60_0_completions_external.gif diff --git a/assets/images/0_60_0_completions_internal.gif b/src/assets/images/0_60_0_completions_internal.gif similarity index 100% rename from assets/images/0_60_0_completions_internal.gif rename to src/assets/images/0_60_0_completions_internal.gif diff --git a/assets/images/0_60_0_history.gif b/src/assets/images/0_60_0_history.gif similarity index 100% rename from assets/images/0_60_0_history.gif rename to src/assets/images/0_60_0_history.gif diff --git a/assets/images/0_60_0_history_complete.gif b/src/assets/images/0_60_0_history_complete.gif similarity index 100% rename from assets/images/0_60_0_history_complete.gif rename to src/assets/images/0_60_0_history_complete.gif diff --git a/assets/images/0_60_completions.gif b/src/assets/images/0_60_completions.gif similarity index 100% rename from assets/images/0_60_completions.gif rename to src/assets/images/0_60_completions.gif diff --git a/assets/images/0_60_ls_colors.png b/src/assets/images/0_60_ls_colors.png similarity index 100% rename from assets/images/0_60_ls_colors.png rename to src/assets/images/0_60_ls_colors.png diff --git a/assets/images/0_60_miette.png b/src/assets/images/0_60_miette.png similarity index 100% rename from assets/images/0_60_miette.png rename to src/assets/images/0_60_miette.png diff --git a/assets/images/0_61_completion_descriptions.png b/src/assets/images/0_61_completion_descriptions.png similarity index 100% rename from assets/images/0_61_completion_descriptions.png rename to src/assets/images/0_61_completion_descriptions.png diff --git a/assets/images/0_61_help_menu.png b/src/assets/images/0_61_help_menu.png similarity index 100% rename from assets/images/0_61_help_menu.png rename to src/assets/images/0_61_help_menu.png diff --git a/assets/images/0_67_error_message.png b/src/assets/images/0_67_error_message.png similarity index 100% rename from assets/images/0_67_error_message.png rename to src/assets/images/0_67_error_message.png diff --git a/assets/images/0_67_header.png b/src/assets/images/0_67_header.png similarity index 100% rename from assets/images/0_67_header.png rename to src/assets/images/0_67_header.png diff --git a/assets/images/0_67_vs_code.png b/src/assets/images/0_67_vs_code.png similarity index 100% rename from assets/images/0_67_vs_code.png rename to src/assets/images/0_67_vs_code.png diff --git a/assets/images/0_6_0_starship_prompt.png b/src/assets/images/0_6_0_starship_prompt.png similarity index 100% rename from assets/images/0_6_0_starship_prompt.png rename to src/assets/images/0_6_0_starship_prompt.png diff --git a/assets/images/0_70_table_expand.png b/src/assets/images/0_70_table_expand.png similarity index 100% rename from assets/images/0_70_table_expand.png rename to src/assets/images/0_70_table_expand.png diff --git a/assets/images/0_72_auto_expand.png b/src/assets/images/0_72_auto_expand.png similarity index 100% rename from assets/images/0_72_auto_expand.png rename to src/assets/images/0_72_auto_expand.png diff --git a/assets/images/0_73_explore_try_mode.png b/src/assets/images/0_73_explore_try_mode.png similarity index 100% rename from assets/images/0_73_explore_try_mode.png rename to src/assets/images/0_73_explore_try_mode.png diff --git a/assets/images/0_74_io_signatures.png b/src/assets/images/0_74_io_signatures.png similarity index 100% rename from assets/images/0_74_io_signatures.png rename to src/assets/images/0_74_io_signatures.png diff --git a/assets/images/0_74_new_help.png b/src/assets/images/0_74_new_help.png similarity index 100% rename from assets/images/0_74_new_help.png rename to src/assets/images/0_74_new_help.png diff --git a/assets/images/0_75_save_progress.png b/src/assets/images/0_75_save_progress.png similarity index 100% rename from assets/images/0_75_save_progress.png rename to src/assets/images/0_75_save_progress.png diff --git a/assets/images/0_76_explain_cmd.png b/src/assets/images/0_76_explain_cmd.png similarity index 100% rename from assets/images/0_76_explain_cmd.png rename to src/assets/images/0_76_explain_cmd.png diff --git a/assets/images/0_76_inspect_cmd.png b/src/assets/images/0_76_inspect_cmd.png similarity index 100% rename from assets/images/0_76_inspect_cmd.png rename to src/assets/images/0_76_inspect_cmd.png diff --git a/assets/images/0_76_plugin_with_example.png b/src/assets/images/0_76_plugin_with_example.png similarity index 100% rename from assets/images/0_76_plugin_with_example.png rename to src/assets/images/0_76_plugin_with_example.png diff --git a/assets/images/0_76_profile_prompt.png b/src/assets/images/0_76_profile_prompt.png similarity index 100% rename from assets/images/0_76_profile_prompt.png rename to src/assets/images/0_76_profile_prompt.png diff --git a/assets/images/0_76_view_files.png b/src/assets/images/0_76_view_files.png similarity index 100% rename from assets/images/0_76_view_files.png rename to src/assets/images/0_76_view_files.png diff --git a/assets/images/0_79_ide.png b/src/assets/images/0_79_ide.png similarity index 100% rename from assets/images/0_79_ide.png rename to src/assets/images/0_79_ide.png diff --git a/assets/images/0_79_std_log.png b/src/assets/images/0_79_std_log.png similarity index 100% rename from assets/images/0_79_std_log.png rename to src/assets/images/0_79_std_log.png diff --git a/assets/images/0_84_table_compact.png b/src/assets/images/0_84_table_compact.png similarity index 100% rename from assets/images/0_84_table_compact.png rename to src/assets/images/0_84_table_compact.png diff --git a/assets/images/0_84_table_padding.png b/src/assets/images/0_84_table_padding.png similarity index 100% rename from assets/images/0_84_table_padding.png rename to src/assets/images/0_84_table_padding.png diff --git a/assets/images/0_86_completions.gif b/src/assets/images/0_86_completions.gif similarity index 100% rename from assets/images/0_86_completions.gif rename to src/assets/images/0_86_completions.gif diff --git a/assets/images/0_9_0_error_highlight.png b/src/assets/images/0_9_0_error_highlight.png similarity index 100% rename from assets/images/0_9_0_error_highlight.png rename to src/assets/images/0_9_0_error_highlight.png diff --git a/assets/images/bday_4_bulk_convert.jpeg b/src/assets/images/bday_4_bulk_convert.jpeg similarity index 100% rename from assets/images/bday_4_bulk_convert.jpeg rename to src/assets/images/bday_4_bulk_convert.jpeg diff --git a/assets/images/bday_4_grid.png b/src/assets/images/bday_4_grid.png similarity index 100% rename from assets/images/bday_4_grid.png rename to src/assets/images/bday_4_grid.png diff --git a/assets/images/bday_4_hex_colours.png b/src/assets/images/bday_4_hex_colours.png similarity index 100% rename from assets/images/bday_4_hex_colours.png rename to src/assets/images/bday_4_hex_colours.png diff --git a/assets/images/bday_4_subcommand_help.png b/src/assets/images/bday_4_subcommand_help.png similarity index 100% rename from assets/images/bday_4_subcommand_help.png rename to src/assets/images/bday_4_subcommand_help.png diff --git a/assets/images/default.png b/src/assets/images/default.png similarity index 100% rename from assets/images/default.png rename to src/assets/images/default.png diff --git a/assets/images/did_you_mean.png b/src/assets/images/did_you_mean.png similarity index 100% rename from assets/images/did_you_mean.png rename to src/assets/images/did_you_mean.png diff --git a/assets/images/eq_git_branch_completion.gif b/src/assets/images/eq_git_branch_completion.gif similarity index 100% rename from assets/images/eq_git_branch_completion.gif rename to src/assets/images/eq_git_branch_completion.gif diff --git a/.vuepress/public/frontpage/fetch-example.png b/src/assets/images/fetch-example.png similarity index 100% rename from .vuepress/public/frontpage/fetch-example.png rename to src/assets/images/fetch-example.png diff --git a/assets/images/happy_nu_year_2020.png b/src/assets/images/happy_nu_year_2020.png similarity index 100% rename from assets/images/happy_nu_year_2020.png rename to src/assets/images/happy_nu_year_2020.png diff --git a/assets/images/jonathandturner.jpg b/src/assets/images/jonathandturner.jpg similarity index 100% rename from assets/images/jonathandturner.jpg rename to src/assets/images/jonathandturner.jpg diff --git a/assets/images/logo-contest/ellie-mascot.png b/src/assets/images/logo-contest/ellie-mascot.png similarity index 100% rename from assets/images/logo-contest/ellie-mascot.png rename to src/assets/images/logo-contest/ellie-mascot.png diff --git a/assets/images/logo-contest/font-logo.png b/src/assets/images/logo-contest/font-logo.png similarity index 100% rename from assets/images/logo-contest/font-logo.png rename to src/assets/images/logo-contest/font-logo.png diff --git a/assets/images/logo-contest/shell-mascot.png b/src/assets/images/logo-contest/shell-mascot.png similarity index 100% rename from assets/images/logo-contest/shell-mascot.png rename to src/assets/images/logo-contest/shell-mascot.png diff --git a/.vuepress/public/frontpage/ls-example.png b/src/assets/images/ls-example.png similarity index 100% rename from .vuepress/public/frontpage/ls-example.png rename to src/assets/images/ls-example.png diff --git a/.vuepress/public/frontpage/miette-example.png b/src/assets/images/miette-example.png similarity index 100% rename from .vuepress/public/frontpage/miette-example.png rename to src/assets/images/miette-example.png diff --git a/assets/images/nu_error.png b/src/assets/images/nu_error.png similarity index 100% rename from assets/images/nu_error.png rename to src/assets/images/nu_error.png diff --git a/assets/images/nu_error2.png b/src/assets/images/nu_error2.png similarity index 100% rename from assets/images/nu_error2.png rename to src/assets/images/nu_error2.png diff --git a/assets/images/nu_error_metadata.png b/src/assets/images/nu_error_metadata.png similarity index 100% rename from assets/images/nu_error_metadata.png rename to src/assets/images/nu_error_metadata.png diff --git a/assets/images/link.png b/src/assets/images/nu_icon.png similarity index 100% rename from assets/images/link.png rename to src/assets/images/nu_icon.png diff --git a/assets/images/nu_logo.png b/src/assets/images/nu_logo.png similarity index 100% rename from assets/images/nu_logo.png rename to src/assets/images/nu_logo.png diff --git a/assets/images/nu_ls.png b/src/assets/images/nu_ls.png similarity index 100% rename from assets/images/nu_ls.png rename to src/assets/images/nu_ls.png diff --git a/assets/images/nu_ls_filter.png b/src/assets/images/nu_ls_filter.png similarity index 100% rename from assets/images/nu_ls_filter.png rename to src/assets/images/nu_ls_filter.png diff --git a/assets/images/nu_ps_filter.png b/src/assets/images/nu_ps_filter.png similarity index 100% rename from assets/images/nu_ps_filter.png rename to src/assets/images/nu_ps_filter.png diff --git a/assets/images/nushell-autocomplete4.gif b/src/assets/images/nushell-autocomplete4.gif similarity index 100% rename from assets/images/nushell-autocomplete4.gif rename to src/assets/images/nushell-autocomplete4.gif diff --git a/assets/images/nushell_survey_2019_anything_else.png b/src/assets/images/nushell_survey_2019_anything_else.png similarity index 100% rename from assets/images/nushell_survey_2019_anything_else.png rename to src/assets/images/nushell_survey_2019_anything_else.png diff --git a/assets/images/nushell_survey_2019_blockers.png b/src/assets/images/nushell_survey_2019_blockers.png similarity index 100% rename from assets/images/nushell_survey_2019_blockers.png rename to src/assets/images/nushell_survey_2019_blockers.png diff --git a/assets/images/nushell_survey_2019_fave_features.png b/src/assets/images/nushell_survey_2019_fave_features.png similarity index 100% rename from assets/images/nushell_survey_2019_fave_features.png rename to src/assets/images/nushell_survey_2019_fave_features.png diff --git a/assets/images/nushell_survey_2019_needs_work.png b/src/assets/images/nushell_survey_2019_needs_work.png similarity index 100% rename from assets/images/nushell_survey_2019_needs_work.png rename to src/assets/images/nushell_survey_2019_needs_work.png diff --git a/assets/images/nushell_survey_2019_percent.png b/src/assets/images/nushell_survey_2019_percent.png similarity index 100% rename from assets/images/nushell_survey_2019_percent.png rename to src/assets/images/nushell_survey_2019_percent.png diff --git a/assets/images/nushell_survey_2019_stoppers.png b/src/assets/images/nushell_survey_2019_stoppers.png similarity index 100% rename from assets/images/nushell_survey_2019_stoppers.png rename to src/assets/images/nushell_survey_2019_stoppers.png diff --git a/assets/images/nushell_survey_2023_how_install.png b/src/assets/images/nushell_survey_2023_how_install.png similarity index 100% rename from assets/images/nushell_survey_2023_how_install.png rename to src/assets/images/nushell_survey_2023_how_install.png diff --git a/assets/images/nushell_survey_2023_platforms.png b/src/assets/images/nushell_survey_2023_platforms.png similarity index 100% rename from assets/images/nushell_survey_2023_platforms.png rename to src/assets/images/nushell_survey_2023_platforms.png diff --git a/assets/images/nushell_survey_2023_priorities.png b/src/assets/images/nushell_survey_2023_priorities.png similarity index 100% rename from assets/images/nushell_survey_2023_priorities.png rename to src/assets/images/nushell_survey_2023_priorities.png diff --git a/assets/images/nushell_survey_2023_running_nushell.png b/src/assets/images/nushell_survey_2023_running_nushell.png similarity index 100% rename from assets/images/nushell_survey_2023_running_nushell.png rename to src/assets/images/nushell_survey_2023_running_nushell.png diff --git a/assets/images/nushell_survey_2023_use_nushell.png b/src/assets/images/nushell_survey_2023_use_nushell.png similarity index 100% rename from assets/images/nushell_survey_2023_use_nushell.png rename to src/assets/images/nushell_survey_2023_use_nushell.png diff --git a/assets/images/open_cargo.png b/src/assets/images/open_cargo.png similarity index 100% rename from assets/images/open_cargo.png rename to src/assets/images/open_cargo.png diff --git a/assets/images/right_prompt.png b/src/assets/images/right_prompt.png similarity index 100% rename from assets/images/right_prompt.png rename to src/assets/images/right_prompt.png diff --git a/assets/images/right_prompt_default.png b/src/assets/images/right_prompt_default.png similarity index 100% rename from assets/images/right_prompt_default.png rename to src/assets/images/right_prompt_default.png diff --git a/assets/images/two_year_cake.png b/src/assets/images/two_year_cake.png similarity index 100% rename from assets/images/two_year_cake.png rename to src/assets/images/two_year_cake.png diff --git a/assets/images/two_year_stars.png b/src/assets/images/two_year_stars.png similarity index 100% rename from assets/images/two_year_stars.png rename to src/assets/images/two_year_stars.png diff --git a/assets/images/two_year_tweet1.png b/src/assets/images/two_year_tweet1.png similarity index 100% rename from assets/images/two_year_tweet1.png rename to src/assets/images/two_year_tweet1.png diff --git a/assets/images/two_year_tweet2.png b/src/assets/images/two_year_tweet2.png similarity index 100% rename from assets/images/two_year_tweet2.png rename to src/assets/images/two_year_tweet2.png diff --git a/assets/images/two_year_tweet3.png b/src/assets/images/two_year_tweet3.png similarity index 100% rename from assets/images/two_year_tweet3.png rename to src/assets/images/two_year_tweet3.png diff --git a/assets/images/two_year_tweet4.png b/src/assets/images/two_year_tweet4.png similarity index 100% rename from assets/images/two_year_tweet4.png rename to src/assets/images/two_year_tweet4.png diff --git a/assets/images/two_year_tweet5.png b/src/assets/images/two_year_tweet5.png similarity index 100% rename from assets/images/two_year_tweet5.png rename to src/assets/images/two_year_tweet5.png diff --git a/assets/images/two_year_vscode.png b/src/assets/images/two_year_vscode.png similarity index 100% rename from assets/images/two_year_vscode.png rename to src/assets/images/two_year_vscode.png diff --git a/assets/images/utf8_light_table.png b/src/assets/images/utf8_light_table.png similarity index 100% rename from assets/images/utf8_light_table.png rename to src/assets/images/utf8_light_table.png diff --git a/assets/images/utf8_table.png b/src/assets/images/utf8_table.png similarity index 100% rename from assets/images/utf8_table.png rename to src/assets/images/utf8_table.png diff --git a/assets/images/view_source.png b/src/assets/images/view_source.png similarity index 100% rename from assets/images/view_source.png rename to src/assets/images/view_source.png diff --git a/assets/images/year_1_kloc.png b/src/assets/images/year_1_kloc.png similarity index 100% rename from assets/images/year_1_kloc.png rename to src/assets/images/year_1_kloc.png diff --git a/src/content/config.ts b/src/content/config.ts new file mode 100644 index 00000000000..a4eec59baa7 --- /dev/null +++ b/src/content/config.ts @@ -0,0 +1,6 @@ +import { defineCollection } from "astro:content"; +import { docsSchema } from "@astrojs/starlight/schema"; + +export const collections = { + docs: defineCollection({ schema: docsSchema() }), +}; diff --git a/blog/2019-08-23-introducing-nushell.md b/src/content/docs/blog/2019-08-23-introducing-nushell.md similarity index 100% rename from blog/2019-08-23-introducing-nushell.md rename to src/content/docs/blog/2019-08-23-introducing-nushell.md diff --git a/blog/2019-09-24-nushell_0_3_0.md b/src/content/docs/blog/2019-09-24-nushell_0_3_0.md similarity index 100% rename from blog/2019-09-24-nushell_0_3_0.md rename to src/content/docs/blog/2019-09-24-nushell_0_3_0.md diff --git a/blog/2019-10-15-nushell-0_4_0.md b/src/content/docs/blog/2019-10-15-nushell-0_4_0.md similarity index 100% rename from blog/2019-10-15-nushell-0_4_0.md rename to src/content/docs/blog/2019-10-15-nushell-0_4_0.md diff --git a/blog/2019-11-05-nushell-0_5_0.md b/src/content/docs/blog/2019-11-05-nushell-0_5_0.md similarity index 100% rename from blog/2019-11-05-nushell-0_5_0.md rename to src/content/docs/blog/2019-11-05-nushell-0_5_0.md diff --git a/blog/2019-11-23-nushell-survey-results.md b/src/content/docs/blog/2019-11-23-nushell-survey-results.md similarity index 100% rename from blog/2019-11-23-nushell-survey-results.md rename to src/content/docs/blog/2019-11-23-nushell-survey-results.md diff --git a/blog/2019-11-26-nushell-0_6_0.md b/src/content/docs/blog/2019-11-26-nushell-0_6_0.md similarity index 100% rename from blog/2019-11-26-nushell-0_6_0.md rename to src/content/docs/blog/2019-11-26-nushell-0_6_0.md diff --git a/blog/2019-12-18-nushell-0_7_0.md b/src/content/docs/blog/2019-12-18-nushell-0_7_0.md similarity index 100% rename from blog/2019-12-18-nushell-0_7_0.md rename to src/content/docs/blog/2019-12-18-nushell-0_7_0.md diff --git a/blog/2019-12-31-happy-nu-year-2020.md b/src/content/docs/blog/2019-12-31-happy-nu-year-2020.md similarity index 100% rename from blog/2019-12-31-happy-nu-year-2020.md rename to src/content/docs/blog/2019-12-31-happy-nu-year-2020.md diff --git a/blog/2020-01-07-nushell-0_8_0.md b/src/content/docs/blog/2020-01-07-nushell-0_8_0.md similarity index 100% rename from blog/2020-01-07-nushell-0_8_0.md rename to src/content/docs/blog/2020-01-07-nushell-0_8_0.md diff --git a/blog/2020-01-28-nushell-0_9_0.md b/src/content/docs/blog/2020-01-28-nushell-0_9_0.md similarity index 100% rename from blog/2020-01-28-nushell-0_9_0.md rename to src/content/docs/blog/2020-01-28-nushell-0_9_0.md diff --git a/blog/2020-02-18-nushell-0_10_0.md b/src/content/docs/blog/2020-02-18-nushell-0_10_0.md similarity index 100% rename from blog/2020-02-18-nushell-0_10_0.md rename to src/content/docs/blog/2020-02-18-nushell-0_10_0.md diff --git a/blog/2020-03-10-nushell_0_11_0.md b/src/content/docs/blog/2020-03-10-nushell_0_11_0.md similarity index 100% rename from blog/2020-03-10-nushell_0_11_0.md rename to src/content/docs/blog/2020-03-10-nushell_0_11_0.md diff --git a/blog/2020-03-31-nushell_0_12_0.md b/src/content/docs/blog/2020-03-31-nushell_0_12_0.md similarity index 100% rename from blog/2020-03-31-nushell_0_12_0.md rename to src/content/docs/blog/2020-03-31-nushell_0_12_0.md diff --git a/blog/2020-04-21-nushell_0_13_0.md b/src/content/docs/blog/2020-04-21-nushell_0_13_0.md similarity index 100% rename from blog/2020-04-21-nushell_0_13_0.md rename to src/content/docs/blog/2020-04-21-nushell_0_13_0.md diff --git a/blog/2020-05-12-nushell_0_14_0.md b/src/content/docs/blog/2020-05-12-nushell_0_14_0.md similarity index 100% rename from blog/2020-05-12-nushell_0_14_0.md rename to src/content/docs/blog/2020-05-12-nushell_0_14_0.md diff --git a/blog/2020-06-09-nushell_0_15_0.md b/src/content/docs/blog/2020-06-09-nushell_0_15_0.md similarity index 100% rename from blog/2020-06-09-nushell_0_15_0.md rename to src/content/docs/blog/2020-06-09-nushell_0_15_0.md diff --git a/blog/2020-06-30-nushell_0_16_0.md b/src/content/docs/blog/2020-06-30-nushell_0_16_0.md similarity index 100% rename from blog/2020-06-30-nushell_0_16_0.md rename to src/content/docs/blog/2020-06-30-nushell_0_16_0.md diff --git a/blog/2020-07-21-nushell_0_17_0.md b/src/content/docs/blog/2020-07-21-nushell_0_17_0.md similarity index 100% rename from blog/2020-07-21-nushell_0_17_0.md rename to src/content/docs/blog/2020-07-21-nushell_0_17_0.md diff --git a/blog/2020-08-11-nushell_0_18.md b/src/content/docs/blog/2020-08-11-nushell_0_18.md similarity index 100% rename from blog/2020-08-11-nushell_0_18.md rename to src/content/docs/blog/2020-08-11-nushell_0_18.md diff --git a/blog/2020-08-23-year_of_nushell.md b/src/content/docs/blog/2020-08-23-year_of_nushell.md similarity index 100% rename from blog/2020-08-23-year_of_nushell.md rename to src/content/docs/blog/2020-08-23-year_of_nushell.md diff --git a/blog/2020-09-01-nushell_0_19.md b/src/content/docs/blog/2020-09-01-nushell_0_19.md similarity index 100% rename from blog/2020-09-01-nushell_0_19.md rename to src/content/docs/blog/2020-09-01-nushell_0_19.md diff --git a/blog/2020-09-22-nushell_0_20.md b/src/content/docs/blog/2020-09-22-nushell_0_20.md similarity index 100% rename from blog/2020-09-22-nushell_0_20.md rename to src/content/docs/blog/2020-09-22-nushell_0_20.md diff --git a/blog/2020-10-13-nushell_0_21.md b/src/content/docs/blog/2020-10-13-nushell_0_21.md similarity index 100% rename from blog/2020-10-13-nushell_0_21.md rename to src/content/docs/blog/2020-10-13-nushell_0_21.md diff --git a/blog/2020-11-03-nushell_0_22.md b/src/content/docs/blog/2020-11-03-nushell_0_22.md similarity index 100% rename from blog/2020-11-03-nushell_0_22.md rename to src/content/docs/blog/2020-11-03-nushell_0_22.md diff --git a/blog/2020-11-24-nushell_0_23.md b/src/content/docs/blog/2020-11-24-nushell_0_23.md similarity index 100% rename from blog/2020-11-24-nushell_0_23.md rename to src/content/docs/blog/2020-11-24-nushell_0_23.md diff --git a/blog/2020-12-15-nushell_0_24.md b/src/content/docs/blog/2020-12-15-nushell_0_24.md similarity index 100% rename from blog/2020-12-15-nushell_0_24.md rename to src/content/docs/blog/2020-12-15-nushell_0_24.md diff --git a/blog/2021-01-05-nushell_0_25.md b/src/content/docs/blog/2021-01-05-nushell_0_25.md similarity index 100% rename from blog/2021-01-05-nushell_0_25.md rename to src/content/docs/blog/2021-01-05-nushell_0_25.md diff --git a/blog/2021-01-26-nushell_0_26.md b/src/content/docs/blog/2021-01-26-nushell_0_26.md similarity index 100% rename from blog/2021-01-26-nushell_0_26.md rename to src/content/docs/blog/2021-01-26-nushell_0_26.md diff --git a/blog/2021-02-16-nushell_0_27.md b/src/content/docs/blog/2021-02-16-nushell_0_27.md similarity index 100% rename from blog/2021-02-16-nushell_0_27.md rename to src/content/docs/blog/2021-02-16-nushell_0_27.md diff --git a/blog/2021-03-09-nushell_0_28.md b/src/content/docs/blog/2021-03-09-nushell_0_28.md similarity index 100% rename from blog/2021-03-09-nushell_0_28.md rename to src/content/docs/blog/2021-03-09-nushell_0_28.md diff --git a/blog/2021-03-30-nushell_0_29.md b/src/content/docs/blog/2021-03-30-nushell_0_29.md similarity index 100% rename from blog/2021-03-30-nushell_0_29.md rename to src/content/docs/blog/2021-03-30-nushell_0_29.md diff --git a/blog/2021-04-20-nushell_0_30.md b/src/content/docs/blog/2021-04-20-nushell_0_30.md similarity index 100% rename from blog/2021-04-20-nushell_0_30.md rename to src/content/docs/blog/2021-04-20-nushell_0_30.md diff --git a/blog/2021-05-11-nushell_0_31.md b/src/content/docs/blog/2021-05-11-nushell_0_31.md similarity index 100% rename from blog/2021-05-11-nushell_0_31.md rename to src/content/docs/blog/2021-05-11-nushell_0_31.md diff --git a/blog/2021-06-01-nushell_0_32.md b/src/content/docs/blog/2021-06-01-nushell_0_32.md similarity index 100% rename from blog/2021-06-01-nushell_0_32.md rename to src/content/docs/blog/2021-06-01-nushell_0_32.md diff --git a/blog/2021-06-22-nushell_0_33.md b/src/content/docs/blog/2021-06-22-nushell_0_33.md similarity index 99% rename from blog/2021-06-22-nushell_0_33.md rename to src/content/docs/blog/2021-06-22-nushell_0_33.md index bfc20324305..b04aaf182aa 100644 --- a/blog/2021-06-22-nushell_0_33.md +++ b/src/content/docs/blog/2021-06-22-nushell_0_33.md @@ -38,7 +38,7 @@ Behind the scenes, we've also refactored completions into their own crate, so th Sometimes, when you're working on a pipeline, you want to refer to values coming in using an xargs style. With 0.33, we've introduced a new built-in variable called `$in`. The `$in` variable will collect the pipeline into a value for you, allowing you to access the whole stream as a parameter. -```nu +```nushell > echo 1 2 3 | $in.1 * $in.2 6 ``` diff --git a/blog/2021-07-13-nushell_0_34.md b/src/content/docs/blog/2021-07-13-nushell_0_34.md similarity index 100% rename from blog/2021-07-13-nushell_0_34.md rename to src/content/docs/blog/2021-07-13-nushell_0_34.md diff --git a/blog/2021-08-03-nushell_0_35.md b/src/content/docs/blog/2021-08-03-nushell_0_35.md similarity index 100% rename from blog/2021-08-03-nushell_0_35.md rename to src/content/docs/blog/2021-08-03-nushell_0_35.md diff --git a/blog/2021-08-23-two-years-of-nushell.md b/src/content/docs/blog/2021-08-23-two-years-of-nushell.md similarity index 100% rename from blog/2021-08-23-two-years-of-nushell.md rename to src/content/docs/blog/2021-08-23-two-years-of-nushell.md diff --git a/blog/2021-08-24-nushell_0_36.md b/src/content/docs/blog/2021-08-24-nushell_0_36.md similarity index 100% rename from blog/2021-08-24-nushell_0_36.md rename to src/content/docs/blog/2021-08-24-nushell_0_36.md diff --git a/blog/2021-09-14-nushell_0_37.md b/src/content/docs/blog/2021-09-14-nushell_0_37.md similarity index 100% rename from blog/2021-09-14-nushell_0_37.md rename to src/content/docs/blog/2021-09-14-nushell_0_37.md diff --git a/blog/2021-10-05-nushell_0_38.md b/src/content/docs/blog/2021-10-05-nushell_0_38.md similarity index 100% rename from blog/2021-10-05-nushell_0_38.md rename to src/content/docs/blog/2021-10-05-nushell_0_38.md diff --git a/blog/2021-10-26-nushell_0_39.md b/src/content/docs/blog/2021-10-26-nushell_0_39.md similarity index 100% rename from blog/2021-10-26-nushell_0_39.md rename to src/content/docs/blog/2021-10-26-nushell_0_39.md diff --git a/blog/2021-11-16-nushell_0_40.md b/src/content/docs/blog/2021-11-16-nushell_0_40.md similarity index 100% rename from blog/2021-11-16-nushell_0_40.md rename to src/content/docs/blog/2021-11-16-nushell_0_40.md diff --git a/blog/2021-12-07-nushell_0_41.md b/src/content/docs/blog/2021-12-07-nushell_0_41.md similarity index 100% rename from blog/2021-12-07-nushell_0_41.md rename to src/content/docs/blog/2021-12-07-nushell_0_41.md diff --git a/blog/2021-12-28-nushell_0_42.md b/src/content/docs/blog/2021-12-28-nushell_0_42.md similarity index 100% rename from blog/2021-12-28-nushell_0_42.md rename to src/content/docs/blog/2021-12-28-nushell_0_42.md diff --git a/blog/2022-01-18-nushell_0_43.md b/src/content/docs/blog/2022-01-18-nushell_0_43.md similarity index 100% rename from blog/2022-01-18-nushell_0_43.md rename to src/content/docs/blog/2022-01-18-nushell_0_43.md diff --git a/blog/2022-02-08-nushell_0_44.md b/src/content/docs/blog/2022-02-08-nushell_0_44.md similarity index 100% rename from blog/2022-02-08-nushell_0_44.md rename to src/content/docs/blog/2022-02-08-nushell_0_44.md diff --git a/blog/2022-03-01-nushell_0_59.md b/src/content/docs/blog/2022-03-01-nushell_0_59.md similarity index 100% rename from blog/2022-03-01-nushell_0_59.md rename to src/content/docs/blog/2022-03-01-nushell_0_59.md diff --git a/blog/2022-03-22-nushell_0_60.md b/src/content/docs/blog/2022-03-22-nushell_0_60.md similarity index 100% rename from blog/2022-03-22-nushell_0_60.md rename to src/content/docs/blog/2022-03-22-nushell_0_60.md diff --git a/blog/2022-04-12-nushell_0_61.md b/src/content/docs/blog/2022-04-12-nushell_0_61.md similarity index 100% rename from blog/2022-04-12-nushell_0_61.md rename to src/content/docs/blog/2022-04-12-nushell_0_61.md diff --git a/blog/2022-05-03-nushell_0_62.md b/src/content/docs/blog/2022-05-03-nushell_0_62.md similarity index 100% rename from blog/2022-05-03-nushell_0_62.md rename to src/content/docs/blog/2022-05-03-nushell_0_62.md diff --git a/blog/2022-05-24-nushell_0_63.md b/src/content/docs/blog/2022-05-24-nushell_0_63.md similarity index 100% rename from blog/2022-05-24-nushell_0_63.md rename to src/content/docs/blog/2022-05-24-nushell_0_63.md diff --git a/blog/2022-06-14-nushell_0_64.md b/src/content/docs/blog/2022-06-14-nushell_0_64.md similarity index 100% rename from blog/2022-06-14-nushell_0_64.md rename to src/content/docs/blog/2022-06-14-nushell_0_64.md diff --git a/blog/2022-07-05-nushell-0_65.md b/src/content/docs/blog/2022-07-05-nushell-0_65.md similarity index 100% rename from blog/2022-07-05-nushell-0_65.md rename to src/content/docs/blog/2022-07-05-nushell-0_65.md diff --git a/blog/2022-07-26-nushell-0_66.md b/src/content/docs/blog/2022-07-26-nushell-0_66.md similarity index 100% rename from blog/2022-07-26-nushell-0_66.md rename to src/content/docs/blog/2022-07-26-nushell-0_66.md diff --git a/blog/2022-08-16-nushell-0_67.md b/src/content/docs/blog/2022-08-16-nushell-0_67.md similarity index 100% rename from blog/2022-08-16-nushell-0_67.md rename to src/content/docs/blog/2022-08-16-nushell-0_67.md diff --git a/blog/2022-09-06-nushell-0_68.md b/src/content/docs/blog/2022-09-06-nushell-0_68.md similarity index 99% rename from blog/2022-09-06-nushell-0_68.md rename to src/content/docs/blog/2022-09-06-nushell-0_68.md index 9c8d9d27b92..c9ae5be8c75 100644 --- a/blog/2022-09-06-nushell-0_68.md +++ b/src/content/docs/blog/2022-09-06-nushell-0_68.md @@ -174,7 +174,7 @@ This change is intended to test it with a larger audience to decide which one we This example shows that the `edit distance` is one edit step difference using the Levenshtein algorithm. -```nu +```nushell > 'nushell' | str distance 'nutshell' ╭──────────┬───╮ │ distance │ 1 │ @@ -187,7 +187,7 @@ We'd eventually like to add more similarity comparison functionality to nushell. The new parameter on `into duration` `--convert` allows you to convert from string durations into named durations. -```nu +```nushell > '7min' | into duration --convert sec 420 sec ``` diff --git a/blog/2022-09-27-nushell-0_69.md b/src/content/docs/blog/2022-09-27-nushell-0_69.md similarity index 100% rename from blog/2022-09-27-nushell-0_69.md rename to src/content/docs/blog/2022-09-27-nushell-0_69.md diff --git a/blog/2022-10-18-nushell-0_70.md b/src/content/docs/blog/2022-10-18-nushell-0_70.md similarity index 100% rename from blog/2022-10-18-nushell-0_70.md rename to src/content/docs/blog/2022-10-18-nushell-0_70.md diff --git a/blog/2022-11-08-nushell-0.71.md b/src/content/docs/blog/2022-11-08-nushell-0.71.md similarity index 99% rename from blog/2022-11-08-nushell-0.71.md rename to src/content/docs/blog/2022-11-08-nushell-0.71.md index 5291f3245cd..b27402dbc07 100644 --- a/blog/2022-11-08-nushell-0.71.md +++ b/src/content/docs/blog/2022-11-08-nushell-0.71.md @@ -30,7 +30,7 @@ In this release, you can now use the [`++` operator to append lists together](ht For example, you can combine two lists into a new lists made up of the both lists: -```nu +```nushell > [1, 2] ++ [3, 4] ``` diff --git a/blog/2022-11-29-nushell-0.72.md b/src/content/docs/blog/2022-11-29-nushell-0.72.md similarity index 99% rename from blog/2022-11-29-nushell-0.72.md rename to src/content/docs/blog/2022-11-29-nushell-0.72.md index 0d5bdfa7a0f..bbdbb0b2724 100644 --- a/blog/2022-11-29-nushell-0.72.md +++ b/src/content/docs/blog/2022-11-29-nushell-0.72.md @@ -28,7 +28,7 @@ As part of this release, we also publish a set of optional plugins you can insta Starting with 0.72, it's now much easier to run a command that might fail and then handle the failure if it happens. -```nu +```nushell try { 1 / 0 } catch { @@ -40,7 +40,7 @@ The `catch` part of the `try/catch` is optional. Without it, the `try` block wil You can also access the error, if one happens, using a closure syntax: -```nu +```nushell try { 1 / 0 } catch {|e| @@ -61,17 +61,17 @@ This uses an improved expanding data view capability from 0.70. This release also includes a new way of redirecting the stdout and/or stderr of external commands. This gives easier access to the output streams than was previously possible. -```nu +```nushell > cat foo.txt out> bar.txt ``` -```nu +```nushell > cat missingfilename.txt err> my_error.txt ``` You can also create a stream built from the above, allowing one stream to empty and then be followed by the other stream: -```nu +```nushell > git status out+err> git_status.txt ``` @@ -81,7 +81,7 @@ We have now split closures and blocks into two separate value types. A closure c An example closure: -```nu +```nushell ls | each {|it| print $it.name } ``` @@ -91,7 +91,7 @@ A block is much simpler and is used as the bottom of commands like `if` and loop An example block: -```nu +```nushell if true { print "hello!" } @@ -103,7 +103,7 @@ Blocks don't close over (or capture) variables, don't have parameters, and can't Starting in this release, you can create local mutable variables. You can create mutable variables using the `mut` keyword: -```nu +```nushell mut x = 1 $x = $x + 100 print $x @@ -111,7 +111,7 @@ print $x A mutable variable can only live and change in the closure in which it's created. Blocks, however, have access to the mutable variables in the parent closure. For example, mutating a variable inside of the block used in an `if` call is valid: -```nu +```nushell mut x = 1 if true { $x += 1000 @@ -125,7 +125,7 @@ The 0.72 release also includes a few new looping commands: `loop` and `while`. The `loop` command runs a block forever: -```nu +```nushell loop { print "hit ctrl-c to break out of this example" } @@ -133,7 +133,7 @@ loop { The `while` command will run its block as long as a condition is met: -```nu +```nushell mut x = 0 while $x < 10 { print $x @@ -149,7 +149,7 @@ Loops can now also use the `break` and `continue` feature common in many program The 0.72 release also includes the ability to return early from a closure or command. -```nu +```nushell def foo [x] { if $x > 10 { return 1000 @@ -172,7 +172,7 @@ To continue using dataframe commands, you can build Nu from source using the `da A common pattern in using overlays is shadowing an existing environment variable, such as PROMPT_COMMAND. However, `overlay use` would keep loading the value from the first activation. It is best explained with an example. Assume the following module: -```nu +```nushell module prompt { export-env { let-env PROMPT_COMMAND = (date now | into string) @@ -230,7 +230,7 @@ The changes are: The new grouped options look like this: -```nu +```nushell ls: { use_ls_colors: true # use the LS_COLORS environment variable to colorize output clickable_links: true # enable or disable clickable links. Your terminal has to support links. @@ -274,7 +274,7 @@ The new grouped options look like this: To output your existing options in the above format (that could be pasted into your config.nu file before you delete the old options), run this code in your copy of Nushell: -```nu +```nushell $env.config | do { { ls: { use_ls_colors: $in.use_ls_colors clickable_links: $in.show_clickable_links_in_ls } rm: { always_trash: $in.rm_always_trash } cd: { abbreviations: $in.cd_with_abbreviations } table: { mode: $in.table_mode index_mode: $in.table_index_mode trim: $in.table_trim } history: { max_size: $in.max_history_size sync_on_enter: $in.sync_history_on_enter file_format: $in.history_file_format } completions: { case_sensitive: $in.case_sensitive_completions quick: $in.quick_completions partial: $in.partial_completions algorithm:$in.completion_algorithm external: { enable: $in.enable_external_completion max_results: $in.max_external_completion_results completer:$in.external_completer } } } } | to nuon | str substring 1..-1 ``` diff --git a/blog/2022-12-20-nushell-0.73.md b/src/content/docs/blog/2022-12-20-nushell-0.73.md similarity index 99% rename from blog/2022-12-20-nushell-0.73.md rename to src/content/docs/blog/2022-12-20-nushell-0.73.md index 743dc343b9a..b12fe6e4ea5 100644 --- a/blog/2022-12-20-nushell-0.73.md +++ b/src/content/docs/blog/2022-12-20-nushell-0.73.md @@ -70,7 +70,7 @@ The goal is to remove the `math eval` command that operates on strings instead o - `math log` - `math ln` -```nu +```nushell 〉math pi | math cos -1 〉math e | math ln @@ -83,13 +83,13 @@ The goal is to remove the `math eval` command that operates on strings instead o `any`, `all`, `skip until`, `skip while`, `take until`, and `take while` now accept a closure instead of a row condition. For example -```nu +```nushell [[status]; [UP] [UP]] | all status == UP ``` becomes -```nu +```nushell [[status]; [UP] [UP]] | all {|el| $el.status == UP } ``` @@ -99,19 +99,19 @@ This makes them slightly more verbose but it is a part of an effort to refactor We found the `-b` flag of `where` quite confusing and decided to remove it in favor of a new `filter` command. Both `filter` and `where` have similar functionality but `where` now only accepts a row condition and `filter` accepts a closure. Before: -```nu +```nushell [{a: 1} {a: 2}] | where -b {|x| $x.a > 1} ``` After: -```nu +```nushell [{a: 1} {a: 2}] | filter {|x| $x.a > 1} ``` Why is it useful to have two commands doing the same thing? Because with the `filter` command, you can store the closure in a variable: -```nu +```nushell let cond = {|x| $x.a > 1} [{a: 1} {a: 2}] | filter $cond ``` @@ -123,7 +123,7 @@ On the other hand, `where` is more concise (`[{a: 1} {a: 2}] | where a > 1`) but To complement `uniq` which can identify unique or duplicated values in a collection or report the number of occurrences for a particular entry, we now have `uniq-by`. It supports filtering a table by entries appearing in a particular column. -```nu +```nushell 〉 [[fruit day]; [apple monday] [apple friday] [Apple friday] [apple monday] [pear monday] [orange tuesday]] | uniq-by fruit ╭───┬────────┬─────────╮ │ # │ fruit │ day │ @@ -139,7 +139,7 @@ It supports filtering a table by entries appearing in a particular column. If a variable has been defined as mutable using the recently-added `mut` keyword, you can now deeply mutate its inner values using `=`. -```nu +```nushell 〉 mut a = { b: 1 } 〉 $a.b = 2 〉 $a.c = 3 @@ -149,7 +149,7 @@ If a variable has been defined as mutable using the recently-added `mut` keyword This syntax enhancement was added primarily to make modifying `$env.config` during a normal session much easier. Now, `$env.config` is considered inherently mutable. You can change a single config value like so: -```nu +```nushell $env.config.table.mode = compact_double ``` @@ -161,7 +161,7 @@ The `color_config` config record has new functionality: instead of specifying a Here are some examples. -```nu +```nushell filesize: {|e| if $e == 0b { 'dark_gray' } else if $e < 1mb { 'cyan_bold' @@ -171,7 +171,7 @@ filesize: {|e| This causes all filesize values to be colored using `dark_gray` if they equal `0b`, `cyan_bold` if they are less than `1mb`, and `blue_bold` otherwise. This means that, in `ls` output, empty files can be more easily distinguished from non-empty ones. -```nu +```nushell bool: { if $in { 'light_cyan' } else { 'light_gray' } } ``` diff --git a/blog/2023-01-10-nushell_0_74.md b/src/content/docs/blog/2023-01-10-nushell_0_74.md similarity index 99% rename from blog/2023-01-10-nushell_0_74.md rename to src/content/docs/blog/2023-01-10-nushell_0_74.md index 5fe9b730cee..ba491ec3046 100644 --- a/blog/2023-01-10-nushell_0_74.md +++ b/src/content/docs/blog/2023-01-10-nushell_0_74.md @@ -28,14 +28,14 @@ As part of this release, we also publish a set of optional plugins you can insta A common pitfall in Nushell when defining custom signatures using `extern` used to be that unrecognized arguments passed to the command would throw an error. Now, arguments are still checked against the `extern` signature but those that are not recognized are simply ignored. -```nu +```nushell > extern `git checkout` [] > git checkout -b foo # does not throw an error ``` `exec` uses similar style which fixes errors with tools like `ssh` and `gdb` that internally invoke `exec`. -```nu +```nushell > nu -c 'exec ls -l' # does not throw an error ``` @@ -43,7 +43,7 @@ A common pitfall in Nushell when defining custom signatures using `extern` used For a long time, Nushell had the option to provide custom help messages for commands via comments: -```nu +```nushell # Some Command # # More description goes here @@ -69,7 +69,7 @@ _Tip: We also addedd a new [book section](https://www.nushell.sh/book/how_nushel A new `const` keyword is added to Nushell to define "parse-time" constants. Constants defined with `const` behave the same as variables defined with `let`, but in addition, they are usable in some contexts that require values known at parse-time. Currently, this applies to files or names passed to `use`, `overlay use`, `source`, and `source-env`. For example, the following now works: -```nu +```nushell # Source a file from a constant > 'print hello!' | save --raw say_hello.nu > const fname = 'say_hello.nu' @@ -77,7 +77,7 @@ A new `const` keyword is added to Nushell to define "parse-time" constants. Cons hello! ``` -```nu +```nushell # Load an overlay from a constant name: > module spam { export def foo [] { 'foo' } @@ -99,7 +99,7 @@ Some future direction we can take this: - Allow modules to have constants (`module spam { const CONTENTS = [ 'eggs', 'bacon', 'sausage', 'spam' ] }`) - Some limited form of parse-time evaluation to allow static control flow, for example -```nu +```nushell const fname = const if $nu.os-info.name == 'windows' { 'C:\Users\viking\spam.nu' } else { @@ -116,7 +116,7 @@ To encode text that is used as a path component in a URL we now provide `url enc By default it preserves the structure of a URL and only replaces invalid characters. With `--all` the whole string gets encoded. -```nu +```nushell > 'https://example.com/foo bar' | url encode https://example.com/foo%20bar > 'https://example.com/foo bar' | url encode --all @@ -127,7 +127,7 @@ https%3A%2F%2Fexample%2Ecom%2Ffoo%20bar This is a complement to `columns`, designed to allow the values of a record to be easily filtered and iterated over using the standard list tools like `each` and `where`. The name `values` is derived from similar functions in Ruby, Python and JavaScript. -```nu +```nushell > {a: "Happy", b: "new", c: "year"} | values ╭───┬───────╮ │ 0 │ Happy │ @@ -138,7 +138,7 @@ This is a complement to `columns`, designed to allow the values of a record to b It can also operate on tables to convert them to lists-of-lists: -```nu +```nushell > [[a b]; [4 7] [5 8] [6 9]] | values ╭───┬───────────╮ │ 0 │ ╭───┬───╮ │ @@ -168,21 +168,21 @@ Formerly, this would produce `['bar', null]` - converting the table hole into a Formerly, if `select -i` or `get -i` couldn't find any value for the given column, it would produce a single `null`: -```nu +```nushell 〉[{a:1} {b:2} {a:3}] | select -i foo | to nuon null ``` This has been changed so that it now produces a table (or, in the case of `get`, a list) of all `null`s: -```nu +```nushell 〉[{a:1} {b:2} {a:3}] | select -i foo | to nuon [[foo]; [null], [null], [null]] ``` This change was made to make this flag work more consistently with `default` and `compact`: -```nu +```nushell 〉[{a:1} {b:2} {a:3}] | select -i a | default 0 a [[a]; [1], [0], [3]] 〉[{a:1} {b:2} {a:3}] | select -i foo | default 0 foo diff --git a/blog/2023-01-31-nushell_0_75.md b/src/content/docs/blog/2023-01-31-nushell_0_75.md similarity index 99% rename from blog/2023-01-31-nushell_0_75.md rename to src/content/docs/blog/2023-01-31-nushell_0_75.md index a52dc31409e..30c0958300f 100644 --- a/blog/2023-01-31-nushell_0_75.md +++ b/src/content/docs/blog/2023-01-31-nushell_0_75.md @@ -34,7 +34,7 @@ As part of this release, we also publish a set of optional plugins you can insta New format: -```nu +```nushell 〉echo "AB\u{43}\u{044}" ABCD 〉echo "Gabriel, blow your \u{1f3BA}" @@ -43,7 +43,7 @@ Gabriel, blow your 🎺 Instead of: -```nu +```nushell 〉echo "AB\u0043" ABC ``` @@ -67,7 +67,7 @@ As you know, `str length`, `str substring`, `str index-of` and `split words` mea The new `--graphemes`/`-g` flag can be used with `str length`, `str substring`, `str index-of` and `split words` to enable these length/indexing measurements: -```nu +```nushell 〉'🇯🇵ほげ ふが ぴよ' | str substring 4..6 -g ふが 〉'🇯🇵ほげ ふが ぴよ' | str length -g @@ -78,7 +78,7 @@ The new `--graphemes`/`-g` flag can be used with `str length`, `str substring`, In addition, the flag has been added to `split chars`. Notably, this command splits on Unicode code points rather than UTF-8 bytes, so it doesn't have the issue of turning non-ASCII characters into garbage characters. However, combining emoji and combining characters do not correspond to single code points, and are split by `split chars`. The `-g` flag keeps those characters intact: -```nu +```nushell 〉'🇯🇵ほげ' | split chars -g | to nuon [🇯🇵, ほ, げ] ``` @@ -125,7 +125,7 @@ The common `fetch` command is now `http get`. Defining and exporting a `main`command from a module allows creating a command with the same name as the module. Consider this example: -```nu +```nushell # command.nu export def main [] { 'This is a command' } @@ -134,7 +134,7 @@ export def subcommand [] { 'This is a subcommand' } Then: -```nu +```nushell > use command.nu > command @@ -146,7 +146,7 @@ This is a subcommand The same thing works `overlay use` as well. Note that the `main` command continues to work the same way as before when running a script: -```nu +```nushell > nu command.nu This is a command ``` @@ -155,7 +155,7 @@ Combined with a [recent bugfix](https://github.com/nushell/nushell/pull/7830), t Before: -```nu +```nushell # cargo.nu export extern cargo [--version, --color: string@cargo-color-complete] @@ -169,7 +169,7 @@ def cargo-color-complete [] { After: -```nu +```nushell # cargo.nu export extern main [--version, --color: string@cargo-color-complete] diff --git a/blog/2023-02-21-nushell_0_76.md b/src/content/docs/blog/2023-02-21-nushell_0_76.md similarity index 99% rename from blog/2023-02-21-nushell_0_76.md rename to src/content/docs/blog/2023-02-21-nushell_0_76.md index e48cb01be1b..11675cb51cc 100644 --- a/blog/2023-02-21-nushell_0_76.md +++ b/src/content/docs/blog/2023-02-21-nushell_0_76.md @@ -56,7 +56,7 @@ _Note: There are known limitations that the profiler can't run. For example, it - [`timeit`](https://github.com/nushell/nushell/pull/8018) (formerly known as benchmark, same functionality) -```nu +```nushell 〉timeit { ls | sort-by name type -i | get name } 2ms 509µs 900ns ``` @@ -69,7 +69,7 @@ _Note: There are known limitations that the profiler can't run. For example, it - [`view source`](https://github.com/nushell/nushell/pull/7989) (formerly known as `view-source`, same functionality) -```nu +```nushell 〉def my-cmd [arg] { echo $arg } 〉my-cmd hi hi @@ -81,7 +81,7 @@ def my-cmd [ arg:any --help (-h) ] { echo $arg } Spans are important to nushell. One of their uses is to show where errors are. For instance, in this example below, the leader lines pointing to parts of the command line are able to point to `10`, `/`, and `"bob"` because each of those items have a span. -```nu +```nushell 〉10 / "bob" Error: nu::parser::unsupported_operation (link) @@ -98,7 +98,7 @@ Error: nu::parser::unsupported_operation (link) ### Example usage: -```nu +```nushell 〉let a = 42 〉$a 42 @@ -113,7 +113,7 @@ Error: nu::parser::unsupported_operation (link) You can also find spans by using the `debug --raw` command. -```nu +```nushell 〉$env.config | get keybindings | first | debug -r ... bunch of stuff span: Span { @@ -176,7 +176,7 @@ Here `n` has to be an `int` value. This can be useful if you want to quickly build ASCII art :)! Note that the operation is commutative. -```nu +```nushell 〉" NU " * 3 NU NU NU 〉3 * Shell @@ -185,7 +185,7 @@ ShellShellShell In the same spirit you can use it to quickly create lists with repeatedly the same element. -```nu +```nushell /home/stefan/nushell〉7 * [11] ╭───┬────╮ │ 0 │ 11 │ diff --git a/blog/2023-03-14-nushell_0_77.md b/src/content/docs/blog/2023-03-14-nushell_0_77.md similarity index 99% rename from blog/2023-03-14-nushell_0_77.md rename to src/content/docs/blog/2023-03-14-nushell_0_77.md index 4becc4fdaab..753ebe0b36c 100644 --- a/blog/2023-03-14-nushell_0_77.md +++ b/src/content/docs/blog/2023-03-14-nushell_0_77.md @@ -48,7 +48,7 @@ In prior versions, Nushell attempted to extend the range of representable dates With this change ` | into datetime` assumes the input is a number of nanoseconds and can never produce a date outside this range: -```nu +```nushell 〉"7fffffffffffffff" | into int -r 16 | into datetime Fri, 11 Apr 2262 23:47:16 +0000 (in 239 years) 〉("7fffffffffffffff" | into int -r 16) * -1 | into datetime @@ -57,14 +57,14 @@ Tue, 21 Sep 1677 00:12:43 +0000 (345 years ago) The timestamp epoch is the standard unix epoch. Note the timezone is UTC/GMT: -```nu +```nushell 〉0 | into datetime Thu, 01 Jan 1970 00:00:00 +0000 (53 years ago) ``` ` | into int` can now produce an error if the input is outside the supported range: -```nu +```nushell 〉1492-10-12 | into int Error: nu::shell::incorrect_value @@ -78,7 +78,7 @@ Error: nu::shell::incorrect_value And finally, although not strictly required by the above fix, ` | date to-record` and ` | date to-table` now have a `nanosecond` field containing the subsecond residue of the input value (however it was produced). -```nu +```nushell 〉"7fffffffffffffff" | into int -r 16 | into datetime | date to-record ╭────────────┬───────────╮ │ year │ 2262 │ @@ -106,7 +106,7 @@ Commands `from xml` and `to xml` now use format where each xml entry is represen Reading some simple xml: -```nu +```nushell 〉' nushell 0.77 @@ -200,7 +200,7 @@ Let's take the `merge` command as an example! Before the change, the output of `help merge` would give -```nu +```nushell Examples: Add an 'index' column to the input table > [a b c] | wrap name | merge ( [1 2 3] | wrap index ) @@ -214,7 +214,7 @@ Examples: Now, it gives the output of all the example commands: -```nu +```nushell Examples: Add an 'index' column to the input table > [a b c] | wrap name | merge ( [1 2 3] | wrap index ) diff --git a/blog/2023-04-04-nushell_0_78.md b/src/content/docs/blog/2023-04-04-nushell_0_78.md similarity index 99% rename from blog/2023-04-04-nushell_0_78.md rename to src/content/docs/blog/2023-04-04-nushell_0_78.md index 69372d6cd45..d26b87d65a7 100644 --- a/blog/2023-04-04-nushell_0_78.md +++ b/src/content/docs/blog/2023-04-04-nushell_0_78.md @@ -30,7 +30,7 @@ With 0.78, Nushell now comes with the `match` expression, which allows you to do A simple example matching against a constant or a range: -```nu +```nushell match 3 { 1 => { print "it's a 1" } 1..10 => { print "it's between 1 and 10" } @@ -39,7 +39,7 @@ match 3 { Another example, this time matching against a record value, with a fall-through if it doesn't match: -```nu +```nushell match $a { {x: $x, y: 10} => { print $"y is: 10 and x is: ($x)" } _ => { print "the above didn't match, so we print this instead" } @@ -48,7 +48,7 @@ match $a { You can also match on the elements of a list: -```nu +```nushell match $list { [$one] => { print "one element list" } [$one, $two] => { print "two element list" } @@ -62,7 +62,7 @@ match $list { We've updated the new `alias` command we introduced in 0.77 to work more closely to the previous one. For example: -```nu +```nushell > alias l = ls -a > alias l = ls -l ``` @@ -71,7 +71,7 @@ Will now create the `l` alias that points to `ls -l`, with most recent line gett ### Alias can be named the same as the aliased command -```nu +```nushell > alias ls = ls -a ``` @@ -99,7 +99,7 @@ Example 2: `timeit { mut x = 1; while $x < 1000000 { $x += 1 } }` In Nu 0.78, you can use `?` in cell paths to suppress errors from missing data. `?` is a more convenient+powerful version of the `-i`/`--ignore-errors` flag on `get` and `select`. Here are some examples: -```nu +```nushell { foo: 123 }.bar # errors because `bar` is not present on the record { foo: 123 }.bar? # returns null @@ -120,7 +120,7 @@ In Nu 0.78, you can use `?` in cell paths to suppress errors from missing data. `?` works anywhere that cell paths work, including `where`: -```nu +```nushell > [{foo: 123}, {}] | where foo? == 123 ╭───┬─────╮ │ # │ foo │ @@ -147,7 +147,7 @@ The default behaviour still is to output everything on a single line, encouragin However, we can now output formatted NUON data with the `--indent` and `--tabs` options: -```nu +```nushell > [1 2 3] | to nuon --indent 4 [ 1, @@ -158,7 +158,7 @@ However, we can now output formatted NUON data with the `--indent` and `--tabs` or -```nu +```nushell > {date: 2000-01-01, data: [1 [2 3] 4.56]} | to nuon --indent 4 { date: 2000-01-01T00:00:00+00:00, @@ -175,7 +175,7 @@ or The default _single-line_ behaviour still can be enforced with the `--raw` option, e.g. -```nu +```nushell > {date: 2000-01-01, data: [1 [2 3] 4.56]} | to nuon --indent 4 --raw {date: 2000-01-01T00:00:00+00:00, data: [1, [2, 3], 4.56]} ``` diff --git a/blog/2023-04-25-nushell_0_79.md b/src/content/docs/blog/2023-04-25-nushell_0_79.md similarity index 99% rename from blog/2023-04-25-nushell_0_79.md rename to src/content/docs/blog/2023-04-25-nushell_0_79.md index bbb054a7954..fc48df74c82 100644 --- a/blog/2023-04-25-nushell_0_79.md +++ b/src/content/docs/blog/2023-04-25-nushell_0_79.md @@ -34,7 +34,7 @@ But first of all... **what is the _standard library_?** The nushell standard library is a **collection of nushell scripts** that are **automatically loaded** in the nushell binary and **reachable via the `use` command** without any additional setup. -> :bulb: **Note** +> :bulb: **Note** > some of the commands from the standard library are `use`d without human intervention as part of what we call > the _prelude_. > @@ -47,7 +47,7 @@ and **reachable via the `use` command** without any additional setup. - logging commands with several log levels - ... -> :bulb: **Note** +> :bulb: **Note** > yes, you heard right, in the future, the standard library might become a sanctuary for non-time-critical commands that were once written in `rust` > as part of the built-in set of commands! > @@ -75,14 +75,14 @@ i'm just gonna give some hints and links in this release note, leaving the rest - the library can be used and tested with -```nushell +```nushellshell use std # will load the whole library under the `std` namespace use std * # - - - - - without the `std` prefix ``` or use direct imports, such as -```nushell +```nushellshell use std 'dirs show' ``` diff --git a/blog/2023-05-16-nushell_0_80.md b/src/content/docs/blog/2023-05-16-nushell_0_80.md similarity index 100% rename from blog/2023-05-16-nushell_0_80.md rename to src/content/docs/blog/2023-05-16-nushell_0_80.md diff --git a/blog/2023-06-06-nushell_0_81.md b/src/content/docs/blog/2023-06-06-nushell_0_81.md similarity index 99% rename from blog/2023-06-06-nushell_0_81.md rename to src/content/docs/blog/2023-06-06-nushell_0_81.md index bd68302f857..1c1bda02cf1 100644 --- a/blog/2023-06-06-nushell_0_81.md +++ b/src/content/docs/blog/2023-06-06-nushell_0_81.md @@ -66,7 +66,7 @@ Startup times have also been improved. Through a combination of various fixes to - michel-slm created [[nu-explore] fix Cargo description](https://github.com/nushell/nushell/pull/9297) - ayax79 created [Adding JSON lines file support to dataframes](https://github.com/nushell/nushell/pull/9291) - fnordpig created [Add a datepart expression for dfr to be used with dfr with-column](https://github.com/nushell/nushell/pull/9285), and [Fix version to show build features after crateification](https://github.com/nushell/nushell/pull/9262) -- bobhy created [std dirs simply stays in sync with CD changes to PWD](https://github.com/nushell/nushell/pull/9267) +- bobhy created [std dirs simply stays in sync with CD changes to PWD](https://github.com/nushell/nushell/pull/9267) - Tiggax created [throw an error instead of a panic if no input is provided to `inspect`](https://github.com/nushell/nushell/pull/9259) - merelymyself created [upserting data of a cellpath that doesn't exist into a record creates the cellpath](https://github.com/nushell/nushell/pull/9257), and [allow `view-source` to read rest arguments](https://github.com/nushell/nushell/pull/9247), and [Allow `input` to take a specified number of characters](https://github.com/nushell/nushell/pull/9242) - MariaSolOs created [Allow duration defaults](https://github.com/nushell/nushell/pull/9249) diff --git a/blog/2023-06-27-nushell_0_82.md b/src/content/docs/blog/2023-06-27-nushell_0_82.md similarity index 99% rename from blog/2023-06-27-nushell_0_82.md rename to src/content/docs/blog/2023-06-27-nushell_0_82.md index 84e0f4870e3..80347a9b315 100644 --- a/blog/2023-06-27-nushell_0_82.md +++ b/src/content/docs/blog/2023-06-27-nushell_0_82.md @@ -35,7 +35,7 @@ Feeling adventurous? Wanting to keep up to date with the latest revisions of Nus You can find all available _nightly_ releases in the [release page of `nushell/nightly`](https://github.com/nushell/nightly/releases). -> **Note** +> **Note** > Please note that these releases are intended for testing purposes only, and we will keep only the last 10 nightly releases. > We highly recommend using the [latest stable official release](https://github.com/nushell/nushell/releases/latest) for regular usage. @@ -46,7 +46,7 @@ e.g. seeing `A year ago` in the output of `ls` when one wants to know the exact [`#9500`](https://github.com/nushell/nushell/pull/9500) introduces a new config option to change the default output of dates and times: -```nushell +```nushellshell # from the `default_config.nu` file datetime_format: { normal: '%a, %d %b %Y %H:%M:%S %z' @@ -58,7 +58,7 @@ e.g. seeing `A year ago` in the output of `ls` when one wants to know the exact From now on, either in the REPL, in scripts or in modules, you can comment out any line of a multiline pipe without breaking its execution, e.g. -```nushell +```nushellshell ls | where type == file # | sort-by size @@ -102,7 +102,6 @@ allowing for better language support in GitHub. In some situations you may want to avoid storing an entry inside your shell history. For example if it includes a secret or running it again in a different context could be dangerous. To stop nushell from storing a particular line in its history you can now start with a space and it will be ignored. You can still recall your last entry once by pressing the `Up-Arrow` but the command will never be written to disk and disappear as soon as you submit another command. - # New commands - [`http options`](https://github.com/nushell/nushell/pull/9365) @@ -113,7 +112,6 @@ To stop nushell from storing a particular line in its history you can now start - [`scope variables`](https://github.com/nushell/nushell/pull/9487) - [`scope`](https://github.com/nushell/nushell/pull/9487) - # Breaking changes - [#9509](https://github.com/nushell/nushell/pull/9509) Cratification moves the `bytes` commands to `nu-cmd-extra`. They are thus only accessible with `--features extra` diff --git a/blog/2023-06-27-road-to-1_0.md b/src/content/docs/blog/2023-06-27-road-to-1_0.md similarity index 95% rename from blog/2023-06-27-road-to-1_0.md rename to src/content/docs/blog/2023-06-27-road-to-1_0.md index 5aa4d1ac43c..55311cd8ac1 100644 --- a/blog/2023-06-27-road-to-1_0.md +++ b/src/content/docs/blog/2023-06-27-road-to-1_0.md @@ -6,14 +6,13 @@ author_image: https://www.nushell.sh/blog/images/nu_logo.png excerpt: Ahead of the 0.82 release, we share our plans on how we intend to stabilize for 1.0 and announce that we slow to a four-week release schedule. --- - # Reaching a nu phase in Nushell's development - The road from 0.82 to 1.0 Today we release the 0.82 version of Nushell. Not only will it be our 65th public release it also marks an important milestone for us on the development trajectory of Nushell. Nushell reached a much wider user base in the last few months. On GitHub, Nushell is now officially recognized for [syntax highlighting](https://github.com/github-linguist/linguist/releases/tag/v7.26.0) and recently passed 25,000 stars. We are also actively thinking about how we want to move towards stabilization for our 1.0 release. -Thus, we want to use this opportunity to share our general thoughts and announce that we will be slightly slowing down our regular release schedule. +Thus, we want to use this opportunity to share our general thoughts and announce that we will be slightly slowing down our regular release schedule. Our focus going forward will be getting Nushell to a high-quality 1.0, one that has a supported language that is reliable and backward-compatible, and a high-quality shell experience to match. ## A four-week release schedule @@ -27,7 +26,6 @@ For our contributors, this change also has the benefit that the impact of our in If you think that Nushell is moving at a glacial pace after this change, we luckily now have [nightly builds for you to download](https://github.com/nushell/nightly/tags) that reflect the current state of development. If [building Nushell yourself](https://www.nushell.sh/book/installation.html#build-from-source) was too burdensome so far, you now have to chance to try out upcoming features and provide your feedback. - ## How things went from 0.60 to 0.8x Our last very public milestone was the [release of the `0.60` version](https://www.nushell.sh/blog/2022-03-22-nushell_0_60.html), which included a massive refactor of Nushell's internals that we skipped to it from the `0.44` release. @@ -39,7 +37,7 @@ As part of this effort to strengthen the programming language chops of Nu, we al We also saw a few efforts that didn't pan out yet. For example, we tried to integrate the [Polars](https://github.com/pola-rs/polars/) dataframe engine directly into the grammar of Nushell commands, but this left many rough edges. Thus [with version 0.76, we returned to a simpler dataframe integration](https://www.nushell.sh/blog/2023-02-21-nushell_0_76.html#dataframe-commands-are-again-explicitly-separated-from-core-nushell-commands-7998) to focus on getting the core Nushell experience right. -This all provided valuable lessons in how we decide which features are beginning to settle and where we need to focus our effort to get a consistent experience. +This all provided valuable lessons in how we decide which features are beginning to settle and where we need to focus our effort to get a consistent experience. ## What we are working on right now @@ -66,14 +64,14 @@ Achieving stability will not be possible without all of you that have dedicated We want to incorporate you in formulating the priorities for the 1.0 release by reaching out to folks interested in particular problems to get clearer roadmaps for specific areas. Those write-ups will hopefully also provide some inspiration for folks interested in helping out and pushing Nushell forward. -But setting our sights on reaching the stable 1.0 release will also impose some limitations on our development practices. We are now much less likely to accept new features, commands, or options as they need to work well together with the larger picture. +But setting our sights on reaching the stable 1.0 release will also impose some limitations on our development practices. We are now much less likely to accept new features, commands, or options as they need to work well together with the larger picture. A lot of effort will still need to go into cleaning up the internals and fixing bugs. As we want to systematically improve our binary size, compile times, and runtime performance, improving existing algorithms and paying back technical debt will be prioritized over experimental stuff. Any external dependencies will also come under much more scrutiny. This means, to reduce the total number of crates we will seek to replace redundant or mostly superfluous dependencies with fewer high-quality implementations and also severely restrict the addition of any new dependencies. ## How you can help out -As always helping out fellow users or picking up issues that are labeled with ["good-first-issue"](https://github.com/nushell/nushell/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) or ["help-wanted"](https://github.com/nushell/nushell/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) is greatly appreciated. +As always helping out fellow users or picking up issues that are labeled with ["good-first-issue"](https://github.com/nushell/nushell/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) or ["help-wanted"](https://github.com/nushell/nushell/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) is greatly appreciated. As our [issue tracker](https://github.com/nushell/nushell/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) has grown to over 800 entries (878 at the time of writing) your help to clear this backlog will accelerate our path to 1.0. diff --git a/blog/2023-07-25-nushell_0_83.md b/src/content/docs/blog/2023-07-25-nushell_0_83.md similarity index 50% rename from blog/2023-07-25-nushell_0_83.md rename to src/content/docs/blog/2023-07-25-nushell_0_83.md index 497b1bbd17f..01331c05641 100644 --- a/blog/2023-07-25-nushell_0_83.md +++ b/src/content/docs/blog/2023-07-25-nushell_0_83.md @@ -39,9 +39,11 @@ As part of this release, we also publish a set of optional plugins you can insta | [@mengsuenyan](https://github.com/mengsuenyan) | [9662](https://github.com/nushell/nushell/pull/9662) | fix the command `cp -u src dst`/`mv -u src dst` doesn't work when the… | ## Changes to commands + Since last release, some commands have changed and some have been created, here is a list of some changes and what they mean: + - [@amtoine](https://github.com/amtoine) in [#9646]: `which` returns the type of the command instead of only whether it is builtin or not and uses more explicit column names -- [@atahabaki](https://github.com/atahabaki) in [#9750]: `str expand` now allows empty member in *brace expansion*, e.g. `A{,B,C}` would expand to `[A, AB, AC]` +- [@atahabaki](https://github.com/atahabaki) in [#9750]: `str expand` now allows empty member in _brace expansion_, e.g. `A{,B,C}` would expand to `[A, AB, AC]` - [@fdncred](https://github.com/fdncred) in [#9669]: `keybinding listen` gives more information about keys like `home` and `end`, namely their `kind` and `state` - [@NotLebedev](https://github.com/NotLebedev) in [#9453]: `input listen` allows to query for a single key press, e.g. the following will take a 4-char input `1..4 | each { input listen } | where key_type == char | get code | str join` - [@kubouch](https://github.com/kubouch) in [#9687]: `path` commands lose the `-c` flag; instead, use `update` to update table columns @@ -53,10 +55,11 @@ Since last release, some commands have changed and some have been created, here [#9687]: https://github.com/nushell/nushell/pull/9687 ## Command set refinement efforts + Again with this new release, we are continuing refining our set of core commands. As part of this, another set of commands have moved to `extra`. Thanks to folks who are helping our efforts on the road to 1.0! -> **Note** -> No command has been removed completely, they have just been moved in the *extra* feature of Nushell. +> **Note** +> No command has been removed completely, they have just been moved in the _extra_ feature of Nushell. > simply use `cargo ... --features extra` to reenable them. Math commands have been moved by [@stormasm] in [#9674], [#9657] and [#9647] and the following @@ -71,35 +74,46 @@ commands have been moved in [#9404]: `fmt`, `each while`, `roll`, `roll down`, ` [#9404]: https://github.com/nushell/nushell/pull/9404 ## Language improvements + Since last release, a few changes have happened to the Nu language itself. ### Declaration and assignment of variables + Until now, declaration keywords such as `let` and `mut` have required the use of parentheses around pipelines to assign the output of a chain of command to a variable. Thanks to [@jntrnr] in [#9658] and [#9589], this syntax has been relaxed for `let` and `mut`. Let's give some examples! -```nushell + +```nushellshell let filenames = ls | where type == file | get name ``` + and -```nushell + +```nushellshell mut my_var = "hello world" | str length ``` + are now completely valid Nushell code. -> **Note** +> **Note** > this new syntax does not work on `const` and it does not apply to assignment of values to variables, e.g. -> ```nushell +> +> ```nushellshell > $env.FILENAMES = ls | where type == file | get name > ``` +> > is not parsed as valid Nushell. Another parser improvement has to do with the use of `if` and `match` in variable assignment. In [#9650], [@Windsoilder] made the following Nushell snippets possible: -```nushell + +```nushellshell mut a = 3 $a = if 4 == 3 { 10 } else {20} ``` + and -```nushell + +```nushellshell $env.BUILD_EXT = match 3 { 1 => { 'yes!' }, _ => { 'no!' } } ``` @@ -110,29 +124,34 @@ $env.BUILD_EXT = match 3 { 1 => { 'yes!' }, _ => { 'no!' } } [#9650]: https://github.com/nushell/nushell/pull/9650 ### Input / output type checking and annotations ([@jntrnr]) + Nushell as a language is more strictly typed than other shell languages. However, not everything was type-checked nor possible to annotate and this new release tries to fill this gap a bit more. -> **Note** -> in the following of this section, the term *input / output signature* is used. This describes the input of a command +> **Note** +> in the following of this section, the term _input / output signature_ is used. This describes the input of a command > and the associated output type of the command for the given input type, e.g. in `ls | get 0.name` the input type of -> `get` is a `table` and its output type is a `string`, so we can say that the *input / output signature* of `get` here +> `get` is a `table` and its output type is a `string`, so we can say that the _input / output signature_ of `get` here > is `table -> string`. > -> Please note that *input / output signatures* always come in pair. +> Please note that _input / output signatures_ always come in pair. First, [#9686] makes the input / output type signatures clearer in the help pages of commands. Then, [#9690] and [#9680] enable input / output type annotations on custom commands and enforce a strong type checking on the input and output of commands. This means a few things + - the input / output of custom commands can be annotated -```nushell + +```nushellshell def sum []: list -> int { math sum } ``` + - some type-invalid calls to commands are now parsed as an error, e.g. `123 | get foo` gives the following error -```nushell + +```nushellshell Error: nu::parser::input_type_mismatch × Command does not support int input. @@ -164,12 +183,15 @@ This is expected and we worked and are working on this to fix all incorrect sign [#9778]: https://github.com/nushell/nushell/pull/9778 ### Shoutouts + In between the two releases, [@1Kinoti](https://github.com/1Kinoti) has worked on some nice improvements to the language + - match guards have been added to the `match` command in [#9621](https://github.com/nushell/nushell/pull/9621) - `table` types can now have parameters, just as `record`s and `list`s can, thansk to [#9613](https://github.com/nushell/nushell/pull/9613) - structural subtyping has been improved in [#9614](https://github.com/nushell/nushell/pull/9614) and allow to match structured types regardless of the orders of the fields ## Configuration tweaks + Contributions have been made to give a more consistent and sensible default experience in Nushell, both when using the `default_config.nu` config file or when not having a config, e.g. with `nu -n`. A better right prompt has been written in [#9585] and [#9581] and the default configuration has been polished in [#9676]. @@ -179,13 +201,15 @@ A better right prompt has been written in [#9585] and [#9581] and the default co [#9676]: https://github.com/nushell/nushell/pull/9676 ## The standard library + The biggest topic in this 0.83 release for the standard library has been the test runner! Thanks to [@Yethal], the test runner of the standard library can now use annotations to decide whether or not to run a command as part of the test suite of a project: [#9628], [#9622], [#9611] and [#9406]. For instance, we can now write a module as follows -```nushell + +```nushellshell def add [a: int, b: int] { $a + $b } @@ -196,6 +220,7 @@ def addition [] { assert equal (add 1 2) 3 } ``` + and `std testing run-tests` would successfully run the `addition` test, no need to define tests with `test_` in their names! Thanks to [@Hofer-Julian] ([#9607]), the standard library now also comes with a `pwd` command that tells you were you are in @@ -213,11 +238,12 @@ the filesystem. **PLEASE NOTE:** there are some big breaking changes in this release. These include: -* Removal of `let-env` (now use the `$env.FOO = "BAR"` form instead) -* Stricter checking of input/output types -* Transitioning of a set of commands to now be avialable via `extra` feature rather than default +- Removal of `let-env` (now use the `$env.FOO = "BAR"` form instead) +- Stricter checking of input/output types +- Transitioning of a set of commands to now be avialable via `extra` feature rather than default Full list of breaking changes: + - [#9574](https://github.com/nushell/nushell/pull/9574) remove let-env, focus on mutating $env - [#9587](https://github.com/nushell/nushell/pull/9587) disallow blocks as first-class values - [#9589](https://github.com/nushell/nushell/pull/9589) `let` no longer allows bareword assignment (Eg, `let foo = bar` where `bar` is assumed to be a string) @@ -231,221 +257,227 @@ Full list of breaking changes: - [#9690](https://github.com/nushell/nushell/pull/9690) The `extern` command has split into `extern` and `extern-wrapped`, the latter allowing a block to be called when calling an extern # Full changelog + ## Nushell + - [sholderbach](https://github.com/sholderbach) created - - [Adjust signatures for cellpath access of tables](https://github.com/nushell/nushell/pull/9778) - - [Update `nu-ansi-term`, `lscolors`, and `reedline`](https://github.com/nushell/nushell/pull/9787) - - [Abort type determination for List early](https://github.com/nushell/nushell/pull/9779) - - [Fix output signature of `split chars`/`words`](https://github.com/nushell/nushell/pull/9739) - - [Use explicit in/out list types for vectorized commands](https://github.com/nushell/nushell/pull/9742) - - [Add explicit input types for vectorized `into int` form](https://github.com/nushell/nushell/pull/9741) - - [Remove underused devdep `getset`](https://github.com/nushell/nushell/pull/9727) - - [Clean up tests containing unnecessary `cwd:` tokens](https://github.com/nushell/nushell/pull/9692) - - [Use `is-terminal` crate for now](https://github.com/nushell/nushell/pull/9670) - - [Bump deps to transitively use hashbrown 0.14](https://github.com/nushell/nushell/pull/9668) - - [Apply nightly clippy lints](https://github.com/nushell/nushell/pull/9654) - - [Update reedline dev version lock](https://github.com/nushell/nushell/pull/9644) - - [Bump `indexmap` to 2.0](https://github.com/nushell/nushell/pull/9643) - - [Remove duplicated dependency on `ansi-str 0.7`](https://github.com/nushell/nushell/pull/9641) - - [Update `proc-macro2` lock, fix nightly build](https://github.com/nushell/nushell/pull/9618) - - [Exclude deprecated commands from completions](https://github.com/nushell/nushell/pull/9612) - - [Document `fn pipeline()` used with `nu!` tests](https://github.com/nushell/nushell/pull/9609) - - [Remove unnecessary parentheses](https://github.com/nushell/nushell/pull/9605) + - [Adjust signatures for cellpath access of tables](https://github.com/nushell/nushell/pull/9778) + - [Update `nu-ansi-term`, `lscolors`, and `reedline`](https://github.com/nushell/nushell/pull/9787) + - [Abort type determination for List early](https://github.com/nushell/nushell/pull/9779) + - [Fix output signature of `split chars`/`words`](https://github.com/nushell/nushell/pull/9739) + - [Use explicit in/out list types for vectorized commands](https://github.com/nushell/nushell/pull/9742) + - [Add explicit input types for vectorized `into int` form](https://github.com/nushell/nushell/pull/9741) + - [Remove underused devdep `getset`](https://github.com/nushell/nushell/pull/9727) + - [Clean up tests containing unnecessary `cwd:` tokens](https://github.com/nushell/nushell/pull/9692) + - [Use `is-terminal` crate for now](https://github.com/nushell/nushell/pull/9670) + - [Bump deps to transitively use hashbrown 0.14](https://github.com/nushell/nushell/pull/9668) + - [Apply nightly clippy lints](https://github.com/nushell/nushell/pull/9654) + - [Update reedline dev version lock](https://github.com/nushell/nushell/pull/9644) + - [Bump `indexmap` to 2.0](https://github.com/nushell/nushell/pull/9643) + - [Remove duplicated dependency on `ansi-str 0.7`](https://github.com/nushell/nushell/pull/9641) + - [Update `proc-macro2` lock, fix nightly build](https://github.com/nushell/nushell/pull/9618) + - [Exclude deprecated commands from completions](https://github.com/nushell/nushell/pull/9612) + - [Document `fn pipeline()` used with `nu!` tests](https://github.com/nushell/nushell/pull/9609) + - [Remove unnecessary parentheses](https://github.com/nushell/nushell/pull/9605) - [app/dependabot](https://github.com/app/dependabot) created - - [Bump pretty_assertions from 1.3.0 to 1.4.0](https://github.com/nushell/nushell/pull/9781) - - [Bump tempfile from 3.6.0 to 3.7.0](https://github.com/nushell/nushell/pull/9780) - - [Bump miette from 5.9.0 to 5.10.0](https://github.com/nushell/nushell/pull/9713) - - [Bump strum_macros from 0.24.3 to 0.25.1](https://github.com/nushell/nushell/pull/9714) - - [Bump strum from 0.24.1 to 0.25.0](https://github.com/nushell/nushell/pull/9639) - - [Bump scraper from 0.16.0 to 0.17.1](https://github.com/nushell/nushell/pull/9638) - - [Bump libproc from 0.13.0 to 0.14.0](https://github.com/nushell/nushell/pull/9640) - - [Bump tempfile from 3.5.0 to 3.6.0](https://github.com/nushell/nushell/pull/9591) - - [Bump calamine from 0.19.1 to 0.21.2](https://github.com/nushell/nushell/pull/9592) - - [Bump ureq from 2.6.2 to 2.7.1](https://github.com/nushell/nushell/pull/9590) - - [Bump open from 4.1.0 to 5.0.0](https://github.com/nushell/nushell/pull/9526) + - [Bump pretty_assertions from 1.3.0 to 1.4.0](https://github.com/nushell/nushell/pull/9781) + - [Bump tempfile from 3.6.0 to 3.7.0](https://github.com/nushell/nushell/pull/9780) + - [Bump miette from 5.9.0 to 5.10.0](https://github.com/nushell/nushell/pull/9713) + - [Bump strum_macros from 0.24.3 to 0.25.1](https://github.com/nushell/nushell/pull/9714) + - [Bump strum from 0.24.1 to 0.25.0](https://github.com/nushell/nushell/pull/9639) + - [Bump scraper from 0.16.0 to 0.17.1](https://github.com/nushell/nushell/pull/9638) + - [Bump libproc from 0.13.0 to 0.14.0](https://github.com/nushell/nushell/pull/9640) + - [Bump tempfile from 3.5.0 to 3.6.0](https://github.com/nushell/nushell/pull/9591) + - [Bump calamine from 0.19.1 to 0.21.2](https://github.com/nushell/nushell/pull/9592) + - [Bump ureq from 2.6.2 to 2.7.1](https://github.com/nushell/nushell/pull/9590) + - [Bump open from 4.1.0 to 5.0.0](https://github.com/nushell/nushell/pull/9526) - [amtoine](https://github.com/amtoine) created - - [add `table -> table` to `into datetime`](https://github.com/nushell/nushell/pull/9775) - - [change the output of `which` to be more explicit](https://github.com/nushell/nushell/pull/9646) - - [add `any -> record` to `metadata`](https://github.com/nushell/nushell/pull/9755) - - [sync default config / env with default behaviour without any configuration](https://github.com/nushell/nushell/pull/9676) - - [allow `into filesize` to take tables as input / output](https://github.com/nushell/nushell/pull/9706) - - [simplify the test for `let` core command](https://github.com/nushell/nushell/pull/9671) - - [fix the `std` test commands calls in dev documents](https://github.com/nushell/nushell/pull/9535) - - [refactor the CI](https://github.com/nushell/nushell/pull/9626) - - [REFACTOR: move the 0% commands to `nu-cmd-extra`](https://github.com/nushell/nushell/pull/9404) - - [simplify the `nu!` tests for `last` and `first` commands](https://github.com/nushell/nushell/pull/9608) + - [add `table -> table` to `into datetime`](https://github.com/nushell/nushell/pull/9775) + - [change the output of `which` to be more explicit](https://github.com/nushell/nushell/pull/9646) + - [add `any -> record` to `metadata`](https://github.com/nushell/nushell/pull/9755) + - [sync default config / env with default behaviour without any configuration](https://github.com/nushell/nushell/pull/9676) + - [allow `into filesize` to take tables as input / output](https://github.com/nushell/nushell/pull/9706) + - [simplify the test for `let` core command](https://github.com/nushell/nushell/pull/9671) + - [fix the `std` test commands calls in dev documents](https://github.com/nushell/nushell/pull/9535) + - [refactor the CI](https://github.com/nushell/nushell/pull/9626) + - [REFACTOR: move the 0% commands to `nu-cmd-extra`](https://github.com/nushell/nushell/pull/9404) + - [simplify the `nu!` tests for `last` and `first` commands](https://github.com/nushell/nushell/pull/9608) - [hexavik](https://github.com/hexavik) created - - [Fix: remove unnecessary `r#"..."#` (#8670)](https://github.com/nushell/nushell/pull/9764) + - [Fix: remove unnecessary `r#"..."#` (#8670)](https://github.com/nushell/nushell/pull/9764) - [mengsuenyan](https://github.com/mengsuenyan) created - - [fix #9653 the cmd `detect columns` with the flag `-c`](https://github.com/nushell/nushell/pull/9667) - - [fix the command `cp -u src dst`/`mv -u src dst` doesn't work when the…](https://github.com/nushell/nushell/pull/9662) + - [fix #9653 the cmd `detect columns` with the flag `-c`](https://github.com/nushell/nushell/pull/9667) + - [fix the command `cp -u src dst`/`mv -u src dst` doesn't work when the…](https://github.com/nushell/nushell/pull/9662) - [IanManske](https://github.com/IanManske) created - - [Add functions for each `Value` case](https://github.com/nushell/nushell/pull/9736) - - [nushell should be non-interactive if `--testbin` is supplied](https://github.com/nushell/nushell/pull/9730) - - [Do not attempt to take control of terminal in non-interactive mode](https://github.com/nushell/nushell/pull/9693) - - [Fix SIGTTIN handling](https://github.com/nushell/nushell/pull/9681) - - [Fix `headers` command handling of missing values](https://github.com/nushell/nushell/pull/9603) + - [Add functions for each `Value` case](https://github.com/nushell/nushell/pull/9736) + - [nushell should be non-interactive if `--testbin` is supplied](https://github.com/nushell/nushell/pull/9730) + - [Do not attempt to take control of terminal in non-interactive mode](https://github.com/nushell/nushell/pull/9693) + - [Fix SIGTTIN handling](https://github.com/nushell/nushell/pull/9681) + - [Fix `headers` command handling of missing values](https://github.com/nushell/nushell/pull/9603) - [fdncred](https://github.com/fdncred) created - - [update history_isolation to false](https://github.com/nushell/nushell/pull/9763) - - [change the default of history.isolation](https://github.com/nushell/nushell/pull/9762) - - [handle sqlite tables better by surrounding with brackets](https://github.com/nushell/nushell/pull/9752) - - [add range input to par-each](https://github.com/nushell/nushell/pull/9749) - - [normalize default_config/env formatting](https://github.com/nushell/nushell/pull/9731) - - [allow range as a input_output_type on filter](https://github.com/nushell/nushell/pull/9707) - - [update rust toolchain to 1.69.0](https://github.com/nushell/nushell/pull/9691) - - [add more input_output_types found from breaking scripts](https://github.com/nushell/nushell/pull/9683) - - [add kind and state to other key presses](https://github.com/nushell/nushell/pull/9669) - - [fix right prompt in the default_env.nu](https://github.com/nushell/nushell/pull/9581) - - [fix typo in deprecated message: `$nu` should be `$env`](https://github.com/nushell/nushell/pull/9579) - - [update ide-check help text](https://github.com/nushell/nushell/pull/9559) - - [add input_output type to `input list` to return string](https://github.com/nushell/nushell/pull/9557) - - [convert a string to a raw binary string of 0s and 1s](https://github.com/nushell/nushell/pull/9534) - - [update sqlparser dep to 0.34](https://github.com/nushell/nushell/pull/9549) + - [update history_isolation to false](https://github.com/nushell/nushell/pull/9763) + - [change the default of history.isolation](https://github.com/nushell/nushell/pull/9762) + - [handle sqlite tables better by surrounding with brackets](https://github.com/nushell/nushell/pull/9752) + - [add range input to par-each](https://github.com/nushell/nushell/pull/9749) + - [normalize default_config/env formatting](https://github.com/nushell/nushell/pull/9731) + - [allow range as a input_output_type on filter](https://github.com/nushell/nushell/pull/9707) + - [update rust toolchain to 1.69.0](https://github.com/nushell/nushell/pull/9691) + - [add more input_output_types found from breaking scripts](https://github.com/nushell/nushell/pull/9683) + - [add kind and state to other key presses](https://github.com/nushell/nushell/pull/9669) + - [fix right prompt in the default_env.nu](https://github.com/nushell/nushell/pull/9581) + - [fix typo in deprecated message: `$nu` should be `$env`](https://github.com/nushell/nushell/pull/9579) + - [update ide-check help text](https://github.com/nushell/nushell/pull/9559) + - [add input_output type to `input list` to return string](https://github.com/nushell/nushell/pull/9557) + - [convert a string to a raw binary string of 0s and 1s](https://github.com/nushell/nushell/pull/9534) + - [update sqlparser dep to 0.34](https://github.com/nushell/nushell/pull/9549) - [atahabaki](https://github.com/atahabaki) created - - [str-expand: new capability, empty collection item](https://github.com/nushell/nushell/pull/9750) - - [A new subcommand to str, str-expand.](https://github.com/nushell/nushell/pull/9290) + - [str-expand: new capability, empty collection item](https://github.com/nushell/nushell/pull/9750) + - [A new subcommand to str, str-expand.](https://github.com/nushell/nushell/pull/9290) - [jntrnr](https://github.com/jntrnr) created - - [Fix capture logic for inner closures](https://github.com/nushell/nushell/pull/9754) - - [fix input signature of let/mut](https://github.com/nushell/nushell/pull/9695) - - [Revert "Fix SIGTTIN handling"](https://github.com/nushell/nushell/pull/9694) - - [Custom command input/output types](https://github.com/nushell/nushell/pull/9690) - - [Change input/output types in help to a table](https://github.com/nushell/nushell/pull/9686) - - [Input output checking](https://github.com/nushell/nushell/pull/9680) - - [Remove broken compile-time overload system](https://github.com/nushell/nushell/pull/9677) - - [allow mut to take pipelines](https://github.com/nushell/nushell/pull/9658) - - [Move to using a safer shell integration default setting](https://github.com/nushell/nushell/pull/9600) - - [Let with pipeline](https://github.com/nushell/nushell/pull/9589) - - [disallow blocks as first-class values](https://github.com/nushell/nushell/pull/9587) - - [use an easier-to-read date format in prompt](https://github.com/nushell/nushell/pull/9585) - - [fix a few clippy issues](https://github.com/nushell/nushell/pull/9578) - - [remove let-env, focus on mutating $env](https://github.com/nushell/nushell/pull/9574) - - [Improve type hovers](https://github.com/nushell/nushell/pull/9515) + - [Fix capture logic for inner closures](https://github.com/nushell/nushell/pull/9754) + - [fix input signature of let/mut](https://github.com/nushell/nushell/pull/9695) + - [Revert "Fix SIGTTIN handling"](https://github.com/nushell/nushell/pull/9694) + - [Custom command input/output types](https://github.com/nushell/nushell/pull/9690) + - [Change input/output types in help to a table](https://github.com/nushell/nushell/pull/9686) + - [Input output checking](https://github.com/nushell/nushell/pull/9680) + - [Remove broken compile-time overload system](https://github.com/nushell/nushell/pull/9677) + - [allow mut to take pipelines](https://github.com/nushell/nushell/pull/9658) + - [Move to using a safer shell integration default setting](https://github.com/nushell/nushell/pull/9600) + - [Let with pipeline](https://github.com/nushell/nushell/pull/9589) + - [disallow blocks as first-class values](https://github.com/nushell/nushell/pull/9587) + - [use an easier-to-read date format in prompt](https://github.com/nushell/nushell/pull/9585) + - [fix a few clippy issues](https://github.com/nushell/nushell/pull/9578) + - [remove let-env, focus on mutating $env](https://github.com/nushell/nushell/pull/9574) + - [Improve type hovers](https://github.com/nushell/nushell/pull/9515) - [cramt](https://github.com/cramt) created - - [fix removing symlinks on windows](https://github.com/nushell/nushell/pull/9704) + - [fix removing symlinks on windows](https://github.com/nushell/nushell/pull/9704) - [WindSoilder](https://github.com/WindSoilder) created - - [Redirection: make `o>`, `e>`, `o+e>`'s target support variables and string interpolation](https://github.com/nushell/nushell/pull/9747) - - [support env assignment and mutable variable assignment with `if` block and `match` guard](https://github.com/nushell/nushell/pull/9650) - - [dependency: use notify-debouncer-full(based on notify v6) instead of notify v4](https://github.com/nushell/nushell/pull/9606) - - [Bracketed paste refactor](https://github.com/nushell/nushell/pull/9547) - - [fix cd permissions when user belongs to folder group](https://github.com/nushell/nushell/pull/9531) - - [`rename`: add -b flag to support closure input](https://github.com/nushell/nushell/pull/8948) + - [Redirection: make `o>`, `e>`, `o+e>`'s target support variables and string interpolation](https://github.com/nushell/nushell/pull/9747) + - [support env assignment and mutable variable assignment with `if` block and `match` guard](https://github.com/nushell/nushell/pull/9650) + - [dependency: use notify-debouncer-full(based on notify v6) instead of notify v4](https://github.com/nushell/nushell/pull/9606) + - [Bracketed paste refactor](https://github.com/nushell/nushell/pull/9547) + - [fix cd permissions when user belongs to folder group](https://github.com/nushell/nushell/pull/9531) + - [`rename`: add -b flag to support closure input](https://github.com/nushell/nushell/pull/8948) - [stormasm](https://github.com/stormasm) created - - [add in a Readme for the crate nu-cmd-extra](https://github.com/nushell/nushell/pull/9745) - - [remove warning: unused import pipeline](https://github.com/nushell/nushell/pull/9675) - - [cratification: part III of the math commands to nu-cmd-extra](https://github.com/nushell/nushell/pull/9674) - - [cratification: part II of the math commands to nu-cmd-extra](https://github.com/nushell/nushell/pull/9657) - - [cratification: start moving over the math commands to nu-cmd-extra](https://github.com/nushell/nushell/pull/9647) + - [add in a Readme for the crate nu-cmd-extra](https://github.com/nushell/nushell/pull/9745) + - [remove warning: unused import pipeline](https://github.com/nushell/nushell/pull/9675) + - [cratification: part III of the math commands to nu-cmd-extra](https://github.com/nushell/nushell/pull/9674) + - [cratification: part II of the math commands to nu-cmd-extra](https://github.com/nushell/nushell/pull/9657) + - [cratification: start moving over the math commands to nu-cmd-extra](https://github.com/nushell/nushell/pull/9647) - [dmatos2012](https://github.com/dmatos2012) created - - [Disallow empty record with empty key,value pairs on ini format](https://github.com/nushell/nushell/pull/9722) + - [Disallow empty record with empty key,value pairs on ini format](https://github.com/nushell/nushell/pull/9722) - [nibon7](https://github.com/nibon7) created - - [Remove `is-root` crate](https://github.com/nushell/nushell/pull/9615) - - [Replace `users` with `nix` crate](https://github.com/nushell/nushell/pull/9610) - - [Fix cargo-build-nu](https://github.com/nushell/nushell/pull/9571) - - [Refactor cargo-build-nu](https://github.com/nushell/nushell/pull/9554) - - [Fix release workflows](https://github.com/nushell/nushell/pull/9542) + - [Remove `is-root` crate](https://github.com/nushell/nushell/pull/9615) + - [Replace `users` with `nix` crate](https://github.com/nushell/nushell/pull/9610) + - [Fix cargo-build-nu](https://github.com/nushell/nushell/pull/9571) + - [Refactor cargo-build-nu](https://github.com/nushell/nushell/pull/9554) + - [Fix release workflows](https://github.com/nushell/nushell/pull/9542) - [1Kinoti](https://github.com/1Kinoti) created - - [add match guards](https://github.com/nushell/nushell/pull/9621) - - [allow tables to have annotations](https://github.com/nushell/nushell/pull/9613) - - [improve subtyping](https://github.com/nushell/nushell/pull/9614) + - [add match guards](https://github.com/nushell/nushell/pull/9621) + - [allow tables to have annotations](https://github.com/nushell/nushell/pull/9613) + - [improve subtyping](https://github.com/nushell/nushell/pull/9614) - [kubouch](https://github.com/kubouch) created - - [Refactor path commands](https://github.com/nushell/nushell/pull/9687) - - [Fix broken constants in scopes](https://github.com/nushell/nushell/pull/9679) + - [Refactor path commands](https://github.com/nushell/nushell/pull/9687) + - [Fix broken constants in scopes](https://github.com/nushell/nushell/pull/9679) - [zhiburt](https://github.com/zhiburt) created - - [nu-explore/ Add handlers for HOME/END keys](https://github.com/nushell/nushell/pull/9666) - - [Fix #9548](https://github.com/nushell/nushell/pull/9552) + - [nu-explore/ Add handlers for HOME/END keys](https://github.com/nushell/nushell/pull/9666) + - [Fix #9548](https://github.com/nushell/nushell/pull/9552) - [hanjunghyuk](https://github.com/hanjunghyuk) created - - [Remove unnecessary `cwd`, `pipeline()`, `r#` from various tests](https://github.com/nushell/nushell/pull/9645) - - [Fix `explore` crashes on {}](https://github.com/nushell/nushell/pull/9623) + - [Remove unnecessary `cwd`, `pipeline()`, `r#` from various tests](https://github.com/nushell/nushell/pull/9645) + - [Fix `explore` crashes on {}](https://github.com/nushell/nushell/pull/9623) - [Yethal](https://github.com/Yethal) created - - [test-runner: add configurable threading](https://github.com/nushell/nushell/pull/9628) - - [test-runner: Performance improvements + regex match for test include/exclude](https://github.com/nushell/nushell/pull/9622) - - [test-runner: Add option to exclude single test and module](https://github.com/nushell/nushell/pull/9611) - - [Implement annotations support in test runner](https://github.com/nushell/nushell/pull/9406) - - [Pre-register plugins inside docker container](https://github.com/nushell/nushell/pull/9533) + - [test-runner: add configurable threading](https://github.com/nushell/nushell/pull/9628) + - [test-runner: Performance improvements + regex match for test include/exclude](https://github.com/nushell/nushell/pull/9622) + - [test-runner: Add option to exclude single test and module](https://github.com/nushell/nushell/pull/9611) + - [Implement annotations support in test runner](https://github.com/nushell/nushell/pull/9406) + - [Pre-register plugins inside docker container](https://github.com/nushell/nushell/pull/9533) - [AyushSingh13](https://github.com/AyushSingh13) created - - [fixes `which` showing aliases as built-in nushell commands](https://github.com/nushell/nushell/pull/9580) + - [fixes `which` showing aliases as built-in nushell commands](https://github.com/nushell/nushell/pull/9580) - [YassineHaouzane](https://github.com/YassineHaouzane) created - - [Fix: update engine_state when history.isolation is true (#9268)](https://github.com/nushell/nushell/pull/9616) + - [Fix: update engine_state when history.isolation is true (#9268)](https://github.com/nushell/nushell/pull/9616) - [Hofer-Julian](https://github.com/Hofer-Julian) created - - [Add `pwd` command to stdlib](https://github.com/nushell/nushell/pull/9607) + - [Add `pwd` command to stdlib](https://github.com/nushell/nushell/pull/9607) - [NotLebedev](https://github.com/NotLebedev) created - - [Command to get individual keys](https://github.com/nushell/nushell/pull/9453) + - [Command to get individual keys](https://github.com/nushell/nushell/pull/9453) - [rusty-jules](https://github.com/rusty-jules) created - - [Fix: return all headers with the same name from `http `](https://github.com/nushell/nushell/pull/9594) + - [Fix: return all headers with the same name from `http `](https://github.com/nushell/nushell/pull/9594) - [baehyunsol](https://github.com/baehyunsol) created - - [make the behaviours of `last` and `first` more consistent](https://github.com/nushell/nushell/pull/9582) + - [make the behaviours of `last` and `first` more consistent](https://github.com/nushell/nushell/pull/9582) - [bgmort](https://github.com/bgmort) created - - [Add useful example to `http options` documentation](https://github.com/nushell/nushell/pull/9576) + - [Add useful example to `http options` documentation](https://github.com/nushell/nushell/pull/9576) ## Extension + - [fdncred](https://github.com/fdncred) created - - [forgot to merge changes for 1.60](https://github.com/nushell/vscode-nushell-lang/pull/145) + - [forgot to merge changes for 1.60](https://github.com/nushell/vscode-nushell-lang/pull/145) ## Documentation + - [amtoine](https://github.com/amtoine) created - - [refactor `ssh-agent` cookbook example](https://github.com/nushell/nushell.github.io/pull/982) - - [remove all `| table` from the book](https://github.com/nushell/nushell.github.io/pull/976) - - [add a more complete example to persist aliases in `config.nu`](https://github.com/nushell/nushell.github.io/pull/973) + - [refactor `ssh-agent` cookbook example](https://github.com/nushell/nushell.github.io/pull/982) + - [remove all `| table` from the book](https://github.com/nushell/nushell.github.io/pull/976) + - [add a more complete example to persist aliases in `config.nu`](https://github.com/nushell/nushell.github.io/pull/973) - [Heidar-An](https://github.com/Heidar-An) created - - [Update nushell_map_imperative.md](https://github.com/nushell/nushell.github.io/pull/986) + - [Update nushell_map_imperative.md](https://github.com/nushell/nushell.github.io/pull/986) - [JoaquinTrinanes](https://github.com/JoaquinTrinanes) created - - [Add external completers cookbook entry to sidebar](https://github.com/nushell/nushell.github.io/pull/985) - - [Expand external completer docs](https://github.com/nushell/nushell.github.io/pull/984) + - [Add external completers cookbook entry to sidebar](https://github.com/nushell/nushell.github.io/pull/985) + - [Expand external completer docs](https://github.com/nushell/nushell.github.io/pull/984) - [fachammer](https://github.com/fachammer) created - - [Fix link](https://github.com/nushell/nushell.github.io/pull/981) - - [Fix typo](https://github.com/nushell/nushell.github.io/pull/980) - - [Fix typo](https://github.com/nushell/nushell.github.io/pull/979) + - [Fix link](https://github.com/nushell/nushell.github.io/pull/981) + - [Fix typo](https://github.com/nushell/nushell.github.io/pull/980) + - [Fix typo](https://github.com/nushell/nushell.github.io/pull/979) - [hustcer](https://github.com/hustcer) created - - [Use lefthook instead of husky and lint-staged for git hooks](https://github.com/nushell/nushell.github.io/pull/978) - - [Refresh commands docs for Nu v0.82](https://github.com/nushell/nushell.github.io/pull/965) + - [Use lefthook instead of husky and lint-staged for git hooks](https://github.com/nushell/nushell.github.io/pull/978) + - [Refresh commands docs for Nu v0.82](https://github.com/nushell/nushell.github.io/pull/965) - [Equationzhao](https://github.com/Equationzhao) created - - [fix a broken link in plugins page in zh-CN](https://github.com/nushell/nushell.github.io/pull/975) + - [fix a broken link in plugins page in zh-CN](https://github.com/nushell/nushell.github.io/pull/975) - [Hofer-Julian](https://github.com/Hofer-Julian) created - - [Remove `&&` and `||`](https://github.com/nushell/nushell.github.io/pull/974) + - [Remove `&&` and `||`](https://github.com/nushell/nushell.github.io/pull/974) - [jarrodu](https://github.com/jarrodu) created - - [Fix typo](https://github.com/nushell/nushell.github.io/pull/971) + - [Fix typo](https://github.com/nushell/nushell.github.io/pull/971) - [sholderbach](https://github.com/sholderbach) created - - [Automate response to PRs trying to update commands](https://github.com/nushell/nushell.github.io/pull/969) + - [Automate response to PRs trying to update commands](https://github.com/nushell/nushell.github.io/pull/969) - [waldyrious](https://github.com/waldyrious) created - - [Fix typo in 2023-06-27-nushell_0_82.md](https://github.com/nushell/nushell.github.io/pull/967) + - [Fix typo in 2023-06-27-nushell_0_82.md](https://github.com/nushell/nushell.github.io/pull/967) ## Nu_Scripts + - [amtoine](https://github.com/amtoine) created - - [add `$.version` to `package.nuon`](https://github.com/nushell/nu_scripts/pull/548) - - [move the extra menus of Nushell into `custom-menus/extra/`](https://github.com/nushell/nu_scripts/pull/550) - - [make the release note TODOs HTML comments](https://github.com/nushell/nu_scripts/pull/557) - - [refactor: simplify the `nu_release` script](https://github.com/nushell/nu_scripts/pull/540) - - [fix the release note scripts](https://github.com/nushell/nu_scripts/pull/538) - - [update the `make_release/Readme.md` with the whole process](https://github.com/nushell/nu_scripts/pull/541) - - [use `$env.` instead of `let-env `](https://github.com/nushell/nu_scripts/pull/543) + - [add `$.version` to `package.nuon`](https://github.com/nushell/nu_scripts/pull/548) + - [move the extra menus of Nushell into `custom-menus/extra/`](https://github.com/nushell/nu_scripts/pull/550) + - [make the release note TODOs HTML comments](https://github.com/nushell/nu_scripts/pull/557) + - [refactor: simplify the `nu_release` script](https://github.com/nushell/nu_scripts/pull/540) + - [fix the release note scripts](https://github.com/nushell/nu_scripts/pull/538) + - [update the `make_release/Readme.md` with the whole process](https://github.com/nushell/nu_scripts/pull/541) + - [use `$env.` instead of `let-env `](https://github.com/nushell/nu_scripts/pull/543) - [jntrnr](https://github.com/jntrnr) created - - [Update some benchmarks. Re-port the gradient benchmark](https://github.com/nushell/nu_scripts/pull/558) + - [Update some benchmarks. Re-port the gradient benchmark](https://github.com/nushell/nu_scripts/pull/558) - [JalonWong](https://github.com/JalonWong) created - - [Add a git prompt](https://github.com/nushell/nu_scripts/pull/555) + - [Add a git prompt](https://github.com/nushell/nu_scripts/pull/555) - [fj0r](https://github.com/fj0r) created - - [ssh complete cache use whitelist](https://github.com/nushell/nu_scripts/pull/553) - - [upgrade to 0.82](https://github.com/nushell/nu_scripts/pull/539) + - [ssh complete cache use whitelist](https://github.com/nushell/nu_scripts/pull/553) + - [upgrade to 0.82](https://github.com/nushell/nu_scripts/pull/539) - [fdncred](https://github.com/fdncred) created - - [fix error background color in oh-my.nu script](https://github.com/nushell/nu_scripts/pull/551) + - [fix error background color in oh-my.nu script](https://github.com/nushell/nu_scripts/pull/551) - [maxim-uvarov](https://github.com/maxim-uvarov) created - - [conda fix](https://github.com/nushell/nu_scripts/pull/547) + - [conda fix](https://github.com/nushell/nu_scripts/pull/547) - [trantor](https://github.com/trantor) created - - [Update README.md: typo](https://github.com/nushell/nu_scripts/pull/545) + - [Update README.md: typo](https://github.com/nushell/nu_scripts/pull/545) - [dedebenui](https://github.com/dedebenui) created - - [fix pass-completion as `let` cannot be used at module level](https://github.com/nushell/nu_scripts/pull/544) + - [fix pass-completion as `let` cannot be used at module level](https://github.com/nushell/nu_scripts/pull/544) - [bobhy](https://github.com/bobhy) created - - [full line v2; with git status!](https://github.com/nushell/nu_scripts/pull/542) + - [full line v2; with git status!](https://github.com/nushell/nu_scripts/pull/542) ## Reedline + - [sholderbach](https://github.com/sholderbach) created - - [Bump `nu-ansi-term` to 0.49.0](https://github.com/nushell/reedline/pull/613) - - [Update the `Cargo.lock` for tests and demo](https://github.com/nushell/reedline/pull/611) - - [Fix clippy lint for DoubleEndedIterator](https://github.com/nushell/reedline/pull/610) - - [Update (dev-)deps strum/pretty-assertions,rstest](https://github.com/nushell/reedline/pull/600) + - [Bump `nu-ansi-term` to 0.49.0](https://github.com/nushell/reedline/pull/613) + - [Update the `Cargo.lock` for tests and demo](https://github.com/nushell/reedline/pull/611) + - [Fix clippy lint for DoubleEndedIterator](https://github.com/nushell/reedline/pull/610) + - [Update (dev-)deps strum/pretty-assertions,rstest](https://github.com/nushell/reedline/pull/600) - [nibon7](https://github.com/nibon7) created - - [Fix big_word_left_index](https://github.com/nushell/reedline/pull/609) - - [Remove unneeded features of chrono](https://github.com/nushell/reedline/pull/599) + - [Fix big_word_left_index](https://github.com/nushell/reedline/pull/609) + - [Remove unneeded features of chrono](https://github.com/nushell/reedline/pull/599) - [NotLebedev](https://github.com/NotLebedev) created - - [Replace crossterm ScrollUp with universal workaround](https://github.com/nushell/reedline/pull/601) + - [Replace crossterm ScrollUp with universal workaround](https://github.com/nushell/reedline/pull/601) - [WindSoilder](https://github.com/WindSoilder) created - - [always disable bracketed paste after read_line](https://github.com/nushell/reedline/pull/598) + - [always disable bracketed paste after read_line](https://github.com/nushell/reedline/pull/598) diff --git a/blog/2023-07-30-nushell_0_83_1.md b/src/content/docs/blog/2023-07-30-nushell_0_83_1.md similarity index 100% rename from blog/2023-07-30-nushell_0_83_1.md rename to src/content/docs/blog/2023-07-30-nushell_0_83_1.md diff --git a/src/content/docs/blog/2023-08-22-nushell_0_84_0.md b/src/content/docs/blog/2023-08-22-nushell_0_84_0.md new file mode 100644 index 00000000000..f54f4631db8 --- /dev/null +++ b/src/content/docs/blog/2023-08-22-nushell_0_84_0.md @@ -0,0 +1,428 @@ +--- +title: Nushell 0.84.0 +author: The Nu Authors +author_site: https://twitter.com/nu_shell +author_image: https://www.nushell.sh/blog/images/nu_logo.png +excerpt: Today, we're releasing version 0.84.0 of Nu. This release adds adds exporting constants from modules, `scope` commands improvements, cosmetic changes, and many smaller changes to our commands. +--- + +# Nushell 0.84.0 + +Nushell, or Nu for short, is a new shell that takes a modern, structured approach to your command line. It works seamlessly with the data from your filesystem, operating system, and a growing number of file formats to make it easy to build powerful command line pipelines. + +Today, we're releasing version 0.84.0 of Nu. This release adds exporting constants from modules, `scope` commands improvements, cosmetic changes, and many smaller changes to our commands. + + + +# Where to get it + +Nu 0.84.0 is available as [pre-built binaries](https://github.com/nushell/nushell/releases/tag/0.84.0) or from [crates.io](https://crates.io/crates/nu). If you have Rust installed you can install it using `cargo install nu`. + +NOTE: The optional dataframe functionality is available by `cargo install nu --features=dataframe`. + +As part of this release, we also publish a set of optional plugins you can install and use with Nu. To install, use `cargo install nu_plugin_`. + +# Themes of this release / New features + +## (Major Breaking Change!) `str replace` matches substring by default ([kubouch](https://github.com/nushell/nushell/pull/10038)) + +::: warning Breaking change +See a full overview of the [breaking changes](#breaking-changes) +::: + +`str replace` now matches a substring instead of a regular expression by default and the `-s`/`--string` flag is deprecated (will be removed altogether in 0.85). Matching a substring by default makes it more consistent with the rest of the Nushell's commands. + +> :bulb: **Note!** +> Since `str replace` is a widely used command, many scripts are going to break. Fixing it is easy: +> +> - If you used `str replace` **without** the `-s`/`--string` flag, you used regex matching and you should add `--regex` flag to keep the previous functionality. +> - If you used `str replace` **with** the `-s`/`--string` flag, you will get a deprecation warning. To get rid of the warning, simply remove the flag. + +## Constants from modules ([WindSoilder](https://github.com/nushell/nushell/pull/9773), [kubouch](https://github.com/nushell/nushell/pull/10049)) + +You can now use constants in modules and export them. Calling `use` on a module will create record containing all module's constants. You can also import the constants directly, for example with `use module.nu const-name`, without creating the module's record. Example: + +```nushellshell +> module spam { + export const X = 'x' + export module eggs { + export const Y = 'y' + export const viking = 'eats' + } +} + +> use spam + +> $spam +╭──────┬───────────────────╮ +│ eggs │ {record 2 fields} │ +│ X │ x │ +╰──────┴───────────────────╯ + +> $spam.eggs +╭────────┬──────╮ +│ Y │ y │ +│ viking │ eats │ +╰────────┴──────╯ + +> use spam eggs viking + +> $viking +eats +``` + +The exported values are true constants which means that you can use them in some scenarios where you cannot use normal variables, such as: + +```nushellshell +> module files { + export const MY_CONFIG = '/home/viking/.config/nushell/my_config.nu' +} + +> use files MY_CONFIG + +> source $MY_CONFIG # sources '/home/viking/.config/nushell/my_config.nu' +``` + +## New options for more compact table display ([@zhiburt](https://github.com/nushell/nushell/pull/9983), [#9796](https://github.com/nushell/nushell/pull/9796)) + +To save screen space, you can now display tables with the header directly displayed on the border through the `$env.config.table.header_on_separator` option. + +![Table with header displayed on border](../assets/images/0_84_table_compact.png) + +Additionally you can now configure the `padding` left and right of the table cell content either separately or all at once to adjust the layout for your readability needs. + +![Table with different padding options](../assets/images/0_84_table_padding.png) + +## More consistent `format ...` commands ([@sholderbach](https://github.com/nushell/nushell/pull/9788), [@WindSoilder](https://github.com/nushell/nushell/pull/9902)) + +::: warning Breaking change +See a full overview of the [breaking changes](#breaking-changes) +::: + +With this release we moved several commands that serve to produce string output from a particular data type as `format` subcommands. + +1. `date format` has been renamed to `format date` ([#9788](https://github.com/nushell/nushell/pull/9788)). +2. `into duration --convert` was previously used to provide string representations of `duration`s. This option has been removed and you should now use `format duration`. ([#9902](https://github.com/nushell/nushell/pull/9902)) +3. `format filesize` that was previously moved into the `--features extra` set is back in the core ([#9978](https://github.com/nushell/nushell/pull/9978)). + +## `scope` commands enhancements ([kubouch](https://github.com/nushell/nushell/pull/10023), [kubouch](https://github.com/nushell/nushell/pull/10045)) + +`scope` commands received a significant amount of improvements making them more useful for advanced introspection of Nushell's definitions. + +- `scope externs` now lists known externals (defined with `extern`) +- `scope aliases` is now fixed and lists names and usages of the aliases, not of the aliased commands (this used to cause some confusion) +- `scope modules` now lists all the exportable of the module, including submodules with their contents +- all `scope` commands now list the definition's ID which can be used for reliable tracking of definitions. For example, a command `foo` imported from a module `spam` using `use spam` will be named `spam foo`, therefore, relying solely on names of the definitions can sometimes be misleading. +- `module_name` field is no longer present +- `scope variables` now denotes whether a variable is a constant or not + +## `http` commands now handle headers better ([@jflics6460](https://github.com/nushell/nushell/pull/9771), [@ineu](https://github.com/nushell/nushell/pull/10022) + +You can now pass headers directly as a record to the `-H` flag. + +```nushellshell +http get -H {cookie: "acc=foobar"} http://example.com +``` + +When running a `http` command with `--full` to get additional metadata about the response you can now get both the request and the reponse header + +```nushellshell +http get --full -H {cooke: "my=cookie"} | get headers | get response +``` + +## Work on the optional dataframe features ([@ayax79](https://github.com/ayax79)) + +[@ayax79](https://github.com/ayax79) has been working hard to update our dataframe command to work again with the stricter type check by consolidating internal logic ([#9860](https://github.com/nushell/nushell/pull/9860), +[#9951](https://github.com/nushell/nushell/pull/9951)). + +Furthermore, `dfr open` now suppports the avro exchange format and a new `dfr to-avro` command was added in [#10019](https://github.com/nushell/nushell/pull/10019) + +## Changes to other commands + +Since last release, some commands have changed, here is a list of some interesting changed + +- [@atahabaki](https://github.com/atahabaki) in [#9841](https://github.com/nushell/nushell/pull/9841), [#9856](https://github.com/nushell/nushell/pull/9856) and [#9940](https://github.com/nushell/nushell/pull/9940): Some refinement of the `str expand` command (it's a really cool command, i recommend you check it out :)) +- [@fdncred](https://github.com/fdncred) in [#9987](https://github.com/nushell/nushell/pull/9987): Allow `select` to take a variable with a list of columns +- [@fdncred](https://github.com/fdncred) in [#10048](https://github.com/nushell/nushell/pull/10048): Allow `int` as a _cellpath_ for `select` + +## Command organization ([@storm](https://github.com/nushell/nushell/pull/9926), [@jntrnr](https://github.com/nushell/nushell/pull/10051)) + +In our efforts towards stabilization we moved several commands either behind the `--features extra` build-flag or back into the core set of commands. +The special `str *-case` commands for example have been moved out of the core set, while the `bytes` commands to deal with bytes in arbitrary encodings have returned to the core set. +Furthermore all commands in the core set should now have helpful categories associated with them. + +## Deprecation and removal of commands ([@amtoine](https://github.com/nushell/nushell/pull/9840), [@sholderbach](https://github.com/nushell/nushell/pull/10000)) + +We previously used the term "deprecation" pretty loosely to describe the removal of commands while emitting a helpful error. We intend to now start to use deprecation to warn you before the final removal of a particular option or command. +When we removed a command we will now properly refer to it as removal and started adding warnings where appropriate (e.g. `str replace --string`). As part of this update we removed some very old error helpers nudging you to upgrade to new commands. + +## Documentation + +Thanks to [@rgwood](https://github.com/rgwood), [@sholderbach](https://github.com/sholderbach), +[@kubouch](https://github.com/kubouch) and [@fdncred](https://github.com/fdncred) the documentation +has become a bit better in [#9961](https://github.com/nushell/nushell/pull/9961), +[#9996](https://github.com/nushell/nushell/pull/9996), [#10004](https://github.com/nushell/nushell/pull/10004) +and [#10057](https://github.com/nushell/nushell/pull/10057). + +## Notable bugfixes + +- A panic when parsing the context of `let` assignments has been fixed ([@mengsuenyan](https://github.com/mengsuenyan) in [#9851](https://github.com/nushell/nushell/pull/9851)) +- Invoking `--help` on a script with a `def main` command will now report the script's name instead of a more confusing `main` ([@jntrnr](https://github.com/jntrnr) in [#9948](https://github.com/nushell/nushell/pull/9948)) +- Serious bugs in `parse` that produced incorrect output when given a long input stream have been fixed ([@panicbit](https://github.com/panicbit) in [#9925](https://github.com/nushell/nushell/pull/9925), [#9950](https://github.com/nushell/nushell/pull/9950)) + +## Bugfixes + +Thanks to all the contributors who tackled one or more bugs! +| Name | Link | Description | +| ---------------------------------------------- | ------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| [@mengsuenyan](https://github.com/mengsuenyan) | [#9853](https://github.com/nushell/nushell/pull/9853) | Fix `~ \| path type` returning empty string | +| [@mengsuenyan](https://github.com/mengsuenyan) | [#9851](https://github.com/nushell/nushell/pull/9851) | Fix the panic when type a statement similar to `let f = 'f' $` in the nushell | +| [@jntrnr](https://github.com/jntrnr) | [#9893](https://github.com/nushell/nushell/pull/9893) | Revert [#9693](https://github.com/nushell/nushell/pull/9693) to prevent CPU hangs | +| [@NotLebedev](https://github.com/NotLebedev) | [#9935](https://github.com/nushell/nushell/pull/9935) | Nothing has the correct return type | +| [@amtoine](https://github.com/amtoine) | [#9947](https://github.com/nushell/nushell/pull/9947) | Force `version` to update when installing with `toolkit.nu` | +| [@amtoine](https://github.com/amtoine) | [#9967](https://github.com/nushell/nushell/pull/9967) | Fix panic with `lines` on an error | +| [@rgwood](https://github.com/rgwood) | [#9990](https://github.com/nushell/nushell/pull/9990) | Fix `watch` not handling all file changes | +| [@nibon7](https://github.com/nibon7) | [#9784](https://github.com/nushell/nushell/pull/9784) | Fix a crash when moving the cursor after accepting a suggestion from the help menu | +| [@meskill](https://github.com/meskill) | [#10007](https://github.com/nushell/nushell/pull/10007) | Fix parser to not update plugin.nu file on nu startup | +| [@zhiburt](https://github.com/zhiburt) | [#10011](https://github.com/nushell/nushell/pull/10011) | nu-table: Fix padding 0 width issues | +| [@3lvir4](https://github.com/3lvir4) | [#10012](https://github.com/nushell/nushell/pull/10012) | Remove potential panic from path join | +| [@kubouch](https://github.com/kubouch) | [#10046](https://github.com/nushell/nushell/pull/10046) | Fix wrong path expansion in `save` | +| [@zhiburt](https://github.com/zhiburt) | [#10050](https://github.com/nushell/nushell/pull/10050) | nu-table: Fix issue with truncation and text border | +| [@jntrnr](https://github.com/jntrnr) | [#10052](https://github.com/nushell/nushell/pull/10052) | Fix default_env.nu after latest changes to `str replace` | +| [@fdncred](https://github.com/fdncred) | [#10067](https://github.com/nushell/nushell/pull/10067) | Allow `return` to return any nushell value | +| [@fdncred](https://github.com/fdncred) | [#10063](https://github.com/nushell/nushell/pull/10063) | Fix `into datetime` to accept more date/time formats | + +And also to those who did tackle purely technical challenges!! +| Name | Link | Description | +| ---------------------------------------------- | ------------------------------------------------------- | -------------------------------------------------------- | +| [@IanManske](https://github.com/IanManske) | [#9909](https://github.com/nushell/nushell/pull/9909) | Enable macOS foreground process handling | +| [@jntrnr](https://github.com/jntrnr) | [#9933](https://github.com/nushell/nushell/pull/9933) | Add tests for script subcommands | +| [@jntrnr](https://github.com/jntrnr) | [#9936](https://github.com/nushell/nushell/pull/9936) | Fix a couple clippy warnings | +| [@IanManske](https://github.com/IanManske) | [#9927](https://github.com/nushell/nushell/pull/9927) | Make `Value::columns` return slice instead of cloned Vec | +| [@jntrnr](https://github.com/jntrnr) | [#9949](https://github.com/nushell/nushell/pull/9949) | Move `help commands` to use more structure in signatures | +| [@fdncred](https://github.com/fdncred) | [#9958](https://github.com/nushell/nushell/pull/9958) | Update `strip-ansi-escapes` to use new api | +| [@rgwood](https://github.com/rgwood) | [#9971](https://github.com/nushell/nushell/pull/9971) | Put heavy dataframe dependencies behind feature flag | +| [@sholderbach](https://github.com/sholderbach) | [#9974](https://github.com/nushell/nushell/pull/9974) | Fixup dataframe build after [#9971](https://github.com/nushell/nushell/pull/9971) | +| [@meskill](https://github.com/meskill) | [#9976](https://github.com/nushell/nushell/pull/9976) | test: Clear parent environment to prevent leakage to tests | +| [@kubouch](https://github.com/kubouch) | [#10036](https://github.com/nushell/nushell/pull/10036) | Add additional span to IncorrectValue error | + +# Breaking changes + +- [#9902](https://github.com/nushell/nushell/pull/9902) `date format` has been renamed to `format date` for consistency. +- [#9788](https://github.com/nushell/nushell/pull/9788) The option `into duration --convert` to format durations has been removed. Use the `format duration` command instead. +- [#10038](https://github.com/nushell/nushell/pull/10038) `str replace` now by default matches to **strings** by default. If you want to use regexes you need to use the `-r` flag. The `--strings` flag has been removed +- [#9632](https://github.com/nushell/nushell/pull/9632) To be unambiguous the duration type now does not report months or years. The largest unit reported is weeks as they have a consistent length compared to months or years. +- [#9926](https://github.com/nushell/nushell/pull/9926) We moved some of the more exotic `str` case-commands behind the `--features extra` build-flag. This affects: + - `str camel-case` + - `str kebab-case` + - `str pascal-case` + - `str screaming-snake-case` + - `str snake-case` + - `str title-case` +- [#10053](https://github.com/nushell/nushell/pull/10053) make the charpage optional for `std clip` +- [#10023](https://github.com/nushell/nushell/pull/10023) The output of the `scope` commands has changed + +### Internal breaking change only affecting plugin authors + +- [#9927](https://github.com/nushell/nushell/pull/9927) Make `Value::columns` return slice instead of cloned Vec + +# Full changelog + +## Nushell + +- [amtoine](https://github.com/amtoine) created + - [remove Clippy flags from the PR template](https://github.com/nushell/nushell/pull/10087) + - [Revert "deprecate `--format` and `--list` in `into datetime` (#10017)"](https://github.com/nushell/nushell/pull/10055) + - [make the charpage optional for `std clip`](https://github.com/nushell/nushell/pull/10053) + - [deprecate `--format` and `--list` in `into datetime`](https://github.com/nushell/nushell/pull/10017) + - [fix the signature of `input list`](https://github.com/nushell/nushell/pull/9977) + - [fix the default config for `explore`](https://github.com/nushell/nushell/pull/9962) + - [fix panic with `lines` on an error](https://github.com/nushell/nushell/pull/9967) + - [add a test to make sure "nothing" shows up as "nothing" in help](https://github.com/nushell/nushell/pull/9941) + - [force version to update when installing with toolkit](https://github.com/nushell/nushell/pull/9947) + - [remove old deprecated commands](https://github.com/nushell/nushell/pull/9840) + - [Fix default prompt indicators](https://github.com/nushell/nushell/pull/9914) +- [fdncred](https://github.com/fdncred) created + - [update install/build scripts to include `--locked`](https://github.com/nushell/nushell/pull/10086) + - [allow `help` to return a `Type::Table`](https://github.com/nushell/nushell/pull/10082) + - [try and fix `into datetime` to accept more dt formats](https://github.com/nushell/nushell/pull/10063) + - [allow `return` to return any nushell value](https://github.com/nushell/nushell/pull/10067) + - [enable/update some example tests so they work again](https://github.com/nushell/nushell/pull/10058) + - [try to document the more obscure testbin commands](https://github.com/nushell/nushell/pull/10057) + - [allow int as a cellpath for `select`](https://github.com/nushell/nushell/pull/10048) + - [allow `select` to take a $variable with a list of columns](https://github.com/nushell/nushell/pull/9987) + - [update `strip-ansi-escapes` to 0.2.0 and the latest reedline](https://github.com/nushell/nushell/pull/9970) + - [update `strip-ansi-escapes` to use new api](https://github.com/nushell/nushell/pull/9958) + - [add keybinding for search-history](https://github.com/nushell/nushell/pull/9930) + - [add `header_on_separator` options to default_config.nu](https://github.com/nushell/nushell/pull/9922) + - [updates `let-env` signature to remove required params](https://github.com/nushell/nushell/pull/9917) + - [remove `vectorize_over_list` from python plugin](https://github.com/nushell/nushell/pull/9905) + - [update `format` signature to allow `record` to be passed in](https://github.com/nushell/nushell/pull/9898) + - [update `items` signature to allow `any` output](https://github.com/nushell/nushell/pull/9896) + - [update `char` signature with `Table`](https://github.com/nushell/nushell/pull/9895) + - [update to current reedline](https://github.com/nushell/nushell/pull/9877) + - [bump to dev version 0.83.2](https://github.com/nushell/nushell/pull/9866) +- [jntrnr](https://github.com/jntrnr) created + - [Revert "pin serde to avoid https://github.com/serde-rs/serde/issues/2538"](https://github.com/nushell/nushell/pull/10078) + - [move 'bytes' back to commands](https://github.com/nushell/nushell/pull/10051) + - [pin serde to avoid https://github.com/serde-rs/serde/issues/2538](https://github.com/nushell/nushell/pull/10061) + - [fix default-env after latest changes](https://github.com/nushell/nushell/pull/10052) + - [Rename `main` to script name when running scripts](https://github.com/nushell/nushell/pull/9948) + - [Auto-expand table based on terminal width](https://github.com/nushell/nushell/pull/9934) + - [fix the Cargo.lock file](https://github.com/nushell/nushell/pull/9955) + - [Move `help commands` to use more structure in signatures](https://github.com/nushell/nushell/pull/9949) + - [Fix a couple clippy warnings](https://github.com/nushell/nushell/pull/9936) + - [Add tests for script subcommands](https://github.com/nushell/nushell/pull/9933) + - [Revert "Add an option to move header on borders"](https://github.com/nushell/nushell/pull/9908) + - [Re-align how prompt indicators work](https://github.com/nushell/nushell/pull/9907) + - [Simplify default style and match Rust code to config](https://github.com/nushell/nushell/pull/9900) + - [Revert 9693 to prevent CPU hangs](https://github.com/nushell/nushell/pull/9893) +- [sholderbach](https://github.com/sholderbach) created + - [Polish `CONTRIBUTING`, add Rust style](https://github.com/nushell/nushell/pull/10071) + - [Remove global clippy `-A` from `toolkit.nu`](https://github.com/nushell/nushell/pull/10073) + - [Remove clippy global `-A` from CI](https://github.com/nushell/nushell/pull/10072) + - [Pin reedline to 0.23.0](https://github.com/nushell/nushell/pull/10070) + - [Rename misused "deprecation" to removal](https://github.com/nushell/nushell/pull/10000) + - [Improve I/O types of `into decimal`(/float)](https://github.com/nushell/nushell/pull/9998) + - [Add search terms to `reject`](https://github.com/nushell/nushell/pull/9996) + - [Move `format duration`/`filesize` back into core](https://github.com/nushell/nushell/pull/9978) + - [Fixup dataframe build after #9971](https://github.com/nushell/nushell/pull/9974) + - [Add `format duration` to replace `into duration --convert`](https://github.com/nushell/nushell/pull/9788) + - [Update `unicode-linebreak` to `0.1.5`](https://github.com/nushell/nushell/pull/9814) +- [kubouch](https://github.com/kubouch) created + - [Remove "let config" warning](https://github.com/nushell/nushell/pull/10068) + - [ Simplify virtualenv testing](https://github.com/nushell/nushell/pull/10035) + - [Recursively export constants from modules](https://github.com/nushell/nushell/pull/10049) + - [Add a few more fields to `scope` commands](https://github.com/nushell/nushell/pull/10045) + - [Add additional span to IncorrectValue error](https://github.com/nushell/nushell/pull/10036) + - [Allow exporting extern-wrapped](https://github.com/nushell/nushell/pull/10025) + - [Fix wrong path expansion in `save`](https://github.com/nushell/nushell/pull/10046) + - [Change `str replace` to match substring by default](https://github.com/nushell/nushell/pull/10038) + - [Remove dead code from tests](https://github.com/nushell/nushell/pull/10040) + - [Sort entries in `scope` commands; Fix usage of externs](https://github.com/nushell/nushell/pull/10039) + - [Refactor `scope` commands](https://github.com/nushell/nushell/pull/10023) + - [Fix example for `extern-wrapped`](https://github.com/nushell/nushell/pull/10004) +- [zhiburt](https://github.com/zhiburt) created + - [nu-table: fix issue with truncation and text border](https://github.com/nushell/nushell/pull/10050) + - [nu-table: Fix padding 0 width issues](https://github.com/nushell/nushell/pull/10011) + - [nu-table/ Add `table.padding` configuration](https://github.com/nushell/nushell/pull/9983) + - [Add an option to set header on border (style)](https://github.com/nushell/nushell/pull/9920) + - [Add an option to move header on borders](https://github.com/nushell/nushell/pull/9796) +- [sitiom](https://github.com/sitiom) created + - [Change Winget Releaser job to `ubuntu-latest`](https://github.com/nushell/nushell/pull/10032) +- [ineu](https://github.com/ineu) created + - [Make `http -f` display the request headers. Closes #9912](https://github.com/nushell/nushell/pull/10022) +- [3lvir4](https://github.com/3lvir4) created + - [Remove potential panic from path join](https://github.com/nushell/nushell/pull/10012) +- [ayax79](https://github.com/ayax79) created + - [Expose polars avro support](https://github.com/nushell/nushell/pull/10019) + - [Nushell table list columns -> dataframe list columns. Explode / Flatten dataframe support.](https://github.com/nushell/nushell/pull/9951) + - [Merged overloaded commands](https://github.com/nushell/nushell/pull/9860) +- [app/dependabot](https://github.com/app/dependabot) created + - [Bump quick-xml from 0.29.0 to 0.30.0](https://github.com/nushell/nushell/pull/9870) + - [Bump rstest from 0.17.0 to 0.18.1](https://github.com/nushell/nushell/pull/9782) +- [meskill](https://github.com/meskill) created + - [fix(nu-parser): do not update plugin.nu file on nu startup](https://github.com/nushell/nushell/pull/10007) + - [test: clear parent envs to prevent leakage to tests](https://github.com/nushell/nushell/pull/9976) +- [nibon7](https://github.com/nibon7) created + - [Fix a crash when moving the cursor after accepting a suggestion from the help menu](https://github.com/nushell/nushell/pull/9784) +- [rgwood](https://github.com/rgwood) created + - [Fix `watch` not handling all file changes](https://github.com/nushell/nushell/pull/9990) + - [Put heavy dataframe dependencies behind feature flag](https://github.com/nushell/nushell/pull/9971) + - [Fix cross-compiling with cross-rs](https://github.com/nushell/nushell/pull/9972) + - [Fix `match` example whitespace](https://github.com/nushell/nushell/pull/9961) +- [panicbit](https://github.com/panicbit) created + - [parse: collect external stream chunks before matching](https://github.com/nushell/nushell/pull/9950) + - [do not emit None mid-stream during parse](https://github.com/nushell/nushell/pull/9925) +- [bobhy](https://github.com/bobhy) created + - [Fix duration type to not report months or years](https://github.com/nushell/nushell/pull/9632) +- [IanManske](https://github.com/IanManske) created + - [Make `Value::columns` return slice instead of cloned Vec](https://github.com/nushell/nushell/pull/9927) + - [Enable macOS foreground process handling](https://github.com/nushell/nushell/pull/9909) + - [Replace `&Span` with `Span` since `Span` is `Copy`](https://github.com/nushell/nushell/pull/9770) +- [atahabaki](https://github.com/atahabaki) created + - [str-expand: update bracoxide to v0.1.2, fixes #9913](https://github.com/nushell/nushell/pull/9940) + - [str-expand: add path flag](https://github.com/nushell/nushell/pull/9856) + - [str-expand: Add Escaping Example](https://github.com/nushell/nushell/pull/9841) +- [stormasm](https://github.com/stormasm) created + - [Categorification: move commands histogram and version out of the default category](https://github.com/nushell/nushell/pull/9946) + - [Categorification: move from Default category to Filters](https://github.com/nushell/nushell/pull/9945) + - [Categorification: move Path commands out of the default category](https://github.com/nushell/nushell/pull/9937) + - [Categorification: graduate nuon --- from the experimental category to the formats category](https://github.com/nushell/nushell/pull/9932) + - [Categorification: move uncategorized String commands to Category::Strings](https://github.com/nushell/nushell/pull/9931) + - [Cratification: move some str case commands to nu-cmd-extra](https://github.com/nushell/nushell/pull/9926) +- [NotLebedev](https://github.com/NotLebedev) created + - [Nothing return type](https://github.com/nushell/nushell/pull/9935) +- [WindSoilder](https://github.com/WindSoilder) created + - [rename from `date format` to `format date`](https://github.com/nushell/nushell/pull/9902) + - [Module: support defining const and use const variables inside of function](https://github.com/nushell/nushell/pull/9773) +- [mengsuenyan](https://github.com/mengsuenyan) created + - [Fixed the panic when type a statement similar to `let f = 'f' $` in the nushell](https://github.com/nushell/nushell/pull/9851) + - [fixed the bug `~ | path type` return empty string](https://github.com/nushell/nushell/pull/9853) +- [app/](https://github.com/app/) created + - [Turn bare URLs into cliclable links](https://github.com/nushell/nushell/pull/9854) +- [jflics6460](https://github.com/jflics6460) created + - [Accept records for http subcommand headers (-H)](https://github.com/nushell/nushell/pull/9771) + +## Extension + +- [balupton](https://github.com/balupton) created + - [readmde: close #148 - link extension page](https://github.com/nushell/vscode-nushell-lang/pull/149) + +## Documentation + +- [jwarlander](https://github.com/jwarlander) created + - [Use '--locked' in cargo install snippet for dataframe feature](https://github.com/nushell/nushell.github.io/pull/1010) +- [hustcer](https://github.com/hustcer) created + - [Update table mode config doc, fix #1007](https://github.com/nushell/nushell.github.io/pull/1008) + - [Finish `let-env` removal in Chinese translation](https://github.com/nushell/nushell.github.io/pull/1005) + - [Upgrade some dependencies, and fix some broken assets import](https://github.com/nushell/nushell.github.io/pull/995) +- [conqp](https://github.com/conqp) created + - [Update command to list aliases](https://github.com/nushell/nushell.github.io/pull/1006) +- [sholderbach](https://github.com/sholderbach) created + - [Finish `let-env` removal in German translation](https://github.com/nushell/nushell.github.io/pull/1004) +- [amtoine](https://github.com/amtoine) created + - [remove last mentions to `let-env`](https://github.com/nushell/nushell.github.io/pull/999) + - [patch: release notes for 0.83.1](https://github.com/nushell/nushell.github.io/pull/994) +- [BrewingWeasel](https://github.com/BrewingWeasel) created + - [Remove unused empty column](https://github.com/nushell/nushell.github.io/pull/1003) +- [rgwood](https://github.com/rgwood) created + - [Cookbook cleanup](https://github.com/nushell/nushell.github.io/pull/1001) +- [oatovar](https://github.com/oatovar) created + - [Update testing examples](https://github.com/nushell/nushell.github.io/pull/997) +- [rprtr258](https://github.com/rprtr258) created + - [Update explore.md](https://github.com/nushell/nushell.github.io/pull/1000) +- [LeoniePhiline](https://github.com/LeoniePhiline) created + - [fix(docs): Fix link to "setting environment variables"](https://github.com/nushell/nushell.github.io/pull/996) + - [fix(docs): Link to Command Reference led to HTTP 404](https://github.com/nushell/nushell.github.io/pull/993) + +## Nu_Scripts + +- [fdncred](https://github.com/fdncred) created + - [fix the other place in the weather script](https://github.com/nushell/nu_scripts/pull/581) + - [fix weather duration after latest nushell changes](https://github.com/nushell/nu_scripts/pull/580) + - [update prompts scripts with new `str replace` syntax](https://github.com/nushell/nu_scripts/pull/579) + - [update `date format` to `format date` in oh-my.nu](https://github.com/nushell/nu_scripts/pull/570) + - [delete codeowners file](https://github.com/nushell/nu_scripts/pull/568) +- [WindSoilder](https://github.com/WindSoilder) created + - [Update python-venv.nu so we can enter subdirectory without an error](https://github.com/nushell/nu_scripts/pull/574) +- [Neur1n](https://github.com/Neur1n) created + - [minor changes to nu_conda.nu and nu_msvs.nu](https://github.com/nushell/nu_scripts/pull/576) +- [EmilySeville7cfg](https://github.com/EmilySeville7cfg) created + - [Simple json schema generator](https://github.com/nushell/nu_scripts/pull/577) +- [uroybd](https://github.com/uroybd) created + - [feat(completions): Ô£¿ add PDM custom completions](https://github.com/nushell/nu_scripts/pull/573) +- [amtoine](https://github.com/amtoine) created + - [rename `date format` to `format date`](https://github.com/nushell/nu_scripts/pull/571) + - [fix the date schedule in the release scripts](https://github.com/nushell/nu_scripts/pull/561) +- [e2dk4r](https://github.com/e2dk4r) created + - [custom-completions: scoop: fix getting environmental variables](https://github.com/nushell/nu_scripts/pull/567) + +## Reedline + +- [sholderbach](https://github.com/sholderbach) created + - [Bump version for 0.23 release](https://github.com/nushell/reedline/pull/626) +- [fdncred](https://github.com/fdncred) created + - [update to strip-ansi-escapes 0.2.0](https://github.com/nushell/reedline/pull/618) + - [update `strip-ansi-escapes` to their latest api](https://github.com/nushell/reedline/pull/617) + - [turn off default prompt styling (bold) to prevent leakage](https://github.com/nushell/reedline/pull/615) diff --git a/blog/2023-08-23-happy-birthday-nushell-4.md b/src/content/docs/blog/2023-08-23-happy-birthday-nushell-4.md similarity index 99% rename from blog/2023-08-23-happy-birthday-nushell-4.md rename to src/content/docs/blog/2023-08-23-happy-birthday-nushell-4.md index fde1b255773..4cf09c9c14f 100644 --- a/blog/2023-08-23-happy-birthday-nushell-4.md +++ b/src/content/docs/blog/2023-08-23-happy-birthday-nushell-4.md @@ -38,7 +38,7 @@ Using `ls | sort-by type name -i | grid -c`, it looks like this: ## Gotta have a Chuck Norris joke -```nushell +```nushellshell > (http get https://api.chucknorris.io/jokes/random).value ``` @@ -46,7 +46,7 @@ Using `ls | sort-by type name -i | grid -c`, it looks like this: "Turns out, we already support subcommands in scripts." -```nu +```nushell # adds 100 to the argument def "main foo" [ x: int # the amount to start with @@ -59,7 +59,7 @@ def "main" [] { } ``` -```nu +```nushell > nu ../maintest.nu foo 123 223 ``` @@ -71,7 +71,7 @@ It even comes with its own help "Here is my favorite: Cross-platform symlink:" -```nushell +```nushellshell # Create a symlink export def symlink [ existing: path # The existing file diff --git a/blog/2023-09-05-why-uu.md b/src/content/docs/blog/2023-09-05-why-uu.md similarity index 91% rename from blog/2023-09-05-why-uu.md rename to src/content/docs/blog/2023-09-05-why-uu.md index ef0349b479d..e9cda859928 100644 --- a/blog/2023-09-05-why-uu.md +++ b/src/content/docs/blog/2023-09-05-why-uu.md @@ -1,3 +1,11 @@ +--- +title: Introducing nushell +author: Jonathan Turner +author_site: https://twitter.com/jntrnr +author_image: https://www.nushell.sh/blog/images/jonathandturner.jpg +excerpt: Today, we're introducing a new shell, written in Rust. It draws inspiration from the classic Unix philosophy of pipelines, the structured data approach of PowerShell, functional programming, systems programming, and more. +--- + # Nushell + Uutils = ❤️ We're happy to announce that with Nushell release 0.85.0, scheduled to be released on Sept 19, 2023, the nushell team is starting to integrate `uutils/coreutils` into nushell. The first command we have integrated is `cp`, that for a testing period lives in `ucp`. So, when you use `ucp` in this release, you're using the same code that it used in `coreutils`. 🎉 🥳 @@ -27,7 +35,7 @@ I think this is going to be a huge win-win, because nushell gets to benefit from First things first you can try out `ucp` as your regular `cp` by setting `alias cp = ucp`. After we made sure to iron out the kinks, `cp` will become the `ucp` implementation. -The next step is to move onto integrating other commands, _your help is welcome and needed!!!_ I've created a list of command and we've categorized them as `crawl`, `walk`, `run`. We use this nominclature to describe that we want to start with the really "easy" commands first, then the next "easiest", then finally, what's left. [@JT] has helped me to learn the value of `crawl`, `walk`, `run` over the years, and that mantra frequently helps our team decide how we should implement new features. +The next step is to move onto integrating other commands, _your help is welcome and needed!!!_ I've created a list of command and we've categorized them as `crawl`, `walk`, `run`. We use this nominclature to describe that we want to start with the really "easy" commands first, then the next "easiest", then finally, what's left. [@JT] has helped me to learn the value of `crawl`, `walk`, `run` over the years, and that mantra frequently helps our team decide how we should implement new features. We don't plan on implementing every command from coreutils, but there are quite a few in the `crawl` category right now that shouldn't be super difficult to build in. @@ -35,7 +43,7 @@ The next commands planned to implement, based on my notes above, are probably `m ## Parting words -Again, thanks so much to the maintainers of `uutils/coreutils`. They have made great efforts to be as welcoming as possible to nushell. They have been wonderful to work with and we, at nushell, look forward to working more with them. If you'd like to contribute to the awesome coreutils project, you can find it [here](https://github.com/uutils/coreutils). I'm sure they'd love your support. If you'd like to chat with the nushell team about this on Discord, feel free to join in on the conversation [here]( https://discord.gg/NtAbbGn). +Again, thanks so much to the maintainers of `uutils/coreutils`. They have made great efforts to be as welcoming as possible to nushell. They have been wonderful to work with and we, at nushell, look forward to working more with them. If you'd like to contribute to the awesome coreutils project, you can find it [here](https://github.com/uutils/coreutils). I'm sure they'd love your support. If you'd like to chat with the nushell team about this on Discord, feel free to join in on the conversation [here](https://discord.gg/NtAbbGn). Sincerely, [Darren](https://github.com/fdncred) diff --git a/src/content/docs/blog/2023-09-19-nushell_0_85_0.md b/src/content/docs/blog/2023-09-19-nushell_0_85_0.md new file mode 100644 index 00000000000..a3dc12d8d7a --- /dev/null +++ b/src/content/docs/blog/2023-09-19-nushell_0_85_0.md @@ -0,0 +1,635 @@ +--- +title: Nushell 0.85 +author: The Nu Authors +author_site: https://twitter.com/nu_shell +author_image: https://www.nushell.sh/blog/images/nu_logo.png +excerpt: Today, we're releasing version 0.85 of Nu. This release adds the first uutils command, unlocks more constant evaluation at parse time, and polishes many commands. +--- + +# Nushell 0.85 + +Nushell, or Nu for short, is a new shell that takes a modern, structured approach to your command line. It works seamlessly with the data from your filesystem, operating system, and a growing number of file formats to make it easy to build powerful command line pipelines. + +Today, we're releasing version 0.85 of Nu. This release adds the first uutils command, unlocks more constant evaluation at parse time, and polishes many commands. + + + +# Where to get it + +Nu 0.85 is available as [pre-built binaries](https://github.com/nushell/nushell/releases/tag/0.85.0) or from [crates.io](https://crates.io/crates/nu). If you have Rust installed you can install it using `cargo install nu`. + +NOTE: The optional dataframe functionality is available by `cargo install nu --features=dataframe`. + +As part of this release, we also publish a set of optional plugins you can install and use with Nu. To install, use `cargo install nu_plugin_`. + +# Themes of this release / New features + +## Nushell + Uutils = ❤️ + +📢The Nushell team is thrilled to announce 🥳 that we've begun working with the [`uutils/coreutils` team on integrating some of their foundational core utilies into nushell](https://www.nushell.sh/blog/2023-09-05-why-uu.html). With this release, we've started with the coreutils `cp` command, which we've temporarily named `ucp`. We're starting with `ucp` to allow broad testing while the current nushell `cp` command remains the default. We've already found one [bug](https://github.com/uutils/coreutils/issues/5257) in the coreutils `cp` command and you might find others. Once it stabelizes, probably with the 0.86.0 release, we'll remove the nushell `cp` command and rename `ucp` to `cp`. In keeping with the nushell style, we've only added a handful of parameters. We can, and probably will, add more if the community determines we need them. We're so very excited and would like to thank [terts](https://github.com/tertsdiepraam), from the coreutils team, for his excellent help and special appreciation to [dmatos2012](https://github.com/dmatos2012) for the, very iterative, first `uutils/coreutils` integration PR [#10097](https://github.com/nushell/nushell/pull/10097) for the `cp` command. To read more about how this came to be, checkout [our blog post](https://www.nushell.sh/blog/2023-09-05-why-uu.html). + +## Quite a few bug fixes + +Thanks to all the contributors below for helping us solve issues and bugs :pray: +| author | description | url | +| ------------------------------------------------ | --------------------------------------------------------------------------------- | ------------------------------------------------------- | +| [@rgwood](https://github.com/rgwood) | Fix watch not detecting modifications on Windows | [#10109](https://github.com/nushell/nushell/pull/10109) | +| [@ito-hiroki](https://github.com/ito-hiroki) | Fix tab completion order of directories to consistent with order of files | [#10102](https://github.com/nushell/nushell/pull/10102) | +| [@herobs](https://github.com/herobs) | Fix 9156 endian consistency | [#9873](https://github.com/nushell/nushell/pull/9873) | +| [@ayax79](https://github.com/ayax79) | fixed usages of deprecated chrono DateTime::from_utc | [#10161](https://github.com/nushell/nushell/pull/10161) | +| [@zhiburt](https://github.com/zhiburt) | Fix #10154 | [#10162](https://github.com/nushell/nushell/pull/10162) | +| [@ofek](https://github.com/ofek) | Fix example history command pipeline | [#10220](https://github.com/nushell/nushell/pull/10220) | +| [@dead10ck](https://github.com/dead10ck) | Fix unit tests on Android | [#10224](https://github.com/nushell/nushell/pull/10224) | +| [@amtoine](https://github.com/amtoine) | fix default after an empty where | [#10240](https://github.com/nushell/nushell/pull/10240) | +| [@IanManske](https://github.com/IanManske) | Fix `rm` on macOS | [#10282](https://github.com/nushell/nushell/pull/10282) | +| [@horasal](https://github.com/horasal) | handle empty pipeline while parsing let (fix Issue10083) | [#10116](https://github.com/nushell/nushell/pull/10116) | +| [@dmatos2012](https://github.com/dmatos2012) | Fix variables not allowed in ucp | [#10304](https://github.com/nushell/nushell/pull/10304) | +| [@sholderbach](https://github.com/sholderbach) | Update `crates-ci/typos` and fix new typos | [#10313](https://github.com/nushell/nushell/pull/10313) | +| [@GomesGoncalo](https://github.com/GomesGoncalo) | fix #10319: allow json request of value type list | [#10356](https://github.com/nushell/nushell/pull/10356) | +| [@jntrnr](https://github.com/jntrnr) | fix 'let' to properly redirect | [#10360](https://github.com/nushell/nushell/pull/10360) | +| [@amtoine](https://github.com/amtoine) | fix the pretty printing of failing tests in std | [#10373](https://github.com/nushell/nushell/pull/10373) | +| [@J-Kappes](https://github.com/J-Kappes) | fix input --until-bytes: now stops at any of given bytes | [#10235](https://github.com/nushell/nushell/pull/10235) | +| [@zhiburt](https://github.com/zhiburt) | nu-table: Fix expand table unnessary color in trail head config when wrap is used | [#10367](https://github.com/nushell/nushell/pull/10367) | +| [@fdncred](https://github.com/fdncred) | fix some new chrono warnings | [#10384](https://github.com/nushell/nushell/pull/10384) | +| [@horasal](https://github.com/horasal) | prevent crash when use redirection with let/mut | [#10139](https://github.com/nushell/nushell/pull/10139) | +| [@horasal](https://github.com/horasal) | Allow operator in constants | [#10212](https://github.com/nushell/nushell/pull/10212) | +| [@zhiburt](https://github.com/zhiburt) | nu-table: Patch restore lead trail space bg color | [#10351](https://github.com/nushell/nushell/pull/10351) | +| [@zhiburt](https://github.com/zhiburt) | nu-table: Strip custom color in the header when used on border | [#10357](https://github.com/nushell/nushell/pull/10357) | + +## Consistent use of `float` for our floating point type + +::: warning Breaking change +See a full overview of the [breaking changes](#breaking-changes) +::: + +Nushell currently supports two types to represent numbers without units: `int` for integer numbers and `float` for floating point numbers. +The latter type was in important places incorrectly referred to as `decimal`. This hid the fact that as floating point numbers they have limited precision in some circumstances but higher performance compared to a decimal-encoded number. + +With this release we fix this inaccuracy. + +This means we introduce the commands `into float` and `random float` and deprecate the commands `into decimal` and `random decimal`. The old commands will be removed with the next release but continue to work for this release with a warning. +Please use `into float` instead of `into decimal` and `random float` instead of `random decimal`. + +After the type returned by `describe` has been `float` for a while, we now also change which type name is allowed when specifying command argument or input/output types. + +```nushell +# Argument with a specfic type +def foo [bar: float] {} +# Command taking only floating point input from the pipeline and returning the same type. +def baz [] float->float {} +``` + +Previously both `float` and `decimal` were supported in those positions. + +## Some updates on `explore` + +::: warning Breaking change +See a full overview of the [breaking changes](#breaking-changes) +::: + +The `explore` built-in commands have changed a bit during this release. + +Now, it supports Vim bindings out of the box thanks to [@amtoine](https://github.com/amtoine) in +[#9966](https://github.com/nushell/nushell/pull/9966). +[@rgwood](https://github.com/rgwood) has simplified the available configuration entries which used +to make the command less easy to understand in +[#10258](https://github.com/nushell/nushell/pull/10258) +[#10259](https://github.com/nushell/nushell/pull/10259) and +[#10270](https://github.com/nushell/nushell/pull/10270). + +Thanks to him again, one can now quit the `explore`r by hitting any of `ctrl+c`, `ctrl+d` or +`ctrl+q` (see [#10257](https://github.com/nushell/nushell/pull/10257)). + +## Improvements to parse-time evaluation + +_Conditional `source` and `use` is now possible._ + +The Nushell core team has been asked quite a lot of times to be able to do parse-time conditional +`source`ing or `use`ing in the configuration, e.g. to load different things depending on the system: + +```nushellshell +if $nu.os-info.name == "windows" { + source "my_windows_config.nu" +} else { + source "my_unix_config.nu" +} +``` + +The above snippet does not work because Nushell's scoping rules keep the sourced values inside the block and the sourcing would not have any visible effect outside of the if/else statement (except environment changes). + +While scoping still works the same, a series of PRs by [@kubouch](https://github.com/kubouch) made conditional `source`/`use`/`overlay use` possible: + +- [#9499](https://github.com/nushell/nushell/pull/9499), allows parse-time evaluation of commands, pipelines and subexpressions (see also [Looking for help!](#looking-for-help)) +- with [#10326](https://github.com/nushell/nushell/pull/10326), `if` can now be evaluated at parse time +- finally, [#10160](https://github.com/nushell/nushell/pull/10160) makes the `$nu` built-in variable a true constant :partying_face: + +What does this all mean? One can now write something very similar to the proposed snippet +above! For example: + +```nushellshell +const WINDOWS_CONFIG = "my_windows_config.nu" +const UNIX_CONFIG = "my_unix_config.nu" + +const ACTUAL_CONFIG = if $nu.os-info.name == "windows" { + $WINDOWS_CONFIG +} else { + $UNIX_CONFIG +} + +source $ACTUAL_CONFIG +``` + +### Looking for help! + +[#9499](https://github.com/nushell/nushell/pull/9499) allows running selected commands at parse time. For example, + +```nushellshell +const f = ($nu.default-config-dir | path dirname) +``` + +is possible because `path dirname` was manually ported to allow parse time evaluation. Only a very limited subset of Nushell's commands is currently allowed to do so: + +- `str length` +- `path` commands +- Some core commands: `describe`, `ignore`, `version`, `if` + +We would like to expand this set to allow more commands to run at parse time. If you'd like to help us porting more commands, we'd welcome your help! Please, see [#10239](https://github.com/nushell/nushell/issues/10239) for more information. Porting the commands is not difficult, but requires a bit of consideration, so it's better to reply to the issue or reach out to the core team beforehand. + +## Improving accessibility + +Up until now, an issue for users using a screen reader was that Nushell errors and tables are quite +fancy with some unicode characters. +The issue is that screen reader might have trouble reading them, making the understanding of what's +going on the REPL very hard... + +For tables, it's quite easy, you can set `$env.config.table.mode` to something like `"basic"` or +`"none"` and you should be good! +But errors remained fancy + +```nushellshell +Error: nu::shell::external_command + + × External command failed + ╭─[entry #4:1:1] + 1 │ foo + · ─┬─ + · ╰── did you mean 'for'? + ╰──── + help: No such file or directory (os error 2) +``` + +[@JoaquinTrinanes](https://github.com/JoaquinTrinanes) did implement screen reader-friendly errors +in [#10122](https://github.com/nushell/nushell/pull/10122) which will hopefully make the experience +a lot better when it comes to errors. + +## More support for more platforms + +In this release, [@dead10ck](https://github.com/dead10ck) made it possible to use Nushell in Termux +([#10013](https://github.com/nushell/nushell/pull/10013)) and fixed a bug on Android +([#10225](https://github.com/nushell/nushell/pull/10225)). + +## Improved history isolation + +::: warning Breaking change +See a full overview of the [breaking changes](#breaking-changes) +::: + +Like many other shells, history between open sessions can be isolated in nushell. +However, the former implementation had the disadvantage that it also blocked access to history of former sessions. +It also didn't isolate hints. +This is now fixed with [!10402](https://github.com/nushell/nushell/pull/10402) by [@Hofer-Julian](https://github.com/Hofer-Julian). +Since this was merged shortly before the release, this feature isn't the default yet. +The `file_format` has to be changed to `"sqlite"` and `isolation` has to be set to `true`. +You can find those in the [config file](https://github.com/nushell/nushell/blob/39d93b536a02c95c263925a47b9e4c34587ce021/crates/nu-utils/src/sample_config/default_config.nu#L202) under `$nu.config-path`. +Please test this so we can fix problems before history isolation becomes the default. + +## Enhancing the documentation + +Thanks to all the contributors below for helping us making the documentation of Nushell commands better :pray: +| author | description | url | +| ------------- | ------------------------------------------------------------- | ------------------------------------------------------- | +| @Hofer-Julian | Add notice to enable develop mode on Windows | [#10111](https://github.com/nushell/nushell/pull/10111) | +| @fdncred | update query web example because wikipedia changed their page | [#10173](https://github.com/nushell/nushell/pull/10173) | +| @alsuren | Point from keybindings help to the book's reedline chapter | [#10193](https://github.com/nushell/nushell/pull/10193) | +| @sholderbach | Document that `open` looks up `from` subcommands | [#10255](https://github.com/nushell/nushell/pull/10255) | +| @balupton | readme: add dorothy to supported by | [#10262](https://github.com/nushell/nushell/pull/10262) | +| @brunerm99 | feat: Search terms for use, while, and range (#5093) | [#10265](https://github.com/nushell/nushell/pull/10265) | +| @amtoine | add case-insensitive example to `where` | [#10299](https://github.com/nushell/nushell/pull/10299) | + +## Help with tests + +Some more technical work but very helpful to make the source code of Nushell better, so thanks to our +contributors who did improve the tests, often going through the whole source base and doing tideous +find and replace :pray: +| author | description | url | +| ------------ | --------------------------------------------- | ------------------------------------------------------- | +| @J-Kappes | Tests: clean up unnecessary use of pipeline() | [#10170](https://github.com/nushell/nushell/pull/10170) | +| @sholderbach | Remove dead tests depending on `inc` | [#10179](https://github.com/nushell/nushell/pull/10179) | +| @sholderbach | Simplify rawstrings in tests | [#10180](https://github.com/nushell/nushell/pull/10180) | + +## Changes to commands + +As usual, new release rhyms with changes to commands! + +- a bunch of new columns have been added to the `ps` commands: + - [@fdncred](https://github.com/fdncred) in [#10275](https://github.com/nushell/nushell/pull/10275) + and [#10344](https://github.com/nushell/nushell/pull/10344) + - [@WindSoilder](https://github.com/WindSoilder) in + [#10347](https://github.com/nushell/nushell/pull/10347) +- [@nanoqsh](https://github.com/nanoqsh) has made the behaviour of `append` and `prepend` consistent + regarding ranges in [#10231](https://github.com/nushell/nushell/pull/10231) +- [@Tiggax](https://github.com/Tiggax) has started working on making `select`, `get` and `reject` + more consistent in [#10163](https://github.com/nushell/nushell/pull/10163) and + [#10216](https://github.com/nushell/nushell/pull/10216) +- **Breaking change:** `math` constants have been moved from built-in commands to _true_ constants in + the standard library by [@amtoine](https://github.com/amtoine) in + [#9678](https://github.com/nushell/nushell/pull/9678) +- the `into duration` command now accepts integers as arguments and the unit can be specified via an + option with the changes introduced by [@amtoine](https://github.com/amtoine) in + [#10286](https://github.com/nushell/nushell/pull/10286) +- thanks to [@fdncred](https://github.com/fdncred) in + [#10354](https://github.com/nushell/nushell/pull/10354), the `commandline` command can now move + you to the end of the line, no need to "move 1000 characters to the right" anymore + +## Some table themes + +Want more delight? [@fdncred](https://github.com/fdncred) got you covered. +He added a bunch of new table themes / modes in +[#10279](https://github.com/nushell/nushell/pull/10279). + +## `echo` is evolving + +Coming from other shells, e.g. POSIX ones like Bash or Zsh, the distinction between Nushell's `echo` +and `print` commands and the behaviour of `echo` itself could be confusing :thinking: + +- `print` is a more programming-language-friendly command: it does print its arguments to the + terminal directly, consuming them and thus not allowing to pipe the "output" of print further. +- `echo` was only used to create values and pass them down a pipeline, e.g. `echo "foo" | str length` + +[@jntrnr](https://github.com/jntrnr) made the behaviour of `echo` a bit more general + +- it will print to the terminal if not redirected +- it will pass the value down to the pipeline if redirected + +```nushellshell +echo "foo" # will behave exactly as `print` does +echo "foo" | str length # will compute the length of `"foo"` and forward the result without + # "printing" it unless it's the last command being run +``` + +## Pythonesque operators removal + +::: warning Breaking change +See a full overview of the [breaking changes](#breaking-changes) +::: + +Coming from Python, things like + +```python +3 * "foo" +[1, 2] * 10 +``` + +would probably appear familiar. + +However, they could lead to some strange internal behaviours and hard to debug issues :confused: + +```nushellshell +> [3, "bob", 4] | reduce --fold 1 {|x, y| $x * $y} +bobbobbobbobbobbobbobbobbobbobbobbob +``` + +> **Note** +> in the example above, we are mixing integer and string multiplication, which might get weird! + +In this release, we decided to remove the string and list scalar multiplication in +[#10292](https://github.com/nushell/nushell/pull/10292) and +[#10293](https://github.com/nushell/nushell/pull/10293) from [@sholderbach](https://github.com/sholderbach). + +However, we do not want to leave you without any other way to achieve the same, this is why +[@amtoine](https://github.com/amtoine) did implement the `repeat` command in the standard library +in [#10339](https://github.com/nushell/nushell/pull/10339) + +- bring it into your scope with `use std repeat` +- you can do scalar string multiplication with something like `"foo" | repeat 3 | str join` +- you can do scalar list multiplication with something like `[1, 2] | repeat 3 | flatten` + +## Optimizations + +[#10378](https://github.com/nushell/nushell/pull/10378) Switched the default allocator to `mimalloc` as it's shown to reduce startup time by upwards of 30% on Windows. If it does not build on unique platforms nushell can be built without this feature, then using the platform's default allocator. + +# New commands + +- [`into float`](https://github.com/nushell/nushell/pull/9979) as a replacement for `into decimal` +- [`random float`](https://github.com/nushell/nushell/pull/10320) as a replacement for `random decimal` + +In the standard library we added the following commands: + +- [`std repeat`](https://github.com/nushell/nushell/pull/10339) as a command to repeat an element `n` times in a list. +- [`std formats from ndjson`](https://github.com/nushell/nushell/pull/10283) as a way to directly open newline-delimited JSON recrods. You can use `open` for files with the `.ndjson` ending if you `use std formats "from ndjson"`. +- [`std formats from jsonl`](https://github.com/nushell/nushell/pull/10283) as a way to directly open newline-delimited JSON records. You can use `open` for files with the `.jsonl` ending if you `use std formats "from jsonl"`. + +# Deprecations + +## Deprecated commands + +- [`into decimal`](https://github.com/nushell/nushell/pull/9979): Use `into float` instead +- [`random decimal`](https://github.com/nushell/nushell/pull/10320): Use `random float` instead + +# Breaking changes + +- Plugin authors need to update plugins after the span refactor +- Updated plugins need to be recompiled + +* [#10235](https://github.com/nushell/nushell/pull/10235) `input --until-bytes` now stops at any of given bytes +* [#10333](https://github.com/nushell/nushell/pull/10333) Consistently use `float` instead of `decimal` in type specifications +* [#10293](https://github.com/nushell/nushell/pull/10293) Remove pythonic `string * list` multiplication +* [#10292](https://github.com/nushell/nushell/pull/10292) Remove pythonic `int * list` multiplication +* [#10338](https://github.com/nushell/nushell/pull/10338) Change `echo` to print when not redirected +* [#10259](https://github.com/nushell/nushell/pull/10259) explore: remove `:config`, `:show-config`, `:tweak` commands +* [#9929](https://github.com/nushell/nushell/pull/9929) Rename the types with spaces in them to use `-` +* [#10254](https://github.com/nushell/nushell/pull/10254) Change LOG_FORMAT to NU_LOG_FORMAT in nu-std library +* [#9678](https://github.com/nushell/nushell/pull/9678) Move math constants to standard library +* [#10231](https://github.com/nushell/nushell/pull/10231) Make `append`/`prepend` consistent for ranges +* [#9966](https://github.com/nushell/nushell/pull/9966) Add support for Vim motions in `explore` +* [#10042](https://github.com/nushell/nushell/pull/10042) Spanned Value step 1: span all value cases +* [#10103](https://github.com/nushell/nushell/pull/10103) Create `Record` type +* [#10064](https://github.com/nushell/nushell/pull/10064) Fully remove `str replace --string` option after deprecation. Just use `str replace` instead. + +# Full changelog + +## Nushell + +- [tokatoka](https://github.com/tokatoka) created + - [Add 2 fuzzers for nu-path, nu-parser](https://github.com/nushell/nushell/pull/10376) +- [sholderbach](https://github.com/sholderbach) created + - [Clippy in tests](https://github.com/nushell/nushell/pull/10394) + - [Update internal use of `decimal` to `float`](https://github.com/nushell/nushell/pull/10333) + - [Optimize use of range in `std repeat`](https://github.com/nushell/nushell/pull/10353) + - [Remove python-like string multiplication](https://github.com/nushell/nushell/pull/10293) + - [Invert `&Option`s to `Option<&T>`](https://github.com/nushell/nushell/pull/10315) + - [Remove pythonic `int * list` behavior](https://github.com/nushell/nushell/pull/10292) + - [Rename `random decimal` to `random float`](https://github.com/nushell/nushell/pull/10320) + - [Rename `into decimal` to `into float`](https://github.com/nushell/nushell/pull/9979) + - [Deref `&String` arguments to `&str` where appropriate](https://github.com/nushell/nushell/pull/10321) + - [Use slices directly instead of `&Vec`](https://github.com/nushell/nushell/pull/10328) + - [Bump `calamine` and fix clippy](https://github.com/nushell/nushell/pull/10314) + - [Update `crates-ci/typos` and fix new typos](https://github.com/nushell/nushell/pull/10313) + - [Remove `Cargo.lock` in subcrates](https://github.com/nushell/nushell/pull/10280) + - [Move spellcheck config into `.github` folder](https://github.com/nushell/nushell/pull/10267) + - [Remove codecov.io setup](https://github.com/nushell/nushell/pull/10266) + - [Document that `open` looks up `from` subcommands](https://github.com/nushell/nushell/pull/10255) + - [Tweak contributor image to include more users](https://github.com/nushell/nushell/pull/10238) + - [Update `crossterm`/`ratatui`/dev-`reedline`](https://github.com/nushell/nushell/pull/10137) + - [Simplify rawstrings in tests](https://github.com/nushell/nushell/pull/10180) + - [Remove dead tests depending on `inc`](https://github.com/nushell/nushell/pull/10179) + - [Keep `arrow2` out of basic `--workspace` build](https://github.com/nushell/nushell/pull/10178) +- [fdncred](https://github.com/fdncred) created + - [fix some new chrono warnings](https://github.com/nushell/nushell/pull/10384) + - [add helper switch to move cursor to end of buffer](https://github.com/nushell/nushell/pull/10354) + - [add a few more columns to linux `ps -l` output](https://github.com/nushell/nushell/pull/10344) + - [silence some ucp warnings](https://github.com/nushell/nushell/pull/10294) + - [allow update to use metadata](https://github.com/nushell/nushell/pull/10264) + - [add 6 more table themes](https://github.com/nushell/nushell/pull/10279) + - [respect a users locale with the right prompt](https://github.com/nushell/nushell/pull/10273) + - [add more `ps` columns in Windows](https://github.com/nushell/nushell/pull/10275) + - [update format date when using %x %X %r](https://github.com/nushell/nushell/pull/10272) + - [Restore NU_LIB_DIRS and NU_PLUGIN_DIRS defaults](https://github.com/nushell/nushell/pull/10252) + - [allow `--login` to be used with nu's `--commands` parameter](https://github.com/nushell/nushell/pull/10253) + - [add plugin path when there are no signatures](https://github.com/nushell/nushell/pull/10201) + - [update query web example because wikipedia changed their page](https://github.com/nushell/nushell/pull/10173) + - [name hooks internally](https://github.com/nushell/nushell/pull/10127) + - [bump rust-toolchain to 1.70.0](https://github.com/nushell/nushell/pull/10113) +- [FilipAndersson245](https://github.com/FilipAndersson245) created + - [Adds mimalloc as default feature.](https://github.com/nushell/nushell/pull/10378) +- [zhiburt](https://github.com/zhiburt) created + - [nu-table: Fix expand table unnessary color in trail head config when wrap is used](https://github.com/nushell/nushell/pull/10367) + - [nu-table: Strip custom color in the header when used on border](https://github.com/nushell/nushell/pull/10357) + - [nu-table: Patch restore lead trail space bg color](https://github.com/nushell/nushell/pull/10351) + - [nu-explore: Refactorings](https://github.com/nushell/nushell/pull/10247) + - [Fix #10154](https://github.com/nushell/nushell/pull/10162) +- [J-Kappes](https://github.com/J-Kappes) created + - [fix input --until-bytes: now stops at any of given bytes](https://github.com/nushell/nushell/pull/10235) + - [Tests: clean up unnecessary use of pipeline()](https://github.com/nushell/nushell/pull/10170) +- [amtoine](https://github.com/amtoine) created + - [fix the pretty printing of failing tests in std](https://github.com/nushell/nushell/pull/10373) + - [add `std repeat` command to replace `"foo" * 3`](https://github.com/nushell/nushell/pull/10339) + - [add case-insensitive example to `where`](https://github.com/nushell/nushell/pull/10299) + - [allow `into duration` to take an integer amount of ns](https://github.com/nushell/nushell/pull/10286) + - [rename the types with spaces in them to use `-`](https://github.com/nushell/nushell/pull/9929) + - [fix default after an empty where](https://github.com/nushell/nushell/pull/10240) + - [move math constants to standard library](https://github.com/nushell/nushell/pull/9678) + - [support tab completion cycling](https://github.com/nushell/nushell/pull/10199) + - [add support for Vim motions in `explore`](https://github.com/nushell/nushell/pull/9966) +- [WindSoilder](https://github.com/WindSoilder) created + - [Ps: add `cwd` column on linux and macos](https://github.com/nushell/nushell/pull/10347) + - [return error when user break sleep by ctrl-c](https://github.com/nushell/nushell/pull/10234) +- [jntrnr](https://github.com/jntrnr) created + - [fix 'let' to properly redirect](https://github.com/nushell/nushell/pull/10360) + - [Change `echo` to print when not redirected](https://github.com/nushell/nushell/pull/10338) + - [remove profiling from nushell's hot loop](https://github.com/nushell/nushell/pull/10325) + - [Move Value to helpers, separate span call](https://github.com/nushell/nushell/pull/10121) + - [Spanned Value step 1: span all value cases](https://github.com/nushell/nushell/pull/10042) +- [GomesGoncalo](https://github.com/GomesGoncalo) created + - [fix #10319: allow json request of value type list](https://github.com/nushell/nushell/pull/10356) +- [Tiggax](https://github.com/Tiggax) created + - [Remove `select` error if same row/column is provided](https://github.com/nushell/nushell/pull/10350) + - [update `reject` to be able to recive arg list](https://github.com/nushell/nushell/pull/10216) + - [`reject` multiple row args support](https://github.com/nushell/nushell/pull/10163) +- [kubouch](https://github.com/kubouch) created + - [Allow parse-time evaluation of `if`](https://github.com/nushell/nushell/pull/10326) + - [Remove leftover const eval file](https://github.com/nushell/nushell/pull/10324) + - [Add NU_VERSION environment variable on startup](https://github.com/nushell/nushell/pull/10177) + - [Make $nu constant](https://github.com/nushell/nushell/pull/10160) + - [Allow parse-time evaluation of calls, pipelines and subexpressions](https://github.com/nushell/nushell/pull/9499) +- [hustcer](https://github.com/hustcer) created + - [Update Nu to v0.84 for release and nightly-build](https://github.com/nushell/nushell/pull/10334) + - [Upgrade softprops/action-gh-release to v0.1.15 for release and nightly build workflow](https://github.com/nushell/nushell/pull/10331) +- [geniusisme](https://github.com/geniusisme) created + - [provide env to commands and try to start provided path](https://github.com/nushell/nushell/pull/10302) +- [utouto97](https://github.com/utouto97) created + - [add 'from ndjson' into standard library](https://github.com/nushell/nushell/pull/10283) + - [refactor input command](https://github.com/nushell/nushell/pull/10150) +- [nanoqsh](https://github.com/nanoqsh) created + - [Keep order for `par-each`](https://github.com/nushell/nushell/pull/10249) + - [Make `append`/`prepend` consistent for ranges](https://github.com/nushell/nushell/pull/10231) +- [app/dependabot](https://github.com/app/dependabot) created + - [Bump bytesize from 1.2.0 to 1.3.0](https://github.com/nushell/nushell/pull/10306) + - [Bump tempfile from 3.7.0 to 3.8.0](https://github.com/nushell/nushell/pull/10307) + - [Bump actions/checkout from 3 to 4](https://github.com/nushell/nushell/pull/10308) + - [Bump itertools from 0.10.5 to 0.11.0](https://github.com/nushell/nushell/pull/9524) + - [Bump rust-embed from 6.8.1 to 8.0.0](https://github.com/nushell/nushell/pull/10208) + - [Bump git2 from 0.17.2 to 0.18.0](https://github.com/nushell/nushell/pull/10207) + - [Bump winreg from 0.50.0 to 0.51.0](https://github.com/nushell/nushell/pull/10209) + - [Bump notify-debouncer-full from 0.2.0 to 0.3.1](https://github.com/nushell/nushell/pull/10129) +- [dmatos2012](https://github.com/dmatos2012) created + - [Fix variables not allowed in ucp](https://github.com/nushell/nushell/pull/10304) + - [use uutils/coreutils cp command in place of nushell's cp command](https://github.com/nushell/nushell/pull/10097) +- [dzorya](https://github.com/dzorya) created + - [Added a comment that perl is required for feature static-link-openssl…](https://github.com/nushell/nushell/pull/10291) +- [nibon7](https://github.com/nibon7) created + - [Make cursor_shape optional](https://github.com/nushell/nushell/pull/10289) + - [Exit early when encountering parsing errors](https://github.com/nushell/nushell/pull/10213) + - [Auto format let-else block](https://github.com/nushell/nushell/pull/10214) + - [Use built-in is_terminal instead of is_terminal::is_terminal](https://github.com/nushell/nushell/pull/9550) + - [Don't use `oldtime` feature of chrono ](https://github.com/nushell/nushell/pull/9577) +- [alsuren](https://github.com/alsuren) created + - [signpost 'input list --types [key]' from 'keybindings list'](https://github.com/nushell/nushell/pull/10287) + - [Point from keybindings help to the book's reedline chapter](https://github.com/nushell/nushell/pull/10193) +- [IanManske](https://github.com/IanManske) created + - [Fix `rm` on macOS](https://github.com/nushell/nushell/pull/10282) + - [Restore initial foreground process group on exit](https://github.com/nushell/nushell/pull/10021) + - [Create `Record` type](https://github.com/nushell/nushell/pull/10103) +- [rgwood](https://github.com/rgwood) created + - [Start removing colour config from `explore`](https://github.com/nushell/nushell/pull/10270) + - [Exit explore on ctrl+c/d/q](https://github.com/nushell/nushell/pull/10257) + - [explore: remove `:config`, `:show-config`, `:tweak` commands](https://github.com/nushell/nushell/pull/10259) + - [Remove `exit_esc` and `show_banner` config from `explore`](https://github.com/nushell/nushell/pull/10258) + - [Fix watch not detecting modifications on Windows](https://github.com/nushell/nushell/pull/10109) +- [brunerm99](https://github.com/brunerm99) created + - [feat: Search terms for use, while, and range (#5093)](https://github.com/nushell/nushell/pull/10265) +- [balupton](https://github.com/balupton) created + - [readme: add dorothy to supported by](https://github.com/nushell/nushell/pull/10262) +- [stormasm](https://github.com/stormasm) created + - [change LOG_FORMAT to NU_LOG_FORMAT in nu-std library](https://github.com/nushell/nushell/pull/10254) + - [Move hook to nu_cmd_base](https://github.com/nushell/nushell/pull/10146) + - [remove warnings in nu_command tests](https://github.com/nushell/nushell/pull/10145) + - [update rust-toolchain doc to 4 weeks from 3](https://github.com/nushell/nushell/pull/10140) +- [horasal](https://github.com/horasal) created + - [Allow operator in constants](https://github.com/nushell/nushell/pull/10212) + - [treat path contains '?' as pattern](https://github.com/nushell/nushell/pull/10142) + - [prevent crash when use redirection with let/mut](https://github.com/nushell/nushell/pull/10139) + - [skip comments and eols while parsing pipeline](https://github.com/nushell/nushell/pull/10149) + - [handle empty pipeline while parsing let (fix Issue10083)](https://github.com/nushell/nushell/pull/10116) + - [Add encoding auto-detection for `decode`](https://github.com/nushell/nushell/pull/10030) +- [dead10ck](https://github.com/dead10ck) created + - [Clean up trash support on Android](https://github.com/nushell/nushell/pull/10225) + - [Fix unit tests on Android](https://github.com/nushell/nushell/pull/10224) + - [upgrade nix to 0.27](https://github.com/nushell/nushell/pull/10223) + - [Support Termux](https://github.com/nushell/nushell/pull/10013) +- [ofek](https://github.com/ofek) created + - [Fix example history command pipeline](https://github.com/nushell/nushell/pull/10220) +- [MasterMach50](https://github.com/MasterMach50) created + - [changed default env file to use $nu.home_path to find home](https://github.com/nushell/nushell/pull/10192) +- [matthias-Q](https://github.com/matthias-Q) created + - [feat: allow `from csv` to accept 4 byte unicode separator chars](https://github.com/nushell/nushell/pull/10138) + - [Allow for `.parq` file ending as alternative to `.parquet`](https://github.com/nushell/nushell/pull/10112) +- [ayax79](https://github.com/ayax79) created + - [fixed usages of deprecated chrono DateTime::from_utc](https://github.com/nushell/nushell/pull/10161) + - [Updating polars and sqlparser versions](https://github.com/nushell/nushell/pull/10114) +- [SED4906](https://github.com/SED4906) created + - [Update removed "MDI" icons to current MD icons](https://github.com/nushell/nushell/pull/10126) +- [JoaquinTrinanes](https://github.com/JoaquinTrinanes) created + - [Screen reader-friendly errors](https://github.com/nushell/nushell/pull/10122) +- [Hofer-Julian](https://github.com/Hofer-Julian) created + - [toolkit: Renames `pretty-print-command`](https://github.com/nushell/nushell/pull/10110) + - [Add notice to enable develop mode on Windows](https://github.com/nushell/nushell/pull/10111) +- [herobs](https://github.com/herobs) created + - [Fix 9156 endian consistency](https://github.com/nushell/nushell/pull/9873) +- [ito-hiroki](https://github.com/ito-hiroki) created + - [Fix tab completion order of directories to consistent with order of files](https://github.com/nushell/nushell/pull/10102) + +## Extension + +- [nerditation](https://github.com/nerditation) created + - [use `which` to search `nu` location, add icon too.](https://github.com/nushell/vscode-nushell-lang/pull/153) +- [adamcstephens](https://github.com/adamcstephens) created + - [fix shebang/firstLine detection](https://github.com/nushell/vscode-nushell-lang/pull/151) + +## Documentation + +- [Gryff](https://github.com/Gryff) created + - [Change direnv example to upload $env.PATH as a list](https://github.com/nushell/nushell.github.io/pull/1058) +- [edhowland](https://github.com/edhowland) created + - [Changed Python plugin example to be more portable](https://github.com/nushell/nushell.github.io/pull/1060) +- [dnsem](https://github.com/dnsem) created + - [Support for standard input in script with shebang](https://github.com/nushell/nushell.github.io/pull/1057) +- [petrisch](https://github.com/petrisch) created + - [DE translation for custom_completions.md](https://github.com/nushell/nushell.github.io/pull/1056) + - [Typos in custom_completions](https://github.com/nushell/nushell.github.io/pull/1052) +- [mb21](https://github.com/mb21) created + - [Cookbook setup: fix command to append to PATH](https://github.com/nushell/nushell.github.io/pull/1055) +- [connorjs](https://github.com/connorjs) created + - [Update variables_and_subexpressions.md - remove obsolete section](https://github.com/nushell/nushell.github.io/pull/1054) + - [Update working_with_lists.md - format date](https://github.com/nushell/nushell.github.io/pull/1053) +- [JoaquinTrinanes](https://github.com/JoaquinTrinanes) created + - [Fix external completers typo](https://github.com/nushell/nushell.github.io/pull/1051) + - [Simplify external completer](https://github.com/nushell/nushell.github.io/pull/1049) + - [Error style section](https://github.com/nushell/nushell.github.io/pull/1026) +- [hustcer](https://github.com/hustcer) created + - [Update min required node version and some node modules](https://github.com/nushell/nushell.github.io/pull/1050) +- [sholderbach](https://github.com/sholderbach) created + - [Document that `open` looks up `from`s in scope](https://github.com/nushell/nushell.github.io/pull/1048) +- [stormasm](https://github.com/stormasm) created + - [add a link to the contributor book at the end of the plugins chapter](https://github.com/nushell/nushell.github.io/pull/1045) +- [alsuren](https://github.com/alsuren) created + - [Point out where command docs should be edited](https://github.com/nushell/nushell.github.io/pull/1042) +- [dclausen](https://github.com/dclausen) created + - [Update cheat_sheet.md](https://github.com/nushell/nushell.github.io/pull/1039) +- [simonboots](https://github.com/simonboots) created + - [Fix small typo in modules.md](https://github.com/nushell/nushell.github.io/pull/1038) +- [leetemil](https://github.com/leetemil) created + - [Update docs for exiting shell in shells](https://github.com/nushell/nushell.github.io/pull/1037) +- [adamchalmers](https://github.com/adamchalmers) created + - [Clarify how to check config file paths](https://github.com/nushell/nushell.github.io/pull/1030) + - [Link to escape when discussing escapes](https://github.com/nushell/nushell.github.io/pull/1031) +- [follower](https://github.com/follower) created + - [Move launch instructions earlier in page.](https://github.com/nushell/nushell.github.io/pull/1032) +- [jamesarch](https://github.com/jamesarch) created + - [fix missing command](https://github.com/nushell/nushell.github.io/pull/1034) +- [narve](https://github.com/narve) created + - [Update loading_data.md, correct link to http command](https://github.com/nushell/nushell.github.io/pull/1033) +- [dlamei](https://github.com/dlamei) created + - [fix typo in book](https://github.com/nushell/nushell.github.io/pull/1028) +- [lomm28](https://github.com/lomm28) created + - [nu cheat sheet added](https://github.com/nushell/nushell.github.io/pull/1025) +- [fdncred](https://github.com/fdncred) created + - [update fdncred's item + typo](https://github.com/nushell/nushell.github.io/pull/1022) +- [rgwood](https://github.com/rgwood) created + - [Update Reilly's comments in birthday blog post](https://github.com/nushell/nushell.github.io/pull/1021) +- [app/github-actions](https://github.com/app/github-actions) created + - [Compressed Images](https://github.com/nushell/nushell.github.io/pull/1020) +- [jntrnr](https://github.com/jntrnr) created + - [Add Nushell birthday post](https://github.com/nushell/nushell.github.io/pull/1019) + +## Nu_Scripts + +- [amtoine](https://github.com/amtoine) created + - [fix scripts](https://github.com/nushell/nu_scripts/pull/594) + - [add a `typeof` command](https://github.com/nushell/nu_scripts/pull/597) + - [add `$.type` to `package.nuon`](https://github.com/nushell/nu_scripts/pull/582) + - [add the `random-bytes` benchmark](https://github.com/nushell/nu_scripts/pull/595) +- [WindSoilder](https://github.com/WindSoilder) created + - [Improve background job.nu](https://github.com/nushell/nu_scripts/pull/607) + - [use closure instead of block](https://github.com/nushell/nu_scripts/pull/602) +- [Zinvoke](https://github.com/Zinvoke) created + - [FEATURE: add `catppuccin-mocha` theme](https://github.com/nushell/nu_scripts/pull/601) +- [brunerm99](https://github.com/brunerm99) created + - [Change nu_conda list to output active status of environment as well (#604)](https://github.com/nushell/nu_scripts/pull/605) +- [icp1994](https://github.com/icp1994) created + - [feat(hook): add `rusty-paths.nu`](https://github.com/nushell/nu_scripts/pull/596) +- [selfagency](https://github.com/selfagency) created + - [Add support for fnm](https://github.com/nushell/nu_scripts/pull/593) +- [fnuttens](https://github.com/fnuttens) created + - [Replace exa by eza aliases](https://github.com/nushell/nu_scripts/pull/591) +- [maxim-uvarov](https://github.com/maxim-uvarov) created + - [Update `bar` function](https://github.com/nushell/nu_scripts/pull/589) +- [StripedMonkey](https://github.com/StripedMonkey) created + - [Expand git completions](https://github.com/nushell/nu_scripts/pull/587) +- [AntoineSebert](https://github.com/AntoineSebert) created + - [Add `dfr` before `into df` and `into nu`](https://github.com/nushell/nu_scripts/pull/585) + +## Reedline + +- [sholderbach](https://github.com/sholderbach) created + - [Remove old `actions-rs/cargo`](https://github.com/nushell/reedline/pull/637) + - [Add a configuration to codecov.io](https://github.com/nushell/reedline/pull/636) + - [Setup coverage with codecov.io](https://github.com/nushell/reedline/pull/635) + - [Bump `crossterm` to 0.27.0](https://github.com/nushell/reedline/pull/625) +- [ysthakur](https://github.com/ysthakur) created + - [Let prompts choose to repaint on enter](https://github.com/nushell/reedline/pull/627) +- [Hofer-Julian](https://github.com/Hofer-Julian) created + - [Minor improvements](https://github.com/nushell/reedline/pull/633) + - [Fix `read_line` docs](https://github.com/nushell/reedline/pull/629) +- [Abdillah](https://github.com/Abdillah) created + - [Add Kitty protocol keyboard enhancement support](https://github.com/nushell/reedline/pull/607) diff --git a/blog/2023-10-17-nushell_0_86.md b/src/content/docs/blog/2023-10-17-nushell_0_86.md similarity index 99% rename from blog/2023-10-17-nushell_0_86.md rename to src/content/docs/blog/2023-10-17-nushell_0_86.md index bde80eca296..202d2bcc5ef 100644 --- a/blog/2023-10-17-nushell_0_86.md +++ b/src/content/docs/blog/2023-10-17-nushell_0_86.md @@ -20,7 +20,7 @@ Today, we're releasing version 0.86 of Nu. This release adds fish-like directory Nu 0.86 is available as [pre-built binaries](https://github.com/nushell/nushell/releases/tag/0.86.0) or from [crates.io](https://crates.io/crates/nu). If you have Rust installed you can install it using `cargo install nu`. -> :bulb: **Note** +> :bulb: **Note** > The optional dataframe functionality is available by `cargo install nu --features=dataframe`. As part of this release, we also publish a set of optional plugins you can install and use with Nu. To install, use `cargo install nu_plugin_`. @@ -193,7 +193,7 @@ With this new release, we are still working on the type system of Nushell. custom commands. With [#10424](https://github.com/nushell/nushell/pull/10424), default values won't overwrite type annotations anymore, i.e. the following is now possible: -```nushell +```nushellshell def foo [x: any = null] { print $"$x" } foo "string" # will show `x: string` @@ -208,7 +208,7 @@ Continuing with the options on custom commands, let's talk about an important ch - annotating a _boolean_ option will create an option and will require to pass a boolean value -```nushell +```nushellshell def foo [--option: bool] { if $option { print "yeah" } } foo --option # will give an error @@ -218,7 +218,7 @@ foo --option true # will print "yeah" - to create a _boolean_ switch, you need to omit the type annotation -```nushell +```nushellshell def bar [--switch] { if $switch { print "yeah" } } bar # won't print anything @@ -228,7 +228,8 @@ bar --switch # will print "yeah" > :bulb: **Note** > Boolean options are one step towards addressing a major pain point of Nushell: Passing flags around to other commands. > Calling a command with a flag, such as `def inner [--foo] { ... }`, from another command used to require `if`-`else` to pass the flag: -> ```nushell +> +> ```nushellshell > def outer [--foo] { > if $foo { > inner --foo @@ -237,8 +238,10 @@ bar --switch # will print "yeah" > } > } > ``` +> > With boolean options, it is now possible to define `def inner [--foo: bool] { ... }` and then call simply as -> ```nushell +> +> ```nushellshell > def outer [--foo] { > inner --foo $foo > } @@ -249,17 +252,17 @@ to their limits, this time by allowing complex types in input/output signaturate and in `let` assignments. This means that [#10405](https://github.com/nushell/nushell/pull/10405) allows one to write things like: -```nushell +```nushellshell let my_r: record = { a: 123 } ``` or -```nushell +```nushellshell def my_complex_command []: nothing -> record { { a: 123 } } ``` -> :bulb: **Note** +> :bulb: **Note** > other contributions worth mentionning about the type system: > | author | title | pr | > | -------------------------------------------------- | ---------------------------------------------------------------------------- | ------------------------------------------------------- | @@ -270,10 +273,11 @@ def my_complex_command []: nothing -> record { { a: 123 } } ## Unified command definitions Nushell currently has three ways to define a command: -* `def` to define a regular command -* `def-env` to define a command that preserves the environment -* `extern-wrapped` to define a command with a signature where unknown flags and parameters are collected into strings without throwing an error -* (`extern` defines an external signature, not a real command) + +- `def` to define a regular command +- `def-env` to define a command that preserves the environment +- `extern-wrapped` to define a command with a signature where unknown flags and parameters are collected into strings without throwing an error +- (`extern` defines an external signature, not a real command) In this release, [@kubouch](https://github.com/kubouch) unified the syntax in [#10566](https://github.com/nushell/nushell/pull/10566) such that the `def-env` and `extern-wrapped` are now defined with the `--env` and `--wrapped` options to the `def` keyword. We made this change to go in line with the `let-env` removal and simplifying the language in general. @@ -339,7 +343,7 @@ need to be made there before integrating into nushell. but, thanks to [@fdncred](https://github.com/fdncred) and [#10427](https://github.com/nushell/nushell/pull/10427), the new `into value` command should help make that task easier by trying to infer the types for you: -```nushell +```nushellshell # should help you catch integer user and group IDs in the `/etc/passwd` file on *nix systems open /etc/passwd | lines | split column ":" user . uid gid desc home shell | into value ``` @@ -355,14 +359,14 @@ open /etc/passwd | lines | split column ":" user . uid gid desc home shell | int [@hudclark](https://github.com/hudclark) got your back with the new `unfold` command from [#10489](https://github.com/nushell/nushell/pull/10489)! The first 10 Fibonacci numbers can now be computed very easily with something like -```nushell +```nushellshell unfold [0, 1] {|fib| {out: $fib.0, next: [$fib.1, ($fib.0 + $fib.1)]} } | first 10 ``` To crawl multi-page API responses, e.g. when listing issues of a GitHub repository, the `unfold` is very handy and allows to transform -```nushell +```nushellshell mut pages = [] for page in 1.. { let resp = http get ( @@ -384,7 +388,7 @@ $pages into -```nushell +```nushellshell unfold 1 {|page| let resp = http get ( { @@ -425,7 +429,7 @@ See a full overview of the [breaking changes](#breaking-changes) With [#10526](https://github.com/nushell/nushell/pull/10526) from [@WindSoilder](https://github.com/WindSoilder), the `--column` option of the `rename` command now takes a `record` instead of a `list`: -```nushell +```nushellshell > ls | where type == file | rename --column {name: filename, size: nb_bytes} #┬filename─┬type┬nb_bytes┬─────modified────── 0│LICENSE │file│ 35.1 KB│2022-12-23 11:34:42 @@ -436,7 +440,7 @@ the `--column` option of the `rename` command now takes a `record` instead of a The `do` command can now mutate its outside environment with a new `--env` option added by [@ClipplerBlood](https://github.com/ClipplerBlood) in [#10572](https://github.com/nushell/nushell/pull/10572). This means that the following will now be possible: -```nushell +```nushellshell do --env { cd some/where } ``` @@ -473,7 +477,7 @@ In 0.86, we now differentiate between a switch `--x` and a flag with a boolean a ## Before -```nushell +```nushellshell > [UserID ABCdefGHI foo123bar] | str camel-case ╭───┬───────────╮ │ 0 │ userID │ @@ -490,7 +494,7 @@ In 0.86, we now differentiate between a switch `--x` and a flag with a boolean a ## After -```nushell +```nushellshell > [UserID ABCdefGHI foo123bar] | str camel-case ╭───┬───────────╮ │ 0 │ userId │ diff --git a/blog/2023-11-14-nushell_0_87_0.md b/src/content/docs/blog/2023-11-14-nushell_0_87_0.md similarity index 99% rename from blog/2023-11-14-nushell_0_87_0.md rename to src/content/docs/blog/2023-11-14-nushell_0_87_0.md index e4ae6cc28da..3068a859850 100644 --- a/blog/2023-11-14-nushell_0_87_0.md +++ b/src/content/docs/blog/2023-11-14-nushell_0_87_0.md @@ -183,7 +183,7 @@ installation by default. [#10723](https://github.com/nushell/nushell/pull/10723) integrates a Language Server Protocol (LSP) implementation directly inside Nushell. Running -```nushell +```nushellshell nu --lsp ``` @@ -250,7 +250,7 @@ Nushell: e.g. let's say I created a bunch of files, one of them containing an obvious _globbing_ pattern -```nushell +```nushellshell touch *.txt foo.txt bar.txt baz.txt ``` @@ -267,7 +267,7 @@ pattern; finds `foo.txt`, `bar.txt`, and `baz.txt`; and removes them. Can we all agree for one moment that `match` is a great command? -```nushell +```nushellshell def work-on-list []: any -> string { match $in { [$x, ..] if $x == 1 => { 'good list' }, @@ -277,7 +277,7 @@ def work-on-list []: any -> string { } ``` -```nushell +```nushellshell > [1, 2, 3] | work-on-list good list > [2, 1, 3] | work-on-list @@ -288,7 +288,7 @@ not a list at all However, it had a pretty big flaw: it was not able to work on `null` values :open_mouth: -```nushell +```nushellshell > match null { null => "success", _ => "failure" } failure ``` @@ -296,7 +296,7 @@ failure In [#10829](https://github.com/nushell/nushell/pull/10829), thanks to [@hudclark](https://github.com/hudclark), the `match` command is now able to work properly on `null` values. -```nushell +```nushellshell > match null { null => "success", _ => "failure" } success ``` @@ -306,14 +306,14 @@ success Once again [@WindSoilder](https://github.com/WindSoilder) has been working on _pipeline redirections_. Because they need to be given a target path to properly function, i.e. -```nushell +```nushellshell echo aaa o> | ignore ``` does not make sense in itself, [#10835](https://github.com/nushell/nushell/pull/10835) makes commands such as the one just above throw a nice error: -```nushell +```nushellshell Error: nu::parser::parse_mismatch × Parse mismatch during operation. @@ -326,7 +326,7 @@ Error: nu::parser::parse_mismatch The following will still function as expected: -```nushell +```nushellshell echo aaa o> foo.txt | ignore ``` @@ -350,12 +350,12 @@ has been added by [@Hullabaloo-and-Howdy-Do](https://github.com/Hullabaloo-and-H When doing maths, _modulo_ is a ubiquitous operator, e.g. -```nushell +```nushellshell > (11 + 5) mod 7 2 ``` -```nushell +```nushellshell > (123 * 456) mod 13 6 ``` @@ -367,7 +367,7 @@ for `duration`s in [#10745](https://github.com/nushell/nushell/pull/10745). Thanks to their work, Nushell will now allow the following command: -```nushell +```nushellshell > (2min + 31sec) mod 20sec 11sec ``` @@ -381,13 +381,13 @@ disallowed the definition of table literals with duplicated columns in [#10875]( Trying to define the following ill-defined table -```nushell +```nushellshell [[a a]; [1 2]] ``` will result in an error from now onwards. -```nushell +```nushellshell Error: nu::shell::column_defined_twice × Record field or table column used twice @@ -406,7 +406,7 @@ This section sheds some light on some of the contributions from - [@drbrain](https://github.com/drbrain) in [#10952](https://github.com/nushell/nushell/pull/10952) made plugins show their extra usage and search terms in `--help` -```nushell +```nushellshell PluginSignature test 1 for plugin. Returns Value::Nothing Extra usage for nu-example-1 @@ -465,7 +465,7 @@ As usual, new release rhymes with changes to commands! - `input list` will now return `null` when no choice has been selected, see the contribution of [@KAAtheWiseGit](https://github.com/KAAtheWiseGit) in [#10913](https://github.com/nushell/nushell/pull/10913) - thanks to [@KAAtheWiseGit](https://github.com/KAAtheWiseGit) `error make` has been refactored in [#10923](https://github.com/nushell/nushell/pull/10923) and will now take a `$.label.span` and a `$.help` -```nushell +```nushellshell error make { msg: "Message" label: { diff --git a/blog/2023-11-16-nushell-2023-survey-results.md b/src/content/docs/blog/2023-11-16-nushell-2023-survey-results.md similarity index 100% rename from blog/2023-11-16-nushell-2023-survey-results.md rename to src/content/docs/blog/2023-11-16-nushell-2023-survey-results.md diff --git a/src/content/docs/blog/2023-12-12-nushell_0_88_0.md b/src/content/docs/blog/2023-12-12-nushell_0_88_0.md new file mode 100644 index 00000000000..8cae791313c --- /dev/null +++ b/src/content/docs/blog/2023-12-12-nushell_0_88_0.md @@ -0,0 +1,835 @@ +--- +title: Nushell 0.88.0 +author: The Nu Authors +author_site: https://twitter.com/nu_shell +author_image: https://www.nushell.sh/blog/images/nu_logo.png +excerpt: Today, we're releasing version 0.88.0 of Nu. This release adds a spread operator, output stream improvements, dynamic switch support, and much more. +--- + + + +# Nushell 0.88.0 + +Nushell, or Nu for short, is a new shell that takes a modern, structured approach to your command line. It works seamlessly with the data from your filesystem, operating system, and a growing number of file formats to make it easy to build powerful command line pipelines. + +Today, we're releasing version 0.88.0 of Nu. This release adds a spread operator, output stream improvements, dynamic switch support, and much more. + +# Where to get it + +Nu 0.88.0 is available as [pre-built binaries](https://github.com/nushell/nushell/releases/tag/0.88.0) or from [crates.io](https://crates.io/crates/nu). If you have Rust installed you can install it using `cargo install nu`. + +::: tip Note +The optional dataframe functionality is available by `cargo install nu --features=dataframe`. +::: + +As part of this release, we also publish a set of optional plugins you can install and use with Nu. To install, use `cargo install nu_plugin_`. + +# Table of content + +- [_Themes of this release / New features_](#themes-of-this-release-new-features-toc) + - [_Hall of fame_](#hall-of-fame-toc) + - [_Bug fixes_](#bug-fixes-toc) + - [_Enhancing the documentation_](#enhancing-the-documentation-toc) + - [_New *spread* operator for list and record literals_](#new-spread-operator-for-list-and-record-literals-toc) + - [_Passing boolean switches dynamically_](#passing-boolean-switches-dynamically-toc) + - [_Redirection to standard streams is getting better_](#redirection-to-standard-streams-is-getting-better-toc) + - [_One-time theming of tables is there_](#one-time-theming-of-tables-is-there-toc) + - [_Exposing name of script to the wild_](#exposing-name-of-script-to-the-wild-toc) + - [_Parsing human-friendly dates into Nushell values_](#parsing-human-friendly-dates-into-nushell-values-toc) + - [_Show found externals via syntax highlighting in the REPL_](#show-found-externals-via-syntax-highlighting-in-the-repl-toc) + - [_New "out of bound" error_](#new-out-of-bound-error-toc) + - [_Details on the `0.87.1` hotfix release_](#details-on-the-0-87-1-hotfix-release-toc) + - [_Need help to wrap... commands?_](#need-help-to-wrap-commands-toc) + - [_Restricting use of internal variables_](#restricting-use-of-internal-variables-toc) + - [_A small update on the LSP_](#a-small-update-on-the-lsp-toc) + - [_Our set of commands is evolving_](#our-set-of-commands-is-evolving-toc) + - [_New commands_](#new-commands-toc) + - [_Changes to existing commands_](#changes-to-existing-commands-toc) + - [_Deprecated commands_](#deprecated-commands-toc) + - [_Removed commands_](#removed-commands-toc) +- [_Breaking changes_](#breaking-changes-toc) +- [_Full changelog_](#full-changelog-toc) + +# Themes of this release / New features [[toc](#table-of-content)] + + + + +## Hall of fame [[toc](#table-of-content)] + +### Bug fixes [[toc](#table-of-content)] + +Thanks to all the contributors below for helping us solve issues and bugs :pray: +| author | description | url | +| ------------------------------------ | ----------- | ------------------------------------------------------- | +| [@dead10ck](https://github.com/dead10ck) | into binary -c: return 0 as single byte | [#11068](https://github.com/nushell/nushell/pull/11068) | +| [@zhiburt](https://github.com/zhiburt) | Fix #11047 | [#11054](https://github.com/nushell/nushell/pull/11054) | +| [@fdncred](https://github.com/fdncred) | tweak `table` example/parameter text | [#11071](https://github.com/nushell/nushell/pull/11071) | +| [@fdncred](https://github.com/fdncred) | add "default" table theme | [#11072](https://github.com/nushell/nushell/pull/11072) | +| [@fdncred](https://github.com/fdncred) | correct table example syntax | [#11074](https://github.com/nushell/nushell/pull/11074) | +| [@fdncred](https://github.com/fdncred) | optimize/clean up a few of the `table` changes | [#11076](https://github.com/nushell/nushell/pull/11076) | +| [@sophiajt](https://github.com/sophiajt) | Fix the output type for 'view files' | [#11077](https://github.com/nushell/nushell/pull/11077) | +| [@danielsomerfield](https://github.com/danielsomerfield) | Fix toolkit to run workspace on 'check pr' (issue #10906) | [#11112](https://github.com/nushell/nushell/pull/11112) | +| [@hustcer](https://github.com/hustcer) | Exit the release job if creating binary package failed | [#11145](https://github.com/nushell/nushell/pull/11145) | +| [@hustcer](https://github.com/hustcer) | Fix release and nightly build workflow | [#11146](https://github.com/nushell/nushell/pull/11146) | +| [@amtoine](https://github.com/amtoine) | fix the link to the `nu_scripts` in `std clip` deprecation | [#11150](https://github.com/nushell/nushell/pull/11150) | +| [@NotLebedev](https://github.com/NotLebedev) | Cp target expansion | [#11152](https://github.com/nushell/nushell/pull/11152) | +| [@MarikaChlebowska](https://github.com/MarikaChlebowska) | Add metadata to some filters | [#11160](https://github.com/nushell/nushell/pull/11160) | +| [@sholderbach](https://github.com/sholderbach) | Revert "Adding support for Polars structs" | [#11171](https://github.com/nushell/nushell/pull/11171) | +| [@sigoden](https://github.com/sigoden) | Fix spans passed to external_completer | [#11008](https://github.com/nushell/nushell/pull/11008) | +| [@nibon7](https://github.com/nibon7) | Add boundary check for str index-of | [#11190](https://github.com/nushell/nushell/pull/11190) | +| [@WindSoilder](https://github.com/WindSoilder) | When using redirection, if a command generates non-zero exit code, the script should stop running | [#11191](https://github.com/nushell/nushell/pull/11191) | +| [@nibon7](https://github.com/nibon7) | Fix span of invalid range | [#11207](https://github.com/nushell/nushell/pull/11207) | +| [@nibon7](https://github.com/nibon7) | Fix capacity overflow caused by large range of ports | [#11210](https://github.com/nushell/nushell/pull/11210) | +| [@IanManske](https://github.com/IanManske) | Fix `get -i` ignoring errors for only the first cellpath | [#11213](https://github.com/nushell/nushell/pull/11213) | +| [@dtolnay](https://github.com/dtolnay) | Fix `Option<&str> == Option<&String>` build error when using rust_decimal/rkyv feature | [#11205](https://github.com/nushell/nushell/pull/11205) | +| [@nibon7](https://github.com/nibon7) | Add checks for ports | [#11214](https://github.com/nushell/nushell/pull/11214) | +| [@ysthakur](https://github.com/ysthakur) | Fix highlighting of spread subexpressions in records | [#11202](https://github.com/nushell/nushell/pull/11202) | +| [@nibon7](https://github.com/nibon7) | Fix overlay_use_main_not_exported hanging when an external spam command exists | [#11261](https://github.com/nushell/nushell/pull/11261) | +| [@AucaCoyan](https://github.com/AucaCoyan) | :bug: Fixes markdown formatting on LSP hover | [#11253](https://github.com/nushell/nushell/pull/11253) | +| [@MarikaChlebowska](https://github.com/MarikaChlebowska) | Add more descriptive error message when passing list to from_csv | [#10962](https://github.com/nushell/nushell/pull/10962) | +| [@sophiajt](https://github.com/sophiajt) | Respect non-zero exit code in subexpressions and blocks | [#8984](https://github.com/nushell/nushell/pull/8984) | +| [@WindSoilder](https://github.com/WindSoilder) | Error on `use path item1 item2`, if item1 is not a module | [#11183](https://github.com/nushell/nushell/pull/11183) | +| [@KAAtheWiseGit](https://github.com/KAAtheWiseGit) | Match `++=` capabilities with `++` | [#11130](https://github.com/nushell/nushell/pull/11130) | +| [@fdncred](https://github.com/fdncred) | Add nu lib dirs default | [#11248](https://github.com/nushell/nushell/pull/11248) | + +### Enhancing the documentation [[toc](#table-of-content)] + +Thanks to all the contributors below for helping us making the documentation of Nushell commands better :pray: +| author | description | url | +| ------------------------------------------------ | ---------------------------------------------------------------------------- | ------------------------------------------------------- | +| [@sholderbach](https://github.com/sholderbach) | Curate developer documentation in tree | [#11052](https://github.com/nushell/nushell/pull/11052) | +| [@IanManske](https://github.com/IanManske) | Build `nu-protocol` docs with all features enabled | [#11180](https://github.com/nushell/nushell/pull/11180) | +| [@poliorcetics](https://github.com/poliorcetics) | feat: Add default docs for aliases, generated from the command they point to | [#10825](https://github.com/nushell/nushell/pull/10825) | +| [@amtoine](https://github.com/amtoine) | fix `nu-std` README | [#11244](https://github.com/nushell/nushell/pull/11244) | + +### Working on internals [[toc](#table-of-content)] + +Thanks to all the contributors below for working on internals of Nushell, such as refactoring the code :pray: +| author | description | url | +| ---------------------------------------------------- | -------------------------------------------------------- | ------------------------------------------------------- | +| [@fdncred](https://github.com/fdncred) | bump rust-toolchain to 1.72.1 | [#11079](https://github.com/nushell/nushell/pull/11079) | +| [@nibon7](https://github.com/nibon7) | Apply nightly clippy fixes | [#11083](https://github.com/nushell/nushell/pull/11083) | +| [@drbrain](https://github.com/drbrain) | Convert ShellError::CommandNotFound to named fields | [#11094](https://github.com/nushell/nushell/pull/11094) | +| [@drbrain](https://github.com/drbrain) | Convert ShellError::NetworkFailure to named fields | [#11093](https://github.com/nushell/nushell/pull/11093) | +| [@drbrain](https://github.com/drbrain) | Add Argument::span() and Call::arguments_span() | [#10983](https://github.com/nushell/nushell/pull/10983) | +| [@IanManske](https://github.com/IanManske) | Refactor `Value` cell path functions to fix bugs | [#11066](https://github.com/nushell/nushell/pull/11066) | +| [@sholderbach](https://github.com/sholderbach) | Bump version to `0.87.2` | [#11114](https://github.com/nushell/nushell/pull/11114) | +| [@sholderbach](https://github.com/sholderbach) | Bump `procfs` to 0.16.0 | [#11115](https://github.com/nushell/nushell/pull/11115) | +| [@drbrain](https://github.com/drbrain) | Remove ShellError::FlagNotFound | [#11119](https://github.com/nushell/nushell/pull/11119) | +| [@drbrain](https://github.com/drbrain) | Convert ShellError::AliasNotFound to named fields | [#11118](https://github.com/nushell/nushell/pull/11118) | +| [@drbrain](https://github.com/drbrain) | Convert FileNotFound to named fields | [#11120](https://github.com/nushell/nushell/pull/11120) | +| [@hustcer](https://github.com/hustcer) | Upgrade Nu and script for release workflow | [#11121](https://github.com/nushell/nushell/pull/11121) | +| [@sholderbach](https://github.com/sholderbach) | Use record API in `describe --detailed` | [#11075](https://github.com/nushell/nushell/pull/11075) | +| [@drbrain](https://github.com/drbrain) | Convert FileNotFoundCustom to named fields | [#11123](https://github.com/nushell/nushell/pull/11123) | +| [@drbrain](https://github.com/drbrain) | Convert PluginFailedToLoad to named fields | [#11124](https://github.com/nushell/nushell/pull/11124) | +| [@drbrain](https://github.com/drbrain) | Convert PluginFailedToEncode to named fields | [#11125](https://github.com/nushell/nushell/pull/11125) | +| [@drbrain](https://github.com/drbrain) | Convert PluginFailedToDecode to named fields | [#11126](https://github.com/nushell/nushell/pull/11126) | +| [@sholderbach](https://github.com/sholderbach) | Move more commands to opaque `Record` type | [#11122](https://github.com/nushell/nushell/pull/11122) | +| [@rfaulhaber](https://github.com/rfaulhaber) | Bump `sysinfo` to 0.29.11 | [#11166](https://github.com/nushell/nushell/pull/11166) | +| [@drbrain](https://github.com/drbrain) | Convert more ShellError variants to named fields | [#11173](https://github.com/nushell/nushell/pull/11173) | +| [@WindSoilder](https://github.com/WindSoilder) | add echo_env_mixed testbin to reduce windows only tests | [#11172](https://github.com/nushell/nushell/pull/11172) | +| [@cosineblast](https://github.com/cosineblast) | Remove file I/O from tests that don't need it | [#11182](https://github.com/nushell/nushell/pull/11182) | +| [@drbrain](https://github.com/drbrain) | Convert more ShellError variants to named fields | [#11222](https://github.com/nushell/nushell/pull/11222) | +| [@nibon7](https://github.com/nibon7) | Explicitly indicate duplicate flags | [#11226](https://github.com/nushell/nushell/pull/11226) | +| [@ysthakur](https://github.com/ysthakur) | Reduce code duplication in eval.rs and eval_const.rs | [#11192](https://github.com/nushell/nushell/pull/11192) | +| [@ayax79](https://github.com/ayax79) | Upgrading to polars 0.35 | [#11241](https://github.com/nushell/nushell/pull/11241) | +| [@IanManske](https://github.com/IanManske) | Remove unnecessary boxing of `Stack::recursion_count` | [#11238](https://github.com/nushell/nushell/pull/11238) | +| [@schrieveslaach](https://github.com/schrieveslaach) | Upgrade lsp-server Dependency | [#11252](https://github.com/nushell/nushell/pull/11252) | +| [@drbrain](https://github.com/drbrain) | Convert `Shellerror::GenericError` to named fields | [#11230](https://github.com/nushell/nushell/pull/11230) | +| [@sholderbach](https://github.com/sholderbach) | Bump version to `0.87.1` | [#11056](https://github.com/nushell/nushell/pull/11056) | +| [@dead10ck](https://github.com/dead10ck) | Testing support tweaks: exit status in `Outcome` | [#10692](https://github.com/nushell/nushell/pull/10692) | +| [@nibon7](https://github.com/nibon7) | Simplify `clear` implementation | [#11273](https://github.com/nushell/nushell/pull/11273) | +| [@drbrain](https://github.com/drbrain) | Convert remainder of ShellError variants to named fields | [#11276](https://github.com/nushell/nushell/pull/11276) | + +## New _spread_ operator for list and record literals [[toc](#table-of-content)] + +[#10598](https://github.com/nushell/nushell/issues/10598) asked for a spread operator (`...`), and in [#11006](https://github.com/nushell/nushell/pull/11006) +and [#11144](https://github.com/nushell/nushell/pull/11144/), [@ysthakur](https://github.com/ysthakur/) implemented a spread operator in lists and records, respectively. +Spreading arguments to commands has not been implemented yet. + +The spread operator can help you avoid `append` in lists, e.g., this: + +```nushellshell +let list = ["foo"] +[ + 1, + ...$list, + ...("foo" | split chars), + ...[3 9], + [] +] | to nuon +``` + +will give: + +```nushellshell +[1, foo, f, o, o, 3, 9, []] +``` + +In records, it can help you avoid `merge`, e.g., this: + +```nushellshell +let record = { a: "foo" } +{ + ...$record, + y: "bar", + ...{ z: 2 } +} | to nuon +``` + +will give: + +```nushellshell +{a: foo, y: bar, z: 2} +``` + +You can spread variables, subexpressions, and either lists (inside list literals) or records (inside record literals). +Note that there needs to be no whitespace between the `...` and the expression being spread. + +## Passing boolean switches dynamically [[toc](#table-of-content)] + +In last release, a distinction has been introduced between switches, e.g. `--enable-feature`, and +boolean options, e.g. `--do-something: bool`. +The former is simply used as `--enable-feature` and the latter expects a value as +`--do-something false`. + +Up until now, this had the downside of disallowing one to pass boolean switches to inner calls of +commands. +An example would be two commands, `foo` and `bar`, which both have a `--switch` and where `foo` is +calling `bar` internally with the opposite switch. It would have to look something like + +```nushellshell +def bar [--switch] { + print $"switch in bar: ($switch)" +} + +def foo [--switch] { + print $"switch in foo: ($switch)" + if $switch { + bar + } else { + bar --switch + } +} +``` + +or `bar` would have to take a boolean value instead of a switch, which would make the command less +nice to use as part of a public API... + +```nushellshell +def bar [--switch: bool] { + print $"switch in bar: ($switch)" +} + +def foo [--switch] { + print $"switch in foo: ($switch)" + bar --switch (not $switch) +} +``` + +In this release and thanks to the work of [@WindSoilder](https://github.com/WindSoilder) in +[#11057](https://github.com/nushell/nushell/pull/11057), boolean switches can now be passed around. +This will simplify the code above and still preserve the nice signature of `bar` :partying: + +```nushellshell +def bar [--switch] { + print $"switch in bar: ($switch)" +} + +def foo [--switch] { + print $"switch in foo: ($switch)" + bar --switch=(not $switch) +} +``` + +## Redirection to standard streams is getting better [[toc](#table-of-content)] + +Once again, [@WindSoilder](https://github.com/WindSoilder) has been working on the redirection +system of Nushell, fixing a bug and adding a new very nice feature: + +- [#10851](https://github.com/nushell/nushell/pull/10851): one pipeline output stream can be + redirected and the other one used as input to the rest of the pipe. + Given the following Bash script called `foo.sh` that outputs both to _stdout_ and _stderr_ + ```sh + echo aaaaa + echo bbb 1>&2 + echo cc + ``` + it is now possible to run the following command, redirecting `bbb` to a file and the rest + to the `lines | each { ... }` part of the pipeline: + ```nushellshell + bash test.sh err> err.txt | lines | each { str length} + ``` + resulting in `[5, 2]` as expected and `bbb` inside `err.txt`. +- [#10764](https://github.com/nushell/nushell/pull/10764): append to file with the `>>` syntax + instead of overwriting with `>` + ```nushellshell + (1 + 2 + 3) out> sum.txt + "\n" out>> sum.txt + (4 + 5 + 6) out>> sum.txt + ``` + will create a file called `sum.txt` with the following content + ``` + 6 + 15 + ``` + +## One-time theming of tables is there [[toc](#table-of-content)] + +A common question and feature request from the community was: _how can i change the theme of Nushell +tables for just one command?_ + +Because of how Nushell works, the way to do that has been the following for a long time + +```nushellshell +do { # use the scope of `do` to not alter the environment of the callee + $env.config.table.mode = "none" # set the theme + ls | table # call table to avoid just passing the value back to the callee and use the outside theme +} +``` + +In [#11058](https://github.com/nushell/nushell/pull/11058), [@zhiburt](https://github.com/zhiburt) +cracked the nut and added the long-wanted `table --theme` option. Below is a simple example: + +- let's define a table + +```nushellshell +let table = ls | where type == dir | reject type +``` + +- and show it with a particular theme + +```nushellshell +$table | table --theme ascii_rounded +``` + +``` +.#--name----size-------modified------. +|0|assets |4.1 KB|2023-12-05 18:32:30| +|1|benches|4.1 KB|2023-12-09 22:33:44| +|2|crates |4.1 KB|2023-12-09 22:33:44| +|3|devdocs|4.1 KB|2023-12-09 22:33:44| +|4|docker |4.1 KB|2023-12-09 22:33:44| +|5|scripts|4.1 KB|2023-12-09 22:33:44| +|6|src |4.1 KB|2023-12-09 22:33:44| +|7|target |4.1 KB|2023-12-09 14:19:04| +|8|tests |4.1 KB|2023-12-05 18:32:30| +|9|wix |4.1 KB|2023-12-05 18:32:30| +'------------------------------------' +``` + +## Exposing name of script to the wild [[toc](#table-of-content)] + +Coming from languages such as Python and Bash, it's quite expected to be able to access the name of +the script itself the same way it's been called from the CLI: with `sys.argv[0]` in Python and `$0` +in Bash. + +This was not possible in Nushell until the work of [@p00f](https://github.com/p00f) in +[#11203](https://github.com/nushell/nushell/pull/11203). +This will expose to any script a new environment variable called `$env.PROCESS_PATH` and which will +contain precisely something akin to `argv[0]`! + +```nushellshell +#!/usr/bin/env nu +# in demo.nu + +def main [] { + printf $"I was called as ($env.PROCESS_PATH)" +} +``` + +```nushellshell +demo.nu # will show "I was called as demo.nu" +./demo.nu # will show "I was called as ./demo.nu" +/path/to/demo.nu # will show "I was called as /path/to/demo.nu" +``` + +## Parsing human-friendly dates into Nushell values [[toc](#table-of-content)] + +In [#11051](https://github.com/nushell/nushell/pull/11051), [@fdncred](https://github.com/fdncred) +added to `into datetime` the ability to parse _human readable_ dates into Nushell `datetime`. +This allows to write crazy things like + +```nushellshell +"Now" | into datetime # same as `date now` +"A week ago" | into datetime # same as `(date now) - 1wk` +``` + +::: tip Note +see the full list of examples with `into datetime --list-human` +::: + +## Show found externals via syntax highlighting in the [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop) [[toc](#table-of-content)] + +We've added a new experimental feature that changes the syntax highlighting of text in the command position in the repl. Here's how it works. As you type, if a command is found with the current letter you've typed, the command will be highlighted according to your configuration of your color theme, specifically `shape_external_resolved`. As you keep typing, `which` fires to find out if the command is found or not. This allows you to know whether you've created a typo before you ever hit enter in the nushell repl. + +Since this might have a performance impact, we've put this behind a configuration point named `highlight_resolved_externals` in the config.nu file. Set it to `true` to enable this functionality and `false` to disable it. It defaults to `false`. + +Right now, with a dark theme, here's one way of configuring these colors, in the config.nu color theme, that showcases this funcitonality. Also, make sure you have `highlight_resolved_externals` set to `true`. + +```nushellshell + shape_internalcall: cyan_bold # internal commands that are found will be this color + shape_external: darkorange # external "commands" that do not exist, will be this color + shape_external_resolved: light_yellow_bold # external commands that are found with `which`, will be this color +``` + +You can read more about it and see a gif in [#11135](https://github.com/nushell/nushell/pull/11135) where [@fdncred](https://github.com/fdncred) implemented the feature. + +## New "out of bound" error [[toc](#table-of-content)] + +[@nibon7](https://github.com/nibon7) introduces in +[#11201](https://github.com/nushell/nushell/pull/11201) a new error which is +pretty common to programming languages: the "out of bound" error. + +This will cause the following command to give an "out of bound" error: + +```nushellshell +"foo" | str index-of '' --range 10..11 +``` + +## Details on the `0.87.1` hotfix release [[toc](#table-of-content)] + +In between the last `0.87.0` release and the one from today, there has been a quick hotfix release +to address two major bugs to two quite important filesystem commands: `rm` and `cp`. + +Below are some details about these two bug fixes: + +- [@IanManske](https://github.com/IanManske) fixed `rm` in + [#11064](https://github.com/nushell/nushell/pull/11064) which has + [trouble removing files after a `cd`](https://github.com/nushell/nushell/issues/11061) +- [@kubouch](https://github.com/kubouch) fixed a similar one about `cp` in + [#11080](https://github.com/nushell/nushell/pull/11080), addressing + [#10832](https://github.com/nushell/nushell/issues/10832) + +## Need help to wrap... commands? [[toc](#table-of-content)] + +In the previous release, the `extern-wrapped` command has been deprecated and it is +[now being removed](#removed-commands-toc). +An issue did persist though, making `def --wrapped` not a suitable replacement for the old command... +which was fixed in [#11235](https://github.com/nushell/nushell/pull/11235) by the changes from +[@KAAtheWiseGit](https://github.com/KAAtheWiseGit): `def --wrapped` commands won't create a help +page anymore, allowing to send `-h` and `--help` to other commands: + +```nushellshell +def --wrapped foo [...rest] { echo $rest } +foo --help -h +``` + +will give no help page + +``` +─┬────── +0│--help +1│-h +─┴────── +``` + +## Restricting use of internal variables [[toc](#table-of-content)] + +Nushell features some internal variables that users can't redeclare, i.e. `$nu`, `$env` and `$in`. +::: tip Note +`$env` is the special of the three because one can mutate it with + +```nushellshell +$env.FOO = "i'm foo" +``` + +but it is impossible to do `let env = 123` +::: + +However, up until now and the work of [@KAAtheWiseGit](https://github.com/KAAtheWiseGit) +in [#11169](https://github.com/nushell/nushell/pull/11169) and +[#11228](https://github.com/nushell/nushell/pull/11228), it was possible to redefined these variables +in command definition: the code would parse and run, but you would get the internal values instead of +the ones passed to the command, which is a nasty silent bug! +From now on, the following will give an error + +```nushellshell +def foo [nu] { print $nu } +``` + +```nushellshell +def bar [env] { print $env } +``` + +```nushellshell +def baz [in] { print $in } +``` + +Also, because `$nu` and `$env` don't have spans by construction, i.e. they are not defined in any +script where a span would make sense but rather internally when Nushell starts, accessing their +`metadata` does not make sense. This release makes the error more helpful: + +```nushellshell +metadata $env +``` + +``` +Error: × Built-in variables `$env` and `$nu` have no metadata + ╭─[entry #1:1:1] + 1 │ metadata $env + · ──┬─ + · ╰── no metadata available + ╰──── +``` + +## A small update on the LSP [[toc](#table-of-content)] + +[@schrieveslaach](https://github.com/schrieveslaach) has been working again on the built-in LSP of +Nushell. +With [#10941](https://github.com/nushell/nushell/pull/10941), completions should get better with +this release :partying: + +## Our set of commands is evolving [[toc](#table-of-content)] + +As usual, new release rhymes with changes to commands! + +### New commands [[toc](#table-of-content)] + +- `is-terminal` by [@drbrain](https://github.com/drbrain) in [#10970](https://github.com/nushell/nushell/pull/10970) +- `std null-device` by [@WindSoilder](https://github.com/WindSoilder) in [#11070](https://github.com/nushell/nushell/pull/11070) +- `mktemp` by [@tskinn](https://github.com/tskinn) in [#11005](https://github.com/nushell/nushell/pull/11005) +- `stor` by [@fdncred](https://github.com/fdncred) in [#11170](https://github.com/nushell/nushell/pull/11170) => see the [section below](#a-local-in-memory-database-with-stor) + +#### A local in-memory database with `stor` + +With this release we've implemented a new sqlite family of commands called `stor`. `stor` is meant to be short for "storing data in an in-memory sqlite database". That's right, this family of commands supports an _in-memory_ database. This in-memory database will be accessible as long as they share the same executable instance. A new instance is created with each new nushell instance and the in-memory database cannot be shared between instances. We're exited to see what new things you'll invent with this technology, although we still consider it in the experimental phase. Please feel free to submit PRs to make the usage of it better and more robust. There are examples of how to use each command [in the PR](https://github.com/nushell/nushell/pull/11170). + +Here the summary you get when you execute the `stor` command. + +```nushellshell +Usage: + > stor + +Subcommands: + stor create - Create a table in the in-memory sqlite database + stor delete - Delete a table or specified rows in the in-memory sqlite database + stor export - Export the in-memory sqlite database to a sqlite database file + stor import - Import a sqlite database file into the in-memory sqlite database + stor insert - Insert information into a specified table in the in-memory sqlite database + stor open - Opens the in-memory sqlite database + stor reset - Reset the in-memory database by dropping all tables + stor update - Update information in a specified table in the in-memory sqlite database + +Flags: + -h, --help - Display the help message for this command + +Input/output types: + ╭─#─┬──input──┬─output─╮ + │ 0 │ nothing │ string │ + ╰───┴─────────┴────────╯ +``` + +### Changes to existing commands [[toc](#table-of-content)] + +- thanks to [@KAAtheWiseGit](https://github.com/KAAtheWiseGit) in [#11195](https://github.com/nushell/nushell/pull/11195), `input list` will accept more input/output types +- the `list -> string` I/O pair has been added to the `last` command by [@amtoine](https://github.com/amtoine) in [#11137](https://github.com/nushell/nushell/pull/11137) +- with the work of [@IanManske](https://github.com/IanManske) in [#11258](https://github.com/nushell/nushell/pull/11258), `insert`, `update` and `upsert` should now work more consistently with `list`s, e.g. + +```nushellshell +[0, 2] | update 0 {|i| $i + 1 } # will give [1, 2] +[0, 1, 2] | insert 5 5 # will give "index too large" error +``` + +### Deprecated commands [[toc](#table-of-content)] + +- `std clip` in [#11097](https://github.com/nushell/nushell/pull/11097): this command was handy but did not fit the [philosophy of the standard library](https://github.com/nushell/nushell/tree/main/crates/nu-std#--welcome-to-the-standard-library-of-nushell--) +- `std testing` in [#11151](https://github.com/nushell/nushell/pull/11151): even though in a VERY EARLY stage of its development, we would like to focus our efforts on the [Nupm](https://github.com/nushell/nupm) project and especially its simple `nupm test` command + +### Removed commands [[toc](#table-of-content)] + +as part of the [deprecation plan of last release](https://www.nushell.sh/blog/2023-11-14-nushell_0_87_0.html#deprecated-commands-toc), +the following commands and options have been removed by [@amtoine](https://github.com/amtoine): + +- `extern-wrapped` and `export extern-wrapped` in favor of `def --wrapped` in [#11000](https://github.com/nushell/nushell/pull/11000) +- `--not` from `glob` in favor of `--exclude` in [#10839](https://github.com/nushell/nushell/pull/10839) +- `size` in favor of `str stats` in [#10784](https://github.com/nushell/nushell/pull/10784) +- `unfold` in favor of `generate` in [#10773](https://github.com/nushell/nushell/pull/10773) +- `def-env` and `export def-env` in favor of `def --env` in [#10999](https://github.com/nushell/nushell/pull/10999) + +# Breaking changes [[toc](#table-of-content)] + +- [#8984](https://github.com/nushell/nushell/pull/8984) Respect non-zero exit code in subexpressions and blocks + +Starting with this release, if a subexpression (eg `(echo foo.txt)`) or block (eg `if true { echo foo.txt }` evaluated to a non-zero exit code, it will no longer be lost and instead will be the exit code of that expression. This allows them to act more naturally when an external command fails. + +- [#11144](https://github.com/nushell/nushell/pull/11144) No longer allow `{a: 1, a: 2}` + +We now error if you repeat the same field name when creating a record, for example `{a: 1, a: 2}`. + +- [#10999](https://github.com/nushell/nushell/pull/10999) remove `def-env` and `export def-env` +- [#11000](https://github.com/nushell/nushell/pull/11000) remove `extern-wrapped` and `export extern-wrapped` + +We've removed the deprecated commands `def-env` and `export def-env`. Instead, use `def --env`. Likewise, we've done the same for `extern-wrapped` and `export extern-wrapped`. Instead, use `def --wrapped`. + +- [#10773](https://github.com/nushell/nushell/pull/10773) remove the `unfold` command + +We've renamed the previous `unfold` command. Instead, use the `generate` command. + +- [#10784](https://github.com/nushell/nushell/pull/10784) remove `size` command in favor of `str stats` + +We've also removed the `size` command, whch had an ambiguous name. Now, use `str stats` to get information about string content. + +- [#10839](https://github.com/nushell/nushell/pull/10839) remove `--not` from `glob` + +This releae replace the confusing `--not` flag of `glob` to instead be `glob --exclude`. + +- [#11058](https://github.com/nushell/nushell/pull/11058) nu-table/ Add `-t/theme` argument && Replace `-n/start-number` with `-i/index` + +To make how to update the table numbering more clear, we've replaced `table -n` with `table -i`/`table --index`. + +# Full changelog [[toc](#table-of-content)] + +## Nushell + +- [amtoine](https://github.com/amtoine) created + - [remove the `unfold` command](https://github.com/nushell/nushell/pull/10773) + - [remove `size` command in favor of `str stats`](https://github.com/nushell/nushell/pull/10784) + - [remove `--not` from `glob`](https://github.com/nushell/nushell/pull/10839) + - [remove `def-env` and `export def-env`](https://github.com/nushell/nushell/pull/10999) + - [remove `extern-wrapped` and `export extern-wrapped`](https://github.com/nushell/nushell/pull/11000) + - [deprecate `std clip`](https://github.com/nushell/nushell/pull/11097) + - [add `list -> string` to `last`](https://github.com/nushell/nushell/pull/11137) + - [fix the link to the `nu_scripts` in `std clip` deprecation](https://github.com/nushell/nushell/pull/11150) + - [deprecate `std testing`](https://github.com/nushell/nushell/pull/11151) + - [fix `nu-std` README](https://github.com/nushell/nushell/pull/11244) + - [add `nothing -> table` to `format date`](https://github.com/nushell/nushell/pull/11290) +- [app/dependabot](https://github.com/app/dependabot) created + - [Bump winreg from 0.51.0 to 0.52.0](https://github.com/nushell/nushell/pull/11102) + - [Bump uuid from 1.5.0 to 1.6.0](https://github.com/nushell/nushell/pull/11104) + - [Bump ureq from 2.8.0 to 2.9.1](https://github.com/nushell/nushell/pull/11163) + - [Bump openssl from 0.10.59 to 0.10.60](https://github.com/nushell/nushell/pull/11176) + - [Bump actions-rust-lang/setup-rust-toolchain from 1.5.0 to 1.6.0](https://github.com/nushell/nushell/pull/11223) +- [AucaCoyan](https://github.com/AucaCoyan) created + - [:bug: Fixes markdown formatting on LSP hover](https://github.com/nushell/nushell/pull/11253) +- [ayax79](https://github.com/ayax79) created + - [Upgrading to polars 0.35](https://github.com/nushell/nushell/pull/11241) +- [cosineblast](https://github.com/cosineblast) created + - [Remove file I/O from tests that don't need it](https://github.com/nushell/nushell/pull/11182) +- [danielsomerfield](https://github.com/danielsomerfield) created + - [Fix toolkit to run workspace on 'check pr' (issue #10906)](https://github.com/nushell/nushell/pull/11112) +- [dead10ck](https://github.com/dead10ck) created + - [Testing support tweaks: exit status in `Outcome`](https://github.com/nushell/nushell/pull/10692) + - [into binary -c: return 0 as single byte](https://github.com/nushell/nushell/pull/11068) +- [drbrain](https://github.com/drbrain) created + - [Add is-terminal to determine if stdin/out/err are a terminal](https://github.com/nushell/nushell/pull/10970) + - [Add Argument::span() and Call::arguments_span()](https://github.com/nushell/nushell/pull/10983) + - [Convert ShellError::NetworkFailure to named fields](https://github.com/nushell/nushell/pull/11093) + - [Convert ShellError::CommandNotFound to named fields](https://github.com/nushell/nushell/pull/11094) + - [Convert ShellError::AliasNotFound to named fields](https://github.com/nushell/nushell/pull/11118) + - [Remove ShellError::FlagNotFound](https://github.com/nushell/nushell/pull/11119) + - [Convert FileNotFound to named fields](https://github.com/nushell/nushell/pull/11120) + - [Convert FileNotFoundCustom to named fields](https://github.com/nushell/nushell/pull/11123) + - [Convert PluginFailedToLoad to named fields](https://github.com/nushell/nushell/pull/11124) + - [Convert PluginFailedToEncode to named fields](https://github.com/nushell/nushell/pull/11125) + - [Convert PluginFailedToDecode to named fields](https://github.com/nushell/nushell/pull/11126) + - [Convert more ShellError variants to named fields](https://github.com/nushell/nushell/pull/11173) + - [Convert more ShellError variants to named fields](https://github.com/nushell/nushell/pull/11222) + - [Convert `Shellerror::GenericError` to named fields](https://github.com/nushell/nushell/pull/11230) + - [Convert remainder of ShellError variants to named fields](https://github.com/nushell/nushell/pull/11276) + - [Ensure that command usage starts uppercase and ends period](https://github.com/nushell/nushell/pull/11278) +- [dtolnay](https://github.com/dtolnay) created + - [Fix `Option<&str> == Option<&String>` build error when using rust_decimal/rkyv feature](https://github.com/nushell/nushell/pull/11205) +- [fdncred](https://github.com/fdncred) created + - [allow parsing of human readable datetimes](https://github.com/nushell/nushell/pull/11051) + - [tweak `table` example/parameter text](https://github.com/nushell/nushell/pull/11071) + - [add "default" table theme](https://github.com/nushell/nushell/pull/11072) + - [correct table example syntax](https://github.com/nushell/nushell/pull/11074) + - [optimize/clean up a few of the `table` changes](https://github.com/nushell/nushell/pull/11076) + - [bump rust-toolchain to 1.72.1](https://github.com/nushell/nushell/pull/11079) + - [add shape `ExternalResolved` to show found externals via syntax highlighting in the repl](https://github.com/nushell/nushell/pull/11135) + - [Add `stor` family of commands](https://github.com/nushell/nushell/pull/11170) + - [add some tests for `stor create`](https://github.com/nushell/nushell/pull/11194) + - [Add nu lib dirs default](https://github.com/nushell/nushell/pull/11248) +- [hustcer](https://github.com/hustcer) created + - [Upgrade Nu and script for release workflow](https://github.com/nushell/nushell/pull/11121) + - [Exit the release job if creating binary package failed](https://github.com/nushell/nushell/pull/11145) + - [Fix release and nightly build workflow](https://github.com/nushell/nushell/pull/11146) +- [IanManske](https://github.com/IanManske) created + - [Fix `rm` path handling](https://github.com/nushell/nushell/pull/11064) + - [Refactor `Value` cell path functions to fix bugs](https://github.com/nushell/nushell/pull/11066) + - [Build `nu-protocol` docs with all features enabled](https://github.com/nushell/nushell/pull/11180) + - [Fix `get -i` ignoring errors for only the first cellpath](https://github.com/nushell/nushell/pull/11213) + - [Remove unnecessary boxing of `Stack::recursion_count`](https://github.com/nushell/nushell/pull/11238) + - [Fix replacement closures for `update`, `insert`, and `upsert`](https://github.com/nushell/nushell/pull/11258) +- [KAAtheWiseGit](https://github.com/KAAtheWiseGit) created + - [Match `++=` capabilities with `++`](https://github.com/nushell/nushell/pull/11130) + - [Forbid reserved variable names for function arguments](https://github.com/nushell/nushell/pull/11169) + - [Allow more types for `input list`](https://github.com/nushell/nushell/pull/11195) + - [Add special error for calling `metadata` on $env and $nu](https://github.com/nushell/nushell/pull/11228) + - [Do not create help for wrapped command](https://github.com/nushell/nushell/pull/11235) +- [kubouch](https://github.com/kubouch) created + - [Send only absolute paths to uu_cp](https://github.com/nushell/nushell/pull/11080) +- [MarikaChlebowska](https://github.com/MarikaChlebowska) created + - [Add more descriptive error message when passing list to from_csv](https://github.com/nushell/nushell/pull/10962) + - [Add metadata to some filters](https://github.com/nushell/nushell/pull/11160) +- [nibon7](https://github.com/nibon7) created + - [Apply nightly clippy fixes](https://github.com/nushell/nushell/pull/11083) + - [Add boundary check for str index-of](https://github.com/nushell/nushell/pull/11190) + - [Add OutOfBounds error](https://github.com/nushell/nushell/pull/11201) + - [Fix span of invalid range](https://github.com/nushell/nushell/pull/11207) + - [Fix capacity overflow caused by large range of ports](https://github.com/nushell/nushell/pull/11210) + - [Add checks for ports](https://github.com/nushell/nushell/pull/11214) + - [Explicitly indicate duplicate flags](https://github.com/nushell/nushell/pull/11226) + - [Fix overlay_use_main_not_exported hanging when an external spam command exists](https://github.com/nushell/nushell/pull/11261) + - [Simplify `clear` implementation](https://github.com/nushell/nushell/pull/11273) +- [NotLebedev](https://github.com/NotLebedev) created + - [Cp target expansion](https://github.com/nushell/nushell/pull/11152) +- [p00f](https://github.com/p00f) created + - [expose argv[0] as `$env.PROCESS_PATH`](https://github.com/nushell/nushell/pull/11203) +- [poliorcetics](https://github.com/poliorcetics) created + - [feat: Add default docs for aliases, generated from the command they point to](https://github.com/nushell/nushell/pull/10825) +- [rfaulhaber](https://github.com/rfaulhaber) created + - [Bump `sysinfo` to 0.29.11](https://github.com/nushell/nushell/pull/11166) +- [schrieveslaach](https://github.com/schrieveslaach) created + - [Implement LSP Text Document Synchronization](https://github.com/nushell/nushell/pull/10941) + - [Upgrade lsp-server Dependency](https://github.com/nushell/nushell/pull/11252) +- [sholderbach](https://github.com/sholderbach) created + - [Bump version for `0.87.0` release](https://github.com/nushell/nushell/pull/11031) + - [Move to clearer reedline keyboard enhancement API](https://github.com/nushell/nushell/pull/11045) + - [Curate developer documentation in tree](https://github.com/nushell/nushell/pull/11052) + - [Pin reedline to 0.26 release](https://github.com/nushell/nushell/pull/11053) + - [Bump version to `0.87.1`](https://github.com/nushell/nushell/pull/11056) + - [Use record API in `describe --detailed`](https://github.com/nushell/nushell/pull/11075) + - [Bump version to `0.87.2`](https://github.com/nushell/nushell/pull/11114) + - [Bump `procfs` to 0.16.0](https://github.com/nushell/nushell/pull/11115) + - [Move more commands to opaque `Record` type](https://github.com/nushell/nushell/pull/11122) + - [Revert "Adding support for Polars structs"](https://github.com/nushell/nushell/pull/11171) +- [sigoden](https://github.com/sigoden) created + - [Fix spans passed to external_completer](https://github.com/nushell/nushell/pull/11008) +- [sophiajt](https://github.com/sophiajt) created + - [Respect non-zero exit code in subexpressions and blocks](https://github.com/nushell/nushell/pull/8984) + - [Fix the output type for 'view files'](https://github.com/nushell/nushell/pull/11077) +- [tskinn](https://github.com/tskinn) created + - [Add `mktemp` command](https://github.com/nushell/nushell/pull/11005) +- [WindSoilder](https://github.com/WindSoilder) created + - [Support `o>>`, `e>>`, `o+e>>` to append output to an external file](https://github.com/nushell/nushell/pull/10764) + - [Redirect: support redirect stderr with piping stdout to next commands.](https://github.com/nushell/nushell/pull/10851) + - [fix custom command's default value](https://github.com/nushell/nushell/pull/11043) + - [enable to pass switch values dynamically](https://github.com/nushell/nushell/pull/11057) + - [std: add cross platform null-device name](https://github.com/nushell/nushell/pull/11070) + - [add echo_env_mixed testbin to reduce windows only tests](https://github.com/nushell/nushell/pull/11172) + - [Error on `use path item1 item2`, if item1 is not a module](https://github.com/nushell/nushell/pull/11183) + - [When using redirection, if a command generates non-zero exit code, the script should stop running](https://github.com/nushell/nushell/pull/11191) +- [ysthakur](https://github.com/ysthakur) created + - [Spread operator for list literals](https://github.com/nushell/nushell/pull/11006) + - [Spread operator in record literals](https://github.com/nushell/nushell/pull/11144) + - [Reduce code duplication in eval.rs and eval_const.rs](https://github.com/nushell/nushell/pull/11192) + - [Fix highlighting of spread subexpressions in records](https://github.com/nushell/nushell/pull/11202) +- [zhiburt](https://github.com/zhiburt) created + - [Fix #11047](https://github.com/nushell/nushell/pull/11054) + - [nu-table/ Add `-t/theme` argument && Replace `-n/start-number` with `-i/index`](https://github.com/nushell/nushell/pull/11058) + +## Extension + +- [glcraft](https://github.com/glcraft) created + - [Syntax highlight: add "export" to "module"](https://github.com/nushell/vscode-nushell-lang/pull/166) + - [Improve type parsing in function def](https://github.com/nushell/vscode-nushell-lang/pull/167) + - [Textmate improvements](https://github.com/nushell/vscode-nushell-lang/pull/168) + - [Textmate: improvement on record entries and closure](https://github.com/nushell/vscode-nushell-lang/pull/169) + +## Documentation + +- [132ikl](https://github.com/132ikl) created + - [Add a snippet to suggest using the ? operator for environmental variables](https://github.com/nushell/nushell.github.io/pull/1142) +- [amtoine](https://github.com/amtoine) created + - [Release notes for `0.87.0`](https://github.com/nushell/nushell.github.io/pull/1114) +- [app/dependabot](https://github.com/app/dependabot) created + - [Bump vite from 4.4.9 to 4.4.12](https://github.com/nushell/nushell.github.io/pull/1165) +- [app/github-actions](https://github.com/app/github-actions) created + - [Compressed Images](https://github.com/nushell/nushell.github.io/pull/1147) +- [arnau](https://github.com/arnau) created + - [Add a cookbook comparing jq and nushell](https://github.com/nushell/nushell.github.io/pull/1150) + - [Unifies all cookbook codeblocks to use the same style.](https://github.com/nushell/nushell.github.io/pull/1151) + - [Rename def-env to def --env](https://github.com/nushell/nushell.github.io/pull/1155) +- [CAESIUS-TIM](https://github.com/CAESIUS-TIM) created + - [:memo: Replace `decimal` with `float`](https://github.com/nushell/nushell.github.io/pull/1161) + - [[zh-CN] Update README, and Getting Started (入门篇)](https://github.com/nushell/nushell.github.io/pull/1168) +- [FMotalleb](https://github.com/FMotalleb) created + - [Update coming_from_bash.md](https://github.com/nushell/nushell.github.io/pull/1158) +- [Hofer-Julian](https://github.com/Hofer-Julian) created + - [Fix jq comparison](https://github.com/nushell/nushell.github.io/pull/1162) +- [hustcer](https://github.com/hustcer) created + - [Refresh command docs for Nu v0.87](https://github.com/nushell/nushell.github.io/pull/1144) +- [KAAtheWiseGit](https://github.com/KAAtheWiseGit) created + - [Fix append to mutable variable operator](https://github.com/nushell/nushell.github.io/pull/1164) +- [Ktoks](https://github.com/Ktoks) created + - [Update creating_errors.md](https://github.com/nushell/nushell.github.io/pull/1154) +- [MarikaChlebowska](https://github.com/MarikaChlebowska) created + - [Replace usage of removed `date format` with `format date` in examples](https://github.com/nushell/nushell.github.io/pull/1157) +- [ppenguin](https://github.com/ppenguin) created + - [Add `parse` examples to _Parsing_](https://github.com/nushell/nushell.github.io/pull/1152) +- [sholderbach](https://github.com/sholderbach) created + - [Clean up contributor book](https://github.com/nushell/nushell.github.io/pull/1153) +- [sophiajt](https://github.com/sophiajt) created + - [Add 2023 survey results](https://github.com/nushell/nushell.github.io/pull/1143) +- [stfacc](https://github.com/stfacc) created + - [Improve workaround for carapace ERR output](https://github.com/nushell/nushell.github.io/pull/1159) +- [ysthakur](https://github.com/ysthakur) created + - [Add section on spread operator](https://github.com/nushell/nushell.github.io/pull/1160) + +## Nu_Scripts + +- [Abdillah](https://github.com/Abdillah) created + - [completions/git: fix support for path relative to current directory](https://github.com/nushell/nu_scripts/pull/666) +- [amtoine](https://github.com/amtoine) created + - [add a "bulk rename" command to the stdlib candidates](https://github.com/nushell/nu_scripts/pull/643) + - [add missing tasks to the release note PR](https://github.com/nushell/nu_scripts/pull/665) + - [add `clip` from standard library](https://github.com/nushell/nu_scripts/pull/674) +- [AucaCoyan](https://github.com/AucaCoyan) created + - [:sparkles: Add `rustup` completions](https://github.com/nushell/nu_scripts/pull/689) + - [Add rustup completions](https://github.com/nushell/nu_scripts/pull/690) + - [:sparkles: Add `pnpm` completions](https://github.com/nushell/nu_scripts/pull/692) +- [drbrain](https://github.com/drbrain) created + - [Improve git branch cleanup script](https://github.com/nushell/nu_scripts/pull/685) +- [Euphrasiologist](https://github.com/Euphrasiologist) created + - [Create basic-git.nu](https://github.com/nushell/nu_scripts/pull/687) + - [Adding the `A` case](https://github.com/nushell/nu_scripts/pull/688) +- [fj0r](https://github.com/fj0r) created + - [cwdhist: can place the path anywhere in the buffer](https://github.com/nushell/nu_scripts/pull/669) + - [rename `cmd parse` to `argx` to improve importing](https://github.com/nushell/nu_scripts/pull/671) + - [nu-complete kube deploys and pods](https://github.com/nushell/nu_scripts/pull/682) + - [generate completions from tree-shaped data](https://github.com/nushell/nu_scripts/pull/683) + - [container-create -w: mount $env.PWD as workdir](https://github.com/nushell/nu_scripts/pull/686) +- [fnuttens](https://github.com/fnuttens) created + - [Add bat aliases](https://github.com/nushell/nu_scripts/pull/678) +- [glcraft](https://github.com/glcraft) created + - [Add `record` module](https://github.com/nushell/nu_scripts/pull/679) +- [kjelly](https://github.com/kjelly) created + - [get deploy complete for ka/kl in kubernetes module](https://github.com/nushell/nu_scripts/pull/680) +- [RGBCube](https://github.com/RGBCube) created + - [Fix typo in bat aliases](https://github.com/nushell/nu_scripts/pull/684) +- [sholderbach](https://github.com/sholderbach) created + - [Change uses of `size` to `str stats`](https://github.com/nushell/nu_scripts/pull/647) + - [Change `nu-deps` script to not care about waves](https://github.com/nushell/nu_scripts/pull/667) + - [Update `nu_release.nu` for 0.87 release](https://github.com/nushell/nu_scripts/pull/668) +- [WindSoilder](https://github.com/WindSoilder) created + - [remove null-stream](https://github.com/nushell/nu_scripts/pull/670) + - [Using def --env instead of def-env](https://github.com/nushell/nu_scripts/pull/673) + +## Reedline + +- [ClementNerma](https://github.com/ClementNerma) created + - [Allow to construct ReedlineError values from the outside](https://github.com/nushell/reedline/pull/676) + - [Allow to build HistoryItemId values from the outside](https://github.com/nushell/reedline/pull/677) + - [ Make history-related items (de-)serializable](https://github.com/nushell/reedline/pull/678) +- [crides](https://github.com/crides) created + - [vi mode: map `cw`/`cW` to `ce`/`cE` by default](https://github.com/nushell/reedline/pull/668) +- [Hofer-Julian](https://github.com/Hofer-Julian) created + - [Also run clippy on examples](https://github.com/nushell/reedline/pull/666) +- [sholderbach](https://github.com/sholderbach) created + - [Properly handle optional event modes](https://github.com/nushell/reedline/pull/659) + - [Bump version for `0.26.0` release](https://github.com/nushell/reedline/pull/664) + - [Build docs.rs docs with all features](https://github.com/nushell/reedline/pull/672) diff --git a/blog/2023-12-21-logo-contest.md b/src/content/docs/blog/2023-12-21-logo-contest.md similarity index 94% rename from blog/2023-12-21-logo-contest.md rename to src/content/docs/blog/2023-12-21-logo-contest.md index 92dae13d0d8..2c4c6c91ac5 100644 --- a/blog/2023-12-21-logo-contest.md +++ b/src/content/docs/blog/2023-12-21-logo-contest.md @@ -7,6 +7,7 @@ excerpt: "We are looking for a logo and a mascot: WE NEED YOU!" --- ## Who's got talent? + Quite often the community asks us what the logo and the mascot of Nushell are. Unfortunately, as of today, we do not have a fully satisfying and official answer to this :open_mouth: @@ -22,6 +23,7 @@ However, as Nushell is becoming more popular and mature, we would like to have an official stamped brand for this project we love. Thus... ### We need a logo and a mascot :) + For this and to reflect as best as we can our community, we would like to get YOU involved in this endeavour :smirk: @@ -33,11 +35,12 @@ Let us explain the rules, what you'll be asked exactly, how to submit your work and how all this will unfold :yum: ## Rules + - there is one theme to follow: _your logo or mascot should evoke the idea of - Nushell_ + Nushell_ - your submitted files should be in the SVG format - any offensive or out-of-topic content will obviously be removed during the - preselection + preselection ::: warning IMPORTANT NOTE: On the use of generative algorithms Because we (as in the Nushell project) want to fully own the logo and mascot of @@ -58,8 +61,10 @@ Thanks for your understanding :innocent: ::: ### Some ideas + Here are some ideas for what we might consider as a good fit for Nushell, following the themes detailed above: + - Ellie the friendly and yet powerful mascot ellie-mascot @@ -73,19 +78,22 @@ following the themes detailed above: shell-mascot ## Submissions + In order to submit your work, please follow the instructions below: + - send an email to [the.nushell@gmail.com](mailto:the.nushell@gmail.com) - it should contain your Discord name so that we can contact you easily - your creations should be called `logo.svg` and `mascot.svg` - you can submit any number of images, as long as we can clearly know which ones are logos or mascots :wink: ## Course of events + Below are the four main phases of this event: -| phase | start (from 0AM) | deadline (to 12PM) | +| phase | start (from 0AM) | deadline (to 12PM) | | -------------- | ---------------- | ------------------ | -| _submission_ | now | **2024-01-31** | -| _preselection_ | 2024-02-01 | **2024-02-14** | -| _vote_ | 2024-02-15 | **2024-02-29** | +| _submission_ | now | **2024-01-31** | +| _preselection_ | 2024-02-01 | **2024-02-14** | +| _vote_ | 2024-02-15 | **2024-02-29** | ::: tip Note precise dates might change at some point, e.g. if submissions keep coming even diff --git a/src/content/docs/blog/2024-01-09-nushell_0_89_0.md b/src/content/docs/blog/2024-01-09-nushell_0_89_0.md new file mode 100644 index 00000000000..2c3ca95fff0 --- /dev/null +++ b/src/content/docs/blog/2024-01-09-nushell_0_89_0.md @@ -0,0 +1,465 @@ +--- +title: Nushell 0.89.0 +author: The Nu Authors +author_site: https://twitter.com/nu_shell +author_image: https://www.nushell.sh/blog/images/nu_logo.png +excerpt: Today, we're releasing version 0.89.0 of Nu. This release adds spreading of argument lists to command calls, better editor integration, and many bugfixes. +--- + + + +# Nushell 0.89.0 + +Nushell, or Nu for short, is a new shell that takes a modern, structured approach to your command line. It works seamlessly with the data from your filesystem, operating system, and a growing number of file formats to make it easy to build powerful command line pipelines. + + + +Today, we're releasing version 0.89.0 of Nu. This release adds spreading of argument lists to command calls, better editor integration, and many bugfixes. + +# Where to get it + +Nu 0.89.0 is available as [pre-built binaries](https://github.com/nushell/nushell/releases/tag/0.89.0) or from [crates.io](https://crates.io/crates/nu). If you have Rust installed you can install it using `cargo install nu`. + +::: tip Note +The optional dataframe functionality is available by `cargo install nu --features=dataframe`. +::: + +As part of this release, we also publish a set of optional plugins you can install and use with Nu. To install, use `cargo install nu_plugin_`. + +# Table of content + +- [Nushell 0.89.0](#nushell-0890) +- [Where to get it](#where-to-get-it) +- [Table of content](#table-of-content) +- [Themes of this release / New features \[toc\]](#themes-of-this-release--new-features-toc) + - [Removal of directory module auto-exports](#update-19012024-breaking-change-removal-of-directory-module-auto-exports-toc) + - [Spread operator for commands](#spread-operator-for-commands) + - [Editor Improvements](#editor-improvements) + - [Deprecation of `--flag: bool`](#deprecation-of---flag-bool) + - [Our set of commands is evolving \[toc\]](#our-set-of-commands-is-evolving-toc) + - [New commands \[toc\]](#new-commands-toc) + - [`ulimit` for Unix-based systems](#ulimit-for-unix-based-systems) +- [Breaking changes \[toc\]](#breaking-changes-toc) +- [Full changelog \[toc\]](#full-changelog-toc) + + - [Nushell](#nushell) + - [Documentation](#documentation) + - [Nu_Scripts](#nu_scripts) + - [Reedline](#reedline) + + +- [_Breaking changes_](#breaking-changes-toc) +- [_Full changelog_](#full-changelog-toc) + +# Themes of this release / New features [[toc](#table-of-content)] + + + + +## (Update 19.01.2024, Breaking change!) Removal of directory module auto-exports [[toc](#table-of-content)] + +_Release note gremlin hid this note from us and we forgot to add it. We're sorry!_ + +[@amtoine](https://github.com/amtoine) in [#11157](https://github.com/nushell/nushell/pull/11157) removed the directory module autoexport of all .nu files inside the directory. This removes the ability to "dump .nu files into a directory" and have them automatically exported. Previously, if you had the following file structure: + +``` +spam +├── bar.nu +├── baz.nu +├── foo.nu +└── mod.nu +``` + +all you had to do was to call `use spam` and the `.nu` files would be added as submodules of `spam`. Now, to achieve the same effect, you would need to put + +```nushellshell +export module foo.nu +export module bar.nu +export module baz.nu +``` + +to the `mod.nu`. + +This change adds one manual step you need to perform to export submodules from modules, but it gives you more control and confidence. In the previous system, .nu files would be auto-exported _even if you didn't want to_! For example, to prevent `baz.nu` from being auto-exported, you would need to put it inside a new directory that doesn't contain `mod.nu` (and thus is not considered a Nushell module), like this: + +``` +spam +├── bar.nu +├── foo.nu +└── utils + └── baz.nu +``` + +We felt like this workaround was quite cumbersome, and the implicit behavior wasn't in the disciplined spirit of Nushell. Rather than having this auto-exporting as an _implicit_ feature of `use`, we're currently exploring ways to allow doing it _explicitly_, for example with a separate command. + +## Spread operator for commands + +In [#11289](https://github.com/nushell/nushell/pull/11289), [@ysthakur](https://github.com/ysthakur/) +implemented a spread operator for calling commands (previously, it could only be used in list and record literals). + +Now, if you have a command with a rest parameter: + +```nushellshell +def foo [ ...args ] { $args | to nuon } +``` + +You can spread arguments to it like this: + +```nushellshell +> let x = [foo bar baz] +> foo ...[1 2] ...$x +[1, 2, foo, bar, baz] +``` + +See [the docs](/book/operators.html#spread-operator) for more information. + +## Editor Improvements + +Thanks to @AucaCoyan's [#11284](https://github.com/nushell/nushell/pull/11284) and [#11320](https://github.com/nushell/nushell/pull/11320), Nushell's VSCode extension and builtin LSP server now show the same command's message on hover as abtained with `help` in Nushell. + +## Deprecation of `--flag: bool` + +In the last release, we allowed passing flags dynamically: + +```nushellshell +def spam [--foo] { + print $foo +} + +let value = false +spam --foo=$value +# prints false +``` + +However, it is easy to confuse with `--foo: bool`. To disambiguate, we are deprecating the setting optional parameters with boolean type (`--flag: bool`). Doing so will trigger a warning: + +```nushellshell +def spam [--foo: bool] { $foo } +Error: × Deprecated: --flag: bool + ╭─[entry #3:1:1] + 1 │ def spam [--foo: bool] { $foo } + · ──┬─ + · ╰── `--flag: bool` is deprecated and will be removed in 0.90. Please use `--flag` instead, more info: https://www.nushell.sh/book/custom_commands.html + ╰──── +``` + +## Our set of commands is evolving [[toc](#table-of-content)] + +As usual, new release rhyms with changes to commands! + +### New commands [[toc](#table-of-content)] + +#### `ulimit` for Unix-based systems + +The new `ulimit` command added by [@nibon7](https://github.com/nushell/nushell/pull/11324) can now be used on Unix-based systems for setting or checking the resource limits, such as the stack size or virtual memory size, for the current user. + +To list the currrent limits: + +```nushellshell +ulimit -a +``` + +Setting the limits is done via flags available in `help ulimit`. + + + +# Breaking changes [[toc](#table-of-content)] + + + +- [#11131](https://github.com/nushell/nushell/pull/11131) remove `std clip` +- [#11414](https://github.com/nushell/nushell/pull/11414) Lock out new direct construction of `Record` +- [#11367](https://github.com/nushell/nushell/pull/11367) Remove `Expr::MatchPattern` +- [#11355](https://github.com/nushell/nushell/pull/11355) Rename extra's `format` to `format pattern` +- [#11356](https://github.com/nushell/nushell/pull/11356) Remove `Value::MatchPattern` +- [#11313](https://github.com/nushell/nushell/pull/11313) Bubble up errors passed to `complete` +- [#11157](https://github.com/nushell/nushell/pull/11157) disable directory submodule auto export + +# Full changelog [[toc](#table-of-content)] + + + +## Nushell + +- [amtoine](https://github.com/amtoine) created + - [remove `std clip`](https://github.com/nushell/nushell/pull/11131) + - [improve completions of `use` and `overlay use`](https://github.com/nushell/nushell/pull/11330) + - [disable directory submodule auto export](https://github.com/nushell/nushell/pull/11157) +- [abusch](https://github.com/abusch) created + - [fix: closure captures can also be constants](https://github.com/nushell/nushell/pull/11493) +- [WindSoilder](https://github.com/WindSoilder) created + - [update reedline version to latest main](https://github.com/nushell/nushell/pull/11490) + - [Deprecate `--flag: bool` in custom command](https://github.com/nushell/nushell/pull/11365) + - [enable flag value type checking](https://github.com/nushell/nushell/pull/11311) + - [Fix piping output logic](https://github.com/nushell/nushell/pull/11317) +- [NotLebedev](https://github.com/NotLebedev) created + - [Xml errors fix](https://github.com/nushell/nushell/pull/11487) +- [nibon7](https://github.com/nibon7) created + - [Bump terminal_size to 0.3](https://github.com/nushell/nushell/pull/11486) + - [Fix cross building for target x86_64-pc-windows-gnu on linux](https://github.com/nushell/nushell/pull/11485) + - [Bump sysinfo from 0.29 to 0.30](https://github.com/nushell/nushell/pull/11484) + - [Replace `winapi` with `windows`](https://github.com/nushell/nushell/pull/11481) + - [Don't panic when `http_client` fails](https://github.com/nushell/nushell/pull/11422) + - [Don't create a thread if stderr_stream is None](https://github.com/nushell/nushell/pull/11421) + - [Fix an infinite loop if the input stream and output stream are the same](https://github.com/nushell/nushell/pull/11384) + - [Bump windows from 0.48.0 to 0.52.0 ](https://github.com/nushell/nushell/pull/11325) + - [Fix build for BSDs](https://github.com/nushell/nushell/pull/11372) + - [Allow `filesize` type as a valid limit value](https://github.com/nushell/nushell/pull/11349) + - [Allow `int` type as a valid limit value](https://github.com/nushell/nushell/pull/11346) + - [Add ulimit command](https://github.com/nushell/nushell/pull/11324) +- [yukitomoda](https://github.com/yukitomoda) created + - [Refactor tests (using cococo instead of ^echo)](https://github.com/nushell/nushell/pull/11479) + - [Fix the test which fails on windows](https://github.com/nushell/nushell/pull/11478) + - [Fix rm for symlinks pointing to directory on windows (issue #11461)](https://github.com/nushell/nushell/pull/11463) +- [hustcer](https://github.com/hustcer) created + - [Try to fix riscv64 building by using unbuntu-latest](https://github.com/nushell/nushell/pull/11476) + - [Downgrade openssl-src to fix riscv64 build target, close #11345](https://github.com/nushell/nushell/pull/11353) +- [rsteube](https://github.com/rsteube) created + - [Revert "Return external file completions if not empty (#10898)"](https://github.com/nushell/nushell/pull/11446) +- [fdncred](https://github.com/fdncred) created + - [bump rust toolchain to 1.73.0](https://github.com/nushell/nushell/pull/11445) + - [Revert "Bump reedline development version"](https://github.com/nushell/nushell/pull/11425) + - [add special emoji handling for debug --raw](https://github.com/nushell/nushell/pull/11368) + - [Revert "Only run $env.PROMPT_COMMAND once per prompt"](https://github.com/nushell/nushell/pull/11340) + - [update reedline to latest + include PR 675 for testing](https://github.com/nushell/nushell/pull/11339) +- [ysthakur](https://github.com/ysthakur) created + - [Allow spreading arguments to commands](https://github.com/nushell/nushell/pull/11289) + - [More specific errors for missing values in records](https://github.com/nushell/nushell/pull/11423) + - [Only run $env.PROMPT_COMMAND once per prompt (copy of #10986)](https://github.com/nushell/nushell/pull/11366) + - [Don't redraw prompt when transient prompt disabled](https://github.com/nushell/nushell/pull/10788) +- [cyradotpink](https://github.com/cyradotpink) created + - [Allow `http` commands' automatic redirect-following to be disabled](https://github.com/nushell/nushell/pull/11329) +- [SebastianIonel](https://github.com/SebastianIonel) created + - [Fix the bug for "bytes remove --end" .](https://github.com/nushell/nushell/pull/11428) +- [IanManske](https://github.com/IanManske) created + - [Remove unnecessary `replace_in_variable`](https://github.com/nushell/nushell/pull/11424) + - [Simplify `SIGQUIT` handling](https://github.com/nushell/nushell/pull/11381) + - [Make `Call::get_flag_expr` return `&Expression` instead of owned value ](https://github.com/nushell/nushell/pull/11388) + - [Remove `Expr::MatchPattern`](https://github.com/nushell/nushell/pull/11367) + - [Refactor `group-by` with closure grouper](https://github.com/nushell/nushell/pull/11370) + - [Remove `Value::MatchPattern`](https://github.com/nushell/nushell/pull/11356) + - [Satisfy clippy lint in benchmark](https://github.com/nushell/nushell/pull/11350) +- [sholderbach](https://github.com/sholderbach) created + - [Simplify the feature gates for `stor` commands](https://github.com/nushell/nushell/pull/11416) + - [Make polars deps optional for `cargo test --all`](https://github.com/nushell/nushell/pull/11415) + - [Lock out new direct construction of `Record`](https://github.com/nushell/nushell/pull/11414) + - [Check for clean repo after tests](https://github.com/nushell/nushell/pull/11409) + - [Bump reedline development version](https://github.com/nushell/nushell/pull/11406) + - [Fix sandboxing of redirection tests](https://github.com/nushell/nushell/pull/11407) + - [Bump `fancy-regex` to single `0.12.0` version](https://github.com/nushell/nushell/pull/11389) + - [Construct `Record`s only through checked helpers](https://github.com/nushell/nushell/pull/11386) + - [Expand the workspace `members` in `Cargo.toml`](https://github.com/nushell/nushell/pull/11387) + - [Properly update to the reedline repo patch](https://github.com/nushell/nushell/pull/11342) + - [Bump version to `0.88.2`](https://github.com/nushell/nushell/pull/11333) + - [Bump version to `0.88.1`](https://github.com/nushell/nushell/pull/11303) + - [Revert lock file changes due to openssl build fail](https://github.com/nushell/nushell/pull/11328) + - [Bump version for `0.88.0` release](https://github.com/nushell/nushell/pull/11298) +- [lavafroth](https://github.com/lavafroth) created + - [fix: prevent greedy matching of directory names](https://github.com/nushell/nushell/pull/11403) +- [AucaCoyan](https://github.com/AucaCoyan) created + - [:memo: Update `str trim` CLI help doc](https://github.com/nushell/nushell/pull/11383) + - [:sparkles: Make `hover` equal to `help` command](https://github.com/nushell/nushell/pull/11320) + - [:recycle: Match `--ide-hover` with `help` command](https://github.com/nushell/nushell/pull/11284) +- [hardfau1t](https://github.com/hardfau1t) created + - [fix(cd): on android/termux fails to cd into /sdcard](https://github.com/nushell/nushell/pull/10329) +- [0323pin](https://github.com/0323pin) created + - [Fix build on NetBSD](https://github.com/nushell/nushell/pull/11364) +- [stormasm](https://github.com/stormasm) created + - [nu-cli repl get_command_finished_marker() does not need to be pub](https://github.com/nushell/nushell/pull/11362) +- [KAAtheWiseGit](https://github.com/KAAtheWiseGit) created + - [Rename extra's `format` to `format pattern`](https://github.com/nushell/nushell/pull/11355) + - [Bubble up errors passed to `complete`](https://github.com/nushell/nushell/pull/11313) + - [Add `format` meta command](https://github.com/nushell/nushell/pull/11334) + - [Replace bash with POSIX sh in tests](https://github.com/nushell/nushell/pull/11293) +- [crides](https://github.com/crides) created + - [fix shell integration markers](https://github.com/nushell/nushell/pull/11352) +- [CAD97](https://github.com/CAD97) created + - [Only run $env.PROMPT_COMMAND once per prompt](https://github.com/nushell/nushell/pull/10986) +- [Hofer-Julian](https://github.com/Hofer-Julian) created + - [Move history into their own module](https://github.com/nushell/nushell/pull/11308) + - [Move `stor` commands to category `Database`](https://github.com/nushell/nushell/pull/11315) +- [ayax79](https://github.com/ayax79) created + - [Polars Struct support without unsafe blocks](https://github.com/nushell/nushell/pull/11229) +- [drbrain](https://github.com/drbrain) created + - [Enforce required, optional, and rest positional arguments start with an uppercase and end with a period.](https://github.com/nushell/nushell/pull/11285) +- [AntoineSebert](https://github.com/AntoineSebert) created + - [fix-`open`-is-ambiguous](https://github.com/nushell/nushell/pull/11302) +- [sophiajt](https://github.com/sophiajt) created + - [bump reedline dep to 0.27](https://github.com/nushell/nushell/pull/11299) + +## Documentation + +- [amtoine](https://github.com/amtoine) created + - [mark feature-gated commands more clearly](https://github.com/nushell/nushell.github.io/pull/1183) + - [logo contest announcement](https://github.com/nushell/nushell.github.io/pull/1180) + - [Release notes for `0.88.0`](https://github.com/nushell/nushell.github.io/pull/1146) +- [TWSiO](https://github.com/TWSiO) created + - [Adding warning to nu_plugin_formats commands](https://github.com/nushell/nushell.github.io/pull/1199) +- [yukitomoda](https://github.com/yukitomoda) created + - [JA update installation.md](https://github.com/nushell/nushell.github.io/pull/1198) + - [JA update shells_in_shells.md](https://github.com/nushell/nushell.github.io/pull/1197) + - [fix a description of usage scenario](https://github.com/nushell/nushell.github.io/pull/1196) + - [Update shells_in_shells.md](https://github.com/nushell/nushell.github.io/pull/1195) + - [update the list of commands which are interpreted by CMD](https://github.com/nushell/nushell.github.io/pull/1192) +- [hustcer](https://github.com/hustcer) created + - [Upgrade Vuepress, some Vuepress plugins and shiki syntax highlighter](https://github.com/nushell/nushell.github.io/pull/1194) + - [Refresh command docs for Nu v0.88](https://github.com/nushell/nushell.github.io/pull/1171) +- [aserowy](https://github.com/aserowy) created + - [external completer: fixed cookbook example to exchange the first span entry only](https://github.com/nushell/nushell.github.io/pull/1193) +- [YukiOnodera](https://github.com/YukiOnodera) created + - [I've revised the Japanese translation](https://github.com/nushell/nushell.github.io/pull/1179) +- [zolodev](https://github.com/zolodev) created + - [Update aliases adding new section](https://github.com/nushell/nushell.github.io/pull/1190) +- [ysthakur](https://github.com/ysthakur) created + - [Add info on spread operator in commands for 0.89 release notes](https://github.com/nushell/nushell.github.io/pull/1188) + - [Add information on spread operator](https://github.com/nushell/nushell.github.io/pull/1176) +- [frogshead](https://github.com/frogshead) created + - [fix typo](https://github.com/nushell/nushell.github.io/pull/1185) +- [Trent-Fellbootman](https://github.com/Trent-Fellbootman) created + - [Update types_of_data.md](https://github.com/nushell/nushell.github.io/pull/1184) + - [Update thinking_in_nu.md](https://github.com/nushell/nushell.github.io/pull/1172) +- [WindSoilder](https://github.com/WindSoilder) created + - [add information about switches](https://github.com/nushell/nushell.github.io/pull/1182) +- [app/github-actions](https://github.com/app/github-actions) created + - [Compressed Images](https://github.com/nushell/nushell.github.io/pull/1181) +- [MediosZ](https://github.com/MediosZ) created + - [Sync zh-CN shells_in_shells.](https://github.com/nushell/nushell.github.io/pull/1178) +- [braddunbar](https://github.com/braddunbar) created + - [Typo in history menu section](https://github.com/nushell/nushell.github.io/pull/1177) +- [IndigoLily](https://github.com/IndigoLily) created + - [Fix various spelling/grammar issues in release notes for `0.88.0`](https://github.com/nushell/nushell.github.io/pull/1175) +- [Tamnac](https://github.com/Tamnac) created + - [Add time command to nushell_map.md](https://github.com/nushell/nushell.github.io/pull/1173) +- [mb21](https://github.com/mb21) created + - [Extend globbing section in moving_around.md](https://github.com/nushell/nushell.github.io/pull/1125) +- [RGBCube](https://github.com/RGBCube) created + - [Update background_task.md](https://github.com/nushell/nushell.github.io/pull/1166) + +## Nu_Scripts + +- [fj0r](https://github.com/fj0r) created + - [comma: upgrade template](https://github.com/nushell/nu_scripts/pull/725) + - [kubernetes to docker-compose](https://github.com/nushell/nu_scripts/pull/726) + - [comma test runner](https://github.com/nushell/nu_scripts/pull/715) + - [merge container-inspect into container-process-list](https://github.com/nushell/nu_scripts/pull/711) + - [comma: support filter, watch, poll](https://github.com/nushell/nu_scripts/pull/707) + - [new module comma and some updates](https://github.com/nushell/nu_scripts/pull/704) +- [bobhy](https://github.com/bobhy) created + - [Show activated python VE at beginning of prompt.](https://github.com/nushell/nu_scripts/pull/722) +- [AucaCoyan](https://github.com/AucaCoyan) created + - [:bug: fix `(default)` and `(installed)` on rustup completions](https://github.com/nushell/nu_scripts/pull/721) + - [:bug: rename `yarn` for `yarn-v4` and add `run` cmpl](https://github.com/nushell/nu_scripts/pull/720) + - [:sparkles: `code` completions](https://github.com/nushell/nu_scripts/pull/719) + - [:sparkles: add completion to `gh pr checkout `](https://github.com/nushell/nu_scripts/pull/714) + - [:sparkles: add more `gh` completions](https://github.com/nushell/nu_scripts/pull/713) + - [:sparkles: Add the first layer of depth to the cmds](https://github.com/nushell/nu_scripts/pull/708) + - [:sparkles: First `gh` completions](https://github.com/nushell/nu_scripts/pull/706) + - [:bug: Fix `rustup` use completions and modify README](https://github.com/nushell/nu_scripts/pull/696) +- [edhowland](https://github.com/edhowland) created + - [Adds Modules/recursion : Examples of Fun with Recursive functions in Nu](https://github.com/nushell/nu_scripts/pull/717) +- [frogshead](https://github.com/frogshead) created + - [fix broken links in modules readme](https://github.com/nushell/nu_scripts/pull/718) + - [fix broken link on README.md](https://github.com/nushell/nu_scripts/pull/716) +- [robbienohra](https://github.com/robbienohra) created + - [fix: missing regex flag](https://github.com/nushell/nu_scripts/pull/712) +- [adrian5](https://github.com/adrian5) created + - [Add tokyo-moon theme variant](https://github.com/nushell/nu_scripts/pull/710) +- [kjelly](https://github.com/kjelly) created + - [fix git-v2 and kubernetes](https://github.com/nushell/nu_scripts/pull/703) +- [zyfmix](https://github.com/zyfmix) created + - [Fix: nushell at 0.88.0 start and end are deprecated](https://github.com/nushell/nu_scripts/pull/698) +- [RGBCube](https://github.com/RGBCube) created + - [Rewrite and expand background task module](https://github.com/nushell/nu_scripts/pull/691) +- [TeaDrinkingProgrammer](https://github.com/TeaDrinkingProgrammer) created + - [Added updated and improved version of the conda scripts](https://github.com/nushell/nu_scripts/pull/694) + +## Reedline + +- [WindSoilder](https://github.com/WindSoilder) created + - [Try fix prompt_start_row reset to 0 when opening a file without newline in Nushell ](https://github.com/nushell/reedline/pull/697) + - [fix clippy, add typo dict](https://github.com/nushell/reedline/pull/698) +- [sholderbach](https://github.com/sholderbach) created + - [Fix clippy from the future](https://github.com/nushell/reedline/pull/687) + - [Bump `itertools` to `0.12.0` from `0.10.x`](https://github.com/nushell/reedline/pull/686) + - [Bump version to 0.27.1](https://github.com/nushell/reedline/pull/683) + - [Try to fix the docs.rs build](https://github.com/nushell/reedline/pull/682) + - [Bump version for 0.27 release](https://github.com/nushell/reedline/pull/681) +- [nibon7](https://github.com/nibon7) created + - [Fix `prompt_start_row` reset to 0 when opening a file without newline in Nushell](https://github.com/nushell/reedline/pull/688) +- [danielsomerfield](https://github.com/danielsomerfield) created + - [Better behaviour on resize](https://github.com/nushell/reedline/pull/675) diff --git a/blog/2024-02-06-nushell_0_90_0.md b/src/content/docs/blog/2024-02-06-nushell_0_90_0.md similarity index 99% rename from blog/2024-02-06-nushell_0_90_0.md rename to src/content/docs/blog/2024-02-06-nushell_0_90_0.md index 0e9aa55ef66..9ae62aaa2d6 100644 --- a/blog/2024-02-06-nushell_0_90_0.md +++ b/src/content/docs/blog/2024-02-06-nushell_0_90_0.md @@ -51,7 +51,7 @@ As part of this release, we also publish a set of optional plugins you can insta the following command should help pre-generate a great deal of the table of content. be careful with the format and false-positives :wink: - ```nushell + ```nushellshell rg '^#+ ' blog/... | lines | each { @@ -117,7 +117,7 @@ The new `str escape-glob` command ([#11663](https://github.com/nushell/nushell/p ## (Breaking Change!) For existing plugin -Nushell allows plugins to receive configuration from the nushell configuration [#10955](https://github.com/nushell/nushell/pull/10955), the communication protocol between nushell and plugin have changed to achieve the behavior. So plugins need to update `nu-plugin` dependency version and recompile it to make plugin works again. +Nushell allows plugins to receive configuration from the nushell configuration [#10955](https://github.com/nushell/nushell/pull/10955), the communication protocol between nushell and plugin have changed to achieve the behavior. So plugins need to update `nu-plugin` dependency version and recompile it to make plugin works again. ## Starting a new [Language Reference](https://www.nushell.sh/lang-guide) @@ -134,7 +134,7 @@ Practical recipes for solving common problems continue being collected in the [c String interpolation can be now performed at parse time [#11562](https://github.com/nushell/nushell/pull/11562). This gives you another way to, for example, compose files for importing or sourcing, for example: -```nushell +```nushellshell const name = "spam" use ($nu.default-config-dir | path join $"($name).nu") ``` @@ -185,7 +185,7 @@ Apart from commands already mentioned above, [`into cell-path`](https://github.c # {{ $frontmatter.title }} for core @@ -17,13 +18,12 @@ feature: default ## Signature -```> alias {flags} (name) (initial_value)``` +`> alias {flags} (name) (initial_value)` ## Parameters - - `name`: Name of the alias. - - `initial_value`: Equals sign followed by value. - +- `name`: Name of the alias. +- `initial_value`: Equals sign followed by value. ## Input/output types: @@ -34,11 +34,13 @@ feature: default ## Examples Alias ll to ls -l -```nu + +```nushell > alias ll = ls -l ``` ## 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 +https://www.nushell.sh/book/thinking_in_nu.html diff --git a/commands/docs/all.md b/src/content/docs/commands/docs/all.md similarity index 84% rename from commands/docs/all.md rename to src/content/docs/commands/docs/all.md index 0ca3b08d125..7bfbe82ee76 100644 --- a/commands/docs/all.md +++ b/src/content/docs/commands/docs/all.md @@ -9,6 +9,7 @@ usage: | Test if every element of the input fulfills a predicate expression. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,41 +18,44 @@ feature: default ## Signature -```> all {flags} (predicate)``` +`> all {flags} (predicate)` ## Parameters - - `predicate`: A closure that must evaluate to a boolean. - +- `predicate`: A closure that must evaluate to a boolean. ## Input/output types: -| input | output | -| --------- | ------ | +| input | output | +| ----------- | ------ | | list\ | bool | ## Examples Check if each row's status is the string 'UP' -```nu + +```nushell > [[status]; [UP] [UP]] | all {|el| $el.status == UP } true ``` Check that each item is a string -```nu + +```nushell > [foo bar 2 baz] | all {|| ($in | describe) == 'string' } false ``` Check that all values are equal to twice their index -```nu + +```nushell > [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 -```nu + +```nushell > let cond = {|el| ($el mod 2) == 0 }; [2 4 6 8] | all $cond true ``` diff --git a/commands/docs/ansi.md b/src/content/docs/commands/docs/ansi.md similarity index 93% rename from commands/docs/ansi.md rename to src/content/docs/commands/docs/ansi.md index 2bd5d726ee3..cbd29e842c6 100644 --- a/commands/docs/ansi.md +++ b/src/content/docs/commands/docs/ansi.md @@ -9,6 +9,7 @@ usage: | Output ANSI codes to change color and style of text. feature: default --- + # {{ $frontmatter.title }} for platform @@ -17,18 +18,17 @@ feature: default ## Signature -```> ansi {flags} (code)``` +`> ansi {flags} (code)` ## Flags - - `--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 +- `--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 ## Parameters - - `code`: The name of the code to use (from `ansi -l`). - +- `code`: The name of the code to use (from `ansi -l`). ## Input/output types: @@ -39,37 +39,43 @@ feature: default ## Examples Change color to green (see how the next example text will be green!) -```nu + +```nushell > ansi green ``` Reset the color -```nu + +```nushell > ansi reset ``` Use different colors and styles in the same text -```nu + +```nushell > $'(ansi red_bold)Hello(ansi reset) (ansi green_dimmed)Nu(ansi reset) (ansi purple_italic)World(ansi reset)' Hello Nu World ``` The same example as above with short names -```nu + +```nushell > $'(ansi rb)Hello(ansi reset) (ansi gd)Nu(ansi reset) (ansi pi)World(ansi reset)' Hello Nu World ``` Use escape codes, without the '\x1b[' -```nu + +```nushell > $"(ansi --escape '3;93;41m')Hello(ansi reset)" # italic bright yellow on red background Hello ``` Use structured escape codes -```nu + +```nushell > let bold_blue_on_red = { # `fg`, `bg`, `attr` are the acceptable keys, all other keys are considered invalid and will throw errors. fg: '#0000ff' bg: '#ff0000' @@ -80,6 +86,7 @@ Hello, Nu World! ``` ## Notes + ```text An introduction to what ANSI escape sequences are can be found in the ]8;;https://en.wikipedia.org/wiki/ANSI_escape_code\ANSI escape code]8;;\ Wikipedia page. @@ -147,4 +154,4 @@ Operating system commands: | -------------------------------------------------- | ------- | ------------------------------------------------------------------ | | [`ansi gradient`](/commands/docs/ansi_gradient.md) | Builtin | Add a color gradient (using ANSI color codes) to the given string. | | [`ansi link`](/commands/docs/ansi_link.md) | Builtin | Add a link (using OSC 8 escape sequence) to the given string. | -| [`ansi strip`](/commands/docs/ansi_strip.md) | Builtin | Strip ANSI escape sequences from a string. | \ No newline at end of file +| [`ansi strip`](/commands/docs/ansi_strip.md) | Builtin | Strip ANSI escape sequences from a string. | diff --git a/commands/docs/ansi_gradient.md b/src/content/docs/commands/docs/ansi_gradient.md similarity index 64% rename from commands/docs/ansi_gradient.md rename to src/content/docs/commands/docs/ansi_gradient.md index 5141fe177ae..c86bd6cd996 100644 --- a/commands/docs/ansi_gradient.md +++ b/src/content/docs/commands/docs/ansi_gradient.md @@ -9,62 +9,67 @@ usage: | Add a color gradient (using ANSI color codes) to the given string. feature: extra --- + # {{ $frontmatter.title }} for platform
{{ $frontmatter.platform }}
- ::: warning - Command `ansi gradient` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `ansi gradient` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> ansi gradient {flags} ...rest``` +`> ansi gradient {flags} ...rest` ## 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 - - `...rest`: for a data structure input, add a gradient to strings at the given cell paths - +- `...rest`: for a data structure input, add a gradient to strings at the given cell paths ## Input/output types: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| record | record | -| string | string | -| table | table | +| record | record | +| string | string | +| table | table | + ## Examples draw text in a gradient with foreground start and end colors -```nu + +```nushell > 'Hello, Nushell! This is a gradient.' | ansi gradient --fgstart '0x40c9ff' --fgend '0xe81cff' ``` draw text in a gradient with foreground start and end colors and background start and end colors -```nu + +```nushell > 'Hello, Nushell! This is a gradient.' | ansi gradient --fgstart '0x40c9ff' --fgend '0xe81cff' --bgstart '0xe81cff' --bgend '0x40c9ff' ``` draw text in a gradient by specifying foreground start color - end color is assumed to be black -```nu + +```nushell > 'Hello, Nushell! This is a gradient.' | ansi gradient --fgstart '0x40c9ff' ``` draw text in a gradient by specifying foreground end color - start color is assumed to be black -```nu + +```nushell > 'Hello, Nushell! This is a gradient.' | ansi gradient --fgend '0xe81cff' ``` diff --git a/commands/docs/ansi_link.md b/src/content/docs/commands/docs/ansi_link.md similarity index 64% rename from commands/docs/ansi_link.md rename to src/content/docs/commands/docs/ansi_link.md index 2fcac80ad88..e1ad2574add 100644 --- a/commands/docs/ansi_link.md +++ b/src/content/docs/commands/docs/ansi_link.md @@ -9,6 +9,7 @@ usage: | Add a link (using OSC 8 escape sequence) to the given string. feature: default --- + # {{ $frontmatter.title }} for platform @@ -17,42 +18,45 @@ feature: default ## Signature -```> ansi link {flags} ...rest``` +`> ansi link {flags} ...rest` ## 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 +- `--text, -t {string}`: Link text. Uses uri as text if absent. In case of + tables, records and lists applies this text to all elements ## Parameters - - `...rest`: For a data structure input, add links to all strings at the given cell paths. - +- `...rest`: For a data structure input, add links to all strings at the given cell paths. ## Input/output types: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| record | record | -| string | string | -| table | table | +| record | record | +| string | string | +| table | table | + ## Examples Create a link to open some file -```nu + +```nushell > 'file:///file.txt' | ansi link --text 'Open Me!' Open Me! ``` Create a link without text -```nu + +```nushell > 'https://www.nushell.sh/' | ansi link https://www.nushell.sh/ ``` Format a table column into links -```nu + +```nushell > [[url text]; [https://example.com Text]] | ansi link url ``` diff --git a/commands/docs/ansi_strip.md b/src/content/docs/commands/docs/ansi_strip.md similarity index 66% rename from commands/docs/ansi_strip.md rename to src/content/docs/commands/docs/ansi_strip.md index f5c8c50c9a1..ae08e6dc594 100644 --- a/commands/docs/ansi_strip.md +++ b/src/content/docs/commands/docs/ansi_strip.md @@ -9,6 +9,7 @@ usage: | Strip ANSI escape sequences from a string. feature: default --- + # {{ $frontmatter.title }} for platform @@ -17,25 +18,26 @@ feature: default ## Signature -```> ansi strip {flags} ...rest``` +`> ansi strip {flags} ...rest` ## Parameters - - `...rest`: For a data structure input, remove ANSI sequences from strings at the given cell paths. - +- `...rest`: For a data structure input, remove ANSI sequences from strings at the given cell paths. ## Input/output types: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| record | record | -| string | string | -| table | table | +| record | record | +| string | string | +| table | table | + ## Examples Strip ANSI escape sequences from a string -```nu + +```nushell > $'(ansi green)(ansi cursor_on)hello' | ansi strip hello ``` diff --git a/commands/docs/any.md b/src/content/docs/commands/docs/any.md similarity index 84% rename from commands/docs/any.md rename to src/content/docs/commands/docs/any.md index 70640398710..c1d269f3fef 100644 --- a/commands/docs/any.md +++ b/src/content/docs/commands/docs/any.md @@ -9,6 +9,7 @@ usage: | Tests if any element of the input fulfills a predicate expression. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,41 +18,44 @@ feature: default ## Signature -```> any {flags} (predicate)``` +`> any {flags} (predicate)` ## Parameters - - `predicate`: A closure that must evaluate to a boolean. - +- `predicate`: A closure that must evaluate to a boolean. ## Input/output types: -| input | output | -| --------- | ------ | +| input | output | +| ----------- | ------ | | list\ | bool | ## Examples Check if any row's status is the string 'DOWN' -```nu + +```nushell > [[status]; [UP] [DOWN] [UP]] | any {|el| $el.status == DOWN } true ``` Check that any item is a string -```nu + +```nushell > [1 2 3 4] | any {|| ($in | describe) == 'string' } false ``` Check if any value is equal to twice its own index -```nu + +```nushell > [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 -```nu + +```nushell > let cond = {|e| $e mod 2 == 1 }; [2 4 1 6 8] | any $cond true ``` diff --git a/commands/docs/append.md b/src/content/docs/commands/docs/append.md similarity index 91% rename from commands/docs/append.md rename to src/content/docs/commands/docs/append.md index 42b49f64a7a..59e861b1987 100644 --- a/commands/docs/append.md +++ b/src/content/docs/commands/docs/append.md @@ -9,6 +9,7 @@ usage: | Append any number of rows to a table. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,23 +18,23 @@ feature: default ## Signature -```> append {flags} (row)``` +`> append {flags} (row)` ## Parameters - - `row`: The row, list, or table to append. - +- `row`: The row, list, or table to append. ## Input/output types: -| input | output | -| ----- | --------- | +| input | output | +| ----- | ----------- | | any | list\ | ## Examples Append one int to a list -```nu + +```nushell > [0 1 2 3] | append 4 ╭───┬───╮ │ 0 │ 0 │ @@ -46,7 +47,8 @@ Append one int to a list ``` Append a list to an item -```nu + +```nushell > 0 | append [1 2 3] ╭───┬───╮ │ 0 │ 0 │ @@ -58,7 +60,8 @@ Append a list to an item ``` Append a list of string to a string -```nu + +```nushell > "a" | append ["b"] ╭───┬───╮ │ 0 │ a │ @@ -68,7 +71,8 @@ Append a list of string to a string ``` Append three int items -```nu + +```nushell > [0 1] | append [2 3 4] ╭───┬───╮ │ 0 │ 0 │ @@ -81,7 +85,8 @@ Append three int items ``` Append ints and strings -```nu + +```nushell > [0 1] | append [2 nu 4 shell] ╭───┬───────╮ │ 0 │ 0 │ @@ -95,7 +100,8 @@ Append ints and strings ``` Append a range of ints to a list -```nu + +```nushell > [0 1] | append 2..4 ╭───┬───╮ │ 0 │ 0 │ @@ -108,7 +114,8 @@ Append a range of ints to a list ``` ## Notes + Be aware that this command 'unwraps' lists passed to it. So, if you pass a variable to it, and you want the variable's contents to be appended without being unwrapped, it's wise to pre-emptively wrap the variable in a list, like so: `append [$val]`. This way, `append` will -only unwrap the outer list, and leave the variable's contents untouched. \ No newline at end of file +only unwrap the outer list, and leave the variable's contents untouched. diff --git a/commands/docs/ast.md b/src/content/docs/commands/docs/ast.md similarity index 82% rename from commands/docs/ast.md rename to src/content/docs/commands/docs/ast.md index 0607b213685..e12aac9c68b 100644 --- a/commands/docs/ast.md +++ b/src/content/docs/commands/docs/ast.md @@ -9,6 +9,7 @@ usage: | Print the abstract syntax tree (ast) for a pipeline. feature: default --- + # {{ $frontmatter.title }} for debug @@ -17,17 +18,16 @@ feature: default ## Signature -```> ast {flags} (pipeline)``` +`> ast {flags} (pipeline)` ## Flags - - `--json, -j`: serialize to json - - `--minify, -m`: minify the nuon or json output +- `--json, -j`: serialize to json +- `--minify, -m`: minify the nuon or json output ## Parameters - - `pipeline`: The pipeline to print the ast for. - +- `pipeline`: The pipeline to print the ast for. ## Input/output types: @@ -38,31 +38,36 @@ feature: default ## Examples Print the ast of a string -```nu + +```nushell > ast 'hello' ``` Print the ast of a pipeline -```nu + +```nushell > ast 'ls | where name =~ README' ``` Print the ast of a pipeline with an error -```nu + +```nushell > ast 'for x in 1..10 { echo $x ' ``` Print the ast of a pipeline with an error, as json, in a nushell table -```nu + +```nushell > 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 -```nu + +```nushell > ast 'for x in 1..10 { echo $x ' --json --minify ``` diff --git a/commands/docs/bits.md b/src/content/docs/commands/docs/bits.md similarity index 90% rename from commands/docs/bits.md rename to src/content/docs/commands/docs/bits.md index 362aa4eda1e..439b6a0dac3 100644 --- a/commands/docs/bits.md +++ b/src/content/docs/commands/docs/bits.md @@ -9,20 +9,20 @@ usage: | Various commands for working with bits. feature: extra --- + # {{ $frontmatter.title }} for bits
{{ $frontmatter.bits }}
- ::: warning - Command `bits` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `bits` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: -## Signature -```> bits {flags} ``` +## Signature +`> bits {flags} ` ## Input/output types: @@ -31,6 +31,7 @@ feature: extra | nothing | string | ## Notes + You must use one of the following subcommands. Using this command as-is will only produce this help message. ## Subcommands: @@ -44,4 +45,4 @@ You must use one of the following subcommands. Using this command as-is will onl | [`bits ror`](/commands/docs/bits_ror.md) | Builtin | Bitwise rotate right for ints. | | [`bits shl`](/commands/docs/bits_shl.md) | Builtin | Bitwise shift left for ints. | | [`bits shr`](/commands/docs/bits_shr.md) | Builtin | Bitwise shift right for ints. | -| [`bits xor`](/commands/docs/bits_xor.md) | Builtin | Performs bitwise xor for ints. | \ No newline at end of file +| [`bits xor`](/commands/docs/bits_xor.md) | Builtin | Performs bitwise xor for ints. | diff --git a/commands/docs/bits_and.md b/src/content/docs/commands/docs/bits_and.md similarity index 70% rename from commands/docs/bits_and.md rename to src/content/docs/commands/docs/bits_and.md index 42e99df6bf0..a53aef895e0 100644 --- a/commands/docs/bits_and.md +++ b/src/content/docs/commands/docs/bits_and.md @@ -9,41 +9,44 @@ usage: | Performs bitwise and for ints. feature: extra --- + # {{ $frontmatter.title }} for bits
{{ $frontmatter.bits }}
- ::: warning - Command `bits and` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `bits and` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> bits and {flags} (target)``` +`> bits and {flags} (target)` ## Parameters - - `target`: target int to perform bit and - +- `target`: target int to perform bit and ## Input/output types: -| input | output | -| --------- | --------- | -| int | int | +| input | output | +| ----------- | ----------- | +| int | int | | list\ | list\ | + ## Examples Apply bits and to two numbers -```nu + +```nushell > 2 | bits and 2 2 ``` Apply logical and to a list of numbers -```nu + +```nushell > [4 3 2] | bits and 2 ╭───┬───╮ │ 0 │ 0 │ diff --git a/commands/docs/bits_not.md b/src/content/docs/commands/docs/bits_not.md similarity index 75% rename from commands/docs/bits_not.md rename to src/content/docs/commands/docs/bits_not.md index 7bc17062d0c..26ab8ba4898 100644 --- a/commands/docs/bits_not.md +++ b/src/content/docs/commands/docs/bits_not.md @@ -9,36 +9,38 @@ usage: | Performs logical negation on each bit. feature: extra --- + # {{ $frontmatter.title }} for bits
{{ $frontmatter.bits }}
- ::: warning - Command `bits not` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `bits not` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> bits not {flags} ``` +`> bits not {flags} ` ## Flags - - `--signed, -s`: always treat input number as a signed number - - `--number-bytes, -n {string}`: 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 {string}`: the size of unsigned number in bytes, it can be 1, 2, 4, 8, auto ## Input/output types: -| input | output | -| --------- | --------- | -| int | int | +| input | output | +| ----------- | ----------- | +| int | int | | list\ | list\ | + ## Examples Apply logical negation to a list of numbers -```nu + +```nushell > [4 3 2] | bits not ╭───┬─────────────────╮ │ 0 │ 140737488355323 │ @@ -49,7 +51,8 @@ Apply logical negation to a list of numbers ``` Apply logical negation to a list of numbers, treat input as 2 bytes number -```nu + +```nushell > [4 3 2] | bits not --number-bytes '2' ╭───┬───────╮ │ 0 │ 65531 │ @@ -60,7 +63,8 @@ Apply logical negation to a list of numbers, treat input as 2 bytes number ``` Apply logical negation to a list of numbers, treat input as signed number -```nu + +```nushell > [4 3 2] | bits not --signed ╭───┬────╮ │ 0 │ -5 │ diff --git a/commands/docs/bits_or.md b/src/content/docs/commands/docs/bits_or.md similarity index 70% rename from commands/docs/bits_or.md rename to src/content/docs/commands/docs/bits_or.md index 15a54ac82a5..b5630e63b68 100644 --- a/commands/docs/bits_or.md +++ b/src/content/docs/commands/docs/bits_or.md @@ -9,41 +9,44 @@ usage: | Performs bitwise or for ints. feature: extra --- + # {{ $frontmatter.title }} for bits
{{ $frontmatter.bits }}
- ::: warning - Command `bits or` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `bits or` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> bits or {flags} (target)``` +`> bits or {flags} (target)` ## Parameters - - `target`: target int to perform bit or - +- `target`: target int to perform bit or ## Input/output types: -| input | output | -| --------- | --------- | -| int | int | +| input | output | +| ----------- | ----------- | +| int | int | | list\ | list\ | + ## Examples Apply bits or to two numbers -```nu + +```nushell > 2 | bits or 6 6 ``` Apply logical or to a list of numbers -```nu + +```nushell > [8 3 2] | bits or 2 ╭───┬────╮ │ 0 │ 10 │ diff --git a/commands/docs/bits_rol.md b/src/content/docs/commands/docs/bits_rol.md similarity index 61% rename from commands/docs/bits_rol.md rename to src/content/docs/commands/docs/bits_rol.md index 07d73af648b..0b694791c92 100644 --- a/commands/docs/bits_rol.md +++ b/src/content/docs/commands/docs/bits_rol.md @@ -9,46 +9,49 @@ usage: | Bitwise rotate left for ints. feature: extra --- + # {{ $frontmatter.title }} for bits
{{ $frontmatter.bits }}
- ::: warning - Command `bits rol` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `bits rol` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> bits rol {flags} (bits)``` +`> bits rol {flags} (bits)` ## Flags - - `--signed, -s`: always treat input number as a signed number - - `--number-bytes, -n {string}`: the word size in number of bytes, it can be 1, 2, 4, 8, auto, default value `8` +- `--signed, -s`: always treat input number as a signed number +- `--number-bytes, -n {string}`: the word size in number of bytes, it can be 1, 2, 4, 8, auto, default value `8` ## Parameters - - `bits`: number of bits to rotate left - +- `bits`: number of bits to rotate left ## Input/output types: -| input | output | -| --------- | --------- | -| int | int | +| input | output | +| ----------- | ----------- | +| int | int | | list\ | list\ | + ## Examples Rotate left a number with 2 bits -```nu + +```nushell > 17 | bits rol 2 68 ``` Rotate left a list of numbers with 2 bits -```nu + +```nushell > [5 3 2] | bits rol 2 ╭───┬────╮ │ 0 │ 20 │ diff --git a/commands/docs/bits_ror.md b/src/content/docs/commands/docs/bits_ror.md similarity index 62% rename from commands/docs/bits_ror.md rename to src/content/docs/commands/docs/bits_ror.md index 1a6e518d827..ed60d9a1c44 100644 --- a/commands/docs/bits_ror.md +++ b/src/content/docs/commands/docs/bits_ror.md @@ -9,46 +9,49 @@ usage: | Bitwise rotate right for ints. feature: extra --- + # {{ $frontmatter.title }} for bits
{{ $frontmatter.bits }}
- ::: warning - Command `bits ror` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `bits ror` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> bits ror {flags} (bits)``` +`> bits ror {flags} (bits)` ## Flags - - `--signed, -s`: always treat input number as a signed number - - `--number-bytes, -n {string}`: the word size in number of bytes, it can be 1, 2, 4, 8, auto, default value `8` +- `--signed, -s`: always treat input number as a signed number +- `--number-bytes, -n {string}`: the word size in number of bytes, it can be 1, 2, 4, 8, auto, default value `8` ## Parameters - - `bits`: number of bits to rotate right - +- `bits`: number of bits to rotate right ## Input/output types: -| input | output | -| --------- | --------- | -| int | int | +| input | output | +| ----------- | ----------- | +| int | int | | list\ | list\ | + ## Examples Rotate right a number with 60 bits -```nu + +```nushell > 17 | bits ror 60 272 ``` Rotate right a list of numbers of one byte -```nu + +```nushell > [15 33 92] | bits ror 2 --number-bytes '1' ╭───┬─────╮ │ 0 │ 195 │ diff --git a/commands/docs/bits_shl.md b/src/content/docs/commands/docs/bits_shl.md similarity index 63% rename from commands/docs/bits_shl.md rename to src/content/docs/commands/docs/bits_shl.md index 58fa43877ba..86f63b63a44 100644 --- a/commands/docs/bits_shl.md +++ b/src/content/docs/commands/docs/bits_shl.md @@ -9,58 +9,63 @@ usage: | Bitwise shift left for ints. feature: extra --- + # {{ $frontmatter.title }} for bits
{{ $frontmatter.bits }}
- ::: warning - Command `bits shl` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `bits shl` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> bits shl {flags} (bits)``` +`> bits shl {flags} (bits)` ## Flags - - `--signed, -s`: always treat input number as a signed number - - `--number-bytes, -n {string}`: the word size in number of bytes, it can be 1, 2, 4, 8, auto, default value `8` +- `--signed, -s`: always treat input number as a signed number +- `--number-bytes, -n {string}`: the word size in number of bytes, it can be 1, 2, 4, 8, auto, default value `8` ## Parameters - - `bits`: number of bits to shift left - +- `bits`: number of bits to shift left ## Input/output types: -| input | output | -| --------- | --------- | -| int | int | +| input | output | +| ----------- | ----------- | +| int | int | | list\ | list\ | + ## Examples Shift left a number by 7 bits -```nu + +```nushell > 2 | bits shl 7 256 ``` Shift left a number with 1 byte by 7 bits -```nu + +```nushell > 2 | bits shl 7 --number-bytes '1' 0 ``` Shift left a signed number by 1 bit -```nu + +```nushell > 0x7F | bits shl 1 --signed 254 ``` Shift left a list of numbers -```nu + +```nushell > [5 3 2] | bits shl 2 ╭───┬────╮ │ 0 │ 20 │ diff --git a/commands/docs/bits_shr.md b/src/content/docs/commands/docs/bits_shr.md similarity index 60% rename from commands/docs/bits_shr.md rename to src/content/docs/commands/docs/bits_shr.md index aab27d2066e..441f8e0d0f3 100644 --- a/commands/docs/bits_shr.md +++ b/src/content/docs/commands/docs/bits_shr.md @@ -9,46 +9,49 @@ usage: | Bitwise shift right for ints. feature: extra --- + # {{ $frontmatter.title }} for bits
{{ $frontmatter.bits }}
- ::: warning - Command `bits shr` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `bits shr` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> bits shr {flags} (bits)``` +`> bits shr {flags} (bits)` ## Flags - - `--signed, -s`: always treat input number as a signed number - - `--number-bytes, -n {string}`: the word size in number of bytes, it can be 1, 2, 4, 8, auto, default value `8` +- `--signed, -s`: always treat input number as a signed number +- `--number-bytes, -n {string}`: the word size in number of bytes, it can be 1, 2, 4, 8, auto, default value `8` ## Parameters - - `bits`: number of bits to shift right - +- `bits`: number of bits to shift right ## Input/output types: -| input | output | -| --------- | --------- | -| int | int | +| input | output | +| ----------- | ----------- | +| int | int | | list\ | list\ | + ## Examples Shift right a number with 2 bits -```nu + +```nushell > 8 | bits shr 2 2 ``` Shift right a list of numbers -```nu + +```nushell > [15 35 2] | bits shr 2 ╭───┬───╮ │ 0 │ 3 │ diff --git a/commands/docs/bits_xor.md b/src/content/docs/commands/docs/bits_xor.md similarity index 70% rename from commands/docs/bits_xor.md rename to src/content/docs/commands/docs/bits_xor.md index da62c8b4e2f..8299ad027ab 100644 --- a/commands/docs/bits_xor.md +++ b/src/content/docs/commands/docs/bits_xor.md @@ -9,41 +9,44 @@ usage: | Performs bitwise xor for ints. feature: extra --- + # {{ $frontmatter.title }} for bits
{{ $frontmatter.bits }}
- ::: warning - Command `bits xor` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `bits xor` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> bits xor {flags} (target)``` +`> bits xor {flags} (target)` ## Parameters - - `target`: target int to perform bit xor - +- `target`: target int to perform bit xor ## Input/output types: -| input | output | -| --------- | --------- | -| int | int | +| input | output | +| ----------- | ----------- | +| int | int | | list\ | list\ | + ## Examples Apply bits xor to two numbers -```nu + +```nushell > 2 | bits xor 2 0 ``` Apply logical xor to a list of numbers -```nu + +```nushell > [8 3 2] | bits xor 2 ╭───┬────╮ │ 0 │ 10 │ diff --git a/commands/docs/break.md b/src/content/docs/commands/docs/break.md similarity index 94% rename from commands/docs/break.md rename to src/content/docs/commands/docs/break.md index 7ff07ba49bb..dce5cab7f33 100644 --- a/commands/docs/break.md +++ b/src/content/docs/commands/docs/break.md @@ -9,6 +9,7 @@ usage: | Break a loop. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,8 +18,7 @@ feature: default ## Signature -```> break {flags} ``` - +`> break {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Break out of a loop -```nu + +```nushell > loop { break } ``` diff --git a/commands/docs/bytes.md b/src/content/docs/commands/docs/bytes.md similarity index 97% rename from commands/docs/bytes.md rename to src/content/docs/commands/docs/bytes.md index 59722299d7f..250fe66d255 100644 --- a/commands/docs/bytes.md +++ b/src/content/docs/commands/docs/bytes.md @@ -9,6 +9,7 @@ usage: | Various commands for working with byte data. feature: default --- + # {{ $frontmatter.title }} for bytes @@ -17,8 +18,7 @@ feature: default ## Signature -```> bytes {flags} ``` - +`> bytes {flags} ` ## Input/output types: @@ -27,6 +27,7 @@ feature: default | nothing | string | ## Notes + You must use one of the following subcommands. Using this command as-is will only produce this help message. ## Subcommands: @@ -43,4 +44,4 @@ You must use one of the following subcommands. Using this command as-is will onl | [`bytes remove`](/commands/docs/bytes_remove.md) | Builtin | Remove bytes. | | [`bytes replace`](/commands/docs/bytes_replace.md) | Builtin | Find and replace binary. | | [`bytes reverse`](/commands/docs/bytes_reverse.md) | Builtin | Reverse the bytes in the pipeline. | -| [`bytes starts-with`](/commands/docs/bytes_starts-with.md) | Builtin | Check if bytes starts with a pattern. | \ No newline at end of file +| [`bytes starts-with`](/commands/docs/bytes_starts-with.md) | Builtin | Check if bytes starts with a pattern. | diff --git a/commands/docs/bytes_add.md b/src/content/docs/commands/docs/bytes_add.md similarity index 76% rename from commands/docs/bytes_add.md rename to src/content/docs/commands/docs/bytes_add.md index 231fbc748d6..f79d3f94584 100644 --- a/commands/docs/bytes_add.md +++ b/src/content/docs/commands/docs/bytes_add.md @@ -9,6 +9,7 @@ usage: | Add specified bytes to the input. feature: default --- + # {{ $frontmatter.title }} for bytes @@ -17,31 +18,32 @@ feature: default ## Signature -```> bytes add {flags} (data) ...rest``` +`> bytes add {flags} (data) ...rest` ## 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 - - `data`: The binary to add. - - `...rest`: For a data structure input, add bytes to the data at the given cell paths. - +- `data`: The binary to add. +- `...rest`: For a data structure input, add bytes to the data at the given cell paths. ## Input/output types: -| input | output | -| ------------ | ------------ | -| binary | binary | +| input | output | +| -------------- | -------------- | +| binary | binary | | list\ | list\ | -| record | record | -| table | table | +| record | record | +| table | table | + ## Examples Add bytes `0x[AA]` to `0x[1F FF AA AA]` -```nu + +```nushell > 0x[1F FF AA AA] | bytes add 0x[AA] Length: 5 (0x5) bytes | printable whitespace ascii_other non_ascii 00000000: aa 1f ff aa aa ו××× @@ -49,7 +51,8 @@ Length: 5 (0x5) bytes | printable whitespace ascii_other non_ascii ``` Add bytes `0x[AA BB]` to `0x[1F FF AA AA]` at index 1 -```nu + +```nushell > 0x[1F FF AA AA] | bytes add 0x[AA BB] --index 1 Length: 6 (0x6) bytes | printable whitespace ascii_other non_ascii 00000000: 1f aa bb ff aa aa •××××× @@ -57,7 +60,8 @@ Length: 6 (0x6) bytes | printable whitespace ascii_other non_ascii ``` Add bytes `0x[11]` to `0x[FF AA AA]` at the end -```nu + +```nushell > 0x[FF AA AA] | bytes add 0x[11] --end Length: 4 (0x4) bytes | printable whitespace ascii_other non_ascii 00000000: ff aa aa 11 ××ו @@ -65,7 +69,8 @@ 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) -```nu + +```nushell > 0x[FF AA BB] | bytes add 0x[11 22 33] --end --index 1 Length: 6 (0x6) bytes | printable whitespace ascii_other non_ascii 00000000: ff aa 11 22 33 bb ×ו"3× diff --git a/commands/docs/bytes_at.md b/src/content/docs/commands/docs/bytes_at.md similarity index 84% rename from commands/docs/bytes_at.md rename to src/content/docs/commands/docs/bytes_at.md index c9a201faaa6..8df1ff0e702 100644 --- a/commands/docs/bytes_at.md +++ b/src/content/docs/commands/docs/bytes_at.md @@ -9,6 +9,7 @@ usage: | Get bytes defined by a range. feature: default --- + # {{ $frontmatter.title }} for bytes @@ -17,26 +18,27 @@ feature: default ## Signature -```> bytes at {flags} (range) ...rest``` +`> bytes at {flags} (range) ...rest` ## Parameters - - `range`: The range to get bytes. - - `...rest`: For a data structure input, get bytes from data at the given cell paths. - +- `range`: The range to get bytes. +- `...rest`: For a data structure input, get bytes from data at the given cell paths. ## Input/output types: -| input | output | -| ------------ | ------------ | -| binary | binary | +| input | output | +| -------------- | -------------- | +| binary | binary | | list\ | list\ | -| record | record | -| table | table | +| record | record | +| table | table | + ## Examples Get a subbytes `0x[10 01]` from the bytes `0x[33 44 55 10 01 13]` -```nu + +```nushell > 0x[33 44 55 10 01 13] | bytes at 3..<4 Length: 1 (0x1) bytes | printable whitespace ascii_other non_ascii 00000000: 10 • @@ -44,7 +46,8 @@ Length: 1 (0x1) bytes | printable whitespace ascii_other non_ascii ``` Get a subbytes `0x[10 01 13]` from the bytes `0x[33 44 55 10 01 13]` -```nu + +```nushell > 0x[33 44 55 10 01 13] | bytes at 3..6 Length: 3 (0x3) bytes | printable whitespace ascii_other non_ascii 00000000: 10 01 13 ••• @@ -52,7 +55,8 @@ Length: 3 (0x3) bytes | printable whitespace ascii_other non_ascii ``` Get the remaining characters from a starting index -```nu + +```nushell > { data: 0x[33 44 55 10 01 13] } | bytes at 3.. data ╭──────┬─────────────╮ │ data │ [16, 1, 19] │ @@ -60,7 +64,8 @@ Get the remaining characters from a starting index ``` Get the characters from the beginning until ending index -```nu + +```nushell > 0x[33 44 55 10 01 13] | bytes at ..<4 Length: 4 (0x4) bytes | printable whitespace ascii_other non_ascii 00000000: 33 44 55 10 3DU• @@ -68,7 +73,8 @@ Length: 4 (0x4) bytes | printable whitespace ascii_other non_ascii ``` Or the characters from the beginning until ending index inside a table -```nu + +```nushell > [[ColA ColB ColC]; [0x[11 12 13] 0x[14 15 16] 0x[17 18 19]]] | bytes at 1.. ColB ColC ╭───┬──────────────┬──────────┬──────────╮ │ # │ ColA │ ColB │ ColC │ diff --git a/commands/docs/bytes_build.md b/src/content/docs/commands/docs/bytes_build.md similarity index 91% rename from commands/docs/bytes_build.md rename to src/content/docs/commands/docs/bytes_build.md index 56ab9015fbb..927b261aaa5 100644 --- a/commands/docs/bytes_build.md +++ b/src/content/docs/commands/docs/bytes_build.md @@ -9,6 +9,7 @@ usage: | Create bytes from the arguments. feature: default --- + # {{ $frontmatter.title }} for bytes @@ -17,12 +18,11 @@ feature: default ## Signature -```> bytes build {flags} ...rest``` +`> bytes build {flags} ...rest` ## Parameters - - `...rest`: List of bytes. - +- `...rest`: List of bytes. ## Input/output types: @@ -33,7 +33,8 @@ feature: default ## Examples Builds binary data from 0x[01 02], 0x[03], 0x[04] -```nu + +```nushell > bytes build 0x[01 02] 0x[03] 0x[04] Length: 4 (0x4) bytes | printable whitespace ascii_other non_ascii 00000000: 01 02 03 04 •••• diff --git a/commands/docs/bytes_collect.md b/src/content/docs/commands/docs/bytes_collect.md similarity index 85% rename from commands/docs/bytes_collect.md rename to src/content/docs/commands/docs/bytes_collect.md index aebd06f1a78..174c84cec92 100644 --- a/commands/docs/bytes_collect.md +++ b/src/content/docs/commands/docs/bytes_collect.md @@ -9,6 +9,7 @@ usage: | Concatenate multiple binary into a single binary, with an optional separator between each. feature: default --- + # {{ $frontmatter.title }} for bytes @@ -17,23 +18,23 @@ feature: default ## Signature -```> bytes collect {flags} (separator)``` +`> bytes collect {flags} (separator)` ## Parameters - - `separator`: Optional separator to use when creating binary. - +- `separator`: Optional separator to use when creating binary. ## Input/output types: -| input | output | -| ------------ | ------ | +| input | output | +| -------------- | ------ | | list\ | binary | ## Examples Create a byte array from input -```nu + +```nushell > [0x[11] 0x[13 15]] | bytes collect Length: 3 (0x3) bytes | printable whitespace ascii_other non_ascii 00000000: 11 13 15 ••• @@ -41,7 +42,8 @@ Length: 3 (0x3) bytes | printable whitespace ascii_other non_ascii ``` Create a byte array from input with a separator -```nu + +```nushell > [0x[11] 0x[33] 0x[44]] | bytes collect 0x[01] Length: 5 (0x5) bytes | printable whitespace ascii_other non_ascii 00000000: 11 01 33 01 44 ••3•D diff --git a/commands/docs/bytes_ends-with.md b/src/content/docs/commands/docs/bytes_ends-with.md similarity index 79% rename from commands/docs/bytes_ends-with.md rename to src/content/docs/commands/docs/bytes_ends-with.md index 191bac84725..6df1f0bdf41 100644 --- a/commands/docs/bytes_ends-with.md +++ b/src/content/docs/commands/docs/bytes_ends-with.md @@ -9,6 +9,7 @@ usage: | Check if bytes ends with a pattern. feature: default --- + # {{ $frontmatter.title }} for bytes @@ -17,13 +18,12 @@ feature: default ## Signature -```> bytes ends-with {flags} (pattern) ...rest``` +`> bytes ends-with {flags} (pattern) ...rest` ## Parameters - - `pattern`: The pattern to match. - - `...rest`: For a data structure input, check if bytes at the given cell paths end with the pattern. - +- `pattern`: The pattern to match. +- `...rest`: For a data structure input, check if bytes at the given cell paths end with the pattern. ## Input/output types: @@ -32,22 +32,26 @@ feature: default | binary | bool | | record | record | | table | table | + ## Examples Checks if binary ends with `0x[AA]` -```nu + +```nushell > 0x[1F FF AA AA] | bytes ends-with 0x[AA] true ``` Checks if binary ends with `0x[FF AA AA]` -```nu + +```nushell > 0x[1F FF AA AA] | bytes ends-with 0x[FF AA AA] true ``` Checks if binary ends with `0x[11]` -```nu + +```nushell > 0x[1F FF AA AA] | bytes ends-with 0x[11] false ``` diff --git a/commands/docs/bytes_index-of.md b/src/content/docs/commands/docs/bytes_index-of.md similarity index 85% rename from commands/docs/bytes_index-of.md rename to src/content/docs/commands/docs/bytes_index-of.md index 6e924df2c55..cbfd204efff 100644 --- a/commands/docs/bytes_index-of.md +++ b/src/content/docs/commands/docs/bytes_index-of.md @@ -9,6 +9,7 @@ usage: | Returns start index of first occurrence of pattern in bytes, or -1 if no match. feature: default --- + # {{ $frontmatter.title }} for bytes @@ -17,18 +18,17 @@ feature: default ## Signature -```> bytes index-of {flags} (pattern) ...rest``` +`> bytes index-of {flags} (pattern) ...rest` ## 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 - - `pattern`: The pattern to find index of. - - `...rest`: For a data structure input, find the indexes at the given cell paths. - +- `pattern`: The pattern to find index of. +- `...rest`: For a data structure input, find the indexes at the given cell paths. ## Input/output types: @@ -37,22 +37,26 @@ feature: default | binary | any | | record | record | | table | table | + ## Examples Returns index of pattern in bytes -```nu + +```nushell > 0x[33 44 55 10 01 13 44 55] | bytes index-of 0x[44 55] 1 ``` Returns index of pattern, search from end -```nu + +```nushell > 0x[33 44 55 10 01 13 44 55] | bytes index-of --end 0x[44 55] 6 ``` Returns all matched index -```nu + +```nushell > 0x[33 44 55 10 01 33 44 33 44] | bytes index-of --all 0x[33 44] ╭───┬───╮ │ 0 │ 0 │ @@ -63,7 +67,8 @@ Returns all matched index ``` Returns all matched index, searching from end -```nu + +```nushell > 0x[33 44 55 10 01 33 44 33 44] | bytes index-of --all --end 0x[33 44] ╭───┬───╮ │ 0 │ 7 │ @@ -74,7 +79,8 @@ Returns all matched index, searching from end ``` Returns index of pattern for specific column -```nu + +```nushell > [[ColA ColB ColC]; [0x[11 12 13] 0x[14 15 16] 0x[17 18 19]]] | bytes index-of 0x[11] ColA ColC ╭───┬──────┬──────────────┬──────╮ │ # │ ColA │ ColB │ ColC │ diff --git a/commands/docs/bytes_length.md b/src/content/docs/commands/docs/bytes_length.md similarity index 71% rename from commands/docs/bytes_length.md rename to src/content/docs/commands/docs/bytes_length.md index c8f84c92ecd..f3d924f8638 100644 --- a/commands/docs/bytes_length.md +++ b/src/content/docs/commands/docs/bytes_length.md @@ -9,6 +9,7 @@ usage: | Output the length of any bytes in the pipeline. feature: default --- + # {{ $frontmatter.title }} for bytes @@ -17,31 +18,33 @@ feature: default ## Signature -```> bytes length {flags} ...rest``` +`> bytes length {flags} ...rest` ## Parameters - - `...rest`: For a data structure input, find the length of data at the given cell paths. - +- `...rest`: For a data structure input, find the length of data at the given cell paths. ## Input/output types: -| input | output | -| ------------ | --------- | -| binary | int | +| input | output | +| -------------- | ----------- | +| binary | int | | list\ | list\ | -| record | record | -| table | table | +| record | record | +| table | table | + ## Examples Return the length of a binary -```nu + +```nushell > 0x[1F FF AA AB] | bytes length 4 ``` Return the lengths of multiple binaries -```nu + +```nushell > [0x[1F FF AA AB] 0x[1F]] | bytes length ╭───┬───╮ │ 0 │ 4 │ diff --git a/commands/docs/bytes_remove.md b/src/content/docs/commands/docs/bytes_remove.md similarity index 87% rename from commands/docs/bytes_remove.md rename to src/content/docs/commands/docs/bytes_remove.md index fadd7fddec1..56f89b05f8b 100644 --- a/commands/docs/bytes_remove.md +++ b/src/content/docs/commands/docs/bytes_remove.md @@ -9,6 +9,7 @@ usage: | Remove bytes. feature: default --- + # {{ $frontmatter.title }} for bytes @@ -17,18 +18,17 @@ feature: default ## Signature -```> bytes remove {flags} (pattern) ...rest``` +`> bytes remove {flags} (pattern) ...rest` ## 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 - - `pattern`: The pattern to find. - - `...rest`: For a data structure input, remove bytes from data at the given cell paths. - +- `pattern`: The pattern to find. +- `...rest`: For a data structure input, remove bytes from data at the given cell paths. ## Input/output types: @@ -37,10 +37,12 @@ feature: default | binary | binary | | record | record | | table | table | + ## Examples Remove contents -```nu + +```nushell > 0x[10 AA FF AA FF] | bytes remove 0x[10 AA] Length: 3 (0x3) bytes | printable whitespace ascii_other non_ascii 00000000: ff aa ff ××× @@ -48,7 +50,8 @@ Length: 3 (0x3) bytes | printable whitespace ascii_other non_ascii ``` Remove all occurrences of find binary in record field -```nu + +```nushell > { data: 0x[10 AA 10 BB 10] } | bytes remove --all 0x[10] data ╭──────┬────────────╮ │ data │ [170, 187] │ @@ -56,7 +59,8 @@ Remove all occurrences of find binary in record field ``` Remove occurrences of find binary from end -```nu + +```nushell > 0x[10 AA 10 BB CC AA 10] | bytes remove --end 0x[10] Length: 6 (0x6) bytes | printable whitespace ascii_other non_ascii 00000000: 10 aa 10 bb cc aa •ו××× @@ -64,7 +68,8 @@ Length: 6 (0x6) bytes | printable whitespace ascii_other non_ascii ``` Remove find binary from end not found -```nu + +```nushell > 0x[10 AA 10 BB CC AA 10] | bytes remove --end 0x[11] Length: 7 (0x7) bytes | printable whitespace ascii_other non_ascii 00000000: 10 aa 10 bb cc aa 10 •ו××ו @@ -72,7 +77,8 @@ Length: 7 (0x7) bytes | printable whitespace ascii_other non_ascii ``` Remove all occurrences of find binary in table -```nu + +```nushell > [[ColA ColB ColC]; [0x[11 12 13] 0x[14 15 16] 0x[17 18 19]]] | bytes remove 0x[11] ColA ColC ╭───┬──────────┬──────────────┬──────────────╮ │ # │ ColA │ ColB │ ColC │ diff --git a/commands/docs/bytes_replace.md b/src/content/docs/commands/docs/bytes_replace.md similarity index 85% rename from commands/docs/bytes_replace.md rename to src/content/docs/commands/docs/bytes_replace.md index d35906f897a..d4b80efe88a 100644 --- a/commands/docs/bytes_replace.md +++ b/src/content/docs/commands/docs/bytes_replace.md @@ -9,6 +9,7 @@ usage: | Find and replace binary. feature: default --- + # {{ $frontmatter.title }} for bytes @@ -17,18 +18,17 @@ feature: default ## Signature -```> bytes replace {flags} (find) (replace) ...rest``` +`> bytes replace {flags} (find) (replace) ...rest` ## Flags - - `--all, -a`: replace all occurrences of find binary +- `--all, -a`: replace all occurrences of find binary ## Parameters - - `find`: The pattern to find. - - `replace`: The replacement pattern. - - `...rest`: For a data structure input, replace bytes in data at the given cell paths. - +- `find`: The pattern to find. +- `replace`: The replacement pattern. +- `...rest`: For a data structure input, replace bytes in data at the given cell paths. ## Input/output types: @@ -37,10 +37,12 @@ feature: default | binary | binary | | record | record | | table | table | + ## Examples Find and replace contents -```nu + +```nushell > 0x[10 AA FF AA FF] | bytes replace 0x[10 AA] 0x[FF] Length: 4 (0x4) bytes | printable whitespace ascii_other non_ascii 00000000: ff ff aa ff ×××× @@ -48,7 +50,8 @@ Length: 4 (0x4) bytes | printable whitespace ascii_other non_ascii ``` Find and replace all occurrences of find binary -```nu + +```nushell > 0x[10 AA 10 BB 10] | bytes replace --all 0x[10] 0x[A0] Length: 5 (0x5) bytes | printable whitespace ascii_other non_ascii 00000000: a0 aa a0 bb a0 ××××× @@ -56,7 +59,8 @@ Length: 5 (0x5) bytes | printable whitespace ascii_other non_ascii ``` Find and replace all occurrences of find binary in table -```nu + +```nushell > [[ColA ColB ColC]; [0x[11 12 13] 0x[14 15 16] 0x[17 18 19]]] | bytes replace --all 0x[11] 0x[13] ColA ColC ╭───┬──────────────┬──────────────┬──────────────╮ │ # │ ColA │ ColB │ ColC │ diff --git a/commands/docs/bytes_reverse.md b/src/content/docs/commands/docs/bytes_reverse.md similarity index 87% rename from commands/docs/bytes_reverse.md rename to src/content/docs/commands/docs/bytes_reverse.md index ef076c5be6f..0ffdeb7ffaa 100644 --- a/commands/docs/bytes_reverse.md +++ b/src/content/docs/commands/docs/bytes_reverse.md @@ -9,6 +9,7 @@ usage: | Reverse the bytes in the pipeline. feature: default --- + # {{ $frontmatter.title }} for bytes @@ -17,12 +18,11 @@ feature: default ## Signature -```> bytes reverse {flags} ...rest``` +`> bytes reverse {flags} ...rest` ## Parameters - - `...rest`: For a data structure input, reverse data at the given cell paths. - +- `...rest`: For a data structure input, reverse data at the given cell paths. ## Input/output types: @@ -31,10 +31,12 @@ feature: default | binary | binary | | record | record | | table | table | + ## Examples Reverse bytes `0x[1F FF AA AA]` -```nu + +```nushell > 0x[1F FF AA AA] | bytes reverse Length: 4 (0x4) bytes | printable whitespace ascii_other non_ascii 00000000: aa aa ff 1f ××ו @@ -42,7 +44,8 @@ Length: 4 (0x4) bytes | printable whitespace ascii_other non_ascii ``` Reverse bytes `0x[FF AA AA]` -```nu + +```nushell > 0x[FF AA AA] | bytes reverse Length: 3 (0x3) bytes | printable whitespace ascii_other non_ascii 00000000: aa aa ff ××× diff --git a/commands/docs/bytes_starts-with.md b/src/content/docs/commands/docs/bytes_starts-with.md similarity index 79% rename from commands/docs/bytes_starts-with.md rename to src/content/docs/commands/docs/bytes_starts-with.md index 1a14fdbec80..7e38fa7aaa4 100644 --- a/commands/docs/bytes_starts-with.md +++ b/src/content/docs/commands/docs/bytes_starts-with.md @@ -9,6 +9,7 @@ usage: | Check if bytes starts with a pattern. feature: default --- + # {{ $frontmatter.title }} for bytes @@ -17,13 +18,12 @@ feature: default ## Signature -```> bytes starts-with {flags} (pattern) ...rest``` +`> bytes starts-with {flags} (pattern) ...rest` ## Parameters - - `pattern`: The pattern to match. - - `...rest`: For a data structure input, check if bytes at the given cell paths start with the pattern. - +- `pattern`: The pattern to match. +- `...rest`: For a data structure input, check if bytes at the given cell paths start with the pattern. ## Input/output types: @@ -32,22 +32,26 @@ feature: default | binary | bool | | record | record | | table | table | + ## Examples Checks if binary starts with `0x[1F FF AA]` -```nu + +```nushell > 0x[1F FF AA AA] | bytes starts-with 0x[1F FF AA] true ``` Checks if binary starts with `0x[1F]` -```nu + +```nushell > 0x[1F FF AA AA] | bytes starts-with 0x[1F] true ``` Checks if binary starts with `0x[1F]` -```nu + +```nushell > 0x[1F FF AA AA] | bytes starts-with 0x[11] false ``` diff --git a/commands/docs/cal.md b/src/content/docs/commands/docs/cal.md similarity index 61% rename from commands/docs/cal.md rename to src/content/docs/commands/docs/cal.md index 772d70ee388..39d43ee8fe9 100644 --- a/commands/docs/cal.md +++ b/src/content/docs/commands/docs/cal.md @@ -9,6 +9,7 @@ usage: | Display a calendar. feature: default --- + # {{ $frontmatter.title }} for generators @@ -17,17 +18,16 @@ feature: default ## Signature -```> cal {flags} ``` +`> cal {flags} ` ## Flags - - `--year, -y`: Display the year column - - `--quarter, -q`: Display the quarter column - - `--month, -m`: Display the month column - - `--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 instead of integers - +- `--year, -y`: Display the year column +- `--quarter, -q`: Display the quarter column +- `--month, -m`: Display the month column +- `--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 instead of integers ## Input/output types: @@ -38,19 +38,22 @@ feature: default ## Examples This month's calendar -```nu + +```nushell > cal ``` The calendar for all of 2012 -```nu + +```nushell > cal --full-year 2012 ``` This month's calendar with the week starting on monday -```nu + +```nushell > cal --week-start monday ``` diff --git a/commands/docs/cd.md b/src/content/docs/commands/docs/cd.md similarity index 88% rename from commands/docs/cd.md rename to src/content/docs/commands/docs/cd.md index 340a6afd2ce..55c3c9ac8c2 100644 --- a/commands/docs/cd.md +++ b/src/content/docs/commands/docs/cd.md @@ -9,6 +9,7 @@ usage: | Change directory. feature: default --- + # {{ $frontmatter.title }} for filesystem @@ -17,12 +18,11 @@ feature: default ## Signature -```> cd {flags} (path)``` +`> cd {flags} (path)` ## Parameters - - `path`: The path to change to. - +- `path`: The path to change to. ## Input/output types: @@ -30,16 +30,19 @@ feature: default | ------- | ------- | | nothing | nothing | | string | nothing | + ## Examples Change to your home directory -```nu + +```nushell > cd ~ ``` Change to the previous working directory ($OLDPWD) -```nu + +```nushell > cd - ``` diff --git a/commands/docs/char.md b/src/content/docs/commands/docs/char.md similarity index 74% rename from commands/docs/char.md rename to src/content/docs/commands/docs/char.md index 6494ba05f85..4a83575bff1 100644 --- a/commands/docs/char.md +++ b/src/content/docs/commands/docs/char.md @@ -9,6 +9,7 @@ usage: | Output special characters (e.g., 'newline'). feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,19 +18,18 @@ feature: default ## Signature -```> char {flags} (character) ...rest``` +`> char {flags} (character) ...rest` ## 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 - - `character`: The name of the character to output. - - `...rest`: Multiple Unicode bytes. - +- `character`: The name of the character to output. +- `...rest`: Multiple Unicode bytes. ## Input/output types: @@ -40,39 +40,45 @@ feature: default ## Examples Output newline -```nu + +```nushell > char newline ``` List available characters -```nu + +```nushell > char --list ``` Output prompt character, newline and a hamburger menu character -```nu + +```nushell > (char prompt) + (char newline) + (char hamburger) ▶ ≡ ``` Output Unicode character -```nu + +```nushell > char --unicode 1f378 🍸 ``` Create Unicode from integer codepoint values -```nu + +```nushell > char --integer (0x60 + 1) (0x60 + 2) ab ``` Output multi-byte Unicode character -```nu + +```nushell > char --unicode 1F468 200D 1F466 200D 1F466 👨‍👦‍👦 ``` diff --git a/commands/docs/clear.md b/src/content/docs/commands/docs/clear.md similarity index 94% rename from commands/docs/clear.md rename to src/content/docs/commands/docs/clear.md index 3d5a4c69d15..7e5a52e9e12 100644 --- a/commands/docs/clear.md +++ b/src/content/docs/commands/docs/clear.md @@ -9,6 +9,7 @@ usage: | Clear the terminal. feature: default --- + # {{ $frontmatter.title }} for platform @@ -17,8 +18,7 @@ feature: default ## Signature -```> clear {flags} ``` - +`> clear {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Clear the terminal -```nu + +```nushell > clear ``` diff --git a/commands/docs/collect.md b/src/content/docs/commands/docs/collect.md similarity index 79% rename from commands/docs/collect.md rename to src/content/docs/commands/docs/collect.md index e2f52439d60..2fcd40c6aca 100644 --- a/commands/docs/collect.md +++ b/src/content/docs/commands/docs/collect.md @@ -9,6 +9,7 @@ usage: | Collect the stream and pass it to a block. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,16 +18,15 @@ feature: default ## Signature -```> collect {flags} (closure)``` +`> collect {flags} (closure)` ## Flags - - `--keep-env, -`: let the block affect environment variables +- `--keep-env, -`: let the block affect environment variables ## Parameters - - `closure`: The closure to run once the stream is collected. - +- `closure`: The closure to run once the stream is collected. ## Input/output types: @@ -37,7 +37,8 @@ feature: default ## Examples Use the second value in the stream -```nu + +```nushell > [1 2 3] | collect { |x| $x.1 } 2 ``` diff --git a/commands/docs/columns.md b/src/content/docs/commands/docs/columns.md similarity index 90% rename from commands/docs/columns.md rename to src/content/docs/commands/docs/columns.md index d81ffb3c271..abb1d80f221 100644 --- a/commands/docs/columns.md +++ b/src/content/docs/commands/docs/columns.md @@ -9,6 +9,7 @@ usage: | Given a record or table, produce a list of its columns' names. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,19 +18,20 @@ feature: default ## Signature -```> columns {flags} ``` - +`> columns {flags} ` ## Input/output types: -| input | output | -| ------ | ------------ | +| input | output | +| ------ | -------------- | | record | list\ | | table | list\ | + ## Examples Get the columns from the record -```nu + +```nushell > { acronym:PWD, meaning:'Print Working Directory' } | columns ╭───┬─────────╮ │ 0 │ acronym │ @@ -39,7 +41,8 @@ Get the columns from the record ``` Get the columns from the table -```nu + +```nushell > [[name,age,grade]; [bill,20,a]] | columns ╭───┬───────╮ │ 0 │ name │ @@ -50,16 +53,19 @@ Get the columns from the table ``` Get the first column from the table -```nu + +```nushell > [[name,age,grade]; [bill,20,a]] | columns | first ``` Get the second column from the table -```nu + +```nushell > [[name,age,grade]; [bill,20,a]] | columns | select 1 ``` ## Notes -This is a counterpart to `values`, which produces a list of columns' values. \ No newline at end of file + +This is a counterpart to `values`, which produces a list of columns' values. diff --git a/commands/docs/commandline.md b/src/content/docs/commands/docs/commandline.md similarity index 55% rename from commands/docs/commandline.md rename to src/content/docs/commands/docs/commandline.md index 8994ea3b427..ebb9093a4ed 100644 --- a/commands/docs/commandline.md +++ b/src/content/docs/commands/docs/commandline.md @@ -9,6 +9,7 @@ usage: | View or modify the current command line input buffer. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,24 +18,23 @@ feature: default ## Signature -```> commandline {flags} (cmd)``` +`> commandline {flags} (cmd)` ## Flags - - `--cursor, -c`: Set or get the current cursor position - - `--cursor-end, -e`: Set the current cursor position to the end of the buffer - - `--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) +- `--cursor, -c`: Set or get the current cursor position +- `--cursor-end, -e`: Set the current cursor position to the end of the buffer +- `--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) ## Parameters - - `cmd`: the string to perform the operation with - +- `cmd`: the string to perform the operation with ## Input/output types: | input | output | | ------- | ------- | | nothing | nothing | -| string | string | \ No newline at end of file +| string | string | diff --git a/commands/docs/compact.md b/src/content/docs/commands/docs/compact.md similarity index 85% rename from commands/docs/compact.md rename to src/content/docs/commands/docs/compact.md index 98f5fd00a30..984af4e1651 100644 --- a/commands/docs/compact.md +++ b/src/content/docs/commands/docs/compact.md @@ -9,6 +9,7 @@ usage: | Creates a table with non-empty rows. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,27 +18,27 @@ feature: default ## Signature -```> compact {flags} ...rest``` +`> compact {flags} ...rest` ## Flags - - `--empty, -e`: also compact empty items like "", {}, and [] +- `--empty, -e`: also compact empty items like "", {}, and [] ## Parameters - - `...rest`: The columns to compact from the table. - +- `...rest`: The columns to compact from the table. ## Input/output types: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | ## Examples Filter out all records where 'Hello' is null -```nu + +```nushell > [["Hello" "World"]; [null 3]] | compact Hello ╭────────────╮ │ empty list │ @@ -45,7 +46,8 @@ Filter out all records where 'Hello' is null ``` Filter out all records where 'World' is null -```nu + +```nushell > [["Hello" "World"]; [null 3]] | compact World ╭───┬───────┬───────╮ │ # │ Hello │ World │ @@ -56,7 +58,8 @@ Filter out all records where 'World' is null ``` Filter out all instances of null from a list -```nu + +```nushell > [1, null, 2] | compact ╭───┬───╮ │ 0 │ 1 │ @@ -66,7 +69,8 @@ Filter out all instances of null from a list ``` Filter out all instances of null and empty items from a list -```nu + +```nushell > [1, null, 2, "", 3, [], 4, {}, 5] | compact --empty ╭───┬───╮ │ 0 │ 1 │ diff --git a/commands/docs/complete.md b/src/content/docs/commands/docs/complete.md similarity index 90% rename from commands/docs/complete.md rename to src/content/docs/commands/docs/complete.md index a1278b94cb9..f87618b0c3f 100644 --- a/commands/docs/complete.md +++ b/src/content/docs/commands/docs/complete.md @@ -9,6 +9,7 @@ usage: | Capture the outputs and exit code from an external piped in command in a nushell table. feature: default --- + # {{ $frontmatter.title }} for system @@ -17,8 +18,7 @@ feature: default ## Signature -```> complete {flags} ``` - +`> complete {flags} ` ## Input/output types: @@ -29,16 +29,19 @@ feature: default ## Examples Run the external command to completion, capturing stdout and exit_code -```nu + +```nushell > ^external arg1 | complete ``` Run external command to completion, capturing, stdout, stderr and exit_code -```nu + +```nushell > do { ^external arg1 } | complete ``` ## Notes -In order to capture stdout, stderr, and exit_code, externally piped in commands need to be wrapped with `do` \ No newline at end of file + +In order to capture stdout, stderr, and exit_code, externally piped in commands need to be wrapped with `do` diff --git a/commands/docs/config.md b/src/content/docs/commands/docs/config.md similarity index 98% rename from commands/docs/config.md rename to src/content/docs/commands/docs/config.md index 46354a9a887..d87656145e3 100644 --- a/commands/docs/config.md +++ b/src/content/docs/commands/docs/config.md @@ -9,6 +9,7 @@ usage: | Edit nushell configuration files. feature: default --- + # {{ $frontmatter.title }} for env @@ -17,8 +18,7 @@ feature: default ## Signature -```> config {flags} ``` - +`> config {flags} ` ## Input/output types: @@ -27,6 +27,7 @@ feature: default | nothing | string | ## Notes + You must use one of the following subcommands. Using this command as-is will only produce this help message. ## Subcommands: @@ -35,4 +36,4 @@ You must use one of the following subcommands. Using this command as-is will onl | ------------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------- | | [`config env`](/commands/docs/config_env.md) | Builtin | Edit nu environment configurations. | | [`config nu`](/commands/docs/config_nu.md) | Builtin | Edit nu configurations. | -| [`config reset`](/commands/docs/config_reset.md) | Builtin | Reset nushell environment configurations to default, and saves old config files in the config location as oldconfig.nu and oldenv.nu. | \ No newline at end of file +| [`config reset`](/commands/docs/config_reset.md) | Builtin | Reset nushell environment configurations to default, and saves old config files in the config location as oldconfig.nu and oldenv.nu. | diff --git a/commands/docs/config_env.md b/src/content/docs/commands/docs/config_env.md similarity index 86% rename from commands/docs/config_env.md rename to src/content/docs/commands/docs/config_env.md index 48db2a93069..b586a8ec260 100644 --- a/commands/docs/config_env.md +++ b/src/content/docs/commands/docs/config_env.md @@ -9,6 +9,7 @@ usage: | Edit nu environment configurations. feature: default --- + # {{ $frontmatter.title }} for env @@ -17,12 +18,11 @@ feature: default ## Signature -```> config env {flags} ``` +`> config env {flags} ` ## Flags - - `--default, -d`: Print default `env.nu` file instead. - +- `--default, -d`: Print default `env.nu` file instead. ## Input/output types: @@ -33,19 +33,22 @@ feature: default ## Examples allow user to open and update nu env -```nu + +```nushell > config env ``` allow user to print default `env.nu` file -```nu + +```nushell > config env --default, ``` allow saving the default `env.nu` locally -```nu + +```nushell > config env --default | save -f ~/.config/nushell/default_env.nu ``` diff --git a/commands/docs/config_nu.md b/src/content/docs/commands/docs/config_nu.md similarity index 86% rename from commands/docs/config_nu.md rename to src/content/docs/commands/docs/config_nu.md index 52e1d026fc8..e19f5a47ad1 100644 --- a/commands/docs/config_nu.md +++ b/src/content/docs/commands/docs/config_nu.md @@ -9,6 +9,7 @@ usage: | Edit nu configurations. feature: default --- + # {{ $frontmatter.title }} for env @@ -17,12 +18,11 @@ feature: default ## Signature -```> config nu {flags} ``` +`> config nu {flags} ` ## Flags - - `--default, -d`: Print default `config.nu` file instead. - +- `--default, -d`: Print default `config.nu` file instead. ## Input/output types: @@ -33,19 +33,22 @@ feature: default ## Examples allow user to open and update nu config -```nu + +```nushell > config nu ``` allow user to print default `config.nu` file -```nu + +```nushell > config nu --default, ``` allow saving the default `config.nu` locally -```nu + +```nushell > config nu --default | save -f ~/.config/nushell/default_config.nu ``` diff --git a/commands/docs/config_reset.md b/src/content/docs/commands/docs/config_reset.md similarity index 81% rename from commands/docs/config_reset.md rename to src/content/docs/commands/docs/config_reset.md index 0402831170e..0f03c23e5ed 100644 --- a/commands/docs/config_reset.md +++ b/src/content/docs/commands/docs/config_reset.md @@ -9,6 +9,7 @@ usage: | Reset nushell environment configurations to default, and saves old config files in the config location as oldconfig.nu and oldenv.nu. feature: default --- + # {{ $frontmatter.title }} for env @@ -17,14 +18,13 @@ feature: default ## Signature -```> config reset {flags} ``` +`> config reset {flags} ` ## 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: @@ -35,7 +35,8 @@ feature: default ## Examples reset nushell configuration files -```nu + +```nushell > config reset ``` diff --git a/commands/docs/const.md b/src/content/docs/commands/docs/const.md similarity index 77% rename from commands/docs/const.md rename to src/content/docs/commands/docs/const.md index 9ed1c805a14..099c5752138 100644 --- a/commands/docs/const.md +++ b/src/content/docs/commands/docs/const.md @@ -9,6 +9,7 @@ usage: | Create a parse-time constant. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,13 +18,12 @@ feature: default ## Signature -```> const {flags} (const_name) (initial_value)``` +`> const {flags} (const_name) (initial_value)` ## Parameters - - `const_name`: Constant name. - - `initial_value`: Equals sign followed by constant value. - +- `const_name`: Constant name. +- `initial_value`: Equals sign followed by constant value. ## Input/output types: @@ -34,17 +34,20 @@ feature: default ## Examples Create a new parse-time constant. -```nu + +```nushell > const x = 10 ``` Create a composite constant value -```nu + +```nushell > const x = { a: 10, b: 20 } ``` ## 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 +https://www.nushell.sh/book/thinking_in_nu.html diff --git a/commands/docs/continue.md b/src/content/docs/commands/docs/continue.md similarity index 94% rename from commands/docs/continue.md rename to src/content/docs/commands/docs/continue.md index 44301220867..36fa571287e 100644 --- a/commands/docs/continue.md +++ b/src/content/docs/commands/docs/continue.md @@ -9,6 +9,7 @@ usage: | Continue a loop from the next iteration. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,8 +18,7 @@ feature: default ## Signature -```> continue {flags} ``` - +`> continue {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Continue a loop from the next iteration -```nu + +```nushell > for i in 1..10 { if $i == 5 { continue }; print $i } ``` diff --git a/src/content/docs/commands/docs/cp.md b/src/content/docs/commands/docs/cp.md new file mode 100644 index 00000000000..08c0763cd60 --- /dev/null +++ b/src/content/docs/commands/docs/cp.md @@ -0,0 +1,98 @@ +--- +title: cp +categories: | + filesystem +version: 0.90.0 +filesystem: | + Copy files using uutils/coreutils cp. +usage: | + Copy files using uutils/coreutils cp. +feature: default +--- + + + +# {{ $frontmatter.title }} for filesystem + +
{{ $frontmatter.filesystem }}
+ +## Signature + +`> cp {flags} ...rest` + +## 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 + 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) + 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 + +## Parameters + +- `...rest`: Copy SRC file/s to DEST. + +## Input/output types: + +| input | output | +| ------- | ------- | +| nothing | nothing | + +## Examples + +Copy myfile to dir_b + +```nushell +> cp myfile dir_b + +``` + +Recursively copy dir_a to dir_b + +```nushell +> cp -r dir_a dir_b + +``` + +Recursively copy dir_a to dir_b, and print the feedbacks + +```nushell +> cp -r -v dir_a dir_b + +``` + +Move many files into a directory + +```nushell +> cp *.txt dir_a + +``` + +Copy only if source file is newer than target file + +```nushell +> cp -u a b + +``` + +Copy file preserving mode and timestamps attributes + +```nushell +> cp --preserve [ mode timestamps ] a b + +``` + +Copy file erasing all attributes + +```nushell +> cp --preserve [] a b + +``` diff --git a/commands/docs/date.md b/src/content/docs/commands/docs/date.md similarity index 98% rename from commands/docs/date.md rename to src/content/docs/commands/docs/date.md index 5598046bd69..92b83c8256c 100644 --- a/commands/docs/date.md +++ b/src/content/docs/commands/docs/date.md @@ -9,6 +9,7 @@ usage: | Date-related commands. feature: default --- + # {{ $frontmatter.title }} for date @@ -17,8 +18,7 @@ feature: default ## Signature -```> date {flags} ``` - +`> date {flags} ` ## Input/output types: @@ -27,6 +27,7 @@ feature: default | nothing | string | ## Notes + You must use one of the following subcommands. Using this command as-is will only produce this help message. ## Subcommands: @@ -39,4 +40,4 @@ You must use one of the following subcommands. Using this command as-is will onl | [`date now`](/commands/docs/date_now.md) | Builtin | Get the current date. | | [`date to-record`](/commands/docs/date_to-record.md) | Builtin | Convert the date into a record. | | [`date to-table`](/commands/docs/date_to-table.md) | Builtin | Convert the date into a structured table. | -| [`date to-timezone`](/commands/docs/date_to-timezone.md) | Builtin | Convert a date to a given time zone. | \ No newline at end of file +| [`date to-timezone`](/commands/docs/date_to-timezone.md) | Builtin | Convert a date to a given time zone. | diff --git a/commands/docs/date_format.md b/src/content/docs/commands/docs/date_format.md similarity index 78% rename from commands/docs/date_format.md rename to src/content/docs/commands/docs/date_format.md index b7f5fae9201..2b326044c37 100644 --- a/commands/docs/date_format.md +++ b/src/content/docs/commands/docs/date_format.md @@ -9,6 +9,7 @@ usage: | Removed command: use `format date` instead. feature: default --- + # {{ $frontmatter.title }} for removed @@ -17,20 +18,19 @@ feature: default ## Signature -```> date format {flags} (format string)``` +`> date format {flags} (format string)` ## Flags - - `--list, -l`: lists strftime cheatsheet +- `--list, -l`: lists strftime cheatsheet ## Parameters - - `format string`: The desired date format. - +- `format string`: The desired date format. ## Input/output types: | input | output | | -------- | ------ | | datetime | string | -| string | string | \ No newline at end of file +| string | string | diff --git a/commands/docs/date_humanize.md b/src/content/docs/commands/docs/date_humanize.md similarity index 94% rename from commands/docs/date_humanize.md rename to src/content/docs/commands/docs/date_humanize.md index 196d96a99d1..b2499d41b1f 100644 --- a/commands/docs/date_humanize.md +++ b/src/content/docs/commands/docs/date_humanize.md @@ -9,6 +9,7 @@ usage: | Print a 'humanized' format for the date, relative to now. feature: default --- + # {{ $frontmatter.title }} for date @@ -17,8 +18,7 @@ feature: default ## Signature -```> date humanize {flags} ``` - +`> date humanize {flags} ` ## Input/output types: @@ -26,10 +26,12 @@ feature: default | -------- | ------ | | datetime | string | | string | string | + ## Examples Print a 'humanized' format for the date, relative to now. -```nu + +```nushell > "2021-10-22 20:00:12 +01:00" | date humanize ``` diff --git a/commands/docs/date_list-timezone.md b/src/content/docs/commands/docs/date_list-timezone.md similarity index 95% rename from commands/docs/date_list-timezone.md rename to src/content/docs/commands/docs/date_list-timezone.md index 7e09b2f7fa0..4d560498a54 100644 --- a/commands/docs/date_list-timezone.md +++ b/src/content/docs/commands/docs/date_list-timezone.md @@ -9,6 +9,7 @@ usage: | List supported time zones. feature: default --- + # {{ $frontmatter.title }} for date @@ -17,8 +18,7 @@ feature: default ## Signature -```> date list-timezone {flags} ``` - +`> date list-timezone {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Show timezone(s) that contains 'Shanghai' -```nu + +```nushell > date list-timezone | where timezone =~ Shanghai ╭───┬───────────────╮ │ # │ timezone │ diff --git a/commands/docs/date_now.md b/src/content/docs/commands/docs/date_now.md similarity index 92% rename from commands/docs/date_now.md rename to src/content/docs/commands/docs/date_now.md index bce0881bcbf..2a898fe295f 100644 --- a/commands/docs/date_now.md +++ b/src/content/docs/commands/docs/date_now.md @@ -9,6 +9,7 @@ usage: | Get the current date. feature: default --- + # {{ $frontmatter.title }} for date @@ -17,8 +18,7 @@ feature: default ## Signature -```> date now {flags} ``` - +`> date now {flags} ` ## Input/output types: @@ -29,25 +29,29 @@ feature: default ## Examples Get the current date and display it in a given format string. -```nu + +```nushell > date now | format date "%Y-%m-%d %H:%M:%S" ``` Get the time duration from 2019-04-30 to now -```nu + +```nushell > (date now) - 2019-05-01 ``` Get the time duration since a more accurate time -```nu + +```nushell > (date now) - 2019-05-01T04:12:05.20+08:00 ``` Get current time in full RFC3339 format with timezone -```nu + +```nushell > date now | debug ``` diff --git a/commands/docs/date_to-record.md b/src/content/docs/commands/docs/date_to-record.md similarity index 95% rename from commands/docs/date_to-record.md rename to src/content/docs/commands/docs/date_to-record.md index b839b7c67f6..a27a1d18238 100644 --- a/commands/docs/date_to-record.md +++ b/src/content/docs/commands/docs/date_to-record.md @@ -9,6 +9,7 @@ usage: | Convert the date into a record. feature: default --- + # {{ $frontmatter.title }} for date @@ -17,8 +18,7 @@ feature: default ## Signature -```> date to-record {flags} ``` - +`> date to-record {flags} ` ## Input/output types: @@ -26,22 +26,26 @@ feature: default | -------- | ------ | | datetime | record | | string | record | + ## Examples Convert the current date into a record. -```nu + +```nushell > date to-record ``` Convert the current date into a record. -```nu + +```nushell > date now | date to-record ``` Convert a date string into a record. -```nu + +```nushell > '2020-04-12T22:10:57.123+02:00' | date to-record ╭────────────┬───────────╮ │ year │ 2020 │ @@ -56,7 +60,8 @@ Convert a date string into a record. ``` Convert a date into a record. -```nu + +```nushell > '2020-04-12 22:10:57 +0200' | into datetime | date to-record ╭────────────┬────────╮ │ year │ 2020 │ diff --git a/commands/docs/date_to-table.md b/src/content/docs/commands/docs/date_to-table.md similarity index 97% rename from commands/docs/date_to-table.md rename to src/content/docs/commands/docs/date_to-table.md index d6a951cef36..7bdcdd64cd4 100644 --- a/commands/docs/date_to-table.md +++ b/src/content/docs/commands/docs/date_to-table.md @@ -9,6 +9,7 @@ usage: | Convert the date into a structured table. feature: default --- + # {{ $frontmatter.title }} for date @@ -17,8 +18,7 @@ feature: default ## Signature -```> date to-table {flags} ``` - +`> date to-table {flags} ` ## Input/output types: @@ -26,22 +26,26 @@ feature: default | -------- | ------ | | datetime | table | | string | table | + ## Examples Convert the current date into a table. -```nu + +```nushell > date to-table ``` Convert the date into a table. -```nu + +```nushell > date now | date to-table ``` Convert a given date into a table. -```nu + +```nushell > 2020-04-12T22:10:57.000000789+02:00 | date to-table ╭───┬──────┬───────┬─────┬──────┬────────┬────────┬────────────┬──────────╮ │ # │ year │ month │ day │ hour │ minute │ second │ nanosecond │ timezone │ @@ -52,7 +56,8 @@ Convert a given date into a table. ``` Convert a given date into a table. -```nu + +```nushell > '2020-04-12 22:10:57 +0200' | into datetime | date to-table ╭───┬──────┬───────┬─────┬──────┬────────┬────────┬────────────┬──────────╮ │ # │ year │ month │ day │ hour │ minute │ second │ nanosecond │ timezone │ diff --git a/commands/docs/date_to-timezone.md b/src/content/docs/commands/docs/date_to-timezone.md similarity index 84% rename from commands/docs/date_to-timezone.md rename to src/content/docs/commands/docs/date_to-timezone.md index 2452b3c25a8..29cca293e94 100644 --- a/commands/docs/date_to-timezone.md +++ b/src/content/docs/commands/docs/date_to-timezone.md @@ -9,6 +9,7 @@ usage: | Convert a date to a given time zone. feature: default --- + # {{ $frontmatter.title }} for date @@ -17,12 +18,11 @@ feature: default ## Signature -```> date to-timezone {flags} (time zone)``` +`> date to-timezone {flags} (time zone)` ## Parameters - - `time zone`: Time zone description. - +- `time zone`: Time zone description. ## Input/output types: @@ -30,37 +30,44 @@ feature: default | -------- | -------- | | datetime | datetime | | string | datetime | + ## Examples Get the current date in UTC+05:00 -```nu + +```nushell > date now | date to-timezone '+0500' ``` Get the current local date -```nu + +```nushell > date now | date to-timezone local ``` Get the current date in Hawaii -```nu + +```nushell > date now | date to-timezone US/Hawaii ``` Get the current date in Hawaii -```nu + +```nushell > "2020-10-10 10:00:00 +02:00" | date to-timezone "+0500" Sat, 10 Oct 2020 13:00:00 +0500 (3 years ago) ``` Get the current date in Hawaii, from a datetime object -```nu + +```nushell > "2020-10-10 10:00:00 +02:00" | into datetime | date to-timezone "+0500" Sat, 10 Oct 2020 13:00:00 +0500 (3 years ago) ``` ## Notes -Use 'date list-timezone' to list all supported time zones. \ No newline at end of file + +Use 'date list-timezone' to list all supported time zones. diff --git a/commands/docs/debug.md b/src/content/docs/commands/docs/debug.md similarity index 87% rename from commands/docs/debug.md rename to src/content/docs/commands/docs/debug.md index c07d55c1be1..1e25aac642a 100644 --- a/commands/docs/debug.md +++ b/src/content/docs/commands/docs/debug.md @@ -9,6 +9,7 @@ usage: | Debug print the value(s) piped in. feature: default --- + # {{ $frontmatter.title }} for debug @@ -17,29 +18,31 @@ feature: default ## Signature -```> debug {flags} ``` +`> debug {flags} ` ## Flags - - `--raw, -r`: Prints the raw value representation - +- `--raw, -r`: Prints the raw value representation ## Input/output types: -| input | output | -| --------- | ------------ | -| any | string | +| input | output | +| ----------- | -------------- | +| any | string | | list\ | list\ | + ## Examples Debug print a string -```nu + +```nushell > 'hello' | debug hello ``` Debug print a list -```nu + +```nushell > ['hello'] | debug ╭───┬───────╮ │ 0 │ hello │ @@ -48,7 +51,8 @@ Debug print a list ``` Debug print a table -```nu + +```nushell > [[version patch]; ['0.1.0' false] ['0.1.1' true] ['0.2.0' false]] | debug ╭───┬────────────────────────────────╮ │ 0 │ {version: 0.1.0, patch: false} │ @@ -58,7 +62,6 @@ Debug print a table ``` - ## Subcommands: | name | type | usage | diff --git a/commands/docs/debug_info.md b/src/content/docs/commands/docs/debug_info.md similarity index 94% rename from commands/docs/debug_info.md rename to src/content/docs/commands/docs/debug_info.md index 64d547a8ffc..50116f64154 100644 --- a/commands/docs/debug_info.md +++ b/src/content/docs/commands/docs/debug_info.md @@ -9,6 +9,7 @@ usage: | View process memory info. feature: default --- + # {{ $frontmatter.title }} for debug @@ -17,8 +18,7 @@ feature: default ## Signature -```> debug info {flags} ``` - +`> debug info {flags} ` ## Input/output types: @@ -29,11 +29,13 @@ feature: default ## Examples View process information -```nu + +```nushell > debug info ``` ## Notes + This command is meant for debugging purposes. -It shows you the process information and system memory information. \ No newline at end of file +It shows you the process information and system memory information. diff --git a/commands/docs/decode.md b/src/content/docs/commands/docs/decode.md similarity index 91% rename from commands/docs/decode.md rename to src/content/docs/commands/docs/decode.md index 4c208cc8a80..f9e51e0f076 100644 --- a/commands/docs/decode.md +++ b/src/content/docs/commands/docs/decode.md @@ -9,6 +9,7 @@ usage: | Decode bytes into a string. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,12 +18,11 @@ feature: default ## Signature -```> decode {flags} (encoding)``` +`> decode {flags} (encoding)` ## Parameters - - `encoding`: The text encoding to use. - +- `encoding`: The text encoding to use. ## Input/output types: @@ -33,18 +33,21 @@ feature: default ## Examples Decode the output of an external command -```nu + +```nushell > ^cat myfile.q | decode utf-8 ``` Decode an UTF-16 string into nushell UTF-8 string -```nu + +```nushell > 0x[00 53 00 6F 00 6D 00 65 00 20 00 44 00 61 00 74 00 61] | decode utf-16be Some Data ``` ## Notes + Multiple encodings are supported; here are a few: big5, euc-jp, euc-kr, gbk, iso-8859-1, utf-16, cp1252, latin5 @@ -56,4 +59,4 @@ documentation link at https://docs.rs/encoding_rs/latest/encoding_rs/#statics | name | type | usage | | -------------------------------------------------- | ------- | ---------------------- | | [`decode base64`](/commands/docs/decode_base64.md) | Builtin | Base64 decode a value. | -| [`decode hex`](/commands/docs/decode_hex.md) | Builtin | Hex decode a value. | \ No newline at end of file +| [`decode hex`](/commands/docs/decode_hex.md) | Builtin | Hex decode a value. | diff --git a/commands/docs/decode_base64.md b/src/content/docs/commands/docs/decode_base64.md similarity index 57% rename from commands/docs/decode_base64.md rename to src/content/docs/commands/docs/decode_base64.md index abe0ce060f7..7243ec000b0 100644 --- a/commands/docs/decode_base64.md +++ b/src/content/docs/commands/docs/decode_base64.md @@ -9,6 +9,7 @@ usage: | Base64 decode a value. feature: default --- + # {{ $frontmatter.title }} for hash @@ -17,37 +18,39 @@ feature: default ## Signature -```> decode base64 {flags} ...rest``` +`> decode base64 {flags} ...rest` ## Flags - - `--character-set, -c {string}`: specify the character rules for encoding the input. - Valid values are 'standard', 'standard-no-padding', 'url-safe', 'url-safe-no-padding','binhex', 'bcrypt', 'crypt', 'mutf7' - - `--binary, -b`: Output a binary value instead of decoding payload as UTF-8 +- `--character-set, -c {string}`: specify the character rules for encoding the input. + Valid values are 'standard', 'standard-no-padding', 'url-safe', 'url-safe-no-padding','binhex', 'bcrypt', 'crypt', 'mutf7' +- `--binary, -b`: Output a binary value instead of decoding payload as UTF-8 ## Parameters - - `...rest`: For a data structure input, decode data at the given cell paths. - +- `...rest`: For a data structure input, decode data at the given cell paths. ## Input/output types: -| input | output | -| ------------ | --------- | +| input | output | +| -------------- | ----------- | | list\ | list\ | -| record | record | -| string | any | -| table | table | +| record | record | +| string | any | +| table | table | + ## Examples Base64 decode a value and output as UTF-8 string -```nu + +```nushell > 'U29tZSBEYXRh' | decode base64 Some Data ``` Base64 decode a value and output as binary -```nu + +```nushell > 'U29tZSBEYXRh' | decode base64 --binary Length: 9 (0x9) bytes | printable whitespace ascii_other non_ascii 00000000: 53 6f 6d 65 20 44 61 74 61 Some Data @@ -55,4 +58,5 @@ Length: 9 (0x9) bytes | printable whitespace ascii_other non_ascii ``` ## Notes -Will attempt to decode binary payload as an UTF-8 string by default. Use the `--binary(-b)` argument to force binary output. \ No newline at end of file + +Will attempt to decode binary payload as an UTF-8 string by default. Use the `--binary(-b)` argument to force binary output. diff --git a/commands/docs/decode_hex.md b/src/content/docs/commands/docs/decode_hex.md similarity index 68% rename from commands/docs/decode_hex.md rename to src/content/docs/commands/docs/decode_hex.md index ea786ade98e..2ec87114d94 100644 --- a/commands/docs/decode_hex.md +++ b/src/content/docs/commands/docs/decode_hex.md @@ -9,37 +9,39 @@ usage: | Hex decode a value. feature: extra --- + # {{ $frontmatter.title }} for formats
{{ $frontmatter.formats }}
- ::: warning - Command `decode hex` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `decode hex` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> decode hex {flags} ...rest``` +`> decode hex {flags} ...rest` ## Parameters - - `...rest`: For a data structure input, decode data at the given cell paths - +- `...rest`: For a data structure input, decode data at the given cell paths ## Input/output types: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| record | record | -| string | binary | -| table | table | +| record | record | +| string | binary | +| table | table | + ## Examples Hex decode a value and output as binary -```nu + +```nushell > '0102030A0a0B' | decode hex Length: 6 (0x6) bytes | printable whitespace ascii_other non_ascii 00000000: 01 02 03 0a 0a 0b •••__• @@ -47,7 +49,8 @@ Length: 6 (0x6) bytes | printable whitespace ascii_other non_ascii ``` Whitespaces are allowed to be between hex digits -```nu + +```nushell > '01 02 03 0A 0a 0B' | decode hex Length: 6 (0x6) bytes | printable whitespace ascii_other non_ascii 00000000: 01 02 03 0a 0a 0b •••__• diff --git a/commands/docs/def.md b/src/content/docs/commands/docs/def.md similarity index 73% rename from commands/docs/def.md rename to src/content/docs/commands/docs/def.md index f8021eee727..f3a03ace35f 100644 --- a/commands/docs/def.md +++ b/src/content/docs/commands/docs/def.md @@ -9,6 +9,7 @@ usage: | Define a custom command. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,19 +18,18 @@ feature: default ## Signature -```> def {flags} (def_name) (params) (block)``` +`> def {flags} (def_name) (params) (block)` ## 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`: Command name. +- `params`: Parameters. +- `block`: Body of the definition. ## Input/output types: @@ -40,25 +40,29 @@ feature: default ## Examples Define a command and run it -```nu + +```nushell > def say-hi [] { echo 'hi' }; say-hi hi ``` Define a command and run it with parameter(s) -```nu + +```nushell > def say-sth [sth: string] { echo $sth }; say-sth hi hi ``` Set environment variable by call a custom command -```nu + +```nushell > def --env foo [] { $env.BAR = "BAZ" }; foo; $env.BAR BAZ ``` Define a custom wrapper for an external command -```nu + +```nushell > def --wrapped my-echo [...rest] { echo $rest }; my-echo spam ╭───┬──────╮ │ 0 │ spam │ @@ -67,5 +71,6 @@ Define a custom wrapper for an external command ``` ## 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 +https://www.nushell.sh/book/thinking_in_nu.html diff --git a/commands/docs/default.md b/src/content/docs/commands/docs/default.md similarity index 84% rename from commands/docs/default.md rename to src/content/docs/commands/docs/default.md index ec6fd4f5e45..2d4e2f21cbc 100644 --- a/commands/docs/default.md +++ b/src/content/docs/commands/docs/default.md @@ -9,6 +9,7 @@ usage: | Sets a default row's column if missing. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,13 +18,12 @@ feature: default ## Signature -```> default {flags} (default value) (column name)``` +`> default {flags} (default value) (column name)` ## Parameters - - `default value`: The value to use as a default. - - `column name`: The name of the column. - +- `default value`: The value to use as a default. +- `column name`: The name of the column. ## Input/output types: @@ -34,19 +34,22 @@ feature: default ## Examples Give a default 'target' column to all file entries -```nu + +```nushell > ls -la | default 'nothing' target ``` Get the env value of `MY_ENV` with a default value 'abc' if not present -```nu + +```nushell > $env | get --ignore-errors MY_ENV | default 'abc' ``` Replace the `null` value in a list -```nu + +```nushell > [1, 2, null, 4] | default 3 ╭───┬───╮ │ 0 │ 1 │ diff --git a/commands/docs/describe.md b/src/content/docs/commands/docs/describe.md similarity index 95% rename from commands/docs/describe.md rename to src/content/docs/commands/docs/describe.md index c7c52d9e7ec..9d8b8ddd998 100644 --- a/commands/docs/describe.md +++ b/src/content/docs/commands/docs/describe.md @@ -9,6 +9,7 @@ usage: | Describe the type and structure of the value(s) piped in. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,14 +18,13 @@ feature: default ## Signature -```> describe {flags} ``` +`> describe {flags} ` ## Flags - - `--no-collect, -n`: do not collect streams of structured data - - `--detailed, -d`: show detailed information about the value - - `--collect-lazyrecords, -l`: collect lazy records - +- `--no-collect, -n`: do not collect streams of structured data +- `--detailed, -d`: show detailed information about the value +- `--collect-lazyrecords, -l`: collect lazy records ## Input/output types: @@ -35,13 +35,15 @@ feature: default ## Examples Describe the type of a string -```nu + +```nushell > 'hello' | describe string ``` Describe the type of a record in a detailed way -```nu + +```nushell > {shell:'true', uwu:true, features: {bugs:false, multiplatform:true, speed: 10}, fib: [1 1 2 3 5 8], on_save: {|x| print $'Saving ($x)'}, first_commit: 2019-05-10, my_duration: (4min + 20sec)} | describe -d ╭─────────┬───────────────────────────────────────────────────────────╮ │ type │ record │ @@ -84,19 +86,22 @@ Describe the type of a record in a detailed way ``` Describe the type of a stream with detailed information -```nu + +```nushell > [1 2 3] | each {|i| echo $i} | describe -d ``` Describe a stream of data, collecting it first -```nu + +```nushell > [1 2 3] | each {|i| echo $i} | describe ``` Describe the input but do not collect streams -```nu + +```nushell > [1 2 3] | each {|i| echo $i} | describe --no-collect ``` diff --git a/commands/docs/detect_columns.md b/src/content/docs/commands/docs/detect_columns.md similarity index 85% rename from commands/docs/detect_columns.md rename to src/content/docs/commands/docs/detect_columns.md index 7c10d76bf3f..8ce8dc67ade 100644 --- a/commands/docs/detect_columns.md +++ b/src/content/docs/commands/docs/detect_columns.md @@ -9,6 +9,7 @@ usage: | Attempt to automatically split text into multiple columns. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,14 +18,13 @@ feature: default ## Signature -```> detect columns {flags} ``` +`> detect columns {flags} ` ## Flags - - `--skip, -s {int}`: number of rows to skip before detecting - - `--no-headers, -n`: don't detect headers - - `--combine-columns, -c {range}`: columns to be combined; listed as a range - +- `--skip, -s {int}`: number of rows to skip before detecting +- `--no-headers, -n`: don't detect headers +- `--combine-columns, -c {range}`: columns to be combined; listed as a range ## Input/output types: @@ -35,7 +35,8 @@ feature: default ## Examples Splits string across multiple columns -```nu + +```nushell > 'a b c' | detect columns --no-headers ╭───┬─────────┬─────────┬─────────╮ │ # │ column0 │ column1 │ column2 │ @@ -45,26 +46,28 @@ Splits string across multiple columns ``` - -```nu +```nushell > $'c1 c2 c3 c4 c5(char nl)a b c d e' | detect columns --combine-columns 0..1 ``` Splits a multi-line string into columns with headers detected -```nu + +```nushell > $'c1 c2 c3 c4 c5(char nl)a b c d e' | detect columns --combine-columns -2..-1 ``` Splits a multi-line string into columns with headers detected -```nu + +```nushell > $'c1 c2 c3 c4 c5(char nl)a b c d e' | detect columns --combine-columns 2.. ``` Parse external ls command and combine columns for datetime -```nu + +```nushell > ^ls -lh | detect columns --no-headers --skip 1 --combine-columns 5..7 ``` diff --git a/commands/docs/dfr.md b/src/content/docs/commands/docs/dfr.md similarity index 99% rename from commands/docs/dfr.md rename to src/content/docs/commands/docs/dfr.md index b1c877b2fe8..c6b4abbb095 100644 --- a/commands/docs/dfr.md +++ b/src/content/docs/commands/docs/dfr.md @@ -9,20 +9,20 @@ usage: | Operate with data in a dataframe format. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr {flags} ``` +## Signature +`> dfr {flags} ` ## Input/output types: @@ -31,6 +31,7 @@ Dataframe commands were not shipped in the official binaries by default, you hav | nothing | string | ## Notes + You must use one of the following subcommands. Using this command as-is will only produce this help message. ## Subcommands: @@ -144,4 +145,4 @@ You must use one of the following subcommands. Using this command as-is will onl | [`dfr value-counts`](/commands/docs/dfr_value-counts.md) | Builtin | Returns a dataframe with the counts for unique values in series. | | [`dfr var`](/commands/docs/dfr_var.md) | Builtin | Create a var expression for an aggregation. | | [`dfr when`](/commands/docs/dfr_when.md) | Builtin | Creates and modifies a when expression. | -| [`dfr with-column`](/commands/docs/dfr_with-column.md) | Builtin | Adds a series to the dataframe. | \ No newline at end of file +| [`dfr with-column`](/commands/docs/dfr_with-column.md) | Builtin | Adds a series to the dataframe. | diff --git a/commands/docs/dfr_agg-groups.md b/src/content/docs/commands/docs/dfr_agg-groups.md similarity index 94% rename from commands/docs/dfr_agg-groups.md rename to src/content/docs/commands/docs/dfr_agg-groups.md index fcc838b685b..d0601b12fd2 100644 --- a/commands/docs/dfr_agg-groups.md +++ b/src/content/docs/commands/docs/dfr_agg-groups.md @@ -9,20 +9,20 @@ usage: | Creates an agg_groups expression. feature: dataframe --- + # {{ $frontmatter.title }} for expression
{{ $frontmatter.expression }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr agg-groups {flags} ``` +## Signature +`> dfr agg-groups {flags} ` ## Input/output types: @@ -32,8 +32,7 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples - -```nu +```nushell > ``` diff --git a/commands/docs/dfr_agg.md b/src/content/docs/commands/docs/dfr_agg.md similarity index 94% rename from commands/docs/dfr_agg.md rename to src/content/docs/commands/docs/dfr_agg.md index d848cb2b42c..08107ade122 100644 --- a/commands/docs/dfr_agg.md +++ b/src/content/docs/commands/docs/dfr_agg.md @@ -9,24 +9,24 @@ usage: | Performs a series of aggregations from a group-by. feature: dataframe --- + # {{ $frontmatter.title }} for lazyframe
{{ $frontmatter.lazyframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr agg {flags} ...rest``` +`> dfr agg {flags} ...rest` ## Parameters - - `...rest`: Expression(s) that define the aggregations to be applied - +- `...rest`: Expression(s) that define the aggregations to be applied ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Group by and perform an aggregation -```nu + +```nushell > [[a b]; [1 2] [1 4] [2 6] [2 4]] | dfr into-df | dfr group-by a @@ -56,7 +57,8 @@ Group by and perform an aggregation ``` Group by and perform an aggregation -```nu + +```nushell > [[a b]; [1 2] [1 4] [2 6] [2 4]] | dfr into-lazy | dfr group-by a diff --git a/commands/docs/dfr_all-false.md b/src/content/docs/commands/docs/dfr_all-false.md similarity index 96% rename from commands/docs/dfr_all-false.md rename to src/content/docs/commands/docs/dfr_all-false.md index 6fdda24f5b5..70d70e01b8d 100644 --- a/commands/docs/dfr_all-false.md +++ b/src/content/docs/commands/docs/dfr_all-false.md @@ -9,20 +9,20 @@ usage: | Returns true if all values are false. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr all-false {flags} ``` +## Signature +`> dfr all-false {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Returns true if all values are false -```nu + +```nushell > [false false false] | dfr into-df | dfr all-false ╭───┬───────────╮ │ # │ all_false │ @@ -44,7 +45,8 @@ Returns true if all values are false ``` Checks the result from a comparison -```nu + +```nushell > let s = ([5 6 2 10] | dfr into-df); let res = ($s > 9); $res | dfr all-false diff --git a/commands/docs/dfr_all-true.md b/src/content/docs/commands/docs/dfr_all-true.md similarity index 96% rename from commands/docs/dfr_all-true.md rename to src/content/docs/commands/docs/dfr_all-true.md index 24a49c32aa4..73070e52ce6 100644 --- a/commands/docs/dfr_all-true.md +++ b/src/content/docs/commands/docs/dfr_all-true.md @@ -9,20 +9,20 @@ usage: | Returns true if all values are true. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr all-true {flags} ``` +## Signature +`> dfr all-true {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Returns true if all values are true -```nu + +```nushell > [true true true] | dfr into-df | dfr all-true ╭───┬──────────╮ │ # │ all_true │ @@ -44,7 +45,8 @@ Returns true if all values are true ``` Checks the result from a comparison -```nu + +```nushell > let s = ([5 6 2 8] | dfr into-df); let res = ($s > 9); $res | dfr all-true diff --git a/commands/docs/dfr_append.md b/src/content/docs/commands/docs/dfr_append.md similarity index 91% rename from commands/docs/dfr_append.md rename to src/content/docs/commands/docs/dfr_append.md index f695b32a273..80c116d055c 100644 --- a/commands/docs/dfr_append.md +++ b/src/content/docs/commands/docs/dfr_append.md @@ -9,28 +9,28 @@ usage: | Appends a new dataframe. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr append {flags} (other)``` +`> dfr append {flags} (other)` ## Flags - - `--col, -c`: appends in col orientation +- `--col, -c`: appends in col orientation ## Parameters - - `other`: dataframe to be appended - +- `other`: dataframe to be appended ## Input/output types: @@ -41,7 +41,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Appends a dataframe as new columns -```nu + +```nushell > let a = ([[a b]; [1 2] [3 4]] | dfr into-df); $a | dfr append $a ╭───┬───┬───┬─────┬─────╮ @@ -54,7 +55,8 @@ Appends a dataframe as new columns ``` Appends a dataframe merging at the end of columns -```nu + +```nushell > let a = ([[a b]; [1 2] [3 4]] | dfr into-df); $a | dfr append $a --col ╭───┬───┬───╮ diff --git a/commands/docs/dfr_arg-max.md b/src/content/docs/commands/docs/dfr_arg-max.md similarity index 96% rename from commands/docs/dfr_arg-max.md rename to src/content/docs/commands/docs/dfr_arg-max.md index 5cb54741570..010418488d0 100644 --- a/commands/docs/dfr_arg-max.md +++ b/src/content/docs/commands/docs/dfr_arg-max.md @@ -9,20 +9,20 @@ usage: | Return index for max value in series. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr arg-max {flags} ``` +## Signature +`> dfr arg-max {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Returns index for max value -```nu + +```nushell > [1 3 2] | dfr into-df | dfr arg-max ╭───┬─────────╮ │ # │ arg_max │ diff --git a/commands/docs/dfr_arg-min.md b/src/content/docs/commands/docs/dfr_arg-min.md similarity index 96% rename from commands/docs/dfr_arg-min.md rename to src/content/docs/commands/docs/dfr_arg-min.md index 6b8968efeb5..9660cec088e 100644 --- a/commands/docs/dfr_arg-min.md +++ b/src/content/docs/commands/docs/dfr_arg-min.md @@ -9,20 +9,20 @@ usage: | Return index for min value in series. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr arg-min {flags} ``` +## Signature +`> dfr arg-min {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Returns index for min value -```nu + +```nushell > [1 3 2] | dfr into-df | dfr arg-min ╭───┬─────────╮ │ # │ arg_min │ diff --git a/commands/docs/dfr_arg-sort.md b/src/content/docs/commands/docs/dfr_arg-sort.md similarity index 88% rename from commands/docs/dfr_arg-sort.md rename to src/content/docs/commands/docs/dfr_arg-sort.md index 410f84fe113..7956c41e066 100644 --- a/commands/docs/dfr_arg-sort.md +++ b/src/content/docs/commands/docs/dfr_arg-sort.md @@ -9,26 +9,26 @@ usage: | Returns indexes for a sorted series. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr arg-sort {flags} ``` +`> dfr arg-sort {flags} ` ## Flags - - `--reverse, -r`: reverse order - - `--nulls-last, -n`: nulls ordered last - - `--maintain-order, -m`: maintain order on sorted items - +- `--reverse, -r`: reverse order +- `--nulls-last, -n`: nulls ordered last +- `--maintain-order, -m`: maintain order on sorted items ## Input/output types: @@ -39,7 +39,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Returns indexes for a sorted series -```nu + +```nushell > [1 2 2 3 3] | dfr into-df | dfr arg-sort ╭───┬──────────╮ │ # │ arg_sort │ @@ -54,7 +55,8 @@ Returns indexes for a sorted series ``` Returns indexes for a sorted series -```nu + +```nushell > [1 2 2 3 3] | dfr into-df | dfr arg-sort --reverse ╭───┬──────────╮ │ # │ arg_sort │ diff --git a/commands/docs/dfr_arg-true.md b/src/content/docs/commands/docs/dfr_arg-true.md similarity index 96% rename from commands/docs/dfr_arg-true.md rename to src/content/docs/commands/docs/dfr_arg-true.md index ee4e066f355..054d0ba40dc 100644 --- a/commands/docs/dfr_arg-true.md +++ b/src/content/docs/commands/docs/dfr_arg-true.md @@ -9,20 +9,20 @@ usage: | Returns indexes where values are true. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr arg-true {flags} ``` +## Signature +`> dfr arg-true {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Returns indexes where values are true -```nu + +```nushell > [false true false] | dfr into-df | dfr arg-true ╭───┬──────────╮ │ # │ arg_true │ diff --git a/commands/docs/dfr_arg-unique.md b/src/content/docs/commands/docs/dfr_arg-unique.md similarity index 96% rename from commands/docs/dfr_arg-unique.md rename to src/content/docs/commands/docs/dfr_arg-unique.md index 3ebb13c63e9..5acb2077560 100644 --- a/commands/docs/dfr_arg-unique.md +++ b/src/content/docs/commands/docs/dfr_arg-unique.md @@ -9,20 +9,20 @@ usage: | Returns indexes for unique values. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr arg-unique {flags} ``` +## Signature +`> dfr arg-unique {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Returns indexes for unique values -```nu + +```nushell > [1 2 2 3 3] | dfr into-df | dfr arg-unique ╭───┬────────────╮ │ # │ arg_unique │ diff --git a/commands/docs/dfr_arg-where.md b/src/content/docs/commands/docs/dfr_arg-where.md similarity index 92% rename from commands/docs/dfr_arg-where.md rename to src/content/docs/commands/docs/dfr_arg-where.md index bb0bbb333f8..43d3af54beb 100644 --- a/commands/docs/dfr_arg-where.md +++ b/src/content/docs/commands/docs/dfr_arg-where.md @@ -9,24 +9,24 @@ usage: | Creates an expression that returns the arguments where expression is true. feature: dataframe --- + # {{ $frontmatter.title }} for expression
{{ $frontmatter.expression }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr arg-where {flags} (column name)``` +`> dfr arg-where {flags} (column name)` ## Parameters - - `column name`: Expression to evaluate - +- `column name`: Expression to evaluate ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Return a dataframe where the value match the expression -```nu + +```nushell > let df = ([[a b]; [one 1] [two 2] [three 3]] | dfr into-df); $df | dfr select (dfr arg-where ((dfr col b) >= 2) | dfr as b_arg) ╭───┬───────╮ diff --git a/commands/docs/dfr_as-date.md b/src/content/docs/commands/docs/dfr_as-date.md similarity index 71% rename from commands/docs/dfr_as-date.md rename to src/content/docs/commands/docs/dfr_as-date.md index a8a568ecb9a..e39a2e7e801 100644 --- a/commands/docs/dfr_as-date.md +++ b/src/content/docs/commands/docs/dfr_as-date.md @@ -9,28 +9,28 @@ usage: | Converts string to date. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr as-date {flags} (format)``` +`> dfr as-date {flags} (format)` ## 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: @@ -41,13 +41,15 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Converts string to date -```nu + +```nushell > ["2021-12-30" "2021-12-31"] | dfr into-df | dfr as-datetime "%Y-%m-%d" ``` ## Notes + Format example: - "%Y-%m-%d" => 2021-12-31 - "%d-%m-%Y" => 31-12-2021 - "%Y%m%d" => 2021319 (2021-03-19) \ No newline at end of file +"%Y-%m-%d" => 2021-12-31 +"%d-%m-%Y" => 31-12-2021 +"%Y%m%d" => 2021319 (2021-03-19) diff --git a/commands/docs/dfr_as-datetime.md b/src/content/docs/commands/docs/dfr_as-datetime.md similarity index 66% rename from commands/docs/dfr_as-datetime.md rename to src/content/docs/commands/docs/dfr_as-datetime.md index ec94406d674..5840e754e33 100644 --- a/commands/docs/dfr_as-datetime.md +++ b/src/content/docs/commands/docs/dfr_as-datetime.md @@ -9,28 +9,28 @@ usage: | Converts string to datetime. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr as-datetime {flags} (format)``` +`> dfr as-datetime {flags} (format)` ## 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 time string - +- `format`: formatting date time string ## Input/output types: @@ -41,7 +41,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Converts string to datetime -```nu + +```nushell > ["2021-12-30 00:00:00" "2021-12-31 00:00:00"] | dfr into-df | dfr as-datetime "%Y-%m-%d %H:%M:%S" ╭───┬─────────────╮ │ # │ datetime │ @@ -53,7 +54,8 @@ Converts string to datetime ``` Converts string to datetime with high resolutions -```nu + +```nushell > ["2021-12-30 00:00:00.123456789" "2021-12-31 00:00:00.123456789"] | dfr into-df | dfr as-datetime "%Y-%m-%d %H:%M:%S.%9f" ╭───┬─────────────╮ │ # │ datetime │ @@ -65,15 +67,16 @@ Converts string to datetime with high resolutions ``` ## Notes + Format example: - "%y/%m/%d %H:%M:%S" => 21/12/31 12:54:98 - "%y-%m-%d %H:%M:%S" => 2021-12-31 24:58:01 - "%y/%m/%d %H:%M:%S" => 21/12/31 24:58:01 - "%y%m%d %H:%M:%S" => 210319 23:58:50 - "%Y/%m/%d %H:%M:%S" => 2021/12/31 12:54:98 - "%Y-%m-%d %H:%M:%S" => 2021-12-31 24:58:01 - "%Y/%m/%d %H:%M:%S" => 2021/12/31 24:58:01 - "%Y%m%d %H:%M:%S" => 20210319 23:58:50 - "%FT%H:%M:%S" => 2019-04-18T02:45:55 - "%FT%H:%M:%S.%6f" => microseconds - "%FT%H:%M:%S.%9f" => nanoseconds \ No newline at end of file +"%y/%m/%d %H:%M:%S" => 21/12/31 12:54:98 +"%y-%m-%d %H:%M:%S" => 2021-12-31 24:58:01 +"%y/%m/%d %H:%M:%S" => 21/12/31 24:58:01 +"%y%m%d %H:%M:%S" => 210319 23:58:50 +"%Y/%m/%d %H:%M:%S" => 2021/12/31 12:54:98 +"%Y-%m-%d %H:%M:%S" => 2021-12-31 24:58:01 +"%Y/%m/%d %H:%M:%S" => 2021/12/31 24:58:01 +"%Y%m%d %H:%M:%S" => 20210319 23:58:50 +"%FT%H:%M:%S" => 2019-04-18T02:45:55 +"%FT%H:%M:%S.%6f" => microseconds +"%FT%H:%M:%S.%9f" => nanoseconds diff --git a/commands/docs/dfr_as.md b/src/content/docs/commands/docs/dfr_as.md similarity index 93% rename from commands/docs/dfr_as.md rename to src/content/docs/commands/docs/dfr_as.md index 0f709570a26..7e3092bf5bc 100644 --- a/commands/docs/dfr_as.md +++ b/src/content/docs/commands/docs/dfr_as.md @@ -9,24 +9,24 @@ usage: | Creates an alias expression. feature: dataframe --- + # {{ $frontmatter.title }} for expression
{{ $frontmatter.expression }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr as {flags} (Alias name)``` +`> dfr as {flags} (Alias name)` ## Parameters - - `Alias name`: Alias name for the expression - +- `Alias name`: Alias name for the expression ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Creates and alias expression -```nu + +```nushell > dfr col a | dfr as new_a | dfr into-nu ╭───────┬────────────────────╮ │ │ ╭───────┬────────╮ │ diff --git a/commands/docs/dfr_cache.md b/src/content/docs/commands/docs/dfr_cache.md similarity index 95% rename from commands/docs/dfr_cache.md rename to src/content/docs/commands/docs/dfr_cache.md index 016b80337ff..61095ce2e3f 100644 --- a/commands/docs/dfr_cache.md +++ b/src/content/docs/commands/docs/dfr_cache.md @@ -9,20 +9,20 @@ usage: | Caches operations in a new LazyFrame. feature: dataframe --- + # {{ $frontmatter.title }} for lazyframe
{{ $frontmatter.lazyframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr cache {flags} ``` +## Signature +`> dfr cache {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Caches the result into a new LazyFrame -```nu + +```nushell > [[a b]; [6 2] [4 2] [2 2]] | dfr into-df | dfr reverse | dfr cache ``` diff --git a/commands/docs/dfr_col.md b/src/content/docs/commands/docs/dfr_col.md similarity index 91% rename from commands/docs/dfr_col.md rename to src/content/docs/commands/docs/dfr_col.md index a39e3389a89..ea15f590aec 100644 --- a/commands/docs/dfr_col.md +++ b/src/content/docs/commands/docs/dfr_col.md @@ -9,24 +9,24 @@ usage: | Creates a named column expression. feature: dataframe --- + # {{ $frontmatter.title }} for expression
{{ $frontmatter.expression }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr col {flags} (column name)``` +`> dfr col {flags} (column name)` ## Parameters - - `column name`: Name of column to be used - +- `column name`: Name of column to be used ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Creates a named column expression and converts it to a nu object -```nu + +```nushell > dfr col a | dfr into-nu ╭───────┬────────╮ │ expr │ column │ diff --git a/commands/docs/dfr_collect.md b/src/content/docs/commands/docs/dfr_collect.md similarity index 96% rename from commands/docs/dfr_collect.md rename to src/content/docs/commands/docs/dfr_collect.md index 57ba4653926..cb71a937c15 100644 --- a/commands/docs/dfr_collect.md +++ b/src/content/docs/commands/docs/dfr_collect.md @@ -9,20 +9,20 @@ usage: | Collect lazy dataframe into eager dataframe. feature: dataframe --- + # {{ $frontmatter.title }} for lazyframe
{{ $frontmatter.lazyframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr collect {flags} ``` +## Signature +`> dfr collect {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples drop duplicates -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-lazy | dfr collect ╭───┬───┬───╮ │ # │ a │ b │ diff --git a/commands/docs/dfr_columns.md b/src/content/docs/commands/docs/dfr_columns.md similarity index 95% rename from commands/docs/dfr_columns.md rename to src/content/docs/commands/docs/dfr_columns.md index 2d814401b03..372cbef7d8a 100644 --- a/commands/docs/dfr_columns.md +++ b/src/content/docs/commands/docs/dfr_columns.md @@ -9,20 +9,20 @@ usage: | Show dataframe columns. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr columns {flags} ``` +## Signature +`> dfr columns {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Dataframe columns -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-df | dfr columns ╭───┬───╮ │ 0 │ a │ diff --git a/commands/docs/dfr_concat-str.md b/src/content/docs/commands/docs/dfr_concat-str.md similarity index 87% rename from commands/docs/dfr_concat-str.md rename to src/content/docs/commands/docs/dfr_concat-str.md index 57dde699bde..3759c9fb7ef 100644 --- a/commands/docs/dfr_concat-str.md +++ b/src/content/docs/commands/docs/dfr_concat-str.md @@ -9,25 +9,25 @@ usage: | Creates a concat string expression. feature: dataframe --- + # {{ $frontmatter.title }} for expression
{{ $frontmatter.expression }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr concat-str {flags} (separator) (concat expressions)``` +`> dfr concat-str {flags} (separator) (concat expressions)` ## 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: @@ -38,7 +38,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Creates a concat string expression -```nu + +```nushell > let df = ([[a b c]; [one two 1] [three four 2]] | dfr into-df); $df | dfr with-column ((dfr concat-str "-" [(dfr col a) (dfr col b) ((dfr col c) * 2)]) | dfr as concat) ╭───┬───────┬──────┬───┬──────────────╮ diff --git a/commands/docs/dfr_concatenate.md b/src/content/docs/commands/docs/dfr_concatenate.md similarity index 90% rename from commands/docs/dfr_concatenate.md rename to src/content/docs/commands/docs/dfr_concatenate.md index 06742cc2a4a..67622154264 100644 --- a/commands/docs/dfr_concatenate.md +++ b/src/content/docs/commands/docs/dfr_concatenate.md @@ -9,24 +9,24 @@ usage: | Concatenates strings with other array. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr concatenate {flags} (other)``` +`> dfr concatenate {flags} (other)` ## Parameters - - `other`: Other array with string to be concatenated - +- `other`: Other array with string to be concatenated ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Concatenate string -```nu + +```nushell > let other = ([za xs cd] | dfr into-df); [abc abc abc] | dfr into-df | dfr concatenate $other ╭───┬───────╮ diff --git a/commands/docs/dfr_contains.md b/src/content/docs/commands/docs/dfr_contains.md similarity index 91% rename from commands/docs/dfr_contains.md rename to src/content/docs/commands/docs/dfr_contains.md index 78564bcbbfb..a60b5eab694 100644 --- a/commands/docs/dfr_contains.md +++ b/src/content/docs/commands/docs/dfr_contains.md @@ -9,24 +9,24 @@ usage: | Checks if a pattern is contained in a string. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr contains {flags} (pattern)``` +`> dfr contains {flags} (pattern)` ## Parameters - - `pattern`: Regex pattern to be searched - +- `pattern`: Regex pattern to be searched ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Returns boolean indicating if pattern was found -```nu + +```nushell > [abc acb acb] | dfr into-df | dfr contains ab ╭───┬───────╮ │ # │ 0 │ diff --git a/commands/docs/dfr_count-null.md b/src/content/docs/commands/docs/dfr_count-null.md similarity index 96% rename from commands/docs/dfr_count-null.md rename to src/content/docs/commands/docs/dfr_count-null.md index 53e5fef455b..13f1319fbde 100644 --- a/commands/docs/dfr_count-null.md +++ b/src/content/docs/commands/docs/dfr_count-null.md @@ -9,20 +9,20 @@ usage: | Counts null values. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr count-null {flags} ``` +## Signature +`> dfr count-null {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Counts null values -```nu + +```nushell > let s = ([1 1 0 0 3 3 4] | dfr into-df); ($s / $s) | dfr count-null ╭───┬────────────╮ diff --git a/commands/docs/dfr_count.md b/src/content/docs/commands/docs/dfr_count.md similarity index 95% rename from commands/docs/dfr_count.md rename to src/content/docs/commands/docs/dfr_count.md index 6658d63ca02..9f3709b56e5 100644 --- a/commands/docs/dfr_count.md +++ b/src/content/docs/commands/docs/dfr_count.md @@ -9,20 +9,20 @@ usage: | Creates a count expression. feature: dataframe --- + # {{ $frontmatter.title }} for expression
{{ $frontmatter.expression }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr count {flags} ``` +## Signature +`> dfr count {flags} ` ## Input/output types: @@ -32,8 +32,7 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples - -```nu +```nushell > ``` diff --git a/commands/docs/dfr_cumulative.md b/src/content/docs/commands/docs/dfr_cumulative.md similarity index 90% rename from commands/docs/dfr_cumulative.md rename to src/content/docs/commands/docs/dfr_cumulative.md index 71f2dd1cf27..f5aacfa0855 100644 --- a/commands/docs/dfr_cumulative.md +++ b/src/content/docs/commands/docs/dfr_cumulative.md @@ -9,28 +9,28 @@ usage: | Cumulative calculation for a series. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr cumulative {flags} (type)``` +`> dfr cumulative {flags} (type)` ## Flags - - `--reverse, -r`: Reverse cumulative calculation +- `--reverse, -r`: Reverse cumulative calculation ## Parameters - - `type`: rolling operation - +- `type`: rolling operation ## Input/output types: @@ -41,7 +41,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Cumulative sum for a series -```nu + +```nushell > [1 2 3 4 5] | dfr into-df | dfr cumulative sum ╭───┬──────────────────╮ │ # │ 0_cumulative_sum │ diff --git a/commands/docs/dfr_datepart.md b/src/content/docs/commands/docs/dfr_datepart.md similarity index 93% rename from commands/docs/dfr_datepart.md rename to src/content/docs/commands/docs/dfr_datepart.md index 06e840195e2..76b1d33aeef 100644 --- a/commands/docs/dfr_datepart.md +++ b/src/content/docs/commands/docs/dfr_datepart.md @@ -9,24 +9,24 @@ usage: | Creates an expression for capturing the specified datepart in a column. feature: dataframe --- + # {{ $frontmatter.title }} for expression
{{ $frontmatter.expression }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr datepart {flags} (Datepart name)``` +`> dfr datepart {flags} (Datepart name)` ## 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: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Creates an expression to capture the year date part -```nu + +```nushell > [["2021-12-30T01:02:03.123456789"]] | dfr into-df | dfr as-datetime "%Y-%m-%dT%H:%M:%S.%9f" | dfr with-column [(dfr col datetime | dfr datepart year | dfr as datetime_year )] ╭───┬─────────────┬───────────────╮ │ # │ datetime │ datetime_year │ @@ -48,7 +49,8 @@ Creates an expression to capture the year date part ``` Creates an expression to capture multiple date parts -```nu + +```nushell > [["2021-12-30T01:02:03.123456789"]] | dfr into-df | dfr as-datetime "%Y-%m-%dT%H:%M:%S.%9f" | dfr with-column [ (dfr col datetime | dfr datepart year | dfr as datetime_year ), (dfr col datetime | dfr datepart month | dfr as datetime_month ), diff --git a/commands/docs/dfr_drop-duplicates.md b/src/content/docs/commands/docs/dfr_drop-duplicates.md similarity index 82% rename from commands/docs/dfr_drop-duplicates.md rename to src/content/docs/commands/docs/dfr_drop-duplicates.md index b50305fc089..a8f8de8ca61 100644 --- a/commands/docs/dfr_drop-duplicates.md +++ b/src/content/docs/commands/docs/dfr_drop-duplicates.md @@ -9,29 +9,29 @@ usage: | Drops duplicate values in dataframe. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr drop-duplicates {flags} (subset)``` +`> dfr drop-duplicates {flags} (subset)` ## 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: @@ -42,7 +42,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples drop duplicates -```nu + +```nushell > [[a b]; [1 2] [3 4] [1 2]] | dfr into-df | dfr drop-duplicates ╭───┬───┬───╮ │ # │ a │ b │ diff --git a/commands/docs/dfr_drop-nulls.md b/src/content/docs/commands/docs/dfr_drop-nulls.md similarity index 93% rename from commands/docs/dfr_drop-nulls.md rename to src/content/docs/commands/docs/dfr_drop-nulls.md index 01d045060b0..ed2ffb73935 100644 --- a/commands/docs/dfr_drop-nulls.md +++ b/src/content/docs/commands/docs/dfr_drop-nulls.md @@ -9,24 +9,24 @@ usage: | Drops null values in dataframe. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr drop-nulls {flags} (subset)``` +`> dfr drop-nulls {flags} (subset)` ## Parameters - - `subset`: subset of columns to drop nulls - +- `subset`: subset of columns to drop nulls ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples drop null values in dataframe -```nu + +```nushell > let df = ([[a b]; [1 2] [3 0] [1 2]] | dfr into-df); let res = ($df.b / $df.b); let a = ($df | dfr with-column $res --name res); @@ -52,7 +53,8 @@ drop null values in dataframe ``` drop null values in dataframe -```nu + +```nushell > let s = ([1 2 0 0 3 4] | dfr into-df); ($s / $s) | dfr drop-nulls ╭───┬─────────╮ diff --git a/commands/docs/dfr_drop.md b/src/content/docs/commands/docs/dfr_drop.md similarity index 92% rename from commands/docs/dfr_drop.md rename to src/content/docs/commands/docs/dfr_drop.md index c4bd5b748d8..21964b30a8f 100644 --- a/commands/docs/dfr_drop.md +++ b/src/content/docs/commands/docs/dfr_drop.md @@ -9,24 +9,24 @@ usage: | Creates a new dataframe by dropping the selected columns. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr drop {flags} ...rest``` +`> dfr drop {flags} ...rest` ## Parameters - - `...rest`: column names to be dropped - +- `...rest`: column names to be dropped ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples drop column a -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-df | dfr drop a ╭───┬───╮ │ # │ b │ diff --git a/commands/docs/dfr_dtypes.md b/src/content/docs/commands/docs/dfr_dtypes.md similarity index 96% rename from commands/docs/dfr_dtypes.md rename to src/content/docs/commands/docs/dfr_dtypes.md index fca9c6a59c3..f4df27aef91 100644 --- a/commands/docs/dfr_dtypes.md +++ b/src/content/docs/commands/docs/dfr_dtypes.md @@ -9,20 +9,20 @@ usage: | Show dataframe data types. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr dtypes {flags} ``` +## Signature +`> dfr dtypes {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Dataframe dtypes -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-df | dfr dtypes ╭───┬────────┬───────╮ │ # │ column │ dtype │ diff --git a/commands/docs/dfr_dummies.md b/src/content/docs/commands/docs/dfr_dummies.md similarity index 95% rename from commands/docs/dfr_dummies.md rename to src/content/docs/commands/docs/dfr_dummies.md index 824c1ba42c4..837de29fd20 100644 --- a/commands/docs/dfr_dummies.md +++ b/src/content/docs/commands/docs/dfr_dummies.md @@ -9,24 +9,24 @@ usage: | Creates a new dataframe with dummy variables. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr dummies {flags} ``` +`> dfr dummies {flags} ` ## Flags - - `--drop-first, -d`: Drop first row - +- `--drop-first, -d`: Drop first row ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Create new dataframe with dummy variables from a dataframe -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-df | dfr dummies ╭───┬─────┬─────┬─────┬─────╮ │ # │ a_1 │ a_3 │ b_2 │ b_4 │ @@ -49,7 +50,8 @@ Create new dataframe with dummy variables from a dataframe ``` Create new dataframe with dummy variables from a series -```nu + +```nushell > [1 2 2 3 3] | dfr into-df | dfr dummies ╭───┬─────┬─────┬─────╮ │ # │ 0_1 │ 0_2 │ 0_3 │ diff --git a/commands/docs/dfr_explode.md b/src/content/docs/commands/docs/dfr_explode.md similarity index 93% rename from commands/docs/dfr_explode.md rename to src/content/docs/commands/docs/dfr_explode.md index 7c148832af4..2e3c4e40c82 100644 --- a/commands/docs/dfr_explode.md +++ b/src/content/docs/commands/docs/dfr_explode.md @@ -9,24 +9,24 @@ usage: | Explodes a dataframe or creates a explode expression. feature: dataframe --- + # {{ $frontmatter.title }} for lazyframe
{{ $frontmatter.lazyframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr explode {flags} ...rest``` +`> dfr explode {flags} ...rest` ## Parameters - - `...rest`: columns to explode, only applicable for dataframes - +- `...rest`: columns to explode, only applicable for dataframes ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Explode the specified dataframe -```nu + +```nushell > [[id name hobbies]; [1 Mercy [Cycling Knitting]] [2 Bob [Skiing Football]]] | dfr into-df | dfr explode hobbies | dfr collect ╭───┬────┬───────┬──────────╮ │ # │ id │ name │ hobbies │ @@ -51,7 +52,8 @@ Explode the specified dataframe ``` Select a column and explode the values -```nu + +```nushell > [[id name hobbies]; [1 Mercy [Cycling Knitting]] [2 Bob [Skiing Football]]] | dfr into-df | dfr select (dfr col hobbies | dfr explode) ╭───┬──────────╮ │ # │ hobbies │ diff --git a/commands/docs/dfr_expr-not.md b/src/content/docs/commands/docs/dfr_expr-not.md similarity index 95% rename from commands/docs/dfr_expr-not.md rename to src/content/docs/commands/docs/dfr_expr-not.md index 08fd292f655..12ca4ef5e30 100644 --- a/commands/docs/dfr_expr-not.md +++ b/src/content/docs/commands/docs/dfr_expr-not.md @@ -9,20 +9,20 @@ usage: | Creates a not expression. feature: dataframe --- + # {{ $frontmatter.title }} for expression
{{ $frontmatter.expression }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr expr-not {flags} ``` +## Signature +`> dfr expr-not {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Creates a not expression -```nu + +```nushell > (dfr col a) > 2) | dfr expr-not ``` diff --git a/commands/docs/dfr_fetch.md b/src/content/docs/commands/docs/dfr_fetch.md similarity index 91% rename from commands/docs/dfr_fetch.md rename to src/content/docs/commands/docs/dfr_fetch.md index 6d254952b26..1d897b3cc91 100644 --- a/commands/docs/dfr_fetch.md +++ b/src/content/docs/commands/docs/dfr_fetch.md @@ -9,24 +9,24 @@ usage: | Collects the lazyframe to the selected rows. feature: dataframe --- + # {{ $frontmatter.title }} for lazyframe
{{ $frontmatter.lazyframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr fetch {flags} (rows)``` +`> dfr fetch {flags} (rows)` ## Parameters - - `rows`: number of rows to be fetched from lazyframe - +- `rows`: number of rows to be fetched from lazyframe ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Fetch a rows from the dataframe -```nu + +```nushell > [[a b]; [6 2] [4 2] [2 2]] | dfr into-df | dfr fetch 2 ╭───┬───┬───╮ │ # │ a │ b │ diff --git a/commands/docs/dfr_fill-nan.md b/src/content/docs/commands/docs/dfr_fill-nan.md similarity index 92% rename from commands/docs/dfr_fill-nan.md rename to src/content/docs/commands/docs/dfr_fill-nan.md index 1cd24158c06..747f2152791 100644 --- a/commands/docs/dfr_fill-nan.md +++ b/src/content/docs/commands/docs/dfr_fill-nan.md @@ -9,24 +9,24 @@ usage: | Replaces NaN values with the given expression. feature: dataframe --- + # {{ $frontmatter.title }} for lazyframe
{{ $frontmatter.lazyframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr fill-nan {flags} (fill)``` +`> dfr fill-nan {flags} (fill)` ## Parameters - - `fill`: Expression to use to fill the NAN values - +- `fill`: Expression to use to fill the NAN values ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Fills the NaN values with 0 -```nu + +```nushell > [1 2 NaN 3 NaN] | dfr into-df | dfr fill-nan 0 ╭───┬───╮ │ # │ 0 │ @@ -52,7 +53,8 @@ Fills the NaN values with 0 ``` Fills the NaN values of a whole dataframe -```nu + +```nushell > [[a b]; [0.2 1] [0.1 NaN]] | dfr into-df | dfr fill-nan 0 ╭───┬──────┬───╮ │ # │ a │ b │ diff --git a/commands/docs/dfr_fill-null.md b/src/content/docs/commands/docs/dfr_fill-null.md similarity index 91% rename from commands/docs/dfr_fill-null.md rename to src/content/docs/commands/docs/dfr_fill-null.md index 4fdeacccf18..a3efe977871 100644 --- a/commands/docs/dfr_fill-null.md +++ b/src/content/docs/commands/docs/dfr_fill-null.md @@ -9,24 +9,24 @@ usage: | Replaces NULL values with the given expression. feature: dataframe --- + # {{ $frontmatter.title }} for lazyframe
{{ $frontmatter.lazyframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr fill-null {flags} (fill)``` +`> dfr fill-null {flags} (fill)` ## Parameters - - `fill`: Expression to use to fill the null values - +- `fill`: Expression to use to fill the null values ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Fills the null values by 0 -```nu + +```nushell > [1 2 2 3 3] | dfr into-df | dfr shift 2 | dfr fill-null 0 ╭───┬───╮ │ # │ 0 │ diff --git a/commands/docs/dfr_filter-with.md b/src/content/docs/commands/docs/dfr_filter-with.md similarity index 91% rename from commands/docs/dfr_filter-with.md rename to src/content/docs/commands/docs/dfr_filter-with.md index 8c5634344a5..2b5c79ed185 100644 --- a/commands/docs/dfr_filter-with.md +++ b/src/content/docs/commands/docs/dfr_filter-with.md @@ -9,24 +9,24 @@ usage: | Filters dataframe using a mask or expression as reference. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe or lazyframe
{{ $frontmatter.dataframe_or_lazyframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr filter-with {flags} (mask or expression)``` +`> dfr filter-with {flags} (mask or expression)` ## Parameters - - `mask or expression`: boolean mask used to filter data - +- `mask or expression`: boolean mask used to filter data ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Filter dataframe using a bool mask -```nu + +```nushell > let mask = ([true false] | dfr into-df); [[a b]; [1 2] [3 4]] | dfr into-df | dfr filter-with $mask ╭───┬───┬───╮ @@ -49,7 +50,8 @@ Filter dataframe using a bool mask ``` Filter dataframe using an expression -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-df | dfr filter-with ((dfr col a) > 1) ╭───┬───┬───╮ │ # │ a │ b │ diff --git a/commands/docs/dfr_filter.md b/src/content/docs/commands/docs/dfr_filter.md similarity index 89% rename from commands/docs/dfr_filter.md rename to src/content/docs/commands/docs/dfr_filter.md index afb50d83d9d..62c135561f1 100644 --- a/commands/docs/dfr_filter.md +++ b/src/content/docs/commands/docs/dfr_filter.md @@ -9,24 +9,24 @@ usage: | Filter dataframe based in expression. feature: dataframe --- + # {{ $frontmatter.title }} for lazyframe
{{ $frontmatter.lazyframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr filter {flags} (filter expression)``` +`> dfr filter {flags} (filter expression)` ## Parameters - - `filter expression`: Expression that define the column selection - +- `filter expression`: Expression that define the column selection ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Filter dataframe using an expression -```nu + +```nushell > [[a b]; [6 2] [4 2] [2 2]] | dfr into-df | dfr filter ((dfr col a) >= 4) ╭───┬───┬───╮ │ # │ a │ b │ diff --git a/commands/docs/dfr_first.md b/src/content/docs/commands/docs/dfr_first.md similarity index 91% rename from commands/docs/dfr_first.md rename to src/content/docs/commands/docs/dfr_first.md index 6ff32af55db..a7d3774afde 100644 --- a/commands/docs/dfr_first.md +++ b/src/content/docs/commands/docs/dfr_first.md @@ -9,24 +9,24 @@ usage: | Show only the first number of rows or create a first expression feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr first {flags} (rows)``` +`> dfr first {flags} (rows)` ## 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: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Return the first row of a dataframe -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-df | dfr first ╭───┬───┬───╮ │ # │ a │ b │ @@ -48,7 +49,8 @@ Return the first row of a dataframe ``` Return the first two rows of a dataframe -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-df | dfr first 2 ╭───┬───┬───╮ │ # │ a │ b │ @@ -60,7 +62,8 @@ Return the first two rows of a dataframe ``` Creates a first expression from a column -```nu + +```nushell > dfr col a | dfr first ``` diff --git a/commands/docs/dfr_flatten.md b/src/content/docs/commands/docs/dfr_flatten.md similarity index 93% rename from commands/docs/dfr_flatten.md rename to src/content/docs/commands/docs/dfr_flatten.md index 68f763afb07..e150b3b475a 100644 --- a/commands/docs/dfr_flatten.md +++ b/src/content/docs/commands/docs/dfr_flatten.md @@ -9,24 +9,24 @@ usage: | An alias for dfr explode. feature: dataframe --- + # {{ $frontmatter.title }} for lazyframe
{{ $frontmatter.lazyframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr flatten {flags} ...rest``` +`> dfr flatten {flags} ...rest` ## Parameters - - `...rest`: columns to flatten, only applicable for dataframes - +- `...rest`: columns to flatten, only applicable for dataframes ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Flatten the specified dataframe -```nu + +```nushell > [[id name hobbies]; [1 Mercy [Cycling Knitting]] [2 Bob [Skiing Football]]] | dfr into-df | dfr flatten hobbies | dfr collect ╭───┬────┬───────┬──────────╮ │ # │ id │ name │ hobbies │ @@ -51,7 +52,8 @@ Flatten the specified dataframe ``` Select a column and flatten the values -```nu + +```nushell > [[id name hobbies]; [1 Mercy [Cycling Knitting]] [2 Bob [Skiing Football]]] | dfr into-df | dfr select (dfr col hobbies | dfr flatten) ╭───┬──────────╮ │ # │ hobbies │ diff --git a/commands/docs/dfr_get-day.md b/src/content/docs/commands/docs/dfr_get-day.md similarity index 96% rename from commands/docs/dfr_get-day.md rename to src/content/docs/commands/docs/dfr_get-day.md index 558696b9639..1e8f8872bfe 100644 --- a/commands/docs/dfr_get-day.md +++ b/src/content/docs/commands/docs/dfr_get-day.md @@ -9,20 +9,20 @@ usage: | Gets day from date. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr get-day {flags} ``` +## Signature +`> dfr get-day {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Returns day from a date -```nu + +```nushell > let dt = ('2020-08-04T16:39:18+00:00' | into datetime --timezone 'UTC'); let df = ([$dt $dt] | dfr into-df); $df | dfr get-day diff --git a/commands/docs/dfr_get-hour.md b/src/content/docs/commands/docs/dfr_get-hour.md similarity index 96% rename from commands/docs/dfr_get-hour.md rename to src/content/docs/commands/docs/dfr_get-hour.md index acedf540e10..de86e0c0518 100644 --- a/commands/docs/dfr_get-hour.md +++ b/src/content/docs/commands/docs/dfr_get-hour.md @@ -9,20 +9,20 @@ usage: | Gets hour from date. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr get-hour {flags} ``` +## Signature +`> dfr get-hour {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Returns hour from a date -```nu + +```nushell > let dt = ('2020-08-04T16:39:18+00:00' | into datetime --timezone 'UTC'); let df = ([$dt $dt] | dfr into-df); $df | dfr get-hour diff --git a/commands/docs/dfr_get-minute.md b/src/content/docs/commands/docs/dfr_get-minute.md similarity index 96% rename from commands/docs/dfr_get-minute.md rename to src/content/docs/commands/docs/dfr_get-minute.md index 67068fb8c6b..079beaf53de 100644 --- a/commands/docs/dfr_get-minute.md +++ b/src/content/docs/commands/docs/dfr_get-minute.md @@ -9,20 +9,20 @@ usage: | Gets minute from date. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr get-minute {flags} ``` +## Signature +`> dfr get-minute {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Returns minute from a date -```nu + +```nushell > let dt = ('2020-08-04T16:39:18+00:00' | into datetime --timezone 'UTC'); let df = ([$dt $dt] | dfr into-df); $df | dfr get-minute diff --git a/commands/docs/dfr_get-month.md b/src/content/docs/commands/docs/dfr_get-month.md similarity index 96% rename from commands/docs/dfr_get-month.md rename to src/content/docs/commands/docs/dfr_get-month.md index 4a56bff1f8a..eafff58cc69 100644 --- a/commands/docs/dfr_get-month.md +++ b/src/content/docs/commands/docs/dfr_get-month.md @@ -9,20 +9,20 @@ usage: | Gets month from date. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr get-month {flags} ``` +## Signature +`> dfr get-month {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Returns month from a date -```nu + +```nushell > let dt = ('2020-08-04T16:39:18+00:00' | into datetime --timezone 'UTC'); let df = ([$dt $dt] | dfr into-df); $df | dfr get-month diff --git a/commands/docs/dfr_get-nanosecond.md b/src/content/docs/commands/docs/dfr_get-nanosecond.md similarity index 95% rename from commands/docs/dfr_get-nanosecond.md rename to src/content/docs/commands/docs/dfr_get-nanosecond.md index d2fa35eb51c..4fbdaa131e9 100644 --- a/commands/docs/dfr_get-nanosecond.md +++ b/src/content/docs/commands/docs/dfr_get-nanosecond.md @@ -9,20 +9,20 @@ usage: | Gets nanosecond from date. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr get-nanosecond {flags} ``` +## Signature +`> dfr get-nanosecond {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Returns nanosecond from a date -```nu + +```nushell > let dt = ('2020-08-04T16:39:18+00:00' | into datetime --timezone 'UTC'); let df = ([$dt $dt] | dfr into-df); $df | dfr get-nanosecond diff --git a/commands/docs/dfr_get-ordinal.md b/src/content/docs/commands/docs/dfr_get-ordinal.md similarity index 96% rename from commands/docs/dfr_get-ordinal.md rename to src/content/docs/commands/docs/dfr_get-ordinal.md index f3f52bdfb76..294666b23fa 100644 --- a/commands/docs/dfr_get-ordinal.md +++ b/src/content/docs/commands/docs/dfr_get-ordinal.md @@ -9,20 +9,20 @@ usage: | Gets ordinal from date. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr get-ordinal {flags} ``` +## Signature +`> dfr get-ordinal {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Returns ordinal from a date -```nu + +```nushell > let dt = ('2020-08-04T16:39:18+00:00' | into datetime --timezone 'UTC'); let df = ([$dt $dt] | dfr into-df); $df | dfr get-ordinal diff --git a/commands/docs/dfr_get-second.md b/src/content/docs/commands/docs/dfr_get-second.md similarity index 96% rename from commands/docs/dfr_get-second.md rename to src/content/docs/commands/docs/dfr_get-second.md index 066f3844afa..ff4bc3737ef 100644 --- a/commands/docs/dfr_get-second.md +++ b/src/content/docs/commands/docs/dfr_get-second.md @@ -9,20 +9,20 @@ usage: | Gets second from date. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr get-second {flags} ``` +## Signature +`> dfr get-second {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Returns second from a date -```nu + +```nushell > let dt = ('2020-08-04T16:39:18+00:00' | into datetime --timezone 'UTC'); let df = ([$dt $dt] | dfr into-df); $df | dfr get-second diff --git a/commands/docs/dfr_get-week.md b/src/content/docs/commands/docs/dfr_get-week.md similarity index 96% rename from commands/docs/dfr_get-week.md rename to src/content/docs/commands/docs/dfr_get-week.md index dd041cbd935..426284fb915 100644 --- a/commands/docs/dfr_get-week.md +++ b/src/content/docs/commands/docs/dfr_get-week.md @@ -9,20 +9,20 @@ usage: | Gets week from date. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr get-week {flags} ``` +## Signature +`> dfr get-week {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Returns week from a date -```nu + +```nushell > let dt = ('2020-08-04T16:39:18+00:00' | into datetime --timezone 'UTC'); let df = ([$dt $dt] | dfr into-df); $df | dfr get-week diff --git a/commands/docs/dfr_get-weekday.md b/src/content/docs/commands/docs/dfr_get-weekday.md similarity index 95% rename from commands/docs/dfr_get-weekday.md rename to src/content/docs/commands/docs/dfr_get-weekday.md index cc76b9ad681..757f61919d7 100644 --- a/commands/docs/dfr_get-weekday.md +++ b/src/content/docs/commands/docs/dfr_get-weekday.md @@ -9,20 +9,20 @@ usage: | Gets weekday from date. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr get-weekday {flags} ``` +## Signature +`> dfr get-weekday {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Returns weekday from a date -```nu + +```nushell > let dt = ('2020-08-04T16:39:18+00:00' | into datetime --timezone 'UTC'); let df = ([$dt $dt] | dfr into-df); $df | dfr get-weekday diff --git a/commands/docs/dfr_get-year.md b/src/content/docs/commands/docs/dfr_get-year.md similarity index 96% rename from commands/docs/dfr_get-year.md rename to src/content/docs/commands/docs/dfr_get-year.md index 3d5ebfac362..77bfbc62212 100644 --- a/commands/docs/dfr_get-year.md +++ b/src/content/docs/commands/docs/dfr_get-year.md @@ -9,20 +9,20 @@ usage: | Gets year from date. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr get-year {flags} ``` +## Signature +`> dfr get-year {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Returns year from a date -```nu + +```nushell > let dt = ('2020-08-04T16:39:18+00:00' | into datetime --timezone 'UTC'); let df = ([$dt $dt] | dfr into-df); $df | dfr get-year diff --git a/commands/docs/dfr_get.md b/src/content/docs/commands/docs/dfr_get.md similarity index 91% rename from commands/docs/dfr_get.md rename to src/content/docs/commands/docs/dfr_get.md index 4aa223a9096..4bc3b8f7860 100644 --- a/commands/docs/dfr_get.md +++ b/src/content/docs/commands/docs/dfr_get.md @@ -9,24 +9,24 @@ usage: | Creates dataframe with the selected columns. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr get {flags} ...rest``` +`> dfr get {flags} ...rest` ## Parameters - - `...rest`: column names to sort dataframe - +- `...rest`: column names to sort dataframe ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Returns the selected column -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-df | dfr get a ╭───┬───╮ │ # │ a │ diff --git a/commands/docs/dfr_group-by.md b/src/content/docs/commands/docs/dfr_group-by.md similarity index 95% rename from commands/docs/dfr_group-by.md rename to src/content/docs/commands/docs/dfr_group-by.md index 317de9c9660..3c38353ca1f 100644 --- a/commands/docs/dfr_group-by.md +++ b/src/content/docs/commands/docs/dfr_group-by.md @@ -9,24 +9,24 @@ usage: | Creates a group-by object that can be used for other aggregations. feature: dataframe --- + # {{ $frontmatter.title }} for lazyframe
{{ $frontmatter.lazyframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr group-by {flags} ...rest``` +`> dfr group-by {flags} ...rest` ## Parameters - - `...rest`: Expression(s) that define the lazy group-by - +- `...rest`: Expression(s) that define the lazy group-by ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Group by and perform an aggregation -```nu + +```nushell > [[a b]; [1 2] [1 4] [2 6] [2 4]] | dfr into-df | dfr group-by a @@ -56,7 +57,8 @@ Group by and perform an aggregation ``` Group by and perform an aggregation -```nu + +```nushell > [[a b]; [1 2] [1 4] [2 6] [2 4]] | dfr into-lazy | dfr group-by a diff --git a/commands/docs/dfr_implode.md b/src/content/docs/commands/docs/dfr_implode.md similarity index 94% rename from commands/docs/dfr_implode.md rename to src/content/docs/commands/docs/dfr_implode.md index a67e0424856..5a651574191 100644 --- a/commands/docs/dfr_implode.md +++ b/src/content/docs/commands/docs/dfr_implode.md @@ -9,20 +9,20 @@ usage: | Aggregates a group to a Series. feature: dataframe --- + # {{ $frontmatter.title }} for expression
{{ $frontmatter.expression }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr implode {flags} ``` +## Signature +`> dfr implode {flags} ` ## Input/output types: @@ -32,8 +32,7 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples - -```nu +```nushell > ``` diff --git a/commands/docs/dfr_into-df.md b/src/content/docs/commands/docs/dfr_into-df.md similarity index 94% rename from commands/docs/dfr_into-df.md rename to src/content/docs/commands/docs/dfr_into-df.md index 1541aaaf933..086580e06fe 100644 --- a/commands/docs/dfr_into-df.md +++ b/src/content/docs/commands/docs/dfr_into-df.md @@ -9,24 +9,24 @@ usage: | Converts a list, table or record into a dataframe. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr into-df {flags} ``` +`> dfr into-df {flags} ` ## Flags - - `--schema, -s {record}`: Polars Schema in format [{name: str}]. CSV, JSON, and JSONL files - +- `--schema, -s {record}`: Polars Schema in format [{name: str}]. CSV, JSON, and JSONL files ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Takes a dictionary and creates a dataframe -```nu + +```nushell > [[a b];[1 2] [3 4]] | dfr into-df ╭───┬───┬───╮ │ # │ a │ b │ @@ -49,7 +50,8 @@ Takes a dictionary and creates a dataframe ``` Takes a list of tables and creates a dataframe -```nu + +```nushell > [[1 2 a] [3 4 b] [5 6 c]] | dfr into-df ╭───┬───┬───┬───╮ │ # │ 0 │ 1 │ 2 │ @@ -62,7 +64,8 @@ Takes a list of tables and creates a dataframe ``` Takes a list and creates a dataframe -```nu + +```nushell > [a b c] | dfr into-df ╭───┬───╮ │ # │ 0 │ @@ -75,7 +78,8 @@ Takes a list and creates a dataframe ``` Takes a list of booleans and creates a dataframe -```nu + +```nushell > [true true false] | dfr into-df ╭───┬───────╮ │ # │ 0 │ @@ -88,7 +92,8 @@ Takes a list of booleans and creates a dataframe ``` Convert to a dataframe and provide a schema -```nu + +```nushell > {a: 1, b: {a: [1 2 3]}, c: [a b c]}| dfr into-df -s {a: u8, b: {a: list}, c: list} ╭───┬───┬───────────────────┬───────────╮ │ # │ a │ b │ c │ diff --git a/commands/docs/dfr_into-lazy.md b/src/content/docs/commands/docs/dfr_into-lazy.md similarity index 85% rename from commands/docs/dfr_into-lazy.md rename to src/content/docs/commands/docs/dfr_into-lazy.md index 5be56dab85f..9188205011a 100644 --- a/commands/docs/dfr_into-lazy.md +++ b/src/content/docs/commands/docs/dfr_into-lazy.md @@ -9,24 +9,24 @@ usage: | Converts a dataframe into a lazy dataframe. feature: dataframe --- + # {{ $frontmatter.title }} for lazyframe
{{ $frontmatter.lazyframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr into-lazy {flags} ``` +`> dfr into-lazy {flags} ` ## Flags - - `--schema, -s {record}`: Polars Schema in format [{name: str}]. CSV, JSON, and JSONL files - +- `--schema, -s {record}`: Polars Schema in format [{name: str}]. CSV, JSON, and JSONL files ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Takes a dictionary and creates a lazy dataframe -```nu + +```nushell > [[a b];[1 2] [3 4]] | dfr into-lazy ``` diff --git a/commands/docs/dfr_into-nu.md b/src/content/docs/commands/docs/dfr_into-nu.md similarity index 91% rename from commands/docs/dfr_into-nu.md rename to src/content/docs/commands/docs/dfr_into-nu.md index 432bde5606e..7fb1f569a21 100644 --- a/commands/docs/dfr_into-nu.md +++ b/src/content/docs/commands/docs/dfr_into-nu.md @@ -9,25 +9,25 @@ usage: | Converts a dataframe or an expression into into nushell value for access and exploration. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr into-nu {flags} ``` +`> dfr into-nu {flags} ` ## Flags - - `--rows, -n {number}`: number of rows to be shown - - `--tail, -t`: shows tail rows - +- `--rows, -n {number}`: number of rows to be shown +- `--tail, -t`: shows tail rows ## Input/output types: @@ -38,7 +38,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Shows head rows from dataframe -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-df | dfr into-nu ╭───┬───┬───╮ │ # │ a │ b │ @@ -50,7 +51,8 @@ Shows head rows from dataframe ``` Shows tail rows from dataframe -```nu + +```nushell > [[a b]; [1 2] [5 6] [3 4]] | dfr into-df | dfr into-nu --tail --rows 1 ╭───┬───┬───╮ │ # │ a │ b │ @@ -61,7 +63,8 @@ Shows tail rows from dataframe ``` Convert a col expression into a nushell value -```nu + +```nushell > dfr col a | dfr into-nu ╭───────┬────────╮ │ expr │ column │ diff --git a/commands/docs/dfr_is-duplicated.md b/src/content/docs/commands/docs/dfr_is-duplicated.md similarity index 96% rename from commands/docs/dfr_is-duplicated.md rename to src/content/docs/commands/docs/dfr_is-duplicated.md index 5c308a5cd14..10d699e4b99 100644 --- a/commands/docs/dfr_is-duplicated.md +++ b/src/content/docs/commands/docs/dfr_is-duplicated.md @@ -9,20 +9,20 @@ usage: | Creates mask indicating duplicated values. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr is-duplicated {flags} ``` +## Signature +`> dfr is-duplicated {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Create mask indicating duplicated values -```nu + +```nushell > [5 6 6 6 8 8 8] | dfr into-df | dfr is-duplicated ╭───┬───────────────╮ │ # │ is_duplicated │ @@ -50,7 +51,8 @@ Create mask indicating duplicated values ``` Create mask indicating duplicated rows in a dataframe -```nu + +```nushell > [[a, b]; [1 2] [1 2] [3 3] [3 3] [1 1]] | dfr into-df | dfr is-duplicated ╭───┬───────────────╮ │ # │ is_duplicated │ diff --git a/commands/docs/dfr_is-in.md b/src/content/docs/commands/docs/dfr_is-in.md similarity index 93% rename from commands/docs/dfr_is-in.md rename to src/content/docs/commands/docs/dfr_is-in.md index a15e7b6f484..4b45de73ceb 100644 --- a/commands/docs/dfr_is-in.md +++ b/src/content/docs/commands/docs/dfr_is-in.md @@ -9,24 +9,24 @@ usage: | Creates an is-in expression. feature: dataframe --- + # {{ $frontmatter.title }} for expression
{{ $frontmatter.expression }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr is-in {flags} (list)``` +`> dfr is-in {flags} (list)` ## Parameters - - `list`: List to check if values are in - +- `list`: List to check if values are in ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Creates a is-in expression -```nu + +```nushell > let df = ([[a b]; [one 1] [two 2] [three 3]] | dfr into-df); $df | dfr with-column (dfr col a | dfr is-in [one two] | dfr as a_in) ╭───┬───────┬───┬───────╮ diff --git a/commands/docs/dfr_is-not-null.md b/src/content/docs/commands/docs/dfr_is-not-null.md similarity index 95% rename from commands/docs/dfr_is-not-null.md rename to src/content/docs/commands/docs/dfr_is-not-null.md index 471745641cc..6e6bb7671bb 100644 --- a/commands/docs/dfr_is-not-null.md +++ b/src/content/docs/commands/docs/dfr_is-not-null.md @@ -9,20 +9,20 @@ usage: | Creates mask where value is not null. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr is-not-null {flags} ``` +## Signature +`> dfr is-not-null {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Create mask where values are not null -```nu + +```nushell > let s = ([5 6 0 8] | dfr into-df); let res = ($s / $s); $res | dfr is-not-null @@ -49,7 +50,8 @@ Create mask where values are not null ``` Creates a is not null expression from a column -```nu + +```nushell > dfr col a | dfr is-not-null ``` diff --git a/commands/docs/dfr_is-null.md b/src/content/docs/commands/docs/dfr_is-null.md similarity index 95% rename from commands/docs/dfr_is-null.md rename to src/content/docs/commands/docs/dfr_is-null.md index 4576bffa89f..4ee2cc2ad4a 100644 --- a/commands/docs/dfr_is-null.md +++ b/src/content/docs/commands/docs/dfr_is-null.md @@ -9,20 +9,20 @@ usage: | Creates mask where value is null. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr is-null {flags} ``` +## Signature +`> dfr is-null {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Create mask where values are null -```nu + +```nushell > let s = ([5 6 0 8] | dfr into-df); let res = ($s / $s); $res | dfr is-null @@ -49,7 +50,8 @@ Create mask where values are null ``` Creates a is null expression from a column -```nu + +```nushell > dfr col a | dfr is-null ``` diff --git a/commands/docs/dfr_is-unique.md b/src/content/docs/commands/docs/dfr_is-unique.md similarity index 96% rename from commands/docs/dfr_is-unique.md rename to src/content/docs/commands/docs/dfr_is-unique.md index 9a47eac2c15..2e6fae5d32b 100644 --- a/commands/docs/dfr_is-unique.md +++ b/src/content/docs/commands/docs/dfr_is-unique.md @@ -9,20 +9,20 @@ usage: | Creates mask indicating unique values. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr is-unique {flags} ``` +## Signature +`> dfr is-unique {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Create mask indicating unique values -```nu + +```nushell > [5 6 6 6 8 8 8] | dfr into-df | dfr is-unique ╭───┬───────────╮ │ # │ is_unique │ @@ -50,7 +51,8 @@ Create mask indicating unique values ``` Create mask indicating duplicated rows in a dataframe -```nu + +```nushell > [[a, b]; [1 2] [1 2] [3 3] [3 3] [1 1]] | dfr into-df | dfr is-unique ╭───┬───────────╮ │ # │ is_unique │ diff --git a/commands/docs/dfr_join.md b/src/content/docs/commands/docs/dfr_join.md similarity index 82% rename from commands/docs/dfr_join.md rename to src/content/docs/commands/docs/dfr_join.md index 9a60e272d57..7ff998c93c5 100644 --- a/commands/docs/dfr_join.md +++ b/src/content/docs/commands/docs/dfr_join.md @@ -9,34 +9,34 @@ usage: | Joins a lazy frame with other lazy frame. feature: dataframe --- + # {{ $frontmatter.title }} for lazyframe
{{ $frontmatter.lazyframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr join {flags} (other) (left_on) (right_on)``` +`> dfr join {flags} (other) (left_on) (right_on)` ## Flags - - `--inner, -i`: inner joing between lazyframes (default) - - `--left, -l`: left join between lazyframes - - `--outer, -o`: outer join between lazyframes - - `--cross, -c`: cross join between lazyframes - - `--suffix, -s {string}`: Suffix to use on columns with same name +- `--inner, -i`: inner joing between lazyframes (default) +- `--left, -l`: left join between lazyframes +- `--outer, -o`: outer join between lazyframes +- `--cross, -c`: cross join between lazyframes +- `--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: @@ -47,7 +47,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Join two lazy dataframes -```nu + +```nushell > let df_a = ([[a b c];[1 "a" 0] [2 "b" 1] [1 "c" 2] [1 "c" 3]] | dfr into-lazy); let df_b = ([["foo" "bar" "ham"];[1 "a" "let"] [2 "c" "var"] [3 "c" "const"]] | dfr into-lazy); $df_a | dfr join $df_b a foo | dfr collect @@ -63,7 +64,8 @@ Join two lazy dataframes ``` Join one eager dataframe with a lazy dataframe -```nu + +```nushell > let df_a = ([[a b c];[1 "a" 0] [2 "b" 1] [1 "c" 2] [1 "c" 3]] | dfr into-df); let df_b = ([["foo" "bar" "ham"];[1 "a" "let"] [2 "c" "var"] [3 "c" "const"]] | dfr into-lazy); $df_a | dfr join $df_b a foo diff --git a/commands/docs/dfr_last.md b/src/content/docs/commands/docs/dfr_last.md similarity index 92% rename from commands/docs/dfr_last.md rename to src/content/docs/commands/docs/dfr_last.md index 1eb6d7733ba..e6d6b1c56dd 100644 --- a/commands/docs/dfr_last.md +++ b/src/content/docs/commands/docs/dfr_last.md @@ -9,24 +9,24 @@ usage: | Creates new dataframe with tail rows or creates a last expression. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr last {flags} (rows)``` +`> dfr last {flags} (rows)` ## Parameters - - `rows`: Number of rows for tail - +- `rows`: Number of rows for tail ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Create new dataframe with last rows -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-df | dfr last 1 ╭───┬───┬───╮ │ # │ a │ b │ @@ -48,7 +49,8 @@ Create new dataframe with last rows ``` Creates a last expression from a column -```nu + +```nushell > dfr col a | dfr last ``` diff --git a/commands/docs/dfr_lit.md b/src/content/docs/commands/docs/dfr_lit.md similarity index 91% rename from commands/docs/dfr_lit.md rename to src/content/docs/commands/docs/dfr_lit.md index 7826902e5ee..9674bfa3829 100644 --- a/commands/docs/dfr_lit.md +++ b/src/content/docs/commands/docs/dfr_lit.md @@ -9,24 +9,24 @@ usage: | Creates a literal expression. feature: dataframe --- + # {{ $frontmatter.title }} for expression
{{ $frontmatter.expression }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr lit {flags} (literal)``` +`> dfr lit {flags} (literal)` ## Parameters - - `literal`: literal to construct the expression - +- `literal`: literal to construct the expression ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Created a literal expression and converts it to a nu object -```nu + +```nushell > dfr lit 2 | dfr into-nu ╭───────┬─────────╮ │ expr │ literal │ diff --git a/commands/docs/dfr_lowercase.md b/src/content/docs/commands/docs/dfr_lowercase.md similarity index 96% rename from commands/docs/dfr_lowercase.md rename to src/content/docs/commands/docs/dfr_lowercase.md index 3b9442fc5f7..15736a7eb06 100644 --- a/commands/docs/dfr_lowercase.md +++ b/src/content/docs/commands/docs/dfr_lowercase.md @@ -9,20 +9,20 @@ usage: | Lowercase the strings in the column. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr lowercase {flags} ``` +## Signature +`> dfr lowercase {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Modifies strings to lowercase -```nu + +```nushell > [Abc aBc abC] | dfr into-df | dfr lowercase ╭───┬─────╮ │ # │ 0 │ diff --git a/commands/docs/dfr_ls.md b/src/content/docs/commands/docs/dfr_ls.md similarity index 96% rename from commands/docs/dfr_ls.md rename to src/content/docs/commands/docs/dfr_ls.md index e8312460d0a..1b3e4cc144e 100644 --- a/commands/docs/dfr_ls.md +++ b/src/content/docs/commands/docs/dfr_ls.md @@ -9,20 +9,20 @@ usage: | Lists stored dataframes. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr ls {flags} ``` +## Signature +`> dfr ls {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Creates a new dataframe and shows it in the dataframe list -```nu + +```nushell > let test = ([[a b];[1 2] [3 4]] | dfr into-df); ls diff --git a/commands/docs/dfr_max.md b/src/content/docs/commands/docs/dfr_max.md similarity index 96% rename from commands/docs/dfr_max.md rename to src/content/docs/commands/docs/dfr_max.md index 05b487ae2fb..870c355af10 100644 --- a/commands/docs/dfr_max.md +++ b/src/content/docs/commands/docs/dfr_max.md @@ -9,20 +9,20 @@ usage: | Creates a max expression or aggregates columns to their max value. feature: dataframe --- + # {{ $frontmatter.title }} for expression
{{ $frontmatter.expression }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr max {flags} ``` +## Signature +`> dfr max {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Max value from columns in a dataframe -```nu + +```nushell > [[a b]; [6 2] [1 4] [4 1]] | dfr into-df | dfr max ╭───┬───┬───╮ │ # │ a │ b │ @@ -44,7 +45,8 @@ Max value from columns in a dataframe ``` Max aggregation for a group-by -```nu + +```nushell > [[a b]; [one 2] [one 4] [two 1]] | dfr into-df | dfr group-by a diff --git a/commands/docs/dfr_mean.md b/src/content/docs/commands/docs/dfr_mean.md similarity index 97% rename from commands/docs/dfr_mean.md rename to src/content/docs/commands/docs/dfr_mean.md index d5f37e678cf..578e6ff52a2 100644 --- a/commands/docs/dfr_mean.md +++ b/src/content/docs/commands/docs/dfr_mean.md @@ -9,20 +9,20 @@ usage: | Creates a mean expression for an aggregation or aggregates columns to their mean value. feature: dataframe --- + # {{ $frontmatter.title }} for expression
{{ $frontmatter.expression }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr mean {flags} ``` +## Signature +`> dfr mean {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Mean value from columns in a dataframe -```nu + +```nushell > [[a b]; [6 2] [4 2] [2 2]] | dfr into-df | dfr mean ╭───┬──────┬──────╮ │ # │ a │ b │ @@ -44,7 +45,8 @@ Mean value from columns in a dataframe ``` Mean aggregation for a group-by -```nu + +```nushell > [[a b]; [one 2] [one 4] [two 1]] | dfr into-df | dfr group-by a diff --git a/commands/docs/dfr_median.md b/src/content/docs/commands/docs/dfr_median.md similarity index 96% rename from commands/docs/dfr_median.md rename to src/content/docs/commands/docs/dfr_median.md index 4ea3639a548..0aface0f608 100644 --- a/commands/docs/dfr_median.md +++ b/src/content/docs/commands/docs/dfr_median.md @@ -9,20 +9,20 @@ usage: | Aggregates columns to their median value feature: dataframe --- + # {{ $frontmatter.title }} for lazyframe
{{ $frontmatter.lazyframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr median {flags} ``` +## Signature +`> dfr median {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Median value from columns in a dataframe -```nu + +```nushell > [[a b]; [6 2] [4 2] [2 2]] | dfr into-df | dfr median ╭───┬──────┬──────╮ │ # │ a │ b │ diff --git a/commands/docs/dfr_melt.md b/src/content/docs/commands/docs/dfr_melt.md similarity index 83% rename from commands/docs/dfr_melt.md rename to src/content/docs/commands/docs/dfr_melt.md index c4fce8cb040..7476dfdf642 100644 --- a/commands/docs/dfr_melt.md +++ b/src/content/docs/commands/docs/dfr_melt.md @@ -9,27 +9,27 @@ usage: | Unpivot a DataFrame from wide to long format. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr melt {flags} ``` +`> dfr melt {flags} ` ## Flags - - `--columns, -c {table}`: column names for melting - - `--values, -v {table}`: column names used as value columns - - `--variable-name, -r {string}`: optional name for variable column - - `--value-name, -l {string}`: optional name for value column - +- `--columns, -c {table}`: column names for melting +- `--values, -v {table}`: 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: @@ -40,7 +40,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples melt dataframe -```nu + +```nushell > [[a b c d]; [x 1 4 a] [y 2 5 b] [z 3 6 c]] | dfr into-df | dfr melt -c [b c] -v [a d] ╭───┬───┬───┬──────────┬───────╮ │ # │ b │ c │ variable │ value │ diff --git a/commands/docs/dfr_min.md b/src/content/docs/commands/docs/dfr_min.md similarity index 96% rename from commands/docs/dfr_min.md rename to src/content/docs/commands/docs/dfr_min.md index 5d915e125eb..48e8e6cbb2d 100644 --- a/commands/docs/dfr_min.md +++ b/src/content/docs/commands/docs/dfr_min.md @@ -9,20 +9,20 @@ usage: | Creates a min expression or aggregates columns to their min value. feature: dataframe --- + # {{ $frontmatter.title }} for expression
{{ $frontmatter.expression }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr min {flags} ``` +## Signature +`> dfr min {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Min value from columns in a dataframe -```nu + +```nushell > [[a b]; [6 2] [1 4] [4 1]] | dfr into-df | dfr min ╭───┬───┬───╮ │ # │ a │ b │ @@ -44,7 +45,8 @@ Min value from columns in a dataframe ``` Min aggregation for a group-by -```nu + +```nushell > [[a b]; [one 2] [one 4] [two 1]] | dfr into-df | dfr group-by a diff --git a/commands/docs/dfr_n-unique.md b/src/content/docs/commands/docs/dfr_n-unique.md similarity index 95% rename from commands/docs/dfr_n-unique.md rename to src/content/docs/commands/docs/dfr_n-unique.md index 6c6b06c4bf2..a1806ed3575 100644 --- a/commands/docs/dfr_n-unique.md +++ b/src/content/docs/commands/docs/dfr_n-unique.md @@ -9,20 +9,20 @@ usage: | Counts unique values. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr n-unique {flags} ``` +## Signature +`> dfr n-unique {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Counts unique values -```nu + +```nushell > [1 1 2 2 3 3 4] | dfr into-df | dfr n-unique ╭───┬──────────────╮ │ # │ count_unique │ @@ -44,7 +45,8 @@ Counts unique values ``` Creates a is n-unique expression from a column -```nu + +```nushell > dfr col a | dfr n-unique ``` diff --git a/commands/docs/dfr_not.md b/src/content/docs/commands/docs/dfr_not.md similarity index 96% rename from commands/docs/dfr_not.md rename to src/content/docs/commands/docs/dfr_not.md index f297f247617..2490684abff 100644 --- a/commands/docs/dfr_not.md +++ b/src/content/docs/commands/docs/dfr_not.md @@ -9,20 +9,20 @@ usage: | Inverts boolean mask. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr not {flags} ``` +## Signature +`> dfr not {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Inverts boolean mask -```nu + +```nushell > [true false true] | dfr into-df | dfr not ╭───┬───────╮ │ # │ 0 │ diff --git a/commands/docs/dfr_open.md b/src/content/docs/commands/docs/dfr_open.md similarity index 53% rename from commands/docs/dfr_open.md rename to src/content/docs/commands/docs/dfr_open.md index 7c45026ff6b..2ed0420fdb3 100644 --- a/commands/docs/dfr_open.md +++ b/src/content/docs/commands/docs/dfr_open.md @@ -9,35 +9,35 @@ usage: | Opens CSV, JSON, JSON lines, arrow, avro, or parquet file to create dataframe. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr open {flags} (file)``` +`> dfr open {flags} (file)` ## Flags - - `--lazy, -l`: creates a lazy 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 {record}`: Polars Schema in format [{name: str}]. CSV, JSON, and JSONL files +- `--lazy, -l`: creates a lazy 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 {record}`: Polars Schema in format [{name: str}]. CSV, JSON, and JSONL files ## Parameters - - `file`: file path to load values from - +- `file`: file path to load values from ## Input/output types: @@ -48,7 +48,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Takes a file name and creates a dataframe -```nu + +```nushell > dfr open test.csv ``` diff --git a/commands/docs/dfr_otherwise.md b/src/content/docs/commands/docs/dfr_otherwise.md similarity index 90% rename from commands/docs/dfr_otherwise.md rename to src/content/docs/commands/docs/dfr_otherwise.md index ceebc704ee7..bef1f0b1724 100644 --- a/commands/docs/dfr_otherwise.md +++ b/src/content/docs/commands/docs/dfr_otherwise.md @@ -9,24 +9,24 @@ usage: | Completes a when expression. feature: dataframe --- + # {{ $frontmatter.title }} for expression
{{ $frontmatter.expression }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr otherwise {flags} (otherwise expression)``` +`> dfr otherwise {flags} (otherwise expression)` ## Parameters - - `otherwise expression`: expression to apply when no when predicate matches - +- `otherwise expression`: expression to apply when no when predicate matches ## Input/output types: @@ -37,19 +37,22 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Create a when conditions -```nu + +```nushell > dfr when ((dfr col a) > 2) 4 | dfr otherwise 5 ``` Create a when conditions -```nu + +```nushell > dfr when ((dfr col a) > 2) 4 | dfr when ((dfr col a) < 0) 6 | dfr otherwise 0 ``` Create a new column for the dataframe -```nu + +```nushell > [[a b]; [6 2] [1 4] [4 1]] | dfr into-lazy | dfr with-column ( diff --git a/commands/docs/dfr_quantile.md b/src/content/docs/commands/docs/dfr_quantile.md similarity index 91% rename from commands/docs/dfr_quantile.md rename to src/content/docs/commands/docs/dfr_quantile.md index 2332378c94b..8729bb07c4b 100644 --- a/commands/docs/dfr_quantile.md +++ b/src/content/docs/commands/docs/dfr_quantile.md @@ -9,24 +9,24 @@ usage: | Aggregates the columns to the selected quantile. feature: dataframe --- + # {{ $frontmatter.title }} for lazyframe
{{ $frontmatter.lazyframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr quantile {flags} (quantile)``` +`> dfr quantile {flags} (quantile)` ## Parameters - - `quantile`: quantile value for quantile operation - +- `quantile`: quantile value for quantile operation ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples quantile value from columns in a dataframe -```nu + +```nushell > [[a b]; [6 2] [1 4] [4 1]] | dfr into-df | dfr quantile 0.5 ╭───┬──────┬──────╮ │ # │ a │ b │ diff --git a/commands/docs/dfr_query.md b/src/content/docs/commands/docs/dfr_query.md similarity index 94% rename from commands/docs/dfr_query.md rename to src/content/docs/commands/docs/dfr_query.md index 7ab4c0a5413..817aaeaef21 100644 --- a/commands/docs/dfr_query.md +++ b/src/content/docs/commands/docs/dfr_query.md @@ -9,24 +9,24 @@ usage: | Query dataframe using SQL. Note: The dataframe is always named 'df' in your query's from clause. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr query {flags} (sql)``` +`> dfr query {flags} (sql)` ## Parameters - - `sql`: sql query - +- `sql`: sql query ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Query dataframe using SQL -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-df | dfr query 'select a from df' ╭───┬───╮ │ # │ a │ diff --git a/commands/docs/dfr_rename.md b/src/content/docs/commands/docs/dfr_rename.md similarity index 88% rename from commands/docs/dfr_rename.md rename to src/content/docs/commands/docs/dfr_rename.md index 8ae564c74c9..f9c95c05e4f 100644 --- a/commands/docs/dfr_rename.md +++ b/src/content/docs/commands/docs/dfr_rename.md @@ -9,25 +9,25 @@ usage: | Rename a dataframe column. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe or lazyframe
{{ $frontmatter.dataframe_or_lazyframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr rename {flags} (columns) (new names)``` +`> dfr rename {flags} (columns) (new names)` ## 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: @@ -38,7 +38,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Renames a series -```nu + +```nushell > [5 6 7 8] | dfr into-df | dfr rename '0' new_name ╭───┬──────────╮ │ # │ new_name │ @@ -52,7 +53,8 @@ Renames a series ``` Renames a dataframe column -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-df | dfr rename a a_new ╭───┬───────┬───╮ │ # │ a_new │ b │ @@ -64,7 +66,8 @@ Renames a dataframe column ``` Renames two dataframe columns -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-df | dfr rename [a b] [a_new b_new] ╭───┬───────┬───────╮ │ # │ a_new │ b_new │ diff --git a/commands/docs/dfr_replace-all.md b/src/content/docs/commands/docs/dfr_replace-all.md similarity index 87% rename from commands/docs/dfr_replace-all.md rename to src/content/docs/commands/docs/dfr_replace-all.md index 7ea5827425f..7222ee1ff72 100644 --- a/commands/docs/dfr_replace-all.md +++ b/src/content/docs/commands/docs/dfr_replace-all.md @@ -9,25 +9,25 @@ usage: | Replace all (sub)strings by a regex pattern. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr replace-all {flags} ``` +`> dfr replace-all {flags} ` ## 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: @@ -38,7 +38,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Replaces string -```nu + +```nushell > [abac abac abac] | dfr into-df | dfr replace-all --pattern a --replace A ╭───┬──────╮ │ # │ 0 │ diff --git a/commands/docs/dfr_replace.md b/src/content/docs/commands/docs/dfr_replace.md similarity index 87% rename from commands/docs/dfr_replace.md rename to src/content/docs/commands/docs/dfr_replace.md index a15bb098990..0ad6574ff6f 100644 --- a/commands/docs/dfr_replace.md +++ b/src/content/docs/commands/docs/dfr_replace.md @@ -9,25 +9,25 @@ usage: | Replace the leftmost (sub)string by a regex pattern. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr replace {flags} ``` +`> dfr replace {flags} ` ## 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: @@ -38,7 +38,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Replaces string -```nu + +```nushell > [abc abc abc] | dfr into-df | dfr replace --pattern ab --replace AB ╭───┬─────╮ │ # │ 0 │ diff --git a/commands/docs/dfr_reverse.md b/src/content/docs/commands/docs/dfr_reverse.md similarity index 96% rename from commands/docs/dfr_reverse.md rename to src/content/docs/commands/docs/dfr_reverse.md index 0ebc094196a..5a24094018f 100644 --- a/commands/docs/dfr_reverse.md +++ b/src/content/docs/commands/docs/dfr_reverse.md @@ -9,20 +9,20 @@ usage: | Reverses the LazyFrame feature: dataframe --- + # {{ $frontmatter.title }} for lazyframe
{{ $frontmatter.lazyframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr reverse {flags} ``` +## Signature +`> dfr reverse {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Reverses the dataframe. -```nu + +```nushell > [[a b]; [6 2] [4 2] [2 2]] | dfr into-df | dfr reverse ╭───┬───┬───╮ │ # │ a │ b │ diff --git a/commands/docs/dfr_rolling.md b/src/content/docs/commands/docs/dfr_rolling.md similarity index 92% rename from commands/docs/dfr_rolling.md rename to src/content/docs/commands/docs/dfr_rolling.md index f8679c1ca01..50192c01e8a 100644 --- a/commands/docs/dfr_rolling.md +++ b/src/content/docs/commands/docs/dfr_rolling.md @@ -9,25 +9,25 @@ usage: | Rolling calculation for a series. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr rolling {flags} (type) (window)``` +`> dfr rolling {flags} (type) (window)` ## Parameters - - `type`: rolling operation - - `window`: Window size for rolling - +- `type`: rolling operation +- `window`: Window size for rolling ## Input/output types: @@ -38,7 +38,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Rolling sum for a series -```nu + +```nushell > [1 2 3 4 5] | dfr into-df | dfr rolling sum 2 | dfr drop-nulls ╭───┬───────────────╮ │ # │ 0_rolling_sum │ @@ -52,7 +53,8 @@ Rolling sum for a series ``` Rolling max for a series -```nu + +```nushell > [1 2 3 4 5] | dfr into-df | dfr rolling max 2 | dfr drop-nulls ╭───┬───────────────╮ │ # │ 0_rolling_max │ diff --git a/commands/docs/dfr_sample.md b/src/content/docs/commands/docs/dfr_sample.md similarity index 74% rename from commands/docs/dfr_sample.md rename to src/content/docs/commands/docs/dfr_sample.md index b3d895ccc57..1380920ea9c 100644 --- a/commands/docs/dfr_sample.md +++ b/src/content/docs/commands/docs/dfr_sample.md @@ -9,28 +9,28 @@ usage: | Create sample dataframe. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr sample {flags} ``` +`> dfr sample {flags} ` ## 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: @@ -41,13 +41,15 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Sample rows from dataframe -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-df | dfr sample --n-rows 1 ``` Shows sample row using fraction and replace -```nu + +```nushell > [[a b]; [1 2] [3 4] [5 6]] | dfr into-df | dfr sample --fraction 0.5 --replace ``` diff --git a/commands/docs/dfr_schema.md b/src/content/docs/commands/docs/dfr_schema.md similarity index 90% rename from commands/docs/dfr_schema.md rename to src/content/docs/commands/docs/dfr_schema.md index 7dc906a5178..7b581a5b690 100644 --- a/commands/docs/dfr_schema.md +++ b/src/content/docs/commands/docs/dfr_schema.md @@ -9,24 +9,24 @@ usage: | Show schema for a dataframe. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr schema {flags} ``` +`> dfr schema {flags} ` ## Flags - - `--datatype-list, -l`: creates a lazy dataframe - +- `--datatype-list, -l`: creates a lazy dataframe ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Dataframe schema -```nu + +```nushell > [[a b]; [1 "foo"] [3 "bar"]] | dfr into-df | dfr schema ╭───┬─────╮ │ a │ i64 │ diff --git a/commands/docs/dfr_select.md b/src/content/docs/commands/docs/dfr_select.md similarity index 90% rename from commands/docs/dfr_select.md rename to src/content/docs/commands/docs/dfr_select.md index d3953e9cdef..7c4bec8300f 100644 --- a/commands/docs/dfr_select.md +++ b/src/content/docs/commands/docs/dfr_select.md @@ -9,24 +9,24 @@ usage: | Selects columns from lazyframe. feature: dataframe --- + # {{ $frontmatter.title }} for lazyframe
{{ $frontmatter.lazyframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr select {flags} ...rest``` +`> dfr select {flags} ...rest` ## Parameters - - `...rest`: Expression(s) that define the column selection - +- `...rest`: Expression(s) that define the column selection ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Select a column from the dataframe -```nu + +```nushell > [[a b]; [6 2] [4 2] [2 2]] | dfr into-df | dfr select a ╭───┬───╮ │ # │ a │ diff --git a/commands/docs/dfr_set-with-idx.md b/src/content/docs/commands/docs/dfr_set-with-idx.md similarity index 86% rename from commands/docs/dfr_set-with-idx.md rename to src/content/docs/commands/docs/dfr_set-with-idx.md index f9ebba15c32..258acd019f2 100644 --- a/commands/docs/dfr_set-with-idx.md +++ b/src/content/docs/commands/docs/dfr_set-with-idx.md @@ -9,28 +9,28 @@ usage: | Sets value in the given index. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr set-with-idx {flags} (value)``` +`> dfr set-with-idx {flags} (value)` ## 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: @@ -41,7 +41,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Set value in selected rows from series -```nu + +```nushell > let series = ([4 1 5 2 4 3] | dfr into-df); let indices = ([0 2] | dfr into-df); $series | dfr set-with-idx 6 --indices $indices diff --git a/commands/docs/dfr_set.md b/src/content/docs/commands/docs/dfr_set.md similarity index 88% rename from commands/docs/dfr_set.md rename to src/content/docs/commands/docs/dfr_set.md index bb4a9f8d810..a35a6f2d8b7 100644 --- a/commands/docs/dfr_set.md +++ b/src/content/docs/commands/docs/dfr_set.md @@ -9,28 +9,28 @@ usage: | Sets value where given mask is true. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr set {flags} (value)``` +`> dfr set {flags} (value)` ## 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: @@ -41,7 +41,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Shifts the values by a given period -```nu + +```nushell > let s = ([1 2 2 3 3] | dfr into-df | dfr shift 2); let mask = ($s | dfr is-null); $s | dfr set 0 --mask $mask diff --git a/commands/docs/dfr_shape.md b/src/content/docs/commands/docs/dfr_shape.md similarity index 96% rename from commands/docs/dfr_shape.md rename to src/content/docs/commands/docs/dfr_shape.md index 331adee1443..26544bf1c42 100644 --- a/commands/docs/dfr_shape.md +++ b/src/content/docs/commands/docs/dfr_shape.md @@ -9,20 +9,20 @@ usage: | Shows column and row size for a dataframe. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr shape {flags} ``` +## Signature +`> dfr shape {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Shows row and column shape -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-df | dfr shape ╭───┬──────┬─────────╮ │ # │ rows │ columns │ diff --git a/commands/docs/dfr_shift.md b/src/content/docs/commands/docs/dfr_shift.md similarity index 87% rename from commands/docs/dfr_shift.md rename to src/content/docs/commands/docs/dfr_shift.md index fe61ed70787..6db6bef039a 100644 --- a/commands/docs/dfr_shift.md +++ b/src/content/docs/commands/docs/dfr_shift.md @@ -9,28 +9,28 @@ usage: | Shifts the values by a given period. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe or lazyframe
{{ $frontmatter.dataframe_or_lazyframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr shift {flags} (period)``` +`> dfr shift {flags} (period)` ## 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: @@ -41,7 +41,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Shifts the values by a given period -```nu + +```nushell > [1 2 2 3 3] | dfr into-df | dfr shift 2 | dfr drop-nulls ╭───┬───╮ │ # │ 0 │ diff --git a/commands/docs/dfr_slice.md b/src/content/docs/commands/docs/dfr_slice.md similarity index 90% rename from commands/docs/dfr_slice.md rename to src/content/docs/commands/docs/dfr_slice.md index 8a260dc57bb..5fc2600af52 100644 --- a/commands/docs/dfr_slice.md +++ b/src/content/docs/commands/docs/dfr_slice.md @@ -9,25 +9,25 @@ usage: | Creates new dataframe from a slice of rows. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr slice {flags} (offset) (size)``` +`> dfr slice {flags} (offset) (size)` ## Parameters - - `offset`: start of slice - - `size`: size of slice - +- `offset`: start of slice +- `size`: size of slice ## Input/output types: @@ -38,7 +38,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Create new dataframe from a slice of the rows -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-df | dfr slice 0 1 ╭───┬───┬───╮ │ # │ a │ b │ diff --git a/commands/docs/dfr_sort-by.md b/src/content/docs/commands/docs/dfr_sort-by.md similarity index 82% rename from commands/docs/dfr_sort-by.md rename to src/content/docs/commands/docs/dfr_sort-by.md index 8056a777cc2..ad2f0689578 100644 --- a/commands/docs/dfr_sort-by.md +++ b/src/content/docs/commands/docs/dfr_sort-by.md @@ -9,30 +9,30 @@ usage: | Sorts a lazy dataframe based on expression(s). feature: dataframe --- + # {{ $frontmatter.title }} for lazyframe
{{ $frontmatter.lazyframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr sort-by {flags} ...rest``` +`> dfr sort-by {flags} ...rest` ## 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: @@ -43,7 +43,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Sort dataframe by one column -```nu + +```nushell > [[a b]; [6 2] [1 4] [4 1]] | dfr into-df | dfr sort-by a ╭───┬───┬───╮ │ # │ a │ b │ @@ -56,7 +57,8 @@ Sort dataframe by one column ``` Sort column using two columns -```nu + +```nushell > [[a b]; [6 2] [1 1] [1 4] [2 4]] | dfr into-df | dfr sort-by [a b] -r [false true] ╭───┬───┬───╮ │ # │ a │ b │ diff --git a/commands/docs/dfr_std.md b/src/content/docs/commands/docs/dfr_std.md similarity index 97% rename from commands/docs/dfr_std.md rename to src/content/docs/commands/docs/dfr_std.md index 218c2ce5fb1..b735c33e43c 100644 --- a/commands/docs/dfr_std.md +++ b/src/content/docs/commands/docs/dfr_std.md @@ -9,20 +9,20 @@ usage: | Creates a std expression for an aggregation of std value from columns in a dataframe. feature: dataframe --- + # {{ $frontmatter.title }} for expression
{{ $frontmatter.expression }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr std {flags} ``` +## Signature +`> dfr std {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Std value from columns in a dataframe -```nu + +```nushell > [[a b]; [6 2] [4 2] [2 2]] | dfr into-df | dfr std ╭───┬──────┬──────╮ │ # │ a │ b │ @@ -44,7 +45,8 @@ Std value from columns in a dataframe ``` Std aggregation for a group-by -```nu + +```nushell > [[a b]; [one 2] [one 2] [two 1] [two 1]] | dfr into-df | dfr group-by a diff --git a/commands/docs/dfr_str-lengths.md b/src/content/docs/commands/docs/dfr_str-lengths.md similarity index 95% rename from commands/docs/dfr_str-lengths.md rename to src/content/docs/commands/docs/dfr_str-lengths.md index b2d5ace375b..d5e05a86944 100644 --- a/commands/docs/dfr_str-lengths.md +++ b/src/content/docs/commands/docs/dfr_str-lengths.md @@ -9,20 +9,20 @@ usage: | Get lengths of all strings. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr str-lengths {flags} ``` +## Signature +`> dfr str-lengths {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Returns string lengths -```nu + +```nushell > [a ab abc] | dfr into-df | dfr str-lengths ╭───┬───╮ │ # │ 0 │ diff --git a/commands/docs/dfr_str-slice.md b/src/content/docs/commands/docs/dfr_str-slice.md similarity index 90% rename from commands/docs/dfr_str-slice.md rename to src/content/docs/commands/docs/dfr_str-slice.md index ef54b8f7a55..4af3ac9696c 100644 --- a/commands/docs/dfr_str-slice.md +++ b/src/content/docs/commands/docs/dfr_str-slice.md @@ -9,28 +9,28 @@ usage: | Slices the string from the start position until the selected length. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr str-slice {flags} (start)``` +`> dfr str-slice {flags} (start)` ## Flags - - `--length, -l {int}`: optional length +- `--length, -l {int}`: optional length ## Parameters - - `start`: start of slice - +- `start`: start of slice ## Input/output types: @@ -41,7 +41,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Creates slices from the strings -```nu + +```nushell > [abcded abc321 abc123] | dfr into-df | dfr str-slice 1 --length 2 ╭───┬────╮ │ # │ 0 │ diff --git a/commands/docs/dfr_strftime.md b/src/content/docs/commands/docs/dfr_strftime.md similarity index 94% rename from commands/docs/dfr_strftime.md rename to src/content/docs/commands/docs/dfr_strftime.md index 895d298777f..00550cc6b97 100644 --- a/commands/docs/dfr_strftime.md +++ b/src/content/docs/commands/docs/dfr_strftime.md @@ -9,24 +9,24 @@ usage: | Formats date based on string rule. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr strftime {flags} (fmt)``` +`> dfr strftime {flags} (fmt)` ## Parameters - - `fmt`: Format rule - +- `fmt`: Format rule ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Formats date -```nu + +```nushell > let dt = ('2020-08-04T16:39:18+00:00' | into datetime --timezone 'UTC'); let df = ([$dt $dt] | dfr into-df); $df | dfr strftime "%Y/%m/%d" diff --git a/commands/docs/dfr_sum.md b/src/content/docs/commands/docs/dfr_sum.md similarity index 96% rename from commands/docs/dfr_sum.md rename to src/content/docs/commands/docs/dfr_sum.md index da90e3bf8df..f0a905a981b 100644 --- a/commands/docs/dfr_sum.md +++ b/src/content/docs/commands/docs/dfr_sum.md @@ -9,20 +9,20 @@ usage: | Creates a sum expression for an aggregation or aggregates columns to their sum value. feature: dataframe --- + # {{ $frontmatter.title }} for expression
{{ $frontmatter.expression }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr sum {flags} ``` +## Signature +`> dfr sum {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Sums all columns in a dataframe -```nu + +```nushell > [[a b]; [6 2] [1 4] [4 1]] | dfr into-df | dfr sum ╭───┬────┬───╮ │ # │ a │ b │ @@ -44,7 +45,8 @@ Sums all columns in a dataframe ``` Sum aggregation for a group-by -```nu + +```nushell > [[a b]; [one 2] [one 4] [two 1]] | dfr into-df | dfr group-by a diff --git a/commands/docs/dfr_summary.md b/src/content/docs/commands/docs/dfr_summary.md similarity index 95% rename from commands/docs/dfr_summary.md rename to src/content/docs/commands/docs/dfr_summary.md index 43536b60e3f..563f30ca7c5 100644 --- a/commands/docs/dfr_summary.md +++ b/src/content/docs/commands/docs/dfr_summary.md @@ -9,24 +9,24 @@ usage: | For a dataframe, produces descriptive statistics (summary statistics) for its numeric columns. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr summary {flags} ``` +`> dfr summary {flags} ` ## Flags - - `--quantiles, -q {table}`: provide optional quantiles - +- `--quantiles, -q {table}`: provide optional quantiles ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples list dataframe descriptives -```nu + +```nushell > [[a b]; [1 1] [1 1]] | dfr into-df | dfr summary ╭───┬────────────┬─────────┬─────────╮ │ # │ descriptor │ a (i64) │ b (i64) │ diff --git a/commands/docs/dfr_take.md b/src/content/docs/commands/docs/dfr_take.md similarity index 92% rename from commands/docs/dfr_take.md rename to src/content/docs/commands/docs/dfr_take.md index 0f8a62529e0..dfb9aca46e2 100644 --- a/commands/docs/dfr_take.md +++ b/src/content/docs/commands/docs/dfr_take.md @@ -9,24 +9,24 @@ usage: | Creates new dataframe using the given indices. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr take {flags} (indices)``` +`> dfr take {flags} (indices)` ## Parameters - - `indices`: list of indices used to take data - +- `indices`: list of indices used to take data ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Takes selected rows from dataframe -```nu + +```nushell > let df = ([[a b]; [4 1] [5 2] [4 3]] | dfr into-df); let indices = ([0 2] | dfr into-df); $df | dfr take $indices @@ -51,7 +52,8 @@ Takes selected rows from dataframe ``` Takes selected rows from series -```nu + +```nushell > let series = ([4 1 5 2 4 3] | dfr into-df); let indices = ([0 2] | dfr into-df); $series | dfr take $indices diff --git a/commands/docs/dfr_to-arrow.md b/src/content/docs/commands/docs/dfr_to-arrow.md similarity index 90% rename from commands/docs/dfr_to-arrow.md rename to src/content/docs/commands/docs/dfr_to-arrow.md index 4c0b0a3971e..13f605e5d9b 100644 --- a/commands/docs/dfr_to-arrow.md +++ b/src/content/docs/commands/docs/dfr_to-arrow.md @@ -9,24 +9,24 @@ usage: | Saves dataframe to arrow file. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr to-arrow {flags} (file)``` +`> dfr to-arrow {flags} (file)` ## Parameters - - `file`: file path to save dataframe - +- `file`: file path to save dataframe ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Saves dataframe to arrow file -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-df | dfr to-arrow test.arrow ``` diff --git a/commands/docs/dfr_to-avro.md b/src/content/docs/commands/docs/dfr_to-avro.md similarity index 83% rename from commands/docs/dfr_to-avro.md rename to src/content/docs/commands/docs/dfr_to-avro.md index 5eacadbb869..f6805dc95b0 100644 --- a/commands/docs/dfr_to-avro.md +++ b/src/content/docs/commands/docs/dfr_to-avro.md @@ -9,28 +9,28 @@ usage: | Saves dataframe to avro file. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr to-avro {flags} (file)``` +`> dfr to-avro {flags} (file)` ## Flags - - `--compression, -c {string}`: use compression, supports deflate or snappy +- `--compression, -c {string}`: use compression, supports deflate or snappy ## Parameters - - `file`: file path to save dataframe - +- `file`: file path to save dataframe ## Input/output types: @@ -41,7 +41,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Saves dataframe to avro file -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-df | dfr to-avro test.avro ``` diff --git a/commands/docs/dfr_to-csv.md b/src/content/docs/commands/docs/dfr_to-csv.md similarity index 81% rename from commands/docs/dfr_to-csv.md rename to src/content/docs/commands/docs/dfr_to-csv.md index 0bfe204e1b2..6cfe016c41a 100644 --- a/commands/docs/dfr_to-csv.md +++ b/src/content/docs/commands/docs/dfr_to-csv.md @@ -9,29 +9,29 @@ usage: | Saves dataframe to CSV file. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr to-csv {flags} (file)``` +`> dfr to-csv {flags} (file)` ## Flags - - `--delimiter, -d {string}`: file delimiter character - - `--no-header, -`: Indicates if file doesn't have header +- `--delimiter, -d {string}`: file delimiter character +- `--no-header, -`: Indicates if file doesn't have header ## Parameters - - `file`: file path to save dataframe - +- `file`: file path to save dataframe ## Input/output types: @@ -42,13 +42,15 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Saves dataframe to CSV file -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-df | dfr to-csv test.csv ``` Saves dataframe to CSV file using other delimiter -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-df | dfr to-csv test.csv --delimiter '|' ``` diff --git a/commands/docs/dfr_to-jsonl.md b/src/content/docs/commands/docs/dfr_to-jsonl.md similarity index 90% rename from commands/docs/dfr_to-jsonl.md rename to src/content/docs/commands/docs/dfr_to-jsonl.md index 8671951f839..eaa950ef1e5 100644 --- a/commands/docs/dfr_to-jsonl.md +++ b/src/content/docs/commands/docs/dfr_to-jsonl.md @@ -9,24 +9,24 @@ usage: | Saves dataframe to a JSON lines file. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr to-jsonl {flags} (file)``` +`> dfr to-jsonl {flags} (file)` ## Parameters - - `file`: file path to save dataframe - +- `file`: file path to save dataframe ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Saves dataframe to JSON lines file -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-df | dfr to-jsonl test.jsonl ``` diff --git a/commands/docs/dfr_to-parquet.md b/src/content/docs/commands/docs/dfr_to-parquet.md similarity index 90% rename from commands/docs/dfr_to-parquet.md rename to src/content/docs/commands/docs/dfr_to-parquet.md index 60feacc3050..a0acb532e3f 100644 --- a/commands/docs/dfr_to-parquet.md +++ b/src/content/docs/commands/docs/dfr_to-parquet.md @@ -9,24 +9,24 @@ usage: | Saves dataframe to parquet file. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr to-parquet {flags} (file)``` +`> dfr to-parquet {flags} (file)` ## Parameters - - `file`: file path to save dataframe - +- `file`: file path to save dataframe ## Input/output types: @@ -37,7 +37,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Saves dataframe to parquet file -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-df | dfr to-parquet test.parquet ``` diff --git a/commands/docs/dfr_unique.md b/src/content/docs/commands/docs/dfr_unique.md similarity index 78% rename from commands/docs/dfr_unique.md rename to src/content/docs/commands/docs/dfr_unique.md index 850ff3ba4e0..3c4a5b8b360 100644 --- a/commands/docs/dfr_unique.md +++ b/src/content/docs/commands/docs/dfr_unique.md @@ -9,26 +9,26 @@ usage: | Returns unique values from a dataframe. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe or lazyframe
{{ $frontmatter.dataframe_or_lazyframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr unique {flags} ``` +`> dfr unique {flags} ` ## 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: @@ -39,7 +39,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Returns unique values from a series -```nu + +```nushell > [2 2 2 2 2] | dfr into-df | dfr unique ╭───┬───╮ │ # │ 0 │ @@ -50,7 +51,8 @@ Returns unique values from a series ``` Creates a is unique expression from a column -```nu + +```nushell > col a | unique ``` diff --git a/commands/docs/dfr_uppercase.md b/src/content/docs/commands/docs/dfr_uppercase.md similarity index 96% rename from commands/docs/dfr_uppercase.md rename to src/content/docs/commands/docs/dfr_uppercase.md index ae78626a685..6e3ec4ad1bc 100644 --- a/commands/docs/dfr_uppercase.md +++ b/src/content/docs/commands/docs/dfr_uppercase.md @@ -9,20 +9,20 @@ usage: | Uppercase the strings in the column. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr uppercase {flags} ``` +## Signature +`> dfr uppercase {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Modifies strings to uppercase -```nu + +```nushell > [Abc aBc abC] | dfr into-df | dfr uppercase ╭───┬─────╮ │ # │ 0 │ diff --git a/commands/docs/dfr_value-counts.md b/src/content/docs/commands/docs/dfr_value-counts.md similarity index 96% rename from commands/docs/dfr_value-counts.md rename to src/content/docs/commands/docs/dfr_value-counts.md index 2266c971114..515030e168a 100644 --- a/commands/docs/dfr_value-counts.md +++ b/src/content/docs/commands/docs/dfr_value-counts.md @@ -9,20 +9,20 @@ usage: | Returns a dataframe with the counts for unique values in series. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe
{{ $frontmatter.dataframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr value-counts {flags} ``` +## Signature +`> dfr value-counts {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Calculates value counts -```nu + +```nushell > [5 5 5 5 6 6] | dfr into-df | dfr value-counts ╭───┬───┬───────╮ │ # │ 0 │ count │ diff --git a/commands/docs/dfr_var.md b/src/content/docs/commands/docs/dfr_var.md similarity index 97% rename from commands/docs/dfr_var.md rename to src/content/docs/commands/docs/dfr_var.md index 183b3297ecd..3d21d9effe0 100644 --- a/commands/docs/dfr_var.md +++ b/src/content/docs/commands/docs/dfr_var.md @@ -9,20 +9,20 @@ usage: | Create a var expression for an aggregation. feature: dataframe --- + # {{ $frontmatter.title }} for expression
{{ $frontmatter.expression }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: -## Signature -```> dfr var {flags} ``` +## Signature +`> dfr var {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Var value from columns in a dataframe or aggregates columns to their var value -```nu + +```nushell > [[a b]; [6 2] [4 2] [2 2]] | dfr into-df | dfr var ╭───┬──────┬──────╮ │ # │ a │ b │ @@ -44,7 +45,8 @@ Var value from columns in a dataframe or aggregates columns to their var value ``` Var aggregation for a group-by -```nu + +```nushell > [[a b]; [one 2] [one 2] [two 1] [two 1]] | dfr into-df | dfr group-by a diff --git a/commands/docs/dfr_when.md b/src/content/docs/commands/docs/dfr_when.md similarity index 87% rename from commands/docs/dfr_when.md rename to src/content/docs/commands/docs/dfr_when.md index 7f39cd78a74..c712acef15f 100644 --- a/commands/docs/dfr_when.md +++ b/src/content/docs/commands/docs/dfr_when.md @@ -9,25 +9,25 @@ usage: | Creates and modifies a when expression. feature: dataframe --- + # {{ $frontmatter.title }} for expression
{{ $frontmatter.expression }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr when {flags} (when expression) (then expression)``` +`> dfr when {flags} (when expression) (then expression)` ## 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: @@ -38,19 +38,22 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Create a when conditions -```nu + +```nushell > dfr when ((dfr col a) > 2) 4 ``` Create a when conditions -```nu + +```nushell > dfr when ((dfr col a) > 2) 4 | dfr when ((dfr col a) < 0) 6 ``` Create a new column for the dataframe -```nu + +```nushell > [[a b]; [6 2] [1 4] [4 1]] | dfr into-lazy | dfr with-column ( diff --git a/commands/docs/dfr_with-column.md b/src/content/docs/commands/docs/dfr_with-column.md similarity index 90% rename from commands/docs/dfr_with-column.md rename to src/content/docs/commands/docs/dfr_with-column.md index 94e66abed75..fa89455711b 100644 --- a/commands/docs/dfr_with-column.md +++ b/src/content/docs/commands/docs/dfr_with-column.md @@ -9,28 +9,28 @@ usage: | Adds a series to the dataframe. feature: dataframe --- + # {{ $frontmatter.title }} for dataframe or lazyframe
{{ $frontmatter.dataframe_or_lazyframe }}
- ::: warning Dataframe commands were not shipped in the official binaries by default, you have to build it with `--features=dataframe` flag ::: + ## Signature -```> dfr with-column {flags} ...rest``` +`> dfr with-column {flags} ...rest` ## Flags - - `--name, -n {string}`: new column name +- `--name, -n {string}`: new column name ## 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: @@ -41,7 +41,8 @@ Dataframe commands were not shipped in the official binaries by default, you hav ## Examples Adds a series to the dataframe -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-df | dfr with-column ([5 6] | dfr into-df) --name c @@ -55,7 +56,8 @@ Adds a series to the dataframe ``` Adds a series to the dataframe -```nu + +```nushell > [[a b]; [1 2] [3 4]] | dfr into-lazy | dfr with-column [ diff --git a/commands/docs/do.md b/src/content/docs/commands/docs/do.md similarity index 71% rename from commands/docs/do.md rename to src/content/docs/commands/docs/do.md index 7b8f44dc6ab..8896c656271 100644 --- a/commands/docs/do.md +++ b/src/content/docs/commands/docs/do.md @@ -9,6 +9,7 @@ usage: | Run a closure, providing it with the pipeline input. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,21 +18,20 @@ feature: default ## Signature -```> do {flags} (closure) ...rest``` +`> do {flags} (closure) ...rest` ## Flags - - `--ignore-errors, -i`: ignore errors as the closure runs - - `--ignore-shell-errors, -s`: ignore shell errors as the closure runs - - `--ignore-program-errors, -p`: ignore external program 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 +- `--ignore-shell-errors, -s`: ignore shell errors as the closure runs +- `--ignore-program-errors, -p`: ignore external program 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 - - `closure`: The closure to run. - - `...rest`: The parameter(s) for the closure. - +- `closure`: The closure to run. +- `...rest`: The parameter(s) for the closure. ## Input/output types: @@ -42,55 +42,64 @@ feature: default ## Examples Run the closure -```nu + +```nushell > do { echo hello } hello ``` Run a stored first-class closure -```nu + +```nushell > 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 -```nu + +```nushell > do --ignore-errors { thisisnotarealcommand } ``` Run the closure and ignore shell errors -```nu + +```nushell > do --ignore-shell-errors { thisisnotarealcommand } ``` Run the closure and ignore external program errors -```nu + +```nushell > do --ignore-program-errors { nu --commands 'exit 1' }; echo "I'll still run" ``` Abort the pipeline if a program returns a non-zero exit code -```nu + +```nushell > do --capture-errors { nu --commands 'exit 1' } | myscarycommand ``` Run the closure, with a positional parameter -```nu + +```nushell > do {|x| 100 + $x } 77 177 ``` Run the closure, with input -```nu + +```nushell > 77 | do {|x| 100 + $in } ``` Run the closure and keep changes to the environment -```nu + +```nushell > do --env { $env.foo = 'bar' }; $env.foo bar ``` diff --git a/commands/docs/drop.md b/src/content/docs/commands/docs/drop.md similarity index 89% rename from commands/docs/drop.md rename to src/content/docs/commands/docs/drop.md index 5fce36a505c..beb955349df 100644 --- a/commands/docs/drop.md +++ b/src/content/docs/commands/docs/drop.md @@ -9,6 +9,7 @@ usage: | Remove items/rows from the end of the input list/table. Counterpart of `skip`. Opposite of `last`. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,23 +18,24 @@ feature: default ## Signature -```> drop {flags} (rows)``` +`> drop {flags} (rows)` ## Parameters - - `rows`: The number of items to remove. - +- `rows`: The number of items to remove. ## Input/output types: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | -| table | table | +| table | table | + ## Examples Remove the last item of a list -```nu + +```nushell > [0,1,2,3] | drop ╭───┬───╮ │ 0 │ 0 │ @@ -44,7 +46,8 @@ Remove the last item of a list ``` Remove zero item of a list -```nu + +```nushell > [0,1,2,3] | drop 0 ╭───┬───╮ │ 0 │ 0 │ @@ -56,7 +59,8 @@ Remove zero item of a list ``` Remove the last two items of a list -```nu + +```nushell > [0,1,2,3] | drop 2 ╭───┬───╮ │ 0 │ 0 │ @@ -66,7 +70,8 @@ Remove the last two items of a list ``` Remove the last row in a table -```nu + +```nushell > [[a, b]; [1, 2] [3, 4]] | drop 1 ╭───┬───┬───╮ │ # │ a │ b │ @@ -76,10 +81,9 @@ Remove the last row in a table ``` - ## Subcommands: | name | type | usage | | ---------------------------------------------- | ------- | --------------------------------------------------------------------------------------------------- | | [`drop column`](/commands/docs/drop_column.md) | Builtin | Remove N columns at the right-hand end of the input table. To remove columns by name, use `reject`. | -| [`drop nth`](/commands/docs/drop_nth.md) | Builtin | Drop the selected rows. | \ No newline at end of file +| [`drop nth`](/commands/docs/drop_nth.md) | Builtin | Drop the selected rows. | diff --git a/commands/docs/drop_column.md b/src/content/docs/commands/docs/drop_column.md similarity index 90% rename from commands/docs/drop_column.md rename to src/content/docs/commands/docs/drop_column.md index 67f0705bef5..940af98f036 100644 --- a/commands/docs/drop_column.md +++ b/src/content/docs/commands/docs/drop_column.md @@ -9,6 +9,7 @@ usage: | Remove N columns at the right-hand end of the input table. To remove columns by name, use `reject`. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,12 +18,11 @@ feature: default ## Signature -```> drop column {flags} (columns)``` +`> drop column {flags} (columns)` ## Parameters - - `columns`: Starting from the end, the number of columns to remove. - +- `columns`: Starting from the end, the number of columns to remove. ## Input/output types: @@ -30,10 +30,12 @@ feature: default | ------ | ------ | | record | record | | table | table | + ## Examples Remove the last column of a table -```nu + +```nushell > [[lib, extension]; [nu-lib, rs] [nu-core, rb]] | drop column ╭───┬─────────╮ │ # │ lib │ @@ -45,7 +47,8 @@ Remove the last column of a table ``` Remove the last column of a record -```nu + +```nushell > {lib: nu-lib, extension: rs} | drop column ╭─────┬────────╮ │ lib │ nu-lib │ diff --git a/commands/docs/drop_nth.md b/src/content/docs/commands/docs/drop_nth.md similarity index 83% rename from commands/docs/drop_nth.md rename to src/content/docs/commands/docs/drop_nth.md index 3a967769426..afc63541ad7 100644 --- a/commands/docs/drop_nth.md +++ b/src/content/docs/commands/docs/drop_nth.md @@ -9,6 +9,7 @@ usage: | Drop the selected rows. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,24 +18,24 @@ feature: default ## Signature -```> drop nth {flags} (row number or row range) ...rest``` +`> drop nth {flags} (row number or row range) ...rest` ## Parameters - - `row number or row range`: The number of the row to drop or a range to drop consecutive rows. - - `...rest`: The number of the row to drop. - +- `row number or row range`: The number of the row to drop or a range to drop consecutive rows. +- `...rest`: The number of the row to drop. ## Input/output types: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | ## Examples Drop the first, second, and third row -```nu + +```nushell > [sam,sarah,2,3,4,5] | drop nth 0 1 2 ╭───┬───╮ │ 0 │ 3 │ @@ -45,7 +46,8 @@ Drop the first, second, and third row ``` Drop the first, second, and third row -```nu + +```nushell > [0,1,2,3,4,5] | drop nth 0 1 2 ╭───┬───╮ │ 0 │ 3 │ @@ -56,7 +58,8 @@ Drop the first, second, and third row ``` Drop rows 0 2 4 -```nu + +```nushell > [0,1,2,3,4,5] | drop nth 0 2 4 ╭───┬───╮ │ 0 │ 1 │ @@ -67,7 +70,8 @@ Drop rows 0 2 4 ``` Drop rows 2 0 4 -```nu + +```nushell > [0,1,2,3,4,5] | drop nth 2 0 4 ╭───┬───╮ │ 0 │ 1 │ @@ -78,7 +82,8 @@ Drop rows 2 0 4 ``` Drop range rows from second to fourth -```nu + +```nushell > [first second third fourth fifth] | drop nth (1..3) ╭───┬───────╮ │ 0 │ first │ @@ -88,7 +93,8 @@ Drop range rows from second to fourth ``` Drop all rows except first row -```nu + +```nushell > [0,1,2,3,4,5] | drop nth 1.. ╭───┬───╮ │ 0 │ 0 │ @@ -97,7 +103,8 @@ Drop all rows except first row ``` Drop rows 3,4,5 -```nu + +```nushell > [0,1,2,3,4,5] | drop nth 3.. ╭───┬───╮ │ 0 │ 0 │ diff --git a/commands/docs/du.md b/src/content/docs/commands/docs/du.md similarity index 62% rename from commands/docs/du.md rename to src/content/docs/commands/docs/du.md index 65125dbcaad..7913b81173a 100644 --- a/commands/docs/du.md +++ b/src/content/docs/commands/docs/du.md @@ -9,6 +9,7 @@ usage: | Find disk usage sizes of specified items. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,20 +18,19 @@ feature: default ## Signature -```> du {flags} (path)``` +`> du {flags} (path)` ## Flags - - `--all, -a`: Output file sizes as well as directory sizes - - `--deref, -r`: Dereference symlinks to their targets for size - - `--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`: Output file sizes as well as directory sizes +- `--deref, -r`: Dereference symlinks to their targets for size +- `--exclude, -x {glob}`: Exclude these file names +- `--max-depth, -d {int}`: Directory recursion limit +- `--min-size, -m {int}`: Exclude files below this size ## Parameters - - `path`: Starting directory. - +- `path`: Starting directory. ## Input/output types: @@ -41,7 +41,8 @@ feature: default ## Examples Disk usage of the current directory -```nu + +```nushell > du ``` diff --git a/commands/docs/each.md b/src/content/docs/commands/docs/each.md similarity index 90% rename from commands/docs/each.md rename to src/content/docs/commands/docs/each.md index 320018eb56c..21d0a0724db 100644 --- a/commands/docs/each.md +++ b/src/content/docs/commands/docs/each.md @@ -9,6 +9,7 @@ usage: | Run a closure on each row of the input list, creating a new list with the results. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,28 +18,29 @@ feature: default ## Signature -```> each {flags} (closure)``` +`> each {flags} (closure)` ## Flags - - `--keep-empty, -k`: keep empty result cells +- `--keep-empty, -k`: keep empty result cells ## Parameters - - `closure`: The closure to run. - +- `closure`: The closure to run. ## Input/output types: -| input | output | -| --------- | --------- | -| any | any | +| input | output | +| ----------- | ----------- | +| any | any | | list\ | list\ | -| table | list\ | +| table | list\ | + ## Examples Multiplies elements in the list -```nu + +```nushell > [1 2 3] | each {|e| 2 * $e } ╭───┬───╮ │ 0 │ 2 │ @@ -49,7 +51,8 @@ Multiplies elements in the list ``` Produce a list of values in the record, converted to string -```nu + +```nushell > {major:2, minor:1, patch:4} | values | each {|| into string } ╭───┬───╮ │ 0 │ 2 │ @@ -60,7 +63,8 @@ Produce a list of values in the record, converted to string ``` Produce a list that has "two" for each 2 in the input -```nu + +```nushell > [1 2 3 2] | each {|e| if $e == 2 { "two" } } ╭───┬─────╮ │ 0 │ two │ @@ -70,7 +74,8 @@ Produce a list that has "two" for each 2 in the input ``` Iterate over each element, producing a list showing indexes of any 2s -```nu + +```nushell > [1 2 3] | enumerate | each {|e| if $e.item == 2 { $"found 2 at ($e.index)!"} } ╭───┬───────────────╮ │ 0 │ found 2 at 1! │ @@ -79,7 +84,8 @@ Iterate over each element, producing a list showing indexes of any 2s ``` Iterate over each element, keeping null results -```nu + +```nushell > [1 2 3] | each --keep-empty {|e| if $e == 2 { "found 2!"} } ╭───┬──────────╮ │ 0 │ │ @@ -90,6 +96,7 @@ Iterate over each element, keeping null results ``` ## Notes + Since tables are lists of records, passing a table into 'each' will iterate over each record, not necessarily each cell within it. diff --git a/commands/docs/each_while.md b/src/content/docs/commands/docs/each_while.md similarity index 83% rename from commands/docs/each_while.md rename to src/content/docs/commands/docs/each_while.md index cf5075f598a..1d4179d47df 100644 --- a/commands/docs/each_while.md +++ b/src/content/docs/commands/docs/each_while.md @@ -9,35 +9,36 @@ usage: | Run a block on each row of the input list until a null is found, then create a new list with the results. feature: extra --- + # {{ $frontmatter.title }} for filters
{{ $frontmatter.filters }}
- ::: warning - Command `each while` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `each while` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> each while {flags} (closure)``` +`> each while {flags} (closure)` ## Parameters - - `closure`: the closure to run - +- `closure`: the closure to run ## Input/output types: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | ## Examples Produces a list of each element before the 3, doubled -```nu + +```nushell > [1 2 3 2 1] | each while {|e| if $e < 3 { $e * 2 } } ╭───┬───╮ │ 0 │ 2 │ @@ -47,7 +48,8 @@ Produces a list of each element before the 3, doubled ``` Output elements until reaching 'stop' -```nu + +```nushell > [1 2 stop 3 4] | each while {|e| if $e != 'stop' { $"Output: ($e)" } } ╭───┬───────────╮ │ 0 │ Output: 1 │ @@ -57,7 +59,8 @@ Output elements until reaching 'stop' ``` Iterate over each element, printing the matching value and its index -```nu + +```nushell > [1 2 3] | enumerate | each while {|e| if $e.item < 2 { $"value ($e.item) at ($e.index)!"} } ╭───┬───────────────╮ │ 0 │ value 1 at 0! │ diff --git a/commands/docs/echo.md b/src/content/docs/commands/docs/echo.md similarity index 87% rename from commands/docs/echo.md rename to src/content/docs/commands/docs/echo.md index 01fe1f57ae0..85d252ec546 100644 --- a/commands/docs/echo.md +++ b/src/content/docs/commands/docs/echo.md @@ -9,6 +9,7 @@ usage: | Returns its arguments, ignoring the piped-in value. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,12 +18,11 @@ feature: default ## Signature -```> echo {flags} ...rest``` +`> echo {flags} ...rest` ## Parameters - - `...rest`: The values to echo. - +- `...rest`: The values to echo. ## Input/output types: @@ -33,7 +33,8 @@ feature: default ## Examples Put a list of numbers in the pipeline. This is the same as [1 2 3]. -```nu + +```nushell > echo 1 2 3 ╭───┬───╮ │ 0 │ 1 │ @@ -44,12 +45,14 @@ Put a list of numbers in the pipeline. This is the same as [1 2 3]. ``` Returns the piped-in value, by using the special $in variable to obtain it. -```nu + +```nushell > echo $in ``` ## Notes + When given no arguments, it returns an empty string. When given one argument, it returns it. Otherwise, it returns a list of the arguments. There is usually -little reason to use this over just writing the values as-is. \ No newline at end of file +little reason to use this over just writing the values as-is. diff --git a/commands/docs/encode.md b/src/content/docs/commands/docs/encode.md similarity index 88% rename from commands/docs/encode.md rename to src/content/docs/commands/docs/encode.md index 3168cf08f30..ec25407a429 100644 --- a/commands/docs/encode.md +++ b/src/content/docs/commands/docs/encode.md @@ -9,6 +9,7 @@ usage: | Encode a string into bytes. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,16 +18,15 @@ feature: default ## Signature -```> encode {flags} (encoding)``` +`> encode {flags} (encoding)` ## 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 - - `encoding`: The text encoding to use. - +- `encoding`: The text encoding to use. ## Input/output types: @@ -37,7 +37,8 @@ feature: default ## Examples Encode an UTF-8 string into Shift-JIS -```nu + +```nushell > "負けると知って戦うのが、遥かに美しいのだ" | encode shift-jis Length: 40 (0x28) bytes | printable whitespace ascii_other non_ascii 00000000: 95 89 82 af 82 e9 82 c6 92 6d 82 c1 82 c4 90 ed ×××××××××m×××××× @@ -47,7 +48,8 @@ Length: 40 (0x28) bytes | printable whitespace ascii_other non_ascii ``` Replace characters with HTML entities if they can't be encoded -```nu + +```nushell > "🎈" | encode --ignore-errors shift-jis Length: 9 (0x9) bytes | printable whitespace ascii_other non_ascii 00000000: 26 23 31 32 37 38 38 30 3b 🎈 @@ -55,6 +57,7 @@ Length: 9 (0x9) bytes | printable whitespace ascii_other non_ascii ``` ## Notes + Multiple encodings are supported; here are a few: big5, euc-jp, euc-kr, gbk, iso-8859-1, cp1252, latin5 @@ -68,4 +71,4 @@ documentation link at https://docs.rs/encoding_rs/latest/encoding_rs/#statics | name | type | usage | | -------------------------------------------------- | ------- | --------------------------------------------- | | [`encode base64`](/commands/docs/encode_base64.md) | Builtin | Encode a string or binary value using Base64. | -| [`encode hex`](/commands/docs/encode_hex.md) | Builtin | Encode a binary value using hex. | \ No newline at end of file +| [`encode hex`](/commands/docs/encode_hex.md) | Builtin | Encode a binary value using hex. | diff --git a/commands/docs/encode_base64.md b/src/content/docs/commands/docs/encode_base64.md similarity index 61% rename from commands/docs/encode_base64.md rename to src/content/docs/commands/docs/encode_base64.md index cb08d37fbef..b3dcd734cac 100644 --- a/commands/docs/encode_base64.md +++ b/src/content/docs/commands/docs/encode_base64.md @@ -9,6 +9,7 @@ usage: | Encode a string or binary value using Base64. feature: default --- + # {{ $frontmatter.title }} for hash @@ -17,45 +18,48 @@ feature: default ## Signature -```> encode base64 {flags} ...rest``` +`> encode base64 {flags} ...rest` ## Flags - - `--character-set, -c {string}`: specify the character rules for encoding the input. - Valid values are 'standard', 'standard-no-padding', 'url-safe', 'url-safe-no-padding','binhex', 'bcrypt', 'crypt', 'mutf7' +- `--character-set, -c {string}`: specify the character rules for encoding the input. + Valid values are 'standard', 'standard-no-padding', 'url-safe', 'url-safe-no-padding','binhex', 'bcrypt', 'crypt', 'mutf7' ## Parameters - - `...rest`: For a data structure input, encode data at the given cell paths. - +- `...rest`: For a data structure input, encode data at the given cell paths. ## Input/output types: -| input | output | -| ------------ | ------------ | -| binary | string | +| input | output | +| -------------- | -------------- | +| binary | string | | list\ | list\ | | list\ | list\ | | list\ | list\ | -| record | record | -| string | string | -| table | table | +| record | record | +| string | string | +| table | table | + ## Examples Encode binary data -```nu + +```nushell > 0x[09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0] | encode base64 CfkRAp1041vYQVbFY1aIwA== ``` Encode a string with default settings -```nu + +```nushell > 'Some Data' | encode base64 U29tZSBEYXRh ``` Encode a string with the binhex character set -```nu + +```nushell > 'Some Data' | encode base64 --character-set binhex 7epXB5"%A@4J ``` diff --git a/commands/docs/encode_hex.md b/src/content/docs/commands/docs/encode_hex.md similarity index 60% rename from commands/docs/encode_hex.md rename to src/content/docs/commands/docs/encode_hex.md index ae0c2ce7170..d51f105732b 100644 --- a/commands/docs/encode_hex.md +++ b/src/content/docs/commands/docs/encode_hex.md @@ -9,37 +9,39 @@ usage: | Encode a binary value using hex. feature: extra --- + # {{ $frontmatter.title }} for formats
{{ $frontmatter.formats }}
- ::: warning - Command `encode hex` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `encode hex` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> encode hex {flags} ...rest``` +`> encode hex {flags} ...rest` ## Parameters - - `...rest`: For a data structure input, encode data at the given cell paths - +- `...rest`: For a data structure input, encode data at the given cell paths ## Input/output types: -| input | output | -| ------------ | ------------ | -| binary | string | +| input | output | +| -------------- | -------------- | +| binary | string | | list\ | list\ | -| record | record | -| table | table | +| record | record | +| table | table | + ## Examples Encode binary data -```nu + +```nushell > 0x[09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0] | encode hex 09F911029D74E35BD84156C5635688C0 ``` diff --git a/commands/docs/enter.md b/src/content/docs/commands/docs/enter.md similarity index 84% rename from commands/docs/enter.md rename to src/content/docs/commands/docs/enter.md index e6e4ff45976..b6d46413bcb 100644 --- a/commands/docs/enter.md +++ b/src/content/docs/commands/docs/enter.md @@ -15,16 +15,17 @@ usage: | ## Signature -```> enter (path)``` +`> enter (path)` ## Parameters - - `path`: the path to enter as a new shell +- `path`: the path to enter as a new shell ## Examples Enter a new shell at path '../dir-foo' -```nu + +```nushell > enter ../dir-foo ``` diff --git a/commands/docs/enumerate.md b/src/content/docs/commands/docs/enumerate.md similarity index 95% rename from commands/docs/enumerate.md rename to src/content/docs/commands/docs/enumerate.md index b87f41339e1..7968db18827 100644 --- a/commands/docs/enumerate.md +++ b/src/content/docs/commands/docs/enumerate.md @@ -9,6 +9,7 @@ usage: | Enumerate the elements in a stream. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,8 +18,7 @@ feature: default ## Signature -```> enumerate {flags} ``` - +`> enumerate {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Add an index to each element of a list -```nu + +```nushell > [a, b, c] | enumerate ╭───┬──────╮ │ # │ item │ diff --git a/commands/docs/error_make.md b/src/content/docs/commands/docs/error_make.md similarity index 92% rename from commands/docs/error_make.md rename to src/content/docs/commands/docs/error_make.md index 98c761ca36d..fe66e1756da 100644 --- a/commands/docs/error_make.md +++ b/src/content/docs/commands/docs/error_make.md @@ -9,6 +9,7 @@ usage: | Create an error. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,16 +18,15 @@ feature: default ## Signature -```> error make {flags} (error_struct)``` +`> error make {flags} (error_struct)` ## Flags - - `--unspanned, -u`: remove the origin label from the error +- `--unspanned, -u`: remove the origin label from the error ## Parameters - - `error_struct`: The error to create. - +- `error_struct`: The error to create. ## Input/output types: @@ -37,13 +37,15 @@ feature: default ## Examples Create a simple custom error -```nu + +```nushell > error make {msg: "my custom error message"} {msg: my custom error message, debug: GenericError { error: "my custom error message", msg: "", span: None, help: None, inner: [] }, raw: GenericError { error: "my custom error message", msg: "", span: None, help: None, inner: [] }} ``` Create a more complex custom error -```nu + +```nushell > error make { msg: "my custom error message" label: { @@ -61,7 +63,8 @@ Create a more complex custom error ``` Create a custom error for a custom command that shows the span of the argument -```nu + +```nushell > def foo [x] { error make { msg: "this is fishy" diff --git a/commands/docs/every.md b/src/content/docs/commands/docs/every.md similarity index 76% rename from commands/docs/every.md rename to src/content/docs/commands/docs/every.md index 3dd5521f681..adc796103a5 100644 --- a/commands/docs/every.md +++ b/src/content/docs/commands/docs/every.md @@ -9,6 +9,7 @@ usage: | Show (or skip) every n-th row, starting from the first one. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,27 +18,27 @@ feature: default ## Signature -```> every {flags} (stride)``` +`> every {flags} (stride)` ## 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 - - `stride`: How many rows to skip between (and including) each row returned. - +- `stride`: How many rows to skip between (and including) each row returned. ## Input/output types: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | ## Examples Get every second row -```nu + +```nushell > [1 2 3 4 5] | every 2 ╭───┬───╮ │ 0 │ 1 │ @@ -48,7 +49,8 @@ Get every second row ``` Skip every second row -```nu + +```nushell > [1 2 3 4 5] | every 2 --skip ╭───┬───╮ │ 0 │ 2 │ diff --git a/commands/docs/exec.md b/src/content/docs/commands/docs/exec.md similarity index 86% rename from commands/docs/exec.md rename to src/content/docs/commands/docs/exec.md index 8650485ae06..a0053799170 100644 --- a/commands/docs/exec.md +++ b/src/content/docs/commands/docs/exec.md @@ -9,6 +9,7 @@ usage: | Execute a command, replacing or exiting the current process, depending on platform. feature: default --- + # {{ $frontmatter.title }} for system @@ -17,12 +18,11 @@ feature: default ## Signature -```> exec {flags} (command)``` +`> exec {flags} (command)` ## Parameters - - `command`: The command to execute. - +- `command`: The command to execute. ## Input/output types: @@ -33,17 +33,20 @@ feature: default ## Examples Execute external 'ps aux' tool -```nu + +```nushell > exec ps aux ``` Execute 'nautilus' -```nu + +```nushell > exec nautilus ``` ## Notes + On Unix-based systems, the current process is replaced with the command. -On Windows based systems, Nushell will wait for the command to finish and then exit with the command's exit code. \ No newline at end of file +On Windows based systems, Nushell will wait for the command to finish and then exit with the command's exit code. diff --git a/commands/docs/exit.md b/src/content/docs/commands/docs/exit.md similarity index 84% rename from commands/docs/exit.md rename to src/content/docs/commands/docs/exit.md index 4d0b8c9ce1e..c3a0b0f126b 100644 --- a/commands/docs/exit.md +++ b/src/content/docs/commands/docs/exit.md @@ -9,6 +9,7 @@ usage: | Exit Nu. feature: default --- + # {{ $frontmatter.title }} for shells @@ -17,12 +18,11 @@ feature: default ## Signature -```> exit {flags} (exit_code)``` +`> exit {flags} (exit_code)` ## Parameters - - `exit_code`: Exit code to return immediately with. - +- `exit_code`: Exit code to return immediately with. ## Input/output types: @@ -33,7 +33,8 @@ feature: default ## Examples Exit the current shell -```nu + +```nushell > exit ``` diff --git a/commands/docs/explain.md b/src/content/docs/commands/docs/explain.md similarity index 89% rename from commands/docs/explain.md rename to src/content/docs/commands/docs/explain.md index 65dc48dda41..8db9b1a4101 100644 --- a/commands/docs/explain.md +++ b/src/content/docs/commands/docs/explain.md @@ -9,6 +9,7 @@ usage: | Explain closure contents. feature: default --- + # {{ $frontmatter.title }} for debug @@ -17,12 +18,11 @@ feature: default ## Signature -```> explain {flags} (closure)``` +`> explain {flags} (closure)` ## Parameters - - `closure`: The closure to run. - +- `closure`: The closure to run. ## Input/output types: @@ -30,10 +30,12 @@ feature: default | ------- | ------ | | any | any | | nothing | any | + ## Examples Explain a command within a closure -```nu + +```nushell > explain {|| ls | sort-by name type --ignore-case | get name } | table --expand ``` diff --git a/commands/docs/explore.md b/src/content/docs/commands/docs/explore.md similarity index 72% rename from commands/docs/explore.md rename to src/content/docs/commands/docs/explore.md index 3a04d02a2f1..cab17141ed1 100644 --- a/commands/docs/explore.md +++ b/src/content/docs/commands/docs/explore.md @@ -9,6 +9,7 @@ usage: | Explore acts as a table pager, just like `less` does for text. feature: default --- + # {{ $frontmatter.title }} for viewers @@ -17,15 +18,14 @@ feature: default ## Signature -```> explore {flags} ``` +`> explore {flags} ` ## Flags - - `--head, - {bool}`: Show or hide column headers (default true) - - `--index, -i`: Show row indexes when viewing a list - - `--reverse, -r`: 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 +- `--reverse, -r`: 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: @@ -36,28 +36,33 @@ feature: default ## Examples Explore the system information record -```nu + +```nushell > sys | explore ``` Explore the output of `ls` without column names -```nu + +```nushell > ls | explore --head false ``` Explore a list of Markdown files' contents, with row indexes -```nu + +```nushell > glob *.md | each {|| open } | explore --index ``` Explore a JSON file, then save the last visited sub-structure to a file -```nu + +```nushell > open file.json | explore --peek | to json | save part.json ``` ## Notes -Press `:` then `h` to get a help menu. \ No newline at end of file + +Press `:` then `h` to get a help menu. diff --git a/commands/docs/export-env.md b/src/content/docs/commands/docs/export-env.md similarity index 87% rename from commands/docs/export-env.md rename to src/content/docs/commands/docs/export-env.md index 2441ca25106..3cb55af6ab6 100644 --- a/commands/docs/export-env.md +++ b/src/content/docs/commands/docs/export-env.md @@ -9,6 +9,7 @@ usage: | Run a block and preserve its environment in a current scope. feature: default --- + # {{ $frontmatter.title }} for env @@ -17,12 +18,11 @@ feature: default ## Signature -```> export-env {flags} (block)``` +`> export-env {flags} (block)` ## Parameters - - `block`: The block to run to set the environment. - +- `block`: The block to run to set the environment. ## Input/output types: @@ -33,13 +33,15 @@ feature: default ## Examples Set an environment variable -```nu + +```nushell > export-env { $env.SPAM = 'eggs' } ``` Set an environment variable and examine its value -```nu + +```nushell > export-env { $env.SPAM = 'eggs' }; $env.SPAM eggs ``` diff --git a/commands/docs/export.md b/src/content/docs/commands/docs/export.md similarity index 95% rename from commands/docs/export.md rename to src/content/docs/commands/docs/export.md index 2139a644443..2095eb6f5c9 100644 --- a/commands/docs/export.md +++ b/src/content/docs/commands/docs/export.md @@ -9,6 +9,7 @@ usage: | Export definitions or environment variables from a module. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,8 +18,7 @@ feature: default ## Signature -```> export {flags} ``` - +`> export {flags} ` ## Input/output types: @@ -29,14 +29,16 @@ feature: default ## Examples Export a definition from a module -```nu + +```nushell > module utils { export def my-command [] { "hello" } }; use utils my-command; my-command hello ``` ## Notes + This command is a parser keyword. For details, check: - https://www.nushell.sh/book/thinking_in_nu.html +https://www.nushell.sh/book/thinking_in_nu.html ## Subcommands: @@ -47,4 +49,4 @@ This command is a parser keyword. For details, check: | [`export def`](/commands/docs/export_def.md) | Builtin | Define a custom command and export it from a module. | | [`export extern`](/commands/docs/export_extern.md) | Builtin | Define an extern and export it from a module. | | [`export module`](/commands/docs/export_module.md) | Builtin | Export a custom module from a module. | -| [`export use`](/commands/docs/export_use.md) | Builtin | Use definitions from a module and export them from this module. | \ No newline at end of file +| [`export use`](/commands/docs/export_use.md) | Builtin | Use definitions from a module and export them from this module. | diff --git a/commands/docs/export_alias.md b/src/content/docs/commands/docs/export_alias.md similarity index 80% rename from commands/docs/export_alias.md rename to src/content/docs/commands/docs/export_alias.md index 5981edc218c..d69694d8932 100644 --- a/commands/docs/export_alias.md +++ b/src/content/docs/commands/docs/export_alias.md @@ -9,6 +9,7 @@ usage: | Alias a command (with optional flags) to a new name and export it from a module. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,13 +18,12 @@ feature: default ## Signature -```> export alias {flags} (name) (initial_value)``` +`> export alias {flags} (name) (initial_value)` ## Parameters - - `name`: Name of the alias. - - `initial_value`: Equals sign followed by value. - +- `name`: Name of the alias. +- `initial_value`: Equals sign followed by value. ## Input/output types: @@ -34,11 +34,13 @@ feature: default ## Examples Alias ll to ls -l and export it from a module -```nu + +```nushell > module spam { export alias ll = ls -l } ``` ## 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 +https://www.nushell.sh/book/thinking_in_nu.html diff --git a/commands/docs/export_const.md b/src/content/docs/commands/docs/export_const.md similarity index 79% rename from commands/docs/export_const.md rename to src/content/docs/commands/docs/export_const.md index fd6ccd3f561..4b6eb9498df 100644 --- a/commands/docs/export_const.md +++ b/src/content/docs/commands/docs/export_const.md @@ -9,6 +9,7 @@ usage: | Use parse-time constant from a module and export them from this module. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,13 +18,12 @@ feature: default ## Signature -```> export const {flags} (const_name) (initial_value)``` +`> export const {flags} (const_name) (initial_value)` ## Parameters - - `const_name`: Constant name. - - `initial_value`: Equals sign followed by constant value. - +- `const_name`: Constant name. +- `initial_value`: Equals sign followed by constant value. ## Input/output types: @@ -34,7 +34,8 @@ feature: default ## Examples Re-export a command from another module -```nu + +```nushell > module spam { export const foo = 3; } module eggs { export use spam foo } use eggs foo @@ -44,5 +45,6 @@ Re-export a command from another module ``` ## 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 +https://www.nushell.sh/book/thinking_in_nu.html diff --git a/commands/docs/export_def.md b/src/content/docs/commands/docs/export_def.md similarity index 66% rename from commands/docs/export_def.md rename to src/content/docs/commands/docs/export_def.md index 299ac60e190..9c7c8fdc60f 100644 --- a/commands/docs/export_def.md +++ b/src/content/docs/commands/docs/export_def.md @@ -9,6 +9,7 @@ usage: | Define a custom command and export it from a module. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,19 +18,18 @@ feature: default ## Signature -```> export def {flags} (def_name) (params) (block)``` +`> export def {flags} (def_name) (params) (block)` ## 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`: Command name. +- `params`: Parameters. +- `block`: Body of the definition. ## Input/output types: @@ -40,11 +40,13 @@ feature: default ## Examples Define a custom command in a module and call it -```nu + +```nushell > module spam { export def foo [] { "foo" } }; use spam foo; foo foo ``` ## 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 +https://www.nushell.sh/book/thinking_in_nu.html diff --git a/commands/docs/export_extern.md b/src/content/docs/commands/docs/export_extern.md similarity index 81% rename from commands/docs/export_extern.md rename to src/content/docs/commands/docs/export_extern.md index 4de684113a8..a109e72ab30 100644 --- a/commands/docs/export_extern.md +++ b/src/content/docs/commands/docs/export_extern.md @@ -9,6 +9,7 @@ usage: | Define an extern and export it from a module. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,13 +18,12 @@ feature: default ## Signature -```> export extern {flags} (def_name) (params)``` +`> export extern {flags} (def_name) (params)` ## Parameters - - `def_name`: Definition name. - - `params`: Parameters. - +- `def_name`: Definition name. +- `params`: Parameters. ## Input/output types: @@ -34,11 +34,13 @@ feature: default ## Examples Export the signature for an external command -```nu + +```nushell > export extern echo [text: string] ``` ## 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 +https://www.nushell.sh/book/thinking_in_nu.html diff --git a/commands/docs/export_module.md b/src/content/docs/commands/docs/export_module.md similarity index 79% rename from commands/docs/export_module.md rename to src/content/docs/commands/docs/export_module.md index 53d8abc4d71..bf68fd40b71 100644 --- a/commands/docs/export_module.md +++ b/src/content/docs/commands/docs/export_module.md @@ -9,6 +9,7 @@ usage: | Export a custom module from a module. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,13 +18,12 @@ feature: default ## Signature -```> export module {flags} (module) (block)``` +`> export module {flags} (module) (block)` ## Parameters - - `module`: Module name or module path. - - `block`: Body of the module if 'module' parameter is not a path. - +- `module`: Module name or module path. +- `block`: Body of the module if 'module' parameter is not a path. ## Input/output types: @@ -34,7 +34,8 @@ feature: default ## Examples Define a custom command in a submodule of a module and call it -```nu + +```nushell > module spam { export module eggs { export def foo [] { "foo" } @@ -46,5 +47,6 @@ foo ``` ## 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 +https://www.nushell.sh/book/thinking_in_nu.html diff --git a/commands/docs/export_use.md b/src/content/docs/commands/docs/export_use.md similarity index 80% rename from commands/docs/export_use.md rename to src/content/docs/commands/docs/export_use.md index 7ada4342275..30206a99ec6 100644 --- a/commands/docs/export_use.md +++ b/src/content/docs/commands/docs/export_use.md @@ -9,6 +9,7 @@ usage: | Use definitions from a module and export them from this module. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,13 +18,12 @@ feature: default ## Signature -```> export use {flags} (module) (members)``` +`> export use {flags} (module) (members)` ## Parameters - - `module`: Module or module file. - - `members`: Which members of the module to import. - +- `module`: Module or module file. +- `members`: Which members of the module to import. ## Input/output types: @@ -34,7 +34,8 @@ feature: default ## Examples Re-export a command from another module -```nu + +```nushell > module spam { export def foo [] { "foo" } } module eggs { export use spam foo } use eggs foo @@ -44,5 +45,6 @@ foo ``` ## 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 +https://www.nushell.sh/book/thinking_in_nu.html diff --git a/commands/docs/extern.md b/src/content/docs/commands/docs/extern.md similarity index 81% rename from commands/docs/extern.md rename to src/content/docs/commands/docs/extern.md index c4bdc5eabd1..b5499da5083 100644 --- a/commands/docs/extern.md +++ b/src/content/docs/commands/docs/extern.md @@ -9,6 +9,7 @@ usage: | Define a signature for an external command. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,13 +18,12 @@ feature: default ## Signature -```> extern {flags} (def_name) (params)``` +`> extern {flags} (def_name) (params)` ## Parameters - - `def_name`: Definition name. - - `params`: Parameters. - +- `def_name`: Definition name. +- `params`: Parameters. ## Input/output types: @@ -34,11 +34,13 @@ feature: default ## Examples Write a signature for an external command -```nu + +```nushell > extern echo [text: string] ``` ## 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 +https://www.nushell.sh/book/thinking_in_nu.html diff --git a/commands/docs/fill.md b/src/content/docs/commands/docs/fill.md similarity index 72% rename from commands/docs/fill.md rename to src/content/docs/commands/docs/fill.md index 6088187d6ac..bc34e8cc79c 100644 --- a/commands/docs/fill.md +++ b/src/content/docs/commands/docs/fill.md @@ -9,6 +9,7 @@ usage: | Fill and Align. feature: default --- + # {{ $frontmatter.title }} for conversions @@ -17,62 +18,68 @@ feature: default ## Signature -```> fill {flags} ``` +`> fill {flags} ` ## 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: -| input | output | -| -------------- | ------------ | -| filesize | string | -| float | string | -| int | string | +| input | output | +| ---------------- | -------------- | +| filesize | string | +| float | string | +| int | string | | list\ | list\ | | list\ | list\ | | list\ | list\ | | list\ | list\ | | list\ | list\ | -| string | string | +| string | string | + ## Examples Fill a string on the left side to a width of 15 with the character '─' -```nu + +```nushell > 'nushell' | fill --alignment l --character '─' --width 15 nushell──────── ``` Fill a string on the right side to a width of 15 with the character '─' -```nu + +```nushell > 'nushell' | fill --alignment r --character '─' --width 15 ────────nushell ``` Fill a string on both sides to a width of 15 with the character '─' -```nu + +```nushell > 'nushell' | fill --alignment m --character '─' --width 15 ────nushell──── ``` Fill a number on the left side to a width of 5 with the character '0' -```nu + +```nushell > 1 | fill --alignment right --character '0' --width 5 00001 ``` Fill a number on both sides to a width of 5 with the character '0' -```nu + +```nushell > 1.1 | fill --alignment center --character '0' --width 5 01.10 ``` Fill a filesize on the left side to a width of 5 with the character '0' -```nu + +```nushell > 1kib | fill --alignment middle --character '0' --width 10 0001024000 ``` diff --git a/commands/docs/filter.md b/src/content/docs/commands/docs/filter.md similarity index 87% rename from commands/docs/filter.md rename to src/content/docs/commands/docs/filter.md index 222a7cc74f9..60dac09c2c0 100644 --- a/commands/docs/filter.md +++ b/src/content/docs/commands/docs/filter.md @@ -9,6 +9,7 @@ usage: | Filter values based on a predicate closure. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,23 +18,24 @@ feature: default ## Signature -```> filter {flags} (closure)``` +`> filter {flags} (closure)` ## Parameters - - `closure`: Predicate closure. - +- `closure`: Predicate closure. ## Input/output types: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | -| range | list\ | +| range | list\ | + ## Examples Filter items of a list according to a condition -```nu + +```nushell > [1 2] | filter {|x| $x > 1} ╭───┬───╮ │ 0 │ 2 │ @@ -42,7 +44,8 @@ Filter items of a list according to a condition ``` Filter rows of a table according to a condition -```nu + +```nushell > [{a: 1} {a: 2}] | filter {|x| $x.a > 1} ╭───┬───╮ │ # │ a │ @@ -53,7 +56,8 @@ Filter rows of a table according to a condition ``` Filter rows of a table according to a stored condition -```nu + +```nushell > let cond = {|x| $x.a > 1}; [{a: 1} {a: 2}] | filter $cond ╭───┬───╮ │ # │ a │ @@ -64,7 +68,8 @@ Filter rows of a table according to a stored condition ``` Filter items of a range according to a condition -```nu + +```nushell > 9..13 | filter {|el| $el mod 2 != 0} ╭───┬────╮ │ 0 │ 9 │ @@ -75,11 +80,13 @@ Filter items of a range according to a condition ``` List all numbers above 3, using an existing closure condition -```nu + +```nushell > let a = {$in > 3}; [1, 2, 5, 6] | filter $a ``` ## Notes + This command works similar to 'where' but allows reading the predicate closure from -a variable. On the other hand, the "row condition" syntax is not supported. \ No newline at end of file +a variable. On the other hand, the "row condition" syntax is not supported. diff --git a/commands/docs/find.md b/src/content/docs/commands/docs/find.md similarity index 83% rename from commands/docs/find.md rename to src/content/docs/commands/docs/find.md index b72197165a8..163ae2dad8a 100644 --- a/commands/docs/find.md +++ b/src/content/docs/commands/docs/find.md @@ -9,6 +9,7 @@ usage: | Searches terms in the input. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,44 +18,47 @@ feature: default ## Signature -```> find {flags} ...rest``` +`> find {flags} ...rest` ## Flags - - `--regex, -r {string}`: regex to match with - - `--ignore-case, -i`: case-insensitive regex mode; equivalent to (?i) - - `--multiline, -m`: multi-line regex mode: ^ and $ match begin/end of line; equivalent to (?m) - - `--dotall, -s`: dotall regex mode: allow a dot . to match newlines \n; equivalent to (?s) - - `--columns, -c {list}`: column names to be searched (with rest parameter, not regex yet) - - `--invert, -v`: invert the match +- `--regex, -r {string}`: regex to match with +- `--ignore-case, -i`: case-insensitive regex mode; equivalent to (?i) +- `--multiline, -m`: multi-line regex mode: ^ and $ match begin/end of line; equivalent to (?m) +- `--dotall, -s`: dotall regex mode: allow a dot . to match newlines \n; equivalent to (?s) +- `--columns, -c {list}`: column names to be searched (with rest parameter, not regex yet) +- `--invert, -v`: invert the match ## Parameters - - `...rest`: Terms to search. - +- `...rest`: Terms to search. ## Input/output types: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | -| string | any | +| string | any | + ## Examples Search for multiple terms in a command output -```nu + +```nushell > ls | find toml md sh ``` Search and highlight text for a term in a string -```nu + +```nushell > 'Cargo.toml' | find toml Cargo.toml ``` Search a number or a file size in a list of numbers -```nu + +```nushell > [1 5 3kb 4 3Mb] | find 5 3kb ╭───┬─────────╮ │ 0 │ 5 │ @@ -64,7 +68,8 @@ Search a number or a file size in a list of numbers ``` Search a char in a list of string -```nu + +```nushell > [moe larry curly] | find l ╭───┬───────╮ │ 0 │ larry │ @@ -74,7 +79,8 @@ Search a char in a list of string ``` Find using regex -```nu + +```nushell > [abc bde arc abf] | find --regex "ab" ╭───┬─────╮ │ 0 │ abc │ @@ -84,7 +90,8 @@ Find using regex ``` Find using regex case insensitive -```nu + +```nushell > [aBc bde Arc abf] | find --regex "ab" -i ╭───┬─────╮ │ 0 │ aBc │ @@ -94,7 +101,8 @@ Find using regex case insensitive ``` Find value in records using regex -```nu + +```nushell > [[version name]; ['0.1.0' nushell] ['0.1.1' fish] ['0.2.0' zsh]] | find --regex "nu" ╭───┬─────────┬─────────╮ │ # │ version │ name │ @@ -105,7 +113,8 @@ Find value in records using regex ``` Find inverted values in records using regex -```nu + +```nushell > [[version name]; ['0.1.0' nushell] ['0.1.1' fish] ['0.2.0' zsh]] | find --regex "nu" --invert ╭───┬─────────┬──────╮ │ # │ version │ name │ @@ -117,7 +126,8 @@ Find inverted values in records using regex ``` Find value in list using regex -```nu + +```nushell > [["Larry", "Moe"], ["Victor", "Marina"]] | find --regex "rr" ╭───┬───────────────╮ │ 0 │ ╭───┬───────╮ │ @@ -129,7 +139,8 @@ Find value in list using regex ``` Find inverted values in records using regex -```nu + +```nushell > [["Larry", "Moe"], ["Victor", "Marina"]] | find --regex "rr" --invert ╭───┬────────────────╮ │ 0 │ ╭───┬────────╮ │ @@ -141,13 +152,15 @@ Find inverted values in records using regex ``` Remove ANSI sequences from result -```nu + +```nushell > [[foo bar]; [abc 123] [def 456]] | find 123 | get bar | ansi strip ``` Find and highlight text in specific columns -```nu + +```nushell > [[col1 col2 col3]; [moe larry curly] [larry curly moe]] | find moe --columns [col1] ╭───┬──────┬───────┬───────╮ │ # │ col1 │ col2 │ col3 │ diff --git a/commands/docs/first.md b/src/content/docs/commands/docs/first.md similarity index 82% rename from commands/docs/first.md rename to src/content/docs/commands/docs/first.md index 4aa74823931..d18c47f3659 100644 --- a/commands/docs/first.md +++ b/src/content/docs/commands/docs/first.md @@ -9,6 +9,7 @@ usage: | Return only the first several rows of the input. Counterpart of `last`. Opposite of `skip`. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,30 +18,32 @@ feature: default ## Signature -```> first {flags} (rows)``` +`> first {flags} (rows)` ## 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: -| input | output | -| --------- | ------ | -| binary | binary | +| input | output | +| ----------- | ------ | +| binary | binary | | list\ | any | -| range | any | +| range | any | + ## Examples Return the first item of a list/table -```nu + +```nushell > [1 2 3] | first 1 ``` Return the first 2 items of a list/table -```nu + +```nushell > [1 2 3] | first 2 ╭───┬───╮ │ 0 │ 1 │ @@ -50,7 +53,8 @@ Return the first 2 items of a list/table ``` Return the first 2 bytes of a binary value -```nu + +```nushell > 0x[01 23 45] | first 2 Length: 2 (0x2) bytes | printable whitespace ascii_other non_ascii 00000000: 01 23 •# diff --git a/commands/docs/flatten.md b/src/content/docs/commands/docs/flatten.md similarity index 89% rename from commands/docs/flatten.md rename to src/content/docs/commands/docs/flatten.md index 3543fcba525..560084015e1 100644 --- a/commands/docs/flatten.md +++ b/src/content/docs/commands/docs/flatten.md @@ -9,6 +9,7 @@ usage: | Flatten the table. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,27 +18,28 @@ feature: default ## Signature -```> flatten {flags} ...rest``` +`> flatten {flags} ...rest` ## Flags - - `--all, -a`: flatten inner table one level out +- `--all, -a`: flatten inner table one level out ## Parameters - - `...rest`: Optionally flatten data by column. - +- `...rest`: Optionally flatten data by column. ## Input/output types: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | -| record | table | +| record | table | + ## Examples flatten a table -```nu + +```nushell > [[N, u, s, h, e, l, l]] | flatten ╭───┬───╮ │ 0 │ N │ @@ -52,25 +54,29 @@ flatten a table ``` flatten a table, get the first item -```nu + +```nushell > [[N, u, s, h, e, l, l]] | flatten | first ``` flatten a column having a nested table -```nu + +```nushell > [[origin, people]; [Ecuador, ([[name, meal]; ['Andres', 'arepa']])]] | flatten --all | get meal ``` restrict the flattening by passing column names -```nu + +```nushell > [[origin, crate, versions]; [World, ([[name]; ['nu-cli']]), ['0.21', '0.22']]] | flatten versions --all | last | get versions ``` Flatten inner table -```nu + +```nushell > { a: b, d: [ 1 2 3 4 ], e: [ 4 3 ] } | flatten d --all ╭───┬───┬───┬───────────╮ │ # │ a │ d │ e │ diff --git a/commands/docs/fmt.md b/src/content/docs/commands/docs/fmt.md similarity index 86% rename from commands/docs/fmt.md rename to src/content/docs/commands/docs/fmt.md index 685869dc89f..d935e250e74 100644 --- a/commands/docs/fmt.md +++ b/src/content/docs/commands/docs/fmt.md @@ -9,20 +9,20 @@ usage: | Format a number. feature: extra --- + # {{ $frontmatter.title }} for conversions
{{ $frontmatter.conversions }}
- ::: warning - Command `fmt` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `fmt` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: -## Signature -```> fmt {flags} ``` +## Signature +`> fmt {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ feature: extra ## Examples Get a record containing multiple formats for the number 42 -```nu + +```nushell > 42 | fmt ╭──────────┬──────────╮ │ binary │ 0b101010 │ diff --git a/commands/docs/for.md b/src/content/docs/commands/docs/for.md similarity index 73% rename from commands/docs/for.md rename to src/content/docs/commands/docs/for.md index 44bd71b5531..db6b0037917 100644 --- a/commands/docs/for.md +++ b/src/content/docs/commands/docs/for.md @@ -9,6 +9,7 @@ usage: | Loop over a range. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,18 +18,17 @@ feature: default ## Signature -```> for {flags} (var_name) (range) (block)``` +`> for {flags} (var_name) (range) (block)` ## Flags - - `--numbered, -n`: return a numbered item ($it.index and $it.item) +- `--numbered, -n`: return a numbered item ($it.index and $it.item) ## Parameters - - `var_name`: Name of the looping variable. - - `range`: Range of the loop. - - `block`: The block to run. - +- `var_name`: Name of the looping variable. +- `range`: Range of the loop. +- `block`: The block to run. ## Input/output types: @@ -39,23 +39,27 @@ feature: default ## Examples Print the square of each integer -```nu + +```nushell > for x in [1 2 3] { print ($x * $x) } ``` Work with elements of a range -```nu + +```nushell > for $x in 1..3 { print $x } ``` Number each item and print a message -```nu + +```nushell > for $it in ['bob' 'fred'] --numbered { print $"($it.index) is ($it.item)" } ``` ## 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 +https://www.nushell.sh/book/thinking_in_nu.html diff --git a/commands/docs/format.md b/src/content/docs/commands/docs/format.md similarity index 93% rename from commands/docs/format.md rename to src/content/docs/commands/docs/format.md index 357aff7a5d3..04932f0921a 100644 --- a/commands/docs/format.md +++ b/src/content/docs/commands/docs/format.md @@ -9,6 +9,7 @@ usage: | Various commands for formatting data. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,8 +18,7 @@ feature: default ## Signature -```> format {flags} ``` - +`> format {flags} ` ## Input/output types: @@ -27,6 +27,7 @@ feature: default | nothing | string | ## Notes + You must use one of the following subcommands. Using this command as-is will only produce this help message. ## Subcommands: @@ -36,4 +37,4 @@ You must use one of the following subcommands. Using this command as-is will onl | [`format date`](/commands/docs/format_date.md) | Builtin | Format a given date using a format string. | | [`format duration`](/commands/docs/format_duration.md) | Builtin | Outputs duration with a specified unit of time. | | [`format filesize`](/commands/docs/format_filesize.md) | Builtin | Converts a column of filesizes to some specified format. | -| [`format pattern`](/commands/docs/format_pattern.md) | Builtin | Format columns into a string using a simple pattern. | \ No newline at end of file +| [`format pattern`](/commands/docs/format_pattern.md) | Builtin | Format columns into a string using a simple pattern. | diff --git a/commands/docs/format_date.md b/src/content/docs/commands/docs/format_date.md similarity index 87% rename from commands/docs/format_date.md rename to src/content/docs/commands/docs/format_date.md index 6f195213c12..d82ec1ddf5e 100644 --- a/commands/docs/format_date.md +++ b/src/content/docs/commands/docs/format_date.md @@ -9,6 +9,7 @@ usage: | Format a given date using a format string. feature: default --- + # {{ $frontmatter.title }} for date @@ -17,16 +18,15 @@ feature: default ## Signature -```> format date {flags} (format string)``` +`> format date {flags} (format string)` ## Flags - - `--list, -l`: lists strftime cheatsheet +- `--list, -l`: lists strftime cheatsheet ## Parameters - - `format string`: The desired format date. - +- `format string`: The desired format date. ## Input/output types: @@ -35,34 +35,40 @@ feature: default | datetime | string | | nothing | table | | string | string | + ## Examples Format a given date-time using the default format (RFC 2822). -```nu + +```nushell > '2021-10-22 20:00:12 +01:00' | into datetime | format date Fri, 22 Oct 2021 20:00:12 +0100 ``` Format a given date-time as a string using the default format (RFC 2822). -```nu + +```nushell > "2021-10-22 20:00:12 +01:00" | format date Fri, 22 Oct 2021 20:00:12 +0100 ``` Format the current date-time using a given format string. -```nu + +```nushell > date now | format date "%Y-%m-%d %H:%M:%S" ``` Format the current date using a given format string. -```nu + +```nushell > date now | format date "%Y-%m-%d %H:%M:%S" ``` Format a given date using a given format string. -```nu + +```nushell > "2021-10-22 20:00:12 +01:00" | format date "%Y-%m-%d" 2021-10-22 ``` diff --git a/commands/docs/format_duration.md b/src/content/docs/commands/docs/format_duration.md similarity index 72% rename from commands/docs/format_duration.md rename to src/content/docs/commands/docs/format_duration.md index d85a08cd74b..c5754863963 100644 --- a/commands/docs/format_duration.md +++ b/src/content/docs/commands/docs/format_duration.md @@ -9,6 +9,7 @@ usage: | Outputs duration with a specified unit of time. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,31 +18,33 @@ feature: default ## Signature -```> format duration {flags} (format value) ...rest``` +`> format duration {flags} (format value) ...rest` ## Parameters - - `format value`: The unit in which to display the duration. - - `...rest`: For a data structure input, format duration at the given cell paths. - +- `format value`: The unit in which to display the duration. +- `...rest`: For a data structure input, format duration at the given cell paths. ## Input/output types: -| input | output | -| -------------- | ------------ | -| duration | string | +| input | output | +| ---------------- | -------------- | +| duration | string | | list\ | list\ | -| table | table | +| table | table | + ## Examples Convert µs duration to the requested second duration as a string -```nu + +```nushell > 1000000µs | format duration sec 1 sec ``` Convert durations to µs duration as strings -```nu + +```nushell > [1sec 2sec] | format duration µs ╭───┬────────────╮ │ 0 │ 1000000 µs │ @@ -51,7 +54,8 @@ Convert durations to µs duration as strings ``` Convert duration to µs as a string if unit asked for was us -```nu + +```nushell > 1sec | format duration us 1000000 µs ``` diff --git a/commands/docs/format_filesize.md b/src/content/docs/commands/docs/format_filesize.md similarity index 78% rename from commands/docs/format_filesize.md rename to src/content/docs/commands/docs/format_filesize.md index 501ab70ae72..79f184cfb2f 100644 --- a/commands/docs/format_filesize.md +++ b/src/content/docs/commands/docs/format_filesize.md @@ -9,6 +9,7 @@ usage: | Converts a column of filesizes to some specified format. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,13 +18,12 @@ feature: default ## Signature -```> format filesize {flags} (format value) ...rest``` +`> format filesize {flags} (format value) ...rest` ## Parameters - - `format value`: The format into which convert the file sizes. - - `...rest`: For a data structure input, format filesizes at the given cell paths. - +- `format value`: The format into which convert the file sizes. +- `...rest`: For a data structure input, format filesizes at the given cell paths. ## Input/output types: @@ -32,22 +32,26 @@ feature: default | filesize | string | | record | record | | table | table | + ## Examples Convert the size column to KB -```nu + +```nushell > ls | format filesize KB size ``` Convert the apparent column to B -```nu + +```nushell > du | format filesize B apparent ``` Convert the size data to MB -```nu + +```nushell > 4Gb | format filesize MB 4000.0 MB ``` diff --git a/commands/docs/format_pattern.md b/src/content/docs/commands/docs/format_pattern.md similarity index 71% rename from commands/docs/format_pattern.md rename to src/content/docs/commands/docs/format_pattern.md index 23d36e80cb9..3c8128331b5 100644 --- a/commands/docs/format_pattern.md +++ b/src/content/docs/commands/docs/format_pattern.md @@ -9,41 +9,44 @@ usage: | Format columns into a string using a simple pattern. feature: extra --- + # {{ $frontmatter.title }} for strings
{{ $frontmatter.strings }}
- ::: warning - Command `format pattern` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `format pattern` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> format pattern {flags} (pattern)``` +`> format pattern {flags} (pattern)` ## Parameters - - `pattern`: the pattern to output. e.g.) "{foo}: {bar}" - +- `pattern`: the pattern to output. e.g.) "{foo}: {bar}" ## Input/output types: -| input | output | -| ------ | ------------ | -| record | any | +| input | output | +| ------ | -------------- | +| record | any | | table | list\ | + ## Examples Print filenames with their sizes -```nu + +```nushell > ls | format pattern '{name}: {size}' ``` Print elements from some columns of a table -```nu + +```nushell > [[col1, col2]; [v1, v2] [v3, v4]] | format pattern '{col2}' ╭───┬────╮ │ 0 │ v2 │ diff --git a/commands/docs/from.md b/src/content/docs/commands/docs/from.md similarity index 98% rename from commands/docs/from.md rename to src/content/docs/commands/docs/from.md index ab951ad8fdf..964405b3fec 100644 --- a/commands/docs/from.md +++ b/src/content/docs/commands/docs/from.md @@ -9,6 +9,7 @@ usage: | Parse a string or binary data into structured data. feature: default --- + # {{ $frontmatter.title }} for formats @@ -17,8 +18,7 @@ feature: default ## Signature -```> from {flags} ``` - +`> from {flags} ` ## Input/output types: @@ -27,6 +27,7 @@ feature: default | nothing | string | ## Notes + You must use one of the following subcommands. Using this command as-is will only produce this help message. ## Subcommands: @@ -48,4 +49,4 @@ You must use one of the following subcommands. Using this command as-is will onl | [`from xlsx`](/commands/docs/from_xlsx.md) | Builtin | Parse binary Excel(.xlsx) data and create table. | | [`from xml`](/commands/docs/from_xml.md) | Builtin | Parse text as .xml and create record. | | [`from yaml`](/commands/docs/from_yaml.md) | Builtin | Parse text as .yaml/.yml and create table. | -| [`from yml`](/commands/docs/from_yml.md) | Builtin | Parse text as .yaml/.yml and create table. | \ No newline at end of file +| [`from yml`](/commands/docs/from_yml.md) | Builtin | Parse text as .yaml/.yml and create table. | diff --git a/commands/docs/from_csv.md b/src/content/docs/commands/docs/from_csv.md similarity index 67% rename from commands/docs/from_csv.md rename to src/content/docs/commands/docs/from_csv.md index d34e2012735..ace3b28185b 100644 --- a/commands/docs/from_csv.md +++ b/src/content/docs/commands/docs/from_csv.md @@ -9,6 +9,7 @@ usage: | Parse text as .csv and create table. feature: default --- + # {{ $frontmatter.title }} for formats @@ -17,19 +18,18 @@ feature: default ## Signature -```> from csv {flags} ``` +`> from csv {flags} ` ## 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 - - `--trim, -t {string}`: drop leading and trailing whitespaces around headers names and/or field values - +- `--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 ## Input/output types: @@ -40,7 +40,8 @@ feature: default ## Examples Convert comma-separated data to a table -```nu + +```nushell > "ColA,ColB 1,2" | from csv ╭───┬──────┬──────╮ @@ -52,37 +53,43 @@ Convert comma-separated data to a table ``` Convert comma-separated data to a table, ignoring headers -```nu + +```nushell > open data.txt | from csv --noheaders ``` Convert semicolon-separated data to a table -```nu + +```nushell > open data.txt | from csv --separator ';' ``` Convert comma-separated data to a table, ignoring lines starting with '#' -```nu + +```nushell > open data.txt | from csv --comment '#' ``` Convert comma-separated data to a table, dropping all possible whitespaces around header names and field values -```nu + +```nushell > open data.txt | from csv --trim all ``` Convert comma-separated data to a table, dropping all possible whitespaces around header names -```nu + +```nushell > open data.txt | from csv --trim headers ``` Convert comma-separated data to a table, dropping all possible whitespaces around field values -```nu + +```nushell > open data.txt | from csv --trim fields ``` diff --git a/commands/docs/from_eml.md b/src/content/docs/commands/docs/from_eml.md similarity index 96% rename from commands/docs/from_eml.md rename to src/content/docs/commands/docs/from_eml.md index a25784d57f3..68bd0b460ed 100644 --- a/commands/docs/from_eml.md +++ b/src/content/docs/commands/docs/from_eml.md @@ -9,24 +9,24 @@ usage: | Parse text as .eml and create record. feature: default --- + # {{ $frontmatter.title }} for formats
{{ $frontmatter.formats }}
- ::: warning Command `from eml` resides in [plugin](/book/plugins.html) [`nu_plugin_formats`](https://crates.io/crates/nu_plugin_formats). To use this command, you must install/compile and register nu_plugin_formats ::: + ## Signature -```> from eml {flags} ``` +`> from eml {flags} ` ## 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: @@ -37,7 +37,8 @@ Command `from eml` resides in [plugin](/book/plugins.html) [`nu_plugin_formats`] ## Examples Convert eml structured data into record -```nu + +```nushell > 'From: test@email.com Subject: Welcome To: someone@somewhere.com @@ -57,7 +58,8 @@ Test' | from eml ``` Convert eml structured data into record -```nu + +```nushell > 'From: test@email.com Subject: Welcome To: someone@somewhere.com diff --git a/commands/docs/from_ics.md b/src/content/docs/commands/docs/from_ics.md similarity index 98% rename from commands/docs/from_ics.md rename to src/content/docs/commands/docs/from_ics.md index 671ac995252..7c26c666513 100644 --- a/commands/docs/from_ics.md +++ b/src/content/docs/commands/docs/from_ics.md @@ -9,20 +9,20 @@ usage: | Parse text as .ics and create table. feature: default --- + # {{ $frontmatter.title }} for formats
{{ $frontmatter.formats }}
- ::: warning Command `from ics` resides in [plugin](/book/plugins.html) [`nu_plugin_formats`](https://crates.io/crates/nu_plugin_formats). To use this command, you must install/compile and register nu_plugin_formats ::: -## Signature -```> from ics {flags} ``` +## Signature +`> from ics {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Command `from ics` resides in [plugin](/book/plugins.html) [`nu_plugin_formats`] ## Examples Converts ics formatted string to table -```nu + +```nushell > 'BEGIN:VCALENDAR END:VCALENDAR' | from ics ╭───┬────────────────┬────────────────┬────────────────┬────────────────┬────────────────┬────────────────┬────────────────╮ diff --git a/commands/docs/from_ini.md b/src/content/docs/commands/docs/from_ini.md similarity index 96% rename from commands/docs/from_ini.md rename to src/content/docs/commands/docs/from_ini.md index b41d5e8765a..902f1d7a7b4 100644 --- a/commands/docs/from_ini.md +++ b/src/content/docs/commands/docs/from_ini.md @@ -9,20 +9,20 @@ usage: | Parse text as .ini and create table. feature: default --- + # {{ $frontmatter.title }} for formats
{{ $frontmatter.formats }}
- ::: warning Command `from ini` resides in [plugin](/book/plugins.html) [`nu_plugin_formats`](https://crates.io/crates/nu_plugin_formats). To use this command, you must install/compile and register nu_plugin_formats ::: -## Signature -```> from ini {flags} ``` +## Signature +`> from ini {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Command `from ini` resides in [plugin](/book/plugins.html) [`nu_plugin_formats`] ## Examples Converts ini formatted string to record -```nu + +```nushell > '[foo] a=1 b=2' | from ini diff --git a/commands/docs/from_json.md b/src/content/docs/commands/docs/from_json.md similarity index 87% rename from commands/docs/from_json.md rename to src/content/docs/commands/docs/from_json.md index 3272b3851a0..d37cd6ccc87 100644 --- a/commands/docs/from_json.md +++ b/src/content/docs/commands/docs/from_json.md @@ -9,6 +9,7 @@ usage: | Convert from json to structured data. feature: default --- + # {{ $frontmatter.title }} for formats @@ -17,13 +18,12 @@ feature: default ## Signature -```> from json {flags} ``` +`> from json {flags} ` ## 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: @@ -34,7 +34,8 @@ feature: default ## Examples Converts json formatted string to table -```nu + +```nushell > '{ "a": 1 }' | from json ╭───┬───╮ │ a │ 1 │ @@ -42,7 +43,8 @@ Converts json formatted string to table ``` Converts json formatted string to table -```nu + +```nushell > '{ "a": 1, "b": [1, 2] }' | from json ╭───┬───────────╮ │ a │ 1 │ @@ -54,7 +56,8 @@ Converts json formatted string to table ``` Parse json strictly which will error on comments and trailing commas -```nu + +```nushell > '{ "a": 1, "b": 2 }' | from json -s ╭───┬───╮ │ a │ 1 │ diff --git a/commands/docs/from_nuon.md b/src/content/docs/commands/docs/from_nuon.md similarity index 95% rename from commands/docs/from_nuon.md rename to src/content/docs/commands/docs/from_nuon.md index 9248be4d4f6..5b5b4f8dd8b 100644 --- a/commands/docs/from_nuon.md +++ b/src/content/docs/commands/docs/from_nuon.md @@ -9,6 +9,7 @@ usage: | Convert from nuon to structured data. feature: default --- + # {{ $frontmatter.title }} for formats @@ -17,8 +18,7 @@ feature: default ## Signature -```> from nuon {flags} ``` - +`> from nuon {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Converts nuon formatted string to table -```nu + +```nushell > '{ a:1 }' | from nuon ╭───┬───╮ │ a │ 1 │ @@ -37,7 +38,8 @@ Converts nuon formatted string to table ``` Converts nuon formatted string to table -```nu + +```nushell > '{ a:1, b: [1, 2] }' | from nuon ╭───┬───────────╮ │ a │ 1 │ diff --git a/commands/docs/from_ods.md b/src/content/docs/commands/docs/from_ods.md similarity index 87% rename from commands/docs/from_ods.md rename to src/content/docs/commands/docs/from_ods.md index 96c702670db..02f9ed14303 100644 --- a/commands/docs/from_ods.md +++ b/src/content/docs/commands/docs/from_ods.md @@ -9,6 +9,7 @@ usage: | Parse OpenDocument Spreadsheet(.ods) data and create table. feature: default --- + # {{ $frontmatter.title }} for formats @@ -17,12 +18,11 @@ feature: default ## Signature -```> from ods {flags} ``` +`> from ods {flags} ` ## Flags - - `--sheets, -s {list}`: Only convert specified sheets - +- `--sheets, -s {list}`: Only convert specified sheets ## Input/output types: @@ -33,13 +33,15 @@ feature: default ## Examples Convert binary .ods data to a table -```nu + +```nushell > open --raw test.ods | from ods ``` Convert binary .ods data to a table, specifying the tables -```nu + +```nushell > open --raw test.ods | from ods --sheets [Spreadsheet1] ``` diff --git a/commands/docs/from_ssv.md b/src/content/docs/commands/docs/from_ssv.md similarity index 86% rename from commands/docs/from_ssv.md rename to src/content/docs/commands/docs/from_ssv.md index 2fb96ed5a70..79adef8741c 100644 --- a/commands/docs/from_ssv.md +++ b/src/content/docs/commands/docs/from_ssv.md @@ -9,6 +9,7 @@ usage: | Parse text as space-separated values and create a table. The default minimum number of spaces counted as a separator is 2. feature: default --- + # {{ $frontmatter.title }} for formats @@ -17,14 +18,13 @@ feature: default ## Signature -```> from ssv {flags} ``` +`> from ssv {flags} ` ## 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: @@ -35,7 +35,8 @@ feature: default ## Examples Converts ssv formatted string to table -```nu + +```nushell > 'FOO BAR 1 2' | from ssv ╭───┬─────┬─────╮ @@ -47,7 +48,8 @@ Converts ssv formatted string to table ``` Converts ssv formatted string to table but not treating the first row as column names -```nu + +```nushell > 'FOO BAR 1 2' | from ssv --noheaders ╭───┬─────────┬─────────╮ diff --git a/commands/docs/from_toml.md b/src/content/docs/commands/docs/from_toml.md similarity index 95% rename from commands/docs/from_toml.md rename to src/content/docs/commands/docs/from_toml.md index f97543d78de..e13536ebdab 100644 --- a/commands/docs/from_toml.md +++ b/src/content/docs/commands/docs/from_toml.md @@ -9,6 +9,7 @@ usage: | Parse text as .toml and create record. feature: default --- + # {{ $frontmatter.title }} for formats @@ -17,8 +18,7 @@ feature: default ## Signature -```> from toml {flags} ``` - +`> from toml {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Converts toml formatted string to record -```nu + +```nushell > 'a = 1' | from toml ╭───┬───╮ │ a │ 1 │ @@ -37,7 +38,8 @@ Converts toml formatted string to record ``` Converts toml formatted string to record -```nu + +```nushell > 'a = 1 b = [1, 2]' | from toml ╭───┬───────────╮ diff --git a/commands/docs/from_tsv.md b/src/content/docs/commands/docs/from_tsv.md similarity index 74% rename from commands/docs/from_tsv.md rename to src/content/docs/commands/docs/from_tsv.md index bd466390b9e..1142ba29b2f 100644 --- a/commands/docs/from_tsv.md +++ b/src/content/docs/commands/docs/from_tsv.md @@ -9,6 +9,7 @@ usage: | Parse text as .tsv and create table. feature: default --- + # {{ $frontmatter.title }} for formats @@ -17,18 +18,17 @@ feature: default ## Signature -```> from tsv {flags} ``` +`> from tsv {flags} ` ## 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: @@ -39,7 +39,8 @@ feature: default ## Examples Convert tab-separated data to a table -```nu + +```nushell > "ColA ColB 1 2" | from tsv ╭───┬──────┬──────╮ @@ -51,31 +52,36 @@ Convert tab-separated data to a table ``` Create a tsv file with header columns and open it -```nu + +```nushell > $'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 -```nu + +```nushell > $'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 -```nu + +```nushell > $'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 -```nu + +```nushell > $'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 -```nu + +```nushell > $'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/src/content/docs/commands/docs/from_url.md similarity index 85% rename from commands/docs/from_url.md rename to src/content/docs/commands/docs/from_url.md index 0998db6033b..4251d7624c2 100644 --- a/commands/docs/from_url.md +++ b/src/content/docs/commands/docs/from_url.md @@ -9,20 +9,20 @@ usage: | Parse url-encoded string as a record. feature: extra --- + # {{ $frontmatter.title }} for formats
{{ $frontmatter.formats }}
- ::: warning - Command `from url` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `from url` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: -## Signature -```> from url {flags} ``` +## Signature +`> from url {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ feature: extra ## Examples Convert url encoded string into a record -```nu + +```nushell > 'bread=baguette&cheese=comt%C3%A9&meat=ham&fat=butter' | from url ╭────────┬──────────╮ │ bread │ baguette │ diff --git a/commands/docs/from_vcf.md b/src/content/docs/commands/docs/from_vcf.md similarity index 98% rename from commands/docs/from_vcf.md rename to src/content/docs/commands/docs/from_vcf.md index 1ab6f0bcd53..e7bb762f165 100644 --- a/commands/docs/from_vcf.md +++ b/src/content/docs/commands/docs/from_vcf.md @@ -9,20 +9,20 @@ usage: | Parse text as .vcf and create table. feature: default --- + # {{ $frontmatter.title }} for formats
{{ $frontmatter.formats }}
- ::: warning Command `from vcf` resides in [plugin](/book/plugins.html) [`nu_plugin_formats`](https://crates.io/crates/nu_plugin_formats). To use this command, you must install/compile and register nu_plugin_formats ::: -## Signature -```> from vcf {flags} ``` +## Signature +`> from vcf {flags} ` ## Input/output types: @@ -33,7 +33,8 @@ Command `from vcf` resides in [plugin](/book/plugins.html) [`nu_plugin_formats`] ## Examples Converts ics formatted string to table -```nu + +```nushell > 'BEGIN:VCARD N:Foo FN:Bar diff --git a/commands/docs/from_xlsx.md b/src/content/docs/commands/docs/from_xlsx.md similarity index 87% rename from commands/docs/from_xlsx.md rename to src/content/docs/commands/docs/from_xlsx.md index 7e8693c175a..909546fc1e2 100644 --- a/commands/docs/from_xlsx.md +++ b/src/content/docs/commands/docs/from_xlsx.md @@ -9,6 +9,7 @@ usage: | Parse binary Excel(.xlsx) data and create table. feature: default --- + # {{ $frontmatter.title }} for formats @@ -17,12 +18,11 @@ feature: default ## Signature -```> from xlsx {flags} ``` +`> from xlsx {flags} ` ## Flags - - `--sheets, -s {list}`: Only convert specified sheets - +- `--sheets, -s {list}`: Only convert specified sheets ## Input/output types: @@ -33,13 +33,15 @@ feature: default ## Examples Convert binary .xlsx data to a table -```nu + +```nushell > open --raw test.xlsx | from xlsx ``` Convert binary .xlsx data to a table, specifying the tables -```nu + +```nushell > open --raw test.xlsx | from xlsx --sheets [Spreadsheet1] ``` diff --git a/commands/docs/from_xml.md b/src/content/docs/commands/docs/from_xml.md similarity index 95% rename from commands/docs/from_xml.md rename to src/content/docs/commands/docs/from_xml.md index 5a0b5aee471..beb8b18cc1d 100644 --- a/commands/docs/from_xml.md +++ b/src/content/docs/commands/docs/from_xml.md @@ -9,6 +9,7 @@ usage: | Parse text as .xml and create record. feature: default --- + # {{ $frontmatter.title }} for formats @@ -17,13 +18,12 @@ feature: default ## Signature -```> from xml {flags} ``` +`> from xml {flags} ` ## Flags - - `--keep-comments, -`: add comment nodes to result - - `--keep-pi, -`: add processing instruction nodes to result - +- `--keep-comments, -`: add comment nodes to result +- `--keep-pi, -`: add processing instruction nodes to result ## Input/output types: @@ -34,7 +34,8 @@ feature: default ## Examples Converts xml formatted string to record -```nu + +```nushell > ' Event @@ -55,12 +56,14 @@ Converts xml formatted string to record ``` ## Notes + Every XML entry is represented via a record with tag, attribute and content fields. To represent different types of entries different values are written to this fields: + 1. Tag entry: `{tag: attrs: {: "" ...} content: []}` 2. Comment entry: `{tag: '!' attrs: null content: ""}` 3. Processing instruction (PI): `{tag: '?' attrs: null content: ""}` 4. Text: `{tag: null attrs: null content: ""}`. Unlike to xml command all null values are always present and text is never represented via plain -string. This way content of every tag is always a table and is easier to parse \ No newline at end of file +string. This way content of every tag is always a table and is easier to parse diff --git a/commands/docs/from_yaml.md b/src/content/docs/commands/docs/from_yaml.md similarity index 96% rename from commands/docs/from_yaml.md rename to src/content/docs/commands/docs/from_yaml.md index 9252ef0ee41..afea6ba6684 100644 --- a/commands/docs/from_yaml.md +++ b/src/content/docs/commands/docs/from_yaml.md @@ -9,6 +9,7 @@ usage: | Parse text as .yaml/.yml and create table. feature: default --- + # {{ $frontmatter.title }} for formats @@ -17,8 +18,7 @@ feature: default ## Signature -```> from yaml {flags} ``` - +`> from yaml {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Converts yaml formatted string to table -```nu + +```nushell > 'a: 1' | from yaml ╭───┬───╮ │ a │ 1 │ @@ -37,7 +38,8 @@ Converts yaml formatted string to table ``` Converts yaml formatted string to table -```nu + +```nushell > '[ a: 1, b: [1, 2] ]' | from yaml ╭───┬────┬───────────╮ │ # │ a │ b │ diff --git a/commands/docs/from_yml.md b/src/content/docs/commands/docs/from_yml.md similarity index 96% rename from commands/docs/from_yml.md rename to src/content/docs/commands/docs/from_yml.md index b03938507e0..00c39e07eb0 100644 --- a/commands/docs/from_yml.md +++ b/src/content/docs/commands/docs/from_yml.md @@ -9,6 +9,7 @@ usage: | Parse text as .yaml/.yml and create table. feature: default --- + # {{ $frontmatter.title }} for formats @@ -17,8 +18,7 @@ feature: default ## Signature -```> from yml {flags} ``` - +`> from yml {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Converts yaml formatted string to table -```nu + +```nushell > 'a: 1' | from yaml ╭───┬───╮ │ a │ 1 │ @@ -37,7 +38,8 @@ Converts yaml formatted string to table ``` Converts yaml formatted string to table -```nu + +```nushell > '[ a: 1, b: [1, 2] ]' | from yaml ╭───┬────┬───────────╮ │ # │ a │ b │ diff --git a/commands/docs/g.md b/src/content/docs/commands/docs/g.md similarity index 87% rename from commands/docs/g.md rename to src/content/docs/commands/docs/g.md index 59138b4d68c..052021b61f1 100644 --- a/commands/docs/g.md +++ b/src/content/docs/commands/docs/g.md @@ -15,34 +15,38 @@ usage: | ## Signature -```> g (shell_number)``` +`> g (shell_number)` ## Parameters - - `shell_number`: shell number to change to +- `shell_number`: shell number to change to ## Examples Lists all open shells -```nu + +```nushell > g ``` Make two directories and enter new shells for them, use `g` to jump to the specific shell -```nu + +```nushell > mkdir foo bar; enter foo; enter ../bar; g 1 ``` Use `shells` to show all the opened shells and run `g 2` to jump to the third one -```nu + +```nushell > shells; g 2 ``` Make two directories and enter new shells for them, use `g -` to jump to the last used shell -```nu + +```nushell > mkdir foo bar; enter foo; enter ../bar; g - ``` diff --git a/commands/docs/generate.md b/src/content/docs/commands/docs/generate.md similarity index 87% rename from commands/docs/generate.md rename to src/content/docs/commands/docs/generate.md index 28dea459c49..3c668b1eeeb 100644 --- a/commands/docs/generate.md +++ b/src/content/docs/commands/docs/generate.md @@ -9,6 +9,7 @@ usage: | Generate a list of values by successively invoking a closure. feature: default --- + # {{ $frontmatter.title }} for generators @@ -17,24 +18,25 @@ feature: default ## Signature -```> generate {flags} (initial) (closure)``` +`> generate {flags} (initial) (closure)` ## Parameters - - `initial`: Initial value. - - `closure`: Generator function. - +- `initial`: Initial value. +- `closure`: Generator function. ## Input/output types: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | -| nothing | list\ | +| nothing | list\ | + ## Examples Generate a sequence of numbers -```nu + +```nushell > generate 0 {|i| if $i <= 10 { {out: $i, next: ($i + 2)} }} ╭───┬────╮ │ 0 │ 0 │ @@ -48,7 +50,8 @@ Generate a sequence of numbers ``` Generate a stream of fibonacci numbers -```nu + +```nushell > generate [0, 1] {|fib| {out: $fib.0, next: [$fib.1, ($fib.0 + $fib.1)]} } | first 10 ╭───┬────╮ │ 0 │ 0 │ @@ -66,6 +69,7 @@ Generate a stream of fibonacci numbers ``` ## Notes + The generator closure accepts a single argument and returns a record containing two optional keys: 'out' and 'next'. Each invocation, the 'out' value, if present, is added to the stream. If a 'next' key is present, it is diff --git a/commands/docs/get.md b/src/content/docs/commands/docs/get.md similarity index 74% rename from commands/docs/get.md rename to src/content/docs/commands/docs/get.md index d7d653a12b7..1362d947c7c 100644 --- a/commands/docs/get.md +++ b/src/content/docs/commands/docs/get.md @@ -9,6 +9,7 @@ usage: | Extract data using a cell path. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,36 +18,38 @@ feature: default ## Signature -```> get {flags} (cell_path) ...rest``` +`> get {flags} (cell_path) ...rest` ## Flags - - `--ignore-errors, -i`: ignore missing data (make all cell path members optional) - - `--sensitive, -s`: get path in a case sensitive manner +- `--ignore-errors, -i`: ignore missing data (make all cell path members optional) +- `--sensitive, -s`: get path in a case sensitive manner ## Parameters - - `cell_path`: The cell path to the data. - - `...rest`: Additional cell paths. - +- `cell_path`: The cell path to the data. +- `...rest`: Additional cell paths. ## Input/output types: -| input | output | -| --------- | ------ | +| input | output | +| ----------- | ------ | | list\ | any | -| record | any | -| table | any | +| record | any | +| table | any | + ## Examples Get an item from a list -```nu + +```nushell > [0 1 2] | get 1 1 ``` Get a column from a table -```nu + +```nushell > [{A: A0}] | get A ╭───┬────╮ │ 0 │ A0 │ @@ -55,42 +58,49 @@ Get a column from a table ``` Get a cell from a table -```nu + +```nushell > [{A: A0}] | get 0.A A0 ``` Extract the name of the 3rd record in a list (same as `ls | $in.name`) -```nu + +```nushell > ls | get name.2 ``` Extract the name of the 3rd record in a list -```nu + +```nushell > ls | get 2.name ``` Extract the cpu list from the sys information record -```nu + +```nushell > sys | get cpu ``` Getting Path/PATH in a case insensitive way -```nu + +```nushell > $env | get paTH ``` Getting Path in a case sensitive way, won't work for 'PATH' -```nu + +```nushell > $env | get --sensitive Path ``` ## Notes + This is equivalent to using the cell path access syntax: `$env.OS` is the same as `$env | get OS`. -If multiple cell paths are given, this will produce a list of values. \ No newline at end of file +If multiple cell paths are given, this will produce a list of values. diff --git a/commands/docs/glob.md b/src/content/docs/commands/docs/glob.md similarity index 68% rename from commands/docs/glob.md rename to src/content/docs/commands/docs/glob.md index 74be0479deb..968045309cb 100644 --- a/commands/docs/glob.md +++ b/src/content/docs/commands/docs/glob.md @@ -9,6 +9,7 @@ usage: | Creates a list of files and/or folders based on the glob pattern provided. feature: default --- + # {{ $frontmatter.title }} for filesystem @@ -17,94 +18,105 @@ feature: default ## Signature -```> glob {flags} (glob)``` +`> glob {flags} (glob)` ## 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 - - `--exclude, -e {list}`: Patterns to exclude from the search: `glob` will not walk the inside of directories matching the excluded patterns. +- `--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 +- `--exclude, -e {list}`: Patterns to exclude from the search: `glob` will not walk the inside of directories matching the excluded patterns. ## Parameters - - `glob`: The glob expression. - +- `glob`: The glob expression. ## Input/output types: -| input | output | -| ------- | ------------ | +| input | output | +| ------- | -------------- | | nothing | list\ | ## Examples -Search for *.rs files -```nu +Search for \*.rs files + +```nushell > glob *.rs ``` -Search for *.rs and *.toml files recursively up to 2 folders deep -```nu +Search for _.rs and _.toml files recursively up to 2 folders deep + +```nushell > glob **/*.{rs,toml} --depth 2 ``` Search for files and folders that begin with uppercase C or lowercase c -```nu + +```nushell > glob "[Cc]*" ``` Search for files and folders like abc or xyz substituting a character for ? -```nu + +```nushell > glob "{a?c,x?z}" ``` A case-insensitive search for files and folders that begin with c -```nu + +```nushell > glob "(?i)c*" ``` Search for files for folders that do not begin with c, C, b, M, or s -```nu + +```nushell > glob "[!cCbMs]*" ``` Search for files or folders with 3 a's in a row in the name -```nu + +```nushell > glob ``` Search for files or folders with only a, b, c, or d in the file name between 1 and 10 times -```nu + +```nushell > glob <[a-d]:1,10> ``` Search for folders that begin with an uppercase ASCII letter, ignoring files and symlinks -```nu + +```nushell > glob "[A-Z]*" --no-file --no-symlink ``` Search for files named tsconfig.json that are not in node_modules directories -```nu + +```nushell > glob **/tsconfig.json --exclude [**/node_modules/**] ``` Search for all files that are not in the target nor .git directories -```nu + +```nushell > glob **/* --exclude [**/target/** **/.git/** */] ``` ## Notes -For more glob pattern help, please refer to https://docs.rs/crate/wax/latest \ No newline at end of file + +For more glob pattern help, please refer to https://docs.rs/crate/wax/latest diff --git a/commands/docs/grid.md b/src/content/docs/commands/docs/grid.md similarity index 79% rename from commands/docs/grid.md rename to src/content/docs/commands/docs/grid.md index 29004d71575..4d60b864e55 100644 --- a/commands/docs/grid.md +++ b/src/content/docs/commands/docs/grid.md @@ -9,6 +9,7 @@ usage: | Renders the output to a textual terminal grid. feature: default --- + # {{ $frontmatter.title }} for viewers @@ -17,62 +18,68 @@ feature: default ## Signature -```> grid {flags} ``` +`> grid {flags} ` ## Flags - - `--width, -w {int}`: number of terminal columns wide (not output columns) - - `--color, -c`: draw output with color - - `--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 +- `--separator, -s {string}`: character to separate grid with ## Input/output types: -| input | output | -| --------- | ------ | +| input | output | +| ----------- | ------ | | list\ | string | -| record | string | +| record | string | + ## Examples Render a simple list to a grid -```nu + +```nushell > [1 2 3 a b c] | grid 1 │ 2 │ 3 │ a │ b │ c ``` The above example is the same as: -```nu + +```nushell > [1 2 3 a b c] | wrap name | grid 1 │ 2 │ 3 │ a │ b │ c ``` Render a record to a grid -```nu + +```nushell > {name: 'foo', b: 1, c: 2} | grid foo ``` Render a list of records to a grid -```nu + +```nushell > [{name: 'A', v: 1} {name: 'B', v: 2} {name: 'C', v: 3}] | grid A │ B │ C ``` Render a table with 'name' column in it to a grid -```nu + +```nushell > [[name patch]; [0.1.0 false] [0.1.1 true] [0.2.0 false]] | grid 0.1.0 │ 0.1.1 │ 0.2.0 ``` ## Notes + grid was built to give a concise gridded layout for ls. however, it determines what to put in the grid by looking for a column named 'name'. this works great for tables and records but for lists we need to do something different. such as with '[one two three] | grid' it creates a fake column called 'name' for these values so that it -prints out the list properly. \ No newline at end of file +prints out the list properly. diff --git a/commands/docs/group-by.md b/src/content/docs/commands/docs/group-by.md similarity index 92% rename from commands/docs/group-by.md rename to src/content/docs/commands/docs/group-by.md index 45c5014d83d..de699455865 100644 --- a/commands/docs/group-by.md +++ b/src/content/docs/commands/docs/group-by.md @@ -9,6 +9,7 @@ usage: | Splits a list or table into groups, and returns a record containing those groups. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,39 +18,41 @@ feature: default ## Signature -```> group-by {flags} (grouper)``` +`> group-by {flags} (grouper)` ## Flags - - `--to-table, -`: Return a table with "groups" and "items" columns +- `--to-table, -`: Return a table with "groups" and "items" columns ## Parameters - - `grouper`: The path to the column to group on. - +- `grouper`: The path to the column to group on. ## Input/output types: -| input | output | -| --------- | ------ | +| input | output | +| ----------- | ------ | | list\ | any | ## Examples Group items by the "type" column's values -```nu + +```nushell > ls | group-by type ``` Group items by the "foo" column's values, ignoring records without a "foo" column -```nu + +```nushell > open cool.json | group-by foo? ``` Group using a block which is evaluated against each input value -```nu + +```nushell > [foo.txt bar.csv baz.txt] | group-by { path parse | get extension } ╭─────┬─────────────────╮ │ │ ╭───┬─────────╮ │ @@ -63,7 +66,8 @@ Group using a block which is evaluated against each input value ``` You can also group by raw values by leaving out the argument -```nu + +```nushell > ['1' '3' '1' '3' '2' '1' '1'] | group-by ╭───┬───────────╮ │ │ ╭───┬───╮ │ @@ -83,7 +87,8 @@ You can also group by raw values by leaving out the argument ``` You can also output a table instead of a record -```nu + +```nushell > ['1' '3' '1' '3' '2' '1' '1'] | group-by --to-table ╭───┬───────┬───────────╮ │ # │ group │ items │ diff --git a/commands/docs/group.md b/src/content/docs/commands/docs/group.md similarity index 85% rename from commands/docs/group.md rename to src/content/docs/commands/docs/group.md index 3e855e6cdfd..0ac4f2fabc7 100644 --- a/commands/docs/group.md +++ b/src/content/docs/commands/docs/group.md @@ -9,6 +9,7 @@ usage: | Groups input into groups of `group_size`. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,23 +18,23 @@ feature: default ## Signature -```> group {flags} (group_size)``` +`> group {flags} (group_size)` ## Parameters - - `group_size`: The size of each group. - +- `group_size`: The size of each group. ## Input/output types: -| input | output | -| --------- | --------------- | +| input | output | +| ----------- | ------------------- | | list\ | list\\> | ## Examples Group the a list by pairs -```nu + +```nushell > [1 2 3 4] | group 2 ╭───┬───────────╮ │ 0 │ ╭───┬───╮ │ diff --git a/commands/docs/gstat.md b/src/content/docs/commands/docs/gstat.md similarity index 90% rename from commands/docs/gstat.md rename to src/content/docs/commands/docs/gstat.md index 0724a3b1c24..223f58b8a7c 100644 --- a/commands/docs/gstat.md +++ b/src/content/docs/commands/docs/gstat.md @@ -9,6 +9,7 @@ usage: | Get the git status of a repo feature: default --- + # {{ $frontmatter.title }} for prompt @@ -17,12 +18,11 @@ feature: default ## Signature -```> gstat {flags} (path)``` +`> gstat {flags} (path)` ## Parameters - - `path`: path to repo - +- `path`: path to repo ## Input/output types: diff --git a/commands/docs/hash.md b/src/content/docs/commands/docs/hash.md similarity index 93% rename from commands/docs/hash.md rename to src/content/docs/commands/docs/hash.md index 4c59f043652..c95b6b82a7e 100644 --- a/commands/docs/hash.md +++ b/src/content/docs/commands/docs/hash.md @@ -9,6 +9,7 @@ usage: | Apply hash function. feature: default --- + # {{ $frontmatter.title }} for hash @@ -17,8 +18,7 @@ feature: default ## Signature -```> hash {flags} ``` - +`> hash {flags} ` ## Input/output types: @@ -27,6 +27,7 @@ feature: default | nothing | string | ## Notes + You must use one of the following subcommands. Using this command as-is will only produce this help message. ## Subcommands: @@ -34,4 +35,4 @@ You must use one of the following subcommands. Using this command as-is will onl | name | type | usage | | ---------------------------------------------- | ------- | --------------------------------------------- | | [`hash md5`](/commands/docs/hash_md5.md) | Builtin | Hash a value using the md5 hash algorithm. | -| [`hash sha256`](/commands/docs/hash_sha256.md) | Builtin | Hash a value using the sha256 hash algorithm. | \ No newline at end of file +| [`hash sha256`](/commands/docs/hash_sha256.md) | Builtin | Hash a value using the sha256 hash algorithm. | diff --git a/commands/docs/hash_md5.md b/src/content/docs/commands/docs/hash_md5.md similarity index 84% rename from commands/docs/hash_md5.md rename to src/content/docs/commands/docs/hash_md5.md index ea681846b43..33bfa61ad98 100644 --- a/commands/docs/hash_md5.md +++ b/src/content/docs/commands/docs/hash_md5.md @@ -9,6 +9,7 @@ usage: | Hash a value using the md5 hash algorithm. feature: default --- + # {{ $frontmatter.title }} for hash @@ -17,16 +18,15 @@ feature: default ## Signature -```> hash md5 {flags} ...rest``` +`> hash md5 {flags} ...rest` ## Flags - - `--binary, -b`: Output binary instead of hexadecimal representation +- `--binary, -b`: Output binary instead of hexadecimal representation ## Parameters - - `...rest`: Optionally md5 hash data by cell path. - +- `...rest`: Optionally md5 hash data by cell path. ## Input/output types: @@ -35,16 +35,19 @@ feature: default | record | record | | string | any | | table | table | + ## Examples Return the md5 hash of a string, hex-encoded -```nu + +```nushell > 'abcdefghijklmnopqrstuvwxyz' | hash md5 c3fcd3d76192e4007dfb496cca67e13b ``` Return the md5 hash of a string, as binary -```nu + +```nushell > 'abcdefghijklmnopqrstuvwxyz' | hash md5 --binary Length: 16 (0x10) bytes | printable whitespace ascii_other non_ascii 00000000: c3 fc d3 d7 61 92 e4 00 7d fb 49 6c ca 67 e1 3b ××××a××0}×Il×g×; @@ -52,7 +55,8 @@ Length: 16 (0x10) bytes | printable whitespace ascii_other non_ascii ``` Return the md5 hash of a file's contents -```nu + +```nushell > open ./nu_0_24_1_windows.zip | hash md5 ``` diff --git a/commands/docs/hash_sha256.md b/src/content/docs/commands/docs/hash_sha256.md similarity index 86% rename from commands/docs/hash_sha256.md rename to src/content/docs/commands/docs/hash_sha256.md index 41c4c197a81..b8da8b40501 100644 --- a/commands/docs/hash_sha256.md +++ b/src/content/docs/commands/docs/hash_sha256.md @@ -9,6 +9,7 @@ usage: | Hash a value using the sha256 hash algorithm. feature: default --- + # {{ $frontmatter.title }} for hash @@ -17,16 +18,15 @@ feature: default ## Signature -```> hash sha256 {flags} ...rest``` +`> hash sha256 {flags} ...rest` ## Flags - - `--binary, -b`: Output binary instead of hexadecimal representation +- `--binary, -b`: Output binary instead of hexadecimal representation ## Parameters - - `...rest`: Optionally sha256 hash data by cell path. - +- `...rest`: Optionally sha256 hash data by cell path. ## Input/output types: @@ -35,16 +35,19 @@ feature: default | record | record | | string | any | | table | table | + ## Examples Return the sha256 hash of a string, hex-encoded -```nu + +```nushell > 'abcdefghijklmnopqrstuvwxyz' | hash sha256 71c480df93d6ae2f1efad1447c66c9525e316218cf51fc8d9ed832f2daf18b73 ``` Return the sha256 hash of a string, as binary -```nu + +```nushell > 'abcdefghijklmnopqrstuvwxyz' | hash sha256 --binary Length: 32 (0x20) bytes | printable whitespace ascii_other non_ascii 00000000: 71 c4 80 df 93 d6 ae 2f 1e fa d1 44 7c 66 c9 52 q××××××/•××D|f×R @@ -53,7 +56,8 @@ Length: 32 (0x20) bytes | printable whitespace ascii_other non_ascii ``` Return the sha256 hash of a file's contents -```nu + +```nushell > open ./nu_0_24_1_windows.zip | hash sha256 ``` diff --git a/commands/docs/headers.md b/src/content/docs/commands/docs/headers.md similarity index 91% rename from commands/docs/headers.md rename to src/content/docs/commands/docs/headers.md index e75187ca1ec..f0941f26c33 100644 --- a/commands/docs/headers.md +++ b/src/content/docs/commands/docs/headers.md @@ -9,6 +9,7 @@ usage: | Use the first row of the table as column names. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,19 +18,20 @@ feature: default ## Signature -```> headers {flags} ``` - +`> headers {flags} ` ## Input/output types: -| input | output | -| --------- | ------ | +| input | output | +| ----------- | ------ | | list\ | table | -| table | table | +| table | table | + ## Examples Sets the column names for a table created by `split column` -```nu + +```nushell > "a b c|1 2 3" | split row "|" | split column " " | headers ╭───┬───┬───┬───╮ │ # │ a │ b │ c │ @@ -40,7 +42,8 @@ Sets the column names for a table created by `split column` ``` Columns which don't have data in their first row are removed -```nu + +```nushell > "a b c|1 2 3|1 2 3 4" | split row "|" | split column " " | headers ╭───┬───┬───┬───╮ │ # │ a │ b │ c │ diff --git a/commands/docs/help.md b/src/content/docs/commands/docs/help.md similarity index 87% rename from commands/docs/help.md rename to src/content/docs/commands/docs/help.md index d4f68cabc15..f4e10c706a5 100644 --- a/commands/docs/help.md +++ b/src/content/docs/commands/docs/help.md @@ -9,6 +9,7 @@ usage: | Display help information about different parts of Nushell. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,16 +18,15 @@ feature: default ## Signature -```> help {flags} ...rest``` +`> help {flags} ...rest` ## Flags - - `--find, -f {string}`: string to find in command names, usage, and search terms +- `--find, -f {string}`: string to find in command names, usage, and search terms ## Parameters - - `...rest`: The name of command, alias or module to get help on. - +- `...rest`: The name of command, alias or module to get help on. ## Input/output types: @@ -37,24 +37,28 @@ feature: default ## Examples show help for single command, alias, or module -```nu + +```nushell > help match ``` show help for single sub-command, alias, or module -```nu + +```nushell > help str lpad ``` search for string in command names, usage and search terms -```nu + +```nushell > help --find char ``` ## Notes + `help word` searches for "word" in commands, aliases and modules, in that order. ## Subcommands: @@ -66,4 +70,4 @@ search for string in command names, usage and search terms | [`help escapes`](/commands/docs/help_escapes.md) | Builtin | Show help on nushell string escapes. | | [`help externs`](/commands/docs/help_externs.md) | Builtin | Show help on nushell externs. | | [`help modules`](/commands/docs/help_modules.md) | Builtin | Show help on nushell modules. | -| [`help operators`](/commands/docs/help_operators.md) | Builtin | Show help on nushell operators. | \ No newline at end of file +| [`help operators`](/commands/docs/help_operators.md) | Builtin | Show help on nushell operators. | diff --git a/commands/docs/help_aliases.md b/src/content/docs/commands/docs/help_aliases.md similarity index 79% rename from commands/docs/help_aliases.md rename to src/content/docs/commands/docs/help_aliases.md index bd3e513d23a..a4670dda71e 100644 --- a/commands/docs/help_aliases.md +++ b/src/content/docs/commands/docs/help_aliases.md @@ -9,6 +9,7 @@ usage: | Show help on nushell aliases. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,16 +18,15 @@ feature: default ## Signature -```> help aliases {flags} ...rest``` +`> help aliases {flags} ...rest` ## Flags - - `--find, -f {string}`: string to find in alias names and usage +- `--find, -f {string}`: string to find in alias names and usage ## Parameters - - `...rest`: The name of alias to get help on. - +- `...rest`: The name of alias to get help on. ## Input/output types: @@ -37,19 +37,22 @@ feature: default ## Examples show all aliases -```nu + +```nushell > help aliases ``` show help for single alias -```nu + +```nushell > help aliases my-alias ``` search for string in alias names and usages -```nu + +```nushell > help aliases --find my-alias ``` diff --git a/commands/docs/help_commands.md b/src/content/docs/commands/docs/help_commands.md similarity index 75% rename from commands/docs/help_commands.md rename to src/content/docs/commands/docs/help_commands.md index 9e68eac0525..42e8e47bde3 100644 --- a/commands/docs/help_commands.md +++ b/src/content/docs/commands/docs/help_commands.md @@ -9,6 +9,7 @@ usage: | Show help on nushell commands. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,16 +18,15 @@ feature: default ## Signature -```> help commands {flags} ...rest``` +`> help commands {flags} ...rest` ## Flags - - `--find, -f {string}`: string to find in command names, usage, and search terms +- `--find, -f {string}`: string to find in command names, usage, and search terms ## Parameters - - `...rest`: The name of command to get help on. - +- `...rest`: The name of command to get help on. ## Input/output types: diff --git a/commands/docs/help_escapes.md b/src/content/docs/commands/docs/help_escapes.md similarity index 94% rename from commands/docs/help_escapes.md rename to src/content/docs/commands/docs/help_escapes.md index 0d6b5e2c4cd..971d0b64fb7 100644 --- a/commands/docs/help_escapes.md +++ b/src/content/docs/commands/docs/help_escapes.md @@ -9,6 +9,7 @@ usage: | Show help on nushell string escapes. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,8 +18,7 @@ feature: default ## Signature -```> help escapes {flags} ``` - +`> help escapes {flags} ` ## Input/output types: diff --git a/commands/docs/help_externs.md b/src/content/docs/commands/docs/help_externs.md similarity index 79% rename from commands/docs/help_externs.md rename to src/content/docs/commands/docs/help_externs.md index ba197547f6d..d86948e0e4b 100644 --- a/commands/docs/help_externs.md +++ b/src/content/docs/commands/docs/help_externs.md @@ -9,6 +9,7 @@ usage: | Show help on nushell externs. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,16 +18,15 @@ feature: default ## Signature -```> help externs {flags} ...rest``` +`> help externs {flags} ...rest` ## Flags - - `--find, -f {string}`: string to find in extern names and usage +- `--find, -f {string}`: string to find in extern names and usage ## Parameters - - `...rest`: The name of extern to get help on. - +- `...rest`: The name of extern to get help on. ## Input/output types: @@ -37,19 +37,22 @@ feature: default ## Examples show all externs -```nu + +```nushell > help externs ``` show help for single extern -```nu + +```nushell > help externs smth ``` search for string in extern names and usages -```nu + +```nushell > help externs --find smth ``` diff --git a/commands/docs/help_modules.md b/src/content/docs/commands/docs/help_modules.md similarity index 82% rename from commands/docs/help_modules.md rename to src/content/docs/commands/docs/help_modules.md index e551414c8ff..43f5c4841f9 100644 --- a/commands/docs/help_modules.md +++ b/src/content/docs/commands/docs/help_modules.md @@ -9,6 +9,7 @@ usage: | Show help on nushell modules. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,16 +18,15 @@ feature: default ## Signature -```> help modules {flags} ...rest``` +`> help modules {flags} ...rest` ## Flags - - `--find, -f {string}`: string to find in module names and usage +- `--find, -f {string}`: string to find in module names and usage ## Parameters - - `...rest`: The name of module to get help on. - +- `...rest`: The name of module to get help on. ## Input/output types: @@ -37,24 +37,28 @@ feature: default ## Examples show all modules -```nu + +```nushell > help modules ``` show help for single module -```nu + +```nushell > help modules my-module ``` search for string in module names and usages -```nu + +```nushell > help modules --find my-module ``` ## Notes + When requesting help for a single module, its commands and aliases will be highlighted if they are also available in the current scope. Commands/aliases that were imported under a different name -(such as with a prefix after `use some-module`) will be highlighted in parentheses. \ No newline at end of file +(such as with a prefix after `use some-module`) will be highlighted in parentheses. diff --git a/commands/docs/help_operators.md b/src/content/docs/commands/docs/help_operators.md similarity index 93% rename from commands/docs/help_operators.md rename to src/content/docs/commands/docs/help_operators.md index 7c67365a39a..154bfbf6a13 100644 --- a/commands/docs/help_operators.md +++ b/src/content/docs/commands/docs/help_operators.md @@ -9,6 +9,7 @@ usage: | Show help on nushell operators. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,8 +18,7 @@ feature: default ## Signature -```> help operators {flags} ``` - +`> help operators {flags} ` ## Input/output types: diff --git a/commands/docs/hide-env.md b/src/content/docs/commands/docs/hide-env.md similarity index 79% rename from commands/docs/hide-env.md rename to src/content/docs/commands/docs/hide-env.md index d193165eaf7..50a2fdc1c10 100644 --- a/commands/docs/hide-env.md +++ b/src/content/docs/commands/docs/hide-env.md @@ -9,6 +9,7 @@ usage: | Hide environment variables in the current scope. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,16 +18,15 @@ feature: default ## Signature -```> hide-env {flags} ...rest``` +`> hide-env {flags} ...rest` ## 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 - - `...rest`: Environment variable names to hide. - +- `...rest`: Environment variable names to hide. ## Input/output types: @@ -37,7 +37,8 @@ feature: default ## Examples Hide an environment variable -```nu + +```nushell > $env.HZ_ENV_ABC = 1; hide-env HZ_ENV_ABC; 'HZ_ENV_ABC' in (env).name false ``` diff --git a/commands/docs/hide.md b/src/content/docs/commands/docs/hide.md similarity index 80% rename from commands/docs/hide.md rename to src/content/docs/commands/docs/hide.md index f3a3df12882..024049cdafc 100644 --- a/commands/docs/hide.md +++ b/src/content/docs/commands/docs/hide.md @@ -9,6 +9,7 @@ usage: | Hide definitions in the current scope. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,13 +18,12 @@ feature: default ## Signature -```> hide {flags} (module) (members)``` +`> hide {flags} (module) (members)` ## Parameters - - `module`: Module or module file. - - `members`: Which members of the module to import. - +- `module`: Module or module file. +- `members`: Which members of the module to import. ## Input/output types: @@ -34,19 +34,22 @@ feature: default ## Examples Hide the alias just defined -```nu + +```nushell > alias lll = ls -l; hide lll ``` Hide a custom command -```nu + +```nushell > def say-hi [] { echo 'Hi!' }; hide say-hi ``` ## Notes + Definitions are hidden by priority: First aliases, then custom commands. This command is a parser keyword. For details, check: - https://www.nushell.sh/book/thinking_in_nu.html \ No newline at end of file +https://www.nushell.sh/book/thinking_in_nu.html diff --git a/commands/docs/histogram.md b/src/content/docs/commands/docs/histogram.md similarity index 83% rename from commands/docs/histogram.md rename to src/content/docs/commands/docs/histogram.md index 511d0f6cef5..49d3330a3ad 100644 --- a/commands/docs/histogram.md +++ b/src/content/docs/commands/docs/histogram.md @@ -9,6 +9,7 @@ usage: | Creates a new table with a histogram based on the column name passed in. feature: default --- + # {{ $frontmatter.title }} for chart @@ -17,40 +18,42 @@ feature: default ## Signature -```> histogram {flags} (column-name) (frequency-column-name)``` +`> histogram {flags} (column-name) (frequency-column-name)` ## Flags - - `--percentage-type, -t {string}`: percentage calculate method, can be 'normalize' or 'relative', in 'normalize', defaults to be 'normalize' +- `--percentage-type, -t {string}`: percentage calculate method, can be 'normalize' or 'relative', in 'normalize', defaults to be 'normalize' ## Parameters - - `column-name`: Column name to calc frequency, no need to provide if input is a list. - - `frequency-column-name`: Histogram's frequency column, default to be frequency column output. - +- `column-name`: Column name to calc frequency, no need to provide if input is a list. +- `frequency-column-name`: Histogram's frequency column, default to be frequency column output. ## Input/output types: -| input | output | -| --------- | ------ | +| input | output | +| ----------- | ------ | | list\ | table | ## Examples Compute a histogram of file types -```nu + +```nushell > ls | histogram type ``` Compute a histogram for the types of files, with frequency column named freq -```nu + +```nushell > ls | histogram type freq ``` Compute a histogram for a list of numbers -```nu + +```nushell > [1 2 1] | histogram ╭───┬───────┬───────┬──────────┬────────────┬────────────────────────────────────────────────────────────────────╮ │ # │ value │ count │ quantile │ percentage │ frequency │ @@ -62,7 +65,8 @@ Compute a histogram for a list of numbers ``` Compute a histogram for a list of numbers, and percentage is based on the maximum value -```nu + +```nushell > [1 2 3 1 1 1 2 2 1 1] | histogram --percentage-type relative ``` diff --git a/commands/docs/history.md b/src/content/docs/commands/docs/history.md similarity index 86% rename from commands/docs/history.md rename to src/content/docs/commands/docs/history.md index a8e01cc9bcf..37923640c8a 100644 --- a/commands/docs/history.md +++ b/src/content/docs/commands/docs/history.md @@ -9,6 +9,7 @@ usage: | Get the command history. feature: default --- + # {{ $frontmatter.title }} for history @@ -17,13 +18,12 @@ feature: default ## Signature -```> history {flags} ``` +`> history {flags} ` ## 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 listing of entries for sqlite history ## Input/output types: @@ -34,24 +34,26 @@ feature: default ## Examples Get current history length -```nu + +```nushell > history | length ``` Show last 5 commands you have ran -```nu + +```nushell > history | last 5 ``` Search all the commands from history that contains 'cargo' -```nu + +```nushell > history | where command =~ cargo | get command ``` - ## Subcommands: | name | type | usage | diff --git a/commands/docs/history_session.md b/src/content/docs/commands/docs/history_session.md similarity index 93% rename from commands/docs/history_session.md rename to src/content/docs/commands/docs/history_session.md index fd51e0e3d2b..2ef367e5cad 100644 --- a/commands/docs/history_session.md +++ b/src/content/docs/commands/docs/history_session.md @@ -9,6 +9,7 @@ usage: | Get the command history session. feature: default --- + # {{ $frontmatter.title }} for history @@ -17,8 +18,7 @@ feature: default ## Signature -```> history session {flags} ``` - +`> history session {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Get current history session -```nu + +```nushell > history session ``` diff --git a/commands/docs/http.md b/src/content/docs/commands/docs/http.md similarity index 95% rename from commands/docs/http.md rename to src/content/docs/commands/docs/http.md index e43c799144e..d88d8167cd8 100644 --- a/commands/docs/http.md +++ b/src/content/docs/commands/docs/http.md @@ -9,6 +9,7 @@ usage: | Various commands for working with http methods. feature: default --- + # {{ $frontmatter.title }} for network @@ -17,8 +18,7 @@ feature: default ## Signature -```> http {flags} ``` - +`> http {flags} ` ## Input/output types: @@ -27,6 +27,7 @@ feature: default | nothing | string | ## Notes + You must use one of the following subcommands. Using this command as-is will only produce this help message. ## Subcommands: @@ -39,4 +40,4 @@ You must use one of the following subcommands. Using this command as-is will onl | [`http options`](/commands/docs/http_options.md) | Builtin | Requests permitted communication options for a given URL. | | [`http patch`](/commands/docs/http_patch.md) | Builtin | Patch a body to a URL. | | [`http post`](/commands/docs/http_post.md) | Builtin | Post a body to a URL. | -| [`http put`](/commands/docs/http_put.md) | Builtin | Put a body to a URL. | \ No newline at end of file +| [`http put`](/commands/docs/http_put.md) | Builtin | Put a body to a URL. | diff --git a/commands/docs/http_delete.md b/src/content/docs/commands/docs/http_delete.md similarity index 55% rename from commands/docs/http_delete.md rename to src/content/docs/commands/docs/http_delete.md index 99ad68930fd..d8ed4f17a52 100644 --- a/commands/docs/http_delete.md +++ b/src/content/docs/commands/docs/http_delete.md @@ -9,6 +9,7 @@ usage: | Delete the specified resource. feature: default --- + # {{ $frontmatter.title }} for network @@ -17,26 +18,25 @@ feature: default ## Signature -```> http delete {flags} (URL)``` +`> http delete {flags} (URL)` ## 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 {int}`: timeout period in seconds - - `--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 - - `--redirect-mode, -R {string}`: What to do when encountering redirects. Default: 'follow'. Valid options: 'follow' ('f'), 'manual' ('m'), 'error' ('e'). +- `--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 {int}`: timeout period in seconds +- `--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 +- `--redirect-mode, -R {string}`: What to do when encountering redirects. Default: 'follow'. Valid options: 'follow' ('f'), 'manual' ('m'), 'error' ('e'). ## Parameters - - `URL`: The URL to fetch the contents from. - +- `URL`: The URL to fetch the contents from. ## Input/output types: @@ -47,34 +47,40 @@ feature: default ## Examples http delete from example.com -```nu + +```nushell > http delete https://www.example.com ``` http delete from example.com, with username and password -```nu + +```nushell > http delete --user myuser --password mypass https://www.example.com ``` http delete from example.com, with custom header -```nu + +```nushell > http delete --headers [my-header-key my-header-value] https://www.example.com ``` http delete from example.com, with body -```nu + +```nushell > http delete --data 'body' https://www.example.com ``` http delete from example.com, with JSON body -```nu + +```nushell > http delete --content-type application/json --data { field: value } https://www.example.com ``` ## Notes -Performs HTTP DELETE operation. \ No newline at end of file + +Performs HTTP DELETE operation. diff --git a/commands/docs/http_get.md b/src/content/docs/commands/docs/http_get.md similarity index 57% rename from commands/docs/http_get.md rename to src/content/docs/commands/docs/http_get.md index 55e3395a8f4..8ae9c5b0fb8 100644 --- a/commands/docs/http_get.md +++ b/src/content/docs/commands/docs/http_get.md @@ -9,6 +9,7 @@ usage: | Fetch the contents from a URL. feature: default --- + # {{ $frontmatter.title }} for network @@ -17,24 +18,23 @@ feature: default ## Signature -```> http get {flags} (URL)``` +`> http get {flags} (URL)` ## Flags - - `--user, -u {any}`: the username when authenticating - - `--password, -p {any}`: the password when authenticating - - `--max-time, -m {int}`: timeout period in seconds - - `--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 - - `--redirect-mode, -R {string}`: What to do when encountering redirects. Default: 'follow'. Valid options: 'follow' ('f'), 'manual' ('m'), 'error' ('e'). +- `--user, -u {any}`: the username when authenticating +- `--password, -p {any}`: the password when authenticating +- `--max-time, -m {int}`: timeout period in seconds +- `--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 +- `--redirect-mode, -R {string}`: What to do when encountering redirects. Default: 'follow'. Valid options: 'follow' ('f'), 'manual' ('m'), 'error' ('e'). ## Parameters - - `URL`: The URL to fetch the contents from. - +- `URL`: The URL to fetch the contents from. ## Input/output types: @@ -45,28 +45,33 @@ feature: default ## Examples Get content from example.com -```nu + +```nushell > http get https://www.example.com ``` Get content from example.com, with username and password -```nu + +```nushell > http get --user myuser --password mypass https://www.example.com ``` Get content from example.com, with custom header -```nu + +```nushell > http get --headers [my-header-key my-header-value] https://www.example.com ``` Get content from example.com, with custom headers -```nu + +```nushell > http get --headers [my-header-key-A my-header-value-A my-header-key-B my-header-value-B] https://www.example.com ``` ## Notes -Performs HTTP GET operation. \ No newline at end of file + +Performs HTTP GET operation. diff --git a/commands/docs/http_head.md b/src/content/docs/commands/docs/http_head.md similarity index 60% rename from commands/docs/http_head.md rename to src/content/docs/commands/docs/http_head.md index cdbbda05c6c..20d817e6188 100644 --- a/commands/docs/http_head.md +++ b/src/content/docs/commands/docs/http_head.md @@ -9,6 +9,7 @@ usage: | Get the headers from a URL. feature: default --- + # {{ $frontmatter.title }} for network @@ -17,21 +18,20 @@ feature: default ## Signature -```> http head {flags} (URL)``` +`> http head {flags} (URL)` ## Flags - - `--user, -u {any}`: the username when authenticating - - `--password, -p {any}`: the password when authenticating - - `--max-time, -m {int}`: timeout period in seconds - - `--headers, -H {any}`: custom headers you want to add - - `--insecure, -k`: allow insecure server connections when using SSL - - `--redirect-mode, -R {string}`: What to do when encountering redirects. Default: 'follow'. Valid options: 'follow' ('f'), 'manual' ('m'), 'error' ('e'). +- `--user, -u {any}`: the username when authenticating +- `--password, -p {any}`: the password when authenticating +- `--max-time, -m {int}`: timeout period in seconds +- `--headers, -H {any}`: custom headers you want to add +- `--insecure, -k`: allow insecure server connections when using SSL +- `--redirect-mode, -R {string}`: What to do when encountering redirects. Default: 'follow'. Valid options: 'follow' ('f'), 'manual' ('m'), 'error' ('e'). ## Parameters - - `URL`: The URL to fetch the contents from. - +- `URL`: The URL to fetch the contents from. ## Input/output types: @@ -42,22 +42,26 @@ feature: default ## Examples Get headers from example.com -```nu + +```nushell > http head https://www.example.com ``` Get headers from example.com, with username and password -```nu + +```nushell > http head --user myuser --password mypass https://www.example.com ``` Get headers from example.com, with custom header -```nu + +```nushell > http head --headers [my-header-key my-header-value] https://www.example.com ``` ## Notes -Performs HTTP HEAD operation. \ No newline at end of file + +Performs HTTP HEAD operation. diff --git a/commands/docs/http_options.md b/src/content/docs/commands/docs/http_options.md similarity index 73% rename from commands/docs/http_options.md rename to src/content/docs/commands/docs/http_options.md index 0dde9e78ded..62722b3a275 100644 --- a/commands/docs/http_options.md +++ b/src/content/docs/commands/docs/http_options.md @@ -9,6 +9,7 @@ usage: | Requests permitted communication options for a given URL. feature: default --- + # {{ $frontmatter.title }} for network @@ -17,21 +18,20 @@ feature: default ## Signature -```> http options {flags} (URL)``` +`> http options {flags} (URL)` ## Flags - - `--user, -u {any}`: the username when authenticating - - `--password, -p {any}`: the password when authenticating - - `--max-time, -m {int}`: timeout period in seconds - - `--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 +- `--user, -u {any}`: the username when authenticating +- `--password, -p {any}`: the password when authenticating +- `--max-time, -m {int}`: timeout period in seconds +- `--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 ## Parameters - - `URL`: The URL to fetch the options from. - +- `URL`: The URL to fetch the options from. ## Input/output types: @@ -42,34 +42,40 @@ feature: default ## Examples Get options from example.com -```nu + +```nushell > http options https://www.example.com ``` Get options from example.com, with username and password -```nu + +```nushell > http options --user myuser --password mypass https://www.example.com ``` Get options from example.com, with custom header -```nu + +```nushell > http options --headers [my-header-key my-header-value] https://www.example.com ``` Get options from example.com, with custom headers -```nu + +```nushell > 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 -```nu + +```nushell > 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] ``` ## Notes -Performs an HTTP OPTIONS request. Most commonly used for making CORS preflight requests. \ No newline at end of file + +Performs an HTTP OPTIONS request. Most commonly used for making CORS preflight requests. diff --git a/commands/docs/http_patch.md b/src/content/docs/commands/docs/http_patch.md similarity index 53% rename from commands/docs/http_patch.md rename to src/content/docs/commands/docs/http_patch.md index a336c4f2218..4d07d33bf31 100644 --- a/commands/docs/http_patch.md +++ b/src/content/docs/commands/docs/http_patch.md @@ -9,6 +9,7 @@ usage: | Patch a body to a URL. feature: default --- + # {{ $frontmatter.title }} for network @@ -17,26 +18,25 @@ feature: default ## Signature -```> http patch {flags} (URL) (data)``` +`> http patch {flags} (URL) (data)` ## 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 {int}`: timeout period in seconds - - `--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 - - `--redirect-mode, -R {string}`: What to do when encountering redirects. Default: 'follow'. Valid options: 'follow' ('f'), 'manual' ('m'), 'error' ('e'). +- `--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 {int}`: timeout period in seconds +- `--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 +- `--redirect-mode, -R {string}`: What to do when encountering redirects. Default: 'follow'. Valid options: 'follow' ('f'), 'manual' ('m'), 'error' ('e'). ## Parameters - - `URL`: The URL to post to. - - `data`: The contents of the post body. - +- `URL`: The URL to post to. +- `data`: The contents of the post body. ## Input/output types: @@ -47,28 +47,33 @@ feature: default ## Examples Patch content to example.com -```nu + +```nushell > http patch https://www.example.com 'body' ``` Patch content to example.com, with username and password -```nu + +```nushell > http patch --user myuser --password mypass https://www.example.com 'body' ``` Patch content to example.com, with custom header -```nu + +```nushell > http patch --headers [my-header-key my-header-value] https://www.example.com ``` Patch content to example.com, with JSON body -```nu + +```nushell > http patch --content-type application/json https://www.example.com { field: value } ``` ## Notes -Performs HTTP PATCH operation. \ No newline at end of file + +Performs HTTP PATCH operation. diff --git a/commands/docs/http_post.md b/src/content/docs/commands/docs/http_post.md similarity index 53% rename from commands/docs/http_post.md rename to src/content/docs/commands/docs/http_post.md index d0d35791b01..f28d737f0ef 100644 --- a/commands/docs/http_post.md +++ b/src/content/docs/commands/docs/http_post.md @@ -9,6 +9,7 @@ usage: | Post a body to a URL. feature: default --- + # {{ $frontmatter.title }} for network @@ -17,26 +18,25 @@ feature: default ## Signature -```> http post {flags} (URL) (data)``` +`> http post {flags} (URL) (data)` ## 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 {int}`: timeout period in seconds - - `--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 - - `--redirect-mode, -R {string}`: What to do when encountering redirects. Default: 'follow'. Valid options: 'follow' ('f'), 'manual' ('m'), 'error' ('e'). +- `--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 {int}`: timeout period in seconds +- `--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 +- `--redirect-mode, -R {string}`: What to do when encountering redirects. Default: 'follow'. Valid options: 'follow' ('f'), 'manual' ('m'), 'error' ('e'). ## Parameters - - `URL`: The URL to post to. - - `data`: The contents of the post body. - +- `URL`: The URL to post to. +- `data`: The contents of the post body. ## Input/output types: @@ -47,28 +47,33 @@ feature: default ## Examples Post content to example.com -```nu + +```nushell > http post https://www.example.com 'body' ``` Post content to example.com, with username and password -```nu + +```nushell > http post --user myuser --password mypass https://www.example.com 'body' ``` Post content to example.com, with custom header -```nu + +```nushell > http post --headers [my-header-key my-header-value] https://www.example.com ``` Post content to example.com, with JSON body -```nu + +```nushell > http post --content-type application/json https://www.example.com { field: value } ``` ## Notes -Performs HTTP POST operation. \ No newline at end of file + +Performs HTTP POST operation. diff --git a/commands/docs/http_put.md b/src/content/docs/commands/docs/http_put.md similarity index 53% rename from commands/docs/http_put.md rename to src/content/docs/commands/docs/http_put.md index e12fd59944a..490f715275a 100644 --- a/commands/docs/http_put.md +++ b/src/content/docs/commands/docs/http_put.md @@ -9,6 +9,7 @@ usage: | Put a body to a URL. feature: default --- + # {{ $frontmatter.title }} for network @@ -17,26 +18,25 @@ feature: default ## Signature -```> http put {flags} (URL) (data)``` +`> http put {flags} (URL) (data)` ## 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 {int}`: timeout period in seconds - - `--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 - - `--redirect-mode, -R {string}`: What to do when encountering redirects. Default: 'follow'. Valid options: 'follow' ('f'), 'manual' ('m'), 'error' ('e'). +- `--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 {int}`: timeout period in seconds +- `--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 +- `--redirect-mode, -R {string}`: What to do when encountering redirects. Default: 'follow'. Valid options: 'follow' ('f'), 'manual' ('m'), 'error' ('e'). ## Parameters - - `URL`: The URL to post to. - - `data`: The contents of the post body. - +- `URL`: The URL to post to. +- `data`: The contents of the post body. ## Input/output types: @@ -47,28 +47,33 @@ feature: default ## Examples Put content to example.com -```nu + +```nushell > http put https://www.example.com 'body' ``` Put content to example.com, with username and password -```nu + +```nushell > http put --user myuser --password mypass https://www.example.com 'body' ``` Put content to example.com, with custom header -```nu + +```nushell > http put --headers [my-header-key my-header-value] https://www.example.com ``` Put content to example.com, with JSON body -```nu + +```nushell > http put --content-type application/json https://www.example.com { field: value } ``` ## Notes -Performs HTTP PUT operation. \ No newline at end of file + +Performs HTTP PUT operation. diff --git a/commands/docs/if.md b/src/content/docs/commands/docs/if.md similarity index 76% rename from commands/docs/if.md rename to src/content/docs/commands/docs/if.md index 2cc86e546bb..0c1451266da 100644 --- a/commands/docs/if.md +++ b/src/content/docs/commands/docs/if.md @@ -9,6 +9,7 @@ usage: | Conditionally run a block. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,14 +18,13 @@ feature: default ## Signature -```> if {flags} (cond) (then_block) (else_expression)``` +`> if {flags} (cond) (then_block) (else_expression)` ## Parameters - - `cond`: Condition to check. - - `then_block`: Block to run if check succeeds. - - `else_expression`: Expression or block to run when the condition is false. - +- `cond`: Condition to check. +- `then_block`: Block to run if check succeeds. +- `else_expression`: Expression or block to run when the condition is false. ## Input/output types: @@ -35,19 +35,22 @@ feature: default ## Examples Output a value if a condition matches, otherwise return nothing -```nu + +```nushell > if 2 < 3 { 'yes!' } yes! ``` Output a value if a condition matches, else return another value -```nu + +```nushell > if 5 < 3 { 'yes!' } else { 'no!' } no! ``` Chain multiple if's together -```nu + +```nushell > if 5 < 3 { 'yes!' } else if 4 < 5 { 'no!' } else { 'okay!' } no! ``` diff --git a/commands/docs/ignore.md b/src/content/docs/commands/docs/ignore.md similarity index 95% rename from commands/docs/ignore.md rename to src/content/docs/commands/docs/ignore.md index 42f29fe56b8..e39acfbfde3 100644 --- a/commands/docs/ignore.md +++ b/src/content/docs/commands/docs/ignore.md @@ -9,6 +9,7 @@ usage: | Ignore the output of the previous command in the pipeline. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,8 +18,7 @@ feature: default ## Signature -```> ignore {flags} ``` - +`> ignore {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Ignore the output of an echo command -```nu + +```nushell > echo done | ignore ``` diff --git a/commands/docs/inc.md b/src/content/docs/commands/docs/inc.md similarity index 68% rename from commands/docs/inc.md rename to src/content/docs/commands/docs/inc.md index e57ce47e683..20126968a43 100644 --- a/commands/docs/inc.md +++ b/src/content/docs/commands/docs/inc.md @@ -9,6 +9,7 @@ usage: | Increment a value or version. Optionally use the column of a table. feature: default --- + # {{ $frontmatter.title }} for default @@ -17,18 +18,17 @@ feature: default ## Signature -```> inc {flags} (cell_path)``` +`> inc {flags} (cell_path)` ## 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 ## Input/output types: diff --git a/commands/docs/input.md b/src/content/docs/commands/docs/input.md similarity index 75% rename from commands/docs/input.md rename to src/content/docs/commands/docs/input.md index 5bf5c6e659f..1cbf28158e8 100644 --- a/commands/docs/input.md +++ b/src/content/docs/commands/docs/input.md @@ -9,6 +9,7 @@ usage: | Get input from the user. feature: default --- + # {{ $frontmatter.title }} for platform @@ -17,18 +18,17 @@ feature: default ## Signature -```> input {flags} (prompt)``` +`> input {flags} (prompt)` ## 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 - - `--suppress-output, -s`: don't print keystroke values +- `--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 +- `--suppress-output, -s`: don't print keystroke values ## Parameters - - `prompt`: Prompt to show the user. - +- `prompt`: Prompt to show the user. ## Input/output types: @@ -39,21 +39,22 @@ feature: default ## Examples Get input from the user, and assign to a variable -```nu + +```nushell > let user_input = (input) ``` Get two characters from the user, and assign to a variable -```nu + +```nushell > let user_input = (input --numchar 2) ``` - ## Subcommands: | name | type | usage | | ------------------------------------------------ | ------- | -------------------------------- | | [`input list`](/commands/docs/input_list.md) | Builtin | Interactive list selection. | -| [`input listen`](/commands/docs/input_listen.md) | Builtin | Listen for user interface event. | \ No newline at end of file +| [`input listen`](/commands/docs/input_listen.md) | Builtin | Listen for user interface event. | diff --git a/commands/docs/input_list.md b/src/content/docs/commands/docs/input_list.md similarity index 71% rename from commands/docs/input_list.md rename to src/content/docs/commands/docs/input_list.md index 8da5941fa1c..8ca8c3fbc12 100644 --- a/commands/docs/input_list.md +++ b/src/content/docs/commands/docs/input_list.md @@ -9,6 +9,7 @@ usage: | Interactive list selection. feature: default --- + # {{ $frontmatter.title }} for platform @@ -17,56 +18,62 @@ feature: default ## Signature -```> input list {flags} (prompt)``` +`> input list {flags} (prompt)` ## Flags - - `--multi, -m`: Use multiple results, you can press a to toggle all options on/off - - `--fuzzy, -f`: Use a fuzzy select. - - `--index, -i`: Returns list indexes. +- `--multi, -m`: Use multiple results, you can press a to toggle all options on/off +- `--fuzzy, -f`: Use a fuzzy select. +- `--index, -i`: Returns list indexes. ## Parameters - - `prompt`: The prompt to display. - +- `prompt`: The prompt to display. ## Input/output types: -| input | output | -| --------- | ------ | +| input | output | +| ----------- | ------ | | list\ | any | -| range | int | +| range | int | + ## Examples Return a single value from a list -```nu + +```nushell > [1 2 3 4 5] | input list 'Rate it' ``` Return multiple values from a list -```nu + +```nushell > [Banana Kiwi Pear Peach Strawberry] | input list --multi 'Add fruits to the basket' ``` Return a single record from a table with fuzzy search -```nu + +```nushell > ls | input list --fuzzy 'Select the target' ``` Choose an item from a range -```nu + +```nushell > 1..10 | input list ``` Return the index of a selected item -```nu + +```nushell > [Banana Kiwi Pear Peach Strawberry] | input list --index ``` ## Notes -Abort with esc or q. \ No newline at end of file + +Abort with esc or q. diff --git a/commands/docs/input_listen.md b/src/content/docs/commands/docs/input_listen.md similarity index 65% rename from commands/docs/input_listen.md rename to src/content/docs/commands/docs/input_listen.md index 9eecfed9e25..a39163befbd 100644 --- a/commands/docs/input_listen.md +++ b/src/content/docs/commands/docs/input_listen.md @@ -9,6 +9,7 @@ usage: | Listen for user interface event. feature: default --- + # {{ $frontmatter.title }} for platform @@ -17,31 +18,33 @@ feature: default ## Signature -```> input listen {flags} ``` +`> input listen {flags} ` ## 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 ## Input/output types: -| input | output | -| ------- | ------------------------------------------------ | +| input | output | +| ------- | ---------------------------------------------------- | | nothing | record\\> | ## Examples Listen for a keyboard shortcut and find out how nu receives it -```nu + +```nushell > input listen --types [key] ``` ## Notes + There are 5 different type of events: focus, key, mouse, paste, resize. Each will produce a corresponding record, distinguished by type field: + ``` { type: focus event: (gained|lost) } { type: key key_type: code: modifiers: [ ... ] } @@ -49,9 +52,10 @@ corresponding record, distinguished by type field: { type: paste content: } { type: resize col: row: } ``` + There are 6 `modifier` variants: shift, control, alt, super, hyper, meta. There are 4 `key_type` variants: - f - f1, f2, f3 ... keys - char - alphanumeric and special symbols (a, A, 1, $ ...) - media - dedicated media keys (play, pause, tracknext ...) - other - keys not falling under previous categories (up, down, backspace, enter ...) \ No newline at end of file +f - f1, f2, f3 ... keys +char - alphanumeric and special symbols (a, A, 1, $ ...) +media - dedicated media keys (play, pause, tracknext ...) +other - keys not falling under previous categories (up, down, backspace, enter ...) diff --git a/commands/docs/insert.md b/src/content/docs/commands/docs/insert.md similarity index 87% rename from commands/docs/insert.md rename to src/content/docs/commands/docs/insert.md index 6b3ff672c96..262027c8d7a 100644 --- a/commands/docs/insert.md +++ b/src/content/docs/commands/docs/insert.md @@ -9,6 +9,7 @@ usage: | Insert a new column, using an expression or closure to create each row's values. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,25 +18,26 @@ feature: default ## Signature -```> insert {flags} (field) (new value)``` +`> insert {flags} (field) (new value)` ## Parameters - - `field`: The name of the column to insert. - - `new value`: The new value to give the cell(s). - +- `field`: The name of the column to insert. +- `new value`: The new value to give the cell(s). ## Input/output types: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | -| record | record | -| table | table | +| record | record | +| table | table | + ## Examples Insert a new entry into a single record -```nu + +```nushell > {'name': 'nu', 'stars': 5} | insert alias 'Nushell' ╭───────┬─────────╮ │ name │ nu │ @@ -45,7 +47,8 @@ Insert a new entry into a single record ``` Insert a new column into a table, populating all rows -```nu + +```nushell > [[project, lang]; ['Nushell', 'Rust']] | insert type 'shell' ╭───┬─────────┬──────┬───────╮ │ # │ project │ lang │ type │ @@ -56,7 +59,8 @@ Insert a new column into a table, populating all rows ``` Insert a new column with values computed based off the other columns -```nu + +```nushell > [[foo]; [7] [8] [9]] | insert bar {|row| $row.foo * 2 } ╭───┬─────┬─────╮ │ # │ foo │ bar │ @@ -69,7 +73,8 @@ Insert a new column with values computed based off the other columns ``` Insert a new value into a list at an index -```nu + +```nushell > [1 2 4] | insert 2 3 ╭───┬───╮ │ 0 │ 1 │ @@ -81,7 +86,8 @@ Insert a new value into a list at an index ``` Insert a new value at the end of a list -```nu + +```nushell > [1 2 3] | insert 3 4 ╭───┬───╮ │ 0 │ 1 │ diff --git a/commands/docs/inspect.md b/src/content/docs/commands/docs/inspect.md similarity index 94% rename from commands/docs/inspect.md rename to src/content/docs/commands/docs/inspect.md index 3a3ee6143ee..77797afaf1b 100644 --- a/commands/docs/inspect.md +++ b/src/content/docs/commands/docs/inspect.md @@ -9,6 +9,7 @@ usage: | Inspect pipeline results while running a pipeline. feature: default --- + # {{ $frontmatter.title }} for debug @@ -17,8 +18,7 @@ feature: default ## Signature -```> inspect {flags} ``` - +`> inspect {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Inspect pipeline results -```nu + +```nushell > ls | inspect | get name | inspect ``` diff --git a/commands/docs/into.md b/src/content/docs/commands/docs/into.md similarity index 97% rename from commands/docs/into.md rename to src/content/docs/commands/docs/into.md index d8f4554189e..fec7a3eac96 100644 --- a/commands/docs/into.md +++ b/src/content/docs/commands/docs/into.md @@ -9,6 +9,7 @@ usage: | Commands to convert data from one type to another. feature: default --- + # {{ $frontmatter.title }} for conversions @@ -17,8 +18,7 @@ feature: default ## Signature -```> into {flags} ``` - +`> into {flags} ` ## Input/output types: @@ -27,6 +27,7 @@ feature: default | nothing | string | ## Notes + You must use one of the following subcommands. Using this command as-is will only produce this help message. ## Subcommands: @@ -45,4 +46,4 @@ You must use one of the following subcommands. Using this command as-is will onl | [`into record`](/commands/docs/into_record.md) | Builtin | Convert value to record. | | [`into sqlite`](/commands/docs/into_sqlite.md) | Builtin | Convert table into a SQLite database. | | [`into string`](/commands/docs/into_string.md) | Builtin | Convert value to string. | -| [`into value`](/commands/docs/into_value.md) | Builtin | Infer nushell datatype for each cell. | \ No newline at end of file +| [`into value`](/commands/docs/into_value.md) | Builtin | Infer nushell datatype for each cell. | diff --git a/commands/docs/into_binary.md b/src/content/docs/commands/docs/into_binary.md similarity index 90% rename from commands/docs/into_binary.md rename to src/content/docs/commands/docs/into_binary.md index 2a3e47b42d2..6a5a234d67e 100644 --- a/commands/docs/into_binary.md +++ b/src/content/docs/commands/docs/into_binary.md @@ -9,6 +9,7 @@ usage: | Convert value to a binary primitive. feature: default --- + # {{ $frontmatter.title }} for conversions @@ -17,16 +18,15 @@ feature: default ## Signature -```> into binary {flags} ...rest``` +`> into binary {flags} ...rest` ## Flags - - `--compact, -c`: output without padding zeros +- `--compact, -c`: output without padding zeros ## Parameters - - `...rest`: For a data structure input, convert data at the given cell paths. - +- `...rest`: For a data structure input, convert data at the given cell paths. ## Input/output types: @@ -41,10 +41,12 @@ feature: default | record | record | | string | binary | | table | table | + ## Examples convert string to a nushell binary primitive -```nu + +```nushell > 'This is a string that is exactly 52 characters long.' | into binary Length: 52 (0x34) bytes | printable whitespace ascii_other non_ascii 00000000: 54 68 69 73 20 69 73 20 61 20 73 74 72 69 6e 67 This is a string @@ -55,7 +57,8 @@ Length: 52 (0x34) bytes | printable whitespace ascii_other non_ascii ``` convert a number to a nushell binary primitive -```nu + +```nushell > 1 | into binary Length: 8 (0x8) bytes | printable whitespace ascii_other non_ascii 00000000: 01 00 00 00 00 00 00 00 •0000000 @@ -63,7 +66,8 @@ Length: 8 (0x8) bytes | printable whitespace ascii_other non_ascii ``` convert a boolean to a nushell binary primitive -```nu + +```nushell > true | into binary Length: 8 (0x8) bytes | printable whitespace ascii_other non_ascii 00000000: 01 00 00 00 00 00 00 00 •0000000 @@ -71,19 +75,22 @@ Length: 8 (0x8) bytes | printable whitespace ascii_other non_ascii ``` convert a filesize to a nushell binary primitive -```nu + +```nushell > ls | where name == LICENSE | get size | into binary ``` convert a filepath to a nushell binary primitive -```nu + +```nushell > ls | where name == LICENSE | get name | path expand | into binary ``` convert a float to a nushell binary primitive -```nu + +```nushell > 1.234 | into binary Length: 8 (0x8) bytes | printable whitespace ascii_other non_ascii 00000000: 58 39 b4 c8 76 be f3 3f X9××v××? @@ -91,7 +98,8 @@ Length: 8 (0x8) bytes | printable whitespace ascii_other non_ascii ``` convert an int to a nushell binary primitive with compact enabled -```nu + +```nushell > 10 | into binary --compact Length: 1 (0x1) bytes | printable whitespace ascii_other non_ascii 00000000: 0a _ diff --git a/commands/docs/into_bits.md b/src/content/docs/commands/docs/into_bits.md similarity index 84% rename from commands/docs/into_bits.md rename to src/content/docs/commands/docs/into_bits.md index 7ad89d0b213..c047e111e40 100644 --- a/commands/docs/into_bits.md +++ b/src/content/docs/commands/docs/into_bits.md @@ -9,24 +9,24 @@ usage: | Convert value to a binary primitive. feature: extra --- + # {{ $frontmatter.title }} for conversions
{{ $frontmatter.conversions }}
- ::: warning - Command `into bits` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `into bits` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> into bits {flags} ...rest``` +`> into bits {flags} ...rest` ## Parameters - - `...rest`: for a data structure input, convert data at the given cell paths - +- `...rest`: for a data structure input, convert data at the given cell paths ## Input/output types: @@ -41,46 +41,54 @@ feature: extra | record | record | | string | string | | table | table | + ## Examples convert a binary value into a string, padded to 8 places with 0s -```nu + +```nushell > 01b | into bits 00000001 ``` convert an int into a string, padded to 8 places with 0s -```nu + +```nushell > 1 | into bits 00000001 ``` convert a filesize value into a string, padded to 8 places with 0s -```nu + +```nushell > 1b | into bits 00000001 ``` convert a duration value into a string, padded to 8 places with 0s -```nu + +```nushell > 1ns | into bits 00000001 ``` convert a boolean value into a string, padded to 8 places with 0s -```nu + +```nushell > true | into bits 00000001 ``` convert a datetime value into a string, padded to 8 places with 0s -```nu + +```nushell > 2023-04-17T01:02:03 | into bits 01001101 01101111 01101110 00100000 01000001 01110000 01110010 00100000 00110001 00110111 00100000 00110000 00110001 00111010 00110000 00110010 00111010 00110000 00110011 00100000 00110010 00110000 00110010 00110011 ``` convert a string into a raw binary string, padded with 0s to 8 places -```nu + +```nushell > 'nushell.sh' | into bits 01101110 01110101 01110011 01101000 01100101 01101100 01101100 00101110 01110011 01101000 ``` diff --git a/commands/docs/into_bool.md b/src/content/docs/commands/docs/into_bool.md similarity index 74% rename from commands/docs/into_bool.md rename to src/content/docs/commands/docs/into_bool.md index ec61a826b5c..e4393bb1b11 100644 --- a/commands/docs/into_bool.md +++ b/src/content/docs/commands/docs/into_bool.md @@ -9,6 +9,7 @@ usage: | Convert value to boolean. feature: default --- + # {{ $frontmatter.title }} for conversions @@ -17,28 +18,29 @@ feature: default ## Signature -```> into bool {flags} ...rest``` +`> into bool {flags} ...rest` ## Parameters - - `...rest`: For a data structure input, convert data at the given cell paths. - +- `...rest`: For a data structure input, convert data at the given cell paths. ## Input/output types: -| input | output | -| --------- | ------ | -| bool | bool | -| int | bool | +| input | output | +| ----------- | ------ | +| bool | bool | +| int | bool | | list\ | table | -| number | bool | -| record | record | -| string | bool | -| table | table | +| number | bool | +| record | record | +| string | bool | +| table | table | + ## Examples Convert value to boolean in table -```nu + +```nushell > [[value]; ['false'] ['1'] [0] [1.0] [true]] | into bool value ╭───┬───────╮ │ # │ value │ @@ -53,31 +55,36 @@ Convert value to boolean in table ``` Convert bool to boolean -```nu + +```nushell > true | into bool true ``` convert int to boolean -```nu + +```nushell > 1 | into bool true ``` convert float to boolean -```nu + +```nushell > 0.3 | into bool true ``` convert float string to boolean -```nu + +```nushell > '0.0' | into bool false ``` convert string to boolean -```nu + +```nushell > 'true' | into bool true ``` diff --git a/commands/docs/into_cell-path.md b/src/content/docs/commands/docs/into_cell-path.md similarity index 73% rename from commands/docs/into_cell-path.md rename to src/content/docs/commands/docs/into_cell-path.md index 8b083397ab3..2d7fb1720af 100644 --- a/commands/docs/into_cell-path.md +++ b/src/content/docs/commands/docs/into_cell-path.md @@ -9,6 +9,7 @@ usage: | Convert value to a cell-path. feature: default --- + # {{ $frontmatter.title }} for conversions @@ -17,41 +18,46 @@ feature: default ## Signature -```> into cell-path {flags} ``` - +`> into cell-path {flags} ` ## Input/output types: -| input | output | -| ---------------------------------------- | --------- | -| int | cell-path | -| list\ | cell-path | +| input | output | +| -------------------------------------------- | --------- | +| int | cell-path | +| list\ | cell-path | | list\\> | cell-path | + ## Examples Convert integer into cell path -```nu + +```nushell > 5 | into cell-path 5 ``` Convert string into cell path -```nu + +```nushell > 'some.path' | split row '.' | into cell-path some.path ``` Convert list into cell path -```nu + +```nushell > [5 c 7 h] | into cell-path 5.c.7.h ``` Convert table into cell path -```nu + +```nushell > [[value, optional]; [5 true] [c false]] | into cell-path 5.c ``` ## Notes -Converting a string directly into a cell path is intentionally not supported. \ No newline at end of file + +Converting a string directly into a cell path is intentionally not supported. diff --git a/commands/docs/into_datetime.md b/src/content/docs/commands/docs/into_datetime.md similarity index 68% rename from commands/docs/into_datetime.md rename to src/content/docs/commands/docs/into_datetime.md index 682dd102e8b..eb90b8a2243 100644 --- a/commands/docs/into_datetime.md +++ b/src/content/docs/commands/docs/into_datetime.md @@ -9,6 +9,7 @@ usage: | Convert text or timestamp into a datetime. feature: default --- + # {{ $frontmatter.title }} for conversions @@ -17,64 +18,70 @@ feature: default ## Signature -```> into datetime {flags} ...rest``` +`> into datetime {flags} ...rest` ## 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 - - `--list-human, -n`: Show human-readable datetime parsing examples +- `--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 +- `--list-human, -n`: Show human-readable datetime parsing examples ## Parameters - - `...rest`: For a data structure input, convert data at the given cell paths. - +- `...rest`: For a data structure input, convert data at the given cell paths. ## Input/output types: -| input | output | -| ------------ | -------------- | -| int | datetime | +| input | output | +| -------------- | ---------------- | +| int | datetime | | list\ | list\ | -| record | record | -| string | datetime | -| table | table | +| record | record | +| string | datetime | +| table | table | + ## Examples Convert any standard timestamp string to datetime -```nu + +```nushell > '27.02.2021 1:55 pm +0000' | into datetime Sat, 27 Feb 2021 13:55:00 +0000 (2 years ago) ``` Convert any standard timestamp string to datetime -```nu + +```nushell > '2021-02-27T13:55:40.2246+00:00' | into datetime Sat, 27 Feb 2021 13:55:40 +0000 (2 years ago) ``` Convert non-standard timestamp string to datetime using a custom format -```nu + +```nushell > '20210227_135540+0000' | into datetime --format '%Y%m%d_%H%M%S%z' Sat, 27 Feb 2021 13:55:40 +0000 (2 years ago) ``` Convert nanosecond-precision unix timestamp to a datetime with offset from UTC -```nu + +```nushell > 1614434140123456789 | into datetime --offset -5 Sat, 27 Feb 2021 13:55:40 +0000 (2 years ago) ``` Convert standard (seconds) unix timestamp to a UTC datetime -```nu + +```nushell > 1614434140 * 1_000_000_000 | into datetime Sat, 27 Feb 2021 13:55:40 +0000 (2 years ago) ``` Convert list of timestamps to datetimes -```nu + +```nushell > ["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 ╭───┬───────────────╮ │ 0 │ 10 months ago │ @@ -85,19 +92,22 @@ Convert list of timestamps to datetimes ``` Parsing human readable datetimes -```nu + +```nushell > 'Today at 18:30' | into datetime ``` Parsing human readable datetimes -```nu + +```nushell > 'Last Friday at 19:45' | into datetime ``` Parsing human readable datetimes -```nu + +```nushell > 'In 5 minutes and 30 seconds' | into datetime ``` diff --git a/commands/docs/into_duration.md b/src/content/docs/commands/docs/into_duration.md similarity index 83% rename from commands/docs/into_duration.md rename to src/content/docs/commands/docs/into_duration.md index ee46be09ba2..b1cf86da0ba 100644 --- a/commands/docs/into_duration.md +++ b/src/content/docs/commands/docs/into_duration.md @@ -9,6 +9,7 @@ usage: | Convert value to duration. feature: default --- + # {{ $frontmatter.title }} for conversions @@ -17,16 +18,15 @@ feature: default ## Signature -```> into duration {flags} ...rest``` +`> into duration {flags} ...rest` ## Flags - - `--unit, -u {string}`: Unit to convert number into (will have an effect only with integer input) +- `--unit, -u {string}`: Unit to convert number into (will have an effect only with integer input) ## Parameters - - `...rest`: For a data structure input, convert data at the given cell paths. - +- `...rest`: For a data structure input, convert data at the given cell paths. ## Input/output types: @@ -36,22 +36,26 @@ feature: default | int | duration | | string | duration | | table | table | + ## Examples Convert duration string to duration value -```nu + +```nushell > '7min' | into duration 7min ``` Convert compound duration string to duration value -```nu + +```nushell > '1day 2hr 3min 4sec' | into duration 1day 2hr 3min 4sec ``` Convert table of duration strings to table of duration values -```nu + +```nushell > [[value]; ['1sec'] ['2min'] ['3hr'] ['4day'] ['5wk']] | into duration value ╭───┬───────╮ │ # │ value │ @@ -66,22 +70,26 @@ Convert table of duration strings to table of duration values ``` Convert duration to duration -```nu + +```nushell > 420sec | into duration 7min ``` Convert a number of ns to duration -```nu + +```nushell > 1_234_567 | into duration 1ms 234µs 567ns ``` Convert a number of an arbitrary unit to duration -```nu + +```nushell > 1_234 | into duration --unit ms 1sec 234ms ``` ## Notes -Max duration value is i64::MAX nanoseconds; max duration time unit is wk (weeks). \ No newline at end of file + +Max duration value is i64::MAX nanoseconds; max duration time unit is wk (weeks). diff --git a/commands/docs/into_filesize.md b/src/content/docs/commands/docs/into_filesize.md similarity index 73% rename from commands/docs/into_filesize.md rename to src/content/docs/commands/docs/into_filesize.md index 4551f89583d..16e9dbff114 100644 --- a/commands/docs/into_filesize.md +++ b/src/content/docs/commands/docs/into_filesize.md @@ -9,6 +9,7 @@ usage: | Convert value to filesize. feature: default --- + # {{ $frontmatter.title }} for conversions @@ -17,32 +18,33 @@ feature: default ## Signature -```> into filesize {flags} ...rest``` +`> into filesize {flags} ...rest` ## Parameters - - `...rest`: For a data structure input, convert data at the given cell paths. - +- `...rest`: For a data structure input, convert data at the given cell paths. ## Input/output types: -| input | output | -| -------------- | -------------- | -| filesize | filesize | -| int | filesize | +| input | output | +| ---------------- | ---------------- | +| filesize | filesize | +| int | filesize | | list\ | list\ | | list\ | list\ | | list\ | list\ | | list\ | list\ | | list\ | list\ | -| number | filesize | -| record | record | -| string | filesize | -| table | table | +| number | filesize | +| record | record | +| string | filesize | +| table | table | + ## Examples Convert string to filesize in table -```nu + +```nushell > [[device size]; ["/dev/sda1" "200"] ["/dev/loop0" "50"]] | into filesize size ╭───┬────────────┬───────╮ │ # │ device │ size │ @@ -54,25 +56,29 @@ Convert string to filesize in table ``` Convert string to filesize -```nu + +```nushell > '2' | into filesize 2 B ``` Convert float to filesize -```nu + +```nushell > 8.3 | into filesize 8 B ``` Convert int to filesize -```nu + +```nushell > 5 | into filesize 5 B ``` Convert file size to filesize -```nu + +```nushell > 4KB | into filesize 3.9 KiB ``` diff --git a/commands/docs/into_float.md b/src/content/docs/commands/docs/into_float.md similarity index 72% rename from commands/docs/into_float.md rename to src/content/docs/commands/docs/into_float.md index 54e11e33a15..5d871ac3084 100644 --- a/commands/docs/into_float.md +++ b/src/content/docs/commands/docs/into_float.md @@ -9,6 +9,7 @@ usage: | Convert data into floating point number. feature: default --- + # {{ $frontmatter.title }} for conversions @@ -17,28 +18,29 @@ feature: default ## Signature -```> into float {flags} ...rest``` +`> into float {flags} ...rest` ## Parameters - - `...rest`: For a data structure input, convert data at the given cell paths. - +- `...rest`: For a data structure input, convert data at the given cell paths. ## Input/output types: -| input | output | -| --------- | ----------- | -| bool | float | -| float | float | -| int | float | +| input | output | +| ----------- | ------------- | +| bool | float | +| float | float | +| int | float | | list\ | list\ | -| record | record | -| string | float | -| table | table | +| record | record | +| string | float | +| table | table | + ## Examples Convert string to float in table -```nu + +```nushell > [[num]; ['5.01']] | into float num ╭───┬──────╮ │ # │ num │ @@ -49,13 +51,15 @@ Convert string to float in table ``` Convert string to floating point number -```nu + +```nushell > '1.345' | into float 1.345 ``` Coerce list of ints and floats to float -```nu + +```nushell > [4 -5.9] | into float ╭───┬───────╮ │ 0 │ 4.00 │ @@ -65,7 +69,8 @@ Coerce list of ints and floats to float ``` Convert boolean to float -```nu + +```nushell > true | into float 1 ``` diff --git a/commands/docs/into_int.md b/src/content/docs/commands/docs/into_int.md similarity index 67% rename from commands/docs/into_int.md rename to src/content/docs/commands/docs/into_int.md index 88f58fa905a..d6e980b7728 100644 --- a/commands/docs/into_int.md +++ b/src/content/docs/commands/docs/into_int.md @@ -9,6 +9,7 @@ usage: | Convert value to integer. feature: default --- + # {{ $frontmatter.title }} for conversions @@ -17,27 +18,26 @@ feature: default ## Signature -```> into int {flags} ...rest``` +`> into int {flags} ...rest` ## Flags - - `--radix, -r {number}`: radix of integer - - `--endian, -e {string}`: byte encode endian, available options: native(default), little, big +- `--radix, -r {number}`: radix of integer +- `--endian, -e {string}`: byte encode endian, available options: native(default), little, big ## Parameters - - `...rest`: For a data structure input, convert data at the given cell paths. - +- `...rest`: For a data structure input, convert data at the given cell paths. ## Input/output types: -| input | output | -| -------------- | --------- | -| binary | int | -| bool | int | -| datetime | int | -| duration | int | -| filesize | int | +| input | output | +| ---------------- | ----------- | +| binary | int | +| bool | int | +| datetime | int | +| duration | int | +| filesize | int | | list\ | list\ | | list\ | list\ | | list\ | list\ | @@ -45,44 +45,51 @@ feature: default | list\ | list\ | | list\ | list\ | | list\ | list\ | -| number | int | -| record | record | -| string | int | -| table | table | +| number | int | +| record | record | +| string | int | +| table | table | + ## Examples Convert string to int in table -```nu + +```nushell > [[num]; ['-5'] [4] [1.5]] | into int num ``` Convert string to int -```nu + +```nushell > '2' | into int 2 ``` Convert float to int -```nu + +```nushell > 5.9 | into int 5 ``` Convert decimal string to int -```nu + +```nushell > '5.9' | into int 5 ``` Convert file size to int -```nu + +```nushell > 4KB | into int 4000 ``` Convert bool to int -```nu + +```nushell > [false, true] | into int ╭───┬───╮ │ 0 │ 0 │ @@ -92,37 +99,43 @@ Convert bool to int ``` Convert date to int (Unix nanosecond timestamp) -```nu + +```nushell > 1983-04-13T12:09:14.123456789-05:00 | into int 419101754123456789 ``` Convert to int from binary data (radix: 2) -```nu + +```nushell > '1101' | into int --radix 2 13 ``` Convert to int from hex -```nu + +```nushell > 'FF' | into int --radix 16 255 ``` Convert octal string to int -```nu + +```nushell > '0o10132' | into int 4186 ``` Convert 0 padded string to int -```nu + +```nushell > '0010132' | into int 10132 ``` Convert 0 padded string to int with radix 8 -```nu + +```nushell > '0010132' | into int --radix 8 4186 ``` diff --git a/commands/docs/into_record.md b/src/content/docs/commands/docs/into_record.md similarity index 88% rename from commands/docs/into_record.md rename to src/content/docs/commands/docs/into_record.md index 3d1c372ca7c..41c719a0c84 100644 --- a/commands/docs/into_record.md +++ b/src/content/docs/commands/docs/into_record.md @@ -9,6 +9,7 @@ usage: | Convert value to record. feature: default --- + # {{ $frontmatter.title }} for conversions @@ -17,22 +18,23 @@ feature: default ## Signature -```> into record {flags} ``` - +`> into record {flags} ` ## Input/output types: -| input | output | -| --------- | ------ | -| datetime | record | -| duration | record | +| input | output | +| ----------- | ------ | +| datetime | record | +| duration | record | | list\ | record | -| range | record | -| record | record | +| range | record | +| record | record | + ## Examples Convert from one row table to record -```nu + +```nushell > [[value]; [false]] | into record ╭───────┬───────╮ │ value │ false │ @@ -40,7 +42,8 @@ Convert from one row table to record ``` Convert from list to record -```nu + +```nushell > [1 2 3] | into record ╭───┬───╮ │ 0 │ 1 │ @@ -50,7 +53,8 @@ Convert from list to record ``` Convert from range to record -```nu + +```nushell > 0..2 | into record ╭───┬───╮ │ 0 │ 0 │ @@ -60,7 +64,8 @@ Convert from range to record ``` convert duration to record (weeks max) -```nu + +```nushell > (-500day - 4hr - 5sec) | into record ╭────────┬────╮ │ week │ 71 │ @@ -72,7 +77,8 @@ convert duration to record (weeks max) ``` convert record to record -```nu + +```nushell > {a: 1, b: 2} | into record ╭───┬───╮ │ a │ 1 │ @@ -81,7 +87,8 @@ convert record to record ``` convert date to record -```nu + +```nushell > 2020-04-12T22:10:57+02:00 | into record ╭──────────┬────────╮ │ year │ 2020 │ diff --git a/commands/docs/into_sqlite.md b/src/content/docs/commands/docs/into_sqlite.md similarity index 83% rename from commands/docs/into_sqlite.md rename to src/content/docs/commands/docs/into_sqlite.md index 244270e432a..576080bab45 100644 --- a/commands/docs/into_sqlite.md +++ b/src/content/docs/commands/docs/into_sqlite.md @@ -9,6 +9,7 @@ usage: | Convert table into a SQLite database. feature: default --- + # {{ $frontmatter.title }} for conversions @@ -17,16 +18,15 @@ feature: default ## Signature -```> into sqlite {flags} (file-name)``` +`> into sqlite {flags} (file-name)` ## 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 - - `file-name`: Specify the filename to save the database to. - +- `file-name`: Specify the filename to save the database to. ## Input/output types: @@ -34,28 +34,33 @@ feature: default | ------ | ------- | | record | nothing | | table | nothing | + ## Examples Convert ls entries into a SQLite database with 'main' as the table name -```nu + +```nushell > ls | into sqlite my_ls.db ``` Convert ls entries into a SQLite database with 'my_table' as the table name -```nu + +```nushell > ls | into sqlite my_ls.db -t my_table ``` Convert table literal into a SQLite database with 'main' as the table name -```nu + +```nushell > [[name]; [-----] [someone] [=====] [somename] ['(((((']] | into sqlite filename.db ``` Insert a single record into a SQLite database -```nu + +```nushell > { foo: bar, baz: quux } | into sqlite filename.db ``` diff --git a/commands/docs/into_string.md b/src/content/docs/commands/docs/into_string.md similarity index 65% rename from commands/docs/into_string.md rename to src/content/docs/commands/docs/into_string.md index a53a6d43776..e5f22c16d96 100644 --- a/commands/docs/into_string.md +++ b/src/content/docs/commands/docs/into_string.md @@ -9,6 +9,7 @@ usage: | Convert value to string. feature: default --- + # {{ $frontmatter.title }} for conversions @@ -17,96 +18,107 @@ feature: default ## Signature -```> into string {flags} ...rest``` +`> into string {flags} ...rest` ## Flags - - `--decimals, -d {int}`: decimal digits to which to round +- `--decimals, -d {int}`: decimal digits to which to round ## Parameters - - `...rest`: For a data structure input, convert data at the given cell paths. - +- `...rest`: For a data structure input, convert data at the given cell paths. ## Input/output types: -| input | output | -| --------- | ------------ | -| binary | string | -| bool | string | -| datetime | string | -| duration | string | -| filesize | string | -| int | string | +| input | output | +| ----------- | -------------- | +| binary | string | +| bool | string | +| datetime | string | +| duration | string | +| filesize | string | +| int | string | | list\ | list\ | -| number | string | -| record | record | -| string | string | -| table | table | +| number | string | +| record | record | +| string | string | +| table | table | + ## Examples convert int to string and append three decimal places -```nu + +```nushell > 5 | into string --decimals 3 5.000 ``` convert float to string and round to nearest integer -```nu + +```nushell > 1.7 | into string --decimals 0 2 ``` convert float to string -```nu + +```nushell > 1.7 | into string --decimals 1 1.7 ``` convert float to string and limit to 2 decimals -```nu + +```nushell > 1.734 | into string --decimals 2 1.73 ``` convert float to string -```nu + +```nushell > 4.3 | into string 4.3 ``` convert string to string -```nu + +```nushell > '1234' | into string 1234 ``` convert boolean to string -```nu + +```nushell > true | into string true ``` convert date to string -```nu + +```nushell > '2020-10-10 10:00:00 +02:00' | into datetime | into string Sat Oct 10 10:00:00 2020 ``` convert filepath to string -```nu + +```nushell > ls Cargo.toml | get name | into string ``` convert filesize to string -```nu + +```nushell > 1KiB | into string 1.0 KiB ``` convert duration to string -```nu + +```nushell > 9day | into string 1wk 2day ``` diff --git a/commands/docs/into_value.md b/src/content/docs/commands/docs/into_value.md similarity index 87% rename from commands/docs/into_value.md rename to src/content/docs/commands/docs/into_value.md index eaadb417fd5..4872e119396 100644 --- a/commands/docs/into_value.md +++ b/src/content/docs/commands/docs/into_value.md @@ -9,6 +9,7 @@ usage: | Infer nushell datatype for each cell. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,12 +18,11 @@ feature: default ## Signature -```> into value {flags} ``` +`> into value {flags} ` ## Flags - - `--columns, -c {table}`: list of columns to update - +- `--columns, -c {table}`: list of columns to update ## Input/output types: @@ -33,13 +33,15 @@ feature: default ## Examples Infer Nushell values for each cell. -```nu + +```nushell > $table | into value ``` Infer Nushell values for each cell in the given columns. -```nu + +```nushell > $table | into value -c [column1, column5] ``` diff --git a/commands/docs/is-admin.md b/src/content/docs/commands/docs/is-admin.md similarity index 95% rename from commands/docs/is-admin.md rename to src/content/docs/commands/docs/is-admin.md index a58f433a722..51070db8b91 100644 --- a/commands/docs/is-admin.md +++ b/src/content/docs/commands/docs/is-admin.md @@ -9,6 +9,7 @@ usage: | Check if nushell is running with administrator or root privileges. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,8 +18,7 @@ feature: default ## Signature -```> is-admin {flags} ``` - +`> is-admin {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Return 'iamroot' if nushell is running with admin/root privileges, and 'iamnotroot' if not. -```nu + +```nushell > if (is-admin) { "iamroot" } else { "iamnotroot" } iamnotroot ``` diff --git a/commands/docs/is-empty.md b/src/content/docs/commands/docs/is-empty.md similarity index 85% rename from commands/docs/is-empty.md rename to src/content/docs/commands/docs/is-empty.md index f067682b7cc..6b1a7906cdb 100644 --- a/commands/docs/is-empty.md +++ b/src/content/docs/commands/docs/is-empty.md @@ -9,6 +9,7 @@ usage: | Check for empty values. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,12 +18,11 @@ feature: default ## Signature -```> is-empty {flags} ...rest``` +`> is-empty {flags} ...rest` ## Parameters - - `...rest`: The names of the columns to check emptiness. - +- `...rest`: The names of the columns to check emptiness. ## Input/output types: @@ -33,19 +33,22 @@ feature: default ## Examples Check if a string is empty -```nu + +```nushell > '' | is-empty true ``` Check if a list is empty -```nu + +```nushell > [] | is-empty true ``` Check if more than one column are empty -```nu + +```nushell > [[meal size]; [arepa small] [taco '']] | is-empty meal size false ``` diff --git a/commands/docs/is-terminal.md b/src/content/docs/commands/docs/is-terminal.md similarity index 80% rename from commands/docs/is-terminal.md rename to src/content/docs/commands/docs/is-terminal.md index 398cfa9f467..c27e6692a4c 100644 --- a/commands/docs/is-terminal.md +++ b/src/content/docs/commands/docs/is-terminal.md @@ -9,6 +9,7 @@ usage: | Check if stdin, stdout, or stderr is a terminal. feature: default --- + # {{ $frontmatter.title }} for platform @@ -17,14 +18,13 @@ feature: default ## Signature -```> is-terminal {flags} ``` +`> is-terminal {flags} ` ## 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: @@ -35,7 +35,8 @@ feature: default ## Examples Return "terminal attached" if standard input is attached to a terminal, and "no terminal" if not. -```nu + +```nushell > if (is-terminal --stdin) { "terminal attached" } else { "no terminal" } terminal attached ``` diff --git a/commands/docs/items.md b/src/content/docs/commands/docs/items.md similarity index 87% rename from commands/docs/items.md rename to src/content/docs/commands/docs/items.md index 3cef5567951..e00a5f1df68 100644 --- a/commands/docs/items.md +++ b/src/content/docs/commands/docs/items.md @@ -9,6 +9,7 @@ usage: | Given a record, iterate on each pair of column name and associated value. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,12 +18,11 @@ feature: default ## Signature -```> items {flags} (closure)``` +`> items {flags} (closure)` ## Parameters - - `closure`: The closure to run. - +- `closure`: The closure to run. ## Input/output types: @@ -33,7 +33,8 @@ feature: default ## Examples Iterate over each key-value pair of a record -```nu + +```nushell > { new: york, san: francisco } | items {|key, value| echo $'($key) ($value)' } ╭───┬───────────────╮ │ 0 │ new york │ @@ -43,4 +44,5 @@ Iterate over each key-value pair of a record ``` ## Notes -This is a the fusion of `columns`, `values` and `each`. \ No newline at end of file + +This is a the fusion of `columns`, `values` and `each`. diff --git a/commands/docs/join.md b/src/content/docs/commands/docs/join.md similarity index 65% rename from commands/docs/join.md rename to src/content/docs/commands/docs/join.md index e00f65a97ed..56f07da88c9 100644 --- a/commands/docs/join.md +++ b/src/content/docs/commands/docs/join.md @@ -9,6 +9,7 @@ usage: | Join two tables. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,21 +18,20 @@ feature: default ## Signature -```> join {flags} (right-table) (left-on) (right-on)``` +`> join {flags} (right-table) (left-on) (right-on)` ## Flags - - `--inner, -i`: Inner join (default) - - `--left, -l`: Left-outer join - - `--right, -r`: Right-outer join - - `--outer, -o`: Outer join +- `--inner, -i`: Inner join (default) +- `--left, -l`: Left-outer join +- `--right, -r`: Right-outer join +- `--outer, -o`: Outer join ## Parameters - - `right-table`: The right table in the join. - - `left-on`: Name of column in input (left) table to join on. - - `right-on`: Name of column in right table to join on. Defaults to same column as left table. - +- `right-table`: The right table in the join. +- `left-on`: Name of column in input (left) table to join on. +- `right-on`: Name of column in right table to join on. Defaults to same column as left table. ## Input/output types: @@ -42,7 +42,8 @@ feature: default ## Examples Join two tables -```nu + +```nushell > [{a: 1 b: 2}] | join [{a: 1 c: 3}] a ╭───┬───┬───┬───╮ │ # │ a │ b │ c │ diff --git a/commands/docs/keybindings.md b/src/content/docs/commands/docs/keybindings.md similarity index 94% rename from commands/docs/keybindings.md rename to src/content/docs/commands/docs/keybindings.md index fb85b4ab2b7..6008e72be2b 100644 --- a/commands/docs/keybindings.md +++ b/src/content/docs/commands/docs/keybindings.md @@ -9,6 +9,7 @@ usage: | Keybindings related commands. feature: default --- + # {{ $frontmatter.title }} for platform @@ -17,8 +18,7 @@ feature: default ## Signature -```> keybindings {flags} ``` - +`> keybindings {flags} ` ## Input/output types: @@ -27,10 +27,11 @@ feature: default | nothing | string | ## Notes + You must use one of the following subcommands. Using this command as-is will only produce this help message. For more information on input and keybindings, check: - https://www.nushell.sh/book/line_editor.html +https://www.nushell.sh/book/line_editor.html ## Subcommands: @@ -38,4 +39,4 @@ For more information on input and keybindings, check: | -------------------------------------------------------------- | ------- | -------------------------------------------------------------- | | [`keybindings default`](/commands/docs/keybindings_default.md) | Builtin | List default keybindings. | | [`keybindings list`](/commands/docs/keybindings_list.md) | Builtin | List available options that can be used to create keybindings. | -| [`keybindings listen`](/commands/docs/keybindings_listen.md) | Builtin | Get input from the user. | \ No newline at end of file +| [`keybindings listen`](/commands/docs/keybindings_listen.md) | Builtin | Get input from the user. | diff --git a/commands/docs/keybindings_default.md b/src/content/docs/commands/docs/keybindings_default.md similarity index 92% rename from commands/docs/keybindings_default.md rename to src/content/docs/commands/docs/keybindings_default.md index 2904be0b831..b3ea373e17b 100644 --- a/commands/docs/keybindings_default.md +++ b/src/content/docs/commands/docs/keybindings_default.md @@ -9,6 +9,7 @@ usage: | List default keybindings. feature: default --- + # {{ $frontmatter.title }} for platform @@ -17,8 +18,7 @@ feature: default ## Signature -```> keybindings default {flags} ``` - +`> keybindings default {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Get list with default keybindings -```nu + +```nushell > keybindings default ``` diff --git a/commands/docs/keybindings_list.md b/src/content/docs/commands/docs/keybindings_list.md similarity index 75% rename from commands/docs/keybindings_list.md rename to src/content/docs/commands/docs/keybindings_list.md index b36873f6af3..6117e9822fe 100644 --- a/commands/docs/keybindings_list.md +++ b/src/content/docs/commands/docs/keybindings_list.md @@ -9,6 +9,7 @@ usage: | List available options that can be used to create keybindings. feature: default --- + # {{ $frontmatter.title }} for platform @@ -17,16 +18,15 @@ feature: default ## Signature -```> keybindings list {flags} ``` +`> keybindings list {flags} ` ## 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: @@ -37,19 +37,22 @@ feature: default ## Examples Get list of key modifiers -```nu + +```nushell > keybindings list --modifiers ``` Get list of reedline events and edit commands -```nu + +```nushell > keybindings list -e -d ``` Get list with all the available options -```nu + +```nushell > keybindings list ``` diff --git a/commands/docs/keybindings_listen.md b/src/content/docs/commands/docs/keybindings_listen.md similarity index 90% rename from commands/docs/keybindings_listen.md rename to src/content/docs/commands/docs/keybindings_listen.md index 4ef9ed049d2..a672012e486 100644 --- a/commands/docs/keybindings_listen.md +++ b/src/content/docs/commands/docs/keybindings_listen.md @@ -9,6 +9,7 @@ usage: | Get input from the user. feature: default --- + # {{ $frontmatter.title }} for platform @@ -17,8 +18,7 @@ feature: default ## Signature -```> keybindings listen {flags} ``` - +`> keybindings listen {flags} ` ## Input/output types: @@ -29,10 +29,12 @@ feature: default ## Examples Type and see key event codes -```nu + +```nushell > keybindings listen ``` ## Notes -This is an internal debugging tool. For better output, try `input listen --types [key]` \ No newline at end of file + +This is an internal debugging tool. For better output, try `input listen --types [key]` diff --git a/commands/docs/kill.md b/src/content/docs/commands/docs/kill.md similarity index 66% rename from commands/docs/kill.md rename to src/content/docs/commands/docs/kill.md index 9bcd813d35a..2491b972572 100644 --- a/commands/docs/kill.md +++ b/src/content/docs/commands/docs/kill.md @@ -9,6 +9,7 @@ usage: | Kill a process using the process id. feature: default --- + # {{ $frontmatter.title }} for platform @@ -17,19 +18,18 @@ feature: default ## Signature -```> kill {flags} (pid) ...rest``` +`> kill {flags} (pid) ...rest` ## 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 - - `pid`: Process id of process that is to be killed. - - `...rest`: Rest of processes to kill. - +- `pid`: Process id of process that is to be killed. +- `...rest`: Rest of processes to kill. ## Input/output types: @@ -40,19 +40,22 @@ feature: default ## Examples Kill the pid using the most memory -```nu + +```nushell > ps | sort-by mem | last | kill $in.pid ``` Force kill a given pid -```nu + +```nushell > kill --force 12345 ``` Send INT signal -```nu + +```nushell > kill -s 2 12345 ``` diff --git a/commands/docs/last.md b/src/content/docs/commands/docs/last.md similarity index 83% rename from commands/docs/last.md rename to src/content/docs/commands/docs/last.md index 4561dca04e7..31f8632abbb 100644 --- a/commands/docs/last.md +++ b/src/content/docs/commands/docs/last.md @@ -9,6 +9,7 @@ usage: | Return only the last several rows of the input. Counterpart of `first`. Opposite of `drop`. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,23 +18,24 @@ feature: default ## Signature -```> last {flags} (rows)``` +`> last {flags} (rows)` ## Parameters - - `rows`: Starting from the back, the number of rows to return. - +- `rows`: Starting from the back, the number of rows to return. ## Input/output types: -| input | output | -| --------- | ------ | -| binary | binary | +| input | output | +| ----------- | ------ | +| binary | binary | | list\ | any | + ## Examples Return the last 2 items of a list/table -```nu + +```nushell > [1,2,3] | last 2 ╭───┬───╮ │ 0 │ 2 │ @@ -43,13 +45,15 @@ Return the last 2 items of a list/table ``` Return the last item of a list/table -```nu + +```nushell > [1,2,3] | last 3 ``` Return the last 2 bytes of a binary value -```nu + +```nushell > 0x[01 23 45] | last 2 Length: 2 (0x2) bytes | printable whitespace ascii_other non_ascii 00000000: 23 45 #E diff --git a/commands/docs/lazy_make.md b/src/content/docs/commands/docs/lazy_make.md similarity index 67% rename from commands/docs/lazy_make.md rename to src/content/docs/commands/docs/lazy_make.md index cb5bb47645f..1f015883c46 100644 --- a/commands/docs/lazy_make.md +++ b/src/content/docs/commands/docs/lazy_make.md @@ -9,6 +9,7 @@ usage: | Create a lazy record. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,13 +18,12 @@ feature: default ## Signature -```> lazy make {flags} ``` +`> lazy make {flags} ` ## Flags - - `--columns, -c {list}`: Closure that gets called when the LazyRecord needs to list the available column names - - `--get-value, -g {closure(string)}`: Closure to call when a value needs to be produced on demand - +- `--columns, -c {list}`: Closure that gets called when the LazyRecord needs to list the available column names +- `--get-value, -g {closure(string)}`: Closure to call when a value needs to be produced on demand ## Input/output types: @@ -34,20 +34,23 @@ feature: default ## Examples Create a lazy record -```nu + +```nushell > lazy make --columns ["haskell", "futures", "nushell"] --get-value { |lazything| $lazything + "!" } ``` Test the laziness of lazy records -```nu + +```nushell > lazy make --columns ["hello"] --get-value { |key| print $"getting ($key)!"; $key | str upcase } ``` ## Notes + Lazy records are special records that only evaluate their values once the property is requested. - For example, when printing a lazy record, all of its fields will be collected. But when accessing - a specific property, only it will be evaluated. +For example, when printing a lazy record, all of its fields will be collected. But when accessing +a specific property, only it will be evaluated. - Note that this is unrelated to the lazyframes feature bundled with dataframes. \ No newline at end of file + Note that this is unrelated to the lazyframes feature bundled with dataframes. diff --git a/commands/docs/length.md b/src/content/docs/commands/docs/length.md similarity index 87% rename from commands/docs/length.md rename to src/content/docs/commands/docs/length.md index fb0220c8d95..d29ae4f11c6 100644 --- a/commands/docs/length.md +++ b/src/content/docs/commands/docs/length.md @@ -9,6 +9,7 @@ usage: | Count the number of items in an input list or rows in a table. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,25 +18,26 @@ feature: default ## Signature -```> length {flags} ``` - +`> length {flags} ` ## Input/output types: -| input | output | -| --------- | ------ | +| input | output | +| ----------- | ------ | | list\ | int | ## Examples Count the number of items in a list -```nu + +```nushell > [1 2 3 4 5] | length 5 ``` Count the number of rows in a table -```nu + +```nushell > [{a:1 b:2}, {a:2 b:3}] | length 2 ``` diff --git a/commands/docs/let-env.md b/src/content/docs/commands/docs/let-env.md similarity index 81% rename from commands/docs/let-env.md rename to src/content/docs/commands/docs/let-env.md index be362197811..c4e352cac7a 100644 --- a/commands/docs/let-env.md +++ b/src/content/docs/commands/docs/let-env.md @@ -9,6 +9,7 @@ usage: | `let-env FOO = ...` has been removed, use `$env.FOO = ...` instead. feature: default --- + # {{ $frontmatter.title }} for removed @@ -17,13 +18,12 @@ feature: default ## Signature -```> let-env {flags} (var_name) (initial_value)``` +`> let-env {flags} (var_name) (initial_value)` ## Parameters - - `var_name`: Variable name. - - `initial_value`: Equals sign followed by value. - +- `var_name`: Variable name. +- `initial_value`: Equals sign followed by value. ## Input/output types: diff --git a/commands/docs/let.md b/src/content/docs/commands/docs/let.md similarity index 79% rename from commands/docs/let.md rename to src/content/docs/commands/docs/let.md index 0c180273b65..f0fb57d38b6 100644 --- a/commands/docs/let.md +++ b/src/content/docs/commands/docs/let.md @@ -9,6 +9,7 @@ usage: | Create a variable and give it a value. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,13 +18,12 @@ feature: default ## Signature -```> let {flags} (var_name) (initial_value)``` +`> let {flags} (var_name) (initial_value)` ## Parameters - - `var_name`: Variable name. - - `initial_value`: Equals sign followed by value. - +- `var_name`: Variable name. +- `initial_value`: Equals sign followed by value. ## Input/output types: @@ -34,23 +34,27 @@ feature: default ## Examples Set a variable to a value -```nu + +```nushell > let x = 10 ``` Set a variable to the result of an expression -```nu + +```nushell > let x = 10 + 100 ``` Set a variable based on the condition -```nu + +```nushell > let x = if false { -1 } else { 1 } ``` ## 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 +https://www.nushell.sh/book/thinking_in_nu.html diff --git a/commands/docs/lines.md b/src/content/docs/commands/docs/lines.md similarity index 84% rename from commands/docs/lines.md rename to src/content/docs/commands/docs/lines.md index a1caedb6a8c..d7f30825aa3 100644 --- a/commands/docs/lines.md +++ b/src/content/docs/commands/docs/lines.md @@ -9,6 +9,7 @@ usage: | Converts input to lines. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,23 +18,23 @@ feature: default ## Signature -```> lines {flags} ``` +`> lines {flags} ` ## Flags - - `--skip-empty, -s`: skip empty lines - +- `--skip-empty, -s`: skip empty lines ## Input/output types: -| input | output | -| ----- | ------------ | +| input | output | +| ----- | -------------- | | any | list\ | ## Examples Split multi-line string into lines -```nu + +```nushell > $"two\nlines" | lines ╭───┬───────╮ │ 0 │ two │ diff --git a/commands/docs/load-env.md b/src/content/docs/commands/docs/load-env.md similarity index 88% rename from commands/docs/load-env.md rename to src/content/docs/commands/docs/load-env.md index c8bfbd6c5bd..5b51fba63a5 100644 --- a/commands/docs/load-env.md +++ b/src/content/docs/commands/docs/load-env.md @@ -9,6 +9,7 @@ usage: | Loads an environment update from a record. feature: default --- + # {{ $frontmatter.title }} for filesystem @@ -17,12 +18,11 @@ feature: default ## Signature -```> load-env {flags} (update)``` +`> load-env {flags} (update)` ## Parameters - - `update`: The record to use for updates. - +- `update`: The record to use for updates. ## Input/output types: @@ -30,16 +30,19 @@ feature: default | ------- | ------- | | nothing | nothing | | record | nothing | + ## Examples Load variables from an input stream -```nu + +```nushell > {NAME: ABE, AGE: UNKNOWN} | load-env; $env.NAME ABE ``` Load variables from an argument -```nu + +```nushell > load-env {NAME: ABE, AGE: UNKNOWN}; $env.NAME ABE ``` diff --git a/commands/docs/loop.md b/src/content/docs/commands/docs/loop.md similarity index 90% rename from commands/docs/loop.md rename to src/content/docs/commands/docs/loop.md index db98ac47063..543c16e9efd 100644 --- a/commands/docs/loop.md +++ b/src/content/docs/commands/docs/loop.md @@ -9,6 +9,7 @@ usage: | Run a block in a loop. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,12 +18,11 @@ feature: default ## Signature -```> loop {flags} (block)``` +`> loop {flags} (block)` ## Parameters - - `block`: Block to loop. - +- `block`: Block to loop. ## Input/output types: @@ -33,7 +33,8 @@ feature: default ## Examples Loop while a condition is true -```nu + +```nushell > mut x = 0; loop { if $x > 10 { break }; $x = $x + 1 }; $x 11 ``` diff --git a/commands/docs/ls.md b/src/content/docs/commands/docs/ls.md similarity index 64% rename from commands/docs/ls.md rename to src/content/docs/commands/docs/ls.md index 7fb60f41023..cfee77256f8 100644 --- a/commands/docs/ls.md +++ b/src/content/docs/commands/docs/ls.md @@ -9,6 +9,7 @@ usage: | List the filenames, sizes, and modification times of items in a directory. feature: default --- + # {{ $frontmatter.title }} for filesystem @@ -17,22 +18,21 @@ feature: default ## Signature -```> ls {flags} (pattern)``` +`> ls {flags} (pattern)` ## 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) ## Parameters - - `pattern`: The glob pattern to use. - +- `pattern`: The glob pattern to use. ## Input/output types: @@ -43,49 +43,57 @@ feature: default ## Examples List visible files in the current directory -```nu + +```nushell > ls ``` List visible files in a subdirectory -```nu + +```nushell > ls subdir ``` List visible files with full path in the parent directory -```nu + +```nushell > ls -f .. ``` List Rust files -```nu + +```nushell > ls *.rs ``` List files and directories whose name do not contain 'bar' -```nu + +```nushell > ls -s | where name !~ bar ``` List all dirs in your home directory -```nu + +```nushell > ls -a ~ | where type == dir ``` List all dirs in your home directory which have not been modified in 7 days -```nu + +```nushell > ls -as ~ | where type == dir and modified < ((date now) - 7day) ``` List given paths and show directories themselves -```nu + +```nushell > ['/path/to/directory' '/path/to/file'] | each {|| ls -D $in } | flatten ``` diff --git a/commands/docs/match.md b/src/content/docs/commands/docs/match.md similarity index 85% rename from commands/docs/match.md rename to src/content/docs/commands/docs/match.md index 48acb92e185..0c05098a4f1 100644 --- a/commands/docs/match.md +++ b/src/content/docs/commands/docs/match.md @@ -9,6 +9,7 @@ usage: | Conditionally run a block on a matched value. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,13 +18,12 @@ feature: default ## Signature -```> match {flags} (value) (match_block)``` +`> match {flags} (value) (match_block)` ## Parameters - - `value`: Value to check. - - `match_block`: Block to run if check succeeds. - +- `value`: Value to check. +- `match_block`: Block to run if check succeeds. ## Input/output types: @@ -34,37 +34,43 @@ feature: default ## Examples Match on a value in range -```nu + +```nushell > match 3 { 1..10 => 'yes!' } yes! ``` Match on a field in a record -```nu + +```nushell > match {a: 100} { {a: $my_value} => { $my_value } } 100 ``` Match with a catch-all -```nu + +```nushell > match 3 { 1 => { 'yes!' }, _ => { 'no!' } } no! ``` Match against a list -```nu + +```nushell > match [1, 2, 3] { [$a, $b, $c] => { $a + $b + $c }, _ => 0 } 6 ``` Match against pipeline input -```nu + +```nushell > {a: {b: 3}} | match $in {{a: { $b }} => ($b + 10) } 13 ``` Match with a guard -```nu + +```nushell > match [1 2 3] { [$x, ..$y] if $x == 1 => { 'good list' }, _ => { 'not a very good list' } diff --git a/commands/docs/math.md b/src/content/docs/commands/docs/math.md similarity index 99% rename from commands/docs/math.md rename to src/content/docs/commands/docs/math.md index 039cd293a09..7e901fa2d52 100644 --- a/commands/docs/math.md +++ b/src/content/docs/commands/docs/math.md @@ -9,6 +9,7 @@ usage: | Use mathematical functions as aggregate functions on a list of numbers or tables. feature: default --- + # {{ $frontmatter.title }} for math @@ -17,8 +18,7 @@ feature: default ## Signature -```> math {flags} ``` - +`> math {flags} ` ## Input/output types: @@ -27,6 +27,7 @@ feature: default | nothing | string | ## Notes + You must use one of the following subcommands. Using this command as-is will only produce this help message. ## Subcommands: @@ -61,4 +62,4 @@ You must use one of the following subcommands. Using this command as-is will onl | [`math sum`](/commands/docs/math_sum.md) | Builtin | Returns the sum of a list of numbers or of each column in a table. | | [`math tan`](/commands/docs/math_tan.md) | Builtin | Returns the tangent of the number. | | [`math tanh`](/commands/docs/math_tanh.md) | Builtin | Returns the hyperbolic tangent of the number. | -| [`math variance`](/commands/docs/math_variance.md) | Builtin | Returns the variance of a list of numbers or of each column in a table. | \ No newline at end of file +| [`math variance`](/commands/docs/math_variance.md) | Builtin | Returns the variance of a list of numbers or of each column in a table. | diff --git a/commands/docs/math_abs.md b/src/content/docs/commands/docs/math_abs.md similarity index 80% rename from commands/docs/math_abs.md rename to src/content/docs/commands/docs/math_abs.md index 5509b9907d6..c96252dec4c 100644 --- a/commands/docs/math_abs.md +++ b/src/content/docs/commands/docs/math_abs.md @@ -9,6 +9,7 @@ usage: | Returns the absolute value of a number. feature: default --- + # {{ $frontmatter.title }} for math @@ -17,21 +18,22 @@ feature: default ## Signature -```> math abs {flags} ``` - +`> math abs {flags} ` ## Input/output types: -| input | output | -| -------------- | -------------- | -| duration | duration | +| input | output | +| ---------------- | ---------------- | +| duration | duration | | list\ | list\ | | list\ | list\ | -| number | number | +| number | number | + ## Examples Compute absolute value of each number in a list of numbers -```nu + +```nushell > [-50 -100.0 25] | math abs ╭───┬────────╮ │ 0 │ 50 │ diff --git a/commands/docs/math_arccos.md b/src/content/docs/commands/docs/math_arccos.md similarity index 65% rename from commands/docs/math_arccos.md rename to src/content/docs/commands/docs/math_arccos.md index 34606049b54..cc0017af25c 100644 --- a/commands/docs/math_arccos.md +++ b/src/content/docs/commands/docs/math_arccos.md @@ -9,41 +9,44 @@ usage: | Returns the arccosine of the number. feature: extra --- + # {{ $frontmatter.title }} for math
{{ $frontmatter.math }}
- ::: warning - Command `math arccos` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `math arccos` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> math arccos {flags} ``` +`> math arccos {flags} ` ## Flags - - `--degrees, -d`: Return degrees instead of radians - +- `--degrees, -d`: Return degrees instead of radians ## Input/output types: -| input | output | -| ------------ | ----------- | +| input | output | +| -------------- | ------------- | | list\ | list\ | -| number | float | +| number | float | + ## Examples Get the arccosine of 1 -```nu + +```nushell > 1 | math arccos 0 ``` Get the arccosine of -1 in degrees -```nu + +```nushell > -1 | math arccos --degrees 180 ``` diff --git a/commands/docs/math_arccosh.md b/src/content/docs/commands/docs/math_arccosh.md similarity index 68% rename from commands/docs/math_arccosh.md rename to src/content/docs/commands/docs/math_arccosh.md index 5a67c382a5c..b495bb695ef 100644 --- a/commands/docs/math_arccosh.md +++ b/src/content/docs/commands/docs/math_arccosh.md @@ -9,31 +9,33 @@ usage: | Returns the inverse of the hyperbolic cosine function. feature: extra --- + # {{ $frontmatter.title }} for math
{{ $frontmatter.math }}
- ::: warning - Command `math arccosh` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `math arccosh` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: -## Signature -```> math arccosh {flags} ``` +## Signature +`> math arccosh {flags} ` ## Input/output types: -| input | output | -| ------------ | ----------- | +| input | output | +| -------------- | ------------- | | list\ | list\ | -| number | float | +| number | float | + ## Examples Get the arccosh of 1 -```nu + +```nushell > 1 | math arccosh 0 ``` diff --git a/commands/docs/math_arcsin.md b/src/content/docs/commands/docs/math_arcsin.md similarity index 65% rename from commands/docs/math_arcsin.md rename to src/content/docs/commands/docs/math_arcsin.md index 390774a2b08..1aaada533c6 100644 --- a/commands/docs/math_arcsin.md +++ b/src/content/docs/commands/docs/math_arcsin.md @@ -9,41 +9,44 @@ usage: | Returns the arcsine of the number. feature: extra --- + # {{ $frontmatter.title }} for math
{{ $frontmatter.math }}
- ::: warning - Command `math arcsin` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `math arcsin` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> math arcsin {flags} ``` +`> math arcsin {flags} ` ## Flags - - `--degrees, -d`: Return degrees instead of radians - +- `--degrees, -d`: Return degrees instead of radians ## Input/output types: -| input | output | -| ------------ | ----------- | +| input | output | +| -------------- | ------------- | | list\ | list\ | -| number | float | +| number | float | + ## Examples Get the arcsine of 1 -```nu + +```nushell > 1 | math arcsin 1.5707963267948966 ``` Get the arcsine of 1 in degrees -```nu + +```nushell > 1 | math arcsin --degrees 90 ``` diff --git a/commands/docs/math_arcsinh.md b/src/content/docs/commands/docs/math_arcsinh.md similarity index 68% rename from commands/docs/math_arcsinh.md rename to src/content/docs/commands/docs/math_arcsinh.md index 7112824e8b8..1acd5a196f7 100644 --- a/commands/docs/math_arcsinh.md +++ b/src/content/docs/commands/docs/math_arcsinh.md @@ -9,31 +9,33 @@ usage: | Returns the inverse of the hyperbolic sine function. feature: extra --- + # {{ $frontmatter.title }} for math
{{ $frontmatter.math }}
- ::: warning - Command `math arcsinh` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `math arcsinh` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: -## Signature -```> math arcsinh {flags} ``` +## Signature +`> math arcsinh {flags} ` ## Input/output types: -| input | output | -| ------------ | ----------- | +| input | output | +| -------------- | ------------- | | list\ | list\ | -| number | float | +| number | float | + ## Examples Get the arcsinh of 0 -```nu + +```nushell > 0 | math arcsinh 0 ``` diff --git a/commands/docs/math_arctan.md b/src/content/docs/commands/docs/math_arctan.md similarity index 66% rename from commands/docs/math_arctan.md rename to src/content/docs/commands/docs/math_arctan.md index b1d8ac577cb..145e049fc40 100644 --- a/commands/docs/math_arctan.md +++ b/src/content/docs/commands/docs/math_arctan.md @@ -9,41 +9,44 @@ usage: | Returns the arctangent of the number. feature: extra --- + # {{ $frontmatter.title }} for math
{{ $frontmatter.math }}
- ::: warning - Command `math arctan` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `math arctan` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> math arctan {flags} ``` +`> math arctan {flags} ` ## Flags - - `--degrees, -d`: Return degrees instead of radians - +- `--degrees, -d`: Return degrees instead of radians ## Input/output types: -| input | output | -| ------------ | ----------- | +| input | output | +| -------------- | ------------- | | list\ | list\ | -| number | float | +| number | float | + ## Examples Get the arctangent of 1 -```nu + +```nushell > 1 | math arctan 0.7853981633974483 ``` Get the arctangent of -1 in degrees -```nu + +```nushell > -1 | math arctan --degrees -45 ``` diff --git a/commands/docs/math_arctanh.md b/src/content/docs/commands/docs/math_arctanh.md similarity index 68% rename from commands/docs/math_arctanh.md rename to src/content/docs/commands/docs/math_arctanh.md index 1831094a9f8..8629a501a0e 100644 --- a/commands/docs/math_arctanh.md +++ b/src/content/docs/commands/docs/math_arctanh.md @@ -9,31 +9,33 @@ usage: | Returns the inverse of the hyperbolic tangent function. feature: extra --- + # {{ $frontmatter.title }} for math
{{ $frontmatter.math }}
- ::: warning - Command `math arctanh` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `math arctanh` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: -## Signature -```> math arctanh {flags} ``` +## Signature +`> math arctanh {flags} ` ## Input/output types: -| input | output | -| ------------ | ----------- | +| input | output | +| -------------- | ------------- | | list\ | list\ | -| number | float | +| number | float | + ## Examples Get the arctanh of 1 -```nu + +```nushell > 1 | math arctanh inf ``` diff --git a/commands/docs/math_avg.md b/src/content/docs/commands/docs/math_avg.md similarity index 73% rename from commands/docs/math_avg.md rename to src/content/docs/commands/docs/math_avg.md index 9c772ed4475..a0ec9df5031 100644 --- a/commands/docs/math_avg.md +++ b/src/content/docs/commands/docs/math_avg.md @@ -9,6 +9,7 @@ usage: | Returns the average of a list of numbers. feature: default --- + # {{ $frontmatter.title }} for math @@ -17,38 +18,41 @@ feature: default ## Signature -```> math avg {flags} ``` - +`> math avg {flags} ` ## Input/output types: -| input | output | -| -------------- | -------- | -| duration | duration | -| filesize | filesize | +| input | output | +| ---------------- | -------- | +| duration | duration | +| filesize | filesize | | list\ | duration | | list\ | filesize | | list\ | number | -| number | number | -| range | number | -| record | record | -| table | record | +| number | number | +| range | number | +| record | record | +| table | record | + ## Examples Compute the average of a list of numbers -```nu + +```nushell > [-50 100.0 25] | math avg 25 ``` Compute the average of a list of durations -```nu + +```nushell > [2sec 1min] | math avg 31sec ``` Compute the average of each column in a table -```nu + +```nushell > [[a b]; [1 2] [3 4]] | math avg ╭───┬───╮ │ a │ 2 │ diff --git a/commands/docs/math_ceil.md b/src/content/docs/commands/docs/math_ceil.md similarity index 85% rename from commands/docs/math_ceil.md rename to src/content/docs/commands/docs/math_ceil.md index 3f33b12c70a..7681270caaa 100644 --- a/commands/docs/math_ceil.md +++ b/src/content/docs/commands/docs/math_ceil.md @@ -9,6 +9,7 @@ usage: | Returns the ceil of a number (smallest integer greater than or equal to that number). feature: default --- + # {{ $frontmatter.title }} for math @@ -17,19 +18,20 @@ feature: default ## Signature -```> math ceil {flags} ``` - +`> math ceil {flags} ` ## Input/output types: -| input | output | -| ------------ | --------- | +| input | output | +| -------------- | ----------- | | list\ | list\ | -| number | int | +| number | int | + ## Examples Apply the ceil function to a list of numbers -```nu + +```nushell > [1.5 2.3 -3.1] | math ceil ╭───┬────╮ │ 0 │ 2 │ diff --git a/commands/docs/math_cos.md b/src/content/docs/commands/docs/math_cos.md similarity index 72% rename from commands/docs/math_cos.md rename to src/content/docs/commands/docs/math_cos.md index 4cfa8a66bd1..53648483723 100644 --- a/commands/docs/math_cos.md +++ b/src/content/docs/commands/docs/math_cos.md @@ -9,41 +9,44 @@ usage: | Returns the cosine of the number. feature: extra --- + # {{ $frontmatter.title }} for math
{{ $frontmatter.math }}
- ::: warning - Command `math cos` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `math cos` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> math cos {flags} ``` +`> math cos {flags} ` ## Flags - - `--degrees, -d`: Use degrees instead of radians - +- `--degrees, -d`: Use degrees instead of radians ## Input/output types: -| input | output | -| ------------ | ----------- | +| input | output | +| -------------- | ------------- | | list\ | list\ | -| number | float | +| number | float | + ## Examples Apply the cosine to π -```nu + +```nushell > 3.141592 | math cos | math round --precision 4 -1 ``` Apply the cosine to a list of angles in degrees -```nu + +```nushell > [0 90 180 270 360] | math cos --degrees ╭───┬───────╮ │ 0 │ 1.00 │ diff --git a/commands/docs/math_cosh.md b/src/content/docs/commands/docs/math_cosh.md similarity index 69% rename from commands/docs/math_cosh.md rename to src/content/docs/commands/docs/math_cosh.md index 0b4c93801bf..d95651704a7 100644 --- a/commands/docs/math_cosh.md +++ b/src/content/docs/commands/docs/math_cosh.md @@ -9,31 +9,33 @@ usage: | Returns the hyperbolic cosine of the number. feature: extra --- + # {{ $frontmatter.title }} for math
{{ $frontmatter.math }}
- ::: warning - Command `math cosh` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `math cosh` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: -## Signature -```> math cosh {flags} ``` +## Signature +`> math cosh {flags} ` ## Input/output types: -| input | output | -| ------------ | ----------- | +| input | output | +| -------------- | ------------- | | list\ | list\ | -| number | float | +| number | float | + ## Examples Apply the hyperbolic cosine to 1 -```nu + +```nushell > 1 | math cosh 1.5430806348152435 ``` diff --git a/commands/docs/math_exp.md b/src/content/docs/commands/docs/math_exp.md similarity index 69% rename from commands/docs/math_exp.md rename to src/content/docs/commands/docs/math_exp.md index 16dc0023fc3..1ffc5d32c27 100644 --- a/commands/docs/math_exp.md +++ b/src/content/docs/commands/docs/math_exp.md @@ -9,37 +9,40 @@ usage: | Returns e raised to the power of x. feature: extra --- + # {{ $frontmatter.title }} for math
{{ $frontmatter.math }}
- ::: warning - Command `math exp` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `math exp` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: -## Signature -```> math exp {flags} ``` +## Signature +`> math exp {flags} ` ## Input/output types: -| input | output | -| ------------ | ----------- | +| input | output | +| -------------- | ------------- | | list\ | list\ | -| number | float | +| number | float | + ## Examples Get e raised to the power of zero -```nu + +```nushell > 0 | math exp 1 ``` Get e (same as 'math e') -```nu + +```nushell > 1 | math exp 2.718281828459045 ``` diff --git a/commands/docs/math_floor.md b/src/content/docs/commands/docs/math_floor.md similarity index 85% rename from commands/docs/math_floor.md rename to src/content/docs/commands/docs/math_floor.md index e4bf46328c1..66abc92a47d 100644 --- a/commands/docs/math_floor.md +++ b/src/content/docs/commands/docs/math_floor.md @@ -9,6 +9,7 @@ usage: | Returns the floor of a number (largest integer less than or equal to that number). feature: default --- + # {{ $frontmatter.title }} for math @@ -17,19 +18,20 @@ feature: default ## Signature -```> math floor {flags} ``` - +`> math floor {flags} ` ## Input/output types: -| input | output | -| ------------ | --------- | +| input | output | +| -------------- | ----------- | | list\ | list\ | -| number | int | +| number | int | + ## Examples Apply the floor function to a list of numbers -```nu + +```nushell > [1.5 2.3 -3.1] | math floor ╭───┬────╮ │ 0 │ 1 │ diff --git a/commands/docs/math_ln.md b/src/content/docs/commands/docs/math_ln.md similarity index 69% rename from commands/docs/math_ln.md rename to src/content/docs/commands/docs/math_ln.md index 2c5eb5d7304..88acd0efab5 100644 --- a/commands/docs/math_ln.md +++ b/src/content/docs/commands/docs/math_ln.md @@ -9,31 +9,33 @@ usage: | Returns the natural logarithm. Base: (math e). feature: extra --- + # {{ $frontmatter.title }} for math
{{ $frontmatter.math }}
- ::: warning - Command `math ln` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `math ln` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: -## Signature -```> math ln {flags} ``` +## Signature +`> math ln {flags} ` ## Input/output types: -| input | output | -| ------------ | ----------- | +| input | output | +| -------------- | ------------- | | list\ | list\ | -| number | float | +| number | float | + ## Examples Get the natural logarithm of e -```nu + +```nushell > 2.7182818 | math ln | math round --precision 4 1 ``` diff --git a/commands/docs/math_log.md b/src/content/docs/commands/docs/math_log.md similarity index 78% rename from commands/docs/math_log.md rename to src/content/docs/commands/docs/math_log.md index adb9c036b2c..7e03198726d 100644 --- a/commands/docs/math_log.md +++ b/src/content/docs/commands/docs/math_log.md @@ -9,6 +9,7 @@ usage: | Returns the logarithm for an arbitrary base. feature: default --- + # {{ $frontmatter.title }} for math @@ -17,29 +18,31 @@ feature: default ## Signature -```> math log {flags} (base)``` +`> math log {flags} (base)` ## Parameters - - `base`: Base for which the logarithm should be computed. - +- `base`: Base for which the logarithm should be computed. ## Input/output types: -| input | output | -| ------------ | ----------- | +| input | output | +| -------------- | ------------- | | list\ | list\ | -| number | float | +| number | float | + ## Examples Get the logarithm of 100 to the base 10 -```nu + +```nushell > 100 | math log 10 2 ``` Get the log2 of a list of values -```nu + +```nushell > [16 8 4] | math log 2 ╭───┬──────╮ │ 0 │ 4.00 │ diff --git a/commands/docs/math_max.md b/src/content/docs/commands/docs/math_max.md similarity index 82% rename from commands/docs/math_max.md rename to src/content/docs/commands/docs/math_max.md index 7dc061abddf..ecfdbb38a40 100644 --- a/commands/docs/math_max.md +++ b/src/content/docs/commands/docs/math_max.md @@ -9,6 +9,7 @@ usage: | Returns the maximum of a list of values, or of columns in a table. feature: default --- + # {{ $frontmatter.title }} for math @@ -17,30 +18,32 @@ feature: default ## Signature -```> math max {flags} ``` - +`> math max {flags} ` ## Input/output types: -| input | output | -| -------------- | -------- | +| input | output | +| ---------------- | -------- | | list\ | any | | list\ | duration | | list\ | filesize | | list\ | number | -| range | number | -| record | record | -| table | record | +| range | number | +| record | record | +| table | record | + ## Examples Find the maximum of a list of numbers -```nu + +```nushell > [-50 100 25] | math max 100 ``` Find the maxima of the columns of a table -```nu + +```nushell > [{a: 1 b: 3} {a: 2 b: -1}] | math max ╭───┬───╮ │ a │ 2 │ @@ -49,7 +52,8 @@ Find the maxima of the columns of a table ``` Find the maximum of a list of dates -```nu + +```nushell > [2022-02-02 2022-12-30 2012-12-12] | math max Fri, 30 Dec 2022 00:00:00 +0000 (a year ago) ``` diff --git a/commands/docs/math_median.md b/src/content/docs/commands/docs/math_median.md similarity index 80% rename from commands/docs/math_median.md rename to src/content/docs/commands/docs/math_median.md index 29b2acd0922..78dc7c7213c 100644 --- a/commands/docs/math_median.md +++ b/src/content/docs/commands/docs/math_median.md @@ -9,6 +9,7 @@ usage: | Computes the median of a list of numbers. feature: default --- + # {{ $frontmatter.title }} for math @@ -17,29 +18,31 @@ feature: default ## Signature -```> math median {flags} ``` - +`> math median {flags} ` ## Input/output types: -| input | output | -| -------------- | -------- | +| input | output | +| ---------------- | -------- | | list\ | duration | | list\ | filesize | | list\ | number | -| range | number | -| record | record | -| table | record | +| range | number | +| record | record | +| table | record | + ## Examples Compute the median of a list of numbers -```nu + +```nushell > [3 8 9 12 12 15] | math median 10.5 ``` Compute the medians of the columns of a table -```nu + +```nushell > [{a: 1 b: 3} {a: 2 b: -1} {a: -3 b: 5}] | math median ╭───┬───╮ │ a │ 1 │ @@ -48,7 +51,8 @@ Compute the medians of the columns of a table ``` Find the median of a list of file sizes -```nu + +```nushell > [5KB 10MB 200B] | math median 4.9 KiB ``` diff --git a/commands/docs/math_min.md b/src/content/docs/commands/docs/math_min.md similarity index 81% rename from commands/docs/math_min.md rename to src/content/docs/commands/docs/math_min.md index d729a1e626b..5a1d301d971 100644 --- a/commands/docs/math_min.md +++ b/src/content/docs/commands/docs/math_min.md @@ -9,6 +9,7 @@ usage: | Finds the minimum within a list of values or tables. feature: default --- + # {{ $frontmatter.title }} for math @@ -17,30 +18,32 @@ feature: default ## Signature -```> math min {flags} ``` - +`> math min {flags} ` ## Input/output types: -| input | output | -| -------------- | -------- | +| input | output | +| ---------------- | -------- | | list\ | any | | list\ | duration | | list\ | filesize | | list\ | number | -| range | number | -| record | record | -| table | record | +| range | number | +| record | record | +| table | record | + ## Examples Compute the minimum of a list of numbers -```nu + +```nushell > [-50 100 25] | math min -50 ``` Compute the minima of the columns of a table -```nu + +```nushell > [{a: 1 b: 3} {a: 2 b: -1}] | math min ╭───┬────╮ │ a │ 1 │ @@ -49,7 +52,8 @@ Compute the minima of the columns of a table ``` Find the minimum of a list of arbitrary values (Warning: Weird) -```nu + +```nushell > [-50 'hello' true] | math min true ``` diff --git a/commands/docs/math_mode.md b/src/content/docs/commands/docs/math_mode.md similarity index 88% rename from commands/docs/math_mode.md rename to src/content/docs/commands/docs/math_mode.md index 03074f620ae..63affaee361 100644 --- a/commands/docs/math_mode.md +++ b/src/content/docs/commands/docs/math_mode.md @@ -9,6 +9,7 @@ usage: | Returns the most frequent element(s) from a list of numbers or tables. feature: default --- + # {{ $frontmatter.title }} for math @@ -17,21 +18,22 @@ feature: default ## Signature -```> math mode {flags} ``` - +`> math mode {flags} ` ## Input/output types: -| input | output | -| -------------- | -------------- | +| input | output | +| ---------------- | ---------------- | | list\ | list\ | | list\ | list\ | | list\ | list\ | -| table | record | +| table | record | + ## Examples Compute the mode(s) of a list of numbers -```nu + +```nushell > [3 3 9 12 12 15] | math mode ╭───┬────╮ │ 0 │ 3 │ @@ -41,7 +43,8 @@ Compute the mode(s) of a list of numbers ``` Compute the mode(s) of the columns of a table -```nu + +```nushell > [{a: 1 b: 3} {a: 2 b: -1} {a: 1 b: 5}] | math mode ╭───┬────────────╮ │ │ ╭───┬───╮ │ diff --git a/commands/docs/math_product.md b/src/content/docs/commands/docs/math_product.md similarity index 81% rename from commands/docs/math_product.md rename to src/content/docs/commands/docs/math_product.md index 95284dd0eaa..d7fa307d08a 100644 --- a/commands/docs/math_product.md +++ b/src/content/docs/commands/docs/math_product.md @@ -9,6 +9,7 @@ usage: | Returns the product of a list of numbers or the products of each column of a table. feature: default --- + # {{ $frontmatter.title }} for math @@ -17,27 +18,29 @@ feature: default ## Signature -```> math product {flags} ``` - +`> math product {flags} ` ## Input/output types: -| input | output | -| ------------ | ------ | +| input | output | +| -------------- | ------ | | list\ | number | -| range | number | -| record | record | -| table | record | +| range | number | +| record | record | +| table | record | + ## Examples Compute the product of a list of numbers -```nu + +```nushell > [2 3 3 4] | math product 72 ``` Compute the product of each column in a table -```nu + +```nushell > [[a b]; [1 2] [3 4]] | math product ╭───┬───╮ │ a │ 3 │ diff --git a/commands/docs/math_round.md b/src/content/docs/commands/docs/math_round.md similarity index 84% rename from commands/docs/math_round.md rename to src/content/docs/commands/docs/math_round.md index 9584d10b267..e6db2c1eb83 100644 --- a/commands/docs/math_round.md +++ b/src/content/docs/commands/docs/math_round.md @@ -9,6 +9,7 @@ usage: | Returns the input number rounded to the specified precision. feature: default --- + # {{ $frontmatter.title }} for math @@ -17,23 +18,24 @@ feature: default ## Signature -```> math round {flags} ``` +`> math round {flags} ` ## Flags - - `--precision, -p {number}`: digits of precision - +- `--precision, -p {number}`: digits of precision ## Input/output types: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| number | number | +| number | number | + ## Examples Apply the round function to a list of numbers -```nu + +```nushell > [1.5 2.3 -3.1] | math round ╭───┬────╮ │ 0 │ 2 │ @@ -44,7 +46,8 @@ Apply the round function to a list of numbers ``` Apply the round function with precision specified -```nu + +```nushell > [1.555 2.333 -3.111] | math round --precision 2 ╭───┬───────╮ │ 0 │ 1.56 │ @@ -55,7 +58,8 @@ Apply the round function with precision specified ``` Apply negative precision to a list of numbers -```nu + +```nushell > [123, 123.3, -123.4] | math round --precision -1 ╭───┬──────╮ │ 0 │ 120 │ diff --git a/commands/docs/math_sin.md b/src/content/docs/commands/docs/math_sin.md similarity index 73% rename from commands/docs/math_sin.md rename to src/content/docs/commands/docs/math_sin.md index 6dfdb81926a..f701ed96873 100644 --- a/commands/docs/math_sin.md +++ b/src/content/docs/commands/docs/math_sin.md @@ -9,41 +9,44 @@ usage: | Returns the sine of the number. feature: extra --- + # {{ $frontmatter.title }} for math
{{ $frontmatter.math }}
- ::: warning - Command `math sin` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `math sin` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> math sin {flags} ``` +`> math sin {flags} ` ## Flags - - `--degrees, -d`: Use degrees instead of radians - +- `--degrees, -d`: Use degrees instead of radians ## Input/output types: -| input | output | -| ------------ | ----------- | +| input | output | +| -------------- | ------------- | | list\ | list\ | -| number | float | +| number | float | + ## Examples Apply the sine to π/2 -```nu + +```nushell > 3.141592 / 2 | math sin | math round --precision 4 1 ``` Apply the sine to a list of angles in degrees -```nu + +```nushell > [0 90 180 270 360] | math sin -d | math round --precision 4 ╭───┬───────╮ │ 0 │ 0.00 │ diff --git a/commands/docs/math_sinh.md b/src/content/docs/commands/docs/math_sinh.md similarity index 68% rename from commands/docs/math_sinh.md rename to src/content/docs/commands/docs/math_sinh.md index a371fd544c5..fd6b8853806 100644 --- a/commands/docs/math_sinh.md +++ b/src/content/docs/commands/docs/math_sinh.md @@ -9,31 +9,33 @@ usage: | Returns the hyperbolic sine of the number. feature: extra --- + # {{ $frontmatter.title }} for math
{{ $frontmatter.math }}
- ::: warning - Command `math sinh` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `math sinh` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: -## Signature -```> math sinh {flags} ``` +## Signature +`> math sinh {flags} ` ## Input/output types: -| input | output | -| ------------ | ----------- | +| input | output | +| -------------- | ------------- | | list\ | list\ | -| number | float | +| number | float | + ## Examples Apply the hyperbolic sine to 1 -```nu + +```nushell > 1 | math sinh 1.1752011936438014 ``` diff --git a/commands/docs/math_sqrt.md b/src/content/docs/commands/docs/math_sqrt.md similarity index 83% rename from commands/docs/math_sqrt.md rename to src/content/docs/commands/docs/math_sqrt.md index 07aaf01f12b..d1b4a697655 100644 --- a/commands/docs/math_sqrt.md +++ b/src/content/docs/commands/docs/math_sqrt.md @@ -9,6 +9,7 @@ usage: | Returns the square root of the input number. feature: default --- + # {{ $frontmatter.title }} for math @@ -17,19 +18,20 @@ feature: default ## Signature -```> math sqrt {flags} ``` - +`> math sqrt {flags} ` ## Input/output types: -| input | output | -| ------------ | ----------- | +| input | output | +| -------------- | ------------- | | list\ | list\ | -| number | float | +| number | float | + ## Examples Compute the square root of each number in a list -```nu + +```nushell > [9 16] | math sqrt ╭───┬──────╮ │ 0 │ 3.00 │ diff --git a/commands/docs/math_stddev.md b/src/content/docs/commands/docs/math_stddev.md similarity index 79% rename from commands/docs/math_stddev.md rename to src/content/docs/commands/docs/math_stddev.md index 2964fd3818a..957e1335346 100644 --- a/commands/docs/math_stddev.md +++ b/src/content/docs/commands/docs/math_stddev.md @@ -9,6 +9,7 @@ usage: | Returns the standard deviation of a list of numbers, or of each column in a table. feature: default --- + # {{ $frontmatter.title }} for math @@ -17,36 +18,39 @@ feature: default ## Signature -```> math stddev {flags} ``` +`> math stddev {flags} ` ## 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: -| input | output | -| ------------ | ------ | +| input | output | +| -------------- | ------ | | list\ | number | -| record | record | -| table | record | +| record | record | +| table | record | + ## Examples Compute the standard deviation of a list of numbers -```nu + +```nushell > [1 2 3 4 5] | math stddev 1.4142135623730951 ``` Compute the sample standard deviation of a list of numbers -```nu + +```nushell > [1 2 3 4 5] | math stddev --sample 1.5811388300841898 ``` Compute the standard deviation of each column in a table -```nu + +```nushell > [[a b]; [1 2] [3 4]] | math stddev ╭───┬───╮ │ a │ 1 │ diff --git a/commands/docs/math_sum.md b/src/content/docs/commands/docs/math_sum.md similarity index 80% rename from commands/docs/math_sum.md rename to src/content/docs/commands/docs/math_sum.md index 3cbc0e393c6..12a80f1c17f 100644 --- a/commands/docs/math_sum.md +++ b/src/content/docs/commands/docs/math_sum.md @@ -9,6 +9,7 @@ usage: | Returns the sum of a list of numbers or of each column in a table. feature: default --- + # {{ $frontmatter.title }} for math @@ -17,35 +18,38 @@ feature: default ## Signature -```> math sum {flags} ``` - +`> math sum {flags} ` ## Input/output types: -| input | output | -| -------------- | -------- | +| input | output | +| ---------------- | -------- | | list\ | duration | | list\ | filesize | | list\ | number | -| range | number | -| record | record | -| table | record | +| range | number | +| record | record | +| table | record | + ## Examples Sum a list of numbers -```nu + +```nushell > [1 2 3] | math sum 6 ``` Get the disk usage for the current directory -```nu + +```nushell > ls | get size | math sum ``` Compute the sum of each column in a table -```nu + +```nushell > [[a b]; [1 2] [3 4]] | math sum ╭───┬───╮ │ a │ 4 │ diff --git a/commands/docs/math_tan.md b/src/content/docs/commands/docs/math_tan.md similarity index 71% rename from commands/docs/math_tan.md rename to src/content/docs/commands/docs/math_tan.md index 6fd6d623712..7c4b77a783b 100644 --- a/commands/docs/math_tan.md +++ b/src/content/docs/commands/docs/math_tan.md @@ -9,41 +9,44 @@ usage: | Returns the tangent of the number. feature: extra --- + # {{ $frontmatter.title }} for math
{{ $frontmatter.math }}
- ::: warning - Command `math tan` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `math tan` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> math tan {flags} ``` +`> math tan {flags} ` ## Flags - - `--degrees, -d`: Use degrees instead of radians - +- `--degrees, -d`: Use degrees instead of radians ## Input/output types: -| input | output | -| ------------ | ----------- | +| input | output | +| -------------- | ------------- | | list\ | list\ | -| number | float | +| number | float | + ## Examples Apply the tangent to π/4 -```nu + +```nushell > 3.141592 / 4 | math tan | math round --precision 4 1 ``` Apply the tangent to a list of angles in degrees -```nu + +```nushell > [-45 0 45] | math tan --degrees ╭───┬───────╮ │ 0 │ -1.00 │ diff --git a/commands/docs/math_tanh.md b/src/content/docs/commands/docs/math_tanh.md similarity index 65% rename from commands/docs/math_tanh.md rename to src/content/docs/commands/docs/math_tanh.md index 61d64bfc270..49e7f456ecf 100644 --- a/commands/docs/math_tanh.md +++ b/src/content/docs/commands/docs/math_tanh.md @@ -9,31 +9,33 @@ usage: | Returns the hyperbolic tangent of the number. feature: extra --- + # {{ $frontmatter.title }} for math
{{ $frontmatter.math }}
- ::: warning - Command `math tanh` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `math tanh` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: -## Signature -```> math tanh {flags} ``` +## Signature +`> math tanh {flags} ` ## Input/output types: -| input | output | -| ------------ | ----------- | +| input | output | +| -------------- | ------------- | | list\ | list\ | -| number | float | +| number | float | + ## Examples -Apply the hyperbolic tangent to 10*π -```nu +Apply the hyperbolic tangent to 10\*π + +```nushell > 3.141592 * 10 | math tanh | math round --precision 4 1 ``` diff --git a/commands/docs/math_variance.md b/src/content/docs/commands/docs/math_variance.md similarity index 78% rename from commands/docs/math_variance.md rename to src/content/docs/commands/docs/math_variance.md index 5f9ee781f4b..a5ef5cea16d 100644 --- a/commands/docs/math_variance.md +++ b/src/content/docs/commands/docs/math_variance.md @@ -9,6 +9,7 @@ usage: | Returns the variance of a list of numbers or of each column in a table. feature: default --- + # {{ $frontmatter.title }} for math @@ -17,36 +18,39 @@ feature: default ## Signature -```> math variance {flags} ``` +`> math variance {flags} ` ## 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: -| input | output | -| ------------ | ------ | +| input | output | +| -------------- | ------ | | list\ | number | -| record | record | -| table | record | +| record | record | +| table | record | + ## Examples Get the variance of a list of numbers -```nu + +```nushell > [1 2 3 4 5] | math variance 2 ``` Get the sample variance of a list of numbers -```nu + +```nushell > [1 2 3 4 5] | math variance --sample 2.5 ``` Compute the variance of each column in a table -```nu + +```nushell > [[a b]; [1 2] [3 4]] | math variance ╭───┬───╮ │ a │ 1 │ diff --git a/commands/docs/merge.md b/src/content/docs/commands/docs/merge.md similarity index 91% rename from commands/docs/merge.md rename to src/content/docs/commands/docs/merge.md index 719fbd8b1b6..95d8412a655 100644 --- a/commands/docs/merge.md +++ b/src/content/docs/commands/docs/merge.md @@ -9,6 +9,7 @@ usage: | Merge the input with a record or table, overwriting values in matching columns. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,12 +18,11 @@ feature: default ## Signature -```> merge {flags} (value)``` +`> merge {flags} (value)` ## Parameters - - `value`: The new value to merge with. - +- `value`: The new value to merge with. ## Input/output types: @@ -30,10 +30,12 @@ feature: default | ------ | ------ | | record | record | | table | table | + ## Examples Add an 'index' column to the input table -```nu + +```nushell > [a b c] | wrap name | merge ( [1 2 3] | wrap index ) ╭───┬──────╮ │ # │ name │ @@ -46,7 +48,8 @@ Add an 'index' column to the input table ``` Merge two records -```nu + +```nushell > {a: 1, b: 2} | merge {c: 3} ╭───┬───╮ │ a │ 1 │ @@ -56,7 +59,8 @@ Merge two records ``` Merge two tables, overwriting overlapping columns -```nu + +```nushell > [{columnA: A0 columnB: B0}] | merge [{columnA: 'A0*'}] ╭───┬─────────┬─────────╮ │ # │ columnA │ columnB │ @@ -67,8 +71,9 @@ Merge two tables, overwriting overlapping columns ``` ## Notes + You may provide a column structure to merge When merging tables, row 0 of the input table is overwritten with values from row 0 of the provided table, then -repeating this process with row 1, and so on. \ No newline at end of file +repeating this process with row 1, and so on. diff --git a/commands/docs/metadata.md b/src/content/docs/commands/docs/metadata.md similarity index 85% rename from commands/docs/metadata.md rename to src/content/docs/commands/docs/metadata.md index 617adf01b41..2c0912e7c69 100644 --- a/commands/docs/metadata.md +++ b/src/content/docs/commands/docs/metadata.md @@ -9,6 +9,7 @@ usage: | Get the metadata for items in the stream. feature: default --- + # {{ $frontmatter.title }} for debug @@ -17,12 +18,11 @@ feature: default ## Signature -```> metadata {flags} (expression)``` +`> metadata {flags} (expression)` ## Parameters - - `expression`: The expression you want metadata for. - +- `expression`: The expression you want metadata for. ## Input/output types: @@ -33,13 +33,15 @@ feature: default ## Examples Get the metadata of a variable -```nu + +```nushell > let a = 42; metadata $a ``` Get the metadata of the input -```nu + +```nushell > ls | metadata ``` diff --git a/commands/docs/mkdir.md b/src/content/docs/commands/docs/mkdir.md similarity index 83% rename from commands/docs/mkdir.md rename to src/content/docs/commands/docs/mkdir.md index 191f7a2cd4c..bddfd68cb81 100644 --- a/commands/docs/mkdir.md +++ b/src/content/docs/commands/docs/mkdir.md @@ -9,6 +9,7 @@ usage: | Make directories, creates intermediary directories as required. feature: default --- + # {{ $frontmatter.title }} for filesystem @@ -17,16 +18,15 @@ feature: default ## Signature -```> mkdir {flags} ...rest``` +`> mkdir {flags} ...rest` ## Flags - - `--verbose, -v`: print created path(s). +- `--verbose, -v`: print created path(s). ## Parameters - - `...rest`: The name(s) of the path(s) to create. - +- `...rest`: The name(s) of the path(s) to create. ## Input/output types: @@ -37,13 +37,15 @@ feature: default ## Examples Make a directory named foo -```nu + +```nushell > mkdir foo ``` Make multiple directories and show the paths created -```nu + +```nushell > mkdir -v foo/bar foo2 ``` diff --git a/commands/docs/mktemp.md b/src/content/docs/commands/docs/mktemp.md similarity index 68% rename from commands/docs/mktemp.md rename to src/content/docs/commands/docs/mktemp.md index eda9211caab..b67dfe161cf 100644 --- a/commands/docs/mktemp.md +++ b/src/content/docs/commands/docs/mktemp.md @@ -9,6 +9,7 @@ usage: | Create temporary files or directories using uutils/coreutils mktemp. feature: default --- + # {{ $frontmatter.title }} for filesystem @@ -17,19 +18,18 @@ feature: default ## Signature -```> mktemp {flags} (template)``` +`> mktemp {flags} (template)` ## 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. - - `--directory, -d`: Create a directory instead of a file. +- `--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. +- `--directory, -d`: Create a directory instead of a file. ## Parameters - - `template`: Optional pattern from which the name of the file or directory is derived. Must contain at least three 'X's in last component. - +- `template`: Optional pattern from which the name of the file or directory is derived. Must contain at least three 'X's in last component. ## Input/output types: @@ -40,25 +40,29 @@ feature: default ## Examples Make a temporary file with the given suffix in the current working directory. -```nu + +```nushell > mktemp --suffix .txt /tmp.lekjbhelyx.txt ``` Make a temporary file named testfile.XXX with the 'X's as random characters in the current working directory. -```nu + +```nushell > mktemp testfile.XXX /testfile.4kh ``` Make a temporary file with a template in the system temp directory. -```nu + +```nushell > mktemp -t testfile.XXX /tmp/testfile.4kh ``` Make a temporary directory with randomly generated name in the temporary directory. -```nu + +```nushell > mktemp -d /tmp/tmp.NMw9fJr8K0 ``` diff --git a/commands/docs/module.md b/src/content/docs/commands/docs/module.md similarity index 81% rename from commands/docs/module.md rename to src/content/docs/commands/docs/module.md index 370e732c1ac..a1caaf9f34e 100644 --- a/commands/docs/module.md +++ b/src/content/docs/commands/docs/module.md @@ -9,6 +9,7 @@ usage: | Define a custom module. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,13 +18,12 @@ feature: default ## Signature -```> module {flags} (module) (block)``` +`> module {flags} (module) (block)` ## Parameters - - `module`: Module name or module path. - - `block`: Body of the module if 'module' parameter is not a module path. - +- `module`: Module name or module path. +- `block`: Body of the module if 'module' parameter is not a module path. ## Input/output types: @@ -34,23 +34,27 @@ feature: default ## Examples Define a custom command in a module and call it -```nu + +```nushell > module spam { export def foo [] { "foo" } }; use spam foo; foo foo ``` Define an environment variable in a module -```nu + +```nushell > 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 -```nu + +```nushell > module foo { export def --env bar [] { $env.FOO_BAR = "BAZ" } }; use foo bar; bar; $env.FOO_BAR BAZ ``` ## 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 +https://www.nushell.sh/book/thinking_in_nu.html diff --git a/commands/docs/move.md b/src/content/docs/commands/docs/move.md similarity index 87% rename from commands/docs/move.md rename to src/content/docs/commands/docs/move.md index 8675d26e5ef..b98d3d8b206 100644 --- a/commands/docs/move.md +++ b/src/content/docs/commands/docs/move.md @@ -9,6 +9,7 @@ usage: | Move columns before or after other columns. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,17 +18,16 @@ feature: default ## Signature -```> move {flags} ...rest``` +`> move {flags} ...rest` ## Flags - - `--after, - {string}`: the column that will precede the columns moved - - `--before, - {string}`: the column that will be the next after the columns moved +- `--after, - {string}`: the column that will precede the columns moved +- `--before, - {string}`: the column that will be the next after the columns moved ## Parameters - - `...rest`: The columns to move. - +- `...rest`: The columns to move. ## Input/output types: @@ -35,10 +35,12 @@ feature: default | ------ | ------ | | record | record | | table | table | + ## Examples Move a column before the first column -```nu + +```nushell > [[name value index]; [foo a 1] [bar b 2] [baz c 3]] | move index --before name ╭───┬──────┬───────╮ │ # │ name │ value │ @@ -51,7 +53,8 @@ Move a column before the first column ``` Move multiple columns after the last column and reorder them -```nu + +```nushell > [[name value index]; [foo a 1] [bar b 2] [baz c 3]] | move value name --after index ╭───┬───────┬──────╮ │ # │ value │ name │ @@ -64,7 +67,8 @@ Move multiple columns after the last column and reorder them ``` Move columns of a record -```nu + +```nushell > { name: foo, value: a, index: 1 } | move name --before index ╭───────┬─────╮ │ value │ a │ diff --git a/commands/docs/mut.md b/src/content/docs/commands/docs/mut.md similarity index 81% rename from commands/docs/mut.md rename to src/content/docs/commands/docs/mut.md index 7a663bfd269..199b0fccd89 100644 --- a/commands/docs/mut.md +++ b/src/content/docs/commands/docs/mut.md @@ -9,6 +9,7 @@ usage: | Create a mutable variable and give it a value. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,13 +18,12 @@ feature: default ## Signature -```> mut {flags} (var_name) (initial_value)``` +`> mut {flags} (var_name) (initial_value)` ## Parameters - - `var_name`: Variable name. - - `initial_value`: Equals sign followed by value. - +- `var_name`: Variable name. +- `initial_value`: Equals sign followed by value. ## Input/output types: @@ -34,29 +34,34 @@ feature: default ## Examples Set a mutable variable to a value, then update it -```nu + +```nushell > mut x = 10; $x = 12 ``` Upsert a value inside a mutable data structure -```nu + +```nushell > mut a = {b:{c:1}}; $a.b.c = 2 ``` Set a mutable variable to the result of an expression -```nu + +```nushell > mut x = 10 + 100 ``` Set a mutable variable based on the condition -```nu + +```nushell > mut x = if false { -1 } else { 1 } ``` ## 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 +https://www.nushell.sh/book/thinking_in_nu.html diff --git a/commands/docs/mv.md b/src/content/docs/commands/docs/mv.md similarity index 59% rename from commands/docs/mv.md rename to src/content/docs/commands/docs/mv.md index c5f369ec75d..e1945ecc7ca 100644 --- a/commands/docs/mv.md +++ b/src/content/docs/commands/docs/mv.md @@ -9,6 +9,7 @@ usage: | Move files or directories. feature: default --- + # {{ $frontmatter.title }} for filesystem @@ -17,20 +18,19 @@ feature: default ## Signature -```> mv {flags} (source) (destination)``` +`> mv {flags} (source) (destination)` ## Flags - - `--verbose, -v`: make mv to be verbose, showing files been moved. - - `--force, -f`: overwrite the destination. - - `--interactive, -i`: ask user to confirm action - - `--update, -u`: move only when the SOURCE file is newer than the destination file(with -f) or when the destination file is missing +- `--verbose, -v`: make mv to be verbose, showing files been moved. +- `--force, -f`: overwrite the destination. +- `--interactive, -i`: ask user to confirm action +- `--update, -u`: move only when the SOURCE file is newer than the destination file(with -f) or when the destination file is missing ## Parameters - - `source`: The location to move files/directories from. - - `destination`: The location to move files/directories to. - +- `source`: The location to move files/directories from. +- `destination`: The location to move files/directories to. ## Input/output types: @@ -41,19 +41,22 @@ feature: default ## Examples Rename a file -```nu + +```nushell > mv before.txt after.txt ``` Move a file into a directory -```nu + +```nushell > mv test.txt my/subdirectory ``` Move many files into a directory -```nu + +```nushell > mv *.txt my/subdirectory ``` diff --git a/commands/docs/n.md b/src/content/docs/commands/docs/n.md similarity index 93% rename from commands/docs/n.md rename to src/content/docs/commands/docs/n.md index 24b30a14225..8c45b743be0 100644 --- a/commands/docs/n.md +++ b/src/content/docs/commands/docs/n.md @@ -15,18 +15,20 @@ usage: | ## Signature -```> n ``` +`> n ` ## Examples Make two directories and enter new shells for them, use `n` to jump to the next shell -```nu + +```nushell > mkdir foo bar; enter foo; enter ../bar; n ``` Run `n` several times and note the changes of current directory -```nu + +```nushell > n ``` diff --git a/commands/docs/nu-check.md b/src/content/docs/commands/docs/nu-check.md similarity index 75% rename from commands/docs/nu-check.md rename to src/content/docs/commands/docs/nu-check.md index e4cf89bc437..6fb0a4afa77 100644 --- a/commands/docs/nu-check.md +++ b/src/content/docs/commands/docs/nu-check.md @@ -9,6 +9,7 @@ usage: | Validate and parse input content. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,71 +18,79 @@ feature: default ## Signature -```> nu-check {flags} (path)``` +`> nu-check {flags} (path)` ## Flags - - `--as-module, -m`: Parse content as module - - `--debug, -d`: Show error messages - - `--all, -a`: Parse content as script first, returns result if success, otherwise, try with module +- `--as-module, -m`: Parse content as module +- `--debug, -d`: Show error messages +- `--all, -a`: Parse content as script first, returns result if success, otherwise, try with module ## Parameters - - `path`: File path to parse. - +- `path`: File path to parse. ## Input/output types: -| input | output | -| --------- | ------ | +| input | output | +| ----------- | ------ | | list\ | bool | -| string | bool | +| string | bool | + ## Examples Parse a input file as script(Default) -```nu + +```nushell > nu-check script.nu ``` Parse a input file as module -```nu + +```nushell > nu-check --as-module module.nu ``` Parse a input file by showing error message -```nu + +```nushell > nu-check --debug script.nu ``` Parse an external stream as script by showing error message -```nu + +```nushell > open foo.nu | nu-check --debug script.nu ``` Parse an internal stream as module by showing error message -```nu + +```nushell > open module.nu | lines | nu-check --debug --as-module module.nu ``` Parse a string as script -```nu + +```nushell > $'two(char nl)lines' | nu-check ``` Heuristically parse which begins with script first, if it sees a failure, try module afterwards -```nu + +```nushell > nu-check -a script.nu ``` Heuristically parse by showing error message -```nu + +```nushell > open foo.nu | lines | nu-check --all --debug ``` diff --git a/commands/docs/nu-highlight.md b/src/content/docs/commands/docs/nu-highlight.md similarity index 93% rename from commands/docs/nu-highlight.md rename to src/content/docs/commands/docs/nu-highlight.md index 1f90223104a..911cac25f93 100644 --- a/commands/docs/nu-highlight.md +++ b/src/content/docs/commands/docs/nu-highlight.md @@ -9,6 +9,7 @@ usage: | Syntax highlight the input string. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,8 +18,7 @@ feature: default ## Signature -```> nu-highlight {flags} ``` - +`> nu-highlight {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Describe the type of a string -```nu + +```nushell > 'let x = 3' | nu-highlight ``` diff --git a/commands/docs/open.md b/src/content/docs/commands/docs/open.md similarity index 82% rename from commands/docs/open.md rename to src/content/docs/commands/docs/open.md index 0295b192e68..1d8d29d4173 100644 --- a/commands/docs/open.md +++ b/src/content/docs/commands/docs/open.md @@ -9,6 +9,7 @@ usage: | Load a file into a cell, converting to table if possible (avoid by appending '--raw'). feature: default --- + # {{ $frontmatter.title }} for filesystem @@ -17,17 +18,16 @@ feature: default ## Signature -```> open {flags} (filename) ...rest``` +`> open {flags} (filename) ...rest` ## Flags - - `--raw, -r`: open file as raw binary +- `--raw, -r`: open file as raw binary ## Parameters - - `filename`: The filename to use. - - `...rest`: Optional additional files to open. - +- `filename`: The filename to use. +- `...rest`: Optional additional files to open. ## Input/output types: @@ -35,37 +35,44 @@ feature: default | ------- | ------ | | nothing | any | | string | any | + ## Examples Open a file, with structure (based on file extension or SQLite database header) -```nu + +```nushell > open myfile.json ``` Open a file, as raw bytes -```nu + +```nushell > open myfile.json --raw ``` Open a file, using the input to get filename -```nu + +```nushell > 'myfile.txt' | open ``` Open a file, and decode it by the specified encoding -```nu + +```nushell > open myfile.txt --raw | decode utf-8 ``` Create a custom `from` parser to open newline-delimited JSON files with `open` -```nu + +```nushell > def "from ndjson" [] { from json -o }; open myfile.ndjson ``` ## Notes -Support to automatically parse files with an extension `.xyz` can be provided by a `from xyz` command in scope. \ No newline at end of file + +Support to automatically parse files with an extension `.xyz` can be provided by a `from xyz` command in scope. diff --git a/commands/docs/overlay.md b/src/content/docs/commands/docs/overlay.md similarity index 83% rename from commands/docs/overlay.md rename to src/content/docs/commands/docs/overlay.md index e72d4da289c..2ad61f43d83 100644 --- a/commands/docs/overlay.md +++ b/src/content/docs/commands/docs/overlay.md @@ -9,6 +9,7 @@ usage: | Commands for manipulating overlays. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,8 +18,7 @@ feature: default ## Signature -```> overlay {flags} ``` - +`> overlay {flags} ` ## Input/output types: @@ -27,10 +27,11 @@ feature: default | nothing | string | ## Notes + This command is a parser keyword. For details, check: - https://www.nushell.sh/book/thinking_in_nu.html +https://www.nushell.sh/book/thinking_in_nu.html - You must use one of the following subcommands. Using this command as-is will only produce this help message. +You must use one of the following subcommands. Using this command as-is will only produce this help message. ## Subcommands: @@ -39,4 +40,4 @@ This command is a parser keyword. For details, check: | [`overlay hide`](/commands/docs/overlay_hide.md) | Builtin | Hide an active overlay. | | [`overlay list`](/commands/docs/overlay_list.md) | Builtin | List all active overlays. | | [`overlay new`](/commands/docs/overlay_new.md) | Builtin | Create an empty overlay. | -| [`overlay use`](/commands/docs/overlay_use.md) | Builtin | Use definitions from a module as an overlay. | \ No newline at end of file +| [`overlay use`](/commands/docs/overlay_use.md) | Builtin | Use definitions from a module as an overlay. | diff --git a/commands/docs/overlay_hide.md b/src/content/docs/commands/docs/overlay_hide.md similarity index 76% rename from commands/docs/overlay_hide.md rename to src/content/docs/commands/docs/overlay_hide.md index cd53f3045f6..9936fa27f61 100644 --- a/commands/docs/overlay_hide.md +++ b/src/content/docs/commands/docs/overlay_hide.md @@ -9,6 +9,7 @@ usage: | Hide an active overlay. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,17 +18,16 @@ feature: default ## Signature -```> overlay hide {flags} (name)``` +`> overlay hide {flags} (name)` ## 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-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 ## Parameters - - `name`: Overlay to hide. - +- `name`: Overlay to hide. ## Input/output types: @@ -38,7 +38,8 @@ feature: default ## Examples Keep a custom command after hiding the overlay -```nu + +```nushell > module spam { export def foo [] { "foo" } } overlay use spam def bar [] { "bar" } @@ -49,7 +50,8 @@ Keep a custom command after hiding the overlay ``` Hide an overlay created from a file -```nu + +```nushell > 'export alias f = "foo"' | save spam.nu overlay use spam.nu overlay hide spam @@ -57,7 +59,8 @@ Hide an overlay created from a file ``` Hide the last activated overlay -```nu + +```nushell > module spam { export-env { $env.FOO = "foo" } } overlay use spam overlay hide @@ -65,7 +68,8 @@ Hide the last activated overlay ``` Keep the current working directory when removing an overlay -```nu + +```nushell > overlay new spam cd some-dir overlay hide --keep-env [ PWD ] spam @@ -73,5 +77,6 @@ Keep the current working directory when removing an overlay ``` ## 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 +https://www.nushell.sh/book/thinking_in_nu.html diff --git a/commands/docs/overlay_list.md b/src/content/docs/commands/docs/overlay_list.md similarity index 79% rename from commands/docs/overlay_list.md rename to src/content/docs/commands/docs/overlay_list.md index d68a3be4282..a5f46cc5760 100644 --- a/commands/docs/overlay_list.md +++ b/src/content/docs/commands/docs/overlay_list.md @@ -9,6 +9,7 @@ usage: | List all active overlays. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,19 +18,19 @@ feature: default ## Signature -```> overlay list {flags} ``` - +`> overlay list {flags} ` ## Input/output types: -| input | output | -| ------- | ------------ | +| input | output | +| ------- | -------------- | | nothing | list\ | ## Examples Get the last activated overlay -```nu + +```nushell > module spam { export def foo [] { "foo" } } overlay use spam overlay list | last @@ -37,4 +38,5 @@ spam ``` ## Notes -The overlays are listed in the order they were activated. \ No newline at end of file + +The overlays are listed in the order they were activated. diff --git a/commands/docs/overlay_new.md b/src/content/docs/commands/docs/overlay_new.md similarity index 85% rename from commands/docs/overlay_new.md rename to src/content/docs/commands/docs/overlay_new.md index bd89d2ae10c..00d3854ae81 100644 --- a/commands/docs/overlay_new.md +++ b/src/content/docs/commands/docs/overlay_new.md @@ -9,6 +9,7 @@ usage: | Create an empty overlay. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,12 +18,11 @@ feature: default ## Signature -```> overlay new {flags} (name)``` +`> overlay new {flags} (name)` ## Parameters - - `name`: Name of the overlay. - +- `name`: Name of the overlay. ## Input/output types: @@ -33,13 +33,15 @@ feature: default ## Examples Create an empty overlay -```nu + +```nushell > overlay new spam ``` ## Notes + The command will first create an empty module, then add it as an overlay. This command is a parser keyword. For details, check: - https://www.nushell.sh/book/thinking_in_nu.html \ No newline at end of file +https://www.nushell.sh/book/thinking_in_nu.html diff --git a/commands/docs/overlay_use.md b/src/content/docs/commands/docs/overlay_use.md similarity index 74% rename from commands/docs/overlay_use.md rename to src/content/docs/commands/docs/overlay_use.md index b8987cdb3e4..b7079d0d8f4 100644 --- a/commands/docs/overlay_use.md +++ b/src/content/docs/commands/docs/overlay_use.md @@ -9,6 +9,7 @@ usage: | Use definitions from a module as an overlay. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,18 +18,17 @@ feature: default ## Signature -```> overlay use {flags} (name) (as)``` +`> overlay use {flags} (name) (as)` ## Flags - - `--prefix, -p`: Prepend module name to the imported commands and aliases - - `--reload, -r`: If the overlay already exists, reload its definitions and environment. +- `--prefix, -p`: Prepend module name to the imported commands and aliases +- `--reload, -r`: If the overlay already exists, reload its definitions and environment. ## Parameters - - `name`: Module name to use overlay for. - - `as`: `as` keyword followed by a new name. - +- `name`: Module name to use overlay for. +- `as`: `as` keyword followed by a new name. ## Input/output types: @@ -39,7 +39,8 @@ feature: default ## Examples Create an overlay from a module -```nu + +```nushell > module spam { export def foo [] { "foo" } } overlay use spam foo @@ -47,7 +48,8 @@ Create an overlay from a module ``` Create an overlay from a module and rename it -```nu + +```nushell > module spam { export def foo [] { "foo" } } overlay use spam as spam_new foo @@ -55,7 +57,8 @@ Create an overlay from a module and rename it ``` Create an overlay with a prefix -```nu + +```nushell > 'export def foo { "foo" }' overlay use --prefix spam spam foo @@ -63,7 +66,8 @@ Create an overlay with a prefix ``` Create an overlay from a file -```nu + +```nushell > 'export-env { $env.FOO = "foo" }' | save spam.nu overlay use spam.nu $env.FOO @@ -71,5 +75,6 @@ Create an overlay from a file ``` ## 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 +https://www.nushell.sh/book/thinking_in_nu.html diff --git a/commands/docs/p.md b/src/content/docs/commands/docs/p.md similarity index 94% rename from commands/docs/p.md rename to src/content/docs/commands/docs/p.md index 7cc8289c2e5..f99f601c22e 100644 --- a/commands/docs/p.md +++ b/src/content/docs/commands/docs/p.md @@ -15,18 +15,20 @@ usage: | ## Signature -```> p ``` +`> p ` ## Examples Make two directories and enter new shells for them, use `p` to jump to the previous shell -```nu + +```nushell > mkdir foo bar; enter foo; enter ../bar; p ``` Run `p` several times and note the changes of current directory -```nu + +```nushell > p ``` diff --git a/commands/docs/par-each.md b/src/content/docs/commands/docs/par-each.md similarity index 82% rename from commands/docs/par-each.md rename to src/content/docs/commands/docs/par-each.md index 3b7716023e1..b3a966ca768 100644 --- a/commands/docs/par-each.md +++ b/src/content/docs/commands/docs/par-each.md @@ -9,6 +9,7 @@ usage: | Run a closure on each row of the input list in parallel, creating a new list with the results. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,35 +18,37 @@ feature: default ## Signature -```> par-each {flags} (closure)``` +`> par-each {flags} (closure)` ## 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 - - `closure`: The closure to run. - +- `closure`: The closure to run. ## Input/output types: -| input | output | -| --------- | --------- | -| any | any | +| input | output | +| ----------- | ----------- | +| any | any | | list\ | list\ | -| table | list\ | +| table | list\ | + ## Examples Multiplies each number. Note that the list will become arbitrarily disordered. -```nu + +```nushell > [1 2 3] | par-each {|e| $e * 2 } ``` Multiplies each number, keeping an original order -```nu + +```nushell > [1 2 3] | par-each --keep-order {|e| $e * 2 } ╭───┬───╮ │ 0 │ 2 │ @@ -56,7 +59,8 @@ Multiplies each number, keeping an original order ``` Enumerate and sort-by can be used to reconstruct the original order -```nu + +```nushell > 1..3 | enumerate | par-each {|p| update item ($p.item * 2)} | sort-by item | get item ╭───┬───╮ │ 0 │ 2 │ @@ -67,7 +71,8 @@ Enumerate and sort-by can be used to reconstruct the original order ``` Output can still be sorted afterward -```nu + +```nushell > [foo bar baz] | par-each {|e| $e + '!' } | sort ╭───┬──────╮ │ 0 │ bar! │ @@ -78,7 +83,8 @@ Output can still be sorted afterward ``` Iterate over each element, producing a list showing indexes of any 2s -```nu + +```nushell > [1 2 3] | enumerate | par-each { |e| if $e.item == 2 { $"found 2 at ($e.index)!"} } ╭───┬───────────────╮ │ 0 │ found 2 at 1! │ diff --git a/commands/docs/parse.md b/src/content/docs/commands/docs/parse.md similarity index 91% rename from commands/docs/parse.md rename to src/content/docs/commands/docs/parse.md index 7477777cda9..d93048b8f16 100644 --- a/commands/docs/parse.md +++ b/src/content/docs/commands/docs/parse.md @@ -9,6 +9,7 @@ usage: | Parse columns from string data using a simple pattern. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,27 +18,28 @@ feature: default ## Signature -```> parse {flags} (pattern)``` +`> parse {flags} (pattern)` ## Flags - - `--regex, -r`: use full regex syntax for patterns +- `--regex, -r`: use full regex syntax for patterns ## Parameters - - `pattern`: The pattern to match. - +- `pattern`: The pattern to match. ## Input/output types: -| input | output | -| --------- | ------ | +| input | output | +| ----------- | ------ | | list\ | table | -| string | table | +| string | table | + ## Examples Parse a string into two named columns -```nu + +```nushell > "hi there" | parse "{foo} {bar}" ╭───┬─────┬───────╮ │ # │ foo │ bar │ @@ -48,7 +50,8 @@ Parse a string into two named columns ``` Parse a string using regex pattern -```nu + +```nushell > "hi there" | parse --regex '(?P\w+) (?P\w+)' ╭───┬─────┬───────╮ │ # │ foo │ bar │ @@ -59,7 +62,8 @@ Parse a string using regex pattern ``` Parse a string using fancy-regex named capture group pattern -```nu + +```nushell > "foo bar." | parse --regex '\s*(?\w+)(?=\.)' ╭───┬──────╮ │ # │ name │ @@ -70,7 +74,8 @@ Parse a string using fancy-regex named capture group pattern ``` Parse a string using fancy-regex capture group pattern -```nu + +```nushell > "foo! bar." | parse --regex '(\w+)(?=\.)|(\w+)(?=!)' ╭───┬──────────┬──────────╮ │ # │ capture0 │ capture1 │ @@ -82,7 +87,8 @@ Parse a string using fancy-regex capture group pattern ``` Parse a string using fancy-regex look behind pattern -```nu + +```nushell > " @another(foo bar) " | parse --regex '\s*(?<=[() ])(@\w+)(\([^)]*\))?\s*' ╭───┬──────────┬───────────╮ │ # │ capture0 │ capture1 │ @@ -93,7 +99,8 @@ Parse a string using fancy-regex look behind pattern ``` Parse a string using fancy-regex look ahead atomic group pattern -```nu + +```nushell > "abcd" | parse --regex '^a(bc(?=d)|b)cd$' ╭───┬──────────╮ │ # │ capture0 │ diff --git a/commands/docs/path.md b/src/content/docs/commands/docs/path.md similarity index 89% rename from commands/docs/path.md rename to src/content/docs/commands/docs/path.md index cebdcefafef..359ec271e61 100644 --- a/commands/docs/path.md +++ b/src/content/docs/commands/docs/path.md @@ -9,6 +9,7 @@ usage: | Explore and manipulate paths. feature: default --- + # {{ $frontmatter.title }} for path @@ -17,8 +18,7 @@ feature: default ## Signature -```> path {flags} ``` - +`> path {flags} ` ## Input/output types: @@ -27,15 +27,16 @@ feature: default | nothing | string | ## Notes + You must use one of the following subcommands. Using this command as-is will only produce this help message. There are three ways to represent a path: -* As a path literal, e.g., '/home/viking/spam.txt' -* As a structured path: a table with 'parent', 'stem', and 'extension' (and -* 'prefix' on Windows) columns. This format is produced by the 'path parse' +- As a path literal, e.g., '/home/viking/spam.txt' +- As a structured path: a table with 'parent', 'stem', and 'extension' (and +- 'prefix' on Windows) columns. This format is produced by the 'path parse' subcommand. -* As a list of path parts, e.g., '[ / home viking spam.txt ]'. Splitting into +- As a list of path parts, e.g., '[ / home viking spam.txt ]'. Splitting into parts is done by the `path split` command. All subcommands accept all three variants as an input. Furthermore, the 'path @@ -54,4 +55,4 @@ the path literal. | [`path parse`](/commands/docs/path_parse.md) | Builtin | Convert a path into structured data. | | [`path relative-to`](/commands/docs/path_relative-to.md) | Builtin | Express a path as relative to another path. | | [`path split`](/commands/docs/path_split.md) | Builtin | Split a path into a list based on the system's path separator. | -| [`path type`](/commands/docs/path_type.md) | Builtin | Get the type of the object a path refers to (e.g., file, dir, symlink). | \ No newline at end of file +| [`path type`](/commands/docs/path_type.md) | Builtin | Get the type of the object a path refers to (e.g., file, dir, symlink). | diff --git a/commands/docs/path_basename.md b/src/content/docs/commands/docs/path_basename.md similarity index 77% rename from commands/docs/path_basename.md rename to src/content/docs/commands/docs/path_basename.md index 4218900a046..7d9cce586d1 100644 --- a/commands/docs/path_basename.md +++ b/src/content/docs/commands/docs/path_basename.md @@ -9,6 +9,7 @@ usage: | Get the final component of a path. feature: default --- + # {{ $frontmatter.title }} for path @@ -17,29 +18,31 @@ feature: default ## Signature -```> path basename {flags} ``` +`> path basename {flags} ` ## 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: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| string | string | +| string | string | + ## Examples Get basename of a path -```nu + +```nushell > '/home/joe/test.txt' | path basename test.txt ``` Get basename of a list of paths -```nu + +```nushell > [ /home/joe, /home/doe ] | path basename ╭───┬─────╮ │ 0 │ joe │ @@ -49,7 +52,8 @@ Get basename of a list of paths ``` Replace basename of a path -```nu + +```nushell > '/home/joe/test.txt' | path basename --replace 'spam.png' /home/joe/spam.png ``` diff --git a/commands/docs/path_dirname.md b/src/content/docs/commands/docs/path_dirname.md similarity index 76% rename from commands/docs/path_dirname.md rename to src/content/docs/commands/docs/path_dirname.md index 28ffa71a5c7..2fe89f99cf4 100644 --- a/commands/docs/path_dirname.md +++ b/src/content/docs/commands/docs/path_dirname.md @@ -9,6 +9,7 @@ usage: | Get the parent directory of a path. feature: default --- + # {{ $frontmatter.title }} for path @@ -17,30 +18,32 @@ feature: default ## Signature -```> path dirname {flags} ``` +`> path dirname {flags} ` ## 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: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| string | string | +| string | string | + ## Examples Get dirname of a path -```nu + +```nushell > '/home/joe/code/test.txt' | path dirname /home/joe/code ``` Get dirname of a list of paths -```nu + +```nushell > [ /home/joe/test.txt, /home/doe/test.txt ] | path dirname ╭───┬───────────╮ │ 0 │ /home/joe │ @@ -50,13 +53,15 @@ Get dirname of a list of paths ``` Walk up two levels -```nu + +```nushell > '/home/joe/code/test.txt' | path dirname --num-levels 2 /home/joe ``` Replace the part that would be returned with a custom path -```nu + +```nushell > '/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/src/content/docs/commands/docs/path_exists.md similarity index 81% rename from commands/docs/path_exists.md rename to src/content/docs/commands/docs/path_exists.md index 72663b86c4f..33ad6f185e6 100644 --- a/commands/docs/path_exists.md +++ b/src/content/docs/commands/docs/path_exists.md @@ -9,6 +9,7 @@ usage: | Check whether a path exists. feature: default --- + # {{ $frontmatter.title }} for path @@ -17,29 +18,31 @@ feature: default ## Signature -```> path exists {flags} ``` +`> path exists {flags} ` ## Flags - - `--no-symlink, -n`: Do not resolve symbolic links - +- `--no-symlink, -n`: Do not resolve symbolic links ## Input/output types: -| input | output | -| ------------ | ---------- | +| input | output | +| -------------- | ------------ | | list\ | list\ | -| string | bool | +| string | bool | + ## Examples Check if a file exists -```nu + +```nushell > '/home/joe/todo.txt' | path exists false ``` Check if files in list exist -```nu + +```nushell > [ /home/joe/todo.txt, /home/doe/todo.txt ] | path exists ╭───┬───────╮ │ 0 │ false │ @@ -49,5 +52,6 @@ Check if files in list exist ``` ## Notes + This only checks if it is possible to either `open` or `cd` to the given path. -If you need to distinguish dirs and files, please use `path type`. \ No newline at end of file +If you need to distinguish dirs and files, please use `path type`. diff --git a/commands/docs/path_expand.md b/src/content/docs/commands/docs/path_expand.md similarity index 74% rename from commands/docs/path_expand.md rename to src/content/docs/commands/docs/path_expand.md index dda8922d9d8..64653cd0c3e 100644 --- a/commands/docs/path_expand.md +++ b/src/content/docs/commands/docs/path_expand.md @@ -9,6 +9,7 @@ usage: | Try to expand a path to its absolute form. feature: default --- + # {{ $frontmatter.title }} for path @@ -17,36 +18,39 @@ feature: default ## Signature -```> path expand {flags} ``` +`> path expand {flags} ` ## 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: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| string | string | +| string | string | + ## Examples Expand an absolute path -```nu + +```nushell > '/home/joe/foo/../bar' | path expand /home/joe/bar ``` Expand a relative path -```nu + +```nushell > 'foo/../bar' | path expand ``` Expand a list of paths -```nu + +```nushell > [ /foo/../bar, /foo/../baz ] | path expand ╭───┬──────╮ │ 0 │ /bar │ diff --git a/commands/docs/path_join.md b/src/content/docs/commands/docs/path_join.md similarity index 79% rename from commands/docs/path_join.md rename to src/content/docs/commands/docs/path_join.md index 826741d7b5a..457c4b2a521 100644 --- a/commands/docs/path_join.md +++ b/src/content/docs/commands/docs/path_join.md @@ -9,6 +9,7 @@ usage: | Join a structured path or a list of path parts. feature: default --- + # {{ $frontmatter.title }} for path @@ -17,61 +18,68 @@ feature: default ## Signature -```> path join {flags} ...rest``` +`> path join {flags} ...rest` ## Parameters - - `...rest`: Path to append to the input. - +- `...rest`: Path to append to the input. ## Input/output types: -| input | output | -| ------------ | ------------ | -| list\ | string | -| record | string | -| string | string | -| table | list\ | +| input | output | +| -------------- | -------------- | +| list\ | string | +| record | string | +| string | string | +| table | list\ | + ## Examples Append a filename to a path -```nu + +```nushell > '/home/viking' | path join spam.txt /home/viking/spam.txt ``` Append a filename to a path -```nu + +```nushell > '/home/viking' | path join spams this_spam.txt /home/viking/spams/this_spam.txt ``` Use relative paths, e.g. '..' will go up one directory -```nu + +```nushell > '/home/viking' | path join .. folder /home/viking/../folder ``` Use absolute paths, e.g. '/' will bring you to the top level directory -```nu + +```nushell > '/home/viking' | path join / folder /folder ``` Join a list of parts into a path -```nu + +```nushell > [ '/' 'home' 'viking' 'spam.txt' ] | path join /home/viking/spam.txt ``` Join a structured path into a path -```nu + +```nushell > { parent: '/home/viking', stem: 'spam', extension: 'txt' } | path join /home/viking/spam.txt ``` Join a table of structured paths into a list of paths -```nu + +```nushell > [[ parent stem extension ]; [ '/home/viking' 'spam' 'txt' ]] | path join ╭───┬───────────────────────╮ │ 0 │ /home/viking/spam.txt │ @@ -80,5 +88,6 @@ Join a table of structured paths into a list of paths ``` ## Notes + Optionally, append an additional path to the result. It is designed to accept -the output of 'path parse' and 'path split' subcommands. \ No newline at end of file +the output of 'path parse' and 'path split' subcommands. diff --git a/commands/docs/path_parse.md b/src/content/docs/commands/docs/path_parse.md similarity index 86% rename from commands/docs/path_parse.md rename to src/content/docs/commands/docs/path_parse.md index e5754d5fdb3..f1fe918ca3b 100644 --- a/commands/docs/path_parse.md +++ b/src/content/docs/commands/docs/path_parse.md @@ -9,6 +9,7 @@ usage: | Convert a path into structured data. feature: default --- + # {{ $frontmatter.title }} for path @@ -17,23 +18,24 @@ feature: default ## Signature -```> path parse {flags} ``` +`> path parse {flags} ` ## Flags - - `--extension, -e {string}`: Manually supply the extension (without the dot) - +- `--extension, -e {string}`: Manually supply the extension (without the dot) ## Input/output types: -| input | output | -| ------------ | ------ | +| input | output | +| -------------- | ------ | | list\ | table | -| string | record | +| string | record | + ## Examples Parse a path -```nu + +```nushell > '/home/viking/spam.txt' | path parse ╭───────────┬──────────────╮ │ parent │ /home/viking │ @@ -43,13 +45,15 @@ Parse a path ``` Replace a complex extension -```nu + +```nushell > '/home/viking/spam.tar.gz' | path parse --extension tar.gz | upsert extension { 'txt' } ``` Ignore the extension -```nu + +```nushell > '/etc/conf.d' | path parse --extension '' ╭───────────┬────────╮ │ parent │ /etc │ @@ -59,7 +63,8 @@ Ignore the extension ``` Parse all paths in a list -```nu + +```nushell > [ /home/viking.d /home/spam.txt ] | path parse ╭───┬────────┬────────┬───────────╮ │ # │ parent │ stem │ extension │ @@ -71,5 +76,6 @@ Parse all paths in a list ``` ## Notes + Each path is split into a table with 'parent', 'stem' and 'extension' fields. -On Windows, an extra 'prefix' column is added. \ No newline at end of file +On Windows, an extra 'prefix' column is added. diff --git a/commands/docs/path_relative-to.md b/src/content/docs/commands/docs/path_relative-to.md similarity index 83% rename from commands/docs/path_relative-to.md rename to src/content/docs/commands/docs/path_relative-to.md index 01f9178d452..144ae72e8b0 100644 --- a/commands/docs/path_relative-to.md +++ b/src/content/docs/commands/docs/path_relative-to.md @@ -9,6 +9,7 @@ usage: | Express a path as relative to another path. feature: default --- + # {{ $frontmatter.title }} for path @@ -17,29 +18,31 @@ feature: default ## Signature -```> path relative-to {flags} (path)``` +`> path relative-to {flags} (path)` ## Parameters - - `path`: Parent shared with the input path. - +- `path`: Parent shared with the input path. ## Input/output types: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| string | string | +| string | string | + ## Examples Find a relative path from two absolute paths -```nu + +```nushell > '/home/viking' | path relative-to '/home' viking ``` Find a relative path from absolute paths in list -```nu + +```nushell > [ /home/viking, /home/spam ] | path relative-to '/home' ╭───┬────────╮ │ 0 │ viking │ @@ -49,12 +52,14 @@ Find a relative path from absolute paths in list ``` Find a relative path from two relative paths -```nu + +```nushell > 'eggs/bacon/sausage/spam' | path relative-to 'eggs/bacon/sausage' spam ``` ## Notes + Can be used only when the input and the argument paths are either both absolute or both relative. The argument path needs to be a parent of the input -path. \ No newline at end of file +path. diff --git a/commands/docs/path_split.md b/src/content/docs/commands/docs/path_split.md similarity index 89% rename from commands/docs/path_split.md rename to src/content/docs/commands/docs/path_split.md index ac6f2c5dfb0..c9bfd734bb7 100644 --- a/commands/docs/path_split.md +++ b/src/content/docs/commands/docs/path_split.md @@ -9,6 +9,7 @@ usage: | Split a path into a list based on the system's path separator. feature: default --- + # {{ $frontmatter.title }} for path @@ -17,19 +18,20 @@ feature: default ## Signature -```> path split {flags} ``` - +`> path split {flags} ` ## Input/output types: -| input | output | -| ------------ | ------------------ | +| input | output | +| -------------- | ---------------------- | | list\ | list\\> | -| string | list\ | +| string | list\ | + ## Examples Split a path into parts -```nu + +```nushell > '/home/viking/spam.txt' | path split ╭───┬──────────╮ │ 0 │ / │ @@ -41,7 +43,8 @@ Split a path into parts ``` Split paths in list into parts -```nu + +```nushell > [ /home/viking/spam.txt /home/viking/eggs.txt ] | path split ╭───┬──────────────────╮ │ 0 │ ╭───┬──────────╮ │ diff --git a/commands/docs/path_type.md b/src/content/docs/commands/docs/path_type.md similarity index 78% rename from commands/docs/path_type.md rename to src/content/docs/commands/docs/path_type.md index 749209b0ae4..34f314db7bd 100644 --- a/commands/docs/path_type.md +++ b/src/content/docs/commands/docs/path_type.md @@ -9,6 +9,7 @@ usage: | Get the type of the object a path refers to (e.g., file, dir, symlink). feature: default --- + # {{ $frontmatter.title }} for path @@ -17,29 +18,32 @@ feature: default ## Signature -```> path type {flags} ``` - +`> path type {flags} ` ## Input/output types: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| string | string | +| string | string | + ## Examples Show type of a filepath -```nu + +```nushell > '.' | path type dir ``` Show type of a filepaths in a list -```nu + +```nushell > ls | get name | path type ``` ## Notes + This checks the file system to confirm the path's object type. -If nothing is found, an empty string will be returned. \ No newline at end of file +If nothing is found, an empty string will be returned. diff --git a/commands/docs/port.md b/src/content/docs/commands/docs/port.md similarity index 81% rename from commands/docs/port.md rename to src/content/docs/commands/docs/port.md index 5e662b59636..5bf2dfac414 100644 --- a/commands/docs/port.md +++ b/src/content/docs/commands/docs/port.md @@ -9,6 +9,7 @@ usage: | Get a free port from system. feature: default --- + # {{ $frontmatter.title }} for network @@ -17,13 +18,12 @@ feature: default ## Signature -```> port {flags} (start) (end)``` +`> port {flags} (start) (end)` ## Parameters - - `start`: The start port to scan (inclusive). - - `end`: The end port to scan (inclusive). - +- `start`: The start port to scan (inclusive). +- `end`: The end port to scan (inclusive). ## Input/output types: @@ -34,13 +34,15 @@ feature: default ## Examples get a free port between 3121 and 4000 -```nu + +```nushell > port 3121 4000 3121 ``` get a free port from system -```nu + +```nushell > port ``` diff --git a/commands/docs/prepend.md b/src/content/docs/commands/docs/prepend.md similarity index 91% rename from commands/docs/prepend.md rename to src/content/docs/commands/docs/prepend.md index 4870b364b14..e4cf811e3be 100644 --- a/commands/docs/prepend.md +++ b/src/content/docs/commands/docs/prepend.md @@ -9,6 +9,7 @@ usage: | Prepend any number of rows to a table. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,23 +18,23 @@ feature: default ## Signature -```> prepend {flags} (row)``` +`> prepend {flags} (row)` ## Parameters - - `row`: The row, list, or table to prepend. - +- `row`: The row, list, or table to prepend. ## Input/output types: -| input | output | -| ----- | --------- | +| input | output | +| ----- | ----------- | | any | list\ | ## Examples prepend a list to an item -```nu + +```nushell > 0 | prepend [1 2 3] ╭───┬───╮ │ 0 │ 1 │ @@ -45,7 +46,8 @@ prepend a list to an item ``` Prepend a list of strings to a string -```nu + +```nushell > "a" | prepend ["b"] ╭───┬───╮ │ 0 │ b │ @@ -55,7 +57,8 @@ Prepend a list of strings to a string ``` Prepend one int item -```nu + +```nushell > [1 2 3 4] | prepend 0 ╭───┬───╮ │ 0 │ 0 │ @@ -68,7 +71,8 @@ Prepend one int item ``` Prepend two int items -```nu + +```nushell > [2 3 4] | prepend [0 1] ╭───┬───╮ │ 0 │ 0 │ @@ -81,7 +85,8 @@ Prepend two int items ``` Prepend ints and strings -```nu + +```nushell > [2 nu 4 shell] | prepend [0 1 rocks] ╭───┬───────╮ │ 0 │ 0 │ @@ -96,7 +101,8 @@ Prepend ints and strings ``` Prepend a range -```nu + +```nushell > [3 4] | prepend 0..2 ╭───┬───╮ │ 0 │ 0 │ @@ -109,7 +115,8 @@ Prepend a range ``` ## Notes + Be aware that this command 'unwraps' lists passed to it. So, if you pass a variable to it, and you want the variable's contents to be prepended without being unwrapped, it's wise to pre-emptively wrap the variable in a list, like so: `prepend [$val]`. This way, `prepend` will -only unwrap the outer list, and leave the variable's contents untouched. \ No newline at end of file +only unwrap the outer list, and leave the variable's contents untouched. diff --git a/commands/docs/print.md b/src/content/docs/commands/docs/print.md similarity index 76% rename from commands/docs/print.md rename to src/content/docs/commands/docs/print.md index ed6ab040076..814e22edb4a 100644 --- a/commands/docs/print.md +++ b/src/content/docs/commands/docs/print.md @@ -9,6 +9,7 @@ usage: | Print the given values to stdout. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,17 +18,16 @@ feature: default ## Signature -```> print {flags} ...rest``` +`> print {flags} ...rest` ## Flags - - `--no-newline, -n`: print without inserting a newline for the line ending - - `--stderr, -e`: print to stderr instead of stdout +- `--no-newline, -n`: print without inserting a newline for the line ending +- `--stderr, -e`: print to stderr instead of stdout ## Parameters - - `...rest`: the values to print - +- `...rest`: the values to print ## Input/output types: @@ -35,22 +35,26 @@ feature: default | ------- | ------- | | any | nothing | | nothing | nothing | + ## Examples Print 'hello world' -```nu + +```nushell > print "hello world" ``` Print the sum of 2 and 3 -```nu + +```nushell > print (2 + 3) ``` ## Notes + Unlike `echo`, this command does not return any value (`print | describe` will return "nothing"). Since this command has no output, there is no point in piping it with other commands. -`print` may be used inside blocks of code (e.g.: hooks) to display text during execution without interfering with the pipeline. \ No newline at end of file +`print` may be used inside blocks of code (e.g.: hooks) to display text during execution without interfering with the pipeline. diff --git a/commands/docs/ps.md b/src/content/docs/commands/docs/ps.md similarity index 87% rename from commands/docs/ps.md rename to src/content/docs/commands/docs/ps.md index 6265374c1cb..aa081c02e51 100644 --- a/commands/docs/ps.md +++ b/src/content/docs/commands/docs/ps.md @@ -9,6 +9,7 @@ usage: | View information about system processes. feature: default --- + # {{ $frontmatter.title }} for system @@ -17,12 +18,11 @@ feature: default ## Signature -```> ps {flags} ``` +`> ps {flags} ` ## Flags - - `--long, -l`: list all available columns for each entry - +- `--long, -l`: list all available columns for each entry ## Input/output types: @@ -33,31 +33,36 @@ feature: default ## Examples List the system processes -```nu + +```nushell > ps ``` List the top 5 system processes with the highest memory usage -```nu + +```nushell > ps | sort-by mem | last 5 ``` List the top 3 system processes with the highest CPU usage -```nu + +```nushell > ps | sort-by cpu | last 3 ``` List the system processes with 'nu' in their names -```nu + +```nushell > ps | where name =~ 'nu' ``` Get the parent process id of the current nu process -```nu + +```nushell > ps | where pid == $nu.pid | get ppid ``` diff --git a/commands/docs/query.md b/src/content/docs/commands/docs/query.md similarity index 69% rename from commands/docs/query.md rename to src/content/docs/commands/docs/query.md index b8c2c28d487..b7706fe3b56 100644 --- a/commands/docs/query.md +++ b/src/content/docs/commands/docs/query.md @@ -9,6 +9,7 @@ usage: | Show all the query commands feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,8 +18,7 @@ feature: default ## Signature -```> query {flags} ``` - +`> query {flags} ` ## Input/output types: @@ -26,12 +26,11 @@ feature: default | ----- | ------ | | any | any | - ## Subcommands: -| name | type | usage | -| -------------------------------------------- | -------------- | --------------------------------------------------------------------------------- | -| [`query db`](/commands/docs/query_db.md) | Builtin | Query a database using SQL. | +| name | type | usage | +| -------------------------------------------- | -------------- | ---------------------------------------------------- | -------------------------- | +| [`query db`](/commands/docs/query_db.md) | Builtin | Query a database using SQL. | | [`query json`](/commands/docs/query_json.md) | Builtin,Plugin | execute json query on json file (open --raw \ | query json 'query string') | -| [`query web`](/commands/docs/query_web.md) | Builtin,Plugin | execute selector query on html/web | -| [`query xml`](/commands/docs/query_xml.md) | Builtin,Plugin | execute xpath query on xml | \ No newline at end of file +| [`query web`](/commands/docs/query_web.md) | Builtin,Plugin | execute selector query on html/web | +| [`query xml`](/commands/docs/query_xml.md) | Builtin,Plugin | execute xpath query on xml | diff --git a/commands/docs/query_db.md b/src/content/docs/commands/docs/query_db.md similarity index 87% rename from commands/docs/query_db.md rename to src/content/docs/commands/docs/query_db.md index 239c755d8b7..3f871b8d3f9 100644 --- a/commands/docs/query_db.md +++ b/src/content/docs/commands/docs/query_db.md @@ -9,6 +9,7 @@ usage: | Query a database using SQL. feature: default --- + # {{ $frontmatter.title }} for database @@ -17,12 +18,11 @@ feature: default ## Signature -```> query db {flags} (SQL)``` +`> query db {flags} (SQL)` ## Parameters - - `SQL`: SQL to execute against the database. - +- `SQL`: SQL to execute against the database. ## Input/output types: @@ -33,7 +33,8 @@ feature: default ## Examples Execute SQL against a SQLite database -```nu + +```nushell > open foo.db | query db "SELECT * FROM Bar" ``` diff --git a/commands/docs/query_json.md b/src/content/docs/commands/docs/query_json.md similarity index 91% rename from commands/docs/query_json.md rename to src/content/docs/commands/docs/query_json.md index db464c32088..a58d09c8c40 100644 --- a/commands/docs/query_json.md +++ b/src/content/docs/commands/docs/query_json.md @@ -9,6 +9,7 @@ usage: | execute json query on json file (open --raw | query json 'query string') feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,12 +18,11 @@ feature: default ## Signature -```> query json {flags} (query)``` +`> query json {flags} (query)` ## Parameters - - `query`: json query - +- `query`: json query ## Input/output types: diff --git a/commands/docs/query_web.md b/src/content/docs/commands/docs/query_web.md similarity index 77% rename from commands/docs/query_web.md rename to src/content/docs/commands/docs/query_web.md index 83c3bb5cc8e..e77e1cd2767 100644 --- a/commands/docs/query_web.md +++ b/src/content/docs/commands/docs/query_web.md @@ -9,6 +9,7 @@ usage: | execute selector query on html/web feature: default --- + # {{ $frontmatter.title }} for network @@ -17,16 +18,15 @@ feature: default ## Signature -```> query web {flags} ``` +`> query web {flags} ` ## Flags - - `--query, -q {string}`: selector query - - `--as-html, -m`: return the query output as html - - `--attribute, -a {string}`: 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 {string}`: 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 ## Input/output types: @@ -37,26 +37,30 @@ feature: default ## Examples Retrieve all `
` elements from phoronix.com website -```nu + +```nushell > http get https://phoronix.com | query web --query 'header' | flatten ``` Retrieve a html table from Wikipedia and parse it into a nushell table using table headers as guides -```nu + +```nushell > http get https://en.wikipedia.org/wiki/List_of_cities_in_India_by_population | query web --as-table [City 'Population(2011)[3]' 'Population(2001)[3][a]' 'State or unionterritory' 'Ref'] ``` Pass multiple css selectors to extract several elements within single query, group the query results together and rotate them to create a table -```nu + +```nushell > http get https://www.nushell.sh | query web --query 'h2, h2 + p' | each {str join} | group 2 | each {rotate --ccw tagline description} | flatten ``` Retrieve a specific html attribute instead of the default text -```nu + +```nushell > http get https://example.org | query web --query a --attribute href ``` diff --git a/commands/docs/query_xml.md b/src/content/docs/commands/docs/query_xml.md similarity index 89% rename from commands/docs/query_xml.md rename to src/content/docs/commands/docs/query_xml.md index 5758fbd093f..3471653a8c5 100644 --- a/commands/docs/query_xml.md +++ b/src/content/docs/commands/docs/query_xml.md @@ -9,6 +9,7 @@ usage: | execute xpath query on xml feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,12 +18,11 @@ feature: default ## Signature -```> query xml {flags} (query)``` +`> query xml {flags} (query)` ## Parameters - - `query`: xpath query - +- `query`: xpath query ## Input/output types: diff --git a/commands/docs/random.md b/src/content/docs/commands/docs/random.md similarity index 95% rename from commands/docs/random.md rename to src/content/docs/commands/docs/random.md index d3c56d23cc3..564a8b972e2 100644 --- a/commands/docs/random.md +++ b/src/content/docs/commands/docs/random.md @@ -9,6 +9,7 @@ usage: | Generate a random value. feature: default --- + # {{ $frontmatter.title }} for random @@ -17,8 +18,7 @@ feature: default ## Signature -```> random {flags} ``` - +`> random {flags} ` ## Input/output types: @@ -27,6 +27,7 @@ feature: default | nothing | string | ## Notes + You must use one of the following subcommands. Using this command as-is will only produce this help message. ## Subcommands: @@ -38,4 +39,4 @@ You must use one of the following subcommands. Using this command as-is will onl | [`random dice`](/commands/docs/random_dice.md) | Builtin | Generate a random dice roll. | | [`random float`](/commands/docs/random_float.md) | Builtin | Generate a random float within a range [min..max]. | | [`random int`](/commands/docs/random_int.md) | Builtin | Generate a random integer [min..max]. | -| [`random uuid`](/commands/docs/random_uuid.md) | Builtin | Generate a random uuid4 string. | \ No newline at end of file +| [`random uuid`](/commands/docs/random_uuid.md) | Builtin | Generate a random uuid4 string. | diff --git a/commands/docs/random_bool.md b/src/content/docs/commands/docs/random_bool.md similarity index 85% rename from commands/docs/random_bool.md rename to src/content/docs/commands/docs/random_bool.md index 415e92a5cbc..d6f46aec4a8 100644 --- a/commands/docs/random_bool.md +++ b/src/content/docs/commands/docs/random_bool.md @@ -9,6 +9,7 @@ usage: | Generate a random boolean value. feature: default --- + # {{ $frontmatter.title }} for random @@ -17,12 +18,11 @@ feature: default ## Signature -```> random bool {flags} ``` +`> random bool {flags} ` ## Flags - - `--bias, -b {number}`: Adjusts the probability of a "true" outcome - +- `--bias, -b {number}`: Adjusts the probability of a "true" outcome ## Input/output types: @@ -33,13 +33,15 @@ feature: default ## Examples Generate a random boolean value -```nu + +```nushell > random bool ``` Generate a random boolean value with a 75% chance of "true" -```nu + +```nushell > random bool --bias 0.75 ``` diff --git a/commands/docs/random_chars.md b/src/content/docs/commands/docs/random_chars.md similarity index 87% rename from commands/docs/random_chars.md rename to src/content/docs/commands/docs/random_chars.md index 11851ca9342..823a120fe80 100644 --- a/commands/docs/random_chars.md +++ b/src/content/docs/commands/docs/random_chars.md @@ -9,6 +9,7 @@ usage: | Generate random chars. feature: default --- + # {{ $frontmatter.title }} for random @@ -17,12 +18,11 @@ feature: default ## Signature -```> random chars {flags} ``` +`> random chars {flags} ` ## Flags - - `--length, -l {int}`: Number of chars - +- `--length, -l {int}`: Number of chars ## Input/output types: @@ -33,13 +33,15 @@ feature: default ## Examples Generate random chars -```nu + +```nushell > random chars ``` Generate random chars with specified length -```nu + +```nushell > random chars --length 20 ``` diff --git a/commands/docs/random_dice.md b/src/content/docs/commands/docs/random_dice.md similarity index 74% rename from commands/docs/random_dice.md rename to src/content/docs/commands/docs/random_dice.md index 7d15f3e7b84..e8ce7392de1 100644 --- a/commands/docs/random_dice.md +++ b/src/content/docs/commands/docs/random_dice.md @@ -9,6 +9,7 @@ usage: | Generate a random dice roll. feature: default --- + # {{ $frontmatter.title }} for random @@ -17,30 +18,31 @@ feature: default ## Signature -```> random dice {flags} ``` +`> random dice {flags} ` ## 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: -| input | output | -| ------- | --------- | +| input | output | +| ------- | ----------- | | nothing | list\ | ## Examples Roll 1 dice with 6 sides each -```nu + +```nushell > random dice ``` Roll 10 dice with 12 sides each -```nu + +```nushell > random dice --dice 10 --sides 12 ``` diff --git a/commands/docs/random_float.md b/src/content/docs/commands/docs/random_float.md similarity index 88% rename from commands/docs/random_float.md rename to src/content/docs/commands/docs/random_float.md index 9a7c2ec5fa0..731e643298a 100644 --- a/commands/docs/random_float.md +++ b/src/content/docs/commands/docs/random_float.md @@ -9,6 +9,7 @@ usage: | Generate a random float within a range [min..max]. feature: default --- + # {{ $frontmatter.title }} for random @@ -17,12 +18,11 @@ feature: default ## Signature -```> random float {flags} (range)``` +`> random float {flags} (range)` ## Parameters - - `range`: Range of values. - +- `range`: Range of values. ## Input/output types: @@ -33,25 +33,29 @@ feature: default ## Examples Generate a default float value between 0 and 1 -```nu + +```nushell > random float ``` Generate a random float less than or equal to 500 -```nu + +```nushell > random float ..500 ``` Generate a random float greater than or equal to 100000 -```nu + +```nushell > random float 100000.. ``` Generate a random float between 1.0 and 1.1 -```nu + +```nushell > random float 1.0..1.1 ``` diff --git a/commands/docs/random_int.md b/src/content/docs/commands/docs/random_int.md similarity index 88% rename from commands/docs/random_int.md rename to src/content/docs/commands/docs/random_int.md index 656d966fd3b..7fb75910f5e 100644 --- a/commands/docs/random_int.md +++ b/src/content/docs/commands/docs/random_int.md @@ -9,6 +9,7 @@ usage: | Generate a random integer [min..max]. feature: default --- + # {{ $frontmatter.title }} for random @@ -17,12 +18,11 @@ feature: default ## Signature -```> random int {flags} (range)``` +`> random int {flags} (range)` ## Parameters - - `range`: Range of values. - +- `range`: Range of values. ## Input/output types: @@ -33,25 +33,29 @@ feature: default ## Examples Generate an unconstrained random integer -```nu + +```nushell > random int ``` Generate a random integer less than or equal to 500 -```nu + +```nushell > random int ..500 ``` Generate a random integer greater than or equal to 100000 -```nu + +```nushell > random int 100000.. ``` Generate a random integer between 1 and 10 -```nu + +```nushell > random int 1..10 ``` diff --git a/commands/docs/random_uuid.md b/src/content/docs/commands/docs/random_uuid.md similarity index 93% rename from commands/docs/random_uuid.md rename to src/content/docs/commands/docs/random_uuid.md index bbe16868e9e..53208a861a2 100644 --- a/commands/docs/random_uuid.md +++ b/src/content/docs/commands/docs/random_uuid.md @@ -9,6 +9,7 @@ usage: | Generate a random uuid4 string. feature: default --- + # {{ $frontmatter.title }} for random @@ -17,8 +18,7 @@ feature: default ## Signature -```> random uuid {flags} ``` - +`> random uuid {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Generate a random uuid4 string -```nu + +```nushell > random uuid ``` diff --git a/commands/docs/range.md b/src/content/docs/commands/docs/range.md similarity index 85% rename from commands/docs/range.md rename to src/content/docs/commands/docs/range.md index 617bed47d10..7fb6d5ee509 100644 --- a/commands/docs/range.md +++ b/src/content/docs/commands/docs/range.md @@ -9,6 +9,7 @@ usage: | Return only the selected rows. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,23 +18,23 @@ feature: default ## Signature -```> range {flags} (rows)``` +`> range {flags} (rows)` ## Parameters - - `rows`: Range of rows to return. - +- `rows`: Range of rows to return. ## Input/output types: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | ## Examples Get the last 2 items -```nu + +```nushell > [0,1,2,3,4,5] | range 4..5 ╭───┬───╮ │ 0 │ 4 │ @@ -43,7 +44,8 @@ Get the last 2 items ``` Get the last 2 items -```nu + +```nushell > [0,1,2,3,4,5] | range (-2).. ╭───┬───╮ │ 0 │ 4 │ @@ -53,7 +55,8 @@ Get the last 2 items ``` Get the next to last 2 items -```nu + +```nushell > [0,1,2,3,4,5] | range (-3)..-2 ╭───┬───╮ │ 0 │ 3 │ diff --git a/commands/docs/reduce.md b/src/content/docs/commands/docs/reduce.md similarity index 84% rename from commands/docs/reduce.md rename to src/content/docs/commands/docs/reduce.md index df039ef08d2..e0add20d567 100644 --- a/commands/docs/reduce.md +++ b/src/content/docs/commands/docs/reduce.md @@ -9,6 +9,7 @@ usage: | Aggregate a list to a single value using an accumulator closure. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,58 +18,64 @@ feature: default ## Signature -```> reduce {flags} (closure)``` +`> reduce {flags} (closure)` ## Flags - - `--fold, -f {any}`: reduce with initial value +- `--fold, -f {any}`: reduce with initial value ## Parameters - - `closure`: Reducing function. - +- `closure`: Reducing function. ## Input/output types: -| input | output | -| --------- | ------ | +| input | output | +| ----------- | ------ | | list\ | any | -| range | any | -| table | any | +| range | any | +| table | any | + ## Examples Sum values of a list (same as 'math sum') -```nu + +```nushell > [ 1 2 3 4 ] | reduce {|it, acc| $it + $acc } 10 ``` Sum values of a list, plus their indexes -```nu + +```nushell > [ 8 7 6 ] | enumerate | reduce --fold 0 {|it, acc| $acc + $it.item + $it.index } 24 ``` Sum values with a starting value (fold) -```nu + +```nushell > [ 1 2 3 4 ] | reduce --fold 10 {|it, acc| $acc + $it } 20 ``` Replace selected characters in a string with 'X' -```nu + +```nushell > [ i o t ] | reduce --fold "Arthur, King of the Britons" {|it, acc| $acc | str replace --all $it "X" } ArXhur, KXng Xf Xhe BrXXXns ``` Add ascending numbers to each of the filenames, and join with semicolons. -```nu + +```nushell > ['foo.gz', 'bar.gz', 'baz.gz'] | enumerate | reduce --fold '' {|str all| $"($all)(if $str.index != 0 {'; '})($str.index + 1)-($str.item)" } 1-foo.gz; 2-bar.gz; 3-baz.gz ``` Concatenate a string with itself, using a range to determine the number of times. -```nu + +```nushell > let s = "Str"; 0..2 | reduce --fold '' {|it, acc| $acc + $s} StrStrStr ``` diff --git a/commands/docs/register.md b/src/content/docs/commands/docs/register.md similarity index 74% rename from commands/docs/register.md rename to src/content/docs/commands/docs/register.md index 4dc1826a9ca..46c1615657c 100644 --- a/commands/docs/register.md +++ b/src/content/docs/commands/docs/register.md @@ -9,6 +9,7 @@ usage: | Register a plugin. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,17 +18,16 @@ feature: default ## Signature -```> register {flags} (plugin) (signature)``` +`> register {flags} (plugin) (signature)` ## Flags - - `--shell, -s {path}`: path of shell used to run plugin (cmd, sh, python, etc) +- `--shell, -s {path}`: path of shell used to run plugin (cmd, sh, python, etc) ## Parameters - - `plugin`: Path of executable for plugin. - - `signature`: Block with signature description as json object. - +- `plugin`: Path of executable for plugin. +- `signature`: Block with signature description as json object. ## Input/output types: @@ -38,17 +38,20 @@ feature: default ## Examples Register `nu_plugin_query` plugin from ~/.cargo/bin/ dir -```nu + +```nushell > register ~/.cargo/bin/nu_plugin_query ``` Register `nu_plugin_query` plugin from `nu -c` (writes/updates $nu.plugin-path) -```nu + +```nushell > let plugin = ((which nu).path.0 | path dirname | path join 'nu_plugin_query'); nu -c $'register ($plugin); version' ``` ## 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 +https://www.nushell.sh/book/thinking_in_nu.html diff --git a/commands/docs/registry_query.md b/src/content/docs/commands/docs/registry_query.md similarity index 51% rename from commands/docs/registry_query.md rename to src/content/docs/commands/docs/registry_query.md index 95a3187c6ca..07ef10a9dd4 100644 --- a/commands/docs/registry_query.md +++ b/src/content/docs/commands/docs/registry_query.md @@ -8,6 +8,7 @@ system: | usage: | Query the Windows registry. --- + # {{ $frontmatter.title }} for system @@ -16,27 +17,26 @@ usage: | ## Signature -```> registry query {flags} (key) (value)``` +`> registry query {flags} (key) (value)` ## Flags - - `--hkcr, -`: query the hkey_classes_root hive - - `--hkcu, -`: query the hkey_current_user hive - - `--hklm, -`: query the hkey_local_machine hive - - `--hku, -`: query the hkey_users hive - - `--hkpd, -`: query the hkey_performance_data hive - - `--hkpt, -`: query the hkey_performance_text hive - - `--hkpnls, -`: query the hkey_performance_nls_text hive - - `--hkcc, -`: query the hkey_current_config hive - - `--hkdd, -`: query the hkey_dyn_data hive - - `--hkculs, -`: query the hkey_current_user_local_settings hive - - `--no-expand, -u`: do not expand %ENV% placeholders in REG_EXPAND_SZ +- `--hkcr, -`: query the hkey_classes_root hive +- `--hkcu, -`: query the hkey_current_user hive +- `--hklm, -`: query the hkey_local_machine hive +- `--hku, -`: query the hkey_users hive +- `--hkpd, -`: query the hkey_performance_data hive +- `--hkpt, -`: query the hkey_performance_text hive +- `--hkpnls, -`: query the hkey_performance_nls_text hive +- `--hkcc, -`: query the hkey_current_config hive +- `--hkdd, -`: query the hkey_dyn_data hive +- `--hkculs, -`: query the hkey_current_user_local_settings hive +- `--no-expand, -u`: do not expand %ENV% placeholders in REG_EXPAND_SZ ## Parameters - - `key`: registry key to query - - `value`: optionally supply a registry value to query - +- `key`: registry key to query +- `value`: optionally supply a registry value to query ## Input/output types: @@ -47,16 +47,19 @@ usage: | ## Examples Query the HKEY_CURRENT_USER hive -```nu + +```nushell > registry query --hkcu environment ``` Query the HKEY_LOCAL_MACHINE hive -```nu + +```nushell > registry query --hklm 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment' ``` ## Notes + Currently supported only on Windows systems. diff --git a/commands/docs/reject.md b/src/content/docs/commands/docs/reject.md similarity index 89% rename from commands/docs/reject.md rename to src/content/docs/commands/docs/reject.md index 582d928dca0..6015b63fe7f 100644 --- a/commands/docs/reject.md +++ b/src/content/docs/commands/docs/reject.md @@ -9,6 +9,7 @@ usage: | Remove the given columns or rows from the table. Opposite of `select`. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,16 +18,15 @@ feature: default ## Signature -```> reject {flags} ...rest``` +`> reject {flags} ...rest` ## Flags - - `--ignore-errors, -i`: ignore missing data (make all cell path members optional) +- `--ignore-errors, -i`: ignore missing data (make all cell path members optional) ## Parameters - - `...rest`: The names of columns to remove from the table. - +- `...rest`: The names of columns to remove from the table. ## Input/output types: @@ -34,16 +34,19 @@ feature: default | ------ | ------ | | record | record | | table | table | + ## Examples Reject a column in the `ls` table -```nu + +```nushell > ls | reject modified ``` Reject a column in a table -```nu + +```nushell > [[a, b]; [1, 2]] | reject a ╭───┬───╮ │ # │ b │ @@ -54,7 +57,8 @@ Reject a column in a table ``` Reject a row in a table -```nu + +```nushell > [[a, b]; [1, 2] [3, 4]] | reject 1 ╭───┬───┬───╮ │ # │ a │ b │ @@ -65,7 +69,8 @@ Reject a row in a table ``` Reject the specified field in a record -```nu + +```nushell > {a: 1, b: 2} | reject a ╭───┬───╮ │ b │ 2 │ @@ -73,7 +78,8 @@ Reject the specified field in a record ``` Reject a nested field in a record -```nu + +```nushell > {a: {b: 3, c: 5}} | reject a.b ╭───┬───────────╮ │ │ ╭───┬───╮ │ @@ -83,13 +89,15 @@ Reject a nested field in a record ``` Reject columns by a provided list of columns -```nu + +```nushell > let cols = [size type];[[name type size]; [Cargo.toml toml 1kb] [Cargo.lock toml 2kb]] | reject $cols ``` Reject columns by a list of columns directly -```nu + +```nushell > [[name type size]; [Cargo.toml toml 1kb] [Cargo.lock toml 2kb]] | reject ["size", "type"] ╭───┬────────────╮ │ # │ name │ @@ -101,10 +109,12 @@ Reject columns by a list of columns directly ``` Reject rows by a provided list of rows -```nu + +```nushell > let rows = [0 2];[[name type size]; [Cargo.toml toml 1kb] [Cargo.lock toml 2kb] [file.json json 3kb]] | reject $rows ``` ## 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`. diff --git a/commands/docs/rename.md b/src/content/docs/commands/docs/rename.md similarity index 88% rename from commands/docs/rename.md rename to src/content/docs/commands/docs/rename.md index a8237132c22..e57ffc7a8a1 100644 --- a/commands/docs/rename.md +++ b/src/content/docs/commands/docs/rename.md @@ -9,6 +9,7 @@ usage: | Creates a new table with columns renamed. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,17 +18,16 @@ feature: default ## Signature -```> rename {flags} ...rest``` +`> rename {flags} ...rest` ## 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 - - `...rest`: The new names for the columns. - +- `...rest`: The new names for the columns. ## Input/output types: @@ -35,10 +35,12 @@ feature: default | ------ | ------ | | record | record | | table | table | + ## Examples Rename a column -```nu + +```nushell > [[a, b]; [1, 2]] | rename my_column ╭───┬───────────┬───╮ │ # │ my_column │ b │ @@ -49,7 +51,8 @@ Rename a column ``` Rename many columns -```nu + +```nushell > [[a, b, c]; [1, 2, 3]] | rename eggs ham bacon ╭───┬──────┬─────┬───────╮ │ # │ eggs │ ham │ bacon │ @@ -60,7 +63,8 @@ Rename many columns ``` Rename a specific column -```nu + +```nushell > [[a, b, c]; [1, 2, 3]] | rename --column { a: ham } ╭───┬─────┬───┬───╮ │ # │ ham │ b │ c │ @@ -71,7 +75,8 @@ Rename a specific column ``` Rename the fields of a record -```nu + +```nushell > {a: 1 b: 2} | rename x y ╭───┬───╮ │ x │ 1 │ @@ -80,7 +85,8 @@ Rename the fields of a record ``` Rename fields based on a given closure -```nu + +```nushell > {abc: 1, bbc: 2} | rename --block {str replace --all 'b' 'z'} ╭─────┬───╮ │ azc │ 1 │ diff --git a/commands/docs/return.md b/src/content/docs/commands/docs/return.md similarity index 81% rename from commands/docs/return.md rename to src/content/docs/commands/docs/return.md index e1d555fffbb..6ab20510ce1 100644 --- a/commands/docs/return.md +++ b/src/content/docs/commands/docs/return.md @@ -9,6 +9,7 @@ usage: | Return early from a function. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,12 +18,11 @@ feature: default ## Signature -```> return {flags} (return_value)``` +`> return {flags} (return_value)` ## Parameters - - `return_value`: Optional value to return. - +- `return_value`: Optional value to return. ## Input/output types: @@ -33,11 +33,13 @@ feature: default ## Examples Return early -```nu + +```nushell > def foo [] { return } ``` ## 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 +https://www.nushell.sh/book/thinking_in_nu.html diff --git a/commands/docs/reverse.md b/src/content/docs/commands/docs/reverse.md similarity index 88% rename from commands/docs/reverse.md rename to src/content/docs/commands/docs/reverse.md index 71a69b4579b..5dfba064608 100644 --- a/commands/docs/reverse.md +++ b/src/content/docs/commands/docs/reverse.md @@ -9,6 +9,7 @@ usage: | Reverses the input list or table. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,19 +18,19 @@ feature: default ## Signature -```> reverse {flags} ``` - +`> reverse {flags} ` ## Input/output types: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | ## Examples Reverse a list -```nu + +```nushell > [0,1,2,3] | reverse ╭───┬───╮ │ 0 │ 3 │ @@ -41,7 +42,8 @@ Reverse a list ``` Reverse a table -```nu + +```nushell > [{a: 1} {a: 2}] | reverse ╭───┬───╮ │ # │ a │ diff --git a/commands/docs/rm.md b/src/content/docs/commands/docs/rm.md similarity index 59% rename from commands/docs/rm.md rename to src/content/docs/commands/docs/rm.md index 05d216765fd..43fe92a4655 100644 --- a/commands/docs/rm.md +++ b/src/content/docs/commands/docs/rm.md @@ -9,6 +9,7 @@ usage: | Remove files and directories. feature: default --- + # {{ $frontmatter.title }} for filesystem @@ -17,23 +18,22 @@ feature: default ## Signature -```> rm {flags} (filename) ...rest``` +`> rm {flags} (filename) ...rest` ## 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 ## Parameters - - `filename`: The file or files you want to remove. - - `...rest`: Additional file path(s) to remove. - +- `filename`: The file or files you want to remove. +- `...rest`: Additional file path(s) to remove. ## Input/output types: @@ -44,31 +44,36 @@ feature: default ## Examples Delete, or move a file to the trash (based on the 'always_trash' config option) -```nu + +```nushell > rm file.txt ``` Move a file to the trash -```nu + +```nushell > rm --trash file.txt ``` Delete a file permanently, even if the 'always_trash' config option is true -```nu + +```nushell > rm --permanent file.txt ``` Delete a file, ignoring 'file not found' errors -```nu + +```nushell > rm --force file.txt ``` Delete all 0KB files in the current directory -```nu + +```nushell > ls | where size == 0KB and type == file | each { rm $in.name } | null ``` diff --git a/commands/docs/roll.md b/src/content/docs/commands/docs/roll.md similarity index 87% rename from commands/docs/roll.md rename to src/content/docs/commands/docs/roll.md index 0f7c73a0d85..e869c842f23 100644 --- a/commands/docs/roll.md +++ b/src/content/docs/commands/docs/roll.md @@ -9,20 +9,20 @@ usage: | Rolling commands for tables. feature: extra --- + # {{ $frontmatter.title }} for filters
{{ $frontmatter.filters }}
- ::: warning - Command `roll` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `roll` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: -## Signature -```> roll {flags} ``` +## Signature +`> roll {flags} ` ## Input/output types: @@ -31,6 +31,7 @@ feature: extra | nothing | string | ## Notes + You must use one of the following subcommands. Using this command as-is will only produce this help message. ## Subcommands: @@ -40,4 +41,4 @@ You must use one of the following subcommands. Using this command as-is will onl | [`roll down`](/commands/docs/roll_down.md) | Builtin | Roll table rows down. | | [`roll left`](/commands/docs/roll_left.md) | Builtin | Roll record or table columns left. | | [`roll right`](/commands/docs/roll_right.md) | Builtin | Roll table columns right. | -| [`roll up`](/commands/docs/roll_up.md) | Builtin | Roll table rows up. | \ No newline at end of file +| [`roll up`](/commands/docs/roll_up.md) | Builtin | Roll table rows up. | diff --git a/commands/docs/roll_down.md b/src/content/docs/commands/docs/roll_down.md similarity index 79% rename from commands/docs/roll_down.md rename to src/content/docs/commands/docs/roll_down.md index 88c280f4059..f84e22f7ad9 100644 --- a/commands/docs/roll_down.md +++ b/src/content/docs/commands/docs/roll_down.md @@ -9,24 +9,24 @@ usage: | Roll table rows down. feature: extra --- + # {{ $frontmatter.title }} for filters
{{ $frontmatter.filters }}
- ::: warning - Command `roll down` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `roll down` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> roll down {flags} ``` +`> roll down {flags} ` ## Flags - - `--by, -b {int}`: Number of rows to roll - +- `--by, -b {int}`: Number of rows to roll ## Input/output types: @@ -37,7 +37,8 @@ feature: extra ## Examples Rolls rows down of a table -```nu + +```nushell > [[a b]; [1 2] [3 4] [5 6]] | roll down ╭───┬───┬───╮ │ # │ a │ b │ diff --git a/commands/docs/roll_left.md b/src/content/docs/commands/docs/roll_left.md similarity index 83% rename from commands/docs/roll_left.md rename to src/content/docs/commands/docs/roll_left.md index 48820e99280..613e2a582c8 100644 --- a/commands/docs/roll_left.md +++ b/src/content/docs/commands/docs/roll_left.md @@ -9,25 +9,25 @@ usage: | Roll record or table columns left. feature: extra --- + # {{ $frontmatter.title }} for filters
{{ $frontmatter.filters }}
- ::: warning - Command `roll left` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `roll left` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> roll left {flags} ``` +`> roll left {flags} ` ## 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: @@ -35,10 +35,12 @@ feature: extra | ------ | ------ | | record | record | | table | table | + ## Examples Rolls columns of a record to the left -```nu + +```nushell > {a:1 b:2 c:3} | roll left ╭───┬───╮ │ b │ 2 │ @@ -48,7 +50,8 @@ Rolls columns of a record to the left ``` Rolls columns of a table to the left -```nu + +```nushell > [[a b c]; [1 2 3] [4 5 6]] | roll left ╭───┬───┬───┬───╮ │ # │ b │ c │ a │ @@ -60,7 +63,8 @@ Rolls columns of a table to the left ``` Rolls columns to the left without changing column names -```nu + +```nushell > [[a b c]; [1 2 3] [4 5 6]] | roll left --cells-only ╭───┬───┬───┬───╮ │ # │ a │ b │ c │ diff --git a/commands/docs/roll_right.md b/src/content/docs/commands/docs/roll_right.md similarity index 82% rename from commands/docs/roll_right.md rename to src/content/docs/commands/docs/roll_right.md index aa013f69308..ba83316fbaf 100644 --- a/commands/docs/roll_right.md +++ b/src/content/docs/commands/docs/roll_right.md @@ -9,25 +9,25 @@ usage: | Roll table columns right. feature: extra --- + # {{ $frontmatter.title }} for filters
{{ $frontmatter.filters }}
- ::: warning - Command `roll right` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `roll right` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> roll right {flags} ``` +`> roll right {flags} ` ## 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: @@ -35,10 +35,12 @@ feature: extra | ------ | ------ | | record | record | | table | table | + ## Examples Rolls columns of a record to the right -```nu + +```nushell > {a:1 b:2 c:3} | roll right ╭───┬───╮ │ c │ 3 │ @@ -48,7 +50,8 @@ Rolls columns of a record to the right ``` Rolls columns to the right -```nu + +```nushell > [[a b c]; [1 2 3] [4 5 6]] | roll right ╭───┬───┬───┬───╮ │ # │ c │ a │ b │ @@ -60,7 +63,8 @@ Rolls columns to the right ``` Rolls columns to the right with fixed headers -```nu + +```nushell > [[a b c]; [1 2 3] [4 5 6]] | roll right --cells-only ╭───┬───┬───┬───╮ │ # │ a │ b │ c │ diff --git a/commands/docs/roll_up.md b/src/content/docs/commands/docs/roll_up.md similarity index 79% rename from commands/docs/roll_up.md rename to src/content/docs/commands/docs/roll_up.md index 8161b75192a..3a3d007bc39 100644 --- a/commands/docs/roll_up.md +++ b/src/content/docs/commands/docs/roll_up.md @@ -9,24 +9,24 @@ usage: | Roll table rows up. feature: extra --- + # {{ $frontmatter.title }} for filters
{{ $frontmatter.filters }}
- ::: warning - Command `roll up` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `roll up` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> roll up {flags} ``` +`> roll up {flags} ` ## Flags - - `--by, -b {int}`: Number of rows to roll - +- `--by, -b {int}`: Number of rows to roll ## Input/output types: @@ -37,7 +37,8 @@ feature: extra ## Examples Rolls rows up -```nu + +```nushell > [[a b]; [1 2] [3 4] [5 6]] | roll up ╭───┬───┬───╮ │ # │ a │ b │ diff --git a/commands/docs/rotate.md b/src/content/docs/commands/docs/rotate.md similarity index 92% rename from commands/docs/rotate.md rename to src/content/docs/commands/docs/rotate.md index 72a3dfb9993..0200fb18842 100644 --- a/commands/docs/rotate.md +++ b/src/content/docs/commands/docs/rotate.md @@ -9,28 +9,28 @@ usage: | Rotates a table or record clockwise (default) or counter-clockwise (use --ccw flag). feature: extra --- + # {{ $frontmatter.title }} for filters
{{ $frontmatter.filters }}
- ::: warning - Command `rotate` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `rotate` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> rotate {flags} ...rest``` +`> rotate {flags} ...rest` ## Flags - - `--ccw, -`: rotate counter clockwise +- `--ccw, -`: rotate counter clockwise ## Parameters - - `...rest`: the names to give columns once rotated - +- `...rest`: the names to give columns once rotated ## Input/output types: @@ -38,10 +38,12 @@ feature: extra | ------ | ------ | | record | table | | table | table | + ## Examples Rotate a record clockwise, producing a table (like `transpose` but with column order reversed) -```nu + +```nushell > {a:1, b:2} | rotate ╭───┬─────────┬─────────╮ │ # │ column0 │ column1 │ @@ -53,7 +55,8 @@ Rotate a record clockwise, producing a table (like `transpose` but with column o ``` Rotate 2x3 table clockwise -```nu + +```nushell > [[a b]; [1 2] [3 4] [5 6]] | rotate ╭───┬─────────┬─────────┬─────────┬─────────╮ │ # │ column0 │ column1 │ column2 │ column3 │ @@ -65,7 +68,8 @@ Rotate 2x3 table clockwise ``` Rotate table clockwise and change columns names -```nu + +```nushell > [[a b]; [1 2]] | rotate col_a col_b ╭───┬───────┬───────╮ │ # │ col_a │ col_b │ @@ -77,7 +81,8 @@ Rotate table clockwise and change columns names ``` Rotate table counter clockwise -```nu + +```nushell > [[a b]; [1 2]] | rotate --ccw ╭───┬─────────┬─────────╮ │ # │ column0 │ column1 │ @@ -89,7 +94,8 @@ Rotate table counter clockwise ``` Rotate table counter-clockwise -```nu + +```nushell > [[a b]; [1 2] [3 4] [5 6]] | rotate --ccw ╭───┬─────────┬─────────┬─────────┬─────────╮ │ # │ column0 │ column1 │ column2 │ column3 │ @@ -101,7 +107,8 @@ Rotate table counter-clockwise ``` Rotate table counter-clockwise and change columns names -```nu + +```nushell > [[a b]; [1 2]] | rotate --ccw col_a col_b ╭───┬───────┬───────╮ │ # │ col_a │ col_b │ diff --git a/commands/docs/run-external.md b/src/content/docs/commands/docs/run-external.md similarity index 62% rename from commands/docs/run-external.md rename to src/content/docs/commands/docs/run-external.md index 8296514b339..b8a662975a0 100644 --- a/commands/docs/run-external.md +++ b/src/content/docs/commands/docs/run-external.md @@ -9,6 +9,7 @@ usage: | Runs external command. feature: default --- + # {{ $frontmatter.title }} for system @@ -17,20 +18,19 @@ feature: default ## Signature -```> run-external {flags} (command) ...rest``` +`> run-external {flags} (command) ...rest` ## Flags - - `--redirect-stdout, -`: redirect stdout to the pipeline - - `--redirect-stderr, -`: redirect stderr to the pipeline - - `--redirect-combine, -`: redirect both stdout and stderr combined to the pipeline (collected in stdout) - - `--trim-end-newline, -`: trimming end newlines +- `--redirect-stdout, -`: redirect stdout to the pipeline +- `--redirect-stderr, -`: redirect stderr to the pipeline +- `--redirect-combine, -`: redirect both stdout and stderr combined to the pipeline (collected in stdout) +- `--trim-end-newline, -`: trimming end newlines ## Parameters - - `command`: External command to run. - - `...rest`: Arguments for external command. - +- `command`: External command to run. +- `...rest`: Arguments for external command. ## Input/output types: @@ -41,13 +41,15 @@ feature: default ## Examples Run an external command -```nu + +```nushell > run-external "echo" "-n" "hello" ``` Redirect stdout from an external command into the pipeline -```nu + +```nushell > run-external --redirect-stdout "echo" "-n" "hello" | split chars ``` diff --git a/commands/docs/save.md b/src/content/docs/commands/docs/save.md similarity index 71% rename from commands/docs/save.md rename to src/content/docs/commands/docs/save.md index b391b171954..71bb7b100b3 100644 --- a/commands/docs/save.md +++ b/src/content/docs/commands/docs/save.md @@ -9,6 +9,7 @@ usage: | Save a file. feature: default --- + # {{ $frontmatter.title }} for filesystem @@ -17,20 +18,19 @@ feature: default ## Signature -```> save {flags} (filename)``` +`> save {flags} (filename)` ## 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 - - `filename`: The filename to use. - +- `filename`: The filename to use. ## Input/output types: @@ -41,31 +41,36 @@ feature: default ## Examples Save a string to foo.txt in the current directory -```nu + +```nushell > 'save me' | save foo.txt ``` Append a string to the end of foo.txt -```nu + +```nushell > 'append me' | save --append foo.txt ``` Save a record to foo.json in the current directory -```nu + +```nushell > { a: 1, b: 2 } | save foo.json ``` Save a running program's stderr to foo.txt -```nu + +```nushell > do -i {} | save foo.txt --stderr foo.txt ``` Save a running program's stderr to separate file -```nu + +```nushell > do -i {} | save foo.txt --stderr bar.txt ``` diff --git a/commands/docs/schema.md b/src/content/docs/commands/docs/schema.md similarity index 94% rename from commands/docs/schema.md rename to src/content/docs/commands/docs/schema.md index 77aa78731ec..fc9a4c7b596 100644 --- a/commands/docs/schema.md +++ b/src/content/docs/commands/docs/schema.md @@ -9,6 +9,7 @@ usage: | Show the schema of a SQLite database. feature: default --- + # {{ $frontmatter.title }} for database @@ -17,8 +18,7 @@ feature: default ## Signature -```> schema {flags} ``` - +`> schema {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Show the schema of a SQLite database -```nu + +```nushell > open foo.db | schema ``` diff --git a/commands/docs/scope.md b/src/content/docs/commands/docs/scope.md similarity index 98% rename from commands/docs/scope.md rename to src/content/docs/commands/docs/scope.md index 545c01293c5..b77947a70f9 100644 --- a/commands/docs/scope.md +++ b/src/content/docs/commands/docs/scope.md @@ -9,6 +9,7 @@ usage: | Commands for getting info about what is in scope. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,8 +18,7 @@ feature: default ## Signature -```> scope {flags} ``` - +`> scope {flags} ` ## Input/output types: @@ -26,7 +26,6 @@ feature: default | ------- | ------ | | nothing | string | - ## Subcommands: | name | type | usage | @@ -36,4 +35,4 @@ feature: default | [`scope engine-stats`](/commands/docs/scope_engine-stats.md) | Builtin | Output stats on the engine in the current state. | | [`scope externs`](/commands/docs/scope_externs.md) | Builtin | Output info on the known externals in the current scope. | | [`scope modules`](/commands/docs/scope_modules.md) | Builtin | Output info on the modules in the current scope. | -| [`scope variables`](/commands/docs/scope_variables.md) | Builtin | Output info on the variables in the current scope. | \ No newline at end of file +| [`scope variables`](/commands/docs/scope_variables.md) | Builtin | Output info on the variables in the current scope. | diff --git a/commands/docs/scope_aliases.md b/src/content/docs/commands/docs/scope_aliases.md similarity index 93% rename from commands/docs/scope_aliases.md rename to src/content/docs/commands/docs/scope_aliases.md index 950375fb9cd..564d5d358db 100644 --- a/commands/docs/scope_aliases.md +++ b/src/content/docs/commands/docs/scope_aliases.md @@ -9,6 +9,7 @@ usage: | Output info on the aliases in the current scope. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,8 +18,7 @@ feature: default ## Signature -```> scope aliases {flags} ``` - +`> scope aliases {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Show the aliases in the current scope -```nu + +```nushell > scope aliases ``` diff --git a/commands/docs/scope_commands.md b/src/content/docs/commands/docs/scope_commands.md similarity index 93% rename from commands/docs/scope_commands.md rename to src/content/docs/commands/docs/scope_commands.md index 9a5a84ae577..b86c6b70918 100644 --- a/commands/docs/scope_commands.md +++ b/src/content/docs/commands/docs/scope_commands.md @@ -9,6 +9,7 @@ usage: | Output info on the commands in the current scope. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,8 +18,7 @@ feature: default ## Signature -```> scope commands {flags} ``` - +`> scope commands {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Show the commands in the current scope -```nu + +```nushell > scope commands ``` diff --git a/commands/docs/scope_engine-stats.md b/src/content/docs/commands/docs/scope_engine-stats.md similarity index 93% rename from commands/docs/scope_engine-stats.md rename to src/content/docs/commands/docs/scope_engine-stats.md index 81ede24bb8b..177fcf820f7 100644 --- a/commands/docs/scope_engine-stats.md +++ b/src/content/docs/commands/docs/scope_engine-stats.md @@ -9,6 +9,7 @@ usage: | Output stats on the engine in the current state. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,8 +18,7 @@ feature: default ## Signature -```> scope engine-stats {flags} ``` - +`> scope engine-stats {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Show the stats on the current engine state -```nu + +```nushell > scope engine-stats ``` diff --git a/commands/docs/scope_externs.md b/src/content/docs/commands/docs/scope_externs.md similarity index 94% rename from commands/docs/scope_externs.md rename to src/content/docs/commands/docs/scope_externs.md index a6bf8a045cf..8d583ad0630 100644 --- a/commands/docs/scope_externs.md +++ b/src/content/docs/commands/docs/scope_externs.md @@ -9,6 +9,7 @@ usage: | Output info on the known externals in the current scope. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,8 +18,7 @@ feature: default ## Signature -```> scope externs {flags} ``` - +`> scope externs {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Show the known externals in the current scope -```nu + +```nushell > scope externs ``` diff --git a/commands/docs/scope_modules.md b/src/content/docs/commands/docs/scope_modules.md similarity index 93% rename from commands/docs/scope_modules.md rename to src/content/docs/commands/docs/scope_modules.md index 3f0193e482a..7eed15fb089 100644 --- a/commands/docs/scope_modules.md +++ b/src/content/docs/commands/docs/scope_modules.md @@ -9,6 +9,7 @@ usage: | Output info on the modules in the current scope. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,8 +18,7 @@ feature: default ## Signature -```> scope modules {flags} ``` - +`> scope modules {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Show the modules in the current scope -```nu + +```nushell > scope modules ``` diff --git a/commands/docs/scope_variables.md b/src/content/docs/commands/docs/scope_variables.md similarity index 93% rename from commands/docs/scope_variables.md rename to src/content/docs/commands/docs/scope_variables.md index 5c7f1ec6b3d..1eb4f643942 100644 --- a/commands/docs/scope_variables.md +++ b/src/content/docs/commands/docs/scope_variables.md @@ -9,6 +9,7 @@ usage: | Output info on the variables in the current scope. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,8 +18,7 @@ feature: default ## Signature -```> scope variables {flags} ``` - +`> scope variables {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Show the variables in the current scope -```nu + +```nushell > scope variables ``` diff --git a/commands/docs/select.md b/src/content/docs/commands/docs/select.md similarity index 85% rename from commands/docs/select.md rename to src/content/docs/commands/docs/select.md index 5451bd012da..776f9b3d740 100644 --- a/commands/docs/select.md +++ b/src/content/docs/commands/docs/select.md @@ -9,6 +9,7 @@ usage: | Select only these columns or rows from the input. Opposite of `reject`. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,28 +18,29 @@ feature: default ## Signature -```> select {flags} ...rest``` +`> select {flags} ...rest` ## Flags - - `--ignore-errors, -i`: ignore missing data (make all cell path members optional) +- `--ignore-errors, -i`: ignore missing data (make all cell path members optional) ## Parameters - - `...rest`: The columns to select from the table. - +- `...rest`: The columns to select from the table. ## Input/output types: -| input | output | -| --------- | ------ | +| input | output | +| ----------- | ------ | | list\ | any | -| record | record | -| table | table | +| record | record | +| table | table | + ## Examples Select a column in a table -```nu + +```nushell > [{a: a b: b}] | select a ╭───┬───╮ │ # │ a │ @@ -49,7 +51,8 @@ Select a column in a table ``` Select a field in a record -```nu + +```nushell > {a: a b: b} | select a ╭───┬───╮ │ a │ a │ @@ -57,25 +60,29 @@ Select a field in a record ``` Select just the `name` column -```nu + +```nushell > ls | select name ``` Select the first four rows (this is the same as `first 4`) -```nu + +```nushell > ls | select 0 1 2 3 ``` Select columns by a provided list of columns -```nu + +```nushell > let cols = [name type];[[name type size]; [Cargo.toml toml 1kb] [Cargo.lock toml 2kb]] | select $cols ``` Select columns by a provided list of columns -```nu + +```nushell > [[name type size]; [Cargo.toml toml 1kb] [Cargo.lock toml 2kb]] | select ["name", "type"] ╭───┬────────────┬──────╮ │ # │ name │ type │ @@ -87,12 +94,14 @@ Select columns by a provided list of columns ``` Select rows by a provided list of rows -```nu + +```nushell > let rows = [0 2];[[name type size]; [Cargo.toml toml 1kb] [Cargo.lock toml 2kb] [file.json json 3kb]] | select $rows ``` ## Notes + This differs from `get` in that, rather than accessing the given value in the data structure, it removes all non-selected values from the structure. Hence, using `select` on a table will -produce a table, a list will produce a list, and a record will produce a record. \ No newline at end of file +produce a table, a list will produce a list, and a record will produce a record. diff --git a/commands/docs/seq.md b/src/content/docs/commands/docs/seq.md similarity index 89% rename from commands/docs/seq.md rename to src/content/docs/commands/docs/seq.md index d308789db97..84cda214282 100644 --- a/commands/docs/seq.md +++ b/src/content/docs/commands/docs/seq.md @@ -9,6 +9,7 @@ usage: | Output sequences of numbers. feature: default --- + # {{ $frontmatter.title }} for generators @@ -17,23 +18,23 @@ feature: default ## Signature -```> seq {flags} ...rest``` +`> seq {flags} ...rest` ## Parameters - - `...rest`: Sequence values. - +- `...rest`: Sequence values. ## Input/output types: -| input | output | -| ------- | ------------ | +| input | output | +| ------- | -------------- | | nothing | list\ | ## Examples sequence 1 to 10 -```nu + +```nushell > seq 1 10 ╭───┬────╮ │ 0 │ 1 │ @@ -51,7 +52,8 @@ sequence 1 to 10 ``` sequence 1.0 to 2.0 by 0.1s -```nu + +```nushell > seq 1.0 0.1 2.0 ╭────┬──────╮ │ 0 │ 1.00 │ @@ -70,15 +72,15 @@ sequence 1.0 to 2.0 by 0.1s ``` sequence 1 to 5, then convert to a string with a pipe separator -```nu + +```nushell > seq 1 5 | str join '|' ``` - ## Subcommands: | name | type | usage | | ---------------------------------------- | ------- | ------------------------------------- | | [`seq char`](/commands/docs/seq_char.md) | Builtin | Print a sequence of ASCII characters. | -| [`seq date`](/commands/docs/seq_date.md) | Builtin | Print sequences of dates. | \ No newline at end of file +| [`seq date`](/commands/docs/seq_date.md) | Builtin | Print sequences of dates. | diff --git a/commands/docs/seq_char.md b/src/content/docs/commands/docs/seq_char.md similarity index 78% rename from commands/docs/seq_char.md rename to src/content/docs/commands/docs/seq_char.md index 4d7bf92be4d..d23f03c9e4c 100644 --- a/commands/docs/seq_char.md +++ b/src/content/docs/commands/docs/seq_char.md @@ -9,6 +9,7 @@ usage: | Print a sequence of ASCII characters. feature: default --- + # {{ $frontmatter.title }} for generators @@ -17,24 +18,24 @@ feature: default ## Signature -```> seq char {flags} (start) (end)``` +`> seq char {flags} (start) (end)` ## Parameters - - `start`: Start of character sequence (inclusive). - - `end`: End of character sequence (inclusive). - +- `start`: Start of character sequence (inclusive). +- `end`: End of character sequence (inclusive). ## Input/output types: -| input | output | -| ------- | ------------ | +| input | output | +| ------- | -------------- | | nothing | list\ | ## Examples sequence a to e -```nu + +```nushell > seq char a e ╭───┬───╮ │ 0 │ a │ @@ -47,7 +48,8 @@ sequence a to e ``` sequence a to e, and put the characters in a pipe-separated string -```nu + +```nushell > seq char a e | str join '|' ``` diff --git a/commands/docs/seq_date.md b/src/content/docs/commands/docs/seq_date.md similarity index 75% rename from commands/docs/seq_date.md rename to src/content/docs/commands/docs/seq_date.md index c6aea25fbc7..0cd66f80302 100644 --- a/commands/docs/seq_date.md +++ b/src/content/docs/commands/docs/seq_date.md @@ -9,6 +9,7 @@ usage: | Print sequences of dates. feature: default --- + # {{ $frontmatter.title }} for generators @@ -17,47 +18,50 @@ feature: default ## Signature -```> seq date {flags} ``` +`> seq date {flags} ` ## 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 {int}`: increment dates by this number - - `--days, -d {int}`: number of days 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 {int}`: increment dates by this number +- `--days, -d {int}`: number of days to print +- `--reverse, -r`: print dates in reverse ## Input/output types: -| input | output | -| ------- | ------------ | +| input | output | +| ------- | -------------- | | nothing | list\ | ## Examples print the next 10 days in YYYY-MM-DD format with newline separator -```nu + +```nushell > seq date --days 10 ``` print the previous 10 days in YYYY-MM-DD format with newline separator -```nu + +```nushell > seq date --days 10 --reverse ``` print the previous 10 days starting today in MM/DD/YYYY format with newline separator -```nu + +```nushell > seq date --days 10 -o '%m/%d/%Y' --reverse ``` print the first 10 days in January, 2020 -```nu + +```nushell > seq date --begin-date '2020-01-01' --end-date '2020-01-10' ╭───┬────────────╮ │ 0 │ 2020-01-01 │ @@ -75,7 +79,8 @@ print the first 10 days in January, 2020 ``` print every fifth day between January 1st 2020 and January 31st 2020 -```nu + +```nushell > seq date --begin-date '2020-01-01' --end-date '2020-01-31' --increment 5 ╭───┬────────────╮ │ 0 │ 2020-01-01 │ diff --git a/commands/docs/shells.md b/src/content/docs/commands/docs/shells.md similarity index 92% rename from commands/docs/shells.md rename to src/content/docs/commands/docs/shells.md index 03c51b5d274..096b403c3d4 100644 --- a/commands/docs/shells.md +++ b/src/content/docs/commands/docs/shells.md @@ -15,18 +15,20 @@ usage: | ## Signature -```> shells ``` +`> shells ` ## Examples Enter a new shell at parent path '..' and show all opened shells -```nu + +```nushell > enter ..; shells ``` Show currently active shell -```nu + +```nushell > shells | where active == true ``` diff --git a/commands/docs/shuffle.md b/src/content/docs/commands/docs/shuffle.md similarity index 86% rename from commands/docs/shuffle.md rename to src/content/docs/commands/docs/shuffle.md index 2d2bb0fda54..ffcbb2e244b 100644 --- a/commands/docs/shuffle.md +++ b/src/content/docs/commands/docs/shuffle.md @@ -9,6 +9,7 @@ usage: | Shuffle rows randomly. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,19 +18,19 @@ feature: default ## Signature -```> shuffle {flags} ``` - +`> shuffle {flags} ` ## Input/output types: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | ## Examples Shuffle rows randomly (execute it several times and see the difference) -```nu + +```nushell > [[version patch]; ['1.0.0' false] ['3.0.1' true] ['2.0.0' false]] | shuffle ``` diff --git a/commands/docs/skip.md b/src/content/docs/commands/docs/skip.md similarity index 87% rename from commands/docs/skip.md rename to src/content/docs/commands/docs/skip.md index 9b3632d4e51..7d97d764a71 100644 --- a/commands/docs/skip.md +++ b/src/content/docs/commands/docs/skip.md @@ -9,6 +9,7 @@ usage: | Skip the first several rows of the input. Counterpart of `drop`. Opposite of `first`. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,23 +18,24 @@ feature: default ## Signature -```> skip {flags} (n)``` +`> skip {flags} (n)` ## Parameters - - `n`: The number of elements to skip. - +- `n`: The number of elements to skip. ## Input/output types: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | -| table | table | +| table | table | + ## Examples Skip the first value of a list -```nu + +```nushell > [2 4 6 8] | skip 1 ╭───┬───╮ │ 0 │ 4 │ @@ -44,7 +46,8 @@ Skip the first value of a list ``` Skip two rows of a table -```nu + +```nushell > [[editions]; [2015] [2018] [2021]] | skip 2 ╭───┬──────────╮ │ # │ editions │ @@ -55,6 +58,7 @@ Skip two rows of a table ``` ## Notes + To skip specific numbered rows, try `drop nth`. To skip specific named columns, try `reject`. ## Subcommands: @@ -62,4 +66,4 @@ To skip specific numbered rows, try `drop nth`. To skip specific named columns, | name | type | usage | | -------------------------------------------- | ------- | ----------------------------------------------------- | | [`skip until`](/commands/docs/skip_until.md) | Builtin | Skip elements of the input until a predicate is true. | -| [`skip while`](/commands/docs/skip_while.md) | Builtin | Skip elements of the input while a predicate is true. | \ No newline at end of file +| [`skip while`](/commands/docs/skip_while.md) | Builtin | Skip elements of the input while a predicate is true. | diff --git a/commands/docs/skip_until.md b/src/content/docs/commands/docs/skip_until.md similarity index 83% rename from commands/docs/skip_until.md rename to src/content/docs/commands/docs/skip_until.md index a0d62938423..4fef3dc17de 100644 --- a/commands/docs/skip_until.md +++ b/src/content/docs/commands/docs/skip_until.md @@ -9,6 +9,7 @@ usage: | Skip elements of the input until a predicate is true. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,23 +18,24 @@ feature: default ## Signature -```> skip until {flags} (predicate)``` +`> skip until {flags} (predicate)` ## Parameters - - `predicate`: The predicate that skipped element must not match. - +- `predicate`: The predicate that skipped element must not match. ## Input/output types: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | -| table | table | +| table | table | + ## Examples Skip until the element is positive -```nu + +```nushell > [-2 0 2 -1] | skip until {|x| $x > 0 } ╭───┬────╮ │ 0 │ 2 │ @@ -43,7 +45,8 @@ Skip until the element is positive ``` Skip until the element is positive using stored condition -```nu + +```nushell > let cond = {|x| $x > 0 }; [-2 0 2 -1] | skip until $cond ╭───┬────╮ │ 0 │ 2 │ @@ -53,7 +56,8 @@ Skip until the element is positive using stored condition ``` Skip until the field value is positive -```nu + +```nushell > [{a: -2} {a: 0} {a: 2} {a: -1}] | skip until {|x| $x.a > 0 } ╭───┬────╮ │ # │ a │ diff --git a/commands/docs/skip_while.md b/src/content/docs/commands/docs/skip_while.md similarity index 84% rename from commands/docs/skip_while.md rename to src/content/docs/commands/docs/skip_while.md index b893ef16254..ff241d81cef 100644 --- a/commands/docs/skip_while.md +++ b/src/content/docs/commands/docs/skip_while.md @@ -9,6 +9,7 @@ usage: | Skip elements of the input while a predicate is true. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,23 +18,24 @@ feature: default ## Signature -```> skip while {flags} (predicate)``` +`> skip while {flags} (predicate)` ## Parameters - - `predicate`: The predicate that skipped element must match. - +- `predicate`: The predicate that skipped element must match. ## Input/output types: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | -| table | table | +| table | table | + ## Examples Skip while the element is negative -```nu + +```nushell > [-2 0 2 -1] | skip while {|x| $x < 0 } ╭───┬────╮ │ 0 │ 0 │ @@ -44,7 +46,8 @@ Skip while the element is negative ``` Skip while the element is negative using stored condition -```nu + +```nushell > let cond = {|x| $x < 0 }; [-2 0 2 -1] | skip while $cond ╭───┬────╮ │ 0 │ 0 │ @@ -55,7 +58,8 @@ Skip while the element is negative using stored condition ``` Skip while the field value is negative -```nu + +```nushell > [{a: -2} {a: 0} {a: 2} {a: -1}] | skip while {|x| $x.a < 0 } ╭───┬────╮ │ # │ a │ diff --git a/commands/docs/sleep.md b/src/content/docs/commands/docs/sleep.md similarity index 83% rename from commands/docs/sleep.md rename to src/content/docs/commands/docs/sleep.md index daf5d75260d..f5b197d2313 100644 --- a/commands/docs/sleep.md +++ b/src/content/docs/commands/docs/sleep.md @@ -9,6 +9,7 @@ usage: | Delay for a specified amount of time. feature: default --- + # {{ $frontmatter.title }} for platform @@ -17,13 +18,12 @@ feature: default ## Signature -```> sleep {flags} (duration) ...rest``` +`> sleep {flags} (duration) ...rest` ## Parameters - - `duration`: Time to sleep. - - `...rest`: Additional time. - +- `duration`: Time to sleep. +- `...rest`: Additional time. ## Input/output types: @@ -34,19 +34,22 @@ feature: default ## Examples Sleep for 1sec -```nu + +```nushell > sleep 1sec ``` Sleep for 3sec -```nu + +```nushell > sleep 1sec 1sec 1sec ``` Send output after 1sec -```nu + +```nushell > sleep 1sec; echo done ``` diff --git a/commands/docs/sort-by.md b/src/content/docs/commands/docs/sort-by.md similarity index 72% rename from commands/docs/sort-by.md rename to src/content/docs/commands/docs/sort-by.md index 94445b19157..62c8d4c382e 100644 --- a/commands/docs/sort-by.md +++ b/src/content/docs/commands/docs/sort-by.md @@ -9,6 +9,7 @@ usage: | Sort by the given columns, in increasing order. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,42 +18,45 @@ feature: default ## Signature -```> sort-by {flags} ...rest``` +`> sort-by {flags} ...rest` ## Flags - - `--reverse, -r`: Sort in reverse order - - `--ignore-case, -i`: Sort string-based columns case-insensitively - - `--natural, -n`: Sort alphanumeric string-based columns naturally (1, 9, 10, 99, 100, ...) +- `--reverse, -r`: Sort in reverse order +- `--ignore-case, -i`: Sort string-based columns case-insensitively +- `--natural, -n`: Sort alphanumeric string-based columns naturally (1, 9, 10, 99, 100, ...) ## Parameters - - `...rest`: The column(s) to sort by. - +- `...rest`: The column(s) to sort by. ## Input/output types: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | -| record | table | -| table | table | +| record | table | +| table | table | + ## Examples Sort files by modified date -```nu + +```nushell > ls | sort-by modified ``` Sort files by name (case-insensitive) -```nu + +```nushell > ls | sort-by name --ignore-case ``` Sort a table by a column (reversed order) -```nu + +```nushell > [[fruit count]; [apple 9] [pear 3] [orange 7]] | sort-by fruit --reverse ╭───┬────────┬───────╮ │ # │ fruit │ count │ diff --git a/commands/docs/sort.md b/src/content/docs/commands/docs/sort.md similarity index 79% rename from commands/docs/sort.md rename to src/content/docs/commands/docs/sort.md index f389c3f109f..ea48e5aa659 100644 --- a/commands/docs/sort.md +++ b/src/content/docs/commands/docs/sort.md @@ -9,6 +9,7 @@ usage: | Sort in increasing order. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,26 +18,27 @@ feature: default ## Signature -```> sort {flags} ``` +`> sort {flags} ` ## 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: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | -| record | record | +| record | record | + ## Examples sort the list by increasing value -```nu + +```nushell > [2 0 1] | sort ╭───┬───╮ │ 0 │ 0 │ @@ -47,7 +49,8 @@ sort the list by increasing value ``` sort the list by decreasing value -```nu + +```nushell > [2 0 1] | sort --reverse ╭───┬───╮ │ 0 │ 2 │ @@ -58,7 +61,8 @@ sort the list by decreasing value ``` sort a list of strings -```nu + +```nushell > [betty amy sarah] | sort ╭───┬───────╮ │ 0 │ amy │ @@ -69,7 +73,8 @@ sort a list of strings ``` sort a list of strings in reverse -```nu + +```nushell > [betty amy sarah] | sort --reverse ╭───┬───────╮ │ 0 │ sarah │ @@ -80,7 +85,8 @@ sort a list of strings in reverse ``` Sort strings (case-insensitive) -```nu + +```nushell > [airplane Truck Car] | sort -i ╭───┬──────────╮ │ 0 │ airplane │ @@ -91,7 +97,8 @@ Sort strings (case-insensitive) ``` Sort strings (reversed case-insensitive) -```nu + +```nushell > [airplane Truck Car] | sort -i -r ╭───┬──────────╮ │ 0 │ Truck │ @@ -102,7 +109,8 @@ Sort strings (reversed case-insensitive) ``` Sort record by key (case-insensitive) -```nu + +```nushell > {b: 3, a: 4} | sort ╭───┬───╮ │ a │ 4 │ @@ -111,7 +119,8 @@ Sort record by key (case-insensitive) ``` Sort record by value -```nu + +```nushell > {b: 4, a: 3, c:1} | sort -v ╭───┬───╮ │ c │ 1 │ diff --git a/commands/docs/source-env.md b/src/content/docs/commands/docs/source-env.md similarity index 84% rename from commands/docs/source-env.md rename to src/content/docs/commands/docs/source-env.md index f6fa557078c..da8199e3467 100644 --- a/commands/docs/source-env.md +++ b/src/content/docs/commands/docs/source-env.md @@ -9,6 +9,7 @@ usage: | Source the environment from a source file into the current environment. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,12 +18,11 @@ feature: default ## Signature -```> source-env {flags} (filename)``` +`> source-env {flags} (filename)` ## Parameters - - `filename`: The filepath to the script file to source the environment from. - +- `filename`: The filepath to the script file to source the environment from. ## Input/output types: @@ -33,7 +33,8 @@ feature: default ## Examples Sources the environment from foo.nu in the current context -```nu + +```nushell > source-env foo.nu ``` diff --git a/commands/docs/source.md b/src/content/docs/commands/docs/source.md similarity index 83% rename from commands/docs/source.md rename to src/content/docs/commands/docs/source.md index c30cecb17ad..e1a5d161c77 100644 --- a/commands/docs/source.md +++ b/src/content/docs/commands/docs/source.md @@ -9,6 +9,7 @@ usage: | Runs a script file in the current context. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,12 +18,11 @@ feature: default ## Signature -```> source {flags} (filename)``` +`> source {flags} (filename)` ## Parameters - - `filename`: The filepath to the script file to source. - +- `filename`: The filepath to the script file to source. ## Input/output types: @@ -33,17 +33,20 @@ feature: default ## Examples Runs foo.nu in the current context -```nu + +```nushell > source foo.nu ``` Runs foo.nu in current context and call the command defined, suppose foo.nu has content: `def say-hi [] { echo 'Hi!' }` -```nu + +```nushell > source ./foo.nu; say-hi ``` ## 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 +https://www.nushell.sh/book/thinking_in_nu.html diff --git a/commands/docs/split-by.md b/src/content/docs/commands/docs/split-by.md similarity index 97% rename from commands/docs/split-by.md rename to src/content/docs/commands/docs/split-by.md index de1be154d39..e6f8c81eafd 100644 --- a/commands/docs/split-by.md +++ b/src/content/docs/commands/docs/split-by.md @@ -9,6 +9,7 @@ usage: | Split a record into groups. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,12 +18,11 @@ feature: default ## Signature -```> split-by {flags} (splitter)``` +`> split-by {flags} (splitter)` ## Parameters - - `splitter`: The splitter value to use. - +- `splitter`: The splitter value to use. ## Input/output types: @@ -33,7 +33,8 @@ feature: default ## Examples split items by column named "lang" -```nu + +```nushell > { '2019': [ { name: 'andres', lang: 'rb', year: '2019' }, diff --git a/commands/docs/split.md b/src/content/docs/commands/docs/split.md similarity index 95% rename from commands/docs/split.md rename to src/content/docs/commands/docs/split.md index e8c807fd919..bea4bdd49fd 100644 --- a/commands/docs/split.md +++ b/src/content/docs/commands/docs/split.md @@ -9,6 +9,7 @@ usage: | Split contents across desired subcommand (like row, column) via the separator. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,8 +18,7 @@ feature: default ## Signature -```> split {flags} ``` - +`> split {flags} ` ## Input/output types: @@ -27,6 +27,7 @@ feature: default | nothing | string | ## Notes + You must use one of the following subcommands. Using this command as-is will only produce this help message. ## Subcommands: @@ -37,4 +38,4 @@ You must use one of the following subcommands. Using this command as-is will onl | [`split column`](/commands/docs/split_column.md) | Builtin | Split a string into multiple columns using a separator. | | [`split list`](/commands/docs/split_list.md) | Builtin | Split a list into multiple lists using a separator. | | [`split row`](/commands/docs/split_row.md) | Builtin | Split a string into multiple rows using a separator. | -| [`split words`](/commands/docs/split_words.md) | Builtin | Split a string's words into separate rows. | \ No newline at end of file +| [`split words`](/commands/docs/split_words.md) | Builtin | Split a string's words into separate rows. | diff --git a/commands/docs/split_chars.md b/src/content/docs/commands/docs/split_chars.md similarity index 82% rename from commands/docs/split_chars.md rename to src/content/docs/commands/docs/split_chars.md index 4c210216869..6a300e57763 100644 --- a/commands/docs/split_chars.md +++ b/src/content/docs/commands/docs/split_chars.md @@ -9,6 +9,7 @@ usage: | Split a string into a list of characters. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,24 +18,25 @@ feature: default ## Signature -```> split chars {flags} ``` +`> split chars {flags} ` ## 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: -| input | output | -| ------------ | ------------------ | +| input | output | +| -------------- | ---------------------- | | list\ | list\\> | -| string | list\ | +| string | list\ | + ## Examples Split the string into a list of characters -```nu + +```nushell > 'hello' | split chars ╭───┬───╮ │ 0 │ h │ @@ -47,7 +49,8 @@ Split the string into a list of characters ``` Split on grapheme clusters -```nu + +```nushell > '🇯🇵ほげ' | split chars --grapheme-clusters ╭───┬────╮ │ 0 │ 🇯🇵 │ @@ -58,7 +61,8 @@ Split on grapheme clusters ``` Split multiple strings into lists of characters -```nu + +```nushell > ['hello', 'world'] | split chars ╭───┬───────────╮ │ 0 │ ╭───┬───╮ │ diff --git a/commands/docs/split_column.md b/src/content/docs/commands/docs/split_column.md similarity index 85% rename from commands/docs/split_column.md rename to src/content/docs/commands/docs/split_column.md index 98eb62cd299..f23694fe210 100644 --- a/commands/docs/split_column.md +++ b/src/content/docs/commands/docs/split_column.md @@ -9,6 +9,7 @@ usage: | Split a string into multiple columns using a separator. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,29 +18,30 @@ feature: default ## Signature -```> split column {flags} (separator) ...rest``` +`> split column {flags} (separator) ...rest` ## Flags - - `--collapse-empty, -c`: remove empty columns - - `--regex, -r`: separator is a regular expression +- `--collapse-empty, -c`: remove empty columns +- `--regex, -r`: separator is a regular expression ## Parameters - - `separator`: The character or string that denotes what separates columns. - - `...rest`: Column names to give the new columns. - +- `separator`: The character or string that denotes what separates columns. +- `...rest`: Column names to give the new columns. ## Input/output types: -| input | output | -| ------------ | ------ | +| input | output | +| -------------- | ------ | | list\ | table | -| string | table | +| string | table | + ## Examples Split a string into columns by the specified separator -```nu + +```nushell > 'a--b--c' | split column '--' ╭───┬─────────┬─────────┬─────────╮ │ # │ column1 │ column2 │ column3 │ @@ -50,7 +52,8 @@ Split a string into columns by the specified separator ``` Split a string into columns of char and remove the empty columns -```nu + +```nushell > 'abc' | split column --collapse-empty '' ╭───┬─────────┬─────────┬─────────╮ │ # │ column1 │ column2 │ column3 │ @@ -61,7 +64,8 @@ Split a string into columns of char and remove the empty columns ``` Split a list of strings into a table -```nu + +```nushell > ['a-b' 'c-d'] | split column - ╭───┬─────────┬─────────╮ │ # │ column1 │ column2 │ @@ -73,7 +77,8 @@ Split a list of strings into a table ``` Split a list of strings into a table, ignoring padding -```nu + +```nushell > ['a - b' 'c - d'] | split column --regex '\s*-\s*' ╭───┬─────────┬─────────╮ │ # │ column1 │ column2 │ diff --git a/commands/docs/split_list.md b/src/content/docs/commands/docs/split_list.md similarity index 90% rename from commands/docs/split_list.md rename to src/content/docs/commands/docs/split_list.md index fe55b097d68..330817dfbad 100644 --- a/commands/docs/split_list.md +++ b/src/content/docs/commands/docs/split_list.md @@ -9,6 +9,7 @@ usage: | Split a list into multiple lists using a separator. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,27 +18,27 @@ feature: default ## Signature -```> split list {flags} (separator)``` +`> split list {flags} (separator)` ## Flags - - `--regex, -r`: separator is a regular expression, matching values that can be coerced into a string +- `--regex, -r`: separator is a regular expression, matching values that can be coerced into a string ## Parameters - - `separator`: The value that denotes what separates the list. - +- `separator`: The value that denotes what separates the list. ## Input/output types: -| input | output | -| --------- | --------------- | +| input | output | +| ----------- | ------------------- | | list\ | list\\> | ## Examples Split a list of chars into two lists -```nu + +```nushell > [a, b, c, d, e, f, g] | split list d ╭───┬───────────╮ │ 0 │ ╭───┬───╮ │ @@ -55,7 +56,8 @@ Split a list of chars into two lists ``` Split a list of lists into two lists of lists -```nu + +```nushell > [[1,2], [2,3], [3,4]] | split list [2,3] ╭───┬───────────────────╮ │ 0 │ ╭───┬───────────╮ │ @@ -75,7 +77,8 @@ Split a list of lists into two lists of lists ``` Split a list of chars into two lists -```nu + +```nushell > [a, b, c, d, a, e, f, g] | split list a ╭───┬───────────╮ │ 0 │ ╭───┬───╮ │ @@ -93,7 +96,8 @@ Split a list of chars into two lists ``` Split a list of chars into lists based on multiple characters -```nu + +```nushell > [a, b, c, d, a, e, f, g] | split list --regex '(b|e)' ╭───┬───────────╮ │ 0 │ ╭───┬───╮ │ diff --git a/commands/docs/split_row.md b/src/content/docs/commands/docs/split_row.md similarity index 78% rename from commands/docs/split_row.md rename to src/content/docs/commands/docs/split_row.md index fd2f7a52b99..a347cd8ec5b 100644 --- a/commands/docs/split_row.md +++ b/src/content/docs/commands/docs/split_row.md @@ -9,6 +9,7 @@ usage: | Split a string into multiple rows using a separator. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,28 +18,29 @@ feature: default ## Signature -```> split row {flags} (separator)``` +`> split row {flags} (separator)` ## 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 - - `separator`: A character or regex that denotes what separates rows. - +- `separator`: A character or regex that denotes what separates rows. ## Input/output types: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| string | list\ | +| string | list\ | + ## Examples Split a string into rows of char -```nu + +```nushell > 'abc' | split row '' ╭───┬───╮ │ 0 │ │ @@ -51,7 +53,8 @@ Split a string into rows of char ``` Split a string into rows by the specified separator -```nu + +```nushell > 'a--b--c' | split row '--' ╭───┬───╮ │ 0 │ a │ @@ -62,7 +65,8 @@ Split a string into rows by the specified separator ``` Split a string by '-' -```nu + +```nushell > '-a-b-c-' | split row '-' ╭───┬───╮ │ 0 │ │ @@ -75,7 +79,8 @@ Split a string by '-' ``` Split a string by regex -```nu + +```nushell > 'a b c' | split row -r '\s+' ╭───┬───╮ │ 0 │ a │ diff --git a/commands/docs/split_words.md b/src/content/docs/commands/docs/split_words.md similarity index 73% rename from commands/docs/split_words.md rename to src/content/docs/commands/docs/split_words.md index 4f28dd49980..33ea03b8d7c 100644 --- a/commands/docs/split_words.md +++ b/src/content/docs/commands/docs/split_words.md @@ -9,6 +9,7 @@ usage: | Split a string's words into separate rows. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,25 +18,26 @@ feature: default ## Signature -```> split words {flags} ``` +`> split words {flags} ` ## 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: -| input | output | -| ------------ | ------------------ | +| input | output | +| -------------- | ---------------------- | | list\ | list\\> | -| string | list\ | +| string | list\ | + ## Examples Split the string's words into separate rows -```nu + +```nushell > 'hello world' | split words ╭───┬───────╮ │ 0 │ hello │ @@ -45,7 +47,8 @@ Split the string's words into separate rows ``` Split the string's words, of at least 3 characters, into separate rows -```nu + +```nushell > 'hello to the world' | split words --min-word-length 3 ╭───┬───────╮ │ 0 │ hello │ @@ -56,7 +59,8 @@ Split the string's words, of at least 3 characters, into separate rows ``` A real-world example of splitting words -```nu + +```nushell > 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/src/content/docs/commands/docs/start.md similarity index 89% rename from commands/docs/start.md rename to src/content/docs/commands/docs/start.md index 84a08e6ffb5..7fb1e060030 100644 --- a/commands/docs/start.md +++ b/src/content/docs/commands/docs/start.md @@ -9,6 +9,7 @@ usage: | Open a folder, file or website in the default application or viewer. feature: default --- + # {{ $frontmatter.title }} for filesystem @@ -17,12 +18,11 @@ feature: default ## Signature -```> start {flags} (path)``` +`> start {flags} (path)` ## Parameters - - `path`: Path to open. - +- `path`: Path to open. ## Input/output types: @@ -30,34 +30,40 @@ feature: default | ------- | ------ | | nothing | any | | string | any | + ## Examples Open a text file with the default text editor -```nu + +```nushell > start file.txt ``` Open an image with the default image viewer -```nu + +```nushell > start file.jpg ``` Open the current directory with the default file manager -```nu + +```nushell > start . ``` Open a pdf with the default pdf viewer -```nu + +```nushell > start file.pdf ``` Open a website with default browser -```nu + +```nushell > start https://www.nushell.sh ``` diff --git a/commands/docs/stor.md b/src/content/docs/commands/docs/stor.md similarity index 98% rename from commands/docs/stor.md rename to src/content/docs/commands/docs/stor.md index 7159d39922c..1e976a94b22 100644 --- a/commands/docs/stor.md +++ b/src/content/docs/commands/docs/stor.md @@ -9,6 +9,7 @@ usage: | Various commands for working with the in-memory sqlite database. feature: default --- + # {{ $frontmatter.title }} for database @@ -17,8 +18,7 @@ feature: default ## Signature -```> stor {flags} ``` - +`> stor {flags} ` ## Input/output types: @@ -27,6 +27,7 @@ feature: default | nothing | string | ## Notes + You must use one of the following subcommands. Using this command as-is will only produce this help message. ## Subcommands: @@ -40,4 +41,4 @@ You must use one of the following subcommands. Using this command as-is will onl | [`stor insert`](/commands/docs/stor_insert.md) | Builtin | Insert information into a specified table in the in-memory sqlite database. | | [`stor open`](/commands/docs/stor_open.md) | Builtin | Opens the in-memory sqlite database. | | [`stor reset`](/commands/docs/stor_reset.md) | Builtin | Reset the in-memory database by dropping all tables. | -| [`stor update`](/commands/docs/stor_update.md) | Builtin | Update information in a specified table in the in-memory sqlite database. | \ No newline at end of file +| [`stor update`](/commands/docs/stor_update.md) | Builtin | Update information in a specified table in the in-memory sqlite database. | diff --git a/commands/docs/stor_create.md b/src/content/docs/commands/docs/stor_create.md similarity index 81% rename from commands/docs/stor_create.md rename to src/content/docs/commands/docs/stor_create.md index 82eed2d9f91..5bf345bc070 100644 --- a/commands/docs/stor_create.md +++ b/src/content/docs/commands/docs/stor_create.md @@ -9,6 +9,7 @@ usage: | Create a table in the in-memory sqlite database. feature: default --- + # {{ $frontmatter.title }} for database @@ -17,13 +18,12 @@ feature: default ## Signature -```> stor create {flags} ``` +`> stor create {flags} ` ## 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: @@ -34,7 +34,8 @@ feature: default ## Examples Create an in-memory sqlite database with specified table name, column names, and column data types -```nu + +```nushell > stor create --table-name nudb --columns {bool1: bool, int1: int, float1: float, str1: str, datetime1: datetime} ``` diff --git a/commands/docs/stor_delete.md b/src/content/docs/commands/docs/stor_delete.md similarity index 79% rename from commands/docs/stor_delete.md rename to src/content/docs/commands/docs/stor_delete.md index ceafe50ee4f..68e5f067d3f 100644 --- a/commands/docs/stor_delete.md +++ b/src/content/docs/commands/docs/stor_delete.md @@ -9,6 +9,7 @@ usage: | Delete a table or specified rows in the in-memory sqlite database. feature: default --- + # {{ $frontmatter.title }} for database @@ -17,13 +18,12 @@ feature: default ## Signature -```> stor delete {flags} ``` +`> stor delete {flags} ` ## Flags - - `--table-name, -t {string}`: name of the table you want to insert into - - `--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 +- `--where-clause, -w {string}`: a sql string to use as a where clause without the WHERE keyword ## Input/output types: @@ -34,13 +34,15 @@ feature: default ## Examples Delete a table from the in-memory sqlite database -```nu + +```nushell > stor delete --table-name nudb ``` Delete some rows from the in-memory sqlite database with a where clause -```nu + +```nushell > stor delete --table-name nudb --where-clause "int1 == 5" ``` diff --git a/commands/docs/stor_export.md b/src/content/docs/commands/docs/stor_export.md similarity index 85% rename from commands/docs/stor_export.md rename to src/content/docs/commands/docs/stor_export.md index b19f1e0a5ee..e48a671e280 100644 --- a/commands/docs/stor_export.md +++ b/src/content/docs/commands/docs/stor_export.md @@ -9,6 +9,7 @@ usage: | Export the in-memory sqlite database to a sqlite database file. feature: default --- + # {{ $frontmatter.title }} for database @@ -17,12 +18,11 @@ feature: default ## Signature -```> stor export {flags} ``` +`> stor export {flags} ` ## 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: @@ -33,7 +33,8 @@ feature: default ## Examples Export the in-memory sqlite database -```nu + +```nushell > stor export --file-name nudb.sqlite ``` diff --git a/commands/docs/stor_import.md b/src/content/docs/commands/docs/stor_import.md similarity index 85% rename from commands/docs/stor_import.md rename to src/content/docs/commands/docs/stor_import.md index 14b4dd85d90..22054d10bcd 100644 --- a/commands/docs/stor_import.md +++ b/src/content/docs/commands/docs/stor_import.md @@ -9,6 +9,7 @@ usage: | Import a sqlite database file into the in-memory sqlite database. feature: default --- + # {{ $frontmatter.title }} for database @@ -17,12 +18,11 @@ feature: default ## Signature -```> stor import {flags} ``` +`> stor import {flags} ` ## 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: @@ -33,7 +33,8 @@ feature: default ## Examples Import a sqlite database file into the in-memory sqlite database -```nu + +```nushell > stor import --file-name nudb.sqlite ``` diff --git a/commands/docs/stor_insert.md b/src/content/docs/commands/docs/stor_insert.md similarity index 79% rename from commands/docs/stor_insert.md rename to src/content/docs/commands/docs/stor_insert.md index f61a6db5663..5499d4dbe4a 100644 --- a/commands/docs/stor_insert.md +++ b/src/content/docs/commands/docs/stor_insert.md @@ -9,6 +9,7 @@ usage: | Insert information into a specified table in the in-memory sqlite database. feature: default --- + # {{ $frontmatter.title }} for database @@ -17,13 +18,12 @@ feature: default ## Signature -```> stor insert {flags} ``` +`> stor insert {flags} ` ## 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: @@ -34,7 +34,8 @@ feature: default ## Examples Insert data the in-memory sqlite database using a data-record of column-name and column-value pairs -```nu + +```nushell > stor insert --table-name nudb --data-record {bool1: true, int1: 5, float1: 1.1, str1: fdncred, datetime1: 2023-04-17} ``` diff --git a/commands/docs/stor_open.md b/src/content/docs/commands/docs/stor_open.md similarity index 94% rename from commands/docs/stor_open.md rename to src/content/docs/commands/docs/stor_open.md index 2c48dd209db..6af004628a9 100644 --- a/commands/docs/stor_open.md +++ b/src/content/docs/commands/docs/stor_open.md @@ -9,6 +9,7 @@ usage: | Opens the in-memory sqlite database. feature: default --- + # {{ $frontmatter.title }} for database @@ -17,8 +18,7 @@ feature: default ## Signature -```> stor open {flags} ``` - +`> stor open {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Open the in-memory sqlite database -```nu + +```nushell > stor open ``` diff --git a/commands/docs/stor_reset.md b/src/content/docs/commands/docs/stor_reset.md similarity index 94% rename from commands/docs/stor_reset.md rename to src/content/docs/commands/docs/stor_reset.md index 092829a0d08..6c4fe2cc1d6 100644 --- a/commands/docs/stor_reset.md +++ b/src/content/docs/commands/docs/stor_reset.md @@ -9,6 +9,7 @@ usage: | Reset the in-memory database by dropping all tables. feature: default --- + # {{ $frontmatter.title }} for database @@ -17,8 +18,7 @@ feature: default ## Signature -```> stor reset {flags} ``` - +`> stor reset {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Reset the in-memory sqlite database -```nu + +```nushell > stor reset ``` diff --git a/commands/docs/stor_update.md b/src/content/docs/commands/docs/stor_update.md similarity index 73% rename from commands/docs/stor_update.md rename to src/content/docs/commands/docs/stor_update.md index 46370ce30ad..6944868176d 100644 --- a/commands/docs/stor_update.md +++ b/src/content/docs/commands/docs/stor_update.md @@ -9,6 +9,7 @@ usage: | Update information in a specified table in the in-memory sqlite database. feature: default --- + # {{ $frontmatter.title }} for database @@ -17,14 +18,13 @@ feature: default ## Signature -```> stor update {flags} ``` +`> stor update {flags} ` ## 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: @@ -35,13 +35,15 @@ feature: default ## Examples Update the in-memory sqlite database -```nu + +```nushell > stor update --table-name nudb --update-record {str1: nushell datetime1: 2020-04-17} ``` Update the in-memory sqlite database with a where clause -```nu + +```nushell > stor update --table-name nudb --update-record {str1: nushell datetime1: 2020-04-17} --where-clause "bool1 = 1" ``` diff --git a/commands/docs/str.md b/src/content/docs/commands/docs/str.md similarity index 97% rename from commands/docs/str.md rename to src/content/docs/commands/docs/str.md index e02b3674369..e4f61d48af3 100644 --- a/commands/docs/str.md +++ b/src/content/docs/commands/docs/str.md @@ -9,20 +9,20 @@ usage: | Various commands for working with string data. feature: extra --- + # {{ $frontmatter.title }} for strings
{{ $frontmatter.strings }}
- ::: warning - Command `str` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `str` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: -## Signature -```> str {flags} ``` +## Signature +`> str {flags} ` ## Input/output types: @@ -31,6 +31,7 @@ feature: extra | nothing | string | ## Notes + You must use one of the following subcommands. Using this command as-is will only produce this help message. ## Subcommands: @@ -59,4 +60,4 @@ You must use one of the following subcommands. Using this command as-is will onl | [`str substring`](/commands/docs/str_substring.md) | Builtin | Get part of a string. Note that the start is included but the end is excluded, and that the first character of a string is index 0. | | [`str title-case`](/commands/docs/str_title-case.md) | Builtin | Convert a string to Title Case. | | [`str trim`](/commands/docs/str_trim.md) | Builtin | Trim whitespace or specific character. | -| [`str upcase`](/commands/docs/str_upcase.md) | Builtin | Make text uppercase. | \ No newline at end of file +| [`str upcase`](/commands/docs/str_upcase.md) | Builtin | Make text uppercase. | diff --git a/commands/docs/str_camel-case.md b/src/content/docs/commands/docs/str_camel-case.md similarity index 70% rename from commands/docs/str_camel-case.md rename to src/content/docs/commands/docs/str_camel-case.md index 7a2e7e8bdc6..af6c3f2144a 100644 --- a/commands/docs/str_camel-case.md +++ b/src/content/docs/commands/docs/str_camel-case.md @@ -9,55 +9,60 @@ usage: | Convert a string to camelCase. feature: extra --- + # {{ $frontmatter.title }} for strings
{{ $frontmatter.strings }}
- ::: warning - Command `str camel-case` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `str camel-case` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> str camel-case {flags} ...rest``` +`> str camel-case {flags} ...rest` ## Parameters - - `...rest`: For a data structure input, convert strings at the given cell paths - +- `...rest`: For a data structure input, convert strings at the given cell paths ## Input/output types: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| record | record | -| string | string | -| table | table | +| record | record | +| string | string | +| table | table | + ## Examples convert a string to camelCase -```nu + +```nushell > 'NuShell' | str camel-case nuShell ``` convert a string to camelCase -```nu + +```nushell > 'this-is-the-first-case' | str camel-case thisIsTheFirstCase ``` convert a string to camelCase -```nu + +```nushell > 'this_is_the_second_case' | str camel-case thisIsTheSecondCase ``` convert a column from a table to camelCase -```nu + +```nushell > [[lang, gems]; [nu_test, 100]] | str camel-case lang ╭───┬────────┬──────╮ │ # │ lang │ gems │ diff --git a/commands/docs/str_capitalize.md b/src/content/docs/commands/docs/str_capitalize.md similarity index 74% rename from commands/docs/str_capitalize.md rename to src/content/docs/commands/docs/str_capitalize.md index a874ba7f5bd..1ba1a1f7afa 100644 --- a/commands/docs/str_capitalize.md +++ b/src/content/docs/commands/docs/str_capitalize.md @@ -9,6 +9,7 @@ usage: | Capitalize first letter of text. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,37 +18,40 @@ feature: default ## Signature -```> str capitalize {flags} ...rest``` +`> str capitalize {flags} ...rest` ## Parameters - - `...rest`: For a data structure input, convert strings at the given cell paths. - +- `...rest`: For a data structure input, convert strings at the given cell paths. ## Input/output types: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| record | record | -| string | string | -| table | table | +| record | record | +| string | string | +| table | table | + ## Examples Capitalize contents -```nu + +```nushell > 'good day' | str capitalize Good day ``` Capitalize contents -```nu + +```nushell > 'anton' | str capitalize Anton ``` Capitalize a column in a table -```nu + +```nushell > [[lang, gems]; [nu_test, 100]] | str capitalize lang ╭───┬─────────┬──────╮ │ # │ lang │ gems │ diff --git a/commands/docs/str_contains.md b/src/content/docs/commands/docs/str_contains.md similarity index 80% rename from commands/docs/str_contains.md rename to src/content/docs/commands/docs/str_contains.md index 47e3826473d..a8782e23c69 100644 --- a/commands/docs/str_contains.md +++ b/src/content/docs/commands/docs/str_contains.md @@ -9,6 +9,7 @@ usage: | Checks if string input contains a substring. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,43 +18,46 @@ feature: default ## Signature -```> str contains {flags} (string) ...rest``` +`> str contains {flags} (string) ...rest` ## Flags - - `--ignore-case, -i`: search is case insensitive - - `--not, -n`: does not contain +- `--ignore-case, -i`: search is case insensitive +- `--not, -n`: does not contain ## Parameters - - `string`: The substring to find. - - `...rest`: For a data structure input, check strings at the given cell paths, and replace with result. - +- `string`: The substring to find. +- `...rest`: For a data structure input, check strings at the given cell paths, and replace with result. ## Input/output types: -| input | output | -| ------------ | ---------- | +| input | output | +| -------------- | ------------ | | list\ | list\ | -| record | record | -| string | bool | -| table | table | +| record | record | +| string | bool | +| table | table | + ## Examples Check if input contains string -```nu + +```nushell > 'my_library.rb' | str contains '.rb' true ``` Check if input contains string case insensitive -```nu + +```nushell > 'my_library.rb' | str contains --ignore-case '.RB' true ``` Check if input contains string in a record -```nu + +```nushell > { ColA: test, ColB: 100 } | str contains 'e' ColA ╭──────┬──────╮ │ ColA │ true │ @@ -62,7 +66,8 @@ Check if input contains string in a record ``` Check if input contains string in a table -```nu + +```nushell > [[ColA ColB]; [test 100]] | str contains --ignore-case 'E' ColA ╭───┬──────┬──────╮ │ # │ ColA │ ColB │ @@ -73,7 +78,8 @@ Check if input contains string in a table ``` Check if input contains string in a table -```nu + +```nushell > [[ColA ColB]; [test hello]] | str contains 'e' ColA ColB ╭───┬──────┬──────╮ │ # │ ColA │ ColB │ @@ -84,13 +90,15 @@ Check if input contains string in a table ``` Check if input string contains 'banana' -```nu + +```nushell > 'hello' | str contains 'banana' false ``` Check if list contains string -```nu + +```nushell > [one two three] | str contains o ╭───┬───────╮ │ 0 │ true │ @@ -101,7 +109,8 @@ Check if list contains string ``` Check if list does not contain string -```nu + +```nushell > [one two three] | str contains --not o ╭───┬───────╮ │ 0 │ false │ diff --git a/commands/docs/str_distance.md b/src/content/docs/commands/docs/str_distance.md similarity index 84% rename from commands/docs/str_distance.md rename to src/content/docs/commands/docs/str_distance.md index cbbce0aaf1c..6f72207b525 100644 --- a/commands/docs/str_distance.md +++ b/src/content/docs/commands/docs/str_distance.md @@ -9,6 +9,7 @@ usage: | Compare two strings and return the edit distance/Levenshtein distance. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,13 +18,12 @@ feature: default ## Signature -```> str distance {flags} (compare-string) ...rest``` +`> str distance {flags} (compare-string) ...rest` ## Parameters - - `compare-string`: The first string to compare. - - `...rest`: For a data structure input, check strings at the given cell paths, and replace with result. - +- `compare-string`: The first string to compare. +- `...rest`: For a data structure input, check strings at the given cell paths, and replace with result. ## Input/output types: @@ -32,16 +32,19 @@ feature: default | record | record | | string | int | | table | table | + ## Examples get the edit distance between two strings -```nu + +```nushell > 'nushell' | str distance 'nutshell' 1 ``` Compute edit distance between strings in table and another string, using cell paths -```nu + +```nushell > [{a: 'nutshell' b: 'numetal'}] | str distance 'nushell' 'a' 'b' ╭───┬───┬───╮ │ # │ a │ b │ @@ -52,7 +55,8 @@ 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 -```nu + +```nushell > {a: 'nutshell' b: 'numetal'} | str distance 'nushell' a b ╭───┬───╮ │ a │ 1 │ diff --git a/commands/docs/str_downcase.md b/src/content/docs/commands/docs/str_downcase.md similarity index 77% rename from commands/docs/str_downcase.md rename to src/content/docs/commands/docs/str_downcase.md index a4215d74dec..dce7b39e3d2 100644 --- a/commands/docs/str_downcase.md +++ b/src/content/docs/commands/docs/str_downcase.md @@ -9,6 +9,7 @@ usage: | Make text lowercase. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,37 +18,40 @@ feature: default ## Signature -```> str downcase {flags} ...rest``` +`> str downcase {flags} ...rest` ## Parameters - - `...rest`: For a data structure input, convert strings at the given cell paths. - +- `...rest`: For a data structure input, convert strings at the given cell paths. ## Input/output types: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| record | record | -| string | string | -| table | table | +| record | record | +| string | string | +| table | table | + ## Examples Downcase contents -```nu + +```nushell > 'NU' | str downcase nu ``` Downcase contents -```nu + +```nushell > 'TESTa' | str downcase testa ``` Downcase contents -```nu + +```nushell > [[ColA ColB]; [Test ABC]] | str downcase ColA ╭───┬──────┬──────╮ │ # │ ColA │ ColB │ @@ -58,7 +62,8 @@ Downcase contents ``` Downcase contents -```nu + +```nushell > [[ColA ColB]; [Test ABC]] | str downcase ColA ColB ╭───┬──────┬──────╮ │ # │ ColA │ ColB │ diff --git a/commands/docs/str_ends-with.md b/src/content/docs/commands/docs/str_ends-with.md similarity index 68% rename from commands/docs/str_ends-with.md rename to src/content/docs/commands/docs/str_ends-with.md index 1bb60b06af4..f8d18864d6a 100644 --- a/commands/docs/str_ends-with.md +++ b/src/content/docs/commands/docs/str_ends-with.md @@ -9,6 +9,7 @@ usage: | Check if an input ends with a string. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,36 +18,38 @@ feature: default ## Signature -```> str ends-with {flags} (string) ...rest``` +`> str ends-with {flags} (string) ...rest` ## Flags - - `--ignore-case, -i`: search is case insensitive +- `--ignore-case, -i`: search is case insensitive ## Parameters - - `string`: The string to match. - - `...rest`: For a data structure input, check strings at the given cell paths, and replace with result. - +- `string`: The string to match. +- `...rest`: For a data structure input, check strings at the given cell paths, and replace with result. ## Input/output types: -| input | output | -| ------------ | ---------- | +| input | output | +| -------------- | ------------ | | list\ | list\ | -| record | record | -| string | bool | -| table | table | +| record | record | +| string | bool | +| table | table | + ## Examples Checks if string ends with '.rb' -```nu + +```nushell > 'my_library.rb' | str ends-with '.rb' true ``` Checks if strings end with '.txt' -```nu + +```nushell > ['my_library.rb', 'README.txt'] | str ends-with '.txt' ╭───┬───────╮ │ 0 │ false │ @@ -56,7 +59,8 @@ Checks if strings end with '.txt' ``` Checks if string ends with '.RB', case-insensitive -```nu + +```nushell > 'my_library.rb' | str ends-with --ignore-case '.RB' true ``` diff --git a/commands/docs/str_escape-glob.md b/src/content/docs/commands/docs/str_escape-glob.md similarity index 64% rename from commands/docs/str_escape-glob.md rename to src/content/docs/commands/docs/str_escape-glob.md index 585030c058d..40ffd6df732 100644 --- a/commands/docs/str_escape-glob.md +++ b/src/content/docs/commands/docs/str_escape-glob.md @@ -9,6 +9,7 @@ usage: | Escape glob pattern. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,25 +18,26 @@ feature: default ## Signature -```> str escape-glob {flags} ...rest``` +`> str escape-glob {flags} ...rest` ## Parameters - - `...rest`: For a data structure input, turn strings at the given cell paths into substrings. - +- `...rest`: For a data structure input, turn strings at the given cell paths into substrings. ## Input/output types: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| record | record | -| string | string | -| table | table | +| record | record | +| string | string | +| table | table | + ## Examples escape glob pattern before list -```nu + +```nushell > let f = 'test[a]'; ls ($f | str escape-glob) ``` diff --git a/commands/docs/str_expand.md b/src/content/docs/commands/docs/str_expand.md similarity index 89% rename from commands/docs/str_expand.md rename to src/content/docs/commands/docs/str_expand.md index fdf77c912a7..e5eeb74b670 100644 --- a/commands/docs/str_expand.md +++ b/src/content/docs/commands/docs/str_expand.md @@ -9,6 +9,7 @@ usage: | Generates all possible combinations defined in brace expansion syntax. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,23 +18,24 @@ feature: default ## Signature -```> str expand {flags} ``` +`> str expand {flags} ` ## Flags - - `--path, -`: Replaces all backslashes with double backslashes, useful for Path. - +- `--path, -`: Replaces all backslashes with double backslashes, useful for Path. ## Input/output types: -| input | output | -| ------------ | ------------------ | +| input | output | +| -------------- | ---------------------- | | list\ | list\\> | -| string | list\ | +| string | list\ | + ## Examples Define a range inside braces to produce a list of string. -```nu + +```nushell > "{3..5}" | str expand ╭───┬───╮ │ 0 │ 3 │ @@ -44,7 +46,8 @@ Define a range inside braces to produce a list of string. ``` Ignore the next character after the backslash ('\') -```nu + +```nushell > 'A{B\,,C}' | str expand ╭───┬─────╮ │ 0 │ AB, │ @@ -54,7 +57,8 @@ Ignore the next character after the backslash ('\') ``` Commas that are not inside any braces need to be skipped. -```nu + +```nushell > 'Welcome\, {home,mon ami}!' | str expand ╭───┬───────────────────╮ │ 0 │ Welcome, home! │ @@ -64,7 +68,8 @@ Commas that are not inside any braces need to be skipped. ``` Use double backslashes to add a backslash. -```nu + +```nushell > 'A{B\\,C}' | str expand ╭───┬─────╮ │ 0 │ AB\ │ @@ -74,7 +79,8 @@ Use double backslashes to add a backslash. ``` Export comma separated values inside braces (`{}`) to a string list. -```nu + +```nushell > "{apple,banana,cherry}" | str expand ╭───┬────────╮ │ 0 │ apple │ @@ -85,7 +91,8 @@ Export comma separated values inside braces (`{}`) to a string list. ``` If the piped data is path, you may want to use --path flag, or else manually replace the backslashes with double backslashes. -```nu + +```nushell > 'C:\{Users,Windows}' | str expand --path ╭───┬────────────╮ │ 0 │ C:\Users │ @@ -95,7 +102,8 @@ If the piped data is path, you may want to use --path flag, or else manually rep ``` Brace expressions can be used one after another. -```nu + +```nushell > "A{b,c}D{e,f}G" | str expand ╭───┬───────╮ │ 0 │ AbDeG │ @@ -107,7 +115,8 @@ Brace expressions can be used one after another. ``` Collection may include an empty item. It can be put at the start of the list. -```nu + +```nushell > "A{,B,C}" | str expand ╭───┬────╮ │ 0 │ A │ @@ -118,7 +127,8 @@ Collection may include an empty item. It can be put at the start of the list. ``` Empty item can be at the end of the collection. -```nu + +```nushell > "A{B,C,}" | str expand ╭───┬────╮ │ 0 │ AB │ @@ -129,7 +139,8 @@ Empty item can be at the end of the collection. ``` Empty item can be in the middle of the collection. -```nu + +```nushell > "A{B,,C}" | str expand ╭───┬────╮ │ 0 │ AB │ @@ -140,7 +151,8 @@ 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: -```nu + +```nushell > "A{B{1,3},C{2,5}}D" | str expand ╭───┬──────╮ │ 0 │ AB1D │ @@ -152,4 +164,5 @@ Also, it is possible to use one inside another. Here is a real-world example, th ``` ## Notes -This syntax may seem familiar with `glob {A,B}.C`. The difference is glob relies on filesystem, but str expand is not. Inside braces, we put variants. Then basically we're creating all possible outcomes. \ No newline at end of file + +This syntax may seem familiar with `glob {A,B}.C`. The difference is glob relies on filesystem, but str expand is not. Inside braces, we put variants. Then basically we're creating all possible outcomes. diff --git a/commands/docs/str_index-of.md b/src/content/docs/commands/docs/str_index-of.md similarity index 62% rename from commands/docs/str_index-of.md rename to src/content/docs/commands/docs/str_index-of.md index f3e548bc819..7298e8fd523 100644 --- a/commands/docs/str_index-of.md +++ b/src/content/docs/commands/docs/str_index-of.md @@ -9,6 +9,7 @@ usage: | Returns start index of first occurrence of string in input, or -1 if no match. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,63 +18,69 @@ feature: default ## Signature -```> str index-of {flags} (string) ...rest``` +`> str index-of {flags} (string) ...rest` ## 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 - - `string`: The string to find in the input. - - `...rest`: For a data structure input, search strings at the given cell paths, and replace with result. - +- `string`: The string to find in the input. +- `...rest`: For a data structure input, search strings at the given cell paths, and replace with result. ## Input/output types: -| input | output | -| ------------ | --------- | +| input | output | +| -------------- | ----------- | | list\ | list\ | -| record | record | -| string | int | -| table | table | +| record | record | +| string | int | +| table | table | + ## Examples Returns index of string in input -```nu + +```nushell > 'my_library.rb' | str index-of '.rb' 10 ``` Count length using grapheme clusters -```nu + +```nushell > '🇯🇵ほげ ふが ぴよ' | str index-of --grapheme-clusters 'ふが' 4 ``` Returns index of string in input within a`rhs open range` -```nu + +```nushell > '.rb.rb' | str index-of '.rb' --range 1.. 3 ``` Returns index of string in input within a lhs open range -```nu + +```nushell > '123456' | str index-of '6' --range ..4 -1 ``` Returns index of string in input within a range -```nu + +```nushell > '123456' | str index-of '3' --range 1..4 2 ``` Returns index of string in input -```nu + +```nushell > '/this/is/some/path/file.txt' | str index-of '/' -e 18 ``` diff --git a/commands/docs/str_join.md b/src/content/docs/commands/docs/str_join.md similarity index 79% rename from commands/docs/str_join.md rename to src/content/docs/commands/docs/str_join.md index 7e8e34fc5ab..04af84ae248 100644 --- a/commands/docs/str_join.md +++ b/src/content/docs/commands/docs/str_join.md @@ -9,6 +9,7 @@ usage: | Concatenate multiple strings into a single string, with an optional separator between each. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,29 +18,31 @@ feature: default ## Signature -```> str join {flags} (separator)``` +`> str join {flags} (separator)` ## Parameters - - `separator`: Optional separator to use when creating string. - +- `separator`: Optional separator to use when creating string. ## Input/output types: -| input | output | -| --------- | ------ | +| input | output | +| ----------- | ------ | | list\ | string | -| string | string | +| string | string | + ## Examples Create a string from input -```nu + +```nushell > ['nu', 'shell'] | str join nushell ``` Create a string from input with a separator -```nu + +```nushell > ['nu', 'shell'] | str join '-' nu-shell ``` diff --git a/commands/docs/str_kebab-case.md b/src/content/docs/commands/docs/str_kebab-case.md similarity index 71% rename from commands/docs/str_kebab-case.md rename to src/content/docs/commands/docs/str_kebab-case.md index 986a26adaf6..509d50d2395 100644 --- a/commands/docs/str_kebab-case.md +++ b/src/content/docs/commands/docs/str_kebab-case.md @@ -9,55 +9,60 @@ usage: | Convert a string to kebab-case. feature: extra --- + # {{ $frontmatter.title }} for strings
{{ $frontmatter.strings }}
- ::: warning - Command `str kebab-case` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `str kebab-case` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> str kebab-case {flags} ...rest``` +`> str kebab-case {flags} ...rest` ## Parameters - - `...rest`: For a data structure input, convert strings at the given cell paths - +- `...rest`: For a data structure input, convert strings at the given cell paths ## Input/output types: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| record | record | -| string | string | -| table | table | +| record | record | +| string | string | +| table | table | + ## Examples convert a string to kebab-case -```nu + +```nushell > 'NuShell' | str kebab-case nu-shell ``` convert a string to kebab-case -```nu + +```nushell > 'thisIsTheFirstCase' | str kebab-case this-is-the-first-case ``` convert a string to kebab-case -```nu + +```nushell > 'THIS_IS_THE_SECOND_CASE' | str kebab-case this-is-the-second-case ``` convert a column from a table to kebab-case -```nu + +```nushell > [[lang, gems]; [nuTest, 100]] | str kebab-case lang ╭───┬─────────┬──────╮ │ # │ lang │ gems │ diff --git a/commands/docs/str_length.md b/src/content/docs/commands/docs/str_length.md similarity index 62% rename from commands/docs/str_length.md rename to src/content/docs/commands/docs/str_length.md index 85d2ef66816..3adfa19be35 100644 --- a/commands/docs/str_length.md +++ b/src/content/docs/commands/docs/str_length.md @@ -9,6 +9,7 @@ usage: | Output the length of any strings in the pipeline. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,42 +18,45 @@ feature: default ## Signature -```> str length {flags} ...rest``` +`> str length {flags} ...rest` ## Flags - - `--grapheme-clusters, -g`: count length using grapheme clusters (all visible chars have length 1) - - `--utf-8-bytes, -b`: count length using UTF-8 bytes (default; all non-ASCII chars have length 2+) +- `--grapheme-clusters, -g`: count length using grapheme clusters (all visible chars have length 1) +- `--utf-8-bytes, -b`: count length using UTF-8 bytes (default; all non-ASCII chars have length 2+) ## Parameters - - `...rest`: For a data structure input, replace strings at the given cell paths with their length. - +- `...rest`: For a data structure input, replace strings at the given cell paths with their length. ## Input/output types: -| input | output | -| ------------ | --------- | +| input | output | +| -------------- | ----------- | | list\ | list\ | -| record | record | -| string | int | -| table | table | +| record | record | +| string | int | +| table | table | + ## Examples Return the lengths of a string -```nu + +```nushell > 'hello' | str length 5 ``` Count length using grapheme clusters -```nu + +```nushell > '🇯🇵ほげ ふが ぴよ' | str length --grapheme-clusters 9 ``` Return the lengths of multiple strings -```nu + +```nushell > ['hi' 'there'] | str length ╭───┬───╮ │ 0 │ 2 │ diff --git a/commands/docs/str_pascal-case.md b/src/content/docs/commands/docs/str_pascal-case.md similarity index 70% rename from commands/docs/str_pascal-case.md rename to src/content/docs/commands/docs/str_pascal-case.md index 0f2baf8e8a1..55b0238a733 100644 --- a/commands/docs/str_pascal-case.md +++ b/src/content/docs/commands/docs/str_pascal-case.md @@ -9,55 +9,60 @@ usage: | Convert a string to PascalCase. feature: extra --- + # {{ $frontmatter.title }} for strings
{{ $frontmatter.strings }}
- ::: warning - Command `str pascal-case` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `str pascal-case` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> str pascal-case {flags} ...rest``` +`> str pascal-case {flags} ...rest` ## Parameters - - `...rest`: For a data structure input, convert strings at the given cell paths - +- `...rest`: For a data structure input, convert strings at the given cell paths ## Input/output types: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| record | record | -| string | string | -| table | table | +| record | record | +| string | string | +| table | table | + ## Examples convert a string to PascalCase -```nu + +```nushell > 'nu-shell' | str pascal-case NuShell ``` convert a string to PascalCase -```nu + +```nushell > 'this-is-the-first-case' | str pascal-case ThisIsTheFirstCase ``` convert a string to PascalCase -```nu + +```nushell > 'this_is_the_second_case' | str pascal-case ThisIsTheSecondCase ``` convert a column from a table to PascalCase -```nu + +```nushell > [[lang, gems]; [nu_test, 100]] | str pascal-case lang ╭───┬────────┬──────╮ │ # │ lang │ gems │ diff --git a/commands/docs/str_replace.md b/src/content/docs/commands/docs/str_replace.md similarity index 75% rename from commands/docs/str_replace.md rename to src/content/docs/commands/docs/str_replace.md index 959544f1834..6c69050a204 100644 --- a/commands/docs/str_replace.md +++ b/src/content/docs/commands/docs/str_replace.md @@ -9,6 +9,7 @@ usage: | Find and replace text. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,58 +18,63 @@ feature: default ## Signature -```> str replace {flags} (find) (replace) ...rest``` +`> str replace {flags} (find) (replace) ...rest` ## 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 - - `find`: The pattern to find. - - `replace`: The replacement string. - - `...rest`: For a data structure input, operate on strings at the given cell paths. - +- `find`: The pattern to find. +- `replace`: The replacement string. +- `...rest`: For a data structure input, operate on strings at the given cell paths. ## Input/output types: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| record | record | -| string | string | -| table | table | +| record | record | +| string | string | +| table | table | + ## Examples Find and replace the first occurrence of a substring -```nu + +```nushell > 'c:\some\cool\path' | str replace 'c:\some\cool' '~' ~\path ``` Find and replace all occurrences of a substring -```nu + +```nushell > 'abc abc abc' | str replace --all 'b' 'z' azc azc azc ``` Find and replace contents with capture group using regular expression -```nu + +```nushell > 'my_library.rb' | str replace -r '(.+).rb' '$1.nu' my_library.nu ``` Find and replace all occurrences of find string using regular expression -```nu + +```nushell > 'abc abc abc' | str replace --all --regex 'b' 'z' azc azc azc ``` Find and replace all occurrences of find string in table using regular expression -```nu + +```nushell > [[ColA ColB ColC]; [abc abc ads]] | str replace --all --regex 'b' 'z' ColA ColC ╭───┬──────┬──────┬──────╮ │ # │ ColA │ ColB │ ColC │ @@ -79,7 +85,8 @@ Find and replace all occurrences of find string in table using regular expressio ``` Find and replace all occurrences of find string in record using regular expression -```nu + +```nushell > { KeyA: abc, KeyB: abc, KeyC: ads } | str replace --all --regex 'b' 'z' KeyA KeyC ╭──────┬─────╮ │ KeyA │ azc │ @@ -89,31 +96,36 @@ Find and replace all occurrences of find string in record using regular expressi ``` Find and replace contents without using the replace parameter as a regular expression -```nu + +```nushell > 'dogs_$1_cats' | str replace -r '\$1' '$2' -n dogs_$2_cats ``` Use captures to manipulate the input text using regular expression -```nu + +```nushell > "abc-def" | str replace -r "(.+)-(.+)" "${2}_${1}" def_abc ``` Find and replace with fancy-regex using regular expression -```nu + +```nushell > '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 -```nu + +```nushell > 'GHIKK-9+*' | str replace -r '[*[:xdigit:]+]' 'z' GHIKK-z+* ``` Find and replace on individual lines using multiline regular expression -```nu + +```nushell > "non-matching line\n123. one line\n124. another line\n" | str replace --all --multiline '^[0-9]+\. ' '' non-matching line one line diff --git a/commands/docs/str_reverse.md b/src/content/docs/commands/docs/str_reverse.md similarity index 72% rename from commands/docs/str_reverse.md rename to src/content/docs/commands/docs/str_reverse.md index 946e58f8776..12b4878c474 100644 --- a/commands/docs/str_reverse.md +++ b/src/content/docs/commands/docs/str_reverse.md @@ -9,6 +9,7 @@ usage: | Reverse every string in the pipeline. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,31 +18,33 @@ feature: default ## Signature -```> str reverse {flags} ...rest``` +`> str reverse {flags} ...rest` ## Parameters - - `...rest`: For a data structure input, reverse strings at the given cell paths. - +- `...rest`: For a data structure input, reverse strings at the given cell paths. ## Input/output types: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| record | record | -| string | string | -| table | table | +| record | record | +| string | string | +| table | table | + ## Examples Reverse a single string -```nu + +```nushell > 'Nushell' | str reverse llehsuN ``` Reverse multiple strings in a list -```nu + +```nushell > ['Nushell' 'is' 'cool'] | str reverse ╭───┬─────────╮ │ 0 │ llehsuN │ diff --git a/commands/docs/str_screaming-snake-case.md b/src/content/docs/commands/docs/str_screaming-snake-case.md similarity index 72% rename from commands/docs/str_screaming-snake-case.md rename to src/content/docs/commands/docs/str_screaming-snake-case.md index 289ec63862d..68febe13a87 100644 --- a/commands/docs/str_screaming-snake-case.md +++ b/src/content/docs/commands/docs/str_screaming-snake-case.md @@ -9,55 +9,60 @@ usage: | Convert a string to SCREAMING_SNAKE_CASE. feature: extra --- + # {{ $frontmatter.title }} for strings
{{ $frontmatter.strings }}
- ::: warning - Command `str screaming-snake-case` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `str screaming-snake-case` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> str screaming-snake-case {flags} ...rest``` +`> str screaming-snake-case {flags} ...rest` ## Parameters - - `...rest`: For a data structure input, convert strings at the given cell paths - +- `...rest`: For a data structure input, convert strings at the given cell paths ## Input/output types: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| record | record | -| string | string | -| table | table | +| record | record | +| string | string | +| table | table | + ## Examples convert a string to SCREAMING_SNAKE_CASE -```nu + +```nushell > "NuShell" | str screaming-snake-case NU_SHELL ``` convert a string to SCREAMING_SNAKE_CASE -```nu + +```nushell > "this_is_the_second_case" | str screaming-snake-case THIS_IS_THE_SECOND_CASE ``` convert a string to SCREAMING_SNAKE_CASE -```nu + +```nushell > "this-is-the-first-case" | str screaming-snake-case THIS_IS_THE_FIRST_CASE ``` convert a column from a table to SCREAMING_SNAKE_CASE -```nu + +```nushell > [[lang, gems]; [nu_test, 100]] | str screaming-snake-case lang ╭───┬─────────┬──────╮ │ # │ lang │ gems │ diff --git a/commands/docs/str_snake-case.md b/src/content/docs/commands/docs/str_snake-case.md similarity index 71% rename from commands/docs/str_snake-case.md rename to src/content/docs/commands/docs/str_snake-case.md index 4f4a08b5ff6..390cfd7dfab 100644 --- a/commands/docs/str_snake-case.md +++ b/src/content/docs/commands/docs/str_snake-case.md @@ -9,55 +9,60 @@ usage: | Convert a string to snake_case. feature: extra --- + # {{ $frontmatter.title }} for strings
{{ $frontmatter.strings }}
- ::: warning - Command `str snake-case` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `str snake-case` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> str snake-case {flags} ...rest``` +`> str snake-case {flags} ...rest` ## Parameters - - `...rest`: For a data structure input, convert strings at the given cell paths - +- `...rest`: For a data structure input, convert strings at the given cell paths ## Input/output types: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| record | record | -| string | string | -| table | table | +| record | record | +| string | string | +| table | table | + ## Examples convert a string to snake_case -```nu + +```nushell > "NuShell" | str snake-case nu_shell ``` convert a string to snake_case -```nu + +```nushell > "this_is_the_second_case" | str snake-case this_is_the_second_case ``` convert a string to snake_case -```nu + +```nushell > "this-is-the-first-case" | str snake-case this_is_the_first_case ``` convert a column from a table to snake_case -```nu + +```nushell > [[lang, gems]; [nuTest, 100]] | str snake-case lang ╭───┬─────────┬──────╮ │ # │ lang │ gems │ diff --git a/commands/docs/str_starts-with.md b/src/content/docs/commands/docs/str_starts-with.md similarity index 67% rename from commands/docs/str_starts-with.md rename to src/content/docs/commands/docs/str_starts-with.md index 9eb340eda5d..92e84046333 100644 --- a/commands/docs/str_starts-with.md +++ b/src/content/docs/commands/docs/str_starts-with.md @@ -9,6 +9,7 @@ usage: | Check if an input starts with a string. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,48 +18,52 @@ feature: default ## Signature -```> str starts-with {flags} (string) ...rest``` +`> str starts-with {flags} (string) ...rest` ## Flags - - `--ignore-case, -i`: search is case insensitive +- `--ignore-case, -i`: search is case insensitive ## Parameters - - `string`: The string to match. - - `...rest`: For a data structure input, check strings at the given cell paths, and replace with result. - +- `string`: The string to match. +- `...rest`: For a data structure input, check strings at the given cell paths, and replace with result. ## Input/output types: -| input | output | -| ------------ | ---------- | +| input | output | +| -------------- | ------------ | | list\ | list\ | -| record | record | -| string | bool | -| table | table | +| record | record | +| string | bool | +| table | table | + ## Examples Checks if input string starts with 'my' -```nu + +```nushell > 'my_library.rb' | str starts-with 'my' true ``` Checks if input string starts with 'Car' -```nu + +```nushell > 'Cargo.toml' | str starts-with 'Car' true ``` Checks if input string starts with '.toml' -```nu + +```nushell > 'Cargo.toml' | str starts-with '.toml' false ``` Checks if input string starts with 'cargo', case-insensitive -```nu + +```nushell > 'Cargo.toml' | str starts-with --ignore-case 'cargo' true ``` diff --git a/commands/docs/str_stats.md b/src/content/docs/commands/docs/str_stats.md similarity index 96% rename from commands/docs/str_stats.md rename to src/content/docs/commands/docs/str_stats.md index 563132e74cb..9d08df40ee9 100644 --- a/commands/docs/str_stats.md +++ b/src/content/docs/commands/docs/str_stats.md @@ -9,6 +9,7 @@ usage: | Gather word count statistics on the text. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,8 +18,7 @@ feature: default ## Signature -```> str stats {flags} ``` - +`> str stats {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Count the number of words in a string -```nu + +```nushell > "There are seven words in this sentence" | str stats ╭───────────┬────╮ │ lines │ 1 │ @@ -41,7 +42,8 @@ Count the number of words in a string ``` Counts unicode characters -```nu + +```nushell > '今天天气真好' | str stats ╭───────────┬────╮ │ lines │ 1 │ @@ -53,7 +55,8 @@ Counts unicode characters ``` Counts Unicode characters correctly in a string -```nu + +```nushell > "Amélie Amelie" | str stats ╭───────────┬────╮ │ lines │ 1 │ diff --git a/commands/docs/str_substring.md b/src/content/docs/commands/docs/str_substring.md similarity index 61% rename from commands/docs/str_substring.md rename to src/content/docs/commands/docs/str_substring.md index 9ab27369c67..b46d77e33fa 100644 --- a/commands/docs/str_substring.md +++ b/src/content/docs/commands/docs/str_substring.md @@ -9,6 +9,7 @@ usage: | Get part of a string. Note that the start is included but the end is excluded, and that the first character of a string is index 0. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,37 +18,39 @@ feature: default ## Signature -```> str substring {flags} (range) ...rest``` +`> str substring {flags} (range) ...rest` ## 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 - - `range`: The indexes to substring [start end]. - - `...rest`: For a data structure input, turn strings at the given cell paths into substrings. - +- `range`: The indexes to substring [start end]. +- `...rest`: For a data structure input, turn strings at the given cell paths into substrings. ## Input/output types: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| record | record | -| string | string | -| table | table | +| record | record | +| string | string | +| table | table | + ## Examples Get a substring "nushell" from the text "good nushell" using a range -```nu + +```nushell > 'good nushell' | str substring 5..12 nushell ``` Count indexes and split using grapheme clusters -```nu + +```nushell > '🇯🇵ほげ ふが ぴよ' | str substring --grapheme-clusters 4..6 ふが ``` diff --git a/commands/docs/str_title-case.md b/src/content/docs/commands/docs/str_title-case.md similarity index 70% rename from commands/docs/str_title-case.md rename to src/content/docs/commands/docs/str_title-case.md index 4c680fddb27..ec21382e5a5 100644 --- a/commands/docs/str_title-case.md +++ b/src/content/docs/commands/docs/str_title-case.md @@ -9,49 +9,53 @@ usage: | Convert a string to Title Case. feature: extra --- + # {{ $frontmatter.title }} for strings
{{ $frontmatter.strings }}
- ::: warning - Command `str title-case` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `str title-case` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> str title-case {flags} ...rest``` +`> str title-case {flags} ...rest` ## Parameters - - `...rest`: For a data structure input, convert strings at the given cell paths - +- `...rest`: For a data structure input, convert strings at the given cell paths ## Input/output types: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| record | record | -| string | string | -| table | table | +| record | record | +| string | string | +| table | table | + ## Examples convert a string to Title Case -```nu + +```nushell > 'nu-shell' | str title-case Nu Shell ``` convert a string to Title Case -```nu + +```nushell > 'this is a test case' | str title-case This Is A Test Case ``` convert a column from a table to Title Case -```nu + +```nushell > [[title, count]; ['nu test', 100]] | str title-case title ╭───┬─────────┬───────╮ │ # │ title │ count │ diff --git a/commands/docs/str_trim.md b/src/content/docs/commands/docs/str_trim.md similarity index 64% rename from commands/docs/str_trim.md rename to src/content/docs/commands/docs/str_trim.md index bacfa490159..fd8fd84a236 100644 --- a/commands/docs/str_trim.md +++ b/src/content/docs/commands/docs/str_trim.md @@ -9,6 +9,7 @@ usage: | Trim whitespace or specific character. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,55 +18,60 @@ feature: default ## Signature -```> str trim {flags} ...rest``` +`> str trim {flags} ...rest` ## 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 - - `...rest`: For a data structure input, trim strings at the given cell paths. - +- `...rest`: For a data structure input, trim strings at the given cell paths. ## Input/output types: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| record | record | -| string | string | -| table | table | +| record | record | +| string | string | +| table | table | + ## Examples Trim whitespace -```nu + +```nushell > 'Nu shell ' | str trim Nu shell ``` Trim a specific character (not the whitespace) -```nu + +```nushell > '=== Nu shell ===' | str trim --char '=' Nu shell ``` Trim whitespace from the beginning of string -```nu + +```nushell > ' Nu shell ' | str trim --left Nu shell ``` Trim whitespace from the end of string -```nu + +```nushell > ' Nu shell ' | str trim --right Nu shell ``` Trim a specific character only from the end of the string -```nu + +```nushell > '=== Nu shell ===' | str trim --right --char '=' === Nu shell ``` diff --git a/commands/docs/str_upcase.md b/src/content/docs/commands/docs/str_upcase.md similarity index 63% rename from commands/docs/str_upcase.md rename to src/content/docs/commands/docs/str_upcase.md index 986c278b4f3..1a2801f7a4e 100644 --- a/commands/docs/str_upcase.md +++ b/src/content/docs/commands/docs/str_upcase.md @@ -9,6 +9,7 @@ usage: | Make text uppercase. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,25 +18,26 @@ feature: default ## Signature -```> str upcase {flags} ...rest``` +`> str upcase {flags} ...rest` ## Parameters - - `...rest`: For a data structure input, convert strings at the given cell paths. - +- `...rest`: For a data structure input, convert strings at the given cell paths. ## Input/output types: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| record | record | -| string | string | -| table | table | +| record | record | +| string | string | +| table | table | + ## Examples Upcase contents -```nu + +```nushell > 'nu' | str upcase NU ``` diff --git a/commands/docs/sys.md b/src/content/docs/commands/docs/sys.md similarity index 92% rename from commands/docs/sys.md rename to src/content/docs/commands/docs/sys.md index 9bf015145ff..018d367876e 100644 --- a/commands/docs/sys.md +++ b/src/content/docs/commands/docs/sys.md @@ -9,6 +9,7 @@ usage: | View information about the system. feature: default --- + # {{ $frontmatter.title }} for system @@ -17,8 +18,7 @@ feature: default ## Signature -```> sys {flags} ``` - +`> sys {flags} ` ## Input/output types: @@ -29,19 +29,22 @@ feature: default ## Examples Show info about the system -```nu + +```nushell > sys ``` Show the os system name with get -```nu + +```nushell > (sys).host | get name ``` Show the os system name -```nu + +```nushell > (sys).host.name ``` diff --git a/commands/docs/table.md b/src/content/docs/commands/docs/table.md similarity index 65% rename from commands/docs/table.md rename to src/content/docs/commands/docs/table.md index e604b4225e3..d81fa708e99 100644 --- a/commands/docs/table.md +++ b/src/content/docs/commands/docs/table.md @@ -9,6 +9,7 @@ usage: | Render the table. feature: default --- + # {{ $frontmatter.title }} for viewers @@ -17,22 +18,21 @@ feature: default ## Signature -```> table {flags} ``` +`> table {flags} ` ## 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 - +- `--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 ## Input/output types: @@ -43,13 +43,15 @@ Be aware collapse mode currently doesn't support width control ## Examples List the files in current directory, with indexes starting from 1 -```nu + +```nushell > ls | table --index 1 ``` Render data in table view -```nu + +```nushell > [[a b]; [1 2] [3 4]] | table ╭───┬───┬───╮ │ # │ a │ b │ @@ -61,7 +63,8 @@ Render data in table view ``` Render data in table view (expanded) -```nu + +```nushell > [[a b]; [1 2] [2 [4 4]]] | table --expand ╭───┬───┬───╮ │ # │ a │ b │ @@ -73,7 +76,8 @@ Render data in table view (expanded) ``` Render data in table view (collapsed) -```nu + +```nushell > [[a b]; [1 2] [2 [4 4]]] | table --collapse ╭───┬───┬───╮ │ # │ a │ b │ @@ -85,28 +89,33 @@ Render data in table view (collapsed) ``` Change the table theme to the specified theme for a single run -```nu + +```nushell > [[a b]; [1 2] [2 [4 4]]] | table --theme basic ``` Force showing of the #/index column for a single run -```nu + +```nushell > [[a b]; [1 2] [2 [4 4]]] | table -i true ``` Set the starting number of the #/index column to 100 for a single run -```nu + +```nushell > [[a b]; [1 2] [2 [4 4]]] | table -i 100 ``` Force hiding of the #/index column for a single run -```nu + +```nushell > [[a b]; [1 2] [2 [4 4]]] | table -i false ``` ## Notes -If the table contains a column called 'index', this column is used as the table index instead of the usual continuous index. \ No newline at end of file + +If the table contains a column called 'index', this column is used as the table index instead of the usual continuous index. diff --git a/commands/docs/take.md b/src/content/docs/commands/docs/take.md similarity index 84% rename from commands/docs/take.md rename to src/content/docs/commands/docs/take.md index 374960bc59f..bf5a5716083 100644 --- a/commands/docs/take.md +++ b/src/content/docs/commands/docs/take.md @@ -9,6 +9,7 @@ usage: | Take only the first n elements of a list, or the first n bytes of a binary value. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,25 +18,26 @@ feature: default ## Signature -```> take {flags} (n)``` +`> take {flags} (n)` ## Parameters - - `n`: Starting from the front, the number of elements to return. - +- `n`: Starting from the front, the number of elements to return. ## Input/output types: -| input | output | -| --------- | ------------ | -| binary | binary | +| input | output | +| ----------- | -------------- | +| binary | binary | | list\ | list\ | -| range | list\ | -| table | table | +| range | list\ | +| table | table | + ## Examples Return the first item of a list/table -```nu + +```nushell > [1 2 3] | take 1 ╭───┬───╮ │ 0 │ 1 │ @@ -44,7 +46,8 @@ Return the first item of a list/table ``` Return the first 2 items of a list/table -```nu + +```nushell > [1 2 3] | take 2 ╭───┬───╮ │ 0 │ 1 │ @@ -54,7 +57,8 @@ Return the first 2 items of a list/table ``` Return the first two rows of a table -```nu + +```nushell > [[editions]; [2015] [2018] [2021]] | take 2 ╭───┬──────────╮ │ # │ editions │ @@ -66,7 +70,8 @@ Return the first two rows of a table ``` Return the first 2 bytes of a binary value -```nu + +```nushell > 0x[01 23 45] | take 2 Length: 2 (0x2) bytes | printable whitespace ascii_other non_ascii 00000000: 01 23 •# @@ -74,7 +79,8 @@ Length: 2 (0x2) bytes | printable whitespace ascii_other non_ascii ``` Return the first 3 elements of a range -```nu + +```nushell > 1..10 | take 3 ╭───┬───╮ │ 0 │ 1 │ @@ -84,10 +90,9 @@ Return the first 3 elements of a range ``` - ## Subcommands: | name | type | usage | | -------------------------------------------- | ------- | ----------------------------------------------------- | | [`take until`](/commands/docs/take_until.md) | Builtin | Take elements of the input until a predicate is true. | -| [`take while`](/commands/docs/take_while.md) | Builtin | Take elements of the input while a predicate is true. | \ No newline at end of file +| [`take while`](/commands/docs/take_while.md) | Builtin | Take elements of the input while a predicate is true. | diff --git a/commands/docs/take_until.md b/src/content/docs/commands/docs/take_until.md similarity index 84% rename from commands/docs/take_until.md rename to src/content/docs/commands/docs/take_until.md index 096ebf024e0..f31f531230d 100644 --- a/commands/docs/take_until.md +++ b/src/content/docs/commands/docs/take_until.md @@ -9,6 +9,7 @@ usage: | Take elements of the input until a predicate is true. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,23 +18,24 @@ feature: default ## Signature -```> take until {flags} (predicate)``` +`> take until {flags} (predicate)` ## Parameters - - `predicate`: The predicate that element(s) must not match. - +- `predicate`: The predicate that element(s) must not match. ## Input/output types: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | -| table | table | +| table | table | + ## Examples Take until the element is positive -```nu + +```nushell > [-1 -2 9 1] | take until {|x| $x > 0 } ╭───┬────╮ │ 0 │ -1 │ @@ -43,7 +45,8 @@ Take until the element is positive ``` Take until the element is positive using stored condition -```nu + +```nushell > let cond = {|x| $x > 0 }; [-1 -2 9 1] | take until $cond ╭───┬────╮ │ 0 │ -1 │ @@ -53,7 +56,8 @@ Take until the element is positive using stored condition ``` Take until the field value is positive -```nu + +```nushell > [{a: -1} {a: -2} {a: 9} {a: 1}] | take until {|x| $x.a > 0 } ╭───┬────╮ │ # │ a │ diff --git a/commands/docs/take_while.md b/src/content/docs/commands/docs/take_while.md similarity index 84% rename from commands/docs/take_while.md rename to src/content/docs/commands/docs/take_while.md index 67c1081fd15..406b5df39b6 100644 --- a/commands/docs/take_while.md +++ b/src/content/docs/commands/docs/take_while.md @@ -9,6 +9,7 @@ usage: | Take elements of the input while a predicate is true. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,23 +18,24 @@ feature: default ## Signature -```> take while {flags} (predicate)``` +`> take while {flags} (predicate)` ## Parameters - - `predicate`: The predicate that element(s) must match. - +- `predicate`: The predicate that element(s) must match. ## Input/output types: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | -| table | table | +| table | table | + ## Examples Take while the element is negative -```nu + +```nushell > [-1 -2 9 1] | take while {|x| $x < 0 } ╭───┬────╮ │ 0 │ -1 │ @@ -43,7 +45,8 @@ Take while the element is negative ``` Take while the element is negative using stored condition -```nu + +```nushell > let cond = {|x| $x < 0 }; [-1 -2 9 1] | take while $cond ╭───┬────╮ │ 0 │ -1 │ @@ -53,7 +56,8 @@ Take while the element is negative using stored condition ``` Take while the field value is negative -```nu + +```nushell > [{a: -1} {a: -2} {a: 9} {a: 1}] | take while {|x| $x.a < 0 } ╭───┬────╮ │ # │ a │ diff --git a/commands/docs/term_size.md b/src/content/docs/commands/docs/term_size.md similarity index 84% rename from commands/docs/term_size.md rename to src/content/docs/commands/docs/term_size.md index 5d1124206e6..c5eaf73b072 100644 --- a/commands/docs/term_size.md +++ b/src/content/docs/commands/docs/term_size.md @@ -9,6 +9,7 @@ usage: | Returns a record containing the number of columns (width) and rows (height) of the terminal. feature: default --- + # {{ $frontmatter.title }} for platform @@ -17,31 +18,33 @@ feature: default ## Signature -```> term size {flags} ``` - +`> term size {flags} ` ## Input/output types: -| input | output | -| ------- | ------------------------------- | +| input | output | +| ------- | --------------------------------- | | nothing | record\ | ## Examples Return the columns (width) and rows (height) of the terminal -```nu + +```nushell > term size ``` Return the columns (width) of the terminal -```nu + +```nushell > (term size).columns ``` Return the rows (height) of the terminal -```nu + +```nushell > (term size).rows ``` diff --git a/commands/docs/timeit.md b/src/content/docs/commands/docs/timeit.md similarity index 87% rename from commands/docs/timeit.md rename to src/content/docs/commands/docs/timeit.md index f366d377364..bbc8b1ee42f 100644 --- a/commands/docs/timeit.md +++ b/src/content/docs/commands/docs/timeit.md @@ -9,6 +9,7 @@ usage: | Time the running time of a block. feature: default --- + # {{ $frontmatter.title }} for debug @@ -17,12 +18,11 @@ feature: default ## Signature -```> timeit {flags} (command)``` +`> timeit {flags} (command)` ## Parameters - - `command`: The command or block to run. - +- `command`: The command or block to run. ## Input/output types: @@ -30,22 +30,26 @@ feature: default | ------- | -------- | | any | duration | | nothing | duration | + ## Examples Times a command within a closure -```nu + +```nushell > timeit { sleep 500ms } ``` Times a command using an existing input -```nu + +```nushell > http get https://www.nushell.sh/book/ | timeit { split chars } ``` Times a command invocation -```nu + +```nushell > timeit ls -la ``` diff --git a/commands/docs/to.md b/src/content/docs/commands/docs/to.md similarity index 96% rename from commands/docs/to.md rename to src/content/docs/commands/docs/to.md index 3fb51f1e063..c6c4732759b 100644 --- a/commands/docs/to.md +++ b/src/content/docs/commands/docs/to.md @@ -9,6 +9,7 @@ usage: | Translate structured data to a format. feature: default --- + # {{ $frontmatter.title }} for formats @@ -17,8 +18,7 @@ feature: default ## Signature -```> to {flags} ``` - +`> to {flags} ` ## Input/output types: @@ -27,6 +27,7 @@ feature: default | nothing | string | ## Notes + You must use one of the following subcommands. Using this command as-is will only produce this help message. ## Subcommands: @@ -42,4 +43,4 @@ You must use one of the following subcommands. Using this command as-is will onl | [`to toml`](/commands/docs/to_toml.md) | Builtin | Convert record into .toml text. | | [`to tsv`](/commands/docs/to_tsv.md) | Builtin | Convert table into .tsv text. | | [`to xml`](/commands/docs/to_xml.md) | Builtin | Convert special record structure into .xml text. | -| [`to yaml`](/commands/docs/to_yaml.md) | Builtin | Convert table into .yaml/.yml text. | \ No newline at end of file +| [`to yaml`](/commands/docs/to_yaml.md) | Builtin | Convert table into .yaml/.yml text. | diff --git a/commands/docs/to_csv.md b/src/content/docs/commands/docs/to_csv.md similarity index 80% rename from commands/docs/to_csv.md rename to src/content/docs/commands/docs/to_csv.md index 5d2e2cf15ff..1560923d27c 100644 --- a/commands/docs/to_csv.md +++ b/src/content/docs/commands/docs/to_csv.md @@ -9,6 +9,7 @@ usage: | Convert table into .csv text . feature: default --- + # {{ $frontmatter.title }} for formats @@ -17,13 +18,12 @@ feature: default ## Signature -```> to csv {flags} ``` +`> to csv {flags} ` ## Flags - - `--separator, -s {string}`: a character to separate columns, defaults to ',' - - `--noheaders, -n`: do not output the columns names as the first row - +- `--separator, -s {string}`: a character to separate columns, defaults to ',' +- `--noheaders, -n`: do not output the columns names as the first row ## Input/output types: @@ -31,10 +31,12 @@ feature: default | ------ | ------ | | record | string | | table | string | + ## Examples Outputs an CSV string representing the contents of this table -```nu + +```nushell > [[foo bar]; [1 2]] | to csv foo,bar 1,2 @@ -42,7 +44,8 @@ foo,bar ``` Outputs an CSV string representing the contents of this table -```nu + +```nushell > [[foo bar]; [1 2]] | to csv --separator ';' foo;bar 1;2 @@ -50,7 +53,8 @@ foo;bar ``` Outputs an CSV string representing the contents of this record -```nu + +```nushell > {a: 1 b: 2} | to csv a,b 1,2 diff --git a/commands/docs/to_html.md b/src/content/docs/commands/docs/to_html.md similarity index 67% rename from commands/docs/to_html.md rename to src/content/docs/commands/docs/to_html.md index 8ddd2df54cd..0102643d950 100644 --- a/commands/docs/to_html.md +++ b/src/content/docs/commands/docs/to_html.md @@ -9,29 +9,29 @@ usage: | Convert table into simple HTML. feature: extra --- + # {{ $frontmatter.title }} for formats
{{ $frontmatter.formats }}
- ::: warning - Command `to html` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `to html` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> to html {flags} ``` +`> to html {flags} ` ## 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, ...) - - `--list, -l`: produce a color table of all available themes - +- `--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, ...) +- `--list, -l`: produce a color table of all available themes ## Input/output types: @@ -41,23 +41,27 @@ feature: extra ## Examples -Outputs an HTML string representing the contents of this table -```nu +Outputs an HTML string representing the contents of this table + +```nushell > [[foo bar]; [1 2]] | to html
foobar
12
``` Optionally, only output the html for the content itself -```nu + +```nushell > [[foo bar]; [1 2]] | to html --partial
foobar
12
``` Optionally, output the string with a dark background -```nu + +```nushell > [[foo bar]; [1 2]] | to html --dark
foobar
12
``` ## Notes -Screenshots of the themes can be browsed here: https://github.com/mbadolato/iTerm2-Color-Schemes. \ No newline at end of file + +Screenshots of the themes can be browsed here: https://github.com/mbadolato/iTerm2-Color-Schemes. diff --git a/commands/docs/to_json.md b/src/content/docs/commands/docs/to_json.md similarity index 81% rename from commands/docs/to_json.md rename to src/content/docs/commands/docs/to_json.md index 0442d8653af..0022a2e61e8 100644 --- a/commands/docs/to_json.md +++ b/src/content/docs/commands/docs/to_json.md @@ -9,6 +9,7 @@ usage: | Converts table data into JSON text. feature: default --- + # {{ $frontmatter.title }} for formats @@ -17,14 +18,13 @@ feature: default ## Signature -```> to json {flags} ``` +`> to json {flags} ` ## Flags - - `--raw, -r`: remove all of the whitespace - - `--indent, -i {number}`: specify indentation width - - `--tabs, -t {number}`: specify indentation tab quantity - +- `--raw, -r`: remove all of the whitespace +- `--indent, -i {number}`: specify indentation width +- `--tabs, -t {number}`: specify indentation tab quantity ## Input/output types: @@ -35,7 +35,8 @@ feature: default ## Examples Outputs a JSON string, with default indentation, representing the contents of this table -```nu + +```nushell > [a b c] | to json [ "a", @@ -45,7 +46,8 @@ 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 -```nu + +```nushell > [Joe Bob Sam] | to json --indent 4 [ "Joe", @@ -55,7 +57,8 @@ Outputs a JSON string, with 4-space indentation, representing the contents of th ``` Outputs an unformatted JSON string representing the contents of this table -```nu + +```nushell > [1 2 3] | to json -r [1,2,3] ``` diff --git a/commands/docs/to_md.md b/src/content/docs/commands/docs/to_md.md similarity index 83% rename from commands/docs/to_md.md rename to src/content/docs/commands/docs/to_md.md index 793a3225614..fec4b66f9dc 100644 --- a/commands/docs/to_md.md +++ b/src/content/docs/commands/docs/to_md.md @@ -9,6 +9,7 @@ usage: | Convert table into simple Markdown. feature: default --- + # {{ $frontmatter.title }} for formats @@ -17,13 +18,12 @@ feature: default ## Signature -```> to md {flags} ``` +`> to md {flags} ` ## Flags - - `--pretty, -p`: Formats the Markdown table to vertically align items - - `--per-element, -e`: treat each row as markdown syntax element - +- `--pretty, -p`: Formats the Markdown table to vertically align items +- `--per-element, -e`: treat each row as markdown syntax element ## Input/output types: @@ -34,7 +34,8 @@ feature: default ## Examples Outputs an MD string representing the contents of this table -```nu + +```nushell > [[foo bar]; [1 2]] | to md |foo|bar| |-|-| @@ -43,7 +44,8 @@ Outputs an MD string representing the contents of this table ``` Optionally, output a formatted markdown string -```nu + +```nushell > [[foo bar]; [1 2]] | to md --pretty | foo | bar | | --- | --- | @@ -52,7 +54,8 @@ Optionally, output a formatted markdown string ``` Treat each row as a markdown element -```nu + +```nushell > [{"H1": "Welcome to Nushell" } [[foo bar]; [1 2]]] | to md --per-element --pretty # Welcome to Nushell | foo | bar | @@ -61,7 +64,8 @@ Treat each row as a markdown element ``` Render a list -```nu + +```nushell > [0 1 2] | to md --pretty 0 1 diff --git a/commands/docs/to_nuon.md b/src/content/docs/commands/docs/to_nuon.md similarity index 80% rename from commands/docs/to_nuon.md rename to src/content/docs/commands/docs/to_nuon.md index 661efb4c1ad..d6b2008162d 100644 --- a/commands/docs/to_nuon.md +++ b/src/content/docs/commands/docs/to_nuon.md @@ -9,6 +9,7 @@ usage: | Converts table data into Nuon (Nushell Object Notation) text. feature: default --- + # {{ $frontmatter.title }} for formats @@ -17,14 +18,13 @@ feature: default ## Signature -```> to nuon {flags} ``` +`> to nuon {flags} ` ## Flags - - `--raw, -r`: remove all of the whitespace (default behaviour and overwrites -i and -t) - - `--indent, -i {number}`: specify indentation width - - `--tabs, -t {number}`: specify indentation tab quantity - +- `--raw, -r`: remove all of the whitespace (default behaviour and overwrites -i and -t) +- `--indent, -i {number}`: specify indentation width +- `--tabs, -t {number}`: specify indentation tab quantity ## Input/output types: @@ -35,13 +35,15 @@ feature: default ## Examples Outputs a NUON string representing the contents of this list, compact by default -```nu + +```nushell > [1 2 3] | to nuon [1, 2, 3] ``` Outputs a NUON array of ints, with pretty indentation -```nu + +```nushell > [1 2 3] | to nuon --indent 2 [ 1, @@ -51,13 +53,15 @@ Outputs a NUON array of ints, with pretty indentation ``` Overwrite any set option with --raw -```nu + +```nushell > [1 2 3] | to nuon --indent 2 --raw [1, 2, 3] ``` A more complex record with multiple data types -```nu + +```nushell > {date: 2000-01-01, data: [1 [2 3] 4.56]} | to nuon --indent 2 { date: 2000-01-01T00:00:00+00:00, diff --git a/commands/docs/to_text.md b/src/content/docs/commands/docs/to_text.md similarity index 92% rename from commands/docs/to_text.md rename to src/content/docs/commands/docs/to_text.md index 311532d3a0d..63f44e4666f 100644 --- a/commands/docs/to_text.md +++ b/src/content/docs/commands/docs/to_text.md @@ -9,6 +9,7 @@ usage: | Converts data into simple text. feature: default --- + # {{ $frontmatter.title }} for formats @@ -17,8 +18,7 @@ feature: default ## Signature -```> to text {flags} ``` - +`> to text {flags} ` ## Input/output types: @@ -29,19 +29,22 @@ feature: default ## Examples Outputs data as simple text -```nu + +```nushell > 1 | to text 1 ``` Outputs external data as simple text -```nu + +```nushell > git help -a | lines | find -r '^ ' | to text ``` Outputs records as simple text -```nu + +```nushell > ls | to text ``` diff --git a/commands/docs/to_toml.md b/src/content/docs/commands/docs/to_toml.md similarity index 95% rename from commands/docs/to_toml.md rename to src/content/docs/commands/docs/to_toml.md index 7e241435358..7608bba637c 100644 --- a/commands/docs/to_toml.md +++ b/src/content/docs/commands/docs/to_toml.md @@ -9,6 +9,7 @@ usage: | Convert record into .toml text. feature: default --- + # {{ $frontmatter.title }} for formats @@ -17,8 +18,7 @@ feature: default ## Signature -```> to toml {flags} ``` - +`> to toml {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Outputs an TOML string representing the contents of this record -```nu + +```nushell > {foo: 1 bar: 'qwe'} | to toml bar = "qwe" foo = 1 diff --git a/commands/docs/to_tsv.md b/src/content/docs/commands/docs/to_tsv.md similarity index 86% rename from commands/docs/to_tsv.md rename to src/content/docs/commands/docs/to_tsv.md index 8b3b3f42162..bac17dfff05 100644 --- a/commands/docs/to_tsv.md +++ b/src/content/docs/commands/docs/to_tsv.md @@ -9,6 +9,7 @@ usage: | Convert table into .tsv text. feature: default --- + # {{ $frontmatter.title }} for formats @@ -17,12 +18,11 @@ feature: default ## Signature -```> to tsv {flags} ``` +`> to tsv {flags} ` ## Flags - - `--noheaders, -n`: do not output the column names as the first row - +- `--noheaders, -n`: do not output the column names as the first row ## Input/output types: @@ -30,10 +30,12 @@ feature: default | ------ | ------ | | record | string | | table | string | + ## Examples Outputs an TSV string representing the contents of this table -```nu + +```nushell > [[foo bar]; [1 2]] | to tsv foobar 12 @@ -41,7 +43,8 @@ foobar ``` Outputs an TSV string representing the contents of this record -```nu + +```nushell > {a: 1 b: 2} | to tsv ab 12 diff --git a/commands/docs/to_xml.md b/src/content/docs/commands/docs/to_xml.md similarity index 86% rename from commands/docs/to_xml.md rename to src/content/docs/commands/docs/to_xml.md index 23ea6f8ee92..99d2afb2fad 100644 --- a/commands/docs/to_xml.md +++ b/src/content/docs/commands/docs/to_xml.md @@ -9,6 +9,7 @@ usage: | Convert special record structure into .xml text. feature: default --- + # {{ $frontmatter.title }} for formats @@ -17,14 +18,13 @@ feature: default ## Signature -```> to xml {flags} ``` +`> to xml {flags} ` ## 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: @@ -35,19 +35,22 @@ feature: default ## Examples Outputs an XML string representing the contents of this table -```nu + +```nushell > {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 -```nu + +```nushell > {tag: note content : [{tag: remember content : [Event]}]} | to xml Event ``` Optionally, formats the text with a custom indentation setting -```nu + +```nushell > {tag: note content : [{tag: remember content : [Event]}]} | to xml --indent 3 Event @@ -55,23 +58,27 @@ Optionally, formats the text with a custom indentation setting ``` Produce less escaping sequences in resulting xml -```nu + +```nushell > {tag: note attributes: {a: "'qwe'\\"} content: ["\"'"]} | to xml --partial-escape "' ``` Save space using self-closed tags -```nu + +```nushell > {tag: root content: [[tag]; [a] [b] [c]]} | to xml --self-closed
``` ## Notes + Every XML entry is represented via a record with tag, attribute and content fields. To represent different types of entries different values must be written to this fields: + 1. Tag entry: `{tag: attributes: {: "" ...} content: []}` 2. Comment entry: `{tag: '!' attributes: null content: ""}` 3. Processing instruction (PI): `{tag: '?' attributes: null content: ""}` 4. Text: `{tag: null attributes: null content: ""}`. Or as plain `` instead of record. -Additionally any field which is: empty record, empty list or null, can be omitted. \ No newline at end of file +Additionally any field which is: empty record, empty list or null, can be omitted. diff --git a/commands/docs/to_yaml.md b/src/content/docs/commands/docs/to_yaml.md similarity index 95% rename from commands/docs/to_yaml.md rename to src/content/docs/commands/docs/to_yaml.md index 6e53919a878..10d2b1ca132 100644 --- a/commands/docs/to_yaml.md +++ b/src/content/docs/commands/docs/to_yaml.md @@ -9,6 +9,7 @@ usage: | Convert table into .yaml/.yml text. feature: default --- + # {{ $frontmatter.title }} for formats @@ -17,8 +18,7 @@ feature: default ## Signature -```> to yaml {flags} ``` - +`> to yaml {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Outputs an YAML string representing the contents of this table -```nu + +```nushell > [[foo bar]; ["1" "2"]] | to yaml - foo: '1' bar: '2' diff --git a/commands/docs/touch.md b/src/content/docs/commands/docs/touch.md similarity index 60% rename from commands/docs/touch.md rename to src/content/docs/commands/docs/touch.md index cd0af6ff62e..b4c344891ff 100644 --- a/commands/docs/touch.md +++ b/src/content/docs/commands/docs/touch.md @@ -9,6 +9,7 @@ usage: | Creates one or more files. feature: default --- + # {{ $frontmatter.title }} for filesystem @@ -17,20 +18,19 @@ feature: default ## Signature -```> touch {flags} (filename) ...rest``` +`> touch {flags} (filename) ...rest` ## Flags - - `--reference, -r {string}`: change the file or directory time to the time of the reference file/directory - - `--modified, -m`: change the modification time of the file or directory. If no timestamp, date or reference file/directory is given, the current time is used - - `--access, -a`: change the access time of the file or directory. If no timestamp, date or reference file/directory is given, the current time is used - - `--no-create, -c`: do not create the file if it does not exist +- `--reference, -r {string}`: change the file or directory time to the time of the reference file/directory +- `--modified, -m`: change the modification time of the file or directory. If no timestamp, date or reference file/directory is given, the current time is used +- `--access, -a`: change the access time of the file or directory. If no timestamp, date or reference file/directory is given, the current time is used +- `--no-create, -c`: do not create the file if it does not exist ## Parameters - - `filename`: The path of the file you want to create. - - `...rest`: Additional files to create. - +- `filename`: The path of the file you want to create. +- `...rest`: Additional files to create. ## Input/output types: @@ -41,37 +41,43 @@ feature: default ## Examples Creates "fixture.json" -```nu + +```nushell > touch fixture.json ``` Creates files a, b and c -```nu + +```nushell > touch a b c ``` Changes the last modified time of "fixture.json" to today's date -```nu + +```nushell > touch -m fixture.json ``` Changes the last modified time of files a, b and c to a date -```nu + +```nushell > touch -m -d "yesterday" a b c ``` Changes the last modified time of file d and e to "fixture.json"'s last modified time -```nu + +```nushell > touch -m -r fixture.json d e ``` Changes the last accessed time of "fixture.json" to a date -```nu + +```nushell > touch -a -d "August 24, 2019; 12:30:30" fixture.json ``` diff --git a/commands/docs/transpose.md b/src/content/docs/commands/docs/transpose.md similarity index 77% rename from commands/docs/transpose.md rename to src/content/docs/commands/docs/transpose.md index 45a44a2f5ae..70b61871ef8 100644 --- a/commands/docs/transpose.md +++ b/src/content/docs/commands/docs/transpose.md @@ -9,6 +9,7 @@ usage: | Transposes the table contents so rows become columns and columns become rows. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,20 +18,19 @@ feature: default ## Signature -```> transpose {flags} ...rest``` +`> transpose {flags} ...rest` ## Flags - - `--header-row, -r`: treat the first row as column names - - `--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`: treat the first row as column names +- `--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 - - `...rest`: The names to give columns once transposed. - +- `...rest`: The names to give columns once transposed. ## Input/output types: @@ -38,10 +38,12 @@ feature: default | ------ | ------ | | record | table | | table | any | + ## Examples Transposes the table contents with default column names -```nu + +```nushell > [[c1 c2]; [1 2]] | transpose ╭───┬─────────┬─────────╮ │ # │ column0 │ column1 │ @@ -53,7 +55,8 @@ Transposes the table contents with default column names ``` Transposes the table contents with specified column names -```nu + +```nushell > [[c1 c2]; [1 2]] | transpose key val ╭───┬─────┬─────╮ │ # │ key │ val │ @@ -65,7 +68,8 @@ Transposes the table contents with specified column names ``` Transposes the table without column names and specify a new column name -```nu + +```nushell > [[c1 c2]; [1 2]] | transpose --ignore-titles val ╭───┬─────╮ │ # │ val │ @@ -77,7 +81,8 @@ Transposes the table without column names and specify a new column name ``` Transfer back to record with -d flag -```nu + +```nushell > {c1: 1, c2: 2} | transpose | transpose --ignore-titles -r -d ╭────┬───╮ │ c1 │ 1 │ diff --git a/commands/docs/try.md b/src/content/docs/commands/docs/try.md similarity index 82% rename from commands/docs/try.md rename to src/content/docs/commands/docs/try.md index f05e89afd60..26bb24b16ba 100644 --- a/commands/docs/try.md +++ b/src/content/docs/commands/docs/try.md @@ -9,6 +9,7 @@ usage: | Try to run a block, if it fails optionally run a catch block. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,13 +18,12 @@ feature: default ## Signature -```> try {flags} (try_block) (catch_block)``` +`> try {flags} (try_block) (catch_block)` ## Parameters - - `try_block`: Block to run. - - `catch_block`: Block to run if try block fails. - +- `try_block`: Block to run. +- `catch_block`: Block to run if try block fails. ## Input/output types: @@ -34,13 +34,15 @@ feature: default ## Examples Try to run a missing command -```nu + +```nushell > try { asdfasdf } ``` Try to run a missing command -```nu + +```nushell > try { asdfasdf } catch { 'missing' } missing ``` diff --git a/commands/docs/tutor.md b/src/content/docs/commands/docs/tutor.md similarity index 78% rename from commands/docs/tutor.md rename to src/content/docs/commands/docs/tutor.md index 3a8a234cc1e..5845eb75477 100644 --- a/commands/docs/tutor.md +++ b/src/content/docs/commands/docs/tutor.md @@ -9,6 +9,7 @@ usage: | Run the tutorial. To begin, run: tutor. feature: default --- + # {{ $frontmatter.title }} for misc @@ -17,16 +18,15 @@ feature: default ## Signature -```> tutor {flags} (search)``` +`> tutor {flags} (search)` ## Flags - - `--find, -f {string}`: Search tutorial for a phrase +- `--find, -f {string}`: Search tutorial for a phrase ## Parameters - - `search`: Item to search for, or 'list' to list available tutorials. - +- `search`: Item to search for, or 'list' to list available tutorials. ## Input/output types: @@ -37,13 +37,15 @@ feature: default ## Examples Begin the tutorial -```nu + +```nushell > tutor begin ``` Search a tutorial by phrase -```nu + +```nushell > tutor --find "$in" ``` diff --git a/commands/docs/ulimit.md b/src/content/docs/commands/docs/ulimit.md similarity index 56% rename from commands/docs/ulimit.md rename to src/content/docs/commands/docs/ulimit.md index 7912c966bbc..676bc846766 100644 --- a/commands/docs/ulimit.md +++ b/src/content/docs/commands/docs/ulimit.md @@ -9,6 +9,7 @@ usage: | Set or get resource usage limits. feature: default --- + # {{ $frontmatter.title }} for platform @@ -17,25 +18,24 @@ feature: default ## Signature -```> ulimit {flags} (limit)``` +`> ulimit {flags} (limit)` ## Flags - - `--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 - - `--file-descriptor-count, -n`: Maximum number of open file descriptors - - `--stack-size, -s`: Maximum stack size - - `--cpu-time, -t`: Maximum amount of CPU time in seconds - - `--virtual-memory-size, -v`: Maximum amount of virtual memory available to each process +- `--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 +- `--file-descriptor-count, -n`: Maximum number of open file descriptors +- `--stack-size, -s`: Maximum stack size +- `--cpu-time, -t`: Maximum amount of CPU time in seconds +- `--virtual-memory-size, -v`: Maximum amount of virtual memory available to each process ## Parameters - - `limit`: Limit value. - +- `limit`: Limit value. ## Input/output types: @@ -46,37 +46,43 @@ feature: default ## Examples Print all current limits -```nu + +```nushell > ulimit -a ``` Print specified limits -```nu + +```nushell > ulimit --core-size --data-size --file-size ``` Set limit -```nu + +```nushell > ulimit --core-size 102400 ``` Set stack size soft limit -```nu + +```nushell > ulimit -s -S 10240 ``` Set virtual memory size hard limit -```nu + +```nushell > ulimit -v -H 10240 ``` Set core size limit to unlimited -```nu + +```nushell > ulimit -c unlimited ``` diff --git a/commands/docs/umkdir.md b/src/content/docs/commands/docs/umkdir.md similarity index 83% rename from commands/docs/umkdir.md rename to src/content/docs/commands/docs/umkdir.md index 277bde84b46..203e8dc23d5 100644 --- a/commands/docs/umkdir.md +++ b/src/content/docs/commands/docs/umkdir.md @@ -9,6 +9,7 @@ usage: | Create directories, with intermediary directories if required using uutils/coreutils mkdir. feature: default --- + # {{ $frontmatter.title }} for filesystem @@ -17,16 +18,15 @@ feature: default ## Signature -```> umkdir {flags} ...rest``` +`> umkdir {flags} ...rest` ## Flags - - `--verbose, -v`: print a message for each created directory. +- `--verbose, -v`: print a message for each created directory. ## Parameters - - `...rest`: The name(s) of the path(s) to create. - +- `...rest`: The name(s) of the path(s) to create. ## Input/output types: @@ -37,13 +37,15 @@ feature: default ## Examples Make a directory named foo -```nu + +```nushell > umkdir foo ``` Make multiple directories and show the paths created -```nu + +```nushell > umkdir -v foo/bar foo2 ``` diff --git a/commands/docs/umv.md b/src/content/docs/commands/docs/umv.md similarity index 67% rename from commands/docs/umv.md rename to src/content/docs/commands/docs/umv.md index d3623e742f8..d3486e9f2b3 100644 --- a/commands/docs/umv.md +++ b/src/content/docs/commands/docs/umv.md @@ -9,6 +9,7 @@ usage: | Move files or directories. feature: default --- + # {{ $frontmatter.title }} for filesystem @@ -17,20 +18,19 @@ feature: default ## Signature -```> umv {flags} ...rest``` +`> umv {flags} ...rest` ## 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 - - `--no-clobber, -n`: do not overwrite an existing file +- `--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 +- `--no-clobber, -n`: do not overwrite an existing file ## Parameters - - `...rest`: Rename SRC to DST, or move SRC to DIR. - +- `...rest`: Rename SRC to DST, or move SRC to DIR. ## Input/output types: @@ -41,19 +41,22 @@ feature: default ## Examples Rename a file -```nu + +```nushell > umv before.txt after.txt ``` Move a file into a directory -```nu + +```nushell > umv test.txt my/subdirectory ``` Move many files into a directory -```nu + +```nushell > umv *.txt my/subdirectory ``` diff --git a/commands/docs/uniq-by.md b/src/content/docs/commands/docs/uniq-by.md similarity index 68% rename from commands/docs/uniq-by.md rename to src/content/docs/commands/docs/uniq-by.md index b774a906348..c2a0493e095 100644 --- a/commands/docs/uniq-by.md +++ b/src/content/docs/commands/docs/uniq-by.md @@ -9,6 +9,7 @@ usage: | Return the distinct values in the input by the given column(s). feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,30 +18,31 @@ feature: default ## Signature -```> uniq-by {flags} ...rest``` +`> uniq-by {flags} ...rest` ## 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 +- `--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 - - `...rest`: The column(s) to filter by. - +- `...rest`: The column(s) to filter by. ## Input/output types: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | -| table | table | +| table | table | + ## Examples Get rows from table filtered by column uniqueness -```nu + +```nushell > [[fruit count]; [apple 9] [apple 2] [pear 3] [orange 7]] | uniq-by fruit ╭───┬────────┬───────╮ │ # │ fruit │ count │ diff --git a/commands/docs/uniq.md b/src/content/docs/commands/docs/uniq.md similarity index 79% rename from commands/docs/uniq.md rename to src/content/docs/commands/docs/uniq.md index fbbd6254dbb..758b470fe60 100644 --- a/commands/docs/uniq.md +++ b/src/content/docs/commands/docs/uniq.md @@ -9,6 +9,7 @@ usage: | Return the distinct values in the input. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,26 +18,26 @@ feature: default ## Signature -```> uniq {flags} ``` +`> uniq {flags} ` ## 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: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | ## Examples Return the distinct values of a list/table (remove duplicates so that each value occurs once only) -```nu + +```nushell > [2 3 3 4] | uniq ╭───┬───╮ │ 0 │ 2 │ @@ -47,7 +48,8 @@ Return the distinct values of a list/table (remove duplicates so that each value ``` Return the input values that occur more than once -```nu + +```nushell > [1 2 2] | uniq -d ╭───┬───╮ │ 0 │ 2 │ @@ -56,7 +58,8 @@ Return the input values that occur more than once ``` Return the input values that occur once only -```nu + +```nushell > [1 2 2] | uniq --unique ╭───┬───╮ │ 0 │ 1 │ @@ -65,7 +68,8 @@ Return the input values that occur once only ``` Ignore differences in case when comparing input values -```nu + +```nushell > ['hello' 'goodbye' 'Hello'] | uniq --ignore-case ╭───┬─────────╮ │ 0 │ hello │ @@ -75,7 +79,8 @@ Ignore differences in case when comparing input values ``` Return a table containing the distinct input values together with their counts -```nu + +```nushell > [1 2 2] | uniq --count ╭───┬───────┬───────╮ │ # │ value │ count │ diff --git a/commands/docs/update.md b/src/content/docs/commands/docs/update.md similarity index 87% rename from commands/docs/update.md rename to src/content/docs/commands/docs/update.md index 73907d1b901..0c435a4162c 100644 --- a/commands/docs/update.md +++ b/src/content/docs/commands/docs/update.md @@ -9,6 +9,7 @@ usage: | Update an existing column to have a new value. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,25 +18,26 @@ feature: default ## Signature -```> update {flags} (field) (replacement value)``` +`> update {flags} (field) (replacement value)` ## Parameters - - `field`: The name of the column to update. - - `replacement value`: The new value to give the cell(s), or a closure to create the value. - +- `field`: The name of the column to update. +- `replacement value`: The new value to give the cell(s), or a closure to create the value. ## Input/output types: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | -| record | record | -| table | table | +| record | record | +| table | table | + ## Examples Update a column value -```nu + +```nushell > {'name': 'nu', 'stars': 5} | update name 'Nushell' ╭───────┬─────────╮ │ name │ Nushell │ @@ -44,7 +46,8 @@ Update a column value ``` Use a closure to alter each value in the 'authors' column to a single string -```nu + +```nushell > [[project, authors]; ['nu', ['Andrés', 'JT', 'Yehuda']]] | update authors {|row| $row.authors | str join ',' } ╭───┬─────────┬──────────────────╮ │ # │ project │ authors │ @@ -55,7 +58,8 @@ Use a closure to alter each value in the 'authors' column to a single string ``` You can also use a simple command to update 'authors' to a single string -```nu + +```nushell > [[project, authors]; ['nu', ['Andrés', 'JT', 'Yehuda']]] | update authors { str join ',' } ╭───┬─────────┬──────────────────╮ │ # │ project │ authors │ @@ -66,7 +70,8 @@ You can also use a simple command to update 'authors' to a single string ``` Update a value at an index in a list -```nu + +```nushell > [1 2 3] | update 1 4 ╭───┬───╮ │ 0 │ 1 │ @@ -77,7 +82,8 @@ Update a value at an index in a list ``` Use a closure to compute a new value at an index -```nu + +```nushell > [1 2 3] | update 1 {|i| $i + 2 } ╭───┬───╮ │ 0 │ 1 │ @@ -87,7 +93,6 @@ Use a closure to compute a new value at an index ``` - ## Subcommands: | name | type | usage | diff --git a/commands/docs/update_cells.md b/src/content/docs/commands/docs/update_cells.md similarity index 92% rename from commands/docs/update_cells.md rename to src/content/docs/commands/docs/update_cells.md index 15103c34e98..6556bf34b63 100644 --- a/commands/docs/update_cells.md +++ b/src/content/docs/commands/docs/update_cells.md @@ -9,28 +9,28 @@ usage: | Update the table cells. feature: extra --- + # {{ $frontmatter.title }} for filters
{{ $frontmatter.filters }}
- ::: warning - Command `update cells` was not included in the official binaries by default, you have to build it with `--features=extra` flag +Command `update cells` was not included in the official binaries by default, you have to build it with `--features=extra` flag ::: + ## Signature -```> update cells {flags} (closure)``` +`> update cells {flags} (closure)` ## Flags - - `--columns, -c {list}`: list of columns to update +- `--columns, -c {list}`: list of columns to update ## Parameters - - `closure`: the closure to run an update for each cell - +- `closure`: the closure to run an update for each cell ## Input/output types: @@ -41,7 +41,8 @@ feature: extra ## Examples Update the zero value cells to empty strings. -```nu + +```nushell > [ ["2021-04-16", "2021-06-10", "2021-09-18", "2021-10-15", "2021-11-16", "2021-11-17", "2021-11-18"]; [ 37, 0, 0, 0, 37, 0, 0] @@ -61,7 +62,8 @@ Update the zero value cells to empty strings. ``` Update the zero value cells to empty strings in 2 last columns. -```nu + +```nushell > [ ["2021-04-16", "2021-06-10", "2021-09-18", "2021-10-15", "2021-11-16", "2021-11-17", "2021-11-18"]; [ 37, 0, 0, 0, 37, 0, 0] diff --git a/commands/docs/upsert.md b/src/content/docs/commands/docs/upsert.md similarity index 85% rename from commands/docs/upsert.md rename to src/content/docs/commands/docs/upsert.md index 8479d85f820..daf991682d0 100644 --- a/commands/docs/upsert.md +++ b/src/content/docs/commands/docs/upsert.md @@ -9,6 +9,7 @@ usage: | Update an existing column to have a new value, or insert a new column. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,25 +18,26 @@ feature: default ## Signature -```> upsert {flags} (field) (replacement value)``` +`> upsert {flags} (field) (replacement value)` ## Parameters - - `field`: The name of the column to update or insert. - - `replacement value`: The new value to give the cell(s), or a closure to create the value. - +- `field`: The name of the column to update or insert. +- `replacement value`: The new value to give the cell(s), or a closure to create the value. ## Input/output types: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | -| record | record | -| table | table | +| record | record | +| table | table | + ## Examples Update a record's value -```nu + +```nushell > {'name': 'nu', 'stars': 5} | upsert name 'Nushell' ╭───────┬─────────╮ │ name │ Nushell │ @@ -44,7 +46,8 @@ Update a record's value ``` Insert a new entry into a record -```nu + +```nushell > {'name': 'nu', 'stars': 5} | upsert language 'Rust' ╭──────────┬──────╮ │ name │ nu │ @@ -54,7 +57,8 @@ Insert a new entry into a record ``` Update each row of a table -```nu + +```nushell > [[name lang]; [Nushell ''] [Reedline '']] | upsert lang 'Rust' ╭───┬──────────┬──────╮ │ # │ name │ lang │ @@ -66,7 +70,8 @@ Update each row of a table ``` Insert a new column with values computed based off the other columns -```nu + +```nushell > [[foo]; [7] [8] [9]] | upsert bar {|row| $row.foo * 2 } ╭───┬─────┬─────╮ │ # │ foo │ bar │ @@ -79,7 +84,8 @@ Insert a new column with values computed based off the other columns ``` Upsert into a list, updating an existing value at an index -```nu + +```nushell > [1 2 3] | upsert 0 2 ╭───┬───╮ │ 0 │ 2 │ @@ -90,7 +96,8 @@ Upsert into a list, updating an existing value at an index ``` Upsert into a list, inserting a new value at the end -```nu + +```nushell > [1 2 3] | upsert 3 4 ╭───┬───╮ │ 0 │ 1 │ diff --git a/commands/docs/url.md b/src/content/docs/commands/docs/url.md similarity index 98% rename from commands/docs/url.md rename to src/content/docs/commands/docs/url.md index c7211688283..5161ff6e1b1 100644 --- a/commands/docs/url.md +++ b/src/content/docs/commands/docs/url.md @@ -9,6 +9,7 @@ usage: | Various commands for working with URLs. feature: default --- + # {{ $frontmatter.title }} for network @@ -17,8 +18,7 @@ feature: default ## Signature -```> url {flags} ``` - +`> url {flags} ` ## Input/output types: @@ -27,6 +27,7 @@ feature: default | nothing | string | ## Notes + You must use one of the following subcommands. Using this command as-is will only produce this help message. ## Subcommands: @@ -37,4 +38,4 @@ You must use one of the following subcommands. Using this command as-is will onl | [`url decode`](/commands/docs/url_decode.md) | Builtin | Converts a percent-encoded web safe string to a string. | | [`url encode`](/commands/docs/url_encode.md) | Builtin | Converts a string to a percent encoded web safe string. | | [`url join`](/commands/docs/url_join.md) | Builtin | Converts a record to url. | -| [`url parse`](/commands/docs/url_parse.md) | Builtin | Parses a url. | \ No newline at end of file +| [`url parse`](/commands/docs/url_parse.md) | Builtin | Parses a url. | diff --git a/commands/docs/url_build-query.md b/src/content/docs/commands/docs/url_build-query.md similarity index 93% rename from commands/docs/url_build-query.md rename to src/content/docs/commands/docs/url_build-query.md index 5f5aae5ee50..862ae5824e3 100644 --- a/commands/docs/url_build-query.md +++ b/src/content/docs/commands/docs/url_build-query.md @@ -9,6 +9,7 @@ usage: | Converts record or table into query string applying percent-encoding. feature: default --- + # {{ $frontmatter.title }} for network @@ -17,8 +18,7 @@ feature: default ## Signature -```> url build-query {flags} ``` - +`> url build-query {flags} ` ## Input/output types: @@ -26,22 +26,26 @@ feature: default | ------ | ------ | | record | string | | table | string | + ## Examples Outputs a query string representing the contents of this record -```nu + +```nushell > { mode:normal userid:31415 } | url build-query mode=normal&userid=31415 ``` Outputs a query string representing the contents of this 1-row table -```nu + +```nushell > [[foo bar]; ["1" "2"]] | url build-query foo=1&bar=2 ``` Outputs a query string representing the contents of this record -```nu + +```nushell > {a:"AT&T", b: "AT T"} | url build-query a=AT%26T&b=AT+T ``` diff --git a/commands/docs/url_decode.md b/src/content/docs/commands/docs/url_decode.md similarity index 78% rename from commands/docs/url_decode.md rename to src/content/docs/commands/docs/url_decode.md index 6852db4ab2c..24ed62e47b4 100644 --- a/commands/docs/url_decode.md +++ b/src/content/docs/commands/docs/url_decode.md @@ -9,6 +9,7 @@ usage: | Converts a percent-encoded web safe string to a string. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,31 +18,33 @@ feature: default ## Signature -```> url decode {flags} ...rest``` +`> url decode {flags} ...rest` ## Parameters - - `...rest`: For a data structure input, url decode strings at the given cell paths. - +- `...rest`: For a data structure input, url decode strings at the given cell paths. ## Input/output types: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| record | record | -| string | string | -| table | table | +| record | record | +| string | string | +| table | table | + ## Examples Decode a url with escape characters -```nu + +```nushell > 'https://example.com/foo%20bar' | url decode https://example.com/foo bar ``` Decode multiple urls with escape characters in list -```nu + +```nushell > ['https://example.com/foo%20bar' 'https://example.com/a%3Eb' '%E4%B8%AD%E6%96%87%E5%AD%97/eng/12%2034'] | url decode ╭───┬─────────────────────────────╮ │ 0 │ https://example.com/foo bar │ diff --git a/commands/docs/url_encode.md b/src/content/docs/commands/docs/url_encode.md similarity index 76% rename from commands/docs/url_encode.md rename to src/content/docs/commands/docs/url_encode.md index 2525e32935e..2a05a9aa9ab 100644 --- a/commands/docs/url_encode.md +++ b/src/content/docs/commands/docs/url_encode.md @@ -9,6 +9,7 @@ usage: | Converts a string to a percent encoded web safe string. feature: default --- + # {{ $frontmatter.title }} for strings @@ -17,35 +18,37 @@ feature: default ## Signature -```> url encode {flags} ...rest``` +`> url encode {flags} ...rest` ## Flags - - `--all, -a`: encode all non-alphanumeric chars including `/`, `.`, `:` +- `--all, -a`: encode all non-alphanumeric chars including `/`, `.`, `:` ## Parameters - - `...rest`: For a data structure input, check strings at the given cell paths, and replace with result. - +- `...rest`: For a data structure input, check strings at the given cell paths, and replace with result. ## Input/output types: -| input | output | -| ------------ | ------------ | +| input | output | +| -------------- | -------------- | | list\ | list\ | -| record | record | -| string | string | -| table | table | +| record | record | +| string | string | +| table | table | + ## Examples Encode a url with escape characters -```nu + +```nushell > 'https://example.com/foo bar' | url encode https://example.com/foo%20bar ``` Encode multiple urls with escape characters in list -```nu + +```nushell > ['https://example.com/foo bar' 'https://example.com/a>b' '中文字/eng/12 34'] | url encode ╭───┬─────────────────────────────────────────╮ │ 0 │ https://example.com/foo%20bar │ @@ -56,7 +59,8 @@ Encode multiple urls with escape characters in list ``` Encode all non alphanumeric chars with all flag -```nu + +```nushell > 'https://example.com/foo bar' | url encode --all https%3A%2F%2Fexample%2Ecom%2Ffoo%20bar ``` diff --git a/commands/docs/url_join.md b/src/content/docs/commands/docs/url_join.md similarity index 96% rename from commands/docs/url_join.md rename to src/content/docs/commands/docs/url_join.md index 68327bbb7b0..e85e328bc54 100644 --- a/commands/docs/url_join.md +++ b/src/content/docs/commands/docs/url_join.md @@ -9,6 +9,7 @@ usage: | Converts a record to url. feature: default --- + # {{ $frontmatter.title }} for network @@ -17,8 +18,7 @@ feature: default ## Signature -```> url join {flags} ``` - +`> url join {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Outputs a url representing the contents of this record -```nu + +```nushell > { "scheme": "http", "username": "", @@ -49,7 +50,8 @@ http://www.pixiv.net/member_illust.php?mode=medium&illust_id=99260204 ``` Outputs a url representing the contents of this record -```nu + +```nushell > { "scheme": "http", "username": "user", @@ -63,7 +65,8 @@ http://user:pwd@www.pixiv.net:1234?test=a ``` Outputs a url representing the contents of this record -```nu + +```nushell > { "scheme": "http", "host": "www.pixiv.net", diff --git a/commands/docs/url_parse.md b/src/content/docs/commands/docs/url_parse.md similarity index 95% rename from commands/docs/url_parse.md rename to src/content/docs/commands/docs/url_parse.md index bc7ee295c91..75a8b033d61 100644 --- a/commands/docs/url_parse.md +++ b/src/content/docs/commands/docs/url_parse.md @@ -9,6 +9,7 @@ usage: | Parses a url. feature: default --- + # {{ $frontmatter.title }} for network @@ -17,12 +18,11 @@ feature: default ## Signature -```> url parse {flags} ...rest``` +`> url parse {flags} ...rest` ## Parameters - - `...rest`: Optionally operate by cell path. - +- `...rest`: Optionally operate by cell path. ## Input/output types: @@ -31,10 +31,12 @@ feature: default | record | record | | string | record | | table | table | + ## Examples Parses a url -```nu + +```nushell > 'http://user123:pass567@www.example.com:8081/foo/bar?param1=section&p2=&f[name]=vldc#hello' | url parse ╭──────────┬─────────────────────────────────╮ │ scheme │ http │ diff --git a/commands/docs/use.md b/src/content/docs/commands/docs/use.md similarity index 85% rename from commands/docs/use.md rename to src/content/docs/commands/docs/use.md index a30b58fe7f2..2c9e370da07 100644 --- a/commands/docs/use.md +++ b/src/content/docs/commands/docs/use.md @@ -9,6 +9,7 @@ usage: | Use definitions from a module, making them available in your shell. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,13 +18,12 @@ feature: default ## Signature -```> use {flags} (module) ...rest``` +`> use {flags} (module) ...rest` ## Parameters - - `module`: Module or module file. - - `...rest`: Which members of the module to import. - +- `module`: Module or module file. +- `...rest`: Which members of the module to import. ## Input/output types: @@ -34,44 +34,51 @@ feature: default ## Examples Define a custom command in a module and call it -```nu + +```nushell > 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 -```nu + +```nushell > 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 -```nu + +```nushell > 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 -```nu +Specify \* to use all definitions in a module + +```nushell > 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 -```nu + +```nushell > 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 -```nu + +```nushell > module spam { export def foo [] { "foo" }; export def 'foo bar' [] { "baz" } }; use spam ['foo', 'foo bar']; (foo) + (foo bar) foobaz ``` ## Notes + See `help std` for the standard library module. See `help modules` to list all available modules. This command is a parser keyword. For details, check: - https://www.nushell.sh/book/thinking_in_nu.html \ No newline at end of file +https://www.nushell.sh/book/thinking_in_nu.html diff --git a/commands/docs/values.md b/src/content/docs/commands/docs/values.md similarity index 94% rename from commands/docs/values.md rename to src/content/docs/commands/docs/values.md index f2e02d4e99a..b1adff3c3de 100644 --- a/commands/docs/values.md +++ b/src/content/docs/commands/docs/values.md @@ -9,6 +9,7 @@ usage: | Given a record or table, produce a list of its columns' values. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,19 +18,20 @@ feature: default ## Signature -```> values {flags} ``` - +`> values {flags} ` ## Input/output types: -| input | output | -| ------ | --------- | +| input | output | +| ------ | ----------- | | record | list\ | | table | list\ | + ## Examples Get the values from the record (produce a list) -```nu + +```nushell > { mode:normal userid:31415 } | values ╭───┬────────╮ │ 0 │ normal │ @@ -39,7 +41,8 @@ Get the values from the record (produce a list) ``` Values are ordered by the column order of the record -```nu + +```nushell > { f:250 g:191 c:128 d:1024 e:2000 a:16 b:32 } | values ╭───┬──────╮ │ 0 │ 250 │ @@ -54,7 +57,8 @@ Values are ordered by the column order of the record ``` Get the values from the table (produce a list of lists) -```nu + +```nushell > [[name meaning]; [ls list] [mv move] [cd 'change directory']] | values ╭───┬──────────────────────────╮ │ 0 │ ╭───┬────╮ │ @@ -72,4 +76,5 @@ Get the values from the table (produce a list of lists) ``` ## Notes -This is a counterpart to `columns`, which produces a list of columns' names. \ No newline at end of file + +This is a counterpart to `columns`, which produces a list of columns' names. diff --git a/commands/docs/version.md b/src/content/docs/commands/docs/version.md similarity index 94% rename from commands/docs/version.md rename to src/content/docs/commands/docs/version.md index b6ae1ab81f9..3e56cf8cf1a 100644 --- a/commands/docs/version.md +++ b/src/content/docs/commands/docs/version.md @@ -9,6 +9,7 @@ usage: | Display Nu version, and its build configuration. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,8 +18,7 @@ feature: default ## Signature -```> version {flags} ``` - +`> version {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Display Nu version -```nu + +```nushell > version ``` diff --git a/commands/docs/view.md b/src/content/docs/commands/docs/view.md similarity index 93% rename from commands/docs/view.md rename to src/content/docs/commands/docs/view.md index ea5305ba5c9..535dbba82ef 100644 --- a/commands/docs/view.md +++ b/src/content/docs/commands/docs/view.md @@ -9,6 +9,7 @@ usage: | Various commands for viewing debug information. feature: default --- + # {{ $frontmatter.title }} for debug @@ -17,8 +18,7 @@ feature: default ## Signature -```> view {flags} ``` - +`> view {flags} ` ## Input/output types: @@ -27,6 +27,7 @@ feature: default | nothing | string | ## Notes + You must use one of the following subcommands. Using this command as-is will only produce this help message. ## Subcommands: @@ -35,4 +36,4 @@ You must use one of the following subcommands. Using this command as-is will onl | ---------------------------------------------- | ------- | ---------------------------------------------------------- | | [`view files`](/commands/docs/view_files.md) | Builtin | View the files registered in nushell's EngineState memory. | | [`view source`](/commands/docs/view_source.md) | Builtin | View a block, module, or a definition. | -| [`view span`](/commands/docs/view_span.md) | Builtin | View the contents of a span. | \ No newline at end of file +| [`view span`](/commands/docs/view_span.md) | Builtin | View the contents of a span. | diff --git a/commands/docs/view_files.md b/src/content/docs/commands/docs/view_files.md similarity index 88% rename from commands/docs/view_files.md rename to src/content/docs/commands/docs/view_files.md index 7238bd2802e..e277a3b8282 100644 --- a/commands/docs/view_files.md +++ b/src/content/docs/commands/docs/view_files.md @@ -9,6 +9,7 @@ usage: | View the files registered in nushell's EngineState memory. feature: default --- + # {{ $frontmatter.title }} for debug @@ -17,28 +18,30 @@ feature: default ## Signature -```> view files {flags} ``` - +`> view files {flags} ` ## Input/output types: -| input | output | -| ------- | -------------------------------------------------------- | +| input | output | +| ------- | ---------------------------------------------------------- | | nothing | table\ | ## Examples View the files registered in Nushell's EngineState memory -```nu + +```nushell > view files ``` View how Nushell was originally invoked -```nu + +```nushell > view files | get 0 ``` ## Notes -These are files parsed and loaded at runtime. \ No newline at end of file + +These are files parsed and loaded at runtime. diff --git a/commands/docs/view_source.md b/src/content/docs/commands/docs/view_source.md similarity index 90% rename from commands/docs/view_source.md rename to src/content/docs/commands/docs/view_source.md index 81fcba2bfda..f7df7489d56 100644 --- a/commands/docs/view_source.md +++ b/src/content/docs/commands/docs/view_source.md @@ -9,6 +9,7 @@ usage: | View a block, module, or a definition. feature: default --- + # {{ $frontmatter.title }} for debug @@ -17,12 +18,11 @@ feature: default ## Signature -```> view source {flags} (item)``` +`> view source {flags} (item)` ## Parameters - - `item`: Name or block to view. - +- `item`: Name or block to view. ## Input/output types: @@ -33,37 +33,43 @@ feature: default ## Examples View the source of a code block -```nu + +```nushell > let abc = {|| echo 'hi' }; view source $abc {|| echo 'hi' } ``` View the source of a custom command -```nu + +```nushell > def hi [] { echo 'Hi!' }; view source hi def hi [] { echo 'Hi!' } ``` View the source of a custom command, which participates in the caller environment -```nu + +```nushell > def --env foo [] { $env.BAR = 'BAZ' }; view source foo def foo [] { $env.BAR = 'BAZ' } ``` View the source of a custom command with flags and arguments -```nu + +```nushell > 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 -```nu + +```nushell > 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 -```nu + +```nushell > alias hello = echo hi; view source hello echo hi ``` diff --git a/commands/docs/view_span.md b/src/content/docs/commands/docs/view_span.md similarity index 87% rename from commands/docs/view_span.md rename to src/content/docs/commands/docs/view_span.md index d362ac8458d..b58711e1c43 100644 --- a/commands/docs/view_span.md +++ b/src/content/docs/commands/docs/view_span.md @@ -9,6 +9,7 @@ usage: | View the contents of a span. feature: default --- + # {{ $frontmatter.title }} for debug @@ -17,13 +18,12 @@ feature: default ## Signature -```> view span {flags} (start) (end)``` +`> view span {flags} (start) (end)` ## Parameters - - `start`: Start of the span. - - `end`: End of the span. - +- `start`: Start of the span. +- `end`: End of the span. ## Input/output types: @@ -34,13 +34,15 @@ feature: default ## 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 -```nu + +```nushell > some | pipeline | or | variable | debug --raw; view span 1 2 ``` ## Notes + This command is meant for debugging purposes. It allows you to view the contents of nushell spans. One way to get spans is to pipe something into 'debug --raw'. -Then you can use the Span { start, end } values as the start and end values for this command. \ No newline at end of file +Then you can use the Span { start, end } values as the start and end values for this command. diff --git a/commands/docs/watch.md b/src/content/docs/commands/docs/watch.md similarity index 59% rename from commands/docs/watch.md rename to src/content/docs/commands/docs/watch.md index fe4d74c9225..710af67245e 100644 --- a/commands/docs/watch.md +++ b/src/content/docs/commands/docs/watch.md @@ -9,6 +9,7 @@ usage: | Watch for file changes and execute Nu code when they happen. feature: default --- + # {{ $frontmatter.title }} for filesystem @@ -17,20 +18,19 @@ feature: default ## Signature -```> watch {flags} (path) (closure)``` +`> watch {flags} (path) (closure)` ## 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 - - `--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) - - `--verbose, -v`: Operate in verbose mode (default: false) +- `--debounce-ms, -d {int}`: Debounce changes for this many milliseconds (default: 100). 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) +- `--verbose, -v`: Operate in verbose mode (default: false) ## Parameters - - `path`: The path to watch. Can be a file or directory. - - `closure`: Some Nu code to run whenever a file changes. The closure will be passed `operation`, `path`, and `new_path` (for renames only) arguments in that order. - +- `path`: The path to watch. Can be a file or directory. +- `closure`: Some Nu code to run whenever a file changes. The closure will be passed `operation`, `path`, and `new_path` (for renames only) arguments in that order. ## Input/output types: @@ -41,25 +41,29 @@ feature: default ## Examples Run `cargo test` whenever a Rust file changes -```nu + +```nushell > watch . --glob=**/*.rs {|| cargo test } ``` Watch all changes in the current directory -```nu + +```nushell > watch . { |op, path, new_path| $"($op) ($path) ($new_path)"} ``` Log all changes in a directory -```nu + +```nushell > watch /foo/bar { |op, path| $"($op) - ($path)(char nl)" | save --append changes_in_bar.log } ``` Note: if you are looking to run a command every N units of time, this can be accomplished with a loop and sleep -```nu + +```nushell > loop { command; sleep duration } ``` diff --git a/commands/docs/where.md b/src/content/docs/commands/docs/where.md similarity index 85% rename from commands/docs/where.md rename to src/content/docs/commands/docs/where.md index 3314d82c886..2c92d07644d 100644 --- a/commands/docs/where.md +++ b/src/content/docs/commands/docs/where.md @@ -9,6 +9,7 @@ usage: | Filter values based on a row condition. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,24 +18,25 @@ feature: default ## Signature -```> where {flags} (row_condition)``` +`> where {flags} (row_condition)` ## Parameters - - `row_condition`: Filter condition. - +- `row_condition`: Filter condition. ## Input/output types: -| input | output | -| --------- | --------- | +| input | output | +| ----------- | ----------- | | list\ | list\ | -| range | any | -| table | table | +| range | any | +| table | table | + ## Examples Filter rows of a table according to a condition -```nu + +```nushell > [{a: 1} {a: 2}] | where a > 1 ╭───┬───╮ │ # │ a │ @@ -45,7 +47,8 @@ Filter rows of a table according to a condition ``` Filter items of a list according to a condition -```nu + +```nushell > [1 2] | where {|x| $x > 1} ╭───┬───╮ │ 0 │ 2 │ @@ -54,48 +57,56 @@ Filter items of a list according to a condition ``` List all files in the current directory with sizes greater than 2kb -```nu + +```nushell > ls | where size > 2kb ``` List only the files in the current directory -```nu + +```nushell > ls | where type == file ``` List all files with names that contain "Car" -```nu + +```nushell > ls | where name =~ "Car" ``` List all files that were modified in the last two weeks -```nu + +```nushell > ls | where modified >= (date now) - 2wk ``` Find files whose filenames don't begin with the correct sequential number -```nu + +```nushell > ls | where type == file | sort-by name --natural | enumerate | where {|e| $e.item.name !~ $'^($e.index + 1)' } | each {|| get item } ``` Find case-insensitively files called "readme", without an explicit closure -```nu + +```nushell > ls | where ($it.name | str downcase) =~ readme ``` same as above but with regex only -```nu + +```nushell > ls | where name =~ '(?i)readme' ``` ## Notes + This command works similar to 'filter' but allows extra shorthands for working with tables, known as "row conditions". On the other hand, reading the condition from a variable is -not supported. \ No newline at end of file +not supported. diff --git a/commands/docs/which.md b/src/content/docs/commands/docs/which.md similarity index 79% rename from commands/docs/which.md rename to src/content/docs/commands/docs/which.md index d11d4f507e6..b97039ddc64 100644 --- a/commands/docs/which.md +++ b/src/content/docs/commands/docs/which.md @@ -9,6 +9,7 @@ usage: | Finds a program file, alias or custom command. feature: default --- + # {{ $frontmatter.title }} for system @@ -17,17 +18,16 @@ feature: default ## Signature -```> which {flags} (application) ...rest``` +`> which {flags} (application) ...rest` ## Flags - - `--all, -a`: list all executables +- `--all, -a`: list all executables ## Parameters - - `application`: Application. - - `...rest`: Additional applications. - +- `application`: Application. +- `...rest`: Additional applications. ## Input/output types: @@ -38,7 +38,8 @@ feature: default ## Examples Find if the 'myapp' application is available -```nu + +```nushell > which myapp ``` diff --git a/commands/docs/while.md b/src/content/docs/commands/docs/while.md similarity index 83% rename from commands/docs/while.md rename to src/content/docs/commands/docs/while.md index d579d3cd0ba..e8b4897913c 100644 --- a/commands/docs/while.md +++ b/src/content/docs/commands/docs/while.md @@ -9,6 +9,7 @@ usage: | Conditionally run a block in a loop. feature: default --- + # {{ $frontmatter.title }} for core @@ -17,13 +18,12 @@ feature: default ## Signature -```> while {flags} (cond) (block)``` +`> while {flags} (cond) (block)` ## Parameters - - `cond`: Condition to check. - - `block`: Block to loop if check succeeds. - +- `cond`: Condition to check. +- `block`: Block to loop if check succeeds. ## Input/output types: @@ -34,7 +34,8 @@ feature: default ## Examples Loop while a condition is true -```nu + +```nushell > mut x = 0; while $x < 10 { $x = $x + 1 } ``` diff --git a/commands/docs/whoami.md b/src/content/docs/commands/docs/whoami.md similarity index 95% rename from commands/docs/whoami.md rename to src/content/docs/commands/docs/whoami.md index 4f771cbfb51..951a1949778 100644 --- a/commands/docs/whoami.md +++ b/src/content/docs/commands/docs/whoami.md @@ -9,6 +9,7 @@ usage: | Get the current username using uutils/coreutils whoami. feature: default --- + # {{ $frontmatter.title }} for platform @@ -17,8 +18,7 @@ feature: default ## Signature -```> whoami {flags} ``` - +`> whoami {flags} ` ## Input/output types: @@ -29,7 +29,8 @@ feature: default ## Examples Get the current username -```nu + +```nushell > whoami ``` diff --git a/commands/docs/window.md b/src/content/docs/commands/docs/window.md similarity index 87% rename from commands/docs/window.md rename to src/content/docs/commands/docs/window.md index 0534b910875..cde0b3e00d0 100644 --- a/commands/docs/window.md +++ b/src/content/docs/commands/docs/window.md @@ -9,6 +9,7 @@ usage: | Creates a sliding window of `window_size` that slide by n rows/elements across input. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,28 +18,28 @@ feature: default ## Signature -```> window {flags} (window_size)``` +`> window {flags} (window_size)` ## 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 - - `window_size`: The size of each window. - +- `window_size`: The size of each window. ## Input/output types: -| input | output | -| --------- | --------------- | +| input | output | +| ----------- | ------------------- | | list\ | list\\> | ## Examples A sliding window of two elements -```nu + +```nushell > [1 2 3 4] | window 2 ╭───┬───────────╮ │ 0 │ ╭───┬───╮ │ @@ -58,7 +59,8 @@ A sliding window of two elements ``` A sliding window of two elements, with a stride of 3 -```nu + +```nushell > [1, 2, 3, 4, 5, 6, 7, 8] | window 2 --stride 3 ╭───┬───────────╮ │ 0 │ ╭───┬───╮ │ @@ -78,7 +80,8 @@ A sliding window of two elements, with a stride of 3 ``` A sliding window of equal stride that includes remainder. Equivalent to chunking -```nu + +```nushell > [1, 2, 3, 4, 5] | window 3 --stride 3 --remainder ╭───┬───────────╮ │ 0 │ ╭───┬───╮ │ diff --git a/commands/docs/with-env.md b/src/content/docs/commands/docs/with-env.md similarity index 82% rename from commands/docs/with-env.md rename to src/content/docs/commands/docs/with-env.md index 9adfdb2cba2..d63dc06c257 100644 --- a/commands/docs/with-env.md +++ b/src/content/docs/commands/docs/with-env.md @@ -9,6 +9,7 @@ usage: | Runs a block with an environment variable set. feature: default --- + # {{ $frontmatter.title }} for env @@ -17,13 +18,12 @@ feature: default ## Signature -```> with-env {flags} (variable) (block)``` +`> with-env {flags} (variable) (block)` ## Parameters - - `variable`: The environment variable to temporarily set. - - `block`: The block to run once the variable is set. - +- `variable`: The environment variable to temporarily set. +- `block`: The block to run once the variable is set. ## Input/output types: @@ -34,25 +34,29 @@ feature: default ## Examples Set the MYENV environment variable -```nu + +```nushell > with-env [MYENV "my env value"] { $env.MYENV } my env value ``` Set by primitive value list -```nu + +```nushell > with-env [X Y W Z] { $env.X } Y ``` Set by single row table -```nu + +```nushell > with-env [[X W]; [Y Z]] { $env.W } Z ``` Set by key-value record -```nu + +```nushell > with-env {X: "Y", W: "Z"} { [$env.X $env.W] } ╭───┬───╮ │ 0 │ Y │ diff --git a/commands/docs/wrap.md b/src/content/docs/commands/docs/wrap.md similarity index 84% rename from commands/docs/wrap.md rename to src/content/docs/commands/docs/wrap.md index ec8a8855960..3d9c00e5948 100644 --- a/commands/docs/wrap.md +++ b/src/content/docs/commands/docs/wrap.md @@ -9,6 +9,7 @@ usage: | Wrap the value into a column. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,24 +18,25 @@ feature: default ## Signature -```> wrap {flags} (name)``` +`> wrap {flags} (name)` ## Parameters - - `name`: The name of the column. - +- `name`: The name of the column. ## Input/output types: -| input | output | -| --------- | ------ | -| any | record | +| input | output | +| ----------- | ------ | +| any | record | | list\ | table | -| range | table | +| range | table | + ## Examples Wrap a list into a table with a given column name -```nu + +```nushell > [1 2 3] | wrap num ╭───┬─────╮ │ # │ num │ @@ -47,7 +49,8 @@ Wrap a list into a table with a given column name ``` Wrap a range into a table with a given column name -```nu + +```nushell > 1..3 | wrap num ╭───┬─────╮ │ # │ num │ diff --git a/commands/docs/zip.md b/src/content/docs/commands/docs/zip.md similarity index 89% rename from commands/docs/zip.md rename to src/content/docs/commands/docs/zip.md index d1856d9ea00..f7f50fc9d9e 100644 --- a/commands/docs/zip.md +++ b/src/content/docs/commands/docs/zip.md @@ -9,6 +9,7 @@ usage: | Combine a stream with the input. feature: default --- + # {{ $frontmatter.title }} for filters @@ -17,23 +18,24 @@ feature: default ## Signature -```> zip {flags} (other)``` +`> zip {flags} (other)` ## Parameters - - `other`: The other input. - +- `other`: The other input. ## Input/output types: -| input | output | -| --------- | --------------- | +| input | output | +| ----------- | ------------------- | | list\ | list\\> | -| range | list\\> | +| range | list\\> | + ## Examples Zip two lists -```nu + +```nushell > [1 2] | zip [3 4] ╭───┬───────────╮ │ 0 │ ╭───┬───╮ │ @@ -49,7 +51,8 @@ Zip two lists ``` Zip two ranges -```nu + +```nushell > 1..3 | zip 4..6 ╭───┬───────────╮ │ 0 │ ╭───┬───╮ │ @@ -69,7 +72,8 @@ Zip two ranges ``` Rename .ogg files to match an existing list of filenames -```nu + +```nushell > glob *.ogg | zip ['bang.ogg', 'fanfare.ogg', 'laser.ogg'] | each {|| mv $in.0 $in.1 } ``` diff --git a/contributor-book/README.md b/src/content/docs/contributor-book/README.md similarity index 100% rename from contributor-book/README.md rename to src/content/docs/contributor-book/README.md diff --git a/contributor-book/commands.md b/src/content/docs/contributor-book/commands.md similarity index 100% rename from contributor-book/commands.md rename to src/content/docs/contributor-book/commands.md diff --git a/contributor-book/philosophy.md b/src/content/docs/contributor-book/philosophy.md similarity index 100% rename from contributor-book/philosophy.md rename to src/content/docs/contributor-book/philosophy.md diff --git a/contributor-book/philosophy_0_80.md b/src/content/docs/contributor-book/philosophy_0_80.md similarity index 100% rename from contributor-book/philosophy_0_80.md rename to src/content/docs/contributor-book/philosophy_0_80.md diff --git a/contributor-book/plugins.md b/src/content/docs/contributor-book/plugins.md similarity index 99% rename from contributor-book/plugins.md rename to src/content/docs/contributor-book/plugins.md index dc0c00b8dee..b070cc87e2e 100644 --- a/contributor-book/plugins.md +++ b/src/content/docs/contributor-book/plugins.md @@ -282,7 +282,7 @@ This signature tells Nu everything it needs to pass data in and out of the plugi Now let's try simulating an invocation. Above we tested the plugin within Nu by executing the command `"hello" | len` and we got the response `5`. Of course this hides all of the typed data handling that makes Nu so powerful. -```nu +```nushell $ echo '{"CallInfo":{"name":"len","call":{"head":{"start":100953,"end":100957},"positional":[],"named":[]},"input":{"Value":{"String":{"val":"hello","span":{"start":100953,"end":100957}}}}}}' | target/release/nu_plugin_len json{"Value":{"Int":{"val":5,"span":{"start":100953,"end":100957}}}} ``` diff --git a/cookbook/README.md b/src/content/docs/cookbook/README.md similarity index 65% rename from cookbook/README.md rename to src/content/docs/cookbook/README.md index 76b391a1ca6..d709b1c2bcd 100644 --- a/cookbook/README.md +++ b/src/content/docs/cookbook/README.md @@ -1,3 +1,11 @@ +--- +title: Introducing nushell +author: Jonathan Turner +author_site: https://twitter.com/jntrnr +author_image: https://www.nushell.sh/blog/images/jonathandturner.jpg +excerpt: Today, we're introducing a new shell, written in Rust. It draws inspiration from the classic Unix philosophy of pipelines, the structured data approach of PowerShell, functional programming, systems programming, and more. +--- + # Cookbook In this section we have put together a bunch of useful tips to get you @@ -13,7 +21,7 @@ written for Nushell. And if you are looking for cool oneliners like this one -```nu +```nushell (http get https://api.chucknorris.io/jokes/random).value ``` diff --git a/cookbook/direnv.md b/src/content/docs/cookbook/direnv.md similarity index 98% rename from cookbook/direnv.md rename to src/content/docs/cookbook/direnv.md index 582e60a7aa7..9293f888c52 100644 --- a/cookbook/direnv.md +++ b/src/content/docs/cookbook/direnv.md @@ -13,7 +13,7 @@ Configuring direnv to work with nushell requires nushell version 0.66 or later. To make direnv work with nushell the way it does with other shells, we can use the "hooks" functionality: -```nu +```nushell $env.config = { hooks: { pre_prompt: [{ || diff --git a/cookbook/external_completers.md b/src/content/docs/cookbook/external_completers.md similarity index 98% rename from cookbook/external_completers.md rename to src/content/docs/cookbook/external_completers.md index 3c53eac8310..c978dbb8de7 100644 --- a/cookbook/external_completers.md +++ b/src/content/docs/cookbook/external_completers.md @@ -8,7 +8,7 @@ title: External Completers ### Carapace completer -```nu +```nushell let carapace_completer = {|spans| carapace $spans.0 nushell ...$spans | from json } @@ -18,7 +18,7 @@ let carapace_completer = {|spans| This completer will use [the fish shell](https://fishshell.com/) to handle completions. Fish handles out of the box completions for many popular tools and commands. -```nu +```nushell let fish_completer = {|spans| fish --command $'complete "--do-complete=($spans | str join " ")"' | $"value(char tab)description(char newline)" + $in @@ -36,7 +36,7 @@ A couple of things to note on this command: [Zoxide](https://github.com/ajeetdsouza/zoxide) allows easily jumping between visited folders in the system. It's possible to autocomplete matching folders with this completer: -```nu +```nushell let zoxide_completer = {|spans| $spans | skip 1 | zoxide query -l $in | lines | where {|x| $x != $env.PWD} } @@ -44,7 +44,7 @@ let zoxide_completer = {|spans| This completer is not usable for almost every other command, so it's recommended to add it as an override in the [multiple completer](#multiple-completer): -```nu +```nushell { z => $zoxide_completer zi => $zoxide_completer @@ -55,7 +55,7 @@ This completer is not usable for almost every other command, so it's recommended > Zoxide sets an alias (`z` by default) that calls the `__zoxide_z` function. > If [alias completions](#alias-completions) are supported, the following snippet can be used instead: > -> ```nu +> ```nushell > { > __zoxide_z => $zoxide_completer > __zoxide_zi => $zoxide_completer @@ -66,7 +66,7 @@ This completer is not usable for almost every other command, so it's recommended Sometimes, a single external completer is not flexible enough. Luckily, as many as needed can be combined into a single one. The following example uses `$default_completer` for all commands except the ones explicitly defined in the record: -```nu +```nushell let multiple_completers = {|spans| match $spans.0 { ls => $ls_completer @@ -88,7 +88,7 @@ let multiple_completers = {|spans| Nushell currently has a [bug where autocompletions won't work for aliases](https://github.com/nushell/nushell/issues/8483). This can be worked around adding the following snippet at the beginning of the completer: -```nu +```nushell # if the current command is an alias, get it's expansion let expanded_alias = (scope aliases | where name == $spans.0 | get -i 0 | get -i expansion) @@ -112,7 +112,7 @@ Carapace will return this error when a non-supported flag is provided. For examp The solution to this involves manually checking the value to filter it out: -```nu +```nushell let carapace_completer = {|spans: list| carapace $spans.0 nushell $spans | from json @@ -124,7 +124,7 @@ let carapace_completer = {|spans: list| This is an example of how an external completer definition might look like: -```nu +```nushell let fish_completer = ... let carapace_completer = {|spans: list| diff --git a/cookbook/files.md b/src/content/docs/cookbook/files.md similarity index 97% rename from cookbook/files.md rename to src/content/docs/cookbook/files.md index d2a63408a76..6d8be22c2ca 100644 --- a/cookbook/files.md +++ b/src/content/docs/cookbook/files.md @@ -11,7 +11,7 @@ Use `help inc` to get more information. Read the file's initial contents -```nu +```nushell open Cargo.toml | get package.version ``` @@ -23,7 +23,7 @@ Make the edit to the version number and save it. _Note: running this command should work but it will reorder the toml file alphabetically by section._ -```nu +```nushell open Cargo.toml | upsert package.version { |p| $p | get package.version | inc --patch } | save Cargo.toml ``` @@ -32,7 +32,7 @@ _none_ View the changes we made to the file. -```nu +```nushell open Cargo.toml | get package.version ``` @@ -57,7 +57,7 @@ Fugazi:In On The Kill Taker:1993 You can parse it into a table. -```nu +```nushell open bands.txt | lines | split column ":" Band Album Year | skip 1 | sort-by Year ``` @@ -77,13 +77,13 @@ Output You can alternatively do this using `parse`. -```nu +```nushell open bands.txt | lines | parse "{Band}:{Album}:{Year}" | skip 1 | sort-by Year ``` Or, you can utilize the `headers` command to use the first row as a header row. The only difference would be the headers would match the case of the text file. So, in this case, the headers would be lowercase. -```nu +```nushell open bands.txt | lines | split column ":" | headers | sort-by year ``` @@ -93,7 +93,7 @@ open bands.txt | lines | split column ":" | headers | sort-by year Suppose you would like to check the number of lines the string "Value" appears per file in the nushell project, then sort those files by largest line count. -```nu +```nushell rg -c Value | lines | split column ":" file line_count | into int line_count | sort-by line_count | reverse ``` diff --git a/cookbook/git.md b/src/content/docs/cookbook/git.md similarity index 99% rename from cookbook/git.md rename to src/content/docs/cookbook/git.md index 3dca47bced2..623007a45fc 100644 --- a/cookbook/git.md +++ b/src/content/docs/cookbook/git.md @@ -10,7 +10,7 @@ Nu can help with common `Git` tasks like removing all local branches which have **Warning**: This command will hard delete the merged branches from your machine. You may want to check the branches selected for deletion by omitting the last git command. -```nu +```nushell git branch --merged | lines | where ($it != "* master" and $it != "* main") | each {|br| git branch -D ($br | str trim) } | str trim ``` @@ -24,7 +24,7 @@ Output Parse formatted commit messages (more details in the parsing git log section) -```nu +```nushell git log --pretty=%h»¦«%aN»¦«%s»¦«%aD | lines | split column "»¦«" sha1 committer desc merged_at | first 10 ``` @@ -54,7 +54,7 @@ Output _Note: the `histogram` command is not yet ported to the latest version_ -```nu +```nushell git log --pretty=%h»¦«%aN»¦«%s»¦«%aD | lines | split column "»¦«" sha1 committer desc merged_at | histogram committer merger | sort-by merger | reverse ``` diff --git a/cookbook/help.md b/src/content/docs/cookbook/help.md similarity index 98% rename from cookbook/help.md rename to src/content/docs/cookbook/help.md index 473f0dc2cbf..dd8802b0b59 100644 --- a/cookbook/help.md +++ b/src/content/docs/cookbook/help.md @@ -8,7 +8,7 @@ The `help` command is a good way to become familiar with all that Nu has to offe ### How to see all supported commands: -```nu +```nushell help commands ``` @@ -18,7 +18,7 @@ help commands To find more specific information on a command, use `help `. This works for regular commands (i.e. `http`) and subcommands (i.e. `http get`): -```nu +```nushell help http get ``` diff --git a/cookbook/http.md b/src/content/docs/cookbook/http.md similarity index 99% rename from cookbook/http.md rename to src/content/docs/cookbook/http.md index d3fb48c4500..449e4e71e19 100644 --- a/cookbook/http.md +++ b/src/content/docs/cookbook/http.md @@ -6,7 +6,7 @@ title: HTTP ### Fetching JSON from a url -```nu +```nushell http get https://jsonplaceholder.typicode.com/posts | first 5 ``` @@ -62,7 +62,7 @@ An example JSON file, `urls.json`, with the following contents: } ``` -```nu +```nushell open urls.json | get urls | each { |u| http get $u } ``` @@ -93,7 +93,7 @@ Output If you specify the `--raw` flag, you'll see 3 separate json objects, one in each row. -```nu +```nushell open urls.json | get urls | each { |u| http get $u -r } ``` @@ -131,7 +131,7 @@ Output To combine these responses together into a valid JSON array, you can turn the table into json. -```nu +```nushell open urls.json | get urls | each { |u| http get $u } | to json ``` @@ -174,7 +174,7 @@ Making a `post` request to an endpoint with a JSON payload. To make long request } ``` -```nu +```nushell open payload.json | get my_payload | to json | post https://jsonplaceholder.typicode.com/posts $in ``` @@ -192,7 +192,7 @@ Output We can put this all together into a pipeline where we read data, manipulate it, and then send it back to the API. Lets `fetch` a post, `increment` the id, and `post` it back to the endpoint. In this particular example, the test endpoint gives back an arbitrary response which we can't actually mutate. -```nu +```nushell open urls.json | get urls | first | http get $in | upsert id {|item| $item.id | inc} | to json | post https://jsonplaceholder.typicode.com/posts $in ``` diff --git a/cookbook/jq_v_nushell.md b/src/content/docs/cookbook/jq_v_nushell.md similarity index 98% rename from cookbook/jq_v_nushell.md rename to src/content/docs/cookbook/jq_v_nushell.md index a98d33cc099..b25e47acec4 100644 --- a/cookbook/jq_v_nushell.md +++ b/src/content/docs/cookbook/jq_v_nushell.md @@ -20,7 +20,7 @@ echo '{"title": "jq vs Nushell", "publication_date": "2023-11-20"}' | jq -r '.' In `nu`, we need to be explicit because Nushell has a wider range of input choices: -```nu +```nushell '{"title": "jq vs Nushell", "publication_date": "2023-11-20"}' | from json ``` @@ -36,7 +36,7 @@ Output: The output for `jq` is a JSON string whereas in `nu` it's a Nushell value. To get the output of any pipeline as JSON, simply apply a [`to json`](/commands/docs/to_json.html) at the end: -```nu +```nushell '[{"name": "Alice", "age": 30}, {"name": "Bob", "age": 25}]' | from json | to json @@ -79,7 +79,7 @@ echo '{"name": "Alice", "age": 30}' | jq -r '.name' In `nu` we do: -```nu +```nushell '{"name": "Alice", "age": 30}' | from json | get name ``` @@ -100,7 +100,7 @@ jq -r '.[] | select(.age > 28)' In `nu` we do: -```nu +```nushell '[{"name": "Alice", "age": 30}, {"name": "Bob", "age": 25}]' | from json | where age > 28 @@ -125,7 +125,7 @@ jq -r 'map(. * 2)' In `nu` we do: -```nu +```nushell '[1, 2, 3, 4, 5]' | from json | each { |x| $x * 2 } @@ -145,7 +145,7 @@ Output: Note that you can rely on the `$in` auto-binding for a slightly more compact block: -```nu +```nushell '[1, 2, 3, 4, 5]' | from json | each { $in * 2 } @@ -162,7 +162,7 @@ jq -r '.items | map({(.name): (.price * 2)}) | add' In `nu` we do: -```nu +```nushell '{"items": [{"name": "Apple", "price": 1}, {"name": "Banana", "price": 0.5}]}' | from json | get items @@ -193,7 +193,7 @@ jq -r 'sort' In `nu` we do: -```nu +```nushell '[3, 1, 4, 2, 5]' | from json | sort @@ -222,7 +222,7 @@ jq -r 'unique' In `nu` we do: -```nu +```nushell '[1, 2, 2, 3, 4, 4, 5]' | from json | uniq @@ -251,7 +251,7 @@ jq -r '.[] | select(.age > 28) | .name' In `nu` we do: -```nu +```nushell '[{"name": "Alice", "age": 30}, {"name": "Bob", "age": 25}]' | from json | where age > 28 @@ -277,7 +277,7 @@ jq -r '.name | split(" ") | .[0]' In `nu` we do: -```nu +```nushell '{"name": "Alice Smith"}' | from json | get name @@ -302,7 +302,7 @@ jq -r 'if .age > 18 then "Adult" else "Child" end' In `nu` we do: -```nu +```nushell '{"name": "Alice", "age": 30}' | from json | if $in.age > 18 { "Adult" } else { "Child" } @@ -323,7 +323,7 @@ jq -r 'map(select(. != null))' In `nu` we do: -```nu +```nushell '[1, null, 3, null, 5]' | from json | where { $in != null } @@ -341,7 +341,7 @@ Output: Alternatively, you can use [`compact`](/commands/docs/compact.html): -```nu +```nushell '[1, null, 3, null, 5]' | from json | compact @@ -358,7 +358,7 @@ jq -r "Name: \(.name), Age: \(.age)" In `nu` we do: -```nu +```nushell '{"name": "Alice", "age": 30}' | from json | items { |key, value| ["Name" $value] | str join ": " } @@ -373,7 +373,7 @@ Name: Alice, Name: 30 This approach is a bit involved but if we [install the full version](https://github.com/nushell/nushell/releases) which includes the _extra commands_ we can benefit from the [`format`](/commands/docs/format.html): -```nu +```nushell '{"name": "Alice", "age": 30}' | from json | format "Name: {name}, Age: {age}" @@ -390,7 +390,7 @@ jq -r '{name: .name, age: (.age + 5)}' In `nu` we do: -```nu +```nushell '{"name": "Alice", "age": 30}' | from json | {name: $in.name, age: ($in.age + 5)} @@ -418,7 +418,7 @@ jq -r '.. | .value?' In `nu`, there is no built-in command to achieve this, however, we can define our own reusable commands. See the [Appendix: Custom commands](#appendix-custom-commands) for an implementation of the command `cherry-pick` shown in the example below. -```nu +```nushell '{"data": {"value": 42, "nested": {"value": 24}}}' | from json | cherry-pick { |x| $x.value? } @@ -445,7 +445,7 @@ jq -r '.data[].values[] | select(. > 3)' In `nu` we can take advantage of the fact that [a list of records is in fact a table](/book/types_of_data.html#tables) and simply do: -```nu +```nushell '{"data": [{"values": [1, 2, 3]}, {"values": [4, 5, 6]}]}' | from json | get data.values @@ -474,7 +474,7 @@ jq -r 'paths as $p | select(getpath($p) | type != "object") | ($p | join(".")) + In `nu`, there is no built-in command to achieve this. See the [Appendix: Custom commands](#appendix-custom-commands) for an implementation of the command `flatten record-paths` shown in the example below. -```nu +```nushell '{"person": {"name": {"first": "Alice", "last": "Smith"}, "age": 30}}' | from json | flatten record-paths @@ -503,7 +503,7 @@ jq -r 'recurse | .value? | select(. != null) | { value: (. * 5) } | add' In `nu`, there is no built-in function equivalent to `recurse`. However, we can reuse the solution from [Filtering nested items](#filtering-nested-items) to extract the values to manipulate: -```nu +```nushell '{"data": {"value": 42, "nested": {"value": 24}}}' | from json | cherry-pick { |x| $x.value? } @@ -531,7 +531,7 @@ jq -r 'walk(if type == "number" then . * 2 else . end)' In `nu`, there is no built-in function to achieve this. See the [Appendix: Custom commands](#appendix-custom-commands) for an implementation of the command `filter-map` shown in the example below. -```nu +```nushell '{"data": {"values": [1, 2, 3], "nested": {"values": [4, 5, 6]}}}' | from json | filter-map {|value| if ($value | describe) == "int" { $value * 2 } else { $value }} @@ -571,7 +571,7 @@ jq -r 'group_by(.category)' In `nu` we do: -```nu +```nushell '[{"category": "A", "value": 10}, {"category": "B", "value": 20}, {"category": "A", "value": 5}]' | from json | group-by --to-table category @@ -610,7 +610,7 @@ jq -r 'group_by(.category) | map({category: .[0].category, sum: map(.value) | ad In `nu` we do: -```nu +```nushell '[{"category": "A", "value": 10}, {"category": "B", "value": 20}, {"category": "A", "value": 5}]' | from json | group-by --to-table category @@ -629,7 +629,7 @@ jq -r 'group_by(.category) | map({category: .[0].category, sum: (map(.value) | a In `nu` we do: -```nu +```nushell '[{"category": "A", "value": 10}, {"category": "B", "value": 20}, {"category": "A", "value": 5}]' | from json | group-by --to-table category @@ -659,7 +659,7 @@ jq -r 'reduce .[] as $item (0; . + $item.value)' In `nu` we do: -```nu +```nushell '[{"value": 10}, {"value": 20}, {"value": 30}]' | from json | reduce -f 0 { |item, acc| $acc + $item.value } @@ -684,7 +684,7 @@ jq -r 'map(.score) | add / length' In `nu` we do: -```nu +```nushell '[{"score": 90}, {"score": 85}, {"score": 95}]' | from json | get score @@ -708,7 +708,7 @@ jq -r 'group_by(. / 5 | floor * 5) | map({ bin: .[0], count: length })' In `nu` we do: -```nu +```nushell '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]' | from json | group-by --to-table { $in // 5 * 5 } @@ -734,7 +734,7 @@ Note that if what you are after is computing a histogram, you can benefit from t This section provides the implementation of the custom commands used in this cookbook. Note that they are illustrative and in no way optimised for large inputs. If you are interested in that, [plugins](/book/plugins.html) will likely be the answer as they can be written in general purpose languages such as Rust or Python. -```nu +```nushell > use toolbox.nu * > help commands | where command_type == "custom" ``` @@ -749,7 +749,7 @@ This section provides the implementation of the custom commands used in this coo ╰──────┴─────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────╯ ``` -```nu +```nushell # toolbox.nu use std assert diff --git a/cookbook/parsing.md b/src/content/docs/cookbook/parsing.md similarity index 98% rename from cookbook/parsing.md rename to src/content/docs/cookbook/parsing.md index 9285bd2fe83..ede2f608ba1 100644 --- a/cookbook/parsing.md +++ b/src/content/docs/cookbook/parsing.md @@ -4,7 +4,7 @@ title: Parsing # Parsing -*Nu* offers the ability to do some basic parsing, with different ways to achieve the same goal. +_Nu_ offers the ability to do some basic parsing, with different ways to achieve the same goal. Builtin-functions that can be used include: @@ -20,7 +20,7 @@ A few illustrative examples follow. ### `detect columns` (pretty automatic) -```nu +```nushell df -h | str replace "Mounted on" Mounted_On | detect columns ``` @@ -53,7 +53,7 @@ The `str replace` is needed here because one of the column headers has a space i Also the builtin `from` data parser for `ssv` (*s*pace *s*eparated *v*alues) can be used: -```nu +```nushell df -h | str replace "Mounted on" Mounted_On | from ssv --aligned-columns --minimum-spaces 1 ``` @@ -67,7 +67,7 @@ Note we still need to fix the column headers if they contain unexpected spaces. How to parse an arbitrary pattern from a string of text into a multi-column table. -```nu +```nushell cargo search shells --limit 10 | lines | parse "{crate_name} = {version} #{description}" | str trim ``` diff --git a/cookbook/parsing_git_log.md b/src/content/docs/cookbook/parsing_git_log.md similarity index 99% rename from cookbook/parsing_git_log.md rename to src/content/docs/cookbook/parsing_git_log.md index 6314854dc07..15fc0f0290e 100644 --- a/cookbook/parsing_git_log.md +++ b/src/content/docs/cookbook/parsing_git_log.md @@ -8,13 +8,13 @@ title: Parsing Git Log This `git log` command is interesting but you can't do a lot with it like this. -```nu +```nushell git log ``` Let's make it more parsable -```nu +```nushell git log --pretty="%h|%s|%aN|%aE|%aD" -n 25 ``` @@ -22,7 +22,7 @@ This will work but I've been burnt by this in the past when a pipe `|` gets inje So, let's try again with something that most likely won't show up in commits, `»¦«`. Also, since we're not using a pipe now we don't have to use quotes around the pretty format string. Notice that the output is just a bunch of strings. -```nu +```nushell git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n 5 ``` @@ -38,7 +38,7 @@ Ahh, much better. Now that we have the raw data, let's try to parse it with nu. First we need to get it in lines or rows. Notice that the output is now in a table format. -```nu +```nushell git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n 5 | lines ``` @@ -61,7 +61,7 @@ That's more like nushell, but it would be nice to have some columns. We used the delimiter `»¦«` specifically so we can create columns so let's use it like this. -```nu +```nushell git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n 5 | lines | split column "»¦«" ``` @@ -89,7 +89,7 @@ Yay, for columns! But wait, it would really be nice if those columns had somethi Let's try adding the columns names to `split column` like this. -```nu +```nushell git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n 5 | lines | split column "»¦«" commit subject name email date ``` @@ -117,7 +117,7 @@ Ahhh, that looks much better. Hmmm, that date string is a string. If it were a date vs a string it could be used for sorting by date. The way we do that is we have to convert the datetime to a real datetime and update the column. Try this. -```nu +```nushell git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n 5 | lines | split column "»¦«" commit subject name email date | upsert date {|d| $d.date | into datetime} ``` @@ -145,7 +145,7 @@ Now this looks more nu-ish If we want to revert back to a date string we can do something like this with the `nth` command and the `get` command. -```nu +```nushell git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n 5 | lines | split column "»¦«" commit subject name email date | upsert date {|d| $d.date | into datetime} | select 3 | get date | format date | get 0 ``` @@ -156,7 +156,7 @@ Mon, 28 Feb 2022 18:31:53 -0500 Cool! Now that we have a real datetime we can do some interesting things with it like `group-by` or `sort-by` or `where`. Let's try `sort-by` first -```nu +```nushell git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n 25 | lines | split column "»¦«" commit subject name email date | upsert date {|d| $d.date | into datetime} | sort-by date ``` @@ -228,7 +228,7 @@ git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n 25 | lines | split col That's neat but what if I want it sorted in the opposite order? Try the `reverse` command and notice the newest commits are at the top. -```nu +```nushell git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n 25 | lines | split column "»¦«" commit subject name email date | upsert date {|d| $d.date | into datetime} | sort-by date | reverse ``` @@ -300,7 +300,7 @@ git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n 25 | lines | split col Now let's try `group-by` and see what happens. This is a tiny bit tricky because dates are tricky. When you use `group-by` on dates you have to remember to use the `group-by date` subcommand so it's `group-by date date_column_name`. -```nu +```nushell git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n 25 | lines | split column "»¦«" commit subject name email date | upsert date {|d| $d.date | into datetime | format date '%Y-%m-%d'} | group-by date ``` @@ -316,7 +316,7 @@ git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n 25 | lines | split col This would look better if we transpose the data and name the columns -```nu +```nushell git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n 25 | lines | split column "»¦«" commit subject name email date | upsert date {|d| $d.date | into datetime | format date '%Y-%m-%d'} | group-by date | transpose date count ``` @@ -334,7 +334,7 @@ git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n 25 | lines | split col How about `where` now? Show only the records that are less than a year old. -```nu +```nushell git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n 25 | lines | split column "»¦«" commit subject name email date | upsert date {|d| $d.date | into datetime} | where ($it.date > ((date now) - 365day)) ``` @@ -407,7 +407,7 @@ git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n 25 | lines | split col Or even show me all the commits in the last 7 days. -```nu +```nushell git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n 25 | lines | split column "»¦«" commit subject name email date | upsert date {|d| $d.date | into datetime} | where ($it.date > ((date now) - 7day)) ``` @@ -479,7 +479,7 @@ git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n 25 | lines | split col Now, with the 365 day slice of data, let's `group-by` name where the commits are less than a year old. This table has a lot of columns so it's unreadable. However, if we `group-by` name and `transpose` the table things will look much cleaner. `Pivot` takes rows and turns them into columns or turns columns into rows. -```nu +```nushell git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD | lines | split column "»¦«" commit subject name email date | upsert date {|d| $d.date | into datetime} | where ($it.date > ((date now) - 365day)) | group-by name | transpose ``` @@ -516,14 +516,14 @@ error: Unknown column Here's one tip for dealing with this error. We have a `do` command that has an `--ignore_errors` parameter. This is how you'd use it in the above example, if it were giving errors. -```nu +```nushell git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD | lines | do -i { split column "»¦«" commit subject name email date } | upsert date {|d| $d.date | into datetime} | where ($it.date > ((date now) - 365day)) | group-by name | transpose ``` Now, back to parsing. What if we throw in the `sort-by` and `reverse` commands for good measure? Also, while we're in there, let's get rid of the `[table 21 rows]` thing too. We do that by using the `length` command on each row of column1. -```nu +```nushell git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD | lines | split column "»¦«" commit subject name email date | upsert date {|d| $d.date | into datetime} | where ($it.date > ((date now) - 365day)) | group-by name | transpose | upsert column1 {|c| $c.column1 | length} | sort-by column1 | reverse ``` @@ -549,7 +549,7 @@ git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD | lines | split column " This is still a lot of data so let's just look at the top 10 and use the `rename` command to name the columns. We could've also provided the column names with the `transpose` command. -```nu +```nushell git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD | lines | split column "»¦«" commit subject name email date | upsert date {|d| $d.date | into datetime} | group-by name | transpose | upsert column1 {|c| $c.column1 | length} | sort-by column1 | rename name commits | reverse | first 10 ``` @@ -574,7 +574,7 @@ And there you have it. The top 10 committers and we learned a little bit of pars Here's one last little known command. Perhaps you don't want your table numbered starting with 0. Here's a way to change that with the `table` command. -```nu +```nushell git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD | lines | split column "»¦«" commit subject name email date | upsert date {|d| $d.date | into datetime} | group-by name | transpose | upsert column1 {|c| $c.column1 | length} | sort-by column1 | rename name commits | reverse | first 10 | table -n 1 ``` diff --git a/cookbook/pattern_matching.md b/src/content/docs/cookbook/pattern_matching.md similarity index 97% rename from cookbook/pattern_matching.md rename to src/content/docs/cookbook/pattern_matching.md index 57c79c27670..55e9cd2a684 100644 --- a/cookbook/pattern_matching.md +++ b/src/content/docs/cookbook/pattern_matching.md @@ -8,7 +8,7 @@ title: Pattern Matching Like many other languages, nu offers a [`match`](https://www.nushell.sh/commands/docs/match.html#frontmatter-title-for-core) keyword. Usually this is used as a slightly more ergonomic version of `if-else` statements if you have many branches -```nu +```nushell [black red yellow green purple blue indigo] | each {|c| match $c { "black" => "classy" @@ -35,7 +35,7 @@ Output: The equivalent in `if-else` statements would be: -```nu +```nushell [black red yellow green purple blue] | each {|c| if ($c == "black") { "classy" @@ -51,7 +51,7 @@ The equivalent in `if-else` statements would be: As you can see you can also use command expressions in match statements (in this case used with `|`). Also notice the `_` case at the end, this is called the default arm and is used in case none of the other patterns match. Note also that in the case that cases overlap the first matching pattern will be used (just like with `if-else` statements): -```nu +```nushell [yellow green] | each {|c| match $c { "green" => "fundamental" @@ -73,7 +73,7 @@ Output: You can use the [`describe`](https://www.nushell.sh/commands/docs/describe.html) command to get more info about the types of values. For example: -```nu +```nushell {one: 1 two: 2} | describe ``` @@ -83,7 +83,7 @@ Output: record ``` -```nu +```nushell [{a: 1 b: 2} {a: 2 b:3 }] | describe ``` @@ -95,7 +95,7 @@ table Together with `match` and some clever regex use you can do quite powerful type matching. For example, let's say we wanted to implement a `str append` function that would work on both strings and lists. On strings it would work as expected, on lists of strings, it should append the same string to each element of the list. Using `match` one might do that like so: -```nu +```nushell def "str append" [tail: string]: [string -> string, list -> list] { let input = $in match ($input | describe | str replace --regex '<.*' '') { @@ -113,7 +113,7 @@ Also note that we have to capture the `$in` variable on the first statement of t With this implementation we can check that the command works as expected: -```nu +```nushell use std assert assert equal ("foo" | str append "/") "foo/" assert equal (["foo", "bar", "baz"] | str append "/") ["foo/", "bar/", "baz/"] diff --git a/cookbook/polars_v_pandas_v_nushell.md b/src/content/docs/cookbook/polars_v_pandas_v_nushell.md similarity index 99% rename from cookbook/polars_v_pandas_v_nushell.md rename to src/content/docs/cookbook/polars_v_pandas_v_nushell.md index a7124effe73..66483f9516f 100644 --- a/cookbook/polars_v_pandas_v_nushell.md +++ b/src/content/docs/cookbook/polars_v_pandas_v_nushell.md @@ -8,11 +8,11 @@ A dataframe example based on https://studioterabyte.nl/en/blog/polars-vs-pandas ## 1. Opening the file and show the shape of the DataFrame -```nu +```nushell let df = (dfr open NYCTaxi.csv) ``` -```nu +```nushell $df | shape ``` @@ -30,7 +30,7 @@ Output: ## 2. Opening the file and show the first 5 rows -```nu +```nushell $df | first 5 ``` @@ -59,7 +59,7 @@ Output: ## 3. Opening the file and get the length of all strings in the "id" column -```nu +```nushell let ids = ($df | first 5 | get id | str-lengths) $df | first 5 | append $ids | rename id_x vendor_id_length ``` @@ -89,7 +89,7 @@ Output: Here's an alternate approach using `with-column` -```nu +```nushell $df | first 5 | with-column ($df | first 5 | get id | str-lengths) --name vendor_id_length ``` @@ -118,7 +118,7 @@ Output: ## 4. Opening the file and apply a function to the "trip_duration" to divide the number by 60 to go from the second value to a minute value -```nu +```nushell $df | first 5 | with-column ((col trip_duration) / 60.0) ``` @@ -147,7 +147,7 @@ Output: ## 5. Opening the file and filtering out all rows with a trip duration shorther than 500 seconds -```nu +```nushell $df | filter-with ((col trip_duration) >= 500) | first 5 ``` @@ -176,7 +176,7 @@ Output: ## 6. Opening the file, filtering out all the rows with a "Y" store_and_fwd_flag value, group by ID and calculate the mean duration time -```nu +```nushell $df | filter-with ((col store_and_fwd_flag) == "N") | group-by id | agg (col trip_duration | mean) | sort-by id | first 5 ``` diff --git a/cookbook/setup.md b/src/content/docs/cookbook/setup.md similarity index 99% rename from cookbook/setup.md rename to src/content/docs/cookbook/setup.md index 9688eee096b..b9b449f2bb2 100644 --- a/cookbook/setup.md +++ b/src/content/docs/cookbook/setup.md @@ -15,7 +15,7 @@ In order to configure your path in nushell you'll need to modify your `PATH` env Alternately, if you want to append a folder to your `PATH` environment variable you can do that too using the `append` or `prepend` command like this: -```nu +```nushell $env.PATH = ($env.PATH | split row (char esep) | append "some/other/path") ``` @@ -23,7 +23,7 @@ For more detailed instructions, see the documentation about [environment variabl ### How to list your environment variables -```nu +```nushell $env ``` @@ -45,7 +45,7 @@ Output or for a more detailed view, use our new `env` command. -```nu +```nushell env ``` @@ -97,13 +97,13 @@ You should now be able to run `config nu` or `config env` and edit those files e ### How to get a single environment variable's value -```nu +```nushell $env.APPDATA ``` or -```nu +```nushell env | where name == APPDATA ``` @@ -133,7 +133,7 @@ With it, we can export state information as an environment variable, for example, what [overlays](https://www.nushell.sh/book/overlays.html) are currently activated. -```nu +```nushell # set NU_OVERLAYS with overlay list, useful for starship prompt $env.config.hooks.pre_prompt = ($env.config.hooks.pre_prompt | append {|| let overlays = overlay list | range 1.. diff --git a/cookbook/ssh_agent.md b/src/content/docs/cookbook/ssh_agent.md similarity index 98% rename from cookbook/ssh_agent.md rename to src/content/docs/cookbook/ssh_agent.md index ccaf3927e6a..038c89be1e6 100644 --- a/cookbook/ssh_agent.md +++ b/src/content/docs/cookbook/ssh_agent.md @@ -6,7 +6,7 @@ title: ssh-agent `eval` is not available in nushell, so run: -```nushell +```nushellshell ^ssh-agent -c | lines | first 2 @@ -25,7 +25,7 @@ See the workarounds. You can work around this behavior by checking if a ssh-agent is already running on your user, and start one if none is: -```nushell +```nushellshell do --env { let ssh_agent_file = ( $nu.temp-path | path join $"ssh-agent-($env.USER? | default $env.USERNAME).nuon" @@ -77,6 +77,6 @@ However, if you're using a different service manager, please refer its own docum To enable Nushell to access this socket, you need to add its path as `$env.SSH_AUTH_SOCK` like so: -```nushell +```nushellshell $env.SSH_AUTH_SOCK = $"($env.XDG_RUNTIME_DIR)/ssh-agent.socket" ``` diff --git a/cookbook/system.md b/src/content/docs/cookbook/system.md similarity index 99% rename from cookbook/system.md rename to src/content/docs/cookbook/system.md index 3349c61ef62..dac6793976e 100644 --- a/cookbook/system.md +++ b/src/content/docs/cookbook/system.md @@ -8,7 +8,7 @@ Nu offers many commands that help interface with the filesystem and control your ### View all files in the current directory -```nu +```nushell ls | where type == file ``` @@ -40,7 +40,7 @@ Output ### View all directories in the current directory -```nu +```nushell ls | where type == dir ``` @@ -69,7 +69,7 @@ Output ### Find processes sorted by greatest cpu utilization. -```nu +```nushell ps | where cpu > 0 | sort-by cpu | reverse ``` @@ -91,7 +91,7 @@ Output Sometimes a process doesn't shut down correctly. Using `ps` it's fairly easy to find the pid of this process: -```nu +```nushell ps | where name == Notepad2.exe ``` @@ -107,7 +107,7 @@ Output This process can be sent the kill signal in a one-liner: -```nu +```nushell ps | where name == Notepad2.exe | get pid.0 | kill $in ``` diff --git a/cookbook/tables.md b/src/content/docs/cookbook/tables.md similarity index 98% rename from cookbook/tables.md rename to src/content/docs/cookbook/tables.md index 334abb8f123..d3f3281d186 100644 --- a/cookbook/tables.md +++ b/src/content/docs/cookbook/tables.md @@ -8,7 +8,7 @@ title: Advanced table workflows Examples shown in [`Working with tables`](../book/working_with_tables.md) work fine when our tables have equal amount of rows but what if we want to merge tables of different sizes? -```nu +```nushell let first = [[a b]; [1 2] [3 4]] let second = [[c d]; [5 6]] $first | merge $second @@ -28,7 +28,7 @@ Output: Second row in columns `c` and `d` is empty because our `second` table only contained a single row so nushell has nothing to fill the remaining rows with. But what if we wanted the smaller table to 'wrap around' and keep filling the rows? For that we can use the [`group`](/commands/docs/group.md) command to split the larger table into subtables, merge each of them with the smaller table and then combine the merged tables together using [`flatten`](/commands/docs/flatten.md) command like this: -```nu +```nushell let first = [[a b]; [1 2] [3 4]] let second = [[c d]; [3 4]] $first @@ -51,13 +51,13 @@ Output: Can we do that with more than two tables? Sure we can! Let's add a third table: -```nu +```nushell let third = [[e f]; [7 8]] ``` We could join all three tables like this: -```nu +```nushell $first | group ($second|length) | each { merge $second } @@ -81,7 +81,7 @@ Output: Or just like last time we could use the [`reduce`](../book/docs/reduce.md) command to merge tables together recursively: -```nu +```nushell [$first_table $second_table $third_table] | reduce { |it, acc| $acc diff --git a/src/content/docs/index.mdx b/src/content/docs/index.mdx new file mode 100644 index 00000000000..be7e00d68df --- /dev/null +++ b/src/content/docs/index.mdx @@ -0,0 +1,49 @@ +--- +title: Nushell +description: A new type of shell +template: splash +editUrl: true +lastUpdated: false +hero: + tagline: A new type of shell + actions: + - text: Get Started + link: /introduction/ + icon: right-arrow + variant: primary + - text: View on GitHub + link: https://github.com/nushell/nushell.github.io + icon: external +--- + +import { Card, CardGrid } from "@astrojs/starlight/components"; + + + + Nu works on Linux, macOS, BSD, and Windows. Learn it once, then use it + anywhere. + + + Nu pipelines use structured data so you can safely select, filter, and sort + the same way every time. Stop parsing strings and start solving problems. + + + It's easy to extend Nu using a powerful plugin system. + + + +
+ +![Screenshot showing using the ls command](../../assets/images/ls-example.png) + +## Nu works with existing data + +Nu speaks [JSON, YAML, SQLite, Excel, and more](https://www.nushell.sh/book/loading_data.html) out of the box. It's easy to bring data into a Nu pipeline whether it's in a file, a database, or a web API: + +![Screenshot showing fetch with a web API](../../assets/images/fetch-example.png) + +## Nu has great error messages + +Nu operates on typed data, so it catches bugs that other shells don't. And when things break, Nu tells you exactly where and why: + +![Screenshot showing Nu catching a type error](../../assets/images/0_60_miette.png) diff --git a/book/README.md b/src/content/docs/introduction.md similarity index 99% rename from book/README.md rename to src/content/docs/introduction.md index ecf96b0b1bd..f2390e74f3d 100644 --- a/book/README.md +++ b/src/content/docs/introduction.md @@ -1,4 +1,6 @@ -# Introduction +--- +title: Introduction +--- Hello, and welcome to the Nushell project. The goal of this project is to take the Unix philosophy of shells, where pipes connect simple commands together, and bring it to the modern style of development. diff --git a/snippets/book/std_log.nu b/src/content/docs/snippets/book/std_log.nu similarity index 100% rename from snippets/book/std_log.nu rename to src/content/docs/snippets/book/std_log.nu diff --git a/snippets/installation/build_nu_from_source.sh b/src/content/docs/snippets/installation/build_nu_from_source.sh similarity index 100% rename from snippets/installation/build_nu_from_source.sh rename to src/content/docs/snippets/installation/build_nu_from_source.sh diff --git a/snippets/installation/build_nu_from_source_release.sh b/src/content/docs/snippets/installation/build_nu_from_source_release.sh similarity index 100% rename from snippets/installation/build_nu_from_source_release.sh rename to src/content/docs/snippets/installation/build_nu_from_source_release.sh diff --git a/snippets/installation/build_nu_yourself.sh b/src/content/docs/snippets/installation/build_nu_yourself.sh similarity index 100% rename from snippets/installation/build_nu_yourself.sh rename to src/content/docs/snippets/installation/build_nu_yourself.sh diff --git a/snippets/installation/cargo_install_nu.sh b/src/content/docs/snippets/installation/cargo_install_nu.sh similarity index 100% rename from snippets/installation/cargo_install_nu.sh rename to src/content/docs/snippets/installation/cargo_install_nu.sh diff --git a/snippets/installation/cargo_install_nu_more_features.sh b/src/content/docs/snippets/installation/cargo_install_nu_more_features.sh similarity index 100% rename from snippets/installation/cargo_install_nu_more_features.sh rename to src/content/docs/snippets/installation/cargo_install_nu_more_features.sh diff --git a/snippets/installation/chsh_invalid_shell_error.sh b/src/content/docs/snippets/installation/chsh_invalid_shell_error.sh similarity index 100% rename from snippets/installation/chsh_invalid_shell_error.sh rename to src/content/docs/snippets/installation/chsh_invalid_shell_error.sh diff --git a/snippets/installation/git_clone_nu.sh b/src/content/docs/snippets/installation/git_clone_nu.sh similarity index 100% rename from snippets/installation/git_clone_nu.sh rename to src/content/docs/snippets/installation/git_clone_nu.sh diff --git a/snippets/installation/install_pkg_config_libssl_dev.sh b/src/content/docs/snippets/installation/install_pkg_config_libssl_dev.sh similarity index 100% rename from snippets/installation/install_pkg_config_libssl_dev.sh rename to src/content/docs/snippets/installation/install_pkg_config_libssl_dev.sh diff --git a/snippets/installation/install_rhel_dependencies.sh b/src/content/docs/snippets/installation/install_rhel_dependencies.sh similarity index 100% rename from snippets/installation/install_rhel_dependencies.sh rename to src/content/docs/snippets/installation/install_rhel_dependencies.sh diff --git a/snippets/installation/macos_deps.sh b/src/content/docs/snippets/installation/macos_deps.sh similarity index 100% rename from snippets/installation/macos_deps.sh rename to src/content/docs/snippets/installation/macos_deps.sh diff --git a/snippets/installation/remove_welcome_message.nu b/src/content/docs/snippets/installation/remove_welcome_message.nu similarity index 100% rename from snippets/installation/remove_welcome_message.nu rename to src/content/docs/snippets/installation/remove_welcome_message.nu diff --git a/snippets/installation/run_nu.sh b/src/content/docs/snippets/installation/run_nu.sh similarity index 100% rename from snippets/installation/run_nu.sh rename to src/content/docs/snippets/installation/run_nu.sh diff --git a/snippets/installation/rustup_choose_rust_version.sh b/src/content/docs/snippets/installation/rustup_choose_rust_version.sh similarity index 100% rename from snippets/installation/rustup_choose_rust_version.sh rename to src/content/docs/snippets/installation/rustup_choose_rust_version.sh diff --git a/snippets/installation/use_rawkey_and_clipboard.sh b/src/content/docs/snippets/installation/use_rawkey_and_clipboard.sh similarity index 100% rename from snippets/installation/use_rawkey_and_clipboard.sh rename to src/content/docs/snippets/installation/use_rawkey_and_clipboard.sh diff --git a/snippets/installation/windows_change_default_profile.sh b/src/content/docs/snippets/installation/windows_change_default_profile.sh similarity index 100% rename from snippets/installation/windows_change_default_profile.sh rename to src/content/docs/snippets/installation/windows_change_default_profile.sh diff --git a/snippets/installation/windows_example_extraction_location.sh b/src/content/docs/snippets/installation/windows_example_extraction_location.sh similarity index 100% rename from snippets/installation/windows_example_extraction_location.sh rename to src/content/docs/snippets/installation/windows_example_extraction_location.sh diff --git a/snippets/installation/windows_run_nu.sh b/src/content/docs/snippets/installation/windows_run_nu.sh similarity index 100% rename from snippets/installation/windows_run_nu.sh rename to src/content/docs/snippets/installation/windows_run_nu.sh diff --git a/snippets/installation/windows_terminal_default_shell.sh b/src/content/docs/snippets/installation/windows_terminal_default_shell.sh similarity index 100% rename from snippets/installation/windows_terminal_default_shell.sh rename to src/content/docs/snippets/installation/windows_terminal_default_shell.sh diff --git a/snippets/introduction/date_example.sh b/src/content/docs/snippets/introduction/date_example.sh similarity index 100% rename from snippets/introduction/date_example.sh rename to src/content/docs/snippets/introduction/date_example.sh diff --git a/snippets/introduction/date_table_example.sh b/src/content/docs/snippets/introduction/date_table_example.sh similarity index 100% rename from snippets/introduction/date_table_example.sh rename to src/content/docs/snippets/introduction/date_table_example.sh diff --git a/snippets/introduction/help_example.sh b/src/content/docs/snippets/introduction/help_example.sh similarity index 100% rename from snippets/introduction/help_example.sh rename to src/content/docs/snippets/introduction/help_example.sh diff --git a/snippets/introduction/ls_example.sh b/src/content/docs/snippets/introduction/ls_example.sh similarity index 100% rename from snippets/introduction/ls_example.sh rename to src/content/docs/snippets/introduction/ls_example.sh diff --git a/snippets/introduction/ls_sort_by_reverse_example.sh b/src/content/docs/snippets/introduction/ls_sort_by_reverse_example.sh similarity index 100% rename from snippets/introduction/ls_sort_by_reverse_example.sh rename to src/content/docs/snippets/introduction/ls_sort_by_reverse_example.sh diff --git a/snippets/introduction/ls_where_example.sh b/src/content/docs/snippets/introduction/ls_where_example.sh similarity index 100% rename from snippets/introduction/ls_where_example.sh rename to src/content/docs/snippets/introduction/ls_where_example.sh diff --git a/snippets/introduction/ps_example.sh b/src/content/docs/snippets/introduction/ps_example.sh similarity index 100% rename from snippets/introduction/ps_example.sh rename to src/content/docs/snippets/introduction/ps_example.sh diff --git a/snippets/introduction/ps_where_example.sh b/src/content/docs/snippets/introduction/ps_where_example.sh similarity index 100% rename from snippets/introduction/ps_where_example.sh rename to src/content/docs/snippets/introduction/ps_where_example.sh diff --git a/snippets/introduction/sys_example.sh b/src/content/docs/snippets/introduction/sys_example.sh similarity index 100% rename from snippets/introduction/sys_example.sh rename to src/content/docs/snippets/introduction/sys_example.sh diff --git a/snippets/introduction/sys_get_example.sh b/src/content/docs/snippets/introduction/sys_get_example.sh similarity index 100% rename from snippets/introduction/sys_get_example.sh rename to src/content/docs/snippets/introduction/sys_get_example.sh diff --git a/snippets/introduction/sys_get_external_echo_example.sh b/src/content/docs/snippets/introduction/sys_get_external_echo_example.sh similarity index 100% rename from snippets/introduction/sys_get_external_echo_example.sh rename to src/content/docs/snippets/introduction/sys_get_external_echo_example.sh diff --git a/snippets/introduction/sys_get_nested_example.sh b/src/content/docs/snippets/introduction/sys_get_nested_example.sh similarity index 100% rename from snippets/introduction/sys_get_nested_example.sh rename to src/content/docs/snippets/introduction/sys_get_nested_example.sh diff --git a/snippets/loading_data/cargo-toml.sh b/src/content/docs/snippets/loading_data/cargo-toml.sh similarity index 100% rename from snippets/loading_data/cargo-toml.sh rename to src/content/docs/snippets/loading_data/cargo-toml.sh diff --git a/snippets/loading_data/rust-lang-feed.sh b/src/content/docs/snippets/loading_data/rust-lang-feed.sh similarity index 100% rename from snippets/loading_data/rust-lang-feed.sh rename to src/content/docs/snippets/loading_data/rust-lang-feed.sh diff --git a/snippets/loading_data/vscode.sh b/src/content/docs/snippets/loading_data/vscode.sh similarity index 100% rename from snippets/loading_data/vscode.sh rename to src/content/docs/snippets/loading_data/vscode.sh diff --git a/snippets/moving_around/cd_example.sh b/src/content/docs/snippets/moving_around/cd_example.sh similarity index 100% rename from snippets/moving_around/cd_example.sh rename to src/content/docs/snippets/moving_around/cd_example.sh diff --git a/snippets/moving_around/cd_without_command_example.sh b/src/content/docs/snippets/moving_around/cd_without_command_example.sh similarity index 100% rename from snippets/moving_around/cd_without_command_example.sh rename to src/content/docs/snippets/moving_around/cd_without_command_example.sh diff --git a/snippets/moving_around/cp_example.sh b/src/content/docs/snippets/moving_around/cp_example.sh similarity index 100% rename from snippets/moving_around/cp_example.sh rename to src/content/docs/snippets/moving_around/cp_example.sh diff --git a/snippets/moving_around/ls_deep_glob_example.sh b/src/content/docs/snippets/moving_around/ls_deep_glob_example.sh similarity index 100% rename from snippets/moving_around/ls_deep_glob_example.sh rename to src/content/docs/snippets/moving_around/ls_deep_glob_example.sh diff --git a/snippets/moving_around/ls_example.sh b/src/content/docs/snippets/moving_around/ls_example.sh similarity index 100% rename from snippets/moving_around/ls_example.sh rename to src/content/docs/snippets/moving_around/ls_example.sh diff --git a/snippets/moving_around/ls_shallow_glob_example.sh b/src/content/docs/snippets/moving_around/ls_shallow_glob_example.sh similarity index 100% rename from snippets/moving_around/ls_shallow_glob_example.sh rename to src/content/docs/snippets/moving_around/ls_shallow_glob_example.sh diff --git a/snippets/moving_around/mkdir_example.sh b/src/content/docs/snippets/moving_around/mkdir_example.sh similarity index 100% rename from snippets/moving_around/mkdir_example.sh rename to src/content/docs/snippets/moving_around/mkdir_example.sh diff --git a/snippets/moving_around/mv_example.sh b/src/content/docs/snippets/moving_around/mv_example.sh similarity index 100% rename from snippets/moving_around/mv_example.sh rename to src/content/docs/snippets/moving_around/mv_example.sh diff --git a/snippets/moving_around/rm_example.sh b/src/content/docs/snippets/moving_around/rm_example.sh similarity index 100% rename from snippets/moving_around/rm_example.sh rename to src/content/docs/snippets/moving_around/rm_example.sh diff --git a/snippets/types_of_data/cell-paths.sh b/src/content/docs/snippets/types_of_data/cell-paths.sh similarity index 100% rename from snippets/types_of_data/cell-paths.sh rename to src/content/docs/snippets/types_of_data/cell-paths.sh diff --git a/src/env.d.ts b/src/env.d.ts new file mode 100644 index 00000000000..acef35f175a --- /dev/null +++ b/src/env.d.ts @@ -0,0 +1,2 @@ +/// +/// diff --git a/src/styles/index.css b/src/styles/index.css new file mode 100644 index 00000000000..5346c0436b0 --- /dev/null +++ b/src/styles/index.css @@ -0,0 +1,32 @@ +@media (min-width: 50rem) { + .hero { + grid-template-columns: unset; + + > img { + order: unset; + margin-inline: unset; + } + } +} + +:where(p) { + text-wrap: pretty; +} + +:where(h1, h2, h3, h4, h5, h6) { + text-wrap: balance; +} + +/* Dark mode colors. */ +:root { + --sl-color-accent: #3aa675; + --sl-color-accent-high: #3aa675; + --sl-color-gray-3: #8b9eb0; + --sl-color-black: #22272e; +} + +/* Light mode colors. */ +:root[data-theme="light"] { + --sl-color-accent: #3eaf7c; + --sl-color-white: #17181c; +} diff --git a/tr/README.md b/tr/README.md deleted file mode 100644 index bbc71e2b894..00000000000 --- a/tr/README.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -home: true -heroImage: null -heroText: Nushell -tagline: A new type of shell. -actionText: Get Started → -actionLink: /tr/book/ -features: - - title: Pipelines to control any OS - details: Nu works on Linux, macOS, and Windows. Learn it once, then use it anywhere. - - title: Everything is data - details: Nu pipelines use structured data so you can safely select, filter, and sort the same way every time. Stop parsing strings and start solving problems. - - title: Powerful plugins - details: It's easy to extend Nu using a powerful plugin system. ---- - -Screenshot showing using the ls command - -### Nu works with existing data - -Please translate the home page here from README.md diff --git a/tr/book/README.md b/tr/book/README.md deleted file mode 100644 index f3d59784f9f..00000000000 --- a/tr/book/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Introduction - -Please translate the introduction page here from book/README.md diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000000..bcbf8b50906 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "astro/tsconfigs/strict" +} diff --git a/zh-CN/README.md b/zh-CN/README.md deleted file mode 100755 index a229eff92eb..00000000000 --- a/zh-CN/README.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -home: true -heroImage: null -heroText: Nushell -tagline: 一种新的 Shell -actionText: 点此了解更多 → -actionLink: /zh-CN/book/ -features: - - title: 利用管道控制任意系统 - details: Nu 可以在 Linux、macOS 和 Windows 上运行。一次学习,处处可用。 - - title: 一切皆数据 - details: Nu 管道使用结构化数据,你可以用同样的方式安全地选择,过滤和排序。停止解析字符串,开始解决问题。 - - title: 强大的插件系统 - details: 具备强大的插件系统,Nu 可以轻松扩展。 ---- - -Screenshot showing using the ls command - -### Nu 可以与现有数据一起工作 - -Nu 开箱即用支持 [JSON、YAML、SQLite、Excel 等](/zh-CN/book/loading_data.md)。无论是文件、数据库还是网络 API 中的数据,都可以很容易地引入 Nu 管道: - -Screenshot showing fetch with a web API - -### Nu 有很棒的错误反馈 - -Nu 在类型化的数据上操作,所以它能捕捉到其他 Shell 无法捕捉到的 Bug。当意外发生时,Nu 会告诉你确切的位置和原因: - -Screenshot showing Nu catching a type error - -## 获取 Nu - -Nushell 可以通过 [你喜欢的软件包管理器](https://repology.org/project/nushell/versions) 来安装 [可下载的二进制文件](https://github.com/nushell/nushell/releases),可以在 [GitHub Action](https://github.com/marketplace/actions/setup-nu) 中使用,此外也可以以 [源码](https://github.com/nushell/nushell)方式获得。在此阅读 [详细的安装说明](/zh-CN/book/installation.md) 或直接开始: - -#### macOS / Linux: - -```shell -$ brew install nushell -``` - -#### Windows: - -```shell -$ winget install nushell -``` - -完成安装后,输入 `nu` 来启动 Nu。 - -## 社区 - -如果你有任何问题可以在 [Dicord](https://discord.gg/NtAbbGn) 上找到我们。 - -您可以通过 [意见反馈](https://github.com/nushell/nushell.github.io/issues) 或者 [贡献 PR](https://github.com/nushell/nushell.github.io/pulls) 来帮助我们完善此网站。 diff --git a/zh-CN/book/3rdpartyprompts.md b/zh-CN/book/3rdpartyprompts.md deleted file mode 100644 index fa3cced03b4..00000000000 --- a/zh-CN/book/3rdpartyprompts.md +++ /dev/null @@ -1,88 +0,0 @@ -# 配置第三方提示 - -## Nerdfonts - -Nerdfonts 并不是必需的,但它们能使呈现效果更好。 - -[网站](https://www.nerdfonts.com) - -[仓库](https://github.com/ryanoasis/nerd-fonts) - -## oh-my-posh - -[网站](https://ohmyposh.dev/) - -[仓库](https://github.com/JanDeDobbeleer/oh-my-posh) - -如果你喜欢 [oh-my-posh](https://ohmyposh.dev/),可以通过以下几个步骤在 Nushell 里使用 oh-my-posh,它与 Nushell 一起配合得很好。在 Nushell 里设置 oh-my-posh 的步骤: - -1. 安装 Oh My Posh 并按照 [指南](https://ohmyposh.dev/docs/linux#installation)下载 oh-my-posh 的主题。 -2. 下载并安装一个 [Nerdfonts 字体](https://github.com/ryanoasis/nerd-fonts)。 -3. 在`~/.config/nushell/config.nu`(或由`$nu.config-path`输出的路径)中设置`PROMPT_COMMAND`,将`M365Princess.mp.json`改为你喜欢的任何 [主题](https://ohmyposh.dev/docs/themes)。 - -```nu -> $env.PROMPT_COMMAND = { oh-my-posh --config ~/.poshthemes/M365Princess.omp.json } -``` - -MacOS 用户配置步骤: - -1. 你可以通过`brew`安装`oh-my-posh`,可以参考这里的 [指南](https://ohmyposh.dev/docs/macos); -2. 下载并安装一个 [Nerdfonts 字体](https://github.com/ryanoasis/nerd-fonts); -3. 在`$nu.config-path`输出的文件中设置`PROMPT_COMMAND`,可以参考下面的代码片段: - -```nu -let posh_dir = (brew --prefix oh-my-posh | str trim) -let posh_theme = $'($posh_dir)/share/oh-my-posh/themes/' -# Change the theme names to: zash/space/robbyrussel/powerline/powerlevel10k_lean/ -# material/half-life/lambda Or double lines theme: amro/pure/spaceship, etc. -# For more [Themes demo](https://ohmyposh.dev/docs/themes) -$env.PROMPT_COMMAND = { oh-my-posh prompt print primary --config $'($posh_theme)/zash.omp.json' } -# Optional -$env.PROMPT_INDICATOR = $"(ansi y)$> (ansi reset)" -``` - -## Starship - -[网站](https://starship.rs/) - -[仓库](https://github.com/starship/starship) - -1. 参照上面的链接,安装 Starship; -2. 根据你的喜好,安装 nerdfonts; -3. 使用下面的配置示例,请确保设置`STARSHIP_SHELL`环境变量; - -下面是一个关于 Starship 的配置示例: - -```nu -$env.STARSHIP_SHELL = "nu" - -def create_left_prompt [] { - starship prompt --cmd-duration $env.CMD_DURATION_MS $'--status=($env.LAST_EXIT_CODE)' -} - -# Use nushell functions to define your right and left prompt -$env.PROMPT_COMMAND = { create_left_prompt } -$env.PROMPT_COMMAND_RIGHT = "" - -# The prompt indicators are environmental variables that represent -# the state of the prompt -$env.PROMPT_INDICATOR = "" -$env.PROMPT_INDICATOR_VI_INSERT = ": " -$env.PROMPT_INDICATOR_VI_NORMAL = "〉" -$env.PROMPT_MULTILINE_INDICATOR = "::: " -``` - -然后重启 Nushell: - -``` -nushell on 📙 main is 📦 v0.60.0 via 🦀 v1.59.0 -❯ -``` - -你可以在 [官方 Starship 配置文档](https://github.com/starship/starship#step-2-setup-your-shell-to-use-starship)中了解更多关于配置 Starship 的信息。 - -另一种启用 Starship 的方法在 [Starship 快速安装](https://starship.rs/#nushell)说明中有描述。 - -## Purs - -[仓库](https://github.com/xcambar/purs) diff --git a/zh-CN/book/README.md b/zh-CN/book/README.md deleted file mode 100644 index efc2afe6bc2..00000000000 --- a/zh-CN/book/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# 介绍 - -你好,欢迎来到 Nushell 项目。这个项目的目标是继承 Unix Shell 中用管道把简单的命令连接在一起的理念,并将其带到更具现代风格的开发中。因此,Nushell 不是一个纯粹的 shell 或编程语言,而是通过将一种丰富的编程语言和功能齐全的 shell 结合到一个软件包中,实现了二者的连接。 - -Nu 汲取了很多常见领域的灵感:传统 Shell 比如 Bash、基于对象的 Shell 比如 PowerShell、逐步类型化的语言比如 TypeScript、函数式编程、系统编程,等等。但是,Nu 并不试图成为万金油,而是把精力集中在做好这几件事上: - -- 作为一个具有现代感的灵活的跨平台 Shell; -- 作为一种现代的编程语言,解决与数据有关的问题; -- 给予清晰的错误信息和干净的 IDE 支持。 - -了解 Nu 能做什么的最简单的方法是从一些例子开始,所以让我们深入了解一下。 - -当你运行 [`ls`](/commands/docs/ls.md) 这样的命令时,你会注意到的第一件事是,你得到的不是一个文本块,而是一个结构化的表格: - -@[code](@snippets/introduction/ls_example.sh) - -该表不仅仅是以不同的方式显示目录,就像电子表格中的表一样,它还允许我们以更加互动的方式来处理数据。 - -我们要做的第一件事是按大小对我们的表进行排序。要做到这一点,我们将从 [`ls`](/commands/docs/ls.md) 中获取输出,并将其输入到一个可以根据列的内容对表进行排序的命令中: - -@[code](@snippets/introduction/ls_sort_by_reverse_example.sh) - -你可以看到,为了达到这个目的,我们没有向 [`ls`](/commands/docs/ls.md) 传递命令行参数。取而代之的是,我们使用了 Nu 提供的 [`sort-by`](/commands/docs/sort-by.md) 命令来对 [`ls`](/commands/docs/ls.md) 命令的输出进行排序。为了在顶部看到最大的文件,我们还使用了 [`reverse`](/commands/docs/reverse.md) 命令。 - -Nu 提供了许多可以对表进行操作的命令,例如,我们可以过滤 [`ls`](/commands/docs/ls.md) 表的内容,使其只显示超过 1 千字节的文件。 - -@[code](@snippets/introduction/ls_where_example.sh) - -就像在 Unix 哲学中一样,能够让命令相互对话给我们提供了在许多不同的组合中对命令进行混搭的方法。我们来看看一个不同的命令: - -@[code](@snippets/introduction/ps_example.sh) - -如果你使用过 Linux,你可能对 [`ps`](/commands/docs/ps.md) 命令很熟悉。通过它,我们可以得到一个当前系统正在运行的所有进程的列表,它们的状态是什么,以及它们的名字是什么,我们还可以看到这些进程的 CPU 负载。 - -如果我们想显示那些正在活跃使用 CPU 的进程呢?就像我们之前对 [`ls`](/commands/docs/ls.md) 命令所做的那样,我们也可以利用 [`ps`](/commands/docs/ps.md) 命令返回给我们的表格来做到: - -@[code](@snippets/introduction/ps_where_example.sh) - -到目前为止,我们一直在使用 [`ls`](/commands/docs/ls.md) 和 [`ps`](/commands/docs/ps.md) 来列出文件和进程。Nu 还提供了其他可以创建有用信息表格的命令。接下来,让我们试一下 [`date`](/commands/docs/date.md) 和 [`sys`](/commands/docs/sys.md)。 - -运行 [`date now`](/commands/docs/date_now.md) 输出关于当前日期和时间的信息: - -@[code](@snippets/introduction/date_example.sh) - -为了将获得的日期以表格形式展示,我们可以把它输入到 [`date to-table`](/commands/docs/date_to-table.md) 中: - -@[code](@snippets/introduction/date_table_example.sh) - -运行 [`sys`](/commands/docs/sys.md) 可以得到 Nu 所运行的系统的信息: - -@[code](@snippets/introduction/sys_example.sh) - -这与我们之前看到的表格有些不同。[`sys`](/commands/docs/sys.md) 命令输出了一个在单元格中包含结构化表格而非简单值的表格。要查看这些数据,我们需要**获取**([`get`](/commands/docs/get.md))待查看的列: - -@[code](@snippets/introduction/sys_get_example.sh) - -[`get`](/commands/docs/get.md) 命令让我们深入表的某一列内容中。在这里,我们要查看的是 `host` 列,它包含了 Nu 正在运行的主机的信息:操作系统名称、主机名、CPU,以及更多。让我们来获取系统上的用户名: - -@[code](@snippets/introduction/sys_get_nested_example.sh) - -现在,系统中只有一个名为 jt 的用户。你会注意到,我们可以传递一个列路径(`host.sessions.name` 部分),而不仅仅是简单的列名称。Nu 会接受列路径并输出表中相应的数据。 - -你可能已经注意到其他一些不同之处:我们没有一个数据表,而只有一个元素:即字符串 `"jt"`。Nu 既能处理数据表,也能处理字符串。字符串是使用 Nu 外部命令的一个重要部分。 - -让我们看看字符串在 Nu 外部命令里面是如何工作的。我们以之前的例子为例,运行外部的 `echo` 命令(`^` 告诉 Nu 不要使用内置的 [`echo`](/commands/docs/echo.md) 命令): - -@[code](@snippets/introduction/sys_get_external_echo_example.sh) - -敏锐的读者可能会发现这看起来和我们之前的非常相似!确实如此,但有一个重要的区别:我们用前面的值调用了 `^echo`。这允许我们把数据从 Nu 中传到外部命令 `echo`(或者 Nu 之外的任何命令,比如 `git`)。 - -### 获取帮助 - -任何 Nu 的内置命令的帮助文本都可以通过 [`help`](/commands/docs/help.md) 命令来找到。要查看所有命令,请运行 `help commands` 。你也可以通过执行 `help -f ` 来搜索一个主题: - -@[code](@snippets/introduction/help_example.sh) diff --git a/zh-CN/book/aliases.md b/zh-CN/book/aliases.md deleted file mode 100644 index ba1833e60e2..00000000000 --- a/zh-CN/book/aliases.md +++ /dev/null @@ -1,42 +0,0 @@ -# 别名 - -Nushell 中的别名提供了一种简单的文本替换方式,这允许你为一个较长的命令创建一个简写名称,包括其默认参数。 - -例如,让我们创建一个名为 `ll` 的别名,它将展开为 `ls -l`。 - -```nu -> alias ll = ls -l -``` - -我们可以通过别名来调用它: - -```nu -> ll -``` - -一旦我们这样做了,就如同我们输入了 `ls -l` 一样。这也允许我们传入标志或位置参数。例如,我们现在也可以这样写: - -``` -> ll -a -``` - -可得到与输入了`ls -l -a`一样的结果。 - -## 编写带有管道的别名 - -如果你想在别名中添加管道,你必须用小括号把它括起来,小括号是一对圆括号`()`,用来标记你的一组带有管道命令: - -```nu -alias lsname = (ls | get name) -``` - -下面是一个带有多个管道的别名: - -```nu -alias lt = (ls | sort-by modified -r | sort-by type) -``` - -## 持久化 - -为了使你的别名持久化,它必须被添加到你的 _config.nu_ 文件中。 -关于如何持久化别名,以便在你启动 Nushell 时它们是可用的,请参考 [配置](configuration.md) 部分。 diff --git a/zh-CN/book/coloring_and_theming.md b/zh-CN/book/coloring_and_theming.md deleted file mode 100644 index cb54e2d4482..00000000000 --- a/zh-CN/book/coloring_and_theming.md +++ /dev/null @@ -1,509 +0,0 @@ -# Nu 的配色和主题 - -Nushell 界面的许多部分都可以定制它们的颜色,所有这些都可以在`config.nu`配置文件中设置。如果你在配置文件中看到 hash/hashtag/pound 符号 `#`,这意味着它后面的文字被注释掉了。 - -1. 表的边框 -2. 原始值 -3. 形状(这是命令行的语法) -4. 提示 -5. LS_COLORS - -## 表格边框 - ---- - -表的边框由`config.nu`中的`table_mode`设置来控制。下面是一个例子: - -```nu -> $env.config = { - table_mode: rounded -} -``` - -下面是目前`table_mode`的可能选项: - -- `rounded` # 当然了,这个是最好的 :) -- `basic` -- `compact` -- `compact_double` -- `light` -- `thin` -- `with_love` -- `reinforced` -- `heavy` -- `none` -- `other` - -### 颜色符号 - ---- - -- `r` - 标准颜色红色的缩写 -- `rb` - 标准颜色红色的缩写,带有粗体属性 -- `red` - 标准颜色红色 -- `red_bold` - 带有粗体属性的标准颜色红色 -- `"#ff0000"` - "#hex" 格式的颜色:前景色为红色(需要引号) -- `{ fg: "#ff0000" bg: "#0000ff" attr: b }` - 完整 "#hex" 格式:前景为红色,背景为蓝色的 "#hex" 格式,属性为粗体缩写。 - -### 属性 - ---- - -| 编码 | 含义 | -| ---- | -------- | -| l | 闪烁 | -| b | 加粗 | -| d | 暗淡 | -| h | 隐藏 | -| i | 斜体 | -| r | 反转 | -| s | 删除 | -| u | 下划线 | -| n | 无 | -| | 默认为无 | - -### "标准颜色"和缩写 - -| 代码 | 名称 | -| ------ | ---------------------- | -| g | green | -| gb | green_bold | -| gu | green_underline | -| gi | green_italic | -| gd | green_dimmed | -| gr | green_reverse | -| gbl | green_blink | -| gst | green_strike | -| lg | light_green | -| lgb | light_green_bold | -| lgu | light_green_underline | -| lgi | light_green_italic | -| lgd | light_green_dimmed | -| lgr | light_green_reverse | -| lgbl | light_green_blink | -| lgst | light_green_strike | -| r | red | -| rb | red_bold | -| ru | red_underline | -| ri | red_italic | -| rd | red_dimmed | -| rr | red_reverse | -| rbl | red_blink | -| rst | red_strike | -| lr | light_red | -| lrb | light_red_bold | -| lru | light_red_underline | -| lri | light_red_italic | -| lrd | light_red_dimmed | -| lrr | light_red_reverse | -| lrbl | light_red_blink | -| lrst | light_red_strike | -| u | blue | -| ub | blue_bold | -| uu | blue_underline | -| ui | blue_italic | -| ud | blue_dimmed | -| ur | blue_reverse | -| ubl | blue_blink | -| ust | blue_strike | -| lu | light_blue | -| lub | light_blue_bold | -| luu | light_blue_underline | -| lui | light_blue_italic | -| lud | light_blue_dimmed | -| lur | light_blue_reverse | -| lubl | light_blue_blink | -| lust | light_blue_strike | -| b | black | -| bb | black_bold | -| bu | black_underline | -| bi | black_italic | -| bd | black_dimmed | -| br | black_reverse | -| bbl | black_blink | -| bst | black_strike | -| ligr | light_gray | -| ligrb | light_gray_bold | -| ligru | light_gray_underline | -| ligri | light_gray_italic | -| ligrd | light_gray_dimmed | -| ligrr | light_gray_reverse | -| ligrbl | light_gray_blink | -| ligrst | light_gray_strike | -| y | yellow | -| yb | yellow_bold | -| yu | yellow_underline | -| yi | yellow_italic | -| yd | yellow_dimmed | -| yr | yellow_reverse | -| ybl | yellow_blink | -| yst | yellow_strike | -| ly | light_yellow | -| lyb | light_yellow_bold | -| lyu | light_yellow_underline | -| lyi | light_yellow_italic | -| lyd | light_yellow_dimmed | -| lyr | light_yellow_reverse | -| lybl | light_yellow_blink | -| lyst | light_yellow_strike | -| p | purple | -| pb | purple_bold | -| pu | purple_underline | -| pi | purple_italic | -| pd | purple_dimmed | -| pr | purple_reverse | -| pbl | purple_blink | -| pst | purple_strike | -| lp | light_purple | -| lpb | light_purple_bold | -| lpu | light_purple_underline | -| lpi | light_purple_italic | -| lpd | light_purple_dimmed | -| lpr | light_purple_reverse | -| lpbl | light_purple_blink | -| lpst | light_purple_strike | -| c | cyan | -| cb | cyan_bold | -| cu | cyan_underline | -| ci | cyan_italic | -| cd | cyan_dimmed | -| cr | cyan_reverse | -| cbl | cyan_blink | -| cst | cyan_strike | -| lc | light_cyan | -| lcb | light_cyan_bold | -| lcu | light_cyan_underline | -| lci | light_cyan_italic | -| lcd | light_cyan_dimmed | -| lcr | light_cyan_reverse | -| lcbl | light_cyan_blink | -| lcst | light_cyan_strike | -| w | white | -| wb | white_bold | -| wu | white_underline | -| wi | white_italic | -| wd | white_dimmed | -| wr | white_reverse | -| wbl | white_blink | -| wst | white_strike | -| dgr | dark_gray | -| dgrb | dark_gray_bold | -| dgru | dark_gray_underline | -| dgri | dark_gray_italic | -| dgrd | dark_gray_dimmed | -| dgrr | dark_gray_reverse | -| dgrbl | dark_gray_blink | -| dgrst | dark_gray_strike | - -### `"#hex"` 格式 - ---- - -"#hex" 格式是你通常看到的一种表示颜色的方式。它由简单的`#`字符以及后面的 6 个字符组成。前两个代表 `红色`,接下来两个代表 `绿色`,最后两个代表 `蓝色`。重要的是,这个字符串必须用引号包围,否则 Nushell 会认为它是一个被注释掉的字符串。 - -例子:红色的主要颜色是 "#ff0000" 或 "#FF0000"。字母的大写和小写没有区别。 - -这种 `"#hex"`格式允许我们为 Nushell 的不同部分指定 24 位真彩色调。 - -## `完整 "#hex"` 格式 - ---- - -`完整 "#hex"`格式是对 `"#hex"` 格式的一种改进,但允许人们在一行中指定前景色、背景色和属性。 - -例如:`{ fg: "#ff0000" bg: "#0000ff" attr: b }` - -- 前景色红色为 "#hex" 格式 -- 背景色蓝色为 "#hex" 格式 -- 属性为加粗的缩写形式 - -## 原始值 - ---- - -原始值是像`int`和`string`这样的值。原始值和形状可以用上面看到的各种颜色符号来设置。 - -这是当前的原始值列表。并非所有这些都是可配置的。可配置的被标记为 `*`。 - -| 原始值 | 默认颜色 | 可配置 | -| ------------ | --------------------- | ------ | -| `any` | | | -| `binary` | Color::White.normal() | \* | -| `block` | Color::White.normal() | \* | -| `bool` | Color::White.normal() | \* | -| `cellpath` | Color::White.normal() | \* | -| `condition` | | | -| `custom` | | | -| `date` | Color::White.normal() | \* | -| `duration` | Color::White.normal() | \* | -| `expression` | | | -| `filesize` | Color::White.normal() | \* | -| `float` | Color::White.normal() | \* | -| `glob` | | | -| `import` | | | -| `int` | Color::White.normal() | \* | -| `list` | Color::White.normal() | \* | -| `nothing` | Color::White.normal() | \* | -| `number` | | | -| `operator` | | | -| `path` | | | -| `range` | Color::White.normal() | \* | -| `record` | Color::White.normal() | \* | -| `signature` | | | -| `string` | Color::White.normal() | \* | -| `table` | | | -| `var` | | | -| `vardecl` | | | -| `variable` | | | - -#### 特殊的 "原始值"(不是真正的原始值,它们的存在仅仅是为了着色) - -| 原始值 | 默认颜色 | 可配置 | -| --------------------------- | -------------------------- | ------ | -| `leading_trailing_space_bg` | Color::Rgb(128, 128, 128)) | \* | -| `header` | Color::Green.bold() | \* | -| `empty` | Color::Blue.normal() | \* | -| `row_index` | Color::Green.bold() | \* | -| `hints` | Color::DarkGray.normal() | \* | - -下面是一个改变其中一些数值的小例子。 - -```nu -> let config = { - color_config: { - separator: purple - leading_trailing_space_bg: "#ffffff" - header: gb - date: wd - filesize: c - row_index: cb - bool: red - int: green - duration: blue_bold - range: purple - float: red - string: white - nothing: red - binary: red - cellpath: cyan - hints: dark_gray - } -} -``` - -下面是另一个使用多种颜色语法的小例子,其中有一些注释: - -```nu -> let config = { - color_config: { - separator: "#88b719" # this sets only the foreground color like PR #486 - leading_trailing_space_bg: white # this sets only the foreground color in the original style - header: { # this is like PR #489 - fg: "#B01455", # note, quotes are required on the values with hex colors - bg: "#ffb900",# note, commas are not required, it could also be all on one line - attr: bli # note, there are no quotes around this value. it works with or without quotes - } - date: "#75507B" - filesize: "#729fcf" - row_index: { - # note that this is another way to set only the foreground, no need to specify bg and attr - fg: "#e50914" - } - } -} -``` - -## `Shape` 值 - -如上所述,"形状" 是一个用来表示语法着色的术语。 - -下面是当前支持的平面形状列表: - -| 形状 | 默认样式 | 可配置 | -| ---------------------------- | -------------------------------------- | ------ | -| `shape_block` | fg(Color::Blue).bold() | \* | -| `shape_bool` | fg(Color::LightCyan) | \* | -| `shape_custom` | bold() | \* | -| `shape_external` | fg(Color::Cyan) | \* | -| `shape_externalarg` | fg(Color::Green).bold() | \* | -| `shape_filepath` | fg(Color::Cyan) | \* | -| `shape_flag` | fg(Color::Blue).bold() | \* | -| `shape_float` | fg(Color::Purple).bold() | \* | -| `shape_garbage` | fg(Color::White).on(Color::Red).bold() | \* | -| `shape_globpattern` | fg(Color::Cyan).bold() | \* | -| `shape_int` | fg(Color::Purple).bold() | \* | -| `shape_internalcall` | fg(Color::Cyan).bold() | \* | -| `shape_list` | fg(Color::Cyan).bold() | \* | -| `shape_literal` | fg(Color::Blue) | \* | -| `shape_nothing` | fg(Color::LightCyan) | \* | -| `shape_operator` | fg(Color::Yellow) | \* | -| `shape_range` | fg(Color::Yellow).bold() | \* | -| `shape_record` | fg(Color::Cyan).bold() | \* | -| `shape_signature` | fg(Color::Green).bold() | \* | -| `shape_string` | fg(Color::Green) | \* | -| `shape_string_interpolation` | fg(Color::Cyan).bold() | \* | -| `shape_table` | fg(Color::Blue).bold() | \* | -| `shape_variable` | fg(Color::Purple) | \* | - -这里有一个小例子,说明如何对这些项目应用颜色。任何没有显示指定的都会被设置为默认的颜色。 - -```nu -> $env.config = { - color_config: { - shape_garbage: { fg: "#FFFFFF" bg: "#FF0000" attr: b} - shape_bool: green - shape_int: { fg: "#0000ff" attr: b} - } -} -``` - -## "提示"的配置和着色 - -Nushell 的提示符可以通过这些环境变量进行配置: - -- `PROMPT_COMMAND`: 为设置提示而执行的代码(块) -- `PROMPT_COMMAND_RIGHT`: 为设置 _RIGHT_ 提示而执行的代码(块)(参考 nu_scripts 里的 oh-my.nu) -- `PROMPT_INDICATOR` = "〉": 提示后打印的标识(默认为">"类 Unicode 符号) -- `PROMPT_INDICATOR_VI_INSERT` = ": " -- `PROMPT_INDICATOR_VI_NORMAL` = "v " -- `PROMPT_MULTILINE_INDICATOR` = "::: " - -例如:对于一个简单的提示,我们可以这样做。注意`PROMPT_COMMAND`需要一个`block`而其他的需要一个`string`。 - -```nu -> $env.PROMPT_COMMAND = { build-string (date now | format date '%m/%d/%Y %I:%M:%S%.3f') ': ' (pwd | path basename) } -``` - -如果你不喜欢默认的`PROMPT_INDICATOR`,你可以这样改变它: - -```nu -> $env.PROMPT_INDICATOR = "> " -``` - -提示的颜色由 `PROMPT_COMMAND` 中的 `block` 控制,在这里你可以编写自己的自定义提示。我们写了一个稍微花哨点的,有 git 状态的,位于 [nu_scripts 仓库](https://github.com/nushell/nu_scripts/blob/main/prompt/oh-my.nu)。 - -## `ls` 命令的配色:`LS_COLORS` - -Nushell 将尊重并使用 Mac、Linux 和 Windows 上的 `LS_COLORS` 环境变量设置。这个设置允许你在做[`ls`](/commands/docs/ls.md)时定义文件类型的颜色。例如,你可以让目录变成一种颜色,`_.md` markdown 文件一种颜色,`_.toml` 文件变成另一种颜色,等等。有很多方法可以给你的文件类型着色。 - -有一个详尽的清单可以在 [这里](https://github.com/trapd00r/LS_COLORS) 看到,不过它可能太多了,但可以让你初步了解如何创建一个`ls_colors`文件,而`dircolors`可以把它变成`LS_COLORS`环境变量。 - -[这](https://www.linuxhowto.net/how-to-set-colors-for-ls-command/) 是对`LS_COLORS`的一个相当好的介绍。我相信你可以在网上找到更多相关教程。 - -我喜欢`vivid`应用程序,目前在我的`config.nu`中是这样配置的。你可以在 [这里](https://github.com/sharkdp/vivid) 找到`vivid`。 - -`$env.LS_COLORS = (vivid generate molokai | str trim)`。 - -如果没有设置 `LS_COLORS`,Nushell 将默认使用内置的 `LS_COLORS` 设置,基于 8 位(扩展)ANSI 颜色。 - -## 主题 - -主题设计结合了上述所有的着色。这里有一个快速的例子,我们把它放在一起,以证明主题定制的能力。这是对我们在网络上看到的 `base16` 主题的一种转换。 - -使主题生效的关键是确保你在声明 `let config =` 行 _之前_,在`config.nu`文件中指定你要使用的所有主题和颜色: - -```nu -# let's define some colors - -let base00 = "#181818" # Default Background -let base01 = "#282828" # Lighter Background (Used for status bars, line number and folding marks) -let base02 = "#383838" # Selection Background -let base03 = "#585858" # Comments, Invisibles, Line Highlighting -let base04 = "#b8b8b8" # Dark Foreground (Used for status bars) -let base05 = "#d8d8d8" # Default Foreground, Caret, Delimiters, Operators -let base06 = "#e8e8e8" # Light Foreground (Not often used) -let base07 = "#f8f8f8" # Light Background (Not often used) -let base08 = "#ab4642" # Variables, XML Tags, Markup Link Text, Markup Lists, Diff Deleted -let base09 = "#dc9656" # Integers, Boolean, Constants, XML Attributes, Markup Link Url -let base0a = "#f7ca88" # Classes, Markup Bold, Search Text Background -let base0b = "#a1b56c" # Strings, Inherited Class, Markup Code, Diff Inserted -let base0c = "#86c1b9" # Support, Regular Expressions, Escape Characters, Markup Quotes -let base0d = "#7cafc2" # Functions, Methods, Attribute IDs, Headings -let base0e = "#ba8baf" # Keywords, Storage, Selector, Markup Italic, Diff Changed -let base0f = "#a16946" # Deprecated, Opening/Closing Embedded Language Tags, e.g. - -# we're creating a theme here that uses the colors we defined above. - -let base16_theme = { - separator: $base03 - leading_trailing_space_bg: $base04 - header: $base0b - date: $base0e - filesize: $base0d - row_index: $base0c - bool: $base08 - int: $base0b - duration: $base08 - range: $base08 - float: $base08 - string: $base04 - nothing: $base08 - binary: $base08 - cellpath: $base08 - hints: dark_gray - - # shape_garbage: { fg: $base07 bg: $base08 attr: b} # base16 white on red - # but i like the regular white on red for parse errors - shape_garbage: { fg: "#FFFFFF" bg: "#FF0000" attr: b} - shape_bool: $base0d - shape_int: { fg: $base0e attr: b} - shape_float: { fg: $base0e attr: b} - shape_range: { fg: $base0a attr: b} - shape_internalcall: { fg: $base0c attr: b} - shape_external: $base0c - shape_externalarg: { fg: $base0b attr: b} - shape_literal: $base0d - shape_operator: $base0a - shape_signature: { fg: $base0b attr: b} - shape_string: $base0b - shape_filepath: $base0d - shape_globpattern: { fg: $base0d attr: b} - shape_variable: $base0e - shape_flag: { fg: $base0d attr: b} - shape_custom: {attr: b} -} - -# now let's apply our regular config settings but also apply the "color_config:" theme that we specified above. - -let config = { - filesize_metric: true - table_mode: rounded # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other - use_ls_colors: true - color_config: $base16_theme # <-- this is the theme - use_grid_icons: true - footer_mode: always #always, never, number_of_rows, auto - animate_prompt: false - float_precision: 2 - use_ansi_coloring: true - filesize_format: "b" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, auto - edit_mode: emacs # vi - max_history_size: 10000 - log_level: error -} -``` - -如果你想在主题设计上火力全开,你需要把我在一开始提到的所有项目作为主题,包括`LS_COLORS`和提示。祝您好运! - -### 在终端上使用浅色背景 - -Nushell 的默认配置文件包含一个浅色主题定义,如果你在浅色背景的终端上工作,你可以很容易地应用浅色主题: - -```nu -# in $nu.config-file -$env.config = { - ... - color_config: $dark_theme # 如果你需要浅色主题, 可以将 `$dark_theme` 替换为 `$light_theme` - ... -} -``` - -你只需要将 `$dark_theme` 替换为 `$light_theme` 就可以切换到浅色主题了: - -```nu -# in $nu.config-file -$env.config = { - ... - color_config: $light_theme # if you want a light theme, replace `$dark_theme` to `$light_theme` - ... -} -``` diff --git a/zh-CN/book/coming_from_bash.md b/zh-CN/book/coming_from_bash.md deleted file mode 100644 index 98cbca4eab0..00000000000 --- a/zh-CN/book/coming_from_bash.md +++ /dev/null @@ -1,60 +0,0 @@ -# 从 Bash 到 Nu - -如果你是来自 Windows 上的`Git Bash`用户,那么你习惯的外部命令(bash、grep 等)在`nu`中默认是不可用的(除非你在 Windows 路径环境变量中明确包含了它们)。 -要使这些命令在`nu`中可用,请在你的`config.nu`中添加以下一行,用`append`或`prepend`。 - -```nu -$env.Path = ($env.Path | prepend 'C:\Program Files\Git\usr\bin') -``` - -注意:本表针对 Nu 0.60.0 或更高版本。 - -| Bash | Nu | Task | -| ------------------------------------ | ------------------------------------------------ | ------------------------------------------ | -| `ls` | `ls` | 列出当前目录中的文件 | -| `ls
` | `ls ` | 列出给定目录中的文件 | -| `ls pattern*` | `ls pattern*` | 列出匹配给定模式的文件 | -| `ls -la` | `ls --long --all` or `ls -la` | 列出包含所有可用信息的文件,包括隐藏文件 | -| `ls -d */` | `ls \| where type == dir` | 列出目录 | -| `find . -name *.rs` | `ls **/*.rs` | 递归地查找匹配给定模式的所有文件 | -| `find . -name Makefile \| xargs vim` | `ls \*\*/Makefile \| get name \| vim $in` | 将值作为命令参数传递 | -| `cd ` | `cd ` | 切换到给定目录 | -| `cd` | `cd` | 切换到用户主目录 | -| `cd -` | `cd -` | 切换到前一个目录 | -| `mkdir ` | `mkdir ` | 创建给定的路径 | -| `mkdir -p ` | `mkdir ` | 创建给定的路径,如果父目录不存在则自动创建 | -| `touch test.txt` | `touch test.txt` | 新建文件 | -| `> ` | `\| save --raw ` | 保存字符串到给定文件 | -| `>> ` | `\| save --raw --append ` | 追加字符串到给定文件 | -| `cat ` | `open --raw ` | 显示给定文件的内容 | -| | `open ` | 将文件作为结构化数据读取 | -| `mv ` | `mv ` | 移动文件到新的位置 | -| `cp ` | `cp ` | 复制文件到新的位置 | -| `cp -r ` | `cp -r ` | 递归地将目录复制到一个新的位置 | -| `rm ` | `rm ` | 删除给定的文件 | -| | `rm -t ` | 将给定的文件移到系统垃圾箱 | -| `rm -rf ` | `rm -r ` | 递归地删除给定的路径 | -| `date -d ` | `"" \| into datetime -f ` | 解析日期 ([日期格式文档](https://docs.rs/chrono/0.4.15/chrono/format/strftime/index.html)) | -| `sed` | `str replace` | 查找和替换一个字符串中的模式 | -| `grep ` | `where $it =~ ` or `find ` | 过滤包含特定字符串的字符串 | -| `man ` | `help ` | 获得特定命令的帮助信息 | -| | `help commands` | 列出所有可用的命令 | -| | `help --find ` | 在所有可用的命令中搜索 | -| `command1 && command2` | `command1; command2` | 运行一条命令,如果成功的话,再运行第二条 | -| `stat $(which git)` | `stat (which git).path` | 使用命令输出作为其他命令的参数 | -| `echo $PATH` | `echo $env.PATH` | 查看当前路径 | -| `` | `vim $nu.config-path` | 永久地更新 PATH | -| `export PATH = $PATH:/usr/other/bin` | `$env.PATH = ($env.PATH \| append /usr/other/bin)` | 临时更新 PATH | -| `export` | `echo $env` | 列出当前的环境变量 | -| `` | `vim $nu.config-path` | 永久地更新环境变量 | -| `FOO=BAR ./bin` | `FOO=BAR ./bin` | 临时修改环境变量 | -| `export FOO=BAR` | `$env.FOO = BAR` | 为当前会话设置环境变量 | -| `echo $FOO` | `echo $env.FOO` | 使用环境变量 | -| `unset FOO` | `hide FOO` | 取消对当前会话的环境变量设置 | -| `alias s="git status -sb"` | `alias s = git status -sb` | 临时定义一个别名 | -| `type FOO` | `which FOO` | 显示一个命令的信息(内置、别名或可执行) | -| `` | `vim $nu.config-path` | 永久添加和编辑别名(新开Shell会话生效) | -| `bash -c ` | `nu -c ` | 运行一组命令(需要0.9.1或更高版本) | -| `bash - - - - - - - - - - -
CommandDescription
{{ command.title }}{{ command.frontmatter.usage }}
diff --git a/zh-CN/book/configuration.md b/zh-CN/book/configuration.md deleted file mode 100644 index 28e1cd419ea..00000000000 --- a/zh-CN/book/configuration.md +++ /dev/null @@ -1,124 +0,0 @@ -# 配置 - -## Nushell 配置与`env.nu`和`config.nu` - -Nushell 使用一个配置系统,在启动时加载并运行两个 Nushell 脚本文件: -首先是`env.nu`,然后是`config.nu`。 -这些文件的路径可以通过调用`echo $nu.env-path`和`echo $nu.config-path`找到。 -`env.nu`是用来定义环境变量的,之后这些环境变量定义将在`config.nu`中可用; -`config.nu`可以用来在全局命名空间中添加定义、别名等等。 - -_(你可以把 Nushell 的配置加载顺序想象成在启动时执行两行 [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop):`source /path/to/env.nu`和`source /path/to/config.nu`。因此,用`env.nu`表示环境,用`config.nu`表示其他配置只是一个约定。)_ - -当你在没有设置这些文件的情况下启动 Nushell,Nushell 会提示你下载[`default env.nu`](https://github.com/nushell/nushell/blob/main/crates/nu-utils/src/sample_config/default_env.nu)和[`default config.nu`](https://github.com/nushell/nushell/blob/main/crates/nu-utils/src/sample_config/default_config.nu)。 -你可以通过浏览这些默认文件,了解环境变量的默认值和所有可配置项的列表。 - -### 配置 `$env.config` - -Nushell 的主要设置是以记录的形式保存在 `config` 环境变量中。这个记录可以用以下方式创建: - -```nu -$env.config = { - ... -} -``` - -你也可以隐藏(shadow)`$env.config`并更新它: - -```nu -$env.config = ($env.config | upsert ) -``` - -按照约定,这个变量被定义在`config.nu`文件中。 - -### 环境 - -你可以在 Nushell 会话期间使用 `$env. = ` 在 `env.nu` 文件中设置环境变量。比如: - -```nu -$env.FOO = 'BAR' -``` - -_(尽管 `$env.config` 是一个环境变量,按照惯例它仍然在 `config.nu` 中定义。)_ - -以下是值得关注的且为 Nushell 所特有的几个相对重要的环境变量: - -- `LS_COLORS`: 在`ls`中为每个文件类型设置颜色 -- `PROMPT_COMMAND`: 为设置提示而执行的代码(块或字符串) -- `PROMPT_COMMAND_RIGHT`: 为设置正确的提示而执行的代码(块) -- `PROMPT_INDICATOR = "〉"`: 提示后打印的提示符(默认为 ">" 类似的 Unicode 符号) -- `PROMPT_INDICATOR_VI_INSERT = ": "` -- `PROMPT_INDICATOR_VI_NORMAL = "〉 "` -- `PROMPT_MULTILINE_INDICATOR = "::: "` - -### 使用内置命令进行配置 - -从 Nushell 0.64 版本开始新增了两个内置命令(`config nu` 和 `config env`), 通过这两个命令,你可以使用自定义的编辑器或者 IDE 快速地更改 Nushell 配置信息 - -Nushell 遵循如下的规则来匹配编辑器: - -1. `$config.buffer_editor` -2. `$env.EDITOR` -3. `$env.VISUAL` -4. 如果上面都未匹配成功,则针对 Windows 运行`notepad`, 其他系统`nano` - -### 颜色配置部分 - -你可以在 [相关章节](coloring_and_theming.md) 中了解更多关于设置颜色和主题的信息。 - -## 将 Nu 配置为登录 Shell - -要把 Nu 作为一个登录 Shell,你需要配置`$env`变量。这样,在你将使用 Nu 为登录 Shell 时才有足够的支持来运行外部命令。 - -你可以通过在另一个 Shell(如 Bash)中运行 Nu 来建立完整的环境变量集。一旦你进入 Nu,你可以运行这样的命令: - -```nu -$env | reject config | transpose key val | each {|r| echo $"$env.($r.key) = '($r.val)'"} | str join (char nl) -``` - -这将打印出 `$env. = ` 行,每个环境变量一行包含其设置。您可能不需要所有这些变量,例如,`PS1` 变量是 `bash` 特有的。 - -接下来,在一些发行版上,你还需要确保 Nu 在`/etc/shells`列表中: - -```nu -> cat /etc/shells -# /etc/shells: valid login shells -/bin/sh -/bin/dash -/bin/bash -/bin/rbash -/usr/bin/screen -/usr/bin/fish -/home/jonathan/.cargo/bin/nu -``` - -这样你就可以使用`chsh`命令来将 Nu 设置为你的登录 Shell。在你注销后下次登录时,应该可以看到一个闪亮的 Nu 提示。 - -### 使用 `login.nu` 进行配置 - -如果 Nushell 被用作登录 Shell,你可以使用一个特定的配置文件,该文件只在该情况下才会被加载。因此,一个名为 `login.nu` 的文件必须在标准配置目录中。 - -文件 `login.nu` 的加载在 `env.nu` 和 `config.nu` 之后,所以你可以覆盖这些配置,如果你需要的话。 - -有一个环境变量 `$nu.loginshell-path` 包含该文件的路径。 - -### macOS: 保持 `open` 为 `/usr/bin/open` - -一些工具(例如 Emacs)依靠`open`命令来打开 Mac 上的文件。 -由于 Nushell 有自己的[`open`](/commands/docs/open.md)命令,它有不同的语义并隐藏了`/usr/bin/open`,这样某些工具在试图使用它时将出错。 -一个解决这个问题的方法是为 Nushell 的`open`定义一个自定义命令,并在你的`config.nu`文件中为系统的`open`创建一个别名,像这样: - -```nu -def nuopen [arg, --raw (-r)] { if $raw { open -r $arg } else { open $arg } } -alias open = ^open -``` - -## `PATH` 配置 - -要在 [PATH 变量]() 中添加一个路径,你可以在 `env.nu` 中使用 `$env. = ` 和 [`append`](/commands/docs/append.md) 完成,如下: - -```nu -$env.PATH = ($env.PATH | split row (char esep) | append '/some/path') -``` - -这将把 `/some/path` 追加到 `PATH` 的末尾;你也可以使用 [`prepend`](/commands/docs/prepend.md) 将该路径添加到`PATH`的开头。 diff --git a/zh-CN/book/creating_errors.md b/zh-CN/book/creating_errors.md deleted file mode 100644 index 75973d99ca7..00000000000 --- a/zh-CN/book/creating_errors.md +++ /dev/null @@ -1,50 +0,0 @@ -# 创建你自己的错误 - -使用 [元数据](metadata.md) 信息,你可以创建自己的自定义错误,错误信息由多个部分构成: - -- 错误的标题 -- 错误信息的标签,其中包括标签的文本和要标注下划线的范围 - -你可以使用`error make`命令来创建你自己的错误信息。例如,假设你有自己的名为`my-command`的命令,你想给调用者一个错误信息,说明传入的一个参数有问题。 - -首先,你可以从参数的来源中获取标注范围: - -```nu -let span = (metadata $x).span; -``` - -接下来你可以通过 `error make` 命令来创建一个错误,该命令需要一个可以描述待创建错误的记录作为输入: - -```nu -error make {msg: "this is fishy", label: {text: "fish right here", start: $span.start, end: $span.end } } -``` - -与你的自定义命令放在一起后,它可能看起来像这样: - -```nu -def my-command [x] { - let span = (metadata $x).span; - error make { - msg: "this is fishy", - label: { - text: "fish right here", - start: $span.start, - end: $span.end - } - } -} -``` - -现在当传入一个值调用时,我们会看到一个错误信息返回: - -```nu -> my-command 100 - -Error: - × this is fishy - ╭─[entry #5:1:1] - 1 │ my-command 100 - · ─┬─ - · ╰── fish right here - ╰──── -``` diff --git a/zh-CN/book/custom_commands.md b/zh-CN/book/custom_commands.md deleted file mode 100644 index 68a6ebe4cdc..00000000000 --- a/zh-CN/book/custom_commands.md +++ /dev/null @@ -1,441 +0,0 @@ -# 自定义命令 - -Nu 具备组合长管道的能力使你对数据和系统有很强的控制力,但它的代价是需要大量的键盘输入。不过理想情况下,你可以保存精心设计的管道以便反复使用。 - -这就是自定义命令(Custom Commands)的作用。 - -下面看一个自定义命令的例子: - -```nu -def greet [name] { - echo "hello" $name -} -``` - -在这个定义中,我们定义了`greet`命令,它需要一个参数`name`。在这个参数后面是自定义命令运行时将执行的代码块。当被调用时,自定义命令将把传递给`name`的值设置为`$name`变量,该变量在块内是可用的。 - -要运行上述命令,我们可以像调用内置命令一样调用它: - -```nu -> greet "world" -``` - -当我们这样做的时候,就会得到输出,如同我们使用内置命令一样: - -``` -───┬─────── - 0 │ hello - 1 │ world -───┴─────── -``` - -::: tip -`echo`将其参数分别返回给管道。如果你想用它来生成一个单一的字符串,请在管道中添加` | str join`: - -```nu -def greet [name] { - echo "hello " $name | str join -} - -greet nushell -``` - -返回 `hello nushell` -::: - -## 命令名称 - -在 Nushell 中,命令名是一串字符或一个带引号的字符串。下面是一些有效命令名的例子:`greet`, `get-size`, `mycommand123`, `"mycommand"`, `😊`, 和`123`。 - -_注意:在 Nushell 中,通常的做法是用`-`来分隔命令的多个单词,以提高可读性。_ 例如,使用 `get-size` 而不是 `getsize` 或者 `get_size`。 - -## 子命令 - -你也可以使用空格来定义命令的子命令(Subcommand)。例如,如果我们想给`str`添加一个新的子命令,可以通过命名我们的子命令以 "str" 开头来做到。比如: - -```nu -def "str mycommand" [] { - echo hello -} -``` - -现在我们可以像调用`str`的内置子命令一样调用我们的自定义命令: - -```nu -> str mycommand -``` - -## 参数类型 - -在定义自定义命令时,你可以为每个参数命名并选择性地设置其类型。例如,你可以把上面的内容写成: - -```nu -def greet [name: string] { - echo "hello " $name | str join -} -``` - -参数的类型是可选的。Nushell 支持不添加类型,此时会把参数类型当作`any`。如果你在参数上标注了一个类型,Nushell 将在你调用函数的时候检查该类型。 - -例如,假设你需要输入一个`int`类型: - -```nu -def greet [name: int] { - echo "hello " $name | str join -} - -greet world -``` - -如果我们尝试运行上述内容,Nushell 会告诉我们,类型不匹配: - -``` -error: Type Error - ┌─ shell:6:7 - │ -5 │ greet world - │ ^^^^^ Expected int, found world -``` - -这可以帮助指导你的用户只使用支持的类型来调用你所定义的命令。 - -目前可以支持的类型是(从 0.65.0 版本开始): - -- `any` -- `block` -- `cell-path` -- `duration` -- `path` -- `expr` -- `filesize` -- `glob` -- `int` -- `math` -- `number` -- `operator` -- `range` -- `cond` -- `bool` -- `signature` -- `string` -- `variable` -- `record` -- `list` -- `table` -- `error` - -## 具有默认值的参数 - -若要使一个参数成为可选的,并具有默认值,你可以在命令定义中指定该默认值: - -```nu -def greet [name = "nushell"] { - echo "hello " $name | str join -} -``` - -你可以在没有参数的情况下调用这个命令,也可以指定一个值来覆盖默认值: - -``` -> greet -hello nushell -> greet world -hello world -``` - -你也可以将默认值与[类型要求](#参数类型)相结合: - -``` -def congratulate [age: int = 18] { - echo "Happy birthday! Wow you are " $age " years old now!" | str join -} -``` - -如果你想检查一个可选参数是否存在,而不是仅仅依赖一个默认值,请使用[可选位置参数](#可选位置参数)代替。 - -## 可选位置参数 - -默认情况下,位置参数(Positional Parameters)是必须的。如果没有传递位置参数,我们将遇到一个报错: - -``` - × Missing required positional argument. - ╭─[entry #23:1:1] - 1 │ greet - · ▲ - · ╰── missing name - ╰──── - help: Usage: greet -``` - -我们可以在一个位置参数的名字后面加上一个问号(`?`),将其标记为可选参数。比如: - -```nu -def greet [name?: string] { - echo "hello" $name | str join -} - -greet -``` - -使一个位置参数成为可选参数并不改变它在命令体中被访问的名称。如上例所示,尽管参数列表中有`?`的后缀,但它仍然以`$name`的形式被访问。 - -当一个可选参数没有被传递,它在命令体中的值等于`null`和`$nothing`。我们可以利用这一点来对没有传递参数的情况进行处理: - -```nu -def greet [name?: string] { - if ($name == null) { - echo "hello, I don't know your name!" - } else { - echo "hello " $name | str join - } -} - -greet -``` - -如果你只是想在参数缺失时设置一个默认值,那么使用[默认值](#具有默认值的参数)来代替就更简单了。 - -如果必需的和可选的位置参数一起使用,那么必需的参数必须先出现在定义中。 - -## 标志 - -除了传递位置参数之外, 你还可以通过为自定义命令定义标志(Flags)来传递命名参数。 - -比如: - -```nu -def greet [ - name: string - --age: int -] { - echo $name $age -} -``` - -在上面的`greet`定义中,我们定义了`name`位置参数以及`age`标志。这允许`greet`的调用者也可以选择传递`age`参数。 - -你可以用以下方法调用上述内容: - -```nu -> greet world --age 10 -``` - -或者: - -```nu -> greet --age 10 world -``` - -或者甚至完全不使用标志: - -``` -> greet world -``` - -标志也可以指定一个缩写版本,这允许你传递一个更简单的标志,如同传递一个更容易阅读的全写标志那样。 - -让我们扩展前面的例子,为`age`添加一个缩写标志: - -```nu -def greet [ - name: string - --age (-a): int -] { - echo $name $age -} -``` - -_注意:_ 标志是以其全称命名的,所以上面的例子的命令体内需要使用`$age`而不是`$a`。 - -现在,我们可以使用缩写标志来调用这个新的定义: - -``` -> greet -a 10 hello -``` - -标志也可以作为基本开关使用,这意味着它们的存在或不存在被当作定义的参数。延伸前面的例子: - -```nu -def greet [ - name: string - --age (-a): int - --twice -] { - if $twice { - echo $name $name $age $age - } else { - echo $name $age - } -} -``` - -而这个定义可以通过如下方式调用: - -``` -> greet -a 10 --twice hello -``` - -或者只是没有开关标志: - -``` -> greet -a 10 hello -``` - -## 剩余参数 - -在某些情况下, 你可能想定义一个需要任意数量的位置参数的命令。我们可以用一个剩余参数(Rest Parameter)来实现这一点,通过下面的`...`语法: - -```nu -def greet [...name: string] { - print "hello all:" - for $n in $name { - echo $n - } -} - -greet earth mars jupiter venus -``` - -我们可以使用任意数量的参数来调用上述`greet`命令的定义,包括完全没有参数,所有的参数都将被收集到`$name`列表中。 - -剩余参数可以和位置参数一起使用: - -```nu -def greet [vip: string, ...name: string] { - print $"hello to our VIP ($vip)" - print "and hello to everybody else:" - for $n in $name { - echo $n - } -} - -# $vip $name -# ---- ------------------------ -greet moon earth mars jupiter venus -``` - -## 为命令添加文档 - -为了更好地帮助用户使用你的自定义命令,也可以为其添加额外的命令和参数描述。 - -以我们之前的例子为例: - -```nu -def greet [ - name: string - --age (-a): int -] { - echo $name $age -} -``` - -一旦定义完毕,我们可以运行`help greet`来获得该命令的帮助信息: - -``` -Usage: - > greet {flags} - -Parameters: - - -Flags: - -h, --help: Display this help message - -a, --age -``` - -你可以看到我们定义的参数和标志,以及所有命令都会得到的`-h`帮助标志。 - -为了改进这个帮助,我们可以在定义中加入描述,这些描述将在帮助中显示出来: - -```nu -# A greeting command that can greet the caller -def greet [ - name: string # The name of the person to greet - --age (-a): int # The age of the person -] { - echo $name $age -} -``` - -我们给定义和参数添加的注释会作为描述出现在命令的`help`中。 - -现在,如果我们运行`help greet`,就会得到一些更友好的帮助文本: - -``` -A greeting command that can greet the caller - -Usage: - > greet {flags} - -Parameters: - The name of the person to greet - -Flags: - -h, --help: Display this help message - -a, --age : The age of the person -``` - -## 管道输出 - -自定义命令会像内置命令一样流式输出。例如,假设我们想重构这个管道: - -```nu -> ls | get name -``` - -让我们把[`ls`](/commands/docs/ls.md)移到我们编写的命令中: - -```nu -def my-ls [] { ls } -``` - -我们就可以像使用[`ls`](/commands/docs/ls.md)一样使用这个命令的输出: - -```nu -> my-ls | get name -───┬─────────────────────── - 0 │ myscript.nu - 1 │ myscript2.nu - 2 │ welcome_to_nushell.md -───┴─────────────────────── -``` - -这让我们可以很容易地创建自定义命令并处理它们的输出。注意,我们不像其他语言那样使用返回语句,取而代之的是我们创建管道,而其输出数据流可以连接到其他管道。 - -## 管道输入 - -如同其他命令一样,自定义命令也可以从管道中获取输入,这个输入会自动传递给自定义命令所使用的代码块。 - -让我们创建一个把所有接收值都加倍的命令: - -```nu -def double [] { - each { |it| 2 * $it } -} -``` - -现在,如果我们在一个管道中调用上述命令,就可以看到它对输入的处理结果: - -``` -> [1 2 3] | double -───┬───── - 0 │ 2 - 1 │ 4 - 2 │ 6 -───┴───── -``` - -我们还可以使用`$in`变量来存储输入,以便在后面使用: - -```nu -def nullify [...cols] { - let start = $in - $cols | reduce --fold $start { |col, df| - $df | upsert $col null - } -} -``` - -## 持久化 - -关于如何持久化自定义命令,以便在你启动 Nushell 时它们是可用的,请参阅 [配置](configuration.md) 部分并添加你的启动脚本。 diff --git a/zh-CN/book/custom_completions.md b/zh-CN/book/custom_completions.md deleted file mode 100644 index 370a2012a10..00000000000 --- a/zh-CN/book/custom_completions.md +++ /dev/null @@ -1,60 +0,0 @@ -# 自定义补全 - -自定义补全允许你混合使用 Nushell 的两个功能:自定义命令和补全。有了它们,你就能够创建支持对位置参数和标志(Flags)参数进行自动补全的命令。这些自定义补全既适用于自定义命令,也适用于 [已知的外部或`extern`命令](externs.md)。 - -自定义命令有两个部分:处理补全的命令和使用`@`将此命令附加到另一个命令的类型中。 - -## 自定义补全例子 - -我们来看一个例子: - -```nu -> def animals [] { ["cat", "dog", "eel" ] } -> def my-command [animal: string@animals] { print $animal } ->| my-command -cat dog eel -``` - -在第一行中,我们创建了一个自定义命令,将返回三个不同动物的列表。这些是我们想在补全中使用的值。一旦我们创建了这个命令,我们就可以用它来为其他自定义命令和 `extern` 提供补全。 - -在第二行,我们使用`string@animals`。这告诉了 Nushell 两件事:用于类型检查的参数的形状,以及如果用户想在该位置补全输入值,需要使用的自定义完成。 - -在第三行,我们输入我们的自定义命令的名称`my-command`,然后输入空格,再输入``键,就可以触发我们的自动补全功能。自定义补全的工作方式与系统中的其他补全方式相同,比如允许你输入`e`,然后按``键,得到 "eel" 自动补全。 - -## 模块和自定义补全 - -你可能更喜欢让你的自定义补全远离你的代码的公共 API。为此,你可以将模块和自定义补全结合起来。 - -让我们把上面的例子放在一个模块中: - -```nu -module commands { - def animals [] { - ["cat", "dog", "eel" ] - } - - export def my-command [animal: string@animals] { - print $animal - } -} -``` - -在我们的模块中,我们选择只导出自定义命令`my-command`,而不导出自定义补全`animals`。这使得本模块的用户可以调用命令,甚至使用自定义补全逻辑,而不需要访问自定义补全。这样可以让 API 更干净,同时仍然提供所有相同的好处。 - -这是可能的,因为使用`@`的自定义补全标签在命令第一次被解析时就被锁定了。 - -## 自定义补全和 `extern` - -一个强大的组合是为 [已知的`extern`命令](externs.md) 添加自定义补全。这些工作方式与向自定义命令添加自定义补全的方式相同:创建自定义补全,然后用`@`附加到 `extern` 的一个位置参数或标志参数的类型中。 - -如果你仔细看一下默认配置中的例子,你会看到这个: - -```nu -export extern "git push" [ - remote?: string@"nu-complete git remotes", # the name of the remote - refspec?: string@"nu-complete git branches"# the branch / refspec - ... -] -``` - -自定义补全在这个例子中的作用与前面的例子中的作用相同。上面的例子根据用户当前所处的位置,调用了两个不同的自定义补全。 diff --git a/zh-CN/book/dataframes.md b/zh-CN/book/dataframes.md deleted file mode 100644 index d33377f6698..00000000000 --- a/zh-CN/book/dataframes.md +++ /dev/null @@ -1,1008 +0,0 @@ -# DataFrames - -::: warning -要使用`DataFrame`支持,您需要使用 `cargo build --features dataframe` 构建一个具有完整功能的版本。从版本 0.72 开始,Nushell 的二进制发布版本中 *不* 包含`DataFrame`。[请参阅安装说明](/book/installation.md) 以获取更多详细信息。 -::: - -正如我们到目前为止所看到的,Nushell 把数据处理作为其主要任务。`Lists` 和 `Tables`的存在是为了帮助你循环处理值,以便执行多种操作或轻而易举地找到数据。然而,在某些操作中,基于行的数据布局并不是处理数据的最有效方式,特别是在处理极其庞大的文件时。对于大型数据集的`group-by`或`join`等操作,如果不使用适当的数据格式,会占用大量的内存,并可能耗费大量的计算时间。 - -出于这个原因,Nushell 引入了`DataFrame`结构。`DataFrame`以列格式存储数据,以 [Apache Arrow](https://arrow.apache.org/) 规范为基础,并使用 [Polars](https://github.com/pola-rs/polars) 作为执行极其 [快速列式操作](https://h2oai.github.io/db-benchmark/) 的马达。 - -你现在可能想知道这个组合能有多快,以及它如何能使数据工作更容易、更可靠。出于这个原因,让我们在本页开始时介绍一下处理数据时的常见操作的性能测试情况。 - -## 性能测试对比 - -在这个小的性能测试练习中,我们将比较本地的 Nushell 原生命令、Nushell DataFrame 相关命令和[Python Pandas](https://pandas.pydata.org/)命令。暂时不要太在意`dataframe`命令,它们将在本页后面的章节中解释。 - -> 系统细节:本节介绍的性能测试是用一台配备 Intel(R) Core(TM) i7-10710U -> (CPU @1.10GHz 1.61GHz)和 16 GB 内存的机器运行的。 -> -> 所有的例子都在 Nushell 0.78 版本上运行。 - -### 文件信息 - -我们将用于性能测试的文件是 [新西兰商业人口统计](https://www.stats.govt.nz/assets/Uploads/New-Zealand-business-demography-statistics/New-Zealand-business-demography-statistics-At-February-2020/Download-data/Geographic-units-by-industry-and-statistical-area-2000-2020-descending-order-CSV.zip) 数据集。 -如果你想尝试这些测试,请下载该文件。 - -该数据集有 5 列,5,429,252 行。我们可以通过使用`dfr ls`命令来检查: - -```nu -❯ let df = (dfr open .\Data7602DescendingYearOrder.csv) -❯ dfr ls - -╭───┬────────┬─────────┬─────────╮ -│ # │ name │ columns │ rows │ -├───┼────────┼─────────┼─────────┤ -│ 0 │ $df │ 5 │ 5429252 │ -╰───┴────────┴─────────┴─────────╯ -``` - -我们可以用 `first` 看一下文件的第一行: - -```nu -❯ $df | dfr first -╭───┬──────────┬─────────┬──────┬───────────┬──────────╮ -│ # │ anzsic06 │ Area │ year │ geo_count │ ec_count │ -├───┼──────────┼─────────┼──────┼───────────┼──────────┤ -│ 0 │ A │ A100100 │ 2000 │ 96 │ 130 │ -╰───┴──────────┴─────────┴──────┴───────────┴──────────╯ -``` - -...最后,我们可以了解一下推断出的数据类型: - -```nu -❯ $df | dfr dtypes -╭───┬───────────┬───────╮ -│ # │ column │ dtype │ -├───┼───────────┼───────┤ -│ 0 │ anzsic06 │ str │ -│ 1 │ Area │ str │ -│ 2 │ year │ i64 │ -│ 3 │ geo_count │ i64 │ -│ 4 │ ec_count │ i64 │ -╰───┴───────────┴───────╯ -``` - -### 加载文件 - -让我们先来比较一下各种方法的加载时间。首先,我们将使用 Nushell 的[`open`](/commands/docs/open.md)命令加载数据: - -```nu -❯ timeit {open .\Data7602DescendingYearOrder.csv} -30sec 479ms 614us 400ns -``` - -使用原生的 Nushell 功能加载文件需要 30 秒。对于加载 500 万条记录来说,这还算不错!但我们可以做得更好一些。 - -现在让我们使用 Pandas。我们将使用以下脚本来加载文件: - -```python -import pandas as pd - -df = pd.read_csv("Data7602DescendingYearOrder.csv") -``` - -而它的性能测试结果是: - -```nu -❯ timeit {python load.py} -2sec 91ms 872us 900ns -``` - -这是一个很大的进步,从 30 秒到 2 秒。干得好,Pandas! - -也许我们加载数据可以再快一点,这一次我们将使用 Nushell 的 `dfr open` 命令: - -```nu -❯ timeit {dfr open .\Data7602DescendingYearOrder.csv} -601ms 700us 700ns -``` - -这一次,我们花了 0.6 秒。一点也不差。 - -### `Group-by`比较 - -这次让我们做一个稍微复杂的操作。我们将按年份对数据进行分组,并根据`geo_count`列对分组求和。 - -同样,我们要从 Nushell 的原生命令开始: - -::: tip -如果你想运行这个例子,请注意接下来的命令将使用大量的内存,在该命令执行期间可能会影响你的系统性能。 -::: - -```nu -❯ timeit { - open .\Data7602DescendingYearOrder.csv - | group-by year - | transpose header rows - | upsert rows { get rows | math sum } - | flatten -} - -6min 30sec 622ms 312us -``` - -所以,执行这个聚合操作需要 6 分钟。 - -让我们试试在`pandas`中进行同样的操作: - -```python -import pandas as pd - -df = pd.read_csv("Data7602DescendingYearOrder.csv") -res = df.groupby("year")["geo_count"].sum() -print(res) -``` - -而性能测试的结果是: - -```nu -❯ timeit {python .\load.py} - -1sec 966ms 954us 800ns -``` - -一点也不差!同样,Pandas 设法在很短的时间内完成了它。 - -为了进行比较,让我们试试 Nushell DataFrames。我们要把所有的操作放在一个`nu`文件中,以确保我们做的是类似的操作: - -```nu -let df = (dfr open Data7602DescendingYearOrder.csv) -let res = ($df | dfr group-by year | dfr agg (dfr col geo_count | dfr sum)) -$res -``` - -当使用 DataFrames 时的性能测试结果是: - -```nu -❯ timeit {source load.nu} - -557ms 658us 500ns -``` - -幸运的是,Nushell DataFrame 设法将时间再次减半。这不是很好吗? - -正如你所看到的,Nushell 的[`Dataframe`](/commands/categories/dataframe.md)命令和现在最常见的做数据分析的工具一样快。这个发行版中的命令有可能成为你做数据分析的首选工具。通过组合复杂的 Nushell 管道,你可以以一种可靠的方式从数据中提取信息。 - -## 使用 DataFrames - -在看到了可以用[`Dataframe`](/commands/categories/dataframe.md)命令完成的事情之后,现在是时候开始测试它们了。首先,让我们创建一个样本 CSV 文件,该文件将成为我们的样本 DataFrame,并与示例一起使用。在你喜欢的编辑器中粘贴下面几行来创建样本 csv 文件: - -``` -int_1,int_2,float_1,float_2,first,second,third,word -1,11,0.1,1.0,a,b,c,first -2,12,0.2,1.0,a,b,c,second -3,13,0.3,2.0,a,b,c,third -4,14,0.4,3.0,b,a,c,second -0,15,0.5,4.0,b,a,a,third -6,16,0.6,5.0,b,a,a,second -7,17,0.7,6.0,b,c,a,third -8,18,0.8,7.0,c,c,b,eight -9,19,0.9,8.0,c,c,b,ninth -0,10,0.0,9.0,c,c,b,ninth -``` - -保存该文件并随意命名,在这些例子中,该文件将被称为 `test_small.csv`。 - -现在,要将该文件作为 DataFrame 进行读取,请使用 `dfr open` 命令,如下所示: - -```nu -> let df = (dfr open test_small.csv) -``` - -这应该会在内存中创建一个值 `$df`,用来存放我们刚刚创建的数据。 - -::: tip -`dfr open` 命令可以读取 **csv** 或 **parquet** 文件。 -::: - -要查看存储在内存中的所有 DataFrames,你可以使用: - -```nu -❯ dfr ls -╭───┬──────┬─────────┬──────╮ -│ # │ name │ columns │ rows │ -├───┼──────┼─────────┼──────┤ -│ 0 │ $df │ 8 │ 10 │ -╰───┴──────┴─────────┴──────╯ -``` - -正如你所看到的,该命令显示了所创建的 DataFrame 以及关于它们的基本信息。 - -如果你想看到加载的 DataFrame 的预览,你可以将 DataFrame 变量发送到流中: - -```nu -❯ $df -╭───┬───────┬───────┬─────────┬─────────┬───────┬────────┬───────┬────────╮ -│ # │ int_1 │ int_2 │ float_1 │ float_2 │ first │ second │ third │ word │ -├───┼───────┼───────┼─────────┼─────────┼───────┼────────┼───────┼────────┤ -│ 0 │ 1 │ 11 │ 0.10 │ 1.00 │ a │ b │ c │ first │ -│ 1 │ 2 │ 12 │ 0.20 │ 1.00 │ a │ b │ c │ second │ -│ 2 │ 3 │ 13 │ 0.30 │ 2.00 │ a │ b │ c │ third │ -│ 3 │ 4 │ 14 │ 0.40 │ 3.00 │ b │ a │ c │ second │ -│ 4 │ 0 │ 15 │ 0.50 │ 4.00 │ b │ a │ a │ third │ -│ 5 │ 6 │ 16 │ 0.60 │ 5.00 │ b │ a │ a │ second │ -│ 6 │ 7 │ 17 │ 0.70 │ 6.00 │ b │ c │ a │ third │ -│ 7 │ 8 │ 18 │ 0.80 │ 7.00 │ c │ c │ b │ eight │ -│ 8 │ 9 │ 19 │ 0.90 │ 8.00 │ c │ c │ b │ ninth │ -│ 9 │ 0 │ 10 │ 0.00 │ 9.00 │ c │ c │ b │ ninth │ -╰───┴───────┴───────┴─────────┴─────────┴───────┴────────┴───────┴────────╯ -``` - -有了内存中的 DataFrame,我们就可以开始对 `DataFrame` 进行列操作。 - -::: tip -如果你想看到所有可用的 DataFrame 命令,你可以使用 `$nu.scope.commands | where category =~ dataframe`。 -::: - -## 基本聚合 - -让我们从 DataFrame 的基本聚合开始,通过使用`aggregate`命令对`df`中存在的所有列进行求和: - -```nu -❯ $df | dfr sum -╭───┬───────┬───────┬─────────┬─────────┬───────┬────────┬───────┬──────╮ -│ # │ int_1 │ int_2 │ float_1 │ float_2 │ first │ second │ third │ word │ -├───┼───────┼───────┼─────────┼─────────┼───────┼────────┼───────┼──────┤ -│ 0 │ 40 │ 145 │ 4.50 │ 46.00 │ │ │ │ │ -╰───┴───────┴───────┴─────────┴─────────┴───────┴────────┴───────┴──────╯ -``` - -正如你所看到的,聚合函数(`aggregate`)为那些有意义的列计算出了总和。如果你想过滤掉文本列,你可以使用`select`命令来选择你想要的列。 - -```nu -❯ $df | dfr sum | dfr select int_1 int_2 float_1 float_2 -╭───┬───────┬───────┬─────────┬─────────╮ -│ # │ int_1 │ int_2 │ float_1 │ float_2 │ -├───┼───────┼───────┼─────────┼─────────┤ -│ 0 │ 40 │ 145 │ 4.50 │ 46.00 │ -╰───┴───────┴───────┴─────────┴─────────╯ -``` - -你甚至可以像存储任何其他 Nushell 变量一样存储这个聚合的结果: - -```nu -❯ let res = ($df | dfr sum | dfr select int_1 int_2 float_1 float_2) -``` - -::: tip -输入 `let res = ( !! )` 并按回车,这将自动完成之前执行的命令。注意 ( 和 !! 之间的空格。 -::: - -现在我们有两个 DataFrame 存储在内存中: - -```nu -❯ dfr ls -╭───┬──────┬─────────┬──────╮ -│ # │ name │ columns │ rows │ -├───┼──────┼─────────┼──────┤ -│ 0 │ $res │ 4 │ 1 │ -│ 1 │ $df │ 8 │ 10 │ -╰───┴──────┴─────────┴──────╯ -``` - -很整洁,不是吗? - -你可以在 DataFrame 上进行若干聚合,以便从中提取基本信息,也可以对你的全新 DataFrame 进行基本数据分析。 - -## 连接 DataFrame - -也可以用一个列作为参考来连接(`join`)两个 DataFrame。我们将把我们的迷你 DataFrame 与另一个迷你 DataFrame 连接起来。在另一个文件中复制这些行,并创建相应的 DataFrame(在以下例子中,我们将称之为`test_small_a.csv`)。 - -``` -int_1,int_2,float_1,float_2,first -9,14,0.4,3.0,a -8,13,0.3,2.0,a -7,12,0.2,1.0,a -6,11,0.1,0.0,b -``` - -我们使用 `dfr open` 命令来创建新的变量: - -```nu -❯ let df_a = (dfr open test_small_a.csv) -``` - -现在,当第二个 DataFrame 加载到内存中时,我们可以使用左边 DataFrame 的`int_1`列和右边 DataFrame 的`int_1`列来连接它们。 - -```nu -❯ $df | dfr join $df_a int_1 int_1 -╭───┬───────┬───────┬─────────┬─────────┬───────┬────────┬───────┬────────┬─────────┬───────────┬───────────┬─────────╮ -│ # │ int_1 │ int_2 │ float_1 │ float_2 │ first │ second │ third │ word │ int_2_x │ float_1_x │ float_2_x │ first_x │ -├───┼───────┼───────┼─────────┼─────────┼───────┼────────┼───────┼────────┼─────────┼───────────┼───────────┼─────────┤ -│ 0 │ 6 │ 16 │ 0.60 │ 5.00 │ b │ a │ a │ second │ 11 │ 0.10 │ 0.00 │ b │ -│ 1 │ 7 │ 17 │ 0.70 │ 6.00 │ b │ c │ a │ third │ 12 │ 0.20 │ 1.00 │ a │ -│ 2 │ 8 │ 18 │ 0.80 │ 7.00 │ c │ c │ b │ eight │ 13 │ 0.30 │ 2.00 │ a │ -│ 3 │ 9 │ 19 │ 0.90 │ 8.00 │ c │ c │ b │ ninth │ 14 │ 0.40 │ 3.00 │ a │ -╰───┴───────┴───────┴─────────┴─────────┴───────┴────────┴───────┴────────┴─────────┴───────────┴───────────┴─────────╯ -``` - -::: tip -在`Nu`中,当一个命令有多个参数,并期望得到多个值时,我们用方括号`[]`来包裹这些值。在[`dfr join`](/commands/docs/dfr_join.md)的情况下,我们可以对多个列进行连接,只要它们具有相同的类型。 -::: - -例如: - -```nu -❯ $df | dfr join $df_a [int_1 first] [int_1 first] -╭───┬───────┬───────┬─────────┬─────────┬───────┬────────┬───────┬────────┬─────────┬───────────┬───────────╮ -│ # │ int_1 │ int_2 │ float_1 │ float_2 │ first │ second │ third │ word │ int_2_x │ float_1_x │ float_2_x │ -├───┼───────┼───────┼─────────┼─────────┼───────┼────────┼───────┼────────┼─────────┼───────────┼───────────┤ -│ 0 │ 6 │ 16 │ 0.60 │ 5.00 │ b │ a │ a │ second │ 11 │ 0.10 │ 0.00 │ -╰───┴───────┴───────┴─────────┴─────────┴───────┴────────┴───────┴────────┴─────────┴───────────┴───────────╯ -``` - -默认情况下,连接命令做的是内连接,也就是说,它将保留两个 DataFrame 都有相同值的记录。你可以选择一个左联接来保留左边 DataFrame 中缺失的行。你也可以保存这个结果,以便在以后的操作中使用它。 - -## DataFrame 分组 - -可以用 DataFrame 进行的最强大的操作之一是[`dfr group-by`](/commands/docs/dfr_group-by.md)。这个命令将允许你根据一个分组条件进行聚合操作。在 Nushell 中,`GroupBy`是一种可以被存储和重复使用的对象,可以被用于多个聚合。这是很方便的,因为在进行分组时,创建分组对是最昂贵的运算,如果你打算用同一个分组条件进行多个操作,就没有必要重复该运算。 - -要创建一个`GroupBy`对象,你只需要使用`group-by`命令: - -```nu -❯ let group = ($df | dfr group-by first) -❯ $group -╭─────────────┬──────────────────────────────────────────────╮ -│ LazyGroupBy │ apply aggregation to complete execution plan │ -╰─────────────┴──────────────────────────────────────────────╯ -``` - -当打印 `GroupBy` 对象时,我们可以看到它在后台是一个懒惰的操作,等待着通过添加一个聚合来完成。使用 `GroupBy` 我们可以在一个列上创建聚合 - -```nu -❯ $group | dfr agg (dfr col int_1 | dfr sum) -╭───┬───────┬───────╮ -│ # │ first │ int_1 │ -├───┼───────┼───────┤ -│ 0 │ b │ 17 │ -│ 1 │ a │ 6 │ -│ 2 │ c │ 17 │ -╰───┴───────┴───────╯ -``` - -或者我们可以在相同或不同的列上定义多个聚合: - -```nu -❯ $group | dfr agg [ -∙ (dfr col int_1 | dfr n-unique) -∙ (dfr col int_2 | dfr min) -∙ (dfr col float_1 | dfr sum) -∙ (dfr col float_2 | dfr count) -∙ ] | dfr sort-by first -╭───┬───────┬───────┬───────┬─────────┬─────────╮ -│ # │ first │ int_1 │ int_2 │ float_1 │ float_2 │ -├───┼───────┼───────┼───────┼─────────┼─────────┤ -│ 0 │ a │ 3 │ 11 │ 0.60 │ 3 │ -│ 1 │ b │ 4 │ 14 │ 2.20 │ 4 │ -│ 2 │ c │ 3 │ 10 │ 1.70 │ 3 │ -╰───┴───────┴───────┴───────┴─────────┴─────────╯ -``` - -正如你所看到的,`GroupBy`对象是一个非常强大的变量,在你操作数据集时,它值得被保留在内存中。 - -## 创建 DataFrames - -也可以从基本的 Nushell 基础类型,如整数、小数或字符串,来构建 DataFrames。让我们使用 `into df` 命令来创建一个小的 DataFrame: - -```nu -❯ let a = ([[a b]; [1 2] [3 4] [5 6]] | dfr into-df) -❯ $a -╭───┬───┬───╮ -│ # │ a │ b │ -├───┼───┼───┤ -│ 0 │ 1 │ 2 │ -│ 1 │ 3 │ 4 │ -│ 2 │ 5 │ 6 │ -╰───┴───┴───╯ -``` - -::: tip -目前,并不是所有的 Nushell 基本类型都可以转换为 DataFrame。随着 DataFrame 功能的成熟,这一点将在未来发生变化。 -::: - -我们可以在一个 DataFrame 中添加列,以创建一个新的变量。作为一个例子,让我们在迷你 DataFrame `$a` 上添加两列: - -```nu -❯ let a2 = ($a | dfr with-column $a.a --name a2 | dfr with-column $a.a --name a3) -❯ $a2 -╭───┬───┬───┬────┬────╮ -│ # │ a │ b │ a2 │ a3 │ -├───┼───┼───┼────┼────┤ -│ 0 │ 1 │ 2 │ 1 │ 1 │ -│ 1 │ 3 │ 4 │ 3 │ 3 │ -│ 2 │ 5 │ 6 │ 5 │ 5 │ -╰───┴───┴───┴────┴────╯ -``` - -Nushell 强大的管道语法允许我们通过从其他 DataFrame 中获取数据并将其附加到这些 DataFrame 中来创建新的 DataFrame。现在,如果你列出你的 DataFrame,你会看到总共有四个: - -```nu -❯ dfr ls -╭───┬───────┬─────────┬──────╮ -│ # │ name │ columns │ rows │ -├───┼───────┼─────────┼──────┤ -│ 0 │ $a2 │ 4 │ 3 │ -│ 1 │ $df_a │ 5 │ 4 │ -│ 2 │ $df │ 8 │ 10 │ -│ 3 │ $a │ 2 │ 3 │ -│ 4 │ $res │ 4 │ 1 │ -╰───┴───────┴─────────┴──────╯ -``` - -值得一提的是,在使用 DataFrame 时,内存是如何被优化的呢?这要感谢 **Apache Arrow** 和 **Polars**。在一个非常简单的表示中,DataFrame 中的每一列都是一个 Arrow 数组,它使用了几种内存规格,以塞满尽可能多的数据(查看 [Arrow 列格式](https://arrow.apache.org/docs/format/Columnar.html) );另一个优化技巧是,只要有可能,DataFrame 中的列就会在多个 DataFrame 之间共享,避免了相同数据的内存重复占用。这意味着 DataFrame `$a`和`$a2`共享我们用 `into df` 命令创建的两个列。由于这个原因,不能改变 DataFrame 中某一列的值。然而,你可以根据其他列或 DataFrame 的数据创建新的列。 - -## 使用系列 - -系列(`Series`) 是 `DataFrame` 的基本组成部分。每个系列代表一个具有相同数据类型的列,我们可以创建多个不同类型的系列,如浮点、整型或字符串。 - -让我们通过使用 `into df` 命令创建一个系列,来开始我们对系列的探索: - -```nu -❯ let new = ([9 8 4] | dfr into-df) -❯ $new -╭───┬───╮ -│ # │ 0 │ -├───┼───┤ -│ 0 │ 9 │ -│ 1 │ 8 │ -│ 2 │ 4 │ -╰───┴───╯ -``` - -我们从一个整数列表创建了一个新的系列(我们也可以用浮点数或字符串做同样的事情)。 - -系列已经定义了自己的基本操作,它们可以用来创建其他系列。让我们通过对先前创建的列进行一些运算来创建一个新的系列: - -```nu -❯ let new_2 = ($new * 3 + 10) -❯ $new_2 -╭───┬────╮ -│ # │ 0 │ -├───┼────┤ -│ 0 │ 37 │ -│ 1 │ 34 │ -│ 2 │ 22 │ -╰───┴────╯ -``` - -现在我们有一个新的系列,它是通过对前一个变量进行基本操作而构建的。 - -::: tip -如果你想看看你在内存中存储了多少变量,你可以使用`$nu.scope.vars`。 -::: - -让我们重新命名我们之前的系列为 `memorable` - -```nu -❯ let new_2 = ($new_2 | dfr rename "0" memorable) -❯ $new_2 -╭───┬───────────╮ -│ # │ memorable │ -├───┼───────────┤ -│ 0 │ 37 │ -│ 1 │ 34 │ -│ 2 │ 22 │ -╰───┴───────────╯ -``` - -只要两个系列的数据类型相同,我们也可以对它们进行基本操作: - -```nu -❯ $new - $new_2 -╭───┬─────────────────╮ -│ # │ sub_0_memorable │ -├───┼─────────────────┤ -│ 0 │ -28 │ -│ 1 │ -26 │ -│ 2 │ -18 │ -╰───┴─────────────────╯ -``` - - -而且我们可以将它们添加到先前定义的 DataFrames 中: - -```nu -❯ let new_df = ($a | dfr with-column $new --name new_col) -❯ $new_df -╭───┬───┬───┬─────────╮ -│ # │ a │ b │ new_col │ -├───┼───┼───┼─────────┤ -│ 0 │ 1 │ 2 │ 9 │ -│ 1 │ 3 │ 4 │ 8 │ -│ 2 │ 5 │ 6 │ 4 │ -╰───┴───┴───┴─────────╯ -``` - -存储在 DataFrame 中的系列也可以直接使用,例如,我们可以将列`a`和`b`相乘来创建一个新系列: - -```nu -❯ $new_df.a * $new_df.b -╭───┬─────────╮ -│ # │ mul_a_b │ -├───┼─────────┤ -│ 0 │ 2 │ -│ 1 │ 12 │ -│ 2 │ 30 │ -╰───┴─────────╯ -``` - -我们可以开始使用管道,以创建新的列和 DataFrames: - -```nu -❯ let $new_df = ($new_df | dfr with-column ($new_df.a * $new_df.b / $new_df.new_col) --name my_sum) -❯ $new_df -╭───┬───┬───┬─────────┬────────╮ -│ # │ a │ b │ new_col │ my_sum │ -├───┼───┼───┼─────────┼────────┤ -│ 0 │ 1 │ 2 │ 9 │ 0 │ -│ 1 │ 3 │ 4 │ 8 │ 1 │ -│ 2 │ 5 │ 6 │ 4 │ 7 │ -╰───┴───┴───┴─────────┴────────╯ -``` - -Nushell 的管道系统可以帮助你创建非常有趣的工作流程。 - -## 系列和掩码 - -在使用 DataFrames 时,系列还有另一个关键用途,那就是我们可以用它们来建立布尔掩码(Mask)。让我们先用等于运算符创建一个简单的掩码: - -```nu -❯ let mask = ($new == 8) -❯ $mask -╭───┬───────╮ -│ # │ 0 │ -├───┼───────┤ -│ 0 │ false │ -│ 1 │ true │ -│ 2 │ false │ -╰───┴───────╯ -``` - -有了这个掩码,我们现在可以过滤一个 DataFrame,像这样: - -```nu -❯ $new_df | dfr filter-with $mask -╭───┬───┬───┬─────────┬────────╮ -│ # │ a │ b │ new_col │ my_sum │ -├───┼───┼───┼─────────┼────────┤ -│ 0 │ 3 │ 4 │ 8 │ 1 │ -╰───┴───┴───┴─────────┴────────╯ -``` - -现在我们有一个新的 DataFrame,其中只有掩码为真的值。 - -掩码也可以从 Nushell 列表中创建,比如: - -```nu -❯ let mask1 = ([true true false] | dfr into-df) -❯ $new_df | dfr filter-with $mask1 -╭───┬───┬───┬─────────┬────────╮ -│ # │ a │ b │ new_col │ my_sum │ -├───┼───┼───┼─────────┼────────┤ -│ 0 │ 1 │ 2 │ 9 │ 0 │ -│ 1 │ 3 │ 4 │ 8 │ 1 │ -╰───┴───┴───┴─────────┴────────╯ -``` - -为了创建复杂的掩码,我们可以使用`AND`: - -```nu -❯ $mask and $mask1 -╭───┬─────────╮ -│ # │ and_0_0 │ -├───┼─────────┤ -│ 0 │ false │ -│ 1 │ true │ -│ 2 │ false │ -╰───┴─────────╯ -``` - -或者 `OR` 操作: - -```nu -❯ $mask or $mask1 -╭───┬────────╮ -│ # │ or_0_0 │ -├───┼────────┤ -│ 0 │ true │ -│ 1 │ true │ -│ 2 │ false │ -╰───┴────────╯ -``` - -我们也可以通过检查某些值是否存在于其他系列来创建一个掩码。使用我们创建的第一个 DataFrame,我们可以这样做: - -```nu -❯ let mask3 = ($df | dfr col first | dfr is-in [b c]) -❯ $mask3 -╭──────────┬─────────────────────────────────────────────────────────────────────────────────────────────────╮ -│ │ ╭───┬─────────┬──────────────╮ │ -│ input │ │ # │ expr │ value │ │ -│ │ ├───┼─────────┼──────────────┤ │ -│ │ │ 0 │ column │ first │ │ -│ │ │ 1 │ literal │ Series[list] │ │ -│ │ ╰───┴─────────┴──────────────╯ │ -│ function │ IsIn │ -│ options │ FunctionOptions { collect_groups: ApplyFlat, input_wildcard_expansion: false, auto_explode: tru │ -│ │ e, fmt_str: "", cast_to_supertypes: true, allow_rename: false, pass_name_to_apply: false } │ -╰──────────┴─────────────────────────────────────────────────────────────────────────────────────────────────╯ -``` - -而这个新的掩码可以用来过滤 DataFrame - -```nu -❯ $df | dfr filter-with $mask3 -╭───┬───────┬───────┬─────────┬─────────┬───────┬────────┬───────┬────────╮ -│ # │ int_1 │ int_2 │ float_1 │ float_2 │ first │ second │ third │ word │ -├───┼───────┼───────┼─────────┼─────────┼───────┼────────┼───────┼────────┤ -│ 0 │ 4 │ 14 │ 0.40 │ 3.00 │ b │ a │ c │ second │ -│ 1 │ 0 │ 15 │ 0.50 │ 4.00 │ b │ a │ a │ third │ -│ 2 │ 6 │ 16 │ 0.60 │ 5.00 │ b │ a │ a │ second │ -│ 3 │ 7 │ 17 │ 0.70 │ 6.00 │ b │ c │ a │ third │ -│ 4 │ 8 │ 18 │ 0.80 │ 7.00 │ c │ c │ b │ eight │ -│ 5 │ 9 │ 19 │ 0.90 │ 8.00 │ c │ c │ b │ ninth │ -│ 6 │ 0 │ 10 │ 0.00 │ 9.00 │ c │ c │ b │ ninth │ -╰───┴───────┴───────┴─────────┴─────────┴───────┴────────┴───────┴────────╯ -``` - -另一个可以用掩码进行的操作是设置或替换一个系列的值。例如,我们可以改变列`first`中的值,如果该值包含`a`: - -```nu -❯ $df | dfr get first | dfr set new --mask ($df.first =~ a) -╭───┬────────╮ -│ # │ string │ -├───┼────────┤ -│ 0 │ new │ -│ 1 │ new │ -│ 2 │ new │ -│ 3 │ b │ -│ 4 │ b │ -│ 5 │ b │ -│ 6 │ b │ -│ 7 │ c │ -│ 8 │ c │ -│ 9 │ c │ -╰───┴────────╯ -``` - -## 系列作为索引 - -系列也可以作为过滤 DataFrame 的一种方式,将它们作为索引列表使用。例如,假设我们想从原始 DataFrame 中获取第1、4和6行。针对这一点,我们可以使用以下命令来提取这些信息: - -```nu -❯ let indices = ([1 4 6] | dfr into-df) -❯ $df | dfr take $indices -╭───┬───────┬───────┬─────────┬─────────┬───────┬────────┬───────┬────────╮ -│ # │ int_1 │ int_2 │ float_1 │ float_2 │ first │ second │ third │ word │ -├───┼───────┼───────┼─────────┼─────────┼───────┼────────┼───────┼────────┤ -│ 0 │ 2 │ 12 │ 0.20 │ 1.00 │ a │ b │ c │ second │ -│ 1 │ 0 │ 15 │ 0.50 │ 4.00 │ b │ a │ a │ third │ -│ 2 │ 7 │ 17 │ 0.70 │ 6.00 │ b │ c │ a │ third │ -╰───┴───────┴───────┴─────────┴─────────┴───────┴────────┴───────┴────────╯ -``` - -命令 [`dfr take`](/commands/docs/dfr_take.md) 非常方便,特别是当我们把它与其他命令混合使用时。 -假设我们想提取 `first` 列中含有第一个重复的元素的的所有记录。为了做到这一点,我们可以使用 `arg-unique` 命令,如下例所示: - -```nu -❯ let indices = ($df | dfr get first | dfr arg-unique) -❯ $df | dfr take $indices -╭───┬───────┬───────┬─────────┬─────────┬───────┬────────┬───────┬────────╮ -│ # │ int_1 │ int_2 │ float_1 │ float_2 │ first │ second │ third │ word │ -├───┼───────┼───────┼─────────┼─────────┼───────┼────────┼───────┼────────┤ -│ 0 │ 1 │ 11 │ 0.10 │ 1.00 │ a │ b │ c │ first │ -│ 1 │ 4 │ 14 │ 0.40 │ 3.00 │ b │ a │ c │ second │ -│ 2 │ 8 │ 18 │ 0.80 │ 7.00 │ c │ c │ b │ eight │ -╰───┴───────┴───────┴─────────┴─────────┴───────┴────────┴───────┴────────╯ -``` - -或者,如果我们想使用一个特定的列来创建一个新的有序 DataFrame,该怎么办?我们可以使用`arg-sort`来完成这个任务。在下一个例子中,我们可以通过`word`列对 DataFrame 进行排序: - -::: tip -同样的结果也可以用[`sort`](/commands/docs/sort.md)命令来完成。 -::: - -```nu -❯ let indices = ($df | dfr get word | dfr arg-sort) -❯ $df | dfr take $indices -╭───┬───────┬───────┬─────────┬─────────┬───────┬────────┬───────┬────────╮ -│ # │ int_1 │ int_2 │ float_1 │ float_2 │ first │ second │ third │ word │ -├───┼───────┼───────┼─────────┼─────────┼───────┼────────┼───────┼────────┤ -│ 0 │ 8 │ 18 │ 0.80 │ 7.00 │ c │ c │ b │ eight │ -│ 1 │ 1 │ 11 │ 0.10 │ 1.00 │ a │ b │ c │ first │ -│ 2 │ 9 │ 19 │ 0.90 │ 8.00 │ c │ c │ b │ ninth │ -│ 3 │ 0 │ 10 │ 0.00 │ 9.00 │ c │ c │ b │ ninth │ -│ 4 │ 2 │ 12 │ 0.20 │ 1.00 │ a │ b │ c │ second │ -│ 5 │ 4 │ 14 │ 0.40 │ 3.00 │ b │ a │ c │ second │ -│ 6 │ 6 │ 16 │ 0.60 │ 5.00 │ b │ a │ a │ second │ -│ 7 │ 3 │ 13 │ 0.30 │ 2.00 │ a │ b │ c │ third │ -│ 8 │ 0 │ 15 │ 0.50 │ 4.00 │ b │ a │ a │ third │ -│ 9 │ 7 │ 17 │ 0.70 │ 6.00 │ b │ c │ a │ third │ -╰───┴───────┴───────┴─────────┴─────────┴───────┴────────┴───────┴────────╯ -``` - -最后,我们可以通过在标记的索引中设置一个新值来创建新的系列。请看下一条命令: - -```nu -❯ let indices = ([0 2] | dfr into-df); -❯ $df | dfr get int_1 | dfr set-with-idx 123 --indices $indices -╭───┬───────╮ -│ # │ int_1 │ -├───┼───────┤ -│ 0 │ 123 │ -│ 1 │ 2 │ -│ 2 │ 123 │ -│ 3 │ 4 │ -│ 4 │ 0 │ -│ 5 │ 6 │ -│ 6 │ 7 │ -│ 7 │ 8 │ -│ 8 │ 9 │ -│ 9 │ 0 │ -╰───┴───────╯ -``` - -## 唯一值 - -另一个可以用`Series`完成的操作是在一个列表或列中搜索唯一值。让我们再次使用我们创建的第一个 DataFrame 来测试这些操作。 - -第一个也是最常见的操作是`value_counts`。这个命令计算出一个系列中存在的唯一值的数量。例如,我们可以用它来计算 `first` 列各值的出现次数: - -```nu -❯ $df | dfr get first | dfr value-counts -╭───┬───────┬────────╮ -│ # │ first │ counts │ -├───┼───────┼────────┤ -│ 0 │ b │ 4 │ -│ 1 │ a │ 3 │ -│ 2 │ c │ 3 │ -╰───┴───────┴────────╯ -``` - -正如预期的那样,该命令返回一个新的 DataFrame,可以用来做更多的查询。 - -继续我们对 `Series` 的探索,我们要做的下一件事是只从一个系列中获得唯一值,像这样: - -```nu -❯ $df | dfr get first | dfr unique -╭───┬───────╮ -│ # │ first │ -├───┼───────┤ -│ 0 │ c │ -│ 1 │ b │ -│ 2 │ a │ -╰───┴───────╯ -``` - -或者我们可以得到一个掩码,用来过滤出数据唯一或重复的行。例如,我们可以选择列 `word` 中含唯一值的行: - -```nu -❯ $df | dfr filter-with ($df | dfr get word | dfr is-unique) -╭───┬───────┬───────┬─────────┬─────────┬───────┬────────┬───────┬───────╮ -│ # │ int_1 │ int_2 │ float_1 │ float_2 │ first │ second │ third │ word │ -├───┼───────┼───────┼─────────┼─────────┼───────┼────────┼───────┼───────┤ -│ 0 │ 1 │ 11 │ 0.10 │ 1.00 │ a │ b │ c │ first │ -│ 1 │ 8 │ 18 │ 0.80 │ 7.00 │ c │ c │ b │ eight │ -╰───┴───────┴───────┴─────────┴─────────┴───────┴────────┴───────┴───────╯ -``` - -或所有含重复值的行: - -```nu -❯ $df | dfr filter-with ($df | dfr get word | dfr is-duplicated) -╭───┬───────┬───────┬─────────┬─────────┬───────┬────────┬───────┬────────╮ -│ # │ int_1 │ int_2 │ float_1 │ float_2 │ first │ second │ third │ word │ -├───┼───────┼───────┼─────────┼─────────┼───────┼────────┼───────┼────────┤ -│ 0 │ 2 │ 12 │ 0.20 │ 1.00 │ a │ b │ c │ second │ -│ 1 │ 3 │ 13 │ 0.30 │ 2.00 │ a │ b │ c │ third │ -│ 2 │ 4 │ 14 │ 0.40 │ 3.00 │ b │ a │ c │ second │ -│ 3 │ 0 │ 15 │ 0.50 │ 4.00 │ b │ a │ a │ third │ -│ 4 │ 6 │ 16 │ 0.60 │ 5.00 │ b │ a │ a │ second │ -│ 5 │ 7 │ 17 │ 0.70 │ 6.00 │ b │ c │ a │ third │ -│ 6 │ 9 │ 19 │ 0.90 │ 8.00 │ c │ c │ b │ ninth │ -│ 7 │ 0 │ 10 │ 0.00 │ 9.00 │ c │ c │ b │ ninth │ -╰───┴───────┴───────┴─────────┴─────────┴───────┴────────┴───────┴────────╯ -``` - -## 惰性 Dataframe - -惰性 Dataframe 是一种通过创建逻辑计划来查询数据的方法。这种方法的优点是,在你需要提取数据之前,该计划 -永远不会被评估。这样,你可以把聚合、连接和选择连在一起,一旦你对所选操作感到满意,就可以收集数据。 - -让我们创建一个惰性 Dataframe 的小例子: - -```nu -❯ let a = ([[a b]; [1 a] [2 b] [3 c] [4 d]] | dfr into-lazy) -❯ $a -╭────────────────┬─────────────────────────────────────────────────────────╮ -│ plan │ DF ["a", "b"]; PROJECT */2 COLUMNS; SELECTION: "None" │ -│ │ │ -│ optimized_plan │ DF ["a", "b"]; PROJECT */2 COLUMNS; SELECTION: "None" │ -│ │ │ -╰────────────────┴─────────────────────────────────────────────────────────╯ -``` - -正如你所看到的,产生的 Dataframe 还没有被评估,它以一组可以对数据进行操作的指令的形式存在。 -如果你要收集这个 Dataframe,你会得到如下结果: - -```nu -❯ $a | dfr collect -╭───┬───┬───╮ -│ # │ a │ b │ -├───┼───┼───┤ -│ 0 │ 1 │ a │ -│ 1 │ 2 │ b │ -│ 2 │ 3 │ c │ -│ 3 │ 4 │ d │ -╰───┴───┴───╯ -``` - -正如你所看到的,`collect` 命令执行了计划并为你创建了一个 Nushell 表。 - -所有的 Dataframe 操作都应该能与惰性或者非惰性的 Dataframe 一起工作。为了兼容,这些操作在后台 -进行了转换。然而,为了利用惰性操作的优势,我们建议只对惰性 Dataframe 使用惰性操作。 - -要找到所有惰性 Dataframe 操作,你可以使用: - -```nu -$nu.scope.commands | where category =~ lazyframe -``` - -在定义了你的惰性 Dataframe 后,我们可以开始对它进行链式操作。例如: - -```nu -❯ $a | -∙ dfr reverse | -∙ dfr with-column [ -∙ ((dfr col a) * 2 | dfr as double_a) -∙ ((dfr col a) / 2 | dfr as half_a) -∙ ] | dfr collect -╭───┬───┬───┬──────────┬────────╮ -│ # │ a │ b │ double_a │ half_a │ -├───┼───┼───┼──────────┼────────┤ -│ 0 │ 4 │ d │ 8 │ 2 │ -│ 1 │ 3 │ c │ 6 │ 1 │ -│ 2 │ 2 │ b │ 4 │ 1 │ -│ 3 │ 1 │ a │ 2 │ 0 │ -╰───┴───┴───┴──────────┴────────╯ -``` - -:::tip -你可以使用行缓存编辑器来轻松地格式化你的查询(ctr + o) -::: - -这个查询使用惰性 `reverse` 命令来反转 Dataframe,使用 `dfr with-column` 命令并使用 `expressions` 来创建新的两列。 -`expression` 用于定义在惰性 Dataframe 上执行的操作。当它们组合在一起时,就形成了整个由惰性命令来查询数据的 -指令集。要列出所有产生表达式的命令,你可以使用: - -```nu -❯ scope commands | where category =~ expression -``` - -在我们前面的例子中,我们使用 `dfr col` 命令来表示列 `a` 将被乘以2,然后它将被命名为 `double_a`。 -在某些情况下,可以推断出 `dfr col` 命令的使用,例如,使用 `dfr select` 命令,我们可以只使用一个字符串: - -```nu -❯ $a | dfr select a | dfr collect -``` - -或者使用 `dfr col` 命令: - -```nu -❯ $a | dfr select (dfr col a) | dfr collect -``` - -让我们尝试更复杂的东西,从一个惰性 Dataframe 中创建聚合: - -```nu -❯ let a = ( [[name value]; [one 1] [two 2] [one 1] [two 3]] | dfr into-lazy ) -❯ $a | -∙ dfr group-by name | -∙ dfr agg [ -∙ (dfr col value | dfr sum | dfr as sum) -∙ (dfr col value | dfr mean | dfr as mean) -∙ ] | dfr collect -╭───┬──────┬─────┬──────╮ -│ # │ name │ sum │ mean │ -├───┼──────┼─────┼──────┤ -│ 0 │ two │ 5 │ 2.50 │ -│ 1 │ one │ 2 │ 1.00 │ -╰───┴──────┴─────┴──────╯ -``` - -我们可以在一个还没有被收集的惰性 Dataframe 上进行连接操作。让我们把产生的分组连接到原来的惰性 Dataframe 中去吧 - -```nu -❯ let a = ( [[name value]; [one 1] [two 2] [one 1] [two 3]] | dfr into-lazy ) -❯ let group = ($a -∙ | dfr group-by name -∙ | dfr agg [ -∙ (dfr col value | dfr sum | dfr as sum) -∙ (dfr col value | dfr mean | dfr as mean) -∙ ]) -❯ $a | dfr join $group name name | dfr collect -╭───┬──────┬───────┬─────┬──────╮ -│ # │ name │ value │ sum │ mean │ -├───┼──────┼───────┼─────┼──────┤ -│ 0 │ one │ 1 │ 2 │ 1.00 │ -│ 1 │ two │ 2 │ 5 │ 2.50 │ -│ 2 │ one │ 1 │ 2 │ 1.00 │ -│ 3 │ two │ 3 │ 5 │ 2.50 │ -╰───┴──────┴───────┴─────┴──────╯ -``` - -正如你所看到的,惰性 Dataframe 是一个强大的结构,它可以让你使用灵活的语法来查询数据,从而极快地获得结果。 - -## Dataframe 命令 - -到目前为止,我们已经看到了很多可以使用 `DataFrame` 相关命令的操作。然而,到目前为止,我们所使用的命令并不包括所有可用来处理数据的命令,请放心,随着该功能的稳定,还会有更多的命令。 - -下表列出了可用的`DataFrame`命令及其描述,并尽可能显示其类似的 Nushell 命令。 - -::: warning -此列表可能已过时。要获取最新的命令列表,请参阅 -[Dataframe](/commands/categories/dataframe.md) -[Lazyframe](/commands/categories/lazyframe.md) 和 -[Dataframe Or Lazyframe](/commands/categories/dataframe_or_lazyframe.md) -命令类别。 -::: - -| 命令名 | 应用于 | 描述 | Nushell 类似命令 | -| --------------- | --------------------------- | -------------------------------------------------- | ----------------------------- | -| aggregate | DataFrame, GroupBy, Series | 在一个 DataFrame、GroupBy 或系列对象上执行聚合操作 | math | -| all-false | Series | 如果所有的值都是假的,则返回真 | | -| all-true | Series | 如果所有的值都是真的,则返回真 | all | -| arg-max | Series | 返回系列中最大值的索引 | | -| arg-min | Series | 返回系列中最小值的索引 | | -| arg-sort | Series | 返回排序后的系列的索引 | | -| arg-true | Series | 返回值为真的索引 | | -| arg-unique | Series | 返回唯一值的索引 | | -| count-null | Series | 计算空值 | | -| count-unique | Series | 计算唯一值 | | -| drop | DataFrame | 通过删除选定的列来创建一个新的 DataFrame | drop | -| drop-duplicates | DataFrame | 删除 DataFrame 中的重复值 | | -| drop-nulls | DataFrame, Series | 丢弃 DataFrame 中的空值 | | -| dtypes | DataFrame | 显示 DataFrame 的数据类型 | | -| filter-with | DataFrame | 使用 Mask 作为参考来过滤 DataFrame | | -| first | DataFrame | 用第一行创建新的 DataFrame | first | -| get | DataFrame | 用选定的列创建 DataFrame | get | -| group-by | DataFrame | 创建一个 GroupBy 对象,可用于其他聚合 | group-by | -| is-duplicated | Series | 创建表示重复值的 Mask | | -| is-in | Series | 检查一个系列的元素是否包含在右边的系列中 | in | -| is-not-null | Series | 创建值为非空的 Mask | | -| is-null | Series | 创建值为空的 Mask | ` == $nothing` | -| is-unique | Series | 创建表示唯一值的 Mask | | -| join | DataFrame | 使用列作为参考来连接一个 DataFrame | | -| last | DataFrame | 用最后几行创建新的 DataFrame | last | -| ls-df | | 列出已存储的 DataFrame | | -| melt | DataFrame | 将一个 DataFrame 从宽格式转为长格式 | | -| not | Series Inverts boolean mask | | -| open | | 从 csv 文件中加载 DataFrame | open | -| pivot | GroupBy | 在 GroupBy 对象上执行透视操作 | pivot | -| rename | Dataframe, Series | 重命名一个系列 | rename | -| sample | DataFrame | 创建样本 DataFrame | | -| select | DataFrame | 用选定的列创建一个新的 DataFrame | select | -| set | Series | 在给定的 Mask 为真时设置值 | | -| set-with-idx | Series | 设置给定索引中的值 | | -| shift | Series | 将值移到一个给定的时段 | | -| show | DataFrame | 将 DataFrame 的一个部分转换为一个表或列表值 | | -| slice | DataFrame | 从行的切片中创建新的 DataFrame | | -| sort-by | DataFrame, Series | 创建新的排序 DataFrame 或系列 | sort | -| take | DataFrame, Series | 使用给定的索引创建新的 DataFrame | | -| to csv | DataFrame | 将 DataFrame 保存为 csv 文件 | to csv | -| into df | | 将一个管道里的表或列表转换为 DataFrame | | -| dummies | DataFrame | 创建一个带有假值的新 DataFrame | | -| to parquet | DataFrame | 将 DataFrame 保存到 parquet 文件中 | | -| unique | Series | 返回一个系列中的唯一值 | uniq | -| value-counts | Series | 返回一个带有系列中唯一值的计数的 DataFrame | | -| where | DataFrame | 过滤 DataFrame 以符合条件 | where | -| with-column | DataFrame | 在 DataFrame 中添加一个系列 | `insert \| upsert { }` | - -## DataFrames 的未来 - -我们希望在本页结束时,你已经牢固掌握了如何使用 DataFrame 相关命令。正如你所看到的,它们提供了强大的操作,可以帮助你更快更原生地处理数据。 - -然而,DataFrames 的未来仍然是非常实验性的,随着这些命令的成熟,新的命令和利用这些命令的工具将被加入。例如,DataFrames 的下一步是引入惰性 DataFrames,这将允许你定义复杂的数据操作,这些操作将在你决定 "**完成**" 这个管道时才被执行。这将使 Nushell 有机会选择最佳计划来查询你所要求的数据。 - -请继续访问本书,以查看 DataFrames 的最新情况,以及它们如何帮助你更快更有效地处理数据。 diff --git a/zh-CN/book/environment.md b/zh-CN/book/environment.md deleted file mode 100644 index 5efc1d06e8e..00000000000 --- a/zh-CN/book/environment.md +++ /dev/null @@ -1,221 +0,0 @@ -# 环境 - -Shell 中的一个常见任务是控制外部应用程序将使用的环境变量。这通常是自动完成的,因为环境被打包,并在外部应用程序启动时提供给它。但有时,我们希望更精确地控制一个应用程序看到的环境变量。 - -你可以使用[`env`](/commands/docs/env.md)命令查看当前环境变量: - -``` - # name type value raw -────────────────────────────────────────────────────────────────────────────────────────── - 16 DISPLAY string :0 :0 - 17 EDITOR string nvim nvim - 28 LANG string en_US.UTF-8 en_US.UTF-8 - 35 PATH list [list 16 items] /path1:/path2:/... - 36 PROMPT_COMMAND block -``` - -在 Nushell 中,环境变量可以是任何值,并且有任何类型(见`type`列)。 -Nushell 中使用的环境变量的实际值在`value`列下。 -你可以直接使用`$env`变量查询该值,例如,`$env.PATH | length`。 -最后的`raw`列显示了将被发送到外部应用程序的实际值(详见 [环境变量转换](environment.md#环境变量转换) )。 - -环境最初是由 Nu 的 [配置文件](configuration.md) 和 Nu 的运行环境创建的。 - -## 设置环境变量 - -有几种方法可以设置环境变量: - -### $env.VAR 赋值 - -使用`$env.VAR = "val"`命令是最直接的方法: - -```nu -> $env.FOO = 'BAR' -``` - -因此,如果你想扩展`PATH`变量,你可以这样做: - -```nu -$env.PATH = ($env.PATH | prepend '/path/you/want/to/add') -``` - -在这里,我们把指定文件夹前置添加到`PATH`中的现有路径中,所以它将有最高的优先级。 -如果你想给它最低的优先级,你可以使用`append`命令。 - -### [`load-env`](/commands/docs/load-env.md) - -如果你有一个以上的环境变量需要设置,你可以使用`load-env`并创建一个键/值对记录(Record),以用于加载多个环境变量: - -```nu -> load-env { "BOB": "FOO", "JAY": "BAR" } -``` - -### 一次性环境变量 - -这些变量被定义为只在执行代码块的过程中临时有效。 -详情请看 [一次性环境变量](environment.md#一次性环境变量) 。 - -### 调用[`def --env`](/commands/docs/def.md)定义的命令 - -详情见 [从自定义命令中定义环境](environment.md#从自定义命令中定义环境变量)。 - -### 使用模块导出 - -参见 [模块](modules.md#环境变量) 部分了解更多详情。 - -## 读取环境变量 - -单个环境变量是记录的一个字段,存储在 `$env` 变量中,可以用 `$env.VARIABLE` 读取: - -``` -> $env.FOO -BAR -``` - -## 作用域 - -当你设置环境变量时,它将只在当前作用域内可用(变量所在的块和它里面的任何块)。 - -这里有一个小例子来演示环境变量作用域: - -```nu -> $env.FOO = "BAR" -> do { - $env.FOO = "BAZ" - $env.FOO == "BAZ" -} -true -> $env.FOO == "BAR" -true -``` - -## 目录切换 - -Shell 中常见的任务是用[`cd`](/commands/docs/cd.md)命令来改变目录。 -在 Nushell 中,调用`cd`等同于设置`PWD`环境变量。 -因此,它遵循与其他环境变量相同的规则(例如,作用域)。 - -## 一次性环境变量 - -在 Bash 和其他软件的启发下,有一个常用的简便方法,可以设置一次性环境变量: - -```nu -> FOO=BAR echo $env.FOO -BAR -``` - -你也可以使用[`with-env`](/commands/docs/with-env.md)来更明确地做同样的事情: - -```nu -> with-env { FOO: BAR } { echo $env.FOO } -BAR -``` - -[`with-env`](/commands/docs/with-env.md)命令将暂时把环境变量设置为给定的值(这里:变量 "FOO" 被赋为 "BAR" 值)。一旦这样做了,[块](types_of_data.html#块) 将在这个新的环境变量设置下运行。 - -## 永久性环境变量 - -你也可以在启动时设置环境变量,使它们在 Nushell 运行期间都可用。 -要做到这一点,请在 [Nu 配置文件](configuration.md) 中设置一个环境变量。 -比如: - -```nu -# In config.nu -$env.FOO = 'BAR' -``` - -## 从自定义命令中定义环境变量 - -由于作用域规则,在自定义命令中定义的任何环境变量都只存在于该命令的作用域内。 -然而,用[`def --env`](/commands/docs/def.md)而不是[`def`](/commands/docs/def.md)定义的命令(它也适用于`export def`,见 [模块](modules.md))将在调用者一方保留环境设置: - -```nu -> def --env foo [] { - $env.FOO = 'BAR' -} - -> foo - -> $env.FOO -BAR -``` - -## 环境变量转换 - -你可以通过设置`ENV_CONVERSIONS`环境变量,来在字符串和值之间转换其他环境变量。 -例如,[默认环境配置](https://github.com/nushell/nushell/blob/main/crates/nu-utils/src/sample_config/default_env.nu)包括将`PATH`(和 Windows 上使用的`Path`)环境变量从一个字符串转换为一个列表。 -在 `env.nu` 和 `config.nu` 配置文件加载后,任何在`ENV_CONVERSIONS`内指定的现有环境变量将根据其`from_string`字段被转换为任何类型的值。 -外部工具要求环境变量是字符串,因此,任何非字符串的环境变量需要先进行转换: -值->字符串的转换由`ENV_CONVERSIONS`的`to_string`字段设置,每次运行外部命令时都会进行转换。 - -让我们用一个例子来说明转换的情况。 -把以下内容放在你的`config.nu`中: - -```nu -$env.ENV_CONVERSIONS = { - # ... you might have Path and PATH already there, add: - FOO : { - from_string: { |s| $s | split row '-' } - to_string: { |v| $v | str join '-' } - } -} -``` - -现在,在一个 Nushell 实例内执行: - -```nu -> with-env { FOO : 'a-b-c' } { nu } # runs Nushell with FOO env. var. set to 'a-b-c' - -> $env.FOO - 0 a - 1 b - 2 c -``` - -你可以看到`$env.FOO`现在是一个新的 Nushell 实例中的列表,配置已经更新。 -你也可以通过以下方式手动测试转换: - -```nu -> do $env.ENV_CONVERSIONS.FOO.from_string 'a-b-c' -``` - -现在,为了测试列表->字符串的转换,运行: - -```nu -> nu -c '$env.FOO' -a-b-c -``` - -因为`nu`是一个外部程序,Nushell 根据`ENV_CONVERSIONS.FOO.to_string`翻译了 `[ a b c ]` 列表,并把它传递给`nu`进程。 -用`nu -c`运行命令不会加载配置文件,因此`FOO`的环境转换没有了,它被显示为一个普通的字符串 —— 这样我们可以验证转换是否成功。 -你也可以通过`do $env.ENV_CONVERSIONS.FOO.to_string [a b c]`手动运行这个步骤。 - -如果我们回头看一下[`env`](/commands/docs/env.md)命令,`raw`列显示由`ENV_CONVERSIONS..to_string`翻译的值,`value`列显示 Nushell 中使用的值(在`FOO`的情况下是`ENV_CONVERSIONS..from_string`的结果)。 -如果这个值不是字符串,并且没有`to_string`的转换,它就不会被传递给外部(见`PROMPT_COMMAND`的`raw`列)。 -一个例外是`PATH`(Windows 上的`Path`)。默认情况下,它在启动时将字符串转换为列表,在运行外部程序时,如果没有指定手动转换,则从列表转换为字符串。 - -_(重要! 环境转换字符串->值发生在 `env.nu` 和 `config.nu` 被运行**之后**。`env.nu` 和 `config.nu` 中的所有环境变量仍然是字符串,除非你手动将它们设置为一些其他的值。)_ - -## 删除环境变量 - -只有当一个环境变量被设置在当前作用域中时,你才能通过 [`hide`](/commands/docs/hide.md) 命令“删除”它: - -```nu -> $env.FOO = 'BAR' -... -> hide FOO -``` - -隐藏也是有作用域的,这既允许你暂时删除一个环境变量,又可以防止你从子作用域内修改父环境: - -```nu -> $env.FOO = 'BAR' -> do { - hide FOO - # $env.FOO does not exist - } -> $env.FOO -BAR -``` - -关于隐藏的更多细节,请参考 [模块](modules.md#隐藏) diff --git a/zh-CN/book/escaping.md b/zh-CN/book/escaping.md deleted file mode 100644 index 6395343f12e..00000000000 --- a/zh-CN/book/escaping.md +++ /dev/null @@ -1,15 +0,0 @@ -# 转移到系统 - -Nu 提供了一套你可以在不同操作系统中使用的命令(也成为"内部"命令),而且具备这种一致性是很有帮助的。但有时,你需要运行一个与 Nu 内部命令同名的外部命令。例如,要运行外部的`ls`或`date`命令,你可以使用脱字符 (^) 命令。用 `^` 前缀 可以转移调用用户 PATH 中的命令(例如:`/bin/ls`,而不是 Nu 内部的 [`ls`](/commands/docs/ls.md) 命令)。 - -Nu 的内部命令: - -```nu -> ls -``` - -转移到外部命令: - -```nu -> ^ls -``` diff --git a/zh-CN/book/externs.md b/zh-CN/book/externs.md deleted file mode 100644 index 40d0b2b3674..00000000000 --- a/zh-CN/book/externs.md +++ /dev/null @@ -1,51 +0,0 @@ -# 外部命令 - -调用外部命令是将 Nushell 作为一个 Shell 使用的基本部分(通常也将 Nushell 作为一种语言使用)。但是有一个问题,对于 Nushell 之外的命令而言,Nushell 不能帮助寻找调用中的错误,或者自动补全,或者语法高亮。 - -这就是 `extern` 的作用。`extern`关键字允许你为 Nushell 之外的命令写一个完整的签名,这样你就能得到上述所有的好处。如果你看一下默认配置,你会发现其中有一些`extern`调用。下面是其中之一: - -```nu - export extern "git push" [ - remote?: string@"nu-complete git remotes", # the name of the remote - refspec?: string@"nu-complete git branches" # the branch / refspec - --verbose(-v) # be more verbose - --quiet(-q) # be more quiet - --repo: string # repository - --all # push all refs - --mirror # mirror all refs - --delete(-d) # delete refs - --tags # push tags (can't be used with --all or --mirror) - --dry-run(-n) # dry run - --porcelain # machine-readable output - --force(-f) # force updates - --force-with-lease: string # require old value of ref to be at this value - --recurse-submodules: string # control recursive pushing of submodules - --thin # use thin pack - --receive-pack: string # receive pack program - --exec: string # receive pack program - --set-upstream(-u) # set upstream for git pull/status - --progress # force progress reporting - --prune # prune locally removed refs - --no-verify # bypass pre-push hook - --follow-tags # push missing but relevant tags - --signed: string # GPG sign the push - --atomic # request atomic transaction on remote side - --push-option(-o): string # option to transmit - --ipv4(-4) # use IPv4 addresses only - --ipv6(-6) # use IPv6 addresses only - ] -``` - -你会注意到这给了你所有与内部命令相同的描述性语法,让你描述标志(Flags)、短标志(Short Flags)、位置参数、类型等等。 - -## 类型和自定义补全 - -在上面的例子中,你会注意到有些类型后面有`@`,接着后面是命令的名称。我们有独立的章节进一步谈论 [自定义补全](custom_completions.md)。 - -参数的类型(或形状)和自定义补全都告诉 Nushell 如何完成对该标志或位置值的补全。例如,将类型设置为`path`允许 Nushell 为你将值补全为一个文件路径。使用`@`和一个自定义的补全方式覆盖了这个默认行为,让该自定义补全方式返回给你完整的补全列表。 - -## 局限性 - -目前的`extern`语法有一些限制。在 Nushell 中,标志和位置参数是非常灵活的:标志可以在位置参数之前, 也可以与位置参数混合, 还可以跟随位置参数。许多外部命令没有这种灵活性。目前还没有一种方法来确保标志和位置参数的特定顺序与外部命令所要求的风格保持一致。 - -第二个限制是,有些外部命令要求使用`=`来传递标志和值。在 Nushell 中,`=`是一种方便的可选默认参数语法,目前还没有办法按要求使用它。 diff --git a/zh-CN/book/hooks.md b/zh-CN/book/hooks.md deleted file mode 100644 index 6768752ab83..00000000000 --- a/zh-CN/book/hooks.md +++ /dev/null @@ -1,232 +0,0 @@ -# 钩子 - -钩子允许你在一些预定义的情况下运行一个代码片段。 -它们只在交互式模式下可用([REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop)),如果你用脚本(`nu script.nu`)或命令(`nu -c "echo foo"`)参数运行 Nushell 则不起作用。 - -目前,我们支持这些类型的钩子: - -- `pre_prompt` : 在命令提示显示之前被触发; -- `pre_execution` : 在行输入开始执行前被触发; -- `env_change` : 当环境变量发生变化时被触发; - -为了更清晰地阐述,我们可以将 Nushell 的执行周期进行分解。 -在 REPL 模式下,评估一行(代码)的步骤如下: - -1. 检查 `pre_prompt` 钩子并运行它们; -2. 检查 `env_change` 钩子并运行它们; -3. 显示命令提示符并等待用户输入; -4. 在用户输入东西并按下 "Enter" 健后,检查 `pre_execution` 钩子并运行它们; -5. 解析和评估用户的输入; -6. 返回到第一步; - -## 基本钩子 - -要想使用钩子需要先在 [配置](configuration.md) 中定义它们: - -```nu -$env.config = { - # ...other config... - - hooks: { - pre_prompt: { print "pre prompt hook" } - pre_execution: { print "pre exec hook" } - env_change: { - PWD: {|before, after| print $"changing directory from ($before) to ($after)" } - } - } -} -``` - -试着把上述内容放到你的配置中,运行 Nushell 并在你的文件系统中切换目录。 -当你改变一个目录时,`PWD` 环境变量会发生变化,这个变化会触发钩子,之前和现在的值分别存储在 `before` 和 `after` 变量中。 - -可以为每个触发器只定义一个钩子,也可以定义一个**钩子列表**,让其依次运行: - -```nu -$env.config = { - ...other config... - - hooks: { - pre_prompt: [ - { print "pre prompt hook" } - { print "pre prompt hook2" } - ] - pre_execution: [ - { print "pre exec hook" } - { print "pre exec hook2" } - ] - env_change: { - PWD: [ - {|before, after| print $"changing directory from ($before) to ($after)" } - {|before, after| print $"changing directory from ($before) to ($after) 2" } - ] - } - } -} -``` - -另外,用新的钩子更新现有的配置,而不是从头开始定义整个配置可能更实用: - -```nu -$env.config = ($env.config | upsert hooks { - pre_prompt: ... - pre_execution: ... - env_change: { - PWD: ... - } -}) -``` - -## 修改环境变量 - -钩子的一个特点是它们保留了环境。 -在钩子**代码块**内定义的环境变量将以类似于 [`def --env`](environment.md#从自定义命令中定义环境变量) 的方式被保留下来。 -你可以用下面的例子测试一下: - -```nu -> $env.config = ($env.config | upsert hooks { - pre_prompt: { $env.SPAM = "eggs" } -}) - -> $env.SPAM -eggs -``` - -钩子代码块遵循一般的作用域规则,即在块内定义的命令、别名等将在代码块结束后被丢掉。 - -## 条件钩子 - -你可能很想做的一件事是,每当你进入一个目录时,就激活一个环境: - -``` -$env.config = ($env.config | upsert hooks { - env_change: { - PWD: [ - {|before, after| - if $after == /some/path/to/directory { - load-env { SPAM: eggs } - } - } - ] - } -}) -``` - -这不会起作用,因为该环境只在 `if` 块内有效。 -在这种情况下,你可以很容易地将其重写为 `load-env (if $after == ... { ... } else { {} })`,但这种模式是相当常见的,以后我们会看到并非所有的情况都能像这样重写。 - -为了处理上述问题,我们引入了另一种定义钩子的方式 -- **记录**: - -```nu -$env.config = ($env.config | upsert hooks { - env_change: { - PWD: [ - { - condition: {|before, after| $after == /some/path/to/directory } - code: {|before, after| load-env { SPAM: eggs } } - } - ] - } -}) -``` - -当钩子触发时,它会评估 `condition` 代码块。 -如果它返回 `true`,则 `code` 对应代码块将会被评估执行。 -如果它返回 `false`,什么也不会发生。 -如果它返回别的东西,就会抛出一个错误。 -`condition` 字段也可以完全省略,在这种情况下,钩子将总是被评估。 - -`pre_prompt` 和 `pre_execution` 钩子类型也支持条件钩子,但它们不接受 `before` 和 `after` 参数。 - -## 字符串钩子 - -到目前为止,一个钩子被定义为一个只保留环境的代码块,而没有其他东西。 -为了能够定义命令或别名,可以将 `code` 字段定义为**一个字符串**。 -你可以把它想成是你在 REPL 中输入字符串并点击回车键。 -所以,上一节中的钩子也可以写成: - -```nu -> $env.config = ($env.config | upsert hooks { - pre_prompt: '$env.SPAM = "eggs"' -}) - -> $env.SPAM -eggs -``` - -这个功能可以用来,例如,根据当前目录有条件地引入定义: - -```nu -$env.config = ($env.config | upsert hooks { - env_change: { - PWD: [ - { - condition: {|_, after| $after == /some/path/to/directory } - code: 'def foo [] { print "foo" }' - } - { - condition: {|before, _| $before == /some/path/to/directory } - code: 'hide foo' - } - ] - } -}) -``` - -当把钩子定义为字符串时,`$before` 和 `$after` 变量分别被设置为之前和当前的环境变量值,这与前面的例子类似: - -```nu -$env.config = ($env.config | upsert hooks { - env_change: { - PWD: { - code: 'print $"changing directory from ($before) to ($after)"' - } - } -} -``` - -## 例子 - -### 在现有配置中增加一个单一钩子 - -一个关于 `PWD` 环境变化的例子: - -```nu -$env.config = ($env.config | upsert hooks.env_change.PWD {|config| - let val = ($config | get -i hooks.env_change.PWD) - - if $val == $nothing { - $val | append {|before, after| print $"changing directory from ($before) to ($after)" } - } else { - [ - {|before, after| print $"changing directory from ($before) to ($after)" } - ] - } -}) -``` - -### 进入目录时自动激活相应环境 - -以下代码将在进入一个目录('/path/to/target/dir')后寻找 `test-env.nu` 并加载,而在离开该目录的时候移除相关定义(除了 `PWD` 环境变量): - -```nu -$env.config = ($env.config | upsert hooks.env_change.PWD { - [ - { - condition: {|_, after| - ($after == '/path/to/target/dir' - and ($after | path join test-env.nu | path exists)) - } - code: "overlay add test-env.nu" - } - { - condition: {|before, after| - ('/path/to/target/dir' not-in $after - and '/path/to/target/dir' in $before - and 'test-env' in (overlay list)) - } - code: "overlay remove test-env --keep-env [ PWD ]" - } - ] -}) -``` diff --git a/zh-CN/book/installation.md b/zh-CN/book/installation.md deleted file mode 100644 index 48a573eb36a..00000000000 --- a/zh-CN/book/installation.md +++ /dev/null @@ -1,131 +0,0 @@ -# 安装 Nu - -有很多方法可以获取并使用 Nu。你可以从我们的 [发布页面](https://github.com/nushell/nushell/releases) 下载预编译的二进制文件,也可以 [使用你喜欢的软件包管理器](https://repology.org/project/nushell/versions),或者从源码构建。 - -Nushell 的主要二进制文件被命名为 `nu`(或 Windows 下的 `nu.exe`)。安装完成后你可以通过输入 `nu` 来启动它: - -@[code](@snippets/installation/run_nu.sh) - -## 预编译二进制包 - -Nu 二进制文件在 [GitHub 的 Release 页](https://github.com/nushell/nushell/releases) 发布,适用于 Linux、macOS 和 Windows。只需下载并解压二进制文件,然后将其复制到你的系统 `PATH` 上的某个位置即可。 - -## 软件包管理器 - -Nu 可以通过几个软件包管理器获得: - -[![打包状态](https://repology.org/badge/vertical-allrepos/nushell.svg)](https://repology.org/project/nushell/versions) - -对于 macOS 和 Linux,[Homebrew](https://brew.sh/) 是一个流行的选择(`brew install nushell`)。 - -对于 Windows 用户: - -- [Winget](https://docs.microsoft.com/en-us/windows/package-manager/winget/) (`winget install nushell`) -- [Chocolatey](https://chocolatey.org/) (`choco install nushell`) -- [Scoop](https://scoop.sh/) (`scoop install nu`) - -跨平台安装: - -- [npm](https://www.npmjs.com/) (`npm install -g nushell` 请注意,以这种方式安装,nu 插件是不包含在内的) - -## 从源码构建 - -你也可以从源代码构建 `Nu`。首先,你需要设置 Rust 工具链和它的依赖项。 - -### 安装编译器套件 - -为了使 Rust 能够正常工作,你需要在你的系统上安装一个兼容的编译器套件。以下是推荐的编译器套件: - -- Linux:GCC 或 Clang -- macOS:Clang(安装 Xcode) -- Windows:MSVC(安装 [Visual Studio](https://visualstudio.microsoft.com/vs/community/) 或 [Visual Studio Build Tools](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022)) - - 请确保安装 "用 C++ 进行桌面开发" 相关包 - - 任何 Visual Studio 版本都可以(社区版是免费的) - -### 安装 Rust - -如果我们的系统中还没有 Rust,最好的方法是通过 [rustup](https://rustup.rs/) 来安装它。Rustup 是一种管理 Rust 安装的工具,可以管理使用不同的 Rust 版本。 - -Nu 目前需要 **最新(1.66.1 或更高)的稳定** 版本的 Rust。最好的方法是让 `rustup` 为你找到正确的版本。当你第一次打开 `rustup` 时,它会询问你想安装哪个版本的 Rust: - -@[code](@snippets/installation/rustup_choose_rust_version.sh) - -一旦我们准备好了,我们就按 `1`,然后回车。 - -如果你不愿意通过 `rustup` 来安装 Rust,你也可以通过其他方法来安装它(比如从 Linux 发行版的软件包中)。只要确保安装 1.66.1 或更高版本的 Rust 即可。 - -### 依赖 - -#### Debian/Ubuntu - -你将需要安装 "pkg-config" 和 "libssl-dev" 包: - -@[code](@snippets/installation/install_pkg_config_libssl_dev.sh) - -对于希望使用 "rawkey" 或 "clipboard" 可选功能的 Linux 用户,需要安装 "libx11-dev" 和 "libxcb-composite0-dev" 软件包。 - -@[code](@snippets/installation/use_rawkey_and_clipboard.sh) - -#### 基于 RHEL 的发行版 - -你需要安装 "libxcb"、"openssl-devel" 和 "libX11-devel": - -@[code](@snippets/installation/install_rhel_dependencies.sh) - -#### macOS - -使用 [Homebrew](https://brew.sh/),你需要通过如下方式安装 "openssl" 和 "cmake" : - -@[code](@snippets/installation/macos_deps.sh) - -### 使用 [crates.io](https://crates.io) 进行构建 - -Nu 发行版会作为源码发布到流行的 Rust 包仓库 [crates.io](https://crates.io/)。这使得使用 `cargo` 构建并安装最新的 Nu 版本变得很容易: - -@[code](@snippets/installation/cargo_install_nu.sh) - -如此即可!`cargo` 工具将完成下载 Nu 及其源码依赖,构建并将其安装到 cargo bin 路径中,以便我们能够运行它。 - -如果你想要安装并支持 [dataframes](/zh-CN/book/dataframes.md) 功能,你可以在安装命令附上 `--features=dataframe`: - -@[code](@snippets/installation/cargo_install_nu_more_features.sh) - -### 从 GitHub 仓库构建 - -我们也可以从 GitHub 上的最新源码构建自己的 Nu。这让我们可以立即获得最新的功能和错误修复。首先,克隆源码仓库: - -@[code](@snippets/installation/git_clone_nu.sh) - -然后,我们可以用以下方式构建和运行 Nu: - -@[code](@snippets/installation/build_nu_from_source.sh) - -你也可以在**发布**模式下构建和运行 Nu,以获得更多的编译优化: - -@[code](@snippets/installation/build_nu_from_source_release.sh) - -熟悉 Rust 的人可能会问,如果 `run` 默认会构建,为什么我们还要做 `build` 和 `run` 这两个步骤?这是为了解决 Cargo 中新的 `default-run` 选项的缺陷,并确保所有插件都被构建,尽管这在将来可能不再需要。 - -## 设置登录 Shell(\*nix) - -:::danger -Nu 仍在开发中,对于日常使用可能并不稳定! -::: - -要设置登录 Shell,你可以使用 [`chsh`](https://linux.die.net/man/1/chsh) 命令。一些 Linux 发行版有一个位于 `/etc/shells` 的有效 Shell 列表,在 Nu 被列入白名单之前不允许改变 Shell。如果你没有更新 `shells` 文件,你可能会看到类似于下面的错误: - -@[code](@snippets/installation/chsh_invalid_shell_error.sh) - -你可以通过在 `shells` 文件中添加你的 Nu 二进制文件来把 Nu 添加到允许的 Shells 列表中。添加的路径可以用 `which nu` 命令找到,通常是 `$HOME/.cargo/bin/nu`。 - -## 设置默认的 Shell(Windows 终端) - -如果你使用的是 [Windows Terminal](https://github.com/microsoft/terminal),你可以通过添加如下内容到你的终端设置 `"profiles"`(JSON 文件)中来设置 `nu` 作为你的默认 Shell: - -@[code](@snippets/installation/windows_terminal_default_shell.sh) - -最后需要做的是将 `"defaultProfile"` 改为: - -@[code](@snippets/installation/windows_change_default_profile.sh) - -之后,`nu` 应该会在 **Windows Terminal** 启动时被加载。 diff --git a/zh-CN/book/introduction.md b/zh-CN/book/introduction.md deleted file mode 100644 index d756b5f41fa..00000000000 --- a/zh-CN/book/introduction.md +++ /dev/null @@ -1,180 +0,0 @@ -# 介绍 - -大家好,欢迎来到 Nushell 项目。这个项目的目标是彰显 Shell 的 Unix 哲学,就是用管道将简单的命令连接在一起,并且带来现代的开发风格。 - -Nu 从许多熟悉的领域中汲取了线索:bash 等传统 shell,PowerShell 等高级 shell,函数式编程,系统编程等。但是 Nu 并没有试图成为所有行业的杰作,而是将精力集中在做好一些事情上: - -- 创建具有现代感的灵活的跨平台 Shell -- 允许你将命令行应用程序与可理解数据结构的 Shell 进行混合和匹配 -- 具有现代命令行应用程序提供的用户体验优化 - -了解 Nu 可以做什么的最简单方式就是通过一些例子,所以让我们沉浸进去吧。 - -当你运行一个类似 `ls` 的命令时,第一个注意到的是所得到的不是一个文本块,而是一个结构化的表。 - -``` -> ls -────┬────────────────────┬──────┬────────┬──────────── - # │ name │ type │ size │ modified -────┼────────────────────┼──────┼────────┼──────────── - 0 │ 404.html │ File │ 429 B │ 3 days ago - 1 │ CONTRIBUTING.md │ File │ 955 B │ 8 mins ago - 2 │ Gemfile │ File │ 1.1 KB │ 3 days ago - 3 │ Gemfile.lock │ File │ 6.9 KB │ 3 days ago - 4 │ LICENSE │ File │ 1.1 KB │ 3 days ago - 5 │ README.md │ File │ 213 B │ 3 days ago -... -``` - -这个表不仅仅是用另一种方式显示了当前目录。就像电子表格中的表一样,我们可以更加交互性地处理数据。 - -我们做的第一件事是将表格通过尺寸来排序。为了做到这点,我们将会把 `ls` 的输出喂给一个可以根据列的内容来排序表格的命令。 - -``` -> ls | sort-by size | reverse -────┬────────────────────┬──────┬────────┬──────────── - # │ name │ type │ size │ modified -────┼────────────────────┼──────┼────────┼──────────── - 0 │ Gemfile.lock │ File │ 6.9 KB │ 3 days ago - 1 │ SUMMARY.md │ File │ 3.7 KB │ 3 days ago - 2 │ Gemfile │ File │ 1.1 KB │ 3 days ago - 3 │ LICENSE │ File │ 1.1 KB │ 3 days ago - 4 │ CONTRIBUTING.md │ File │ 955 B │ 9 mins ago - 5 │ books.md │ File │ 687 B │ 3 days ago -... -``` - -你可以看到我们没有给 `ls` 传递命令行参数。作为代替,我们使用了 Nu 提供的 `sort-by` 命令来排序 `ls` 的输出。为了让最大的文件位于顶部,我们还使用了 `reverse`。 - -Nu 提供了许多可在表格上工作的命令。例如,我们可以过滤 `ls` 表格,只显示大于 1 KB 的文件: - -``` -> ls | where size > 1kb -───┬──────────────┬──────┬────────┬──────────── - # │ name │ type │ size │ modified -───┼──────────────┼──────┼────────┼──────────── - 0 │ Gemfile │ File │ 1.1 KB │ 3 days ago - 1 │ Gemfile.lock │ File │ 6.9 KB │ 3 days ago - 2 │ LICENSE │ File │ 1.1 KB │ 3 days ago - 3 │ SUMMARY.md │ File │ 3.7 KB │ 3 days ago -───┴──────────────┴──────┴────────┴──────────── -``` - -就像 Unix 哲学所体现的那样,作为可以相互交流的命令,为我们提供了许多种不同的配对。让我们看一个不同的命令: - -``` -> ps -─────┬───────┬──────────────────┬─────────┬─────────┬──────────┬───────── - # │ pid │ name │ status │ cpu │ mem │ virtual -─────┼───────┼──────────────────┼─────────┼─────────┼──────────┼───────── - 0 │ 33155 │ nu_plugin_core_p │ Running │ 3.8496 │ 1.8 MB │ 4.4 GB - 1 │ 32841 │ mdworker_shared │ Running │ 0.0000 │ 19.3 MB │ 4.4 GB - 2 │ 32829 │ CoreServicesUIAg │ Running │ 0.0000 │ 16.1 MB │ 4.5 GB - 3 │ 32828 │ mdworker_shared │ Running │ 0.0000 │ 23.0 MB │ 4.4 GB -``` - -如果你使用过 Linux,可能会对 `ps` 命令相当熟悉。这个命令为我们展示了系统所有正在运行的进程和它们的状态与名称。我们同样可以查看到它们的 CPU 占用。 - -如果我们想显示正在使用 CPU 的进程怎么办? 就像我们之前使用 `ls` 命令一样,我们也可以使用 `ps` 命令返回的表: - -``` -> ps | where cpu > 10 -───┬──────┬──────────────────┬─────────┬────────┬──────────┬───────── - # │ pid │ name │ status │ cpu │ mem │ virtual -───┼──────┼──────────────────┼─────────┼────────┼──────────┼───────── - 0 │ 3971 │ Google Chrome He │ Running │ 5.1263 │ 99.4 MB │ 5.5 GB - 1 │ 360 │ iTerm2 │ Running │ 6.6635 │ 218.6 MB │ 6.0 GB -───┴──────┴──────────────────┴─────────┴────────┴──────────┴───────── -``` - -到目前为止,我们已经看到使用 `ls` 和 `ps` 列出文件和进程。 Nu 还提供了其他可以创建有用信息表的命令。 接下来,让我们探索`date` 和 `sys`。 - -运行 `date` 将给出当前日期与时间的信息: - -``` -> date -──────────┬──────── - year │ 2020 - month │ 5 - day │ 5 - hour │ 21 - minute │ 13 - second │ 17 - timezone │ +02:00 -──────────┴──────── -``` - -运行 `sys` 将给出 Nu 所运行的系统的信息: - -``` -> sys -─────────┬───────────────────────────────────────── - host │ [row 7 columns] - cpu │ [row cores current ghz max ghz min ghz] - disks │ [table 2 rows] - mem │ [row free swap free swap total total] - net │ [table 11 rows] - battery │ [table 1 rows] -─────────┴───────────────────────────────────────── -``` - -和之前的表有些不一样, `sys` 命令给出的表在单元格内包含了另一些结构化的表格,而非简单的数值。为了查看到这些数据,我们需要选择要看的列: - -``` -> sys | get host -──────────┬───────────────────────────────────────────── - name │ Linux - release │ 5.3.0-1019-azure - version │ #20-Ubuntu SMP Fri Mar 27 23:54:23 UTC 2020 - hostname │ lifeless - arch │ x86_64 - uptime │ 8:03:47:32 - sessions │ [table 2 rows] -──────────┴───────────────────────────────────────────── -``` - -`get` 命令让我们跳入表格中一列的内容。这样,我们正在观看 "host" 列,它包含了关于 Nu 所运行的主机的信息。操作系统的名字、主机名、CPU 架构等等。让我们看看系统上的用户名: - -``` -> sys | get host.sessions -───┬───────── - # │ -───┼───────── - 0 │ jonathan -───┴───────── -``` - -目前,系统上只有一个用户,名为 `jonathan`。 你会注意到,我们可以传递路径( `host.sessions` 部分),而不仅仅是传递列名。 Nu 将采用该路径并转到表中的相应数据位置。 - -您可能已经注意到其他的不同之处。 我们没有一个数据表,而是只有一个元素:字符串 "jonathan"。 Nu 使用数据表和字符串。 字符串是在 Nu 之外使用命令的重要组成部分。 - -让我们看看字符串如何在 Nu 之外起作用。 我们将从前面的示例开始,并运行外部的 `echo` 命令( `^` 告诉 nu 不要使用内置的 `echo` 命令): - -``` -> sys | get host.sessions | ^echo $it -jonathan -``` - -如果这看起来与我们以前的传统 Shell 非常相似,那么就说明你拥有敏锐的眼睛! 相似,但是有一个重要的区别:我们对前面看到的值调用了 `^echo` 。 这允许我们将数据从 Nu 传递到 `echo`(或 Nu 外部的任何命令,例如 `git`)。 - -_注意:Nu 的内建命令的帮助文本可以用 `help` 来浏览_: - -``` -> help config -Configuration management. - -Usage: - > config {flags} - -Subcommands: - config get - Gets a value from the config - config set - Sets a value in the config - config set_into - Sets a value in the config - config clear - clear the config - config load - Loads the config from the path given - config remove - Removes a value from the config - config path - return the path to the config file - -Flags: - -h, --help: Display this help message -``` diff --git a/zh-CN/book/line_editor.md b/zh-CN/book/line_editor.md deleted file mode 100644 index d73072db627..00000000000 --- a/zh-CN/book/line_editor.md +++ /dev/null @@ -1,713 +0,0 @@ -# Reedline,Nu 的行编辑器 - -Nushell 的行编辑器 [Reedline](https://github.com/nushell/reedline) 是一个跨平台的行读取器,它被设计为模块化且颇具灵活性的。该引擎的作用是负责控制命令历史,验证,自动补全,提示以及屏幕绘制。 - -## 配置 - -### 编辑模式 - -Reedline 允许你使用两种模式来编辑文本:vi 和 emacs。如果没有指定,默认的编辑模式是 emacs 模式。若要自行设置喜欢的模式,你可以修改配置文件为相应模式。比如: - -```nu - $env.config = { - ... - edit_mode: emacs - ... - } -``` - -#### 默认键盘绑定 - -每种编辑模式都有相应的 vi 或 emacs 文本编辑的常用快捷键设置。 - -Emacs 和 Vi 快捷键绑定 - -| 快捷键 | 事件 | -| ----------- | --------------------- | -| Esc | Esc | -| Backspace | 退格 | -| End | 移至行尾 | -| End | 补全历史提示 | -| Home | 移至行首 | -| Ctr + c | 取消当前行 | -| Ctr + l | 清除屏幕 | -| Ctr + r | 搜索历史 | -| Ctr + Right | Complete history word | -| Ctr + Right | 右移一个词 | -| Ctr + Left | 左移一个词 | -| Up | 菜单上移 | -| Up | 上移 | -| Down | 菜单下移 | -| Down | 下移 | -| Left | 菜单左移 | -| Left | 左移 | -| Right | 完成历史提示 | -| Right | 菜单右移 | -| Right | 右移 | -| Ctr + b | 菜单左移 | -| Ctr + b | 左移 | -| Ctr + f | 完成历史提示 | -| Ctr + f | 菜单右移 | -| Ctr + f | 右移 | -| Ctr + p | 菜单上移 | -| Ctr + p | 上移 | -| Ctr + n | 菜单下移 | -| Ctr + n | 下移 | - -Vi 普通键绑定 - -| 快捷键 | 事件 | -| ------- | ---------- | -| Ctr + c | 取消当前行 | -| Ctr + l | 清除屏幕 | -| Up | 菜单上移 | -| Up | 上移 | -| Down | 菜单下移 | -| Down | 下移 | -| Left | 菜单左移 | -| Left | 左移 | -| Right | 菜单右移 | -| Right | 右移 | - -除了之前的键盘绑定,在正常 Vi 模式下,你可以使用经典的 Vi 快捷键来进行移动或者执行相应的动作。可用的组合的选项是: - -Vi 正常移动快捷键 - -| 快捷键 | 移动 | -| ------ | -------------------- | -| w | 前移一个单词 | -| d | 移动到行尾 | -| 0 | 移动到行首 | -| $ | 移动到行尾 | -| f | 行内向右查找字符 | -| t | 行内右移到指定字符前 | -| F | 行内向左查找字符 | -| T | 行内左移到指定字符前 | - -Vi 正常操作快捷键 - -| 快捷键 | 操作 | -| ------ | ------------------ | -| d | 删除 | -| p | 在光标之后粘贴 | -| P | 在光标之前粘贴 | -| h | 左移 | -| l | 右移 | -| j | 下移 | -| k | 上移 | -| w | 右移一个单词 | -| b | 左移一个单词 | -| i | 在光标前插入 | -| a | 在光标后插入 | -| 0 | 移到行首 | -| ^ | 移到行首 | -| $ | 移到行尾 | -| u | 撤销 | -| c | 修改 | -| x | 删除字符 | -| s | 搜索历史 | -| D | 删除当前位置到行尾 | -| A | 在当前行最后插入 | - -### 命令历史 - -如前所述,Reedline 管理并存储所有被编辑并发送给 Nushell 的命令。要配置 Reedline 可以存储的最大记录数,你需要在配置文件中调整这个值: - -```nu - $env.config = { - ... - history: { - ... - max_size: 1000 - ... - } - ... - } -``` - -### 定制你的提示 - -Reedline 的提示语也是高度可定制的。为了构建你的完美提示符,你可以在配置文件中定义下面的环境变量: - -```nu -# Use nushell functions to define your right and left prompt -def create_left_prompt [] { - let path_segment = ($env.PWD) - - $path_segment -} - -def create_right_prompt [] { - let time_segment = ([ - (date now | format date '%m/%d/%Y %r') - ] | str join) - - $time_segment -} - -$env.PROMPT_COMMAND = { create_left_prompt } -$env.PROMPT_COMMAND_RIGHT = { create_right_prompt } -``` - -::: tip -你并非必须要用 Nushell 的函数来定义环境变量,也可以使用简单的字符串来定义它们。 -::: - -你也可以通过修改以下环境变量来定制行编辑器的提示符: - -```nu -$env.PROMPT_INDICATOR = "〉" -$env.PROMPT_INDICATOR_VI_INSERT = ": " -$env.PROMPT_INDICATOR_VI_NORMAL = "〉" -$env.PROMPT_MULTILINE_INDICATOR = "::: " -``` - -::: tip -提示符是环境变量,它代表了提示的状态 -::: - -## 按键绑定 - -Reedline 按键绑定是一个强大的结构,它允许你建立一连串的事件,而且这些事件可以通过特定的按键组合来触发。 - -例如,我们假设你想把补全菜单绑定到 `Ctrl + t` 这组快捷键上(默认是`tab`)。你可以添加下面的条目到你的配置文件: - -```nu - $env.config = { - ... - - keybindings: [ - { - name: completion_menu - modifier: control - keycode: char_t - mode: emacs - event: { send: menu name: completion_menu } - } - ] - - ... - } -``` - -在加载这个新的 `config.nu` 之后,你的新键盘绑定(`Ctrl + t`)将打开命令自动补全。 - -每个按键绑定都需要以下元素: - -- name: 为你的绑定键取一个独特的名字,以便于在`$config.keybindings`中引用 -- modifier: 绑定键的修饰符。选项有: - - none - - control - - alt - - shift - - control | alt - - control | alt | shift -- keycode: 这代表要按下的键 -- mode: emacs, vi_insert, vi_normal (一个单独的字符串或一个列表,例如: [`vi_insert` `vi_normal`]) -- event: 键盘绑定要发送的事件的类型。选项包括: - - send - - edit - - until - -::: tip -所有可用的修饰键、键码和事件都可以通过`keybindings list`命令找到。 -::: - -::: tip -添加到 `vi_insert` 模式中的按键绑定将在行编辑器处于插入模式(可以写入文本)时可用,而标有 `vi_normal` 模式的按键绑定将在正常模式下(当光标使用 h、j、k 或 l 移动时)可用。 -::: - -键盘绑定条目的事件部分是定义要执行的动作的地方。在这个字段,你可以使用一个记录或一个记录列表。比如这样: - -```nu - ... - event: { send: Enter } - ... -``` - -或者 - -```nu - ... - event: [ - { edit: Clear } - { send: Enter } - ] - ... -``` - -上述第一个按键绑定例子遵循第一种情况,只有一个事件被发送到引擎。 - -后一个按键绑定的例子是向引擎发送一系列的事件。它首先清除提示,插入一个字符串,然后输入该值。 - -```nu - $env.config = { - ... - - keybindings: [ - { - name: change_dir_with_fzf - modifier: CONTROL - keycode: Char_t - mode: emacs - event:[ - { edit: Clear } - { edit: InsertString, - value: "cd (ls | where type == dir | each { |it| $it.name} | str join (char nl) | fzf | decode utf-8 | str trim)" - - } - { send: Enter } - ] - } - - ... - } -``` - -上面按键绑定的缺点是,插入的文本将被验证处理并保存在历史记录中,这使得按键绑定的执行速度有点慢,而且会用相同的命令来填充命令历史。出于这个原因,可以采用 `ExecuteHostCommand` 类型的事件。下一个例子以更简单的方式做了与前一个相同的事情,发送了一个单一的事件给引擎: - -```nu - $env.config = { - ... - - keybindings: [ - { - name: change_dir_with_fzf - modifier: CONTROL - keycode: Char_y - mode: emacs - event: { - send: ExecuteHostCommand, - cmd: "cd (ls | where type == dir | each { |it| $it.name} | str join (char nl) | fzf | decode utf-8 | str trim)" - } - } - ] - - ... - } -``` - -在我们继续之前,你一定已经注意到,编辑和发送的语法发生了变化,因此有必要对它们进行更多的解释。 `send` 是所有可以被引擎处理的 `Reedline` 事件,而 `edit` 是所有可以被引擎处理的 `EditCommands`。 - -### `send`类型 - -要找到 `send` 的所有可用选项,你可以使用: - -```nu -keybindings list | where type == events -``` - -而 `send` 事件的语法如下: - -```nu - ... - event: { send: } - ... -``` - -::: tip -你可以用大写字母来命名事件的名称,键盘绑定解析器是不区分大小写的。 -::: - -这条规则有两个例外:`Menu`和`ExecuteHostCommand`。这两个事件需要一个额外的字段来完成,`Menu` 需要有一个菜单的名称才能触发(自动补全菜单或历史命令菜单): - -```nu - ... - event: { - send: menu - name: completion_menu - } - ... -``` - -而 `ExecuteHostCommand` 需要一个有效的命令,它将被发送到引擎: - -```nu - ... - event: { - send: ExecuteHostCommand - cmd: "cd ~" - } - ... -``` - -值得一提的是,在事件列表中,你还会看到`Edit([])`,`Multiple([])`和`UntilFound([])`。这些选项对解析器是不可见的,因为它们是基于键盘绑定的定义来构建的。例如,当你在键盘绑定事件里面定义了一个记录列表时,就会为你建立一个`Multiple([])`事件。`Edit([])`事件与前面提到的`edit`类型相同。`UntilFound([])`事件和前面提到的`until`类型一样。 - -### `edit`类型 - -`edit`类型是`Edit([])`事件的简化。`event`类型简化了定义复杂编辑事件的按键绑定。要列出可用的选项,你可以使用下面的命令: - -```nu -keybindings list | where type == edits -``` - -以下是编辑的常用语法: - -```nu - ... - event: { edit: } - ... -``` - -列表中带有 `()` 的编辑的语法有一点变化,因为这些编辑需要一个额外的值来进行完全定义。例如,如果我们想在提示符所在的位置插入一个字符串,那么你将不得不使用如下方式: - -```nu - ... - event: { - edit: InsertString - value: "MY NEW STRING" - } - ... -``` - -或者说你想向右移动,直到第一个`S`: - -```nu - ... - event: { - edit: MoveRightUntil - value: "S" - } - ... -``` - -正如你所看到的,这两种类型将允许你构建你需要的任何类型的按键绑定。 - -### `until`类型 - -为了完成这个按键绑定之旅,我们需要讨论事件的`until`类型。正如你到目前为止所看到的,你可以发送一个单一的事件或一个事件列表。而当一个事件列表被发送时,每一个事件都会被处理。 - -然而,在有些情况下,你可能想把不同的事件分配给同一个键盘绑定。这在 Nushell 菜单中特别有用。例如,假设你仍然想用`Ctrl + t`激活你的补全菜单,但你也想在菜单被激活后用同一个快捷键移动到下一个元素。 - -对于这些情况,我们有`until`关键字。在`until`事件中列出的事件将被逐一处理,不同的是,一旦一个事件被成功处理,事件处理就会停止。 - -下一个键盘绑定就是这种情况: - -```nu - $env.config = { - ... - - keybindings: [ - { - name: completion_menu - modifier: control - keycode: char_t - mode: emacs - event: { - until: [ - { send: menu name: completion_menu } - { send: MenuNext } - ] - } - } - ] - - ... - } -``` - -上面的按键绑定将首先尝试打开一个补全菜单。如果菜单没有激活,它将激活它并发送一个成功信号。如果再次按下按键绑定,因为已经有一个激活的菜单,那么它将发送的下一个事件是`MenuNext`,这意味着它将把选择器移动到菜单的下一个元素。 - -正如你所看到的,`until`关键字允许我们为同一个键盘绑定定义两个事件。在写这篇文章的时候,只有菜单事件允许这种类型的分层。其他非菜单事件类型将总是返回一个成功值,这意味着`until`事件在到达第一个命令时就会停止。 - -例如,下一个按键绑定将总是发送一个`down`,因为该事件总是成功的。 - -```nu - $env.config = { - ... - - keybindings: [ - { - name: completion_menu - modifier: control - keycode: char_t - mode: emacs - event: { - until: [ - { send: down } - { send: menu name: completion_menu } - { send: menunext } - ] - } - } - ] - - ... - } -``` - -### 移除一个默认的按键绑定 - -如果你想删除某个默认的按键绑定,而不打算使用不同的动作来替代它,你可以设置`event: null`。 - -例如,在所有的编辑模式下,禁用 `Ctrl + l` 清除屏幕: - -```nu - $env.config = { - ... - - keybindings: [ - { - modifier: control - keycode: char_l - mode: [emacs, vi_normal, vi_insert] - event: null - } - ] - - ... - } - -``` - -### 排查键盘绑定问题 - -你的终端环境可能并不总是以你期望的方式将你的组合键冒泡到 Nushell 上。 -你可以使用`keybindings listen`命令来确定 Nushell 是否真的收到了某些按键,以及如何收到的。 - -## 菜单 - -感谢 Reedline,Nushell 的菜单可以帮助你完成日常的 Shell 脚本操作。接下来我们介绍一下在使用 Nushell 时一直可用的默认菜单。 - -### 帮助菜单 - -帮助菜单的存在是为了方便你过渡到 Nushell。假设你正在组建一个惊人的管道,然后你忘记了反转一个字符串的内部命令。你可以用`ctr+q`来激活帮助菜单,而不是删除你的管道。一旦激活,只需输入你要找的命令的关键词,菜单就会显示与你的输入相匹配的命令,而匹配的依据就是命令的名称或描述。 - -要浏览菜单,你可以用`tab`选择下一个元素,你可以按左键或右键滚动描述,你甚至可以在行中粘贴可用的命令例子。 - -帮助菜单可以通过修改以下参数进行配置: - -```nu - $env.config = { - ... - - menus = [ - ... - { - name: help_menu - only_buffer_difference: true # Search is done on the text written after activating the menu - marker: "? " # Indicator that appears with the menu is active - type: { - layout: description # Type of menu - columns: 4 # Number of columns where the options are displayed - col_width: 20 # Optional value. If missing all the screen width is used to calculate column width - col_padding: 2 # Padding between columns - selection_rows: 4 # Number of rows allowed to display found options - description_rows: 10 # Number of rows allowed to display command description - } - style: { - text: green # Text style - selected_text: green_reverse # Text style for selected option - description_text: yellow # Text style for description - } - } - ... - ] - ... -``` - -### 补全菜单 - -补全菜单是一个上下文敏感的菜单,它将根据提示的状态给出建议。这些建议的范围包括从路径建议到替代命令。在编写命令时,你可以激活该菜单以查看内部命令的可用选项。另外,如果你已经为外部命令定义了你的自定义补全方式,这些补全提示也会出现在菜单中。 - -默认情况下,补全菜单是通过按`tab`访问的,它可以通过修改配置对象中的这些值来进行配置: - -```nu - $env.config = { - ... - - menus = [ - ... - { - name: completion_menu - only_buffer_difference: false # Search is done on the text written after activating the menu - marker: "| " # Indicator that appears with the menu is active - type: { - layout: columnar # Type of menu - columns: 4 # Number of columns where the options are displayed - col_width: 20 # Optional value. If missing all the screen width is used to calculate column width - col_padding: 2 # Padding between columns - } - style: { - text: green # Text style - selected_text: green_reverse # Text style for selected option - description_text: yellow # Text style for description - } - } - ... - ] - ... -``` - -通过修改这些参数,你可以根据自己的喜好定制你的菜单布局。 - -### 历史菜单 - -历史菜单是访问编辑器命令历史的一个便捷方法。当激活菜单时(默认为`Ctrl+x`),命令的历史会以时间倒序显示,这使得选择前一个命令变得非常容易。 - -历史菜单可以通过修改配置对象中的这些值进行配置: - -```nu - $env.config = { - ... - - menus = [ - ... - { - name: help_menu - only_buffer_difference: true # Search is done on the text written after activating the menu - marker: "? " # Indicator that appears with the menu is active - type: { - layout: list # Type of menu - page_size: 10 # Number of entries that will presented when activating the menu - } - style: { - text: green # Text style - selected_text: green_reverse # Text style for selected option - description_text: yellow # Text style for description - } - } - ... - ] - ... -``` - -当历史菜单被激活时,它从历史中拉出`page_size`个记录并在菜单中呈现。如果终端还有空间,当你再次按`Ctrl+x`时,菜单将拉出相同数量的记录,并将它们追加到当前页。如果不可能呈现所有拉出的记录,菜单将创建一个新的页面。可以通过按`Ctrl+z`转到上一页或`Ctrl+x`转到下一页来浏览这些页面。 - -#### 搜索历史记录 - -要在你的命令历史中搜索,你可以开始输入你要找的命令的关键词。一旦菜单被激活,你输入的任何内容都会被历史记录中选定的命令所取代。例如,假设你已经输入了以下内容: - -```nu -let a = () -``` - -你可以把光标放在 `()` 内并激活菜单,你可以通过输入关键词来过滤历史记录,一旦你选择了一个条目,输入的词就会被替换: - -```nu -let a = (ls | where size > 10MiB) -``` - -#### 菜单快速选择 - -菜单的另一个很好的特性是能够快速选择其中的内容。假设你已经激活了你的菜单,它看起来像这样: - -```nu -> -0: ls | where size > 10MiB -1: ls | where size > 20MiB -2: ls | where size > 30MiB -3: ls | where size > 40MiB -``` - -你可以输入`!3`,然后按回车,而不是按向下键去选择第四个条目。这将在提示位置插入选定的文本,节省你向下滚动菜单的时间。 - -历史搜索和快速选择可以一起使用。你可以激活菜单,进行快速搜索,然后使用前面的方法进行快速选择。 - -### 用户定义菜单 - -如果你发现默认的菜单对你来说是不够的,你需要要创建自己的菜单,Nushell 也可以帮你做到这点。 - -为了添加一个满足你需求的新菜单,你可以使用其中一个默认的布局作为模板。Nushell 中可用的模板有列式、列表式或描述式。 - -列式菜单将以列的方式向你显示数据,并根据你的列中显示的文本大小调整列数。 - -列表类型的菜单将总是以列表的形式显示建议,你可以通过使用`!`加数字的组合来选择值。 - -描述类型将给你更多的空间来显示一些值的描述,以及可以插入到缓冲区的额外信息。 - -假设我们想创建一个菜单,用于显示在你的会话中创建的所有变量,我们将把它称为`vars_menu`。这个菜单将使用一个列表布局 (layout: list)。为了搜索值,我们希望只使用菜单激活后输入的东西(only_buffer_difference: true)。 - -满足这些所需的菜单将看起来像这样: - -```nu - $env.config = { - ... - - menus = [ - ... - { - name: vars_menu - only_buffer_difference: true - marker: "# " - type: { - layout: list - page_size: 10 - } - style: { - text: green - selected_text: green_reverse - description_text: yellow - } - source: { |buffer, position| - $nu.scope.vars - | where name =~ $buffer - | sort-by name - | each { |it| {value: $it.name description: $it.type} } - } - } - ... - ] - ... -``` - -正如你所看到的,新的菜单与之前描述的`history_menu`是相同的,唯一的区别是新的字段叫`source`。`source`字段是 Nushell 所定义的,它包含了你想在菜单中显示的值。对于这个菜单,我们从`$nu.scope.vars`中提取数据,然后用它来创建记录并填充菜单。 - -记录所需的结构如下: - -```nu -{ - value: # The value that will be inserted in the buffer - description: # Optional. Description that will be display with the selected value - span: { # Optional. Span indicating what section of the string will be replaced by the value - start: - end: - } - extra: [string] # Optional. A list of strings that will be displayed with the selected value. Only works with a description menu -} -``` - -为了让菜单显示一些东西,至少`value`字段必须存在于结果记录中。 - -为了使菜单具有交互性,这两个变量在块中可用:`$buffer`和`$position`。`$buffer`包含菜单捕获的值,当选项`only_buffer_difference`为真时,`$buffer`是菜单被激活后输入的文本。如果`only_buffer_difference`是假的,`$buffer`是行中所有的字符串。`$position`变量可以用来根据你对菜单的设想创建替换范围。`$position`的值会随着`only_buffer_difference`是真还是假而改变。当为真时,`$position`是在菜单激活后插入文本的字符串的起始位置;当值为 false 时,`$position`表示实际的光标位置。 - -利用这些信息,你可以设计你的菜单来呈现你所需要的信息,并在需要的位置替换该值。之后,玩转你的菜单唯一额外需要做的事情是定义一个按键绑定,并用于激活你的全新菜单。 - -### 菜单按键绑定 - -如果你想改变两个菜单的默认激活方式,可以通过定义新的按键绑定来实现。例如,接下来的两个按键绑定设置分别将`Ctrl+t`和`Ctrl+y`定义为触发自动补全和历史菜单: - -```nu - $env.config = { - ... - - keybindings: [ - { - name: completion_menu - modifier: control - keycode: char_t - mode: [vi_insert vi_normal] - event: { - until: [ - { send: menu name: completion_menu } - { send: menupagenext } - ] - } - } - { - name: history_menu - modifier: control - keycode: char_y - mode: [vi_insert vi_normal] - event: { - until: [ - { send: menu name: history_menu } - { send: menupagenext } - ] - } - } - ] - - ... - } -``` diff --git a/zh-CN/book/loading_data.md b/zh-CN/book/loading_data.md deleted file mode 100644 index 48ee3b87d7b..00000000000 --- a/zh-CN/book/loading_data.md +++ /dev/null @@ -1,178 +0,0 @@ -# 加载数据 - -之前我们使用了[`ls`](/commands/docs/ls.md)、[`ps`](/commands/docs/ps.md)、[`date`](/commands/docs/date.md)和[`sys`](/commands/docs/sys.md)等命令来加载关于文件、进程、日期时间和系统本身的信息。每条命令都会给我们提供一个信息表,以对其进行探索。我们也可以通过其他方式将数据载入表格以供使用。 - -## 打开文件 - -Nu 在处理数据方面最强大的能力之一是[`open`](/commands/docs/open.md)命令。它是一个多功能命令,可以处理许多不同的数据格式。为了说明这一点让我们试着打开一个 JSON 文件: - -@[code](@snippets/loading_data/vscode.sh) - -与[`ls`](/commands/docs/ls.md)类似,打开一个 Nu 支持的文件类型,会返回一些不仅仅是文本(或一个字节流)的东西。这里我们打开了一个来自 JavaScript 项目的 "package.json" 文件。Nu 可以识别 JSON 文本并将其解析为一个数据表。 - -如果我们想查看当前项目的版本,我们可以使用[`get`](/commands/docs/get.md)命令: - -``` -> open editors/vscode/package.json | get version -1.0.0 -``` - -Nu 目前支持直接从以下格式加载表数据: - -- csv -- eml -- ics -- ini -- json -- nuon -- ods -- ssv -- toml -- tsv -- url -- vcf -- xlsx / xls -- xml -- yaml / yml - -但是,当你加载其他的文本文件时会发生什么呢?让我们试一试: - -```nu -> open README.md -``` - -我们会看到该文件的内容。 - -本质上,这些文本文件对 Nu 来说就是一个大字符串。接下来,我们将讨论如何处理这些字符串,以便从中获得我们需要的数据。 - -## 处理字符串 - -处理来自 Nu 外部数据时一个普遍情况是,它并不总是以 Nu 理解的格式出现。通常这些数据是以字符串的形式提供给我们的。 - -想象一下,我们得到了这个数据文件: - -``` -> open people.txt -Octavia | Butler | Writer -Bob | Ross | Painter -Antonio | Vivaldi | Composer -``` - -我们想要的数据都由管道(`|`)符号隔开,每人单独一行。由于 Nu 没有默认的以管道分隔的文件格式,所以我们必须自己来解析。 - -当我们引入这个文件时,我们需要做的第一件事是确保后续每次只处理一行: - -``` -> open people.txt | lines -───┬────────────────────────────── - 0 │ Octavia | Butler | Writer - 1 │ Bob | Ross | Painter - 2 │ Antonio | Vivaldi | Composer -───┴────────────────────────────── -``` - -可以看到,我们正在处理这些行,因为我们又回到了一个列表中。下一步是看看是否可以把行分割成更有用的东西。为此,我们将使用[`split`](/commands/docs/split.md)命令。[`split`](/commands/docs/split.md),顾名思义,为我们提供了一种分割字符串的方法。我们将使用[`split`](/commands/docs/split.md)的`column`子命令,将内容分成多列。我们会告诉它分隔符是什么,剩下的就由它来完成: - -``` -> open people.txt | lines | split column "|" -───┬──────────┬───────────┬─────────── - # │ column1 │ column2 │ column3 -───┼──────────┼───────────┼─────────── - 0 │ Octavia │ Butler │ Writer - 1 │ Bob │ Ross │ Painter - 2 │ Antonio │ Vivaldi │ Composer -───┴──────────┴───────────┴─────────── -``` - -这看起来差不多了,只是还有一些额外的空白字符,让我们 [`trim`](/commands/docs/str_trim.md) 掉这些空格: - -``` -> open people.txt | lines | split column "|" | str trim -───┬─────────┬─────────┬────────── - # │ column1 │ column2 │ column3 -───┼─────────┼─────────┼────────── - 0 │ Octavia │ Butler │ Writer - 1 │ Bob │ Ross │ Painter - 2 │ Antonio │ Vivaldi │ Composer -───┴─────────┴─────────┴────────── -``` - -还不错,[`split`](/commands/docs/split.md)命令返回给我们可以使用的数据,还预设了默认的列名: - -``` -> open people.txt | lines | split column "|" | str trim | get column1 -───┬───────── - 0 │ Octavia - 1 │ Bob - 2 │ Antonio -───┴───────── -``` - -我们也可以用自定义的列名代替默认的: - -``` -> open people.txt | lines | split column "|" first_name last_name job | str trim -───┬────────────┬───────────┬────────── - # │ first_name │ last_name │ job -───┼────────────┼───────────┼────────── - 0 │ Octavia │ Butler │ Writer - 1 │ Bob │ Ross │ Painter - 2 │ Antonio │ Vivaldi │ Composer -───┴────────────┴───────────┴────────── -``` - -现在,我们的数据加载到一个表中了,我们可以使用之前对表所用的各种命令来处理它: - -``` -> open people.txt | lines | split column "|" first_name last_name job | str trim | sort-by first_name -───┬────────────┬───────────┬────────── - # │ first_name │ last_name │ job -───┼────────────┼───────────┼────────── - 0 │ Antonio │ Vivaldi │ Composer - 1 │ Bob │ Ross │ Painter - 2 │ Octavia │ Butler │ Writer -───┴────────────┴───────────┴────────── -``` - -其他可用于字符串的命令有: - -- `str` -- [`lines`](/commands/docs/lines.md) -- [`size`](/commands/docs/size.md) - -如果我们已经知道待处理的数据具有 Nu 能够理解的格式,则可以使用一些辅助命令,例如,我们打开一个 Rust 的 Cargo.lock 文件: - -```toml -> open Cargo.lock -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -[[package]] -name = "adhoc_derive" -version = "0.1.2" -``` - -"Cargo.lock" 实际上是一个 .toml 文件,但是文件扩展名不是 .toml。没关系,我们可以使用 `from toml` 命令: - -@[code](@snippets/loading_data/cargo-toml.sh) - -每种 Nu 能打开并理解的结构化数据文本格式都有对应的 `from` 命令可以使用,只需要把支持的格式作为子命令传给 `from` 就可以了。 - -## 以原始模式打开 - -虽然能够打开一个文件并立即使用其数据表很有帮助,但这并不总是我们想要的。为了获得原始文本,[`open`](/commands/docs/open.md)命令可以接受一个可选的`--raw`标志: - -```toml -> open Cargo.toml --raw -[package] -name = "nu" -version = "0.1.3" -authors = ["Yehuda Katz ", "Jonathan Turner "] -description = "A shell for the GitHub era" -license = "MIT" -``` - -## 获取 URLs - -除了从文件系统中加载文件,你还可以通过使用[`http get`](/commands/docs/fetch.md)命令来加载 URLs。这将从互联网上获取 URL 的内容并返回: - -@[code](@snippets/loading_data/rust-lang-feed.sh) diff --git a/zh-CN/book/metadata.md b/zh-CN/book/metadata.md deleted file mode 100644 index 7d5fa4a58d1..00000000000 --- a/zh-CN/book/metadata.md +++ /dev/null @@ -1,39 +0,0 @@ -# 元数据 - -在使用 Nu 的过程中,你可能遇到过这样的情况:你觉得有一些额外的事情在幕后进行。例如,假设你试图打开一个 Nu 支持的文件,但却忘记了它已被 Nu 支持并试图再次转换: - -``` -> open Cargo.toml | from toml -error: Expected a string from pipeline -- shell:1:18 -1 | open Cargo.toml | from toml - | ^^^^^^^^^ requires string input -- shell:1:5 -1 | open Cargo.toml | from toml - | ---------- object originates from here -``` - -这个错误信息不仅告诉我们,我们给 `from toml` 的不是一个字符串,还告诉我们这个值最初来自哪里。那么它是如何知道的呢? - -在 Nu 中流经管道的值通常有一些额外信息,或元数据,附加在它们身上。这些通常被称为标签,就像商店里商品上的标签一样。这些标签并不影响数据,但它们给了 Nu 一种方法来改善使用这些数据的体验。 - -让我们再次运行[`open`](/commands/docs/open.md)命令,但这一次,我们将看一下它所反馈的标签: - -``` -> metadata (open Cargo.toml) -╭──────┬───────────────────╮ -│ span │ {record 2 fields} │ -╰──────┴───────────────────╯ -``` - -目前,我们只追踪值来自何处的起止范围(span)。让我们进一步仔细看看: - -```nu -> metadata (open Cargo.toml) | get span -╭───────┬────────╮ -│ start │ 212970 │ -│ end │ 212987 │ -╰───────┴────────╯ -``` - -这里的范围 "start" 和 "end" 指的是下划线将标记在行中的位置。如果你数到 5,然后再数到 15,就会看到它与 "Cargo.toml" 文件名一致。这就是我们之前看到的错误是如何知道在何处标注下划线的。 diff --git a/zh-CN/book/modules.md b/zh-CN/book/modules.md deleted file mode 100644 index 36052b3c185..00000000000 --- a/zh-CN/book/modules.md +++ /dev/null @@ -1,292 +0,0 @@ -# 模块 - -与其他许多编程语言类似,Nushell 也有模块,可以让你将自定义的命令导入到当前作用域中。 -然而,由于 Nushell 也是一个 Shell,模块还允许你导入环境变量,可以用来方便地激活/停用各种环境配置。 - -_注意! 目前对模块的实现是相当基本的,并将在未来进一步扩展。例如,目前还不能从一个模块中导入另一个模块。_ - -## 基础知识 - -一个简单的模块可以像这样定义: - -```nu -> module greetings { - export def hello [name: string] { - $"hello ($name)!" - } - - export def hi [where: string] { - $"hi ($where)!" - } -} -``` - -或者在一个与你要创建的模块名相同的文件中: - -```nu -# greetings.nu - -export def hello [name: string] { - $"hello ($name)!" -} - -export def hi [where: string] { - $"hi ($where)!" -} -``` - -我们在 `greetings` 模块中定义了 `hello` 和 `hi` 两个自定义命令。`export`关键字使得以后可以从模块中导入该命令。 - -与[`def`](/commands/docs/def.md)类似,也可以用`export`关键字标记[`def --env`](/commands/docs/def.md)(你可以在[环境](environment.md)章节中了解更多关于[`def --env`](/commands/docs/def.md)的信息)。 - -## 使用模块 - -模块本身并不做任何事情,要使用模块导出的定义,我们需要[`use`](/commands/docs/use.md)它: - -```nu -> use greetings - -> greetings hello "world" -hello world! - -> greetings hi "there" -hi there! -``` - -`hello`和`hi`命令现在可以通过`greetings`前缀被调用。 - -## 导入符号 - -一般来说,[`use`](/commands/docs/use.md)关键词后面的任何内容都会形成一个**导入模式**,它控制着符号的导入方式。 -导入模式可以是以下的一种: - -`use greetings` - -导入所有以模块名称为前缀的符号(我们在前面的例子中看到了这个)。 - -`use greetings hello` - -`hello`符号将被直接导入,没有任何前缀。 - -`use greetings [ hello, hi ] ` - -直接导入多个符号,没有任何前缀。 - -`use greetings *` - -你也可以使用模块名称和`*` glob 来直接导入所有的名称,且不需要任何前缀。 - -## 模块文件 - -Nushell 让你隐含地把一个源文件当作一个模块。 -让我们先把模块定义的主体保存到一个文件中: - -```nu -# greetings.nu - -export def hello [name: string] { - $"hello ($name)!" -} - -export def hi [where: string] { - $"hi ($where)!" -} -``` - -现在,你可以直接在文件上调用[`use`](/commands/docs/use.md): - -```nu -> use greetings.nu - -> greetings hello "world" -hello world! - -> greetings hi "there" -hi there! -``` - -Nushell 会自动从文件名("greetings",没有".nu"扩展名)推断出模块的名称。所以你可以通过文件名而不是模块名配合使用上述任何导入模式来完成导入。 - -## 本地自定义命令 - -任何在模块中定义的自定义命令,如果没有`export`关键字,将只在该模块的作用域内工作: - -```nu -# greetings.nu - -export def hello [name: string] { - greetings-helper "hello" "world" -} - -export def hi [where: string] { - greetings-helper "hi" "there" -} - -def greetings-helper [greeting: string, subject: string] { - $"($greeting) ($subject)!" -} -``` - -然后,在 Nushell 里我们可以从 "greetings.nu" 中导入所有定义: - -```nu -> use greetings.nu * - -> hello "world" -hello world! - -> hi "there" -hi there! - -> greetings-helper "foo" "bar" # fails because 'greetings-helper' is not exported -``` - -## 环境变量 - -到目前为止,我们只是用模块来导入自定义命令,用同样的方法导出环境变量也是可能的。 -其语法与你可能习惯的直接修改 `$env` 或 [`load-env`](/commands/docs/load-env.md)等命令略有不同: - -```nu -# greetings.nu - -export env MYNAME { "Arthur, King of the Britons" } - -export def hello [name: string] { - $"hello ($name)" -} -``` - -`use` 的工作方式与自定义命令相同: - -```nu -> use greetings.nu - -> $env."greetings MYNAME" -Arthur, King of the Britons - -> greetings hello $env."greetings MYNAME" -hello Arthur, King of the Britons! -``` - -你可能注意到我们没有直接给`MYNAME`赋值,相反,我们给了它一个代码块(`{ ...}`),它在我们每次调用[`use`](/commands/docs/use.md)时都会被执行。例如,我们可以用[`random`](/commands/docs/random.md)命令来演示这一点: - -```nu -> module roll { export env ROLL { random dice | into string } } - -> use roll ROLL - -> $env.ROLL -4 - -> $env.ROLL -4 - -> use roll ROLL - -> $env.ROLL -6 - -> $env.ROLL -6 -``` - -## 导出符号 - -如上所述,你可以从模块中导出定义和环境变量。这可以让你更容易地将相关的定义分组,并导出你想公开的定义。 - -你还可以导出别名和外部声明(extern),并在需要时才使用这些功能。导出外部声明也让你有能力隐藏模块中的自定义自动补全命令,这样它们就不必成为全局命名空间的一部分。 - -下面是所有你可以导出的列表: - -- `export def` - 导出一个自定义命令 -- `export def --env` - 导出一个自定义环境命令 -- `export env` - 导出一个环境变量 -- `export alias` - 导出一个别名 -- `export extern` - 导出一个已知外部命令的定义 - -## 隐藏 - -任何自定义命令、别名或环境变量, 无论是否从模块中导入, 都可以被 "隐藏", 以恢复之前的定义。 -(注意,现在还不能从模块中导出别名,但它们仍然可以被隐藏。) -我们用[`hide`](/commands/docs/hide.md)命令来实现隐藏: - -```nu -> def foo [] { "foo" } - -> foo -foo - -> hide foo - -> foo # error! command not found! -``` - -[`hide`](/commands/docs/hide.md)命令也接受导入模式,就像[`use`](/commands/docs/use.md)那样。不过,导入模式的解释略有不同。它可以是下面中的一种: - -`hide foo` 或者 `hide greetings` - -- 如果该名称是一个自定义的命令或环境变量,则直接隐藏它。否则: -- 如果名字是一个模块的名称,则隐藏所有以模块名称为前缀的导出。 - -`hide greetings hello` - -- 隐藏带前缀的命令或环境变量 - -`hide greetings [hello, hi]` - -- 隐藏带前缀的若干个命令或环境变量 - -`hide greetings *` - -- 隐藏模块的所有的导出,不含前缀 - -让我们看几个例子。前面已经看到了直接隐藏一个自定义命令的例子,现在让我们试试环境变量: - -```nu -> $env.FOO = "FOO" - -> $env.FOO -FOO - -> hide FOO - -> $env.FOO # error! environment variable not found! -``` - -第一种情况也适用于从一个模块导入的命令/环境变量(使用上面定义的 "greetings.nu" 文件): - -```nu -> use greetings.nu * - -> $env.MYNAME -Arthur, King of the Britons - -> hello "world" -hello world! - -> hide MYNAME - -> $env.MYNAME # error! environment variable not found! - -> hide hello - -> hello "world" # error! command not found! -``` - -最后,当名称为模块名时(假设是之前的`greetings`模块): - -```nu -> use greetings.nu - -> $env."greetings MYNAME" -Arthur, King of the Britons - -> greetings hello "world" -hello world! - -> hide greetings - -> $env."greetings MYNAME" # error! environment variable not found! - -> greetings hello "world" # error! command not found! -``` diff --git a/zh-CN/book/moving_around.md b/zh-CN/book/moving_around.md deleted file mode 100644 index dd9d590dcb4..00000000000 --- a/zh-CN/book/moving_around.md +++ /dev/null @@ -1,69 +0,0 @@ -# 在系统中四处移动 - -早期的 Shell 允许你在文件系统中进行目录跳转并运行命令,而现代的 Shell 如 Nu 也允许你这样做。让我们来看看你在与系统交互时可能会用到的一些常用命令。 - -## 查看目录内容 - -@[code](@snippets/moving_around/ls_example.sh) - -正如我们在其他章节中所看到的,[`ls`](/commands/docs/ls.md) 是一个用于查看路径内容的命令。Nu 将以表格的形式返回内容并供我们使用。 - -[`ls`](/commands/docs/ls.md) 命令还需要一个可选的参数,以改变你想查看的内容。例如,我们可以列出以 `.md` 结尾的文件: - -@[code](@snippets/moving_around/ls_shallow_glob_example.sh) - -## 通配符 - -上述可选参数 `*.md` 中的星号(\*)有时被称为通配符(wildcards)或 Glob,它让我们可以匹配任何东西。你可以把 glob `*.md` 理解为“匹配以 `.md` 结尾的任何文件名”。 - -最通用的通配符是 `*`,能够匹配所有路径。它经常和其他模式(pattern)组合使用,比如 `*.bak` 和 `temp*`。 - -Nu 也使用现代 Globs,它允许你访问更深的目录。比如,`ls **/*.md` 将递归地罗列当前目录下、所有后缀为 `.md` 的非隐藏文件: - -@[code](@snippets/moving_around/ls_deep_glob_example.sh) - -- `**` 表示“从这里开始的任何目录中”; -- `*.md` 表示“任意后缀为 `.md` 的文件名”(不包括隐藏文件,要额外添加 `--all, -a` 选项); -- 除了 `*`,还有 `?` 用来匹配单个字符。比如,可以使用 `p???` 模式匹配 `port` 字符串。 - -结合 [字符串的处理](/zh-CN/book/working_with_strings.md) 能够写出更强大的模式。但是,请牢记 Nu 类似一种 [编译型语言](/zh-CN/book/thinking_in_nu.md#把-nushell-想象成一种编译型语言)。 - -## 改变当前目录 - -@[code](@snippets/moving_around/cd_example.sh) - -要从当前目录换到一个新目录,我们使用 [`cd`](/commands/docs/cd.md) 命令。就像在其他 Shells 中一样,我们可以使用目录的名称,或者如果我们想进入父目录,我们可以使用 `..` 的快捷方式。 - -如果 [`cd`](/commands/docs/cd.md) 被省略,只给出一个路径本身,也可以改变当前工作目录: - -@[code](@snippets/moving_around/cd_without_command_example.sh) - -:::warning -用 [`cd`](/commands/docs/cd.md) 改变目录会改变 `PWD` 环境变量。这意味着目录的改变会保留到当前代码块中,一旦你退出这个代码块,你就会返回到以前的目录。你可以在 [环境篇](environment.md) 中了解更多关于这方面的信息。 -::: - -## 文件系统命令 - -Nu 还提供了一些基本的文件系统命令,并且可以跨平台工作。 - -我们可以使用 [`mv`](/commands/docs/mv.md) 命令将一个目录或文件从一个地方移动到另一个地方: - -@[code](@snippets/moving_around/mv_example.sh) - -我们可以通过 [`cp`](/commands/docs/cp.md) 命令把一个目录或文件从一个地方复制到另一个地方: - -@[code](@snippets/moving_around/cp_example.sh) - -:::danger -`cp` 在 Windows 系统,即使目标文件存在,命令也没有附加 `--force, -f`,目标文件仍会被覆盖! -::: - -我们也可以通过 [`rm`](/commands/docs/rm.md) 命令删除一个目录或文件: - -@[code](@snippets/moving_around/rm_example.sh) - -这三个命令也可以使用我们先前看到的 [`ls`](/commands/docs/ls.md) 的 Glob 功能。 - -最后,我们可以使用 [`mkdir`](/commands/docs/mkdir.md) 命令创建一个新目录: - -@[code](@snippets/moving_around/mkdir_example.sh) diff --git a/zh-CN/book/nushell_map.md b/zh-CN/book/nushell_map.md deleted file mode 100644 index 64b5e0608aa..00000000000 --- a/zh-CN/book/nushell_map.md +++ /dev/null @@ -1,101 +0,0 @@ -# 从其他 Shell 或 DSL 到 Nu - -这个表格背后的想法是帮助你了解 Nu 的内置和插件所提供命令与其他已知的 Shell 和特定领域语言(DSL)的关系。我们试图制作一张所有 Nu 命令和它们在其他语言中的对应关系的表。欢迎大家参与贡献。 - -注意:此表针对 Nu 0.43 或更高版本。 - - -| Nushell | SQL | .Net LINQ (C#) | PowerShell (without external modules) | Bash | -| ---------------------- | ----------------------------- | ---------------------------------------------------- | ------------------------------------------ | ----------------------------------------------- | -| alias | - | - | alias | alias | -| append | - | Append | -Append | | -| args | - | - | | | -| autoview | - | - | | | -| math avg | avg | Average | Measure-Object, measure | | -| calc, `` | math operators | Aggregate, Average, Count, Max, Min, Sum | | bc | -| cd | - | - | Set-Location, cd | cd | -| clear | - | - | Clear-Host | clear | -| compact | | | | | -| config | - | - | $Profile | vi .bashrc, .profile | -| cp | - | - | Copy-Item, cp, copy | cp | -| date | NOW() / getdate() | DateTime class | Get-Date | date | -| debug | | | | | -| default | | | | | -| drop | | | | | -| du | - | - | | du | -| each | cursor | | ForEach-Object, foreach, for | | -| echo | print, union all | - | Write-Output, write | echo | -| enter | - | - | | | -| exit | - | | exit | exit | -| first | top, limit | First, FirstOrDefault | Select-Object -First | head | -| format | | String.Format | String.Format | | -| from | import flatfile, openjson, cast(variable as xml) | - | Import/ConvertFrom-{Csv,Xml,Html,Json} | | -| get | | Select | (cmd).column | | -| group-by | group by | GroupBy, group | Group-Object, group | | -| headers | | | | | -| help | sp_help | - | Get-Help, help, man | man | -| histogram | - | - | | | -| history | - | - | Get-History, history | history | -| http(`*`) | - | HttpClient,WebClient, HttpWebRequest/Response | Invoke-WebRequest | wget | -| inc(`*`) | - | | - | - | -| is_empty | is null | String.InNullOrEmpty | String.InNullOrEmpty | | -| keep, =take | top, limit | Take | Select-Object -First | head | -| keep-until | | | | | -| keep-while | | TakeWhile | | | -| kill | - | - | Stop-Process, kill | kill | -| last | | Last, LastOrDefault | Select-Object -Last | tail | -| length | count | Count | Measure-Object, measure | wc | -| lines | - | - | File.ReadAllLines | | -| ls | - | - | Get-ChildItem, dir, ls | ls | -| match(`*`) | case when | Regex.IsMatch | [regex] | | -| merge | | | | | -| mkdir | - | - | mkdir, md | mkdir | -| mv | - | - | Move-Item, mv, move, mi | mv | -| next | | | | | -| nth | limit x offset y, rownumber = | ElementAt | [x], indexing operator, ElementAt | | -| open | | | Get-Content, gc, cat, type | cat | -| parse | | | | | -| transpose | pivot | - | | | -| post(`*`) | - | HttpClient,WebClient, HttpWebRequest/Response | Invoke-WebRequest | | -| prepend | | | | | -| prev | | | | | -| ps(`*`) | - | - | Get-Process, ps, gps | ps | -| pwd | - | - | Get-Location, pwd | pwd | -| range | | Range | 1..10, 'a'..'f' | | -| reduce | | Aggregate | | | -| reject | | | | | -| rename | - | - | Rename-Item, ren, rni | mv | -| reverse | | Reverse | [Array]::Reverse($var) | | -| rm | - | - | Remove-Item, del, erase, rd, ri, rm, rmdir | rm | -| save | - | - | Write-Output, Out-File | > foo.txt | -| select | select | Select | Select-Object, select | | -| shells | - | - | - | | -| shuffle | | Random | Sort-Object {Get-Random} | - | -| size | | | Measure-Object, measure | wc | -| skip | where row_number() | Skip | Select-Object -Skip | | -| skip until | | | | | -| skip while | | SkipWhile | | | -| sort-by | order by | OrderBy, OrderByDescending, ThenBy, ThenByDescending | Sort-Object, sort | | -| split-by | | Split | Split | | -| split column | | - | | | -| split row | | - | | | -| str(`*`) | string functions | String class | String class | | -| str join | concat_ws | Join | Join-String | | -| str trim | rtrim, ltrim | Trim, TrimStart, TrimEnd | Trim | | -| sum | sum | Sum | Measure-Object, measure | | -| sys(`*`) | - | - | Get-ComputerInfo | uname, lshw, lsblk, lscpu, lsusb, hdparam, free | -| table | | | Format-Table, ft, Format-List, fl | | -| tags | - | - | - | | -| textview(`*`) | - | - | Get-Content, cat | | -| tree(`*`) | - | - | tree | | -| to | - | - | Export/ConvertTo-{Csv,Xml,Html,Json} | | -| touch | - | - | Set-Content | touch | -| uniq | distinct | Distinct | Get-Unique, gu | uniq | -| upsert | As | - | | | -| version | select @@version | - | $PSVersionTable | | -| with_env | - | - | $env:FOO = 'bar' | export foo = "bar" | -| where | where | Where | Where-Object, where, "?" operator | | -| which | - | - | - | which | -| wrap | | | | | - -* `*` - 这些命令是标准插件的一部分 diff --git a/zh-CN/book/nushell_map_functional.md b/zh-CN/book/nushell_map_functional.md deleted file mode 100644 index 6c8c2c3d4a8..00000000000 --- a/zh-CN/book/nushell_map_functional.md +++ /dev/null @@ -1,103 +0,0 @@ -# 从函数式语言到 Nu - -这个表格的目的是帮助你了解 Nu 的内置和插件所提供命令与函数式语言的关系。我们试图制作一张所有 Nu 命令和它们在其他语言中的映射关系的表。欢迎大家参与贡献。 - -注意:此表针对 Nu 0.43 或更高版本。 - -| Nushell | Clojure | Tablecloth (Ocaml / Elm) | Haskell | | -| ------------------------- | ---------------------------- | ------------------------------- | ------------------------ | --- | -| alias | | | | | -| append | conj, into, concat | append, (++), concat, concatMap | (++) | | -| args | | | | | -| autoview | | | | | -| math avg | | | | | -| into binary | Integer/toHexString | | showHex | | -| calc, `` | math operators | | | | -| cd | | | | | -| clear | | | | | -| clip | | | | | -| compact | | | | | -| config | | | | | -| count | count | length, size | length, size | | -| cp | | | | | -| date | java.time.LocalDate/now | | | | -| debug | | | | | -| default | | | | | -| drop | | | | | -| du | | | | | -| each | map, mapv, iterate | map, forEach | map, mapM | | -| echo | println | | putStrLn, print | | -| enter | | | | | -| exit | System/exit | | | | -| first | first | head | head | | -| format | format | | Text.Printf.printf | | -| from | | | | | -| get | | | | | -| group-by | group-by | | group, groupBy | | -| headers | | | | | -| help | doc | | | | -| histogram | | | | | -| history | | | | | -| http(`*`) | | | | | -| inc(`*`) | inc | | succ | | -| insert | | | | | -| is-empty | empty? | isEmpty | | | -| keep | take, drop-last, pop | take, init | take, init | | -| keep-until | | | | | -| keep-while | take-while | takeWhile | takeWhile | | -| kill | | | | | -| last | last, peek, take-last | last | last | | -| lines | | | lines, words, split-with | | -| ls | | | | | -| match(`*`) | re-matches, re-seq, re-find | | | | -| merge | | | | | -| mkdir | | | | | -| mv | | | | | -| next | | | | | -| nth | nth | Array.get | lookup | | -| open | with-open | | | | -| parse | | | | | -| transpose | (apply mapv vector matrix) | | transpose | | -| post(`*`) | | | | | -| prepend | cons | cons, :: | :: | | -| prev | | | | | -| ps | | | | | -| pwd | | | | | -| range, 1..10 | range | range | 1..10, 'a'..'f' | | -| reduce | reduce, reduce-kv | foldr | foldr | | -| reject | | | | | -| rename | | | | | -| reverse | reverse, rseq | reverse, reverseInPlace | reverse | | -| rm | | | | | -| save | | | | | -| select | select-keys | | | | -| shells | | | | | -| shuffle | shuffle | | | | -| size | count | | size, length | | -| skip | rest | tail | tail | | -| skip until | | | | | -| skip while | drop-while | dropWhile | dropWhile, dropWhileEnd | | -| sort-by | sort, sort-by, sorted-set-by | sort, sortBy, sortWith | sort, sortBy | | -| split-by | split, split-{at,with,lines} | split, words, lines | split, words, lines | | -| split column | | | | | -| split row | | | | | -| str(`*`) | clojure.string functions | String functions | | | -| str join | join | concat | intercalate | | -| str trim | trim, triml, trimr | trim, trimLeft, trimRight | strip | | -| sum | apply + | sum | sum | | -| sys | | | | | -| table | | | | | -| tags | | | | | -| tree(`*`) | | | | | -| to | | | | | -| touch | | | | | -| uniq | set | Set.empty | Data.Set | | -| upsert | | | | | -| version | | | | | -| with_env | | | | | -| what | | | | | -| where | filter, filterv, select | filter, filterMap | filter | | -| which | | | | | -| wrap | | | | | - -- `*` - 这些命令是标准插件的一部分 diff --git a/zh-CN/book/nushell_map_imperative.md b/zh-CN/book/nushell_map_imperative.md deleted file mode 100644 index 7341115634c..00000000000 --- a/zh-CN/book/nushell_map_imperative.md +++ /dev/null @@ -1,101 +0,0 @@ -# 从命令式语言到 Nu - -这个表格的目的是帮助你了解 Nu 的内置和插件所提供的命令与命令式语言的关系。我们试图制作一张所有 Nu 命令和它们在其他语言中的对应关系的表。欢迎大家参与贡献。 - -注意:此表假设 Nu 0.43 或更高版本。 - -| Nushell | Python | Kotlin (Java) | C++ | Rust | -| ------------ | ----------------------------- | --------------------------------------------------- | ----------------------- | --------------------------------------------- | -| alias | | | | | -| append | list.append, set.add | add | push_back, emplace_back | push, push_back | -| args | | | | | -| autoview | | | | | -| math avg | statistics.mean | | | | -| calc, = math | math operators | math operators | math operators | math operators | -| cd | | | | | -| clear | | | | | -| clip | | | | | -| compact | | | | | -| config | | | | | -| count | len | size, length | length | len | -| cp | shutil.copy | | | | -| date | datetime.date.today | java.time.LocalDate.now | | | -| debug | | | | | -| default | | | | | -| drop | | | | | -| du | shutil.disk_usage | | | | -| each | for | for | for | for | -| echo | print | println | printf | println! | -| enter | | | | | -| exit | exit | System.exit, kotlin.system.exitProcess | exit | exit | -| fetch | urllib.request.urlopen | | | | -| first | list[0] | List[0], peek | vector[0], top | Vec[0] | -| format | format | format | format | format! | -| from | csv, json, sqlite3 | | | | -| get | dict[\"key\"] | Map[\"key\"] | map[\"key\"] | HashMap["key"], get, entry | -| group-by | itertools.groupby | groupBy | | group_by | -| headers | | | | | -| help | help | | | | -| histogram | | | | | -| history | | | | | -| inc(`*`) | x += 1 | x++ | x++ | x += 1 | -| insert | list.insert | | | | -| is-empty | is None | isEmpty | empty | is_empty | -| keep | list[:x] | | | &Vec[..x] | -| keep until | | | | | -| keep while | itertools.takewhile | | | | -| kill | os.kill | | | | -| last | list[-1] | | | &Vec[Vec.len()-1] | -| lines | split, splitlines | split | views::split | split, split_whitespace, rsplit, lines | -| ls | os.listdir | | | | -| match(`*`) | re.findall | Regex.matches | regex_match | | -| merge | | | | | -| mkdir | os.mkdir | | | | -| mv | shutil.move | | | | -| next | | | | | -| nth | list[x] | List[x] | vector[x] | Vec[x] | -| open | open | | | | -| parse | | | | | -| transpose | zip(\*matrix) | | | | -| post(`*`) | urllib.request.urlopen | | | | -| prepend | deque.appendleft | | | | -| prev | | | | | -| ps(`*`) | os.listdir('/proc') | | | | -| pwd | os.getcwd | | | | -| range | range | .., until, downTo, step | iota | .. | -| reduce | functools.reduce | reduce | reduce | fold, rfold, scan | -| reject | | | | | -| rename | shutil.move | | | | -| reverse | reversed, list.reverse | reverse, reversed, asReversed | reverse | rev | -| rm | os.remove | | | | -| save | io.TextIOWrapper.write | | | | -| select | {k:dict[k] for k in keylist} | | | | -| shells | | | | | -| shuffle | random.shuffle | | | | -| size | len | | | | -| skip | list[x:] | | | &Vec[x..],skip | -| skip until | | | | | -| skip while | itertools.dropwhile | | | skip_while | -| sort-by | sorted, list.sort | sortedBy, sortedWith, Arrays.sort, Collections.sort | sort | sort | -| split-by | str.split{,lines}, re.split | split | views::split | split | -| split column | | | | | -| split row | | | | | -| str(`*`) | str functions | String functions | string functions | &str, String functions | -| str join | str.join | joinToString | | join | -| str trim | strip, rstrip, lstrip | trim, trimStart, trimEnd | regex | trim, trim*{start,end}, strip*{suffix,prefix} | -| sum | sum | sum | reduce | sum | -| sys(`*`) | sys | | | | -| table | | | | | -| tags | | | | | -| tree(`*`) | | | | | -| to | csv, json, sqlite3 | | | | -| touch | open(path, 'a').close() | | | | -| uniq | set | Set | set | HashSet | -| upsert | | | | | -| version | sys.version, sys.version_info | | | | -| with-env | os.environ | | | | -| where | filter | filter | filter | filter | -| which | shutil.which | | | | -| wrap | | | | | - -- `*` - 这些命令是标准插件的一部分 diff --git a/zh-CN/book/nushell_operator_map.md b/zh-CN/book/nushell_operator_map.md deleted file mode 100644 index 7588af72cd9..00000000000 --- a/zh-CN/book/nushell_operator_map.md +++ /dev/null @@ -1,25 +0,0 @@ -# Nushell 运算符 - -这个表格的目的是帮助你了解 Nu 运算符与其他语言运算符的关系。我们试图制作一张包含所有 Nushell 运算符的表,以及它们在其他语言中的对应关系。欢迎大家参与贡献。 - -注意:此表针对 Nu 0.14.1 或更高版本。 - -| Nushell | SQL | Python | .NET LINQ (C#) | PowerShell | Bash | -| ------- | -------- | ------------------ | -------------------- | ---------------------- | ------------------ | -| == | = | == | == | -eq, -is | -eq | -| != | !=, <> | != | != | -ne, -isnot | -ne | -| < | < | < | < | -lt | -lt | -| <= | <= | <= | <= | -le | -le | -| > | > | > | > | -gt | -gt | -| >= | >= | >= | >= | -ge | -ge | -| =~ | like | re, in, startswith | Contains, StartsWith | -like, -contains | =~ | -| !~ | not like | not in | Except | -notlike, -notcontains | ! "str1" =~ "str2" | -| + | + | + | + | + | + | -| - | - | - | - | - | - | -| \* | \* | \* | \* | \* | \* | -| / | / | / | / | / | / | -| \*\* | pow | \*\* | Power | Pow | \*\* | -| in | in | re, in, startswith | Contains, StartsWith | -In | case in | -| not-in | not in | not in | Except | -NotIn | | -| and | and | and | && | -And, && | -a, && | -| or | or | or | \|\| | -Or, \|\| | -o, \|\| | diff --git a/zh-CN/book/operators.md b/zh-CN/book/operators.md deleted file mode 100644 index 51ce2141d39..00000000000 --- a/zh-CN/book/operators.md +++ /dev/null @@ -1,89 +0,0 @@ -# 运算符 - -Nushell 支持以下常见的数学、逻辑和字符串操作的运算符: - -| 运算符 | 描述 | -| ------------- | --------------------------------- | -| `+` | 加 | -| `-` | 减 | -| `*` | 乘 | -| `/` | 除 | -| `**` | 指数 (幂) | -| `mod` | 取模 | -| `==` | 等于 | -| `!=` | 不等于 | -| `<` | 小于 | -| `<=` | 小于等于 | -| `>` | 大于 | -| `>=` | 大于等于 | -| `=~` | 正则匹配 / 字符串包含另一个字符串 | -| `!~` | 正则不匹配 / 字符串*不*包含另一个 | -| `in` | 列表包含值 | -| `not-in` | 列表不包含值 | -| `not` | 逻辑取反 | -| `&&`, `and` | 两个布尔值与运算 | -| `\|\|`, `or` | 两个布尔值或运算 | -| `//` | 整除并向下取整 | -| `**` | 幂运算 | -| `bit-or` | 按位或 | -| `bit-xor` | 按位异或 | -| `bit-and` | 按位与 | -| `bit-shl` | 按位左移 | -| `bit-shr` | 按位右移 | -| `starts-with` | 字符串开始检测 | -| `ends-with` | 字符串结尾检测 | - -圆括号可用于分组以指定求值顺序,或用于调用命令并在表达式中使用结果。 - -## 运算符结合顺序 - -数学运算的结合顺序如下(从最高优先级到最低): - -- 圆括号 (`()`) -- 乘 (`*`) 、 除 (`/`) 和幂 (`**`) -- 加 (`+`) 和减 (`-`) - -``` -> 3 * (1 + 2) -9 -``` - -## 正则表达式 / 字符串包含运算符 - -`=~`和`!~`运算符提供了一种更方便的方法来评估 [正则表达式](https://cheatography.com/davechild/cheat-sheets/regular-expressions/)。你不需要知道正则表达式就可以使用它们 —— 它们也是检查一个字符串是否包含另一个的简单方法: - -- `string =~ pattern` 如果 `string` 包含 `pattern` 的匹配返回 **true**, 反之返回 **false**; -- `string !~ pattern` 如果 `string` 包含 `pattern` 的匹配返回 **false**, 反之返回 **true**; - -例如: - -```nu -foobarbaz =~ bar # returns true -foobarbaz !~ bar # returns false -ls | where name =~ ^nu # returns all files whose names start with "nu" -``` - -两个运算符都使用了 [Rust regex 包的 `is_match()` 函数](https://docs.rs/regex/latest/regex/struct.Regex.html#method.is_match)。 - -## 大小写敏感性 - -对字符串进行操作时,运算符通常是区分大小写的。有几种方法可以处理大小写不敏感的场景: - -1. 在正则表达式运算符中,指定`(?i)`不区分大小写的模式修饰器: - -```nu -"FOO" =~ "foo" # returns false -"FOO" =~ "(?i)foo" # returns true -``` - -2. 使用[`str contains`](/commands/docs/str_contains.md) 命令的`--insensitive`标志: - -```nu -"FOO" | str contains --insensitive "foo" -``` - -3. 在比较前用[`str downcase`](/commands/docs/str_downcase.md)将字符串转换为小写: - -```nu -("FOO" | str downcase) == ("Foo" | str downcase) -``` diff --git a/zh-CN/book/overlays.md b/zh-CN/book/overlays.md deleted file mode 100644 index 74fee642f69..00000000000 --- a/zh-CN/book/overlays.md +++ /dev/null @@ -1,191 +0,0 @@ -# 覆层 - -覆层(Overlays)作为各种定义(自定义命令、别名、环境变量)的"层",可以根据需要激活和停用。 -它们类似于某些语言中的虚拟环境,如 Python。 - -_注意:要了解覆层,请确保先查看 [模块](modules.md),因为覆层是建立在模块之上的。_ - -## 基础 - -首先,Nushell 有一个默认的覆层,叫做 `zero`。 -你可以用 [`overlay list`](/commands/docs/overlay_list.md) 命令检查哪些覆层是活动的。 -你应该可以看到默认的覆层显示在那里。 - -要创建一个新的覆层,你首先需要一个模块: - -```nu -> module spam { - export def foo [] { - "foo" - } - - export alias bar = "bar" - - export env BAZ { - "baz" - } -} -``` - -我们将在本章中使用这个模块。每当你看到 `overlay use spam`,就应该知道 `spam` 是指这个模块。 - -要创建覆层,请调用 [`overlay use`](/commands/docs/overlay_add.md)。 - -```nu -> overlay use spam - -> foo -foo - -> bar -bar - -> $env.BAZ -baz - -> overlay list -───┬────── - 0 │ zero - 1 │ spam -───┴────── -``` - -在下面的章节中,`>` 的提示语前面会有最后一个活动覆层的名称。 -`(spam)> some-command` 表示当输入命令时,`spam` 覆层是最后活动的覆层。 - -## 移除覆层 - -如果你不再需要叠加定义,请调用 [`overlay hide`](/commands/docs/overlay_remove.md): - -```nu -(spam)> overlay hide spam - -(zero)> foo -Error: Can't run executable... - -(zero)> overlay list -───┬────── - 0 │ zero -───┴────── -``` - -覆层也是有作用域的。 -任何添加的覆层都会在作用域结束时被移除: - -```nu -(zero)> do { overlay use spam; foo } -foo - -(zero)> overlay list -───┬────── - 0 │ zero -───┴────── -``` - -此外,[`overlay hide`](/commands/docs/overlay_remove.md) 在没有参数的情况下,将删除最后一个活动的覆层。 - -## 覆层是可记录的 - -任何新的定义(命令、别名、环境变量)都会被记录到最后一个活动的覆层: - -```nu -(zero)> overlay use spam - -(spam)> def eggs [] { "eggs" } -``` - -现在,`eggs` 命令属于 `spam` 覆层。 -如果我们删除该覆层,我们就不能再调用它: - -```nu -(spam)> overlay hide spam - -(zero)> eggs -Error: Can't run executable... -``` - -但是,我们可以把它找回来! - -```nu -(zero)> overlay use spam - -(spam)> eggs -eggs -``` - -覆层会记住你所添加的内容,即使你删除了它们,也会储存这些信息。 -这可以让你在不同的上下文中反复切换。 - -::: tip -有时,在添加一个覆层后,你可能不希望自定义对象被添加到其中。 -解决的办法是创建一个新的空的覆层,只用来记录自定义的变化: - -```nu -(zero)> overlay use spam - -(spam)> module scratchpad { } - -(spam)> overlay use scratchpad - -(scratchpad)> def eggs [] { "eggs" } -``` - -`eggs` 命令被添加到 `scratchpad` 中,同时保持 `spam` 不变。 - -_0.64 版本新增:_ -为了让上述步骤不那么冗长,你可以使用 [`overlay new`](/commands/docs/overlay_new.md) 命令: - -```nu -(zero)> overlay use spam - -(spam)> overlay new scratchpad - -(scratchpad)> def eggs [] { "eggs" } -``` - -::: - -## 保存定义 - -有时,你可能想删除一个覆层,但保留所有你添加的自定义定义,而不必在下一个活动覆层中重新定义它们: - -```nu -(zero)> overlay use spam - -(spam)> def eggs [] { "eggs" } - -(spam)> overlay hide --keep-custom spam - -(zero)> eggs -eggs -``` - -`--keep-custom` 标志正是用来做这个的。 - -## 覆层顺序 - -覆层被排成一个堆栈。 -如果多个覆层包含相同的定义,比如 `foo`,最后一个活动的覆层将优先。 -要把某个覆层放到堆栈的顶部,你可以再次调用 `overlay use`: - -```nu -(zero)> def foo [] { "foo-in-zero" } - -(zero)> overlay use spam - -(spam)> foo -foo - -(spam)> overlay use zero - -(zero)> foo -foo-in-zero - -(zero)> overlay list -───┬────── - 0 │ spam - 1 │ zero -───┴────── -``` - -现在,`zero` 覆层具有优先权。 diff --git a/zh-CN/book/parallelism.md b/zh-CN/book/parallelism.md deleted file mode 100644 index 0ed0b77678f..00000000000 --- a/zh-CN/book/parallelism.md +++ /dev/null @@ -1,43 +0,0 @@ -# 并行 - -Nushell 现在已经初步支持并行运行代码了,这允许你使用更多的计算机硬件资源来处理一个流的各个元素。 - -你会注意到这些命令包含其特有的`par-`命名,每一个都对应着一个非并行的版本,这允许你先轻松地以串行的风格写代码,然后再回头用几个额外的字符轻松地将串行脚本转换成并行脚本。 - -## `par-each` - -最常见的并行命令是[`par-each`](/commands/docs/par-each.md),它是[`each`](/commands/docs/each.md)命令的搭档。 - -与[`each`](/commands/docs/each.md)一样,[`par-each`](/commands/docs/par-each.md)对管道中流入的元素进行处理,在每个元素上运行一个代码块。与[`each`](/commands/docs/each.md)不同,[`par-each`](/commands/docs/par-each.md)将并行地进行这些操作。 - -假设你想计算当前目录下每个子目录下的文件数量。使用[`each`](/commands/docs/each.md)你可以这样写。 - -```nu -> ls | where type == dir | each { |it| - { name: $it.name, len: (ls $it.name | length) } -} -``` - -我们为每个条目创建一条记录,并在其中填入目录的名称和该子目录中的文件数。 - -在你的机器上,时间可能有所不同。对于这台机器的当前目录来说,需要 21 毫秒的时间。 - -现在,由于这个操作可以并行运行,让我们把上面的操作转换为并行的,把[`each`](/commands/docs/each.md)改为[`par-each`](/commands/docs/par-each.md): - -```nu -> ls | where type == dir | par-each { |it| - { name: $it.name, len: (ls $it.name | length) } -} -``` - -在这台机器上,现在它的运行时间为 6 毫秒。这是一个相当大的差异! - -顺便提一下:由于 [环境变量是有作用域的](environment.md#作用域),你可以使用`par-each`在多个目录中并行工作(注意 `cd` 命令): - -```nu -> ls | where type == dir | par-each { |it| - { name: $it.name, len: (cd $it.name; ls | length) } -} -``` - -如果你看一下结果,你会注意到,它们每次运行返回的顺序是不同的(这取决于你系统上的硬件线程数量)。随着任务的完成,我们得到了正确的结果,如果我们希望得到结果以特定的顺序出现,我们可能需要添加额外的步骤。例如,对于上述情况,我们可能想按 "name" 字段对结果进行排序。这样,我们的脚本的[`each`](/commands/docs/each.md)和[`par-each`](/commands/docs/par-each.md)版本都能得到相同的结果。 diff --git a/zh-CN/book/pipelines.md b/zh-CN/book/pipelines.md deleted file mode 100644 index 3848399a1cf..00000000000 --- a/zh-CN/book/pipelines.md +++ /dev/null @@ -1,72 +0,0 @@ -# 管道 - -Nu 的核心设计之一是管道,这个设计思想可以追溯到几十年前 Unix 背后的一些原始理念。正如 Nu 拓展了 Unix 的单一字符串数据类型一样,Nu 也扩展了管道的概念,使其不仅仅包含文本。 - -## 基础 - -一个管道由三部分组成:输入、过滤器和输出。 - -```nu -> open "Cargo.toml" | inc package.version --minor | save "Cargo_new.toml" -``` - -第一条命令:`open "Cargo.toml"` 是一个输入(有时也称为 "源" 或 "生产者"),它创建或加载数据,并将其送入管道。管道待处理的值正是来自于此输入。像[`ls`](/commands/docs/ls.md)这样的命令也是输入,因为它们从文件系统中获取数据,并通过管道发送以便能被后续使用。 - -第二个命令:`inc package.version --minor` 是一个过滤器。过滤器获取输入的数据并对其进行处理。它们可能会修改它(如我们例子中的[`inc`](/commands/docs/inc.md)命令),或者在值通过时对其做其他操作,如记录。 - -最后一条命令:`save "Cargo_new.toml"` 是一个输出(有时称为 "接收者")。输出从管道中获取输入,并对其进行一些最终操作。在我们的例子中,我们在最后一步把通过管道的内容保存到一个文件中。还有一些其他类型的输出命令可以获取数值并供用户查看。 - -`$in` 变量可以将管道收集成一个值,允许你将整个流作为一个参数访问,比如: - -```nu -> echo 1 2 3 | $in.1 * $in.2 -6 -``` - -## 多行管道 - -如果一个管道对一行来说有些长,你可以把它放在`(`和`)`里,以创建一个子表达式: - -```nu -( - "01/22/2021" | - parse "{month}/{day}/{year}" | - get year -) -``` - -也可以参考 [子表达式](variables_and_subexpressions.html#子表达式) - -## 与外部命令交互 - -Nu 命令之间使用 Nu 的数据类型进行通信(见[数据类型](types_of_data.md)),但 Nu 之外的命令呢?让我们看看一些与外部命令交互的例子: - -`internal_command | external_command` - -数据将从 `internal_command` 流向 `external_command`。这些数据将被转换为字符串,以便它们可以被发送到外部命令的`stdin`。 - -`external_command | internal_command` - -从外部命令进入 Nu 的数据将以字节的形式流入,Nushell 将尝试自动将其转换为 UTF-8 文本。如果成功,一个文本数据流将被发送到`internal_command`;如果不成功,一个二进制数据流将被发送到`internal_command`。像[`lines`](/commands/docs/lines.md)这样的命令有助于从外部命令接收数据,因为它提供了分离的数据行以供后续使用。 - -`external_command_1 | external_command_2` - -Nu 在两个外部命令之间以与其他 Shell 相同的方式处理数据管道,比如 Bash。`external_command_1`的`stdout`与`external_command_2`的`stdin`相连,这让数据在两个命令之间自然流动。 - -## 幕后解说 - -你可能想知道,既然[`ls`](/commands/docs/ls.md)是一个输入而不是一个输出,我们为何能看到一个表格?其实 Nu 使用了另一个叫做[`table`](/commands/docs/table.md)的命令为我们自动添加了这个输出。[`table`](/commands/docs/table.md)命令被附加到任何没有输出的管道上,这使得我们可以看到结果。 - -实际上,该命令: - -``` -> ls -``` - -和以下管道: - -``` -> ls | table -``` - -是一样的。 diff --git a/zh-CN/book/plugins.md b/zh-CN/book/plugins.md deleted file mode 100644 index df7647662cf..00000000000 --- a/zh-CN/book/plugins.md +++ /dev/null @@ -1,48 +0,0 @@ -# 插件 - -Nu 可以通过插件进行扩展。插件的行为与 Nu 的内置命令很相似,另外的好处是它们可以与 Nu 本身分开添加。 - -Nu 的插件是可执行的;Nu 在需要时启动它们,并通过 [stdin, stdout 和 stderr](https://en.wikipedia.org/wiki/Standard_streams) 与它们进行通信。Nu 的插件可以使用 JSON 或 [Cap'n Proto](https://capnproto.org/) 作为它们的通信编码方式。 - -## 添加一个插件 - -要添加一个插件,请调用[`register`](/commands/docs/register.md)命令来告诉 Nu 在哪里可以找到它,与此同时,你还需要告诉 Nushell 这个插件使用什么方式进行编码。 - -Linux+macOS: - -```nu -> register --encoding=capnp ./my_plugins/my-cool-plugin -``` - -Windows: - -```nu -> register --encoding=capnp .\my_plugins\my-cool-plugin.exe -``` - -当 [`register`](/commands/docs/register.md) 被调用时: - -1. Nu 启动该插件并通过 stdin 向其发送 "签名" 信息; -2. 插件通过 stdout 响应,包含其签名(名称、描述、参数、标志等)的消息; -3. Nu 将插件的签名保存在`$nu.plugin-path`位置的文件中,因此在注册之后的多次启动中都是有效的; - -一旦注册,该插件就可以作为你的命令集的一部分被使用: - -```nu -> help commands | where is_plugin == true -``` - -## 示例 - -Nu 的主版本中包含了一些插件的例子,这些例子对学习插件协议的工作方式很有帮助: - -- [Rust](https://github.com/nushell/nushell/tree/main/crates/nu_plugin_example) -- [Python](https://github.com/nushell/nushell/blob/main/crates/nu_plugin_python) - -## 调试 - -调试插件的最简单方法是打印到 stderr;插件的标准错误流会通过 Nu 重定向并显示给用户。 - -## 帮助 - -Nu 的插件文档尚在撰写中,如果你对某件事情不确定 [Nu Discord](https://discord.gg/NtAbbGn)上的 #plugins 频道是一个提问的好地方! diff --git a/zh-CN/book/regular_expressions.md b/zh-CN/book/regular_expressions.md deleted file mode 100644 index ecf186eef49..00000000000 --- a/zh-CN/book/regular_expressions.md +++ /dev/null @@ -1,3 +0,0 @@ -# 正则表达式 - -Nushell 命令中的正则表达式是由 `rust-lang/regex` 包处理的。如果你想了解更多,请查看 crate 的文档:"[Regex](https://github.com/rust-lang/regex)"。 diff --git a/zh-CN/book/scripts.md b/zh-CN/book/scripts.md deleted file mode 100644 index 43d04a3787d..00000000000 --- a/zh-CN/book/scripts.md +++ /dev/null @@ -1,88 +0,0 @@ -# 脚本 - -在 Nushell 中,你可以用 Nushell 语言编写和运行脚本。要运行一个脚本,你可以把它作为一个参数传递给`nu`命令行程序: - -```nu -> nu myscript.nu -``` - -这将在一个新的 Nu 实例中运行脚本直至完成。你也可以使用[`source`](/commands/docs/source.md)在 Nu 的 **当前** 实例中运行脚本: - -```nu -> source myscript.nu -``` - -我们来看一个脚本文件的例子吧: - -```nu -# myscript.nu -def greet [name] { - echo "hello" $name -} - -greet "world" -``` - -脚本文件包含了自定义命令的定义以及主脚本本身,它将在自定义命令定义后运行。 - -在上面的例子中,首先`greet`是由 Nushell 解释器定义的,这使得我们之后可以调用这个定义,我们可以把上面的内容写成: - -```nu -greet "world" - -def greet [name] { - echo "hello" $name -} -``` - -Nushell 并不要求定义必须放在脚本中调用该定义之前,你可以把定义放在你觉得舒服的地方。 - -## 脚本是如何被处理的 - -在一个脚本中定义总是先运行,这样我们就可以在脚本中调用定义。 - -在定义运行之后, 我们从脚本文件的顶部开始, 一个接一个地运行每一组命令。 - -## 脚本行 - -为了更好地理解 Nushell 是如何看待代码行的, 我们来看一个脚本的例子: - -```nu -a -b; c | d -``` - -当这个脚本运行时,Nushell 将首先运行`a`命令至完成并查看其结果。接下来,Nushell 将按照["组"部分](types_of_data.html#组)中的规则运行`b; c | d`。 - -## 参数化脚本 - -脚本文件可以选择性地包含一个特殊的 "main" 命令。`main`将在任何其他 Nu 代码之后运行,主要用于向脚本添加参数。你可以在脚本名称后面传递参数(`nu + + + + + When [`register`](/commands/docs/register.md) is called: diff --git a/src/content/docs/book/shells_in_shells.md b/src/content/docs/book/shells_in_shells.md index a63712459f8..884414dba29 100644 --- a/src/content/docs/book/shells_in_shells.md +++ b/src/content/docs/book/shells_in_shells.md @@ -1,9 +1,7 @@ --- -title: Community +title: Shells in shells --- -# Shells in shells - ## Working in multiple directories While it's common to work in one directory, it can be handy to work in multiple places at the same time. For this, Nu offers the concept of "shells". As the name implies, they're a way of running multiple shells in one, allowing you to quickly jump between working directories and more. diff --git a/src/content/docs/book/standard_library.md b/src/content/docs/book/standard_library.md index 70fcec6708e..936b7dec2dd 100644 --- a/src/content/docs/book/standard_library.md +++ b/src/content/docs/book/standard_library.md @@ -1,7 +1,5 @@ --- -title: Community +title: Standard library --- -# Standard library (preview) - The standard library is located on the [Git repository](https://github.com/nushell/nushell/tree/main/crates/nu-std). At the moment it is an alpha development stage. You can find more documentation there. diff --git a/src/content/docs/book/stdout_stderr_exit_codes.md b/src/content/docs/book/stdout_stderr_exit_codes.md index 449c557b33d..4ecd2646aba 100644 --- a/src/content/docs/book/stdout_stderr_exit_codes.md +++ b/src/content/docs/book/stdout_stderr_exit_codes.md @@ -1,9 +1,7 @@ --- -title: Community +title: Stdout, Stderr, and Exit Codes --- -# Stdout, Stderr, and Exit Codes - An important piece of interop between Nushell and external commands is working with the standard streams of data coming from the external. The first of these important streams is stdout. @@ -66,9 +64,19 @@ In contrast, the [`print`](/commands/docs/print.md) command prints the given val The [standard library](/book/standard_library.md) has commands to write out messages in different logging levels. For example: -@[code](@snippets/book/std_log.nu) +```nushell +use std log + +def main [] { + log debug "Debug message" + log info "Info message" + log warning "Warning message" + log error "Error message" + log critical "Critical message" +} +``` -![Log message examples](../assets/images/0_79_std_log.png) +![Log message examples](../../../assets/images/0_79_std_log.png) The log level for output can be set with the `NU_LOG_LEVEL` environment variable: diff --git a/src/content/docs/book/testing.md b/src/content/docs/book/testing.md index d6c6b46958a..c5886f65442 100644 --- a/src/content/docs/book/testing.md +++ b/src/content/docs/book/testing.md @@ -1,16 +1,14 @@ --- -title: Community +title: Testing --- -# Testing your Nushell code - The [standard library](standard_library.md) has a unit testing framework to ensure that your code works as expected. ## Quick start Have a file, called `test_math.nu`: -```nushell +```nushell title="test_math.nu" use std assert #[test] @@ -31,7 +29,7 @@ def test_failing [] { Run the tests: -```nushell +```nushell frame="terminal" ❯ use std testing run-tests ❯ run-tests INF|2023-04-12T10:42:29.099|Running tests in test_math From 7ea7d2f1ff1fde0bae6111e8bb38100fe7ec908c Mon Sep 17 00:00:00 2001 From: Jacob Lamb Date: Sun, 11 Feb 2024 10:46:13 -0800 Subject: [PATCH 08/72] Update custom_completions.md --- src/content/docs/book/custom_completions.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/content/docs/book/custom_completions.md b/src/content/docs/book/custom_completions.md index c9ab52d21ff..0786c9d420d 100644 --- a/src/content/docs/book/custom_completions.md +++ b/src/content/docs/book/custom_completions.md @@ -118,6 +118,7 @@ def my_commits [] { :::note with the following snippet + ```nushell def my-command [commit: string@my_commits] { print $commit @@ -126,11 +127,11 @@ def my-command [commit: string@my_commits] { be aware that, even though the completion menu will show you something like - ```nushell - >_ my-command - 5c2464 Add .gitignore - f3a377 Initial commit - ``` +```nushell +>_ my-command +5c2464 Add .gitignore +f3a377 Initial commit +``` only the value, i.e. "5c2464" or "f3a377", will be used in the command arguments! ::: From 63d51541c0512834df20fdadc238eaff58edb288 Mon Sep 17 00:00:00 2001 From: Jacob Lamb Date: Sun, 11 Feb 2024 10:54:16 -0800 Subject: [PATCH 09/72] Update getting_started.md --- src/content/docs/book/getting_started.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/content/docs/book/getting_started.md b/src/content/docs/book/getting_started.md index b9b92f0b1a5..9845c665aa7 100644 --- a/src/content/docs/book/getting_started.md +++ b/src/content/docs/book/getting_started.md @@ -1,9 +1,7 @@ --- -title: Community +title: Getting Started --- -# Getting Started - Let's get started! :elephant: First, to be able to use Nushell, we need to [install it](installation.md). From 3c0365ddf6c6067434988ac0226199b35e1c4afa Mon Sep 17 00:00:00 2001 From: Jacob Lamb Date: Sun, 11 Feb 2024 10:54:20 -0800 Subject: [PATCH 10/72] Update astro.config.mjs --- astro.config.mjs | 186 +++++++++++++++++++++++++---------------------- 1 file changed, 100 insertions(+), 86 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index e9bffb83399..776681d0a14 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -38,105 +38,119 @@ export default defineConfig({ }, sidebar: [ { - label: "Start Here", + label: "Book", items: [ - // Each item here is one entry in the navigation menu. - { label: "Introduction", link: "/introduction/" }, - { label: "Installation", link: "/book/installation/" }, - { label: "Default Shell", link: "/book/default_shell/" }, - { label: "Quick Tour", link: "/book/quick_tour/" }, - { label: "Moving Around", link: "/book/moving_around/" }, - { label: "Thinking in Nu", link: "/book/thinking_in_nu/" }, - { label: "Cheat Sheet", link: "/book/cheat_sheet/" }, - ], - }, - { - label: "Nu Fundamentals", - items: [ - { label: "Data Types", link: "/book/types_of_data/" }, - { label: "Loading Data", link: "/book/loading_data" }, - { label: "Pipelines", link: "/book/pipelines/" }, - { label: "Strings", link: "/book/working_with_strings/" }, - { label: "Lists", link: "/book/working_with_lists/" }, - { label: "Tables", link: "/book/working_with_tables/" }, - ], - }, - { - label: "Programming in Nu", - items: [ - { label: "Custom commands", link: "/book/custom_commands/" }, - { label: "Aliases", link: "/book/aliases/" }, - { label: "Operators", link: "/book/operators/" }, { - label: "Variables and Subexpressions", - link: "/book/variables_and_subexpressions/", + label: "Start Here", + items: [ + { label: "Introduction", link: "/introduction/" }, + { label: "Getting Started", link: "/book/getting_started/" }, + { label: "Installation", link: "/book/installation/" }, + { label: "Default Shell", link: "/book/default_shell/" }, + { label: "Quick Tour", link: "/book/quick_tour/" }, + { label: "Moving Around", link: "/book/moving_around/" }, + { label: "Thinking in Nu", link: "/book/thinking_in_nu/" }, + { label: "Cheat Sheet", link: "/book/cheat_sheet/" }, + ], }, - { label: "Control Flow", link: "/book/control_flow/" }, - { label: "Scripts", link: "/book/scripts/" }, - { label: "Modules", link: "/book/modules/" }, - { label: "Overlays", link: "/book/overlays/" }, - { label: "Command signature", link: "/book/command_signature/" }, - { label: "Testing", link: "/book/testing/" }, - { label: "Best Practices", link: "/book/best_practices/" }, - ], - }, - { - label: "Nu Shell", - items: [ - { label: "Configuration", link: "/book/configuration/" }, - { label: "Environment", link: "/book/environment/" }, { - label: "Stout, Stderr, and Exit Codes", - link: "/book/stdout_stderr_exit_codes/", + label: "Nu Fundamentals", + items: [ + { label: "Data Types", link: "/book/types_of_data/" }, + { label: "Loading Data", link: "/book/loading_data" }, + { label: "Pipelines", link: "/book/pipelines/" }, + { label: "Strings", link: "/book/working_with_strings/" }, + { label: "Lists", link: "/book/working_with_lists/" }, + { label: "Tables", link: "/book/working_with_tables/" }, + ], }, - { label: "Escaping to the system", link: "/book/escaping/" }, - { label: "3rd party prompts", link: "/book/3rdpartyprompts/" }, - { label: "Shells in shells", link: "/book/shells_in_shells/" }, { - label: "Reedline (Nu's line editor)", - link: "/book/line_editor/", + label: "Programming in Nu", + items: [ + { label: "Custom commands", link: "/book/custom_commands/" }, + { label: "Aliases", link: "/book/aliases/" }, + { label: "Operators", link: "/book/operators/" }, + { + label: "Variables and Subexpressions", + link: "/book/variables_and_subexpressions/", + }, + { label: "Control Flow", link: "/book/control_flow/" }, + { label: "Scripts", link: "/book/scripts/" }, + { label: "Modules", link: "/book/modules/" }, + { label: "Overlays", link: "/book/overlays/" }, + { + label: "Command signature", + link: "/book/command_signature/", + }, + { label: "Testing", link: "/book/testing/" }, + { label: "Best Practices", link: "/book/best_practices/" }, + ], }, - { label: "Externs", link: "/book/externs/" }, - { label: "Custom completions", link: "/book/custom_completions/" }, { - label: "Coloring and Theming", - link: "/book/coloring_and_theming/", + label: "Nu Shell", + items: [ + { label: "Configuration", link: "/book/configuration/" }, + { label: "Environment", link: "/book/environment/" }, + { + label: "Stout, Stderr, and Exit Codes", + link: "/book/stdout_stderr_exit_codes/", + }, + { label: "Escaping to the system", link: "/book/escaping/" }, + { label: "3rd party prompts", link: "/book/3rdpartyprompts/" }, + { label: "Shells in shells", link: "/book/shells_in_shells/" }, + { + label: "Reedline (Nu's line editor)", + link: "/book/line_editor/", + }, + { label: "Externs", link: "/book/externs/" }, + { + label: "Custom completions", + link: "/book/custom_completions/", + }, + { + label: "Coloring and Theming", + link: "/book/coloring_and_theming/", + }, + { label: "Hooks", link: "/book/hooks/" }, + { label: "Background Tasks", link: "/book/background_task/" }, + ], }, - { label: "Hooks", link: "/book/hooks/" }, - { label: "Background Tasks", link: "/book/background_task/" }, - ], - }, - { - label: "Coming to Nu from...", - items: [ - { label: "Coming from Bash", link: "/book/coming_from_bash/" }, - { label: "Coming from CMD.EXE", link: "/book/coming_from_cmd/" }, - { label: "Nu Map", link: "/book/nushell_map/" }, - { label: "Nu Map", link: "/book/nushell_map_imperative/" }, - { label: "Nu Map", link: "/book/nushell_map_functional/" }, - { label: "Nu Map", link: "/book/nushell_operator_map/" }, - ], - }, - { - label: "(Not so) Advanced", - items: [ { - label: "Standard Library", - link: "/book/standard_library/", - badge: { text: "Preview", variant: "caution" }, + label: "Coming to Nu from...", + items: [ + { label: "Coming from Bash", link: "/book/coming_from_bash/" }, + { + label: "Coming from CMD.EXE", + link: "/book/coming_from_cmd/", + }, + { label: "Nu Map", link: "/book/nushell_map/" }, + { label: "Nu Map", link: "/book/nushell_map_imperative/" }, + { label: "Nu Map", link: "/book/nushell_map_functional/" }, + { label: "Nu Map", link: "/book/nushell_operator_map/" }, + ], + }, + { + label: "(Not so) Advanced", + items: [ + { + label: "Standard Library", + link: "/book/standard_library/", + badge: { text: "Preview", variant: "caution" }, + }, + { label: "Dataframes", link: "/book/dataframes/" }, + { label: "Metadata", link: "/book/metadata/" }, + { label: "Errors", link: "/book/creating_errors/" }, + { label: "Parallelism", link: "/book/parallelism/" }, + { label: "Plugins", link: "/book/plugins/" }, + { label: "Explore", link: "/book/explore/" }, + ], + }, + { + label: "Reference", + autogenerate: { directory: "reference" }, }, - { label: "Dataframes", link: "/book/dataframes/" }, - { label: "Metadata", link: "/book/metadata/" }, - { label: "Errors", link: "/book/creating_errors/" }, - { label: "Parallelism", link: "/book/parallelism/" }, - { label: "Plugins", link: "/book/plugins/" }, - { label: "Explore", link: "/book/explore/" }, ], }, - { - label: "Reference", - autogenerate: { directory: "reference" }, - }, ], }), ], From 36a85aeaec4fe73e383ee8435a0e12a86bd336e1 Mon Sep 17 00:00:00 2001 From: Jacob Lamb Date: Sun, 11 Feb 2024 11:19:19 -0800 Subject: [PATCH 11/72] Add command reference --- src/content/docs/commands.mdx | 52 +++++++++++++++++++++++++++++ src/content/docs/commands/README.md | 41 ----------------------- 2 files changed, 52 insertions(+), 41 deletions(-) create mode 100644 src/content/docs/commands.mdx delete mode 100644 src/content/docs/commands/README.md diff --git a/src/content/docs/commands.mdx b/src/content/docs/commands.mdx new file mode 100644 index 00000000000..f6fff58d458 --- /dev/null +++ b/src/content/docs/commands.mdx @@ -0,0 +1,52 @@ +--- +title: Command Reference +author: Jonathan Turner +author_site: https://twitter.com/jntrnr +author_image: https://www.nushell.sh/blog/images/jonathandturner.jpg +excerpt: Today, we're introducing a new shell, written in Rust. It draws inspiration from the classic Unix philosophy of pipelines, the structured data approach of PowerShell, functional programming, systems programming, and more. +--- + +If you're new to Nushell, [the quick tour](/book/quick_tour.md) can show you the most important commands. You don't need to know them all! + +To see all commands from inside Nushell, run [`help commands`](/commands/docs/help.md). + +import fs from 'fs'; +import path from 'path'; + +export default function PostList() { + const postsDirectory = path.join(process.cwd(), 'src/content/docs/commands/docs/'); + const filenames = fs.readdirSync(postsDirectory); + + return ( +
+ If you're new to Nushell, [the quick tour](/book/quick_tour.md) can show you the most important commands. You don't need to know them all! + + To see all commands from inside Nushell, run [`help commands`](/commands/docs/help.md). + + + + + + + + + + {filenames.map((filename) => { + const slug = filename.replace('.mdx', ''); + + return ( + + + + + ); + })} + +
TitleLink
{slug} + + Go to Post + +
+
+ ); +} diff --git a/src/content/docs/commands/README.md b/src/content/docs/commands/README.md deleted file mode 100644 index 3ffea97f5b5..00000000000 --- a/src/content/docs/commands/README.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: Introducing nushell -author: Jonathan Turner -author_site: https://twitter.com/jntrnr -author_image: https://www.nushell.sh/blog/images/jonathandturner.jpg -excerpt: Today, we're introducing a new shell, written in Rust. It draws inspiration from the classic Unix philosophy of pipelines, the structured data approach of PowerShell, functional programming, systems programming, and more. ---- - -# Command Reference - -If you're new to Nushell, [the quick tour](/book/quick_tour.md) can show you the most important commands. You don't need to know them all! - -To see all commands from inside Nushell, run [`help commands`](/commands/docs/help.md). - - - - - - - - - - - - - - - - -
CommandCategoriesDescriptionFeature
{{ command.title }}{{ command.frontmatter.categories }}{{ command.frontmatter.usage }}{{ command.frontmatter.feature }}
From ee716bb6e955a56b8ea6bbe2134d80218b9cd733 Mon Sep 17 00:00:00 2001 From: Jacob Lamb Date: Sun, 11 Feb 2024 11:34:57 -0800 Subject: [PATCH 12/72] Get commands --- src/components/GetCommands.astro | 19 +++++++++++++++ src/content/docs/commands.mdx | 41 ++------------------------------ 2 files changed, 21 insertions(+), 39 deletions(-) create mode 100644 src/components/GetCommands.astro diff --git a/src/components/GetCommands.astro b/src/components/GetCommands.astro new file mode 100644 index 00000000000..ac0dde05126 --- /dev/null +++ b/src/components/GetCommands.astro @@ -0,0 +1,19 @@ +--- +const posts = await Astro.glob('../content/docs/commands/docs/*.md'); // returns an array of posts that live at ./src/pages/post/*.md +--- + + + + + + + +{posts.map((post) => ( + + + + + + +))} +
CommandCategoriesDescriptionFeature
{post.frontmatter.title}{post.frontmatter.categories}{post.frontmatter.usage}{post.frontmatter.feature}
diff --git a/src/content/docs/commands.mdx b/src/content/docs/commands.mdx index f6fff58d458..c9d30d2edf3 100644 --- a/src/content/docs/commands.mdx +++ b/src/content/docs/commands.mdx @@ -10,43 +10,6 @@ If you're new to Nushell, [the quick tour](/book/quick_tour.md) can show you the To see all commands from inside Nushell, run [`help commands`](/commands/docs/help.md). -import fs from 'fs'; -import path from 'path'; +import GetCommands from '../../components/GetCommands.astro'; -export default function PostList() { - const postsDirectory = path.join(process.cwd(), 'src/content/docs/commands/docs/'); - const filenames = fs.readdirSync(postsDirectory); - - return ( -
- If you're new to Nushell, [the quick tour](/book/quick_tour.md) can show you the most important commands. You don't need to know them all! - - To see all commands from inside Nushell, run [`help commands`](/commands/docs/help.md). - - - - - - - - - - {filenames.map((filename) => { - const slug = filename.replace('.mdx', ''); - - return ( - - - - - ); - })} - -
TitleLink
{slug} - - Go to Post - -
-
- ); -} + From daf2cf263446018b46cae6c051dda4a37d3a4d6c Mon Sep 17 00:00:00 2001 From: Jacob Lamb Date: Sun, 11 Feb 2024 11:40:46 -0800 Subject: [PATCH 13/72] Format --- src/components/GetCommands.astro | 23 ++++++++++++++--------- src/content/docs/commands.mdx | 4 ++-- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/components/GetCommands.astro b/src/components/GetCommands.astro index ac0dde05126..b9383c7a1a9 100644 --- a/src/components/GetCommands.astro +++ b/src/components/GetCommands.astro @@ -1,6 +1,7 @@ --- -const posts = await Astro.glob('../content/docs/commands/docs/*.md'); // returns an array of posts that live at ./src/pages/post/*.md +const posts = await Astro.glob("../content/docs/commands/docs/*.md"); // returns an array of posts that live at ./src/pages/post/*.md --- + @@ -8,12 +9,16 @@ const posts = await Astro.glob('../content/docs/commands/docs/*.md'); // returns -{posts.map((post) => ( - - - - - - -))} + { + posts.map((post) => ( + + + + + + + )) + }
CommandDescription Feature
{post.frontmatter.title}{post.frontmatter.categories}{post.frontmatter.usage}{post.frontmatter.feature}
+ {post.frontmatter.title} + {post.frontmatter.categories}{post.frontmatter.usage}{post.frontmatter.feature}
diff --git a/src/content/docs/commands.mdx b/src/content/docs/commands.mdx index c9d30d2edf3..0b3c75447b6 100644 --- a/src/content/docs/commands.mdx +++ b/src/content/docs/commands.mdx @@ -10,6 +10,6 @@ If you're new to Nushell, [the quick tour](/book/quick_tour.md) can show you the To see all commands from inside Nushell, run [`help commands`](/commands/docs/help.md). -import GetCommands from '../../components/GetCommands.astro'; +import GetCommands from "../../components/GetCommands.astro"; - + From b60c7ba627d951eb1a9de6b116cb1c31d3f2e459 Mon Sep 17 00:00:00 2001 From: Jacob Lamb Date: Mon, 12 Feb 2024 13:01:57 -0800 Subject: [PATCH 14/72] Fix links --- README.md | 4 +- astro.config.mjs | 22 +- biome.json | 8 +- .../blog/2019-08-23-introducing-nushell.md | 4 +- .../docs/blog/2019-11-26-nushell-0_6_0.md | 2 +- .../docs/blog/2019-12-18-nushell-0_7_0.md | 2 +- .../blog/2019-12-31-happy-nu-year-2020.md | 6 +- .../docs/blog/2020-04-21-nushell_0_13_0.md | 2 +- .../docs/blog/2020-08-23-year_of_nushell.md | 2 +- .../docs/blog/2020-09-01-nushell_0_19.md | 2 +- .../docs/blog/2021-02-16-nushell_0_27.md | 12 +- .../docs/blog/2021-07-13-nushell_0_34.md | 2 +- .../blog/2021-08-23-two-years-of-nushell.md | 4 +- .../docs/blog/2022-03-01-nushell_0_59.md | 2 +- .../docs/blog/2022-03-22-nushell_0_60.md | 2 +- .../docs/blog/2022-09-06-nushell-0_68.md | 4 +- .../docs/blog/2022-11-29-nushell-0.72.md | 4 +- .../docs/blog/2023-01-10-nushell_0_74.md | 2 +- .../docs/blog/2023-01-31-nushell_0_75.md | 2 +- .../docs/blog/2023-04-25-nushell_0_79.md | 4 +- .../docs/blog/2023-05-16-nushell_0_80.md | 2 +- .../docs/blog/2023-06-27-road-to-1_0.md | 12 +- .../docs/blog/2023-07-30-nushell_0_83_1.md | 4 +- .../2023-08-23-happy-birthday-nushell-4.md | 2 +- .../docs/blog/2023-09-19-nushell_0_85_0.md | 2 +- .../docs/blog/2023-10-17-nushell_0_86.md | 2 +- .../docs/blog/2023-11-14-nushell_0_87_0.md | 6 +- .../docs/blog/2023-12-12-nushell_0_88_0.md | 6 +- .../docs/blog/2024-01-09-nushell_0_89_0.md | 6 +- .../docs/blog/2024-02-06-nushell_0_90_0.md | 4 +- src/content/docs/book/advanced.md | 14 +- src/content/docs/book/aliases.md | 2 +- src/content/docs/book/background_task.md | 2 +- src/content/docs/book/coloring_and_theming.md | 6 +- src/content/docs/book/coming_from_bash.md | 2 +- src/content/docs/book/coming_from_cmd.md | 2 +- src/content/docs/book/coming_to_nu.md | 12 +- src/content/docs/book/command_signature.md | 8 +- src/content/docs/book/configuration.md | 18 +- src/content/docs/book/control_flow.md | 78 +++--- src/content/docs/book/creating_errors.md | 6 +- src/content/docs/book/custom_commands.md | 14 +- src/content/docs/book/custom_completions.md | 12 +- src/content/docs/book/dataframes.md | 32 +-- src/content/docs/book/design_notes.md | 2 +- src/content/docs/book/environment.md | 32 +-- src/content/docs/book/escaping.md | 4 +- src/content/docs/book/explore.md | 4 +- src/content/docs/book/externs.md | 2 +- src/content/docs/book/getting_started.md | 6 +- src/content/docs/book/hooks.md | 8 +- .../docs/book/how_nushell_code_gets_run.md | 24 +- src/content/docs/book/installation.mdx | 2 +- src/content/docs/book/introduction.md | 229 ++++++++++++++---- src/content/docs/book/line_editor.md | 8 +- src/content/docs/book/loading_data.md | 34 +-- src/content/docs/book/metadata.md | 4 +- src/content/docs/book/modules.md | 14 +- src/content/docs/book/moving_around.mdx | 24 +- src/content/docs/book/nu_as_a_shell.md | 20 +- src/content/docs/book/nu_fundamentals.md | 10 +- src/content/docs/book/operators.md | 6 +- src/content/docs/book/overlays.md | 20 +- src/content/docs/book/parallelism.md | 12 +- src/content/docs/book/pipelines.md | 20 +- src/content/docs/book/plugins.mdx | 6 +- src/content/docs/book/programming_in_nu.md | 18 +- src/content/docs/book/quick_tour.md | 42 ++-- src/content/docs/book/scripts.md | 6 +- src/content/docs/book/shells_in_shells.md | 10 +- .../docs/book/stdout_stderr_exit_codes.md | 18 +- src/content/docs/book/testing.md | 4 +- src/content/docs/book/thinking_in_nu.mdx | 16 +- src/content/docs/book/types_of_data.md | 32 +-- .../docs/book/variables_and_subexpressions.md | 10 +- src/content/docs/book/working_with_lists.md | 32 +-- src/content/docs/book/working_with_strings.md | 30 +-- src/content/docs/book/working_with_tables.md | 40 +-- src/content/docs/commands.mdx | 4 +- src/content/docs/commands/docs/ansi.md | 6 +- src/content/docs/commands/docs/bits.md | 16 +- src/content/docs/commands/docs/bytes.md | 22 +- src/content/docs/commands/docs/config.md | 6 +- src/content/docs/commands/docs/date.md | 14 +- src/content/docs/commands/docs/debug.md | 2 +- src/content/docs/commands/docs/decode.md | 4 +- src/content/docs/commands/docs/dfr.md | 216 ++++++++--------- src/content/docs/commands/docs/drop.md | 4 +- src/content/docs/commands/docs/each.md | 2 +- src/content/docs/commands/docs/encode.md | 4 +- src/content/docs/commands/docs/export.md | 12 +- src/content/docs/commands/docs/format.md | 8 +- src/content/docs/commands/docs/from.md | 32 +-- src/content/docs/commands/docs/from_eml.md | 2 +- src/content/docs/commands/docs/from_ics.md | 2 +- src/content/docs/commands/docs/from_ini.md | 2 +- src/content/docs/commands/docs/from_vcf.md | 2 +- src/content/docs/commands/docs/hash.md | 4 +- src/content/docs/commands/docs/help.md | 12 +- src/content/docs/commands/docs/history.md | 2 +- src/content/docs/commands/docs/http.md | 14 +- src/content/docs/commands/docs/input.md | 4 +- src/content/docs/commands/docs/into.md | 26 +- src/content/docs/commands/docs/keybindings.md | 6 +- src/content/docs/commands/docs/math.md | 58 ++--- src/content/docs/commands/docs/overlay.md | 8 +- src/content/docs/commands/docs/path.md | 18 +- src/content/docs/commands/docs/query.md | 8 +- src/content/docs/commands/docs/random.md | 12 +- src/content/docs/commands/docs/roll.md | 8 +- src/content/docs/commands/docs/scope.md | 12 +- src/content/docs/commands/docs/seq.md | 4 +- src/content/docs/commands/docs/skip.md | 4 +- src/content/docs/commands/docs/split.md | 10 +- src/content/docs/commands/docs/stor.md | 16 +- src/content/docs/commands/docs/str.md | 46 ++-- src/content/docs/commands/docs/take.md | 4 +- src/content/docs/commands/docs/to.md | 20 +- src/content/docs/commands/docs/update.md | 2 +- src/content/docs/commands/docs/url.md | 10 +- src/content/docs/commands/docs/view.md | 6 +- src/content/docs/contributor-book/commands.md | 4 +- src/content/docs/cookbook/jq_v_nushell.md | 14 +- src/content/docs/cookbook/pattern_matching.md | 4 +- src/content/docs/cookbook/setup.md | 6 +- src/content/docs/cookbook/tables.md | 6 +- src/content/docs/index.mdx | 2 +- src/content/docs/introduction.md | 16 +- 128 files changed, 987 insertions(+), 834 deletions(-) diff --git a/README.md b/README.md index 19b9e1e467d..4af41779ca9 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ features: ### Nu works with existing data -Nu speaks [JSON, YAML, SQLite, Excel, and more](/book/loading_data.html) out of the box. It's easy to bring data into a Nu pipeline whether it's in a file, a database, or a web API: +Nu speaks [JSON, YAML, SQLite, Excel, and more](/book/loading_data) out of the box. It's easy to bring data into a Nu pipeline whether it's in a file, a database, or a web API: Screenshot showing fetch with a web API @@ -30,7 +30,7 @@ Nu operates on typed data, so it catches bugs that other shells don't. And when ## Get Nu -Nushell is available as [downloadable binaries](https://github.com/nushell/nushell/releases), [via your favourite package manager](https://repology.org/project/nushell/versions), in [a GitHub Action](https://github.com/marketplace/actions/setup-nu), and as [source code](https://github.com/nushell/nushell). Read [the detailed installation instructions](/book/installation.html) or dive right in: +Nushell is available as [downloadable binaries](https://github.com/nushell/nushell/releases), [via your favourite package manager](https://repology.org/project/nushell/versions), in [a GitHub Action](https://github.com/marketplace/actions/setup-nu), and as [source code](https://github.com/nushell/nushell). Read [the detailed installation instructions](/book/installation) or dive right in: #### macOS / Linux: diff --git a/astro.config.mjs b/astro.config.mjs index 776681d0a14..5e38374e400 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -145,10 +145,24 @@ export default defineConfig({ { label: "Explore", link: "/book/explore/" }, ], }, - { - label: "Reference", - autogenerate: { directory: "reference" }, - }, + ], + }, + { + label: "Command Reference", + link: "/commands/", + }, + { + label: "Cookbook", + items: [ + { label: "Introduction", link: "/introduction/" }, + { label: "Getting Started", link: "/book/getting_started/" }, + ], + }, + { + label: "Blog", + items: [ + { label: "Introduction", link: "/introduction/" }, + { label: "Getting Started", link: "/book/getting_started/" }, ], }, ], diff --git a/biome.json b/biome.json index 6a32ec27c30..a61694f408a 100644 --- a/biome.json +++ b/biome.json @@ -15,6 +15,12 @@ }, "files": { "ignoreUnknown": true, - "ignore": ["dist/", ".vercel/", ".astro/", "./public/*json"] + "ignore": [ + "dist/", + ".vercel/", + ".astro/", + "./public/*json", + "./src/content/docs/book/coming_from_bash.md" + ] } } diff --git a/src/content/docs/blog/2019-08-23-introducing-nushell.md b/src/content/docs/blog/2019-08-23-introducing-nushell.md index c9741169e00..1ccc2cb34b9 100644 --- a/src/content/docs/blog/2019-08-23-introducing-nushell.md +++ b/src/content/docs/blog/2019-08-23-introducing-nushell.md @@ -224,7 +224,7 @@ Being able to view data is helpful, and this kind of polish extends to other asp ![simple error](../assets/images/nu_error2.png) -Nu takes heavy inspiration from the [error messages in Rust](https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html). As much as possible, draw your eyes to the problem. +Nu takes heavy inspiration from the [error messages in Rust](https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come). As much as possible, draw your eyes to the problem. Combined with the pipeline, some pretty interesting errors are possible: @@ -312,7 +312,7 @@ That's right, we're in the file. Can we `cd`? Oh yes, we can: # Plugins -Nu can't come with everything you might want to do with it, so we're releasing Nu with the ability to extend it with plugins. There's more information in the [plugins chapters](https://www.nushell.sh/book/plugins.html). Nu will look for these plugins in your path, and load them up on startup. +Nu can't come with everything you might want to do with it, so we're releasing Nu with the ability to extend it with plugins. There's more information in the [plugins chapters](https://www.nushell.sh/book/plugins). Nu will look for these plugins in your path, and load them up on startup. # All because of Rust diff --git a/src/content/docs/blog/2019-11-26-nushell-0_6_0.md b/src/content/docs/blog/2019-11-26-nushell-0_6_0.md index 710b6743931..d3249c3a79c 100644 --- a/src/content/docs/blog/2019-11-26-nushell-0_6_0.md +++ b/src/content/docs/blog/2019-11-26-nushell-0_6_0.md @@ -229,7 +229,7 @@ There has been a ton of work behind the scenes on Nu itself. We now have a much- # Survey results -We recently ran a survey to ask Nu users/non-users what they thought of Nu. If you're interested, definitely check out the [results of the survey](https://www.nushell.sh/blog/2019-11-23-nushell-survey-results.html) +We recently ran a survey to ask Nu users/non-users what they thought of Nu. If you're interested, definitely check out the [results of the survey](https://www.nushell.sh/blog/2019-11-23-nushell-survey-results) # Looking ahead diff --git a/src/content/docs/blog/2019-12-18-nushell-0_7_0.md b/src/content/docs/blog/2019-12-18-nushell-0_7_0.md index db074694e3f..fe958633b78 100644 --- a/src/content/docs/blog/2019-12-18-nushell-0_7_0.md +++ b/src/content/docs/blog/2019-12-18-nushell-0_7_0.md @@ -147,7 +147,7 @@ Of course, with each release, there are the usual bugfixes. We've improved tilde # Improved docs (tchak, coolshaurya, sebastian-xyz) -A big "thank you!" for folks continuing to work on the on-going command documentation efforts. Already, we're seeing people [read about the commands](/book/command_reference.html) on the new website to help them learn Nu, which is great! +A big "thank you!" for folks continuing to work on the on-going command documentation efforts. Already, we're seeing people [read about the commands](/book/command_reference) on the new website to help them learn Nu, which is great! # What's next? diff --git a/src/content/docs/blog/2019-12-31-happy-nu-year-2020.md b/src/content/docs/blog/2019-12-31-happy-nu-year-2020.md index fd5b32b004b..315a9f0275c 100644 --- a/src/content/docs/blog/2019-12-31-happy-nu-year-2020.md +++ b/src/content/docs/blog/2019-12-31-happy-nu-year-2020.md @@ -12,7 +12,7 @@ excerpt: 2019 was quite the year for Nushell. We landed the initial commit on Ma 2019 was quite the year for Nushell. We landed the initial commit on May 10th, and 1881 commits later we find ourselves at the end of 2019. What all happened this year? -We started off with quite the bang! After quietly working on Nu for a few months, we wrote up a [blog post](https://www.nushell.sh/blog/2019-08-23-introducing-nushell.html) to explain what Nu was. To our surprise, the post got a surprisingly warm reception! Soon, we were recording a podcast with the Changelog to [talk about Nu](https://changelog.com/podcast/363). +We started off with quite the bang! After quietly working on Nu for a few months, we wrote up a [blog post](https://www.nushell.sh/blog/2019-08-23-introducing-nushell) to explain what Nu was. To our surprise, the post got a surprisingly warm reception! Soon, we were recording a podcast with the Changelog to [talk about Nu](https://changelog.com/podcast/363). As the excitement calmed back to everyday levels, we got to the work of turning this minimum-viable product into the real thing. More than 65 people joined us to help fix bugs, test code, write docs, and explore new directions. @@ -20,8 +20,8 @@ As the excitement calmed back to everyday levels, we got to the work of turning At the end of 2019, where are we? -- We now have a [website](https://nushell.sh), a [blog](https://www.nushell.sh/blog), [three](https://www.nushell.sh/book/) [different](https://www.nushell.sh/contributor-book/) [books](https://www.nushell.sh/cookbook/), and the results of our [first survey](https://www.nushell.sh/blog/2019-11-23-nushell-survey-results.html) -- We released 6 different releases: [0.2](https://www.nushell.sh/blog/2019-08-23-introducing-nushell.html), [0.3](https://www.nushell.sh/blog/2019-09-24-nushell_0_3_0.html), [0.4](https://www.nushell.sh/blog/2019-10-15-nushell-0_4_0.html), [0.5](https://www.nushell.sh/blog/2019-11-05-nushell-0_5_0.html), [0.6](https://www.nushell.sh/blog/2019-11-26-nushell-0_6_0.html), and [0.7](https://www.nushell.sh/blog/2019-12-18-nushell-0_7_0.html). +- We now have a [website](https://nushell.sh), a [blog](https://www.nushell.sh/blog), [three](https://www.nushell.sh/book/) [different](https://www.nushell.sh/contributor-book/) [books](https://www.nushell.sh/cookbook/), and the results of our [first survey](https://www.nushell.sh/blog/2019-11-23-nushell-survey-results) +- We released 6 different releases: [0.2](https://www.nushell.sh/blog/2019-08-23-introducing-nushell), [0.3](https://www.nushell.sh/blog/2019-09-24-nushell_0_3_0), [0.4](https://www.nushell.sh/blog/2019-10-15-nushell-0_4_0), [0.5](https://www.nushell.sh/blog/2019-11-05-nushell-0_5_0), [0.6](https://www.nushell.sh/blog/2019-11-26-nushell-0_6_0), and [0.7](https://www.nushell.sh/blog/2019-12-18-nushell-0_7_0). - Nu gained features. Lots of them. New table designs, new file formats, lots of new commands, improvements to error reporting, plugins (in [C++](https://github.com/lefticus/nu_plugin_calc), [Go](https://vsoch.github.io/2019/nushell-plugin-golang/), [Python](https://github.com/vsoch/nushell-plugin-python), and [Ruby](https://github.com/andrasio/nu-plugin/tree/master/examples)), new colors, support for streaming tables, vi mode, moved to the stable Rust compiler, login shell support, recycle bin support, starship.rs support, fuzzy matching, duration and date comparison, ranges, improved autocomplete, and a bunch of internal improvements to make way for 2020. - Thanks to all the reports, PRs, and help debugging we've made a ton of progress in making Nu more stable and complete diff --git a/src/content/docs/blog/2020-04-21-nushell_0_13_0.md b/src/content/docs/blog/2020-04-21-nushell_0_13_0.md index 7596be31d61..bf95eb80ad0 100644 --- a/src/content/docs/blog/2020-04-21-nushell_0_13_0.md +++ b/src/content/docs/blog/2020-04-21-nushell_0_13_0.md @@ -42,7 +42,7 @@ With aliases, it's helpful to be able to start up Nu with your favorite aliases > config --set [startup ["alias myecho [msg] { echo $msg }"]] ``` -You can read more about setting `config` variables in [the book](https://www.nushell.sh/book/configuration.html) +You can read more about setting `config` variables in [the book](https://www.nushell.sh/book/configuration) ## Multi-dot paths (quebin31) diff --git a/src/content/docs/blog/2020-08-23-year_of_nushell.md b/src/content/docs/blog/2020-08-23-year_of_nushell.md index 156b0d3621a..696eef73476 100644 --- a/src/content/docs/blog/2020-08-23-year_of_nushell.md +++ b/src/content/docs/blog/2020-08-23-year_of_nushell.md @@ -106,7 +106,7 @@ Something we attached to early on was the idea that Nu should be fun. It should Nu is really about play. You play with your data, you play with the structures that make up your files and filesystem, you play with what web services give back to you. Everything about Nu is made to invite you to explore how things work and how data is put together. As you play, you learn more about Nu works and how to better use it. We firmly believe that learning doesn't have to hurt. At its best, the pleasure of exploration over time yields expertise without punishing you along the way. Humans just get better at something when we love to pick it up day after day, experimenting as we go. With Nu, we can ask questions like "what if I do this?" because the system is built to let us ask the question and answer it ourselves. -Nu takes this one step further. The error reporting system comes from the design of [Rust's error messages](https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html), with clear messages to help guide you to success. +Nu takes this one step further. The error reporting system comes from the design of [Rust's error messages](https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come), with clear messages to help guide you to success. The goal for Nu is that it won't require you to be a wiz with the commandline or with complex programming practices. Instead, you start where you feel comfortable, and grow a line at a time. With Nu, as your comfort grows, single lines easily grow to multiple lines, and (eventually) to larger programs. You don't need separate styles of thinking when experimenting and another for building your application. In Nu, these are (or will be) one and the same. diff --git a/src/content/docs/blog/2020-09-01-nushell_0_19.md b/src/content/docs/blog/2020-09-01-nushell_0_19.md index 84a53c1cb79..66f19cf835e 100644 --- a/src/content/docs/blog/2020-09-01-nushell_0_19.md +++ b/src/content/docs/blog/2020-09-01-nushell_0_19.md @@ -82,7 +82,7 @@ You might have noticed we now also allow commas to separate cells. These are int ## Nushell celebrates its first year in the public -We recently sat down and wrote about [where Nushell has come over the last year](http://www.nushell.sh/blog/2020/08/23/year_of_nushell.html) and some thoughts about where it's going. The blog post is a wealth of information about Nu's philosophy and direction. Well worth a read. +We recently sat down and wrote about [where Nushell has come over the last year](http://www.nushell.sh/blog/2020/08/23/year_of_nushell) and some thoughts about where it's going. The blog post is a wealth of information about Nu's philosophy and direction. Well worth a read. ## Command improvements diff --git a/src/content/docs/blog/2021-02-16-nushell_0_27.md b/src/content/docs/blog/2021-02-16-nushell_0_27.md index 1ea177556a3..c004b810492 100644 --- a/src/content/docs/blog/2021-02-16-nushell_0_27.md +++ b/src/content/docs/blog/2021-02-16-nushell_0_27.md @@ -28,12 +28,12 @@ As part of this release, we also publish a set of plugins you can install and us The Nushell book received some much-needed updates. You'll notice new chapters and updated chapters to bring it more up-to-date with recent Nushell. -- [Thoroughly updated configuration section](https://www.nushell.sh/book/configuration.html) -- [Updated section on data types](https://www.nushell.sh/book/types_of_data.html) -- [A new section on creating your own commands](https://www.nushell.sh/book/custom_commands.html) -- [An updated section on aliases](https://www.nushell.sh/book/aliases.html) -- [A new section on working with variables and expressions](https://www.nushell.sh/book/variables_and_subexpressions.html) -- [The start of a new section on writing your own Nushell scripts](https://www.nushell.sh/book/scripts.html) +- [Thoroughly updated configuration section](https://www.nushell.sh/book/configuration) +- [Updated section on data types](https://www.nushell.sh/book/types_of_data) +- [A new section on creating your own commands](https://www.nushell.sh/book/custom_commands) +- [An updated section on aliases](https://www.nushell.sh/book/aliases) +- [A new section on working with variables and expressions](https://www.nushell.sh/book/variables_and_subexpressions) +- [The start of a new section on writing your own Nushell scripts](https://www.nushell.sh/book/scripts) # Improvements diff --git a/src/content/docs/blog/2021-07-13-nushell_0_34.md b/src/content/docs/blog/2021-07-13-nushell_0_34.md index 6a7a7858a2a..6bb49b1a000 100644 --- a/src/content/docs/blog/2021-07-13-nushell_0_34.md +++ b/src/content/docs/blog/2021-07-13-nushell_0_34.md @@ -97,7 +97,7 @@ print(res) While these results are still early, we're excited to see what can be possible using Nushell for processing large datasets. -You can learn more about dataframes, including many examples and a much more in-depth explanation, by reading the new [dataframes chapter of the Nushell book](https://www.nushell.sh/book/dataframes.html). +You can learn more about dataframes, including many examples and a much more in-depth explanation, by reading the new [dataframes chapter of the Nushell book](https://www.nushell.sh/book/dataframes). Note: while all the dataframe functionality is currently grouped behind the `dataframe` top-level command, we hope to extend support for dataframes to other common Nushell commands. diff --git a/src/content/docs/blog/2021-08-23-two-years-of-nushell.md b/src/content/docs/blog/2021-08-23-two-years-of-nushell.md index 1c1f9bc5569..d07c207ce14 100644 --- a/src/content/docs/blog/2021-08-23-two-years-of-nushell.md +++ b/src/content/docs/blog/2021-08-23-two-years-of-nushell.md @@ -38,7 +38,7 @@ We've spent a lot of time this year steadily improving areas that make Nushell - ### Nushell, the data analysis tool -A relatively new aspect of being an interactive tool for working with data is Nushell's recent adoption of supporting dataframes. Dataframes allow users to work with large datasets in an efficient way. Recent versions of Nushell, using dataframes, are able to process and aggregate data from [5 million line csv files in less than a second](https://www.nushell.sh/blog/2021-07-13-nushell_0_34.html#dataframes-elferherrera). Did we mention dataframes are fast? +A relatively new aspect of being an interactive tool for working with data is Nushell's recent adoption of supporting dataframes. Dataframes allow users to work with large datasets in an efficient way. Recent versions of Nushell, using dataframes, are able to process and aggregate data from [5 million line csv files in less than a second](https://www.nushell.sh/blog/2021-07-13-nushell_0_34#dataframes-elferherrera). Did we mention dataframes are fast? We'll be exploring how best to more-fully integrate dataframes with the rest of the Nushell features in the coming year. @@ -46,7 +46,7 @@ We'll be exploring how best to more-fully integrate dataframes with the rest of ### Seeing what Nushell will become -With 0.32, we first [got a glimpse of what the Nushell language will become](https://www.nushell.sh/blog/2021-06-01-nushell_0_32.html#new-expression-syntax-jt). With 0.34, we saw [what data processing could be](https://www.nushell.sh/blog/2021-07-13-nushell_0_34.html#dataframes-elferherrera). These recent releases help to sketch where Nushell will feel like when it hits 1.0. +With 0.32, we first [got a glimpse of what the Nushell language will become](https://www.nushell.sh/blog/2021-06-01-nushell_0_32#new-expression-syntax-jt). With 0.34, we saw [what data processing could be](https://www.nushell.sh/blog/2021-07-13-nushell_0_34#dataframes-elferherrera). These recent releases help to sketch where Nushell will feel like when it hits 1.0. One example that shows this off is the script we use every week to create the This Week in Nu newsletter. As you can see, [it's a full script](https://github.com/nushell/nu_scripts/blob/main/make_release/this_week_in_nu_release.nu) of the sort you might write in Python or Ruby. diff --git a/src/content/docs/blog/2022-03-01-nushell_0_59.md b/src/content/docs/blog/2022-03-01-nushell_0_59.md index 0f484aab50f..269f2d22f81 100644 --- a/src/content/docs/blog/2022-03-01-nushell_0_59.md +++ b/src/content/docs/blog/2022-03-01-nushell_0_59.md @@ -30,7 +30,7 @@ We'll be talking about this more in the full release announcement, but we'd also We've made a bunch of improvements to the language, from the change to `if` to allow `else`, to modules and imports, operator short-circuiting, and much more. -We're working to bring the [book up to date](https://www.nushell.sh/book/), and it's a good place to find explanations of these improvements. Be sure to also look at the [updated command documentation](https://www.nushell.sh/book/command_reference.html) for more information on the updated commands. +We're working to bring the [book up to date](https://www.nushell.sh/book/), and it's a good place to find explanations of these improvements. Be sure to also look at the [updated command documentation](https://www.nushell.sh/book/command_reference) for more information on the updated commands. # New plugin architecture diff --git a/src/content/docs/blog/2022-03-22-nushell_0_60.md b/src/content/docs/blog/2022-03-22-nushell_0_60.md index 7507c492d35..46868dd79c6 100644 --- a/src/content/docs/blog/2022-03-22-nushell_0_60.md +++ b/src/content/docs/blog/2022-03-22-nushell_0_60.md @@ -494,7 +494,7 @@ To accompany the new functionality in the language, we've also added a number of You can now use `!!` to run the previous command, or `!` followed by the row number in the `history` you'd like to run again. -We're working to bring the [book up to date](https://www.nushell.sh/book/), and it's a good place to find explanations of these improvements. Be sure to also look at the [updated command documentation](https://www.nushell.sh/book/command_reference.html) for more information on the updated commands. +We're working to bring the [book up to date](https://www.nushell.sh/book/), and it's a good place to find explanations of these improvements. Be sure to also look at the [updated command documentation](https://www.nushell.sh/book/command_reference) for more information on the updated commands. ## Better multiline editing diff --git a/src/content/docs/blog/2022-09-06-nushell-0_68.md b/src/content/docs/blog/2022-09-06-nushell-0_68.md index c9ae5be8c75..76ad112055f 100644 --- a/src/content/docs/blog/2022-09-06-nushell-0_68.md +++ b/src/content/docs/blog/2022-09-06-nushell-0_68.md @@ -39,12 +39,12 @@ _**Note: Since the release we found out that `source-env` with a dynamic path is One of the most common pitfalls of Nushell was trying to `source` a dynamic path, such as `source ($env.PWD | path join foo.nu)`. Since Nushell is a "compiled" language where commands and aliases are analyzed while parsing ("compiling") the code, sourcing dynamic paths is not possible for the same reason you cannot dynamically set `#include` file names in C or `use` modules in Rust. -You can read a bit more about this in [our Thinking in Nu book chapter](https://www.nushell.sh/book/thinking_in_nu.html#think-of-nushell-as-a-compiled-language). +You can read a bit more about this in [our Thinking in Nu book chapter](https://www.nushell.sh/book/thinking_in_nu#think-of-nushell-as-a-compiled-language). To address this pitfall, we decided to change `source` to `source-env` which can be used to bring in the environment, but not custom commands, aliases and variables anymore. ~~A benefit of doing so is that it is now **possible to pass dynamic paths**: `source-env ($env.PWD | path join foo.nu)` would bring in the environment from the `foo.nu` file.~~ -_How do you bring in commands and aliases without `source`?_ You need to use a module and the `use` keyword. See our book chapter [about modules](https://www.nushell.sh/book/modules.html), it's quite simple. Alternatively, you can use [overlays](https://www.nushell.sh/book/overlays.html). +_How do you bring in commands and aliases without `source`?_ You need to use a module and the `use` keyword. See our book chapter [about modules](https://www.nushell.sh/book/modules), it's quite simple. Alternatively, you can use [overlays](https://www.nushell.sh/book/overlays). _How do you bring in variables without `source`?_ This is not possible anymore. A workaround is to define a command in your module that will return the value you want. diff --git a/src/content/docs/blog/2022-11-29-nushell-0.72.md b/src/content/docs/blog/2022-11-29-nushell-0.72.md index bbdbb0b2724..b7a8c776acd 100644 --- a/src/content/docs/blog/2022-11-29-nushell-0.72.md +++ b/src/content/docs/blog/2022-11-29-nushell-0.72.md @@ -166,7 +166,7 @@ This release contains many breaking changes to Nu's built-in commands (sorry!). Nu's dataframe support is extensive, impressive, and very useful to users who rely on it. However, it comes at a high cost in terms of compile time, binary size, and complexity. Starting with version 0.72, dataframe commands are no longer included in the release binaries published on GitHub or the default binaries published via package managers (like Homebrew, winget, Scoop). As a result of this change, the main Nu executable is now about 50% smaller. -To continue using dataframe commands, you can build Nu from source using the `dataframe` [Cargo feature](https://doc.rust-lang.org/cargo/reference/features.html). For example, to install using Cargo: `cargo install nu --features=dataframe` +To continue using dataframe commands, you can build Nu from source using the `dataframe` [Cargo feature](https://doc.rust-lang.org/cargo/reference/features). For example, to install using Cargo: `cargo install nu --features=dataframe` ## Allow reloading overlay definitions ([kubouch](https://github.com/nushell/nushell/pull/7231)) @@ -196,7 +196,7 @@ Since the version 20.17.0 of [virtualenv](https://github.com/pypa/virtualenv), t - [The `--predicate` flag has been removed from `find`](https://github.com/nushell/nushell/pull/7042). `where` can be used in all situations where `find --predicate` was previously used. - [`sort-by` now requires a column name to sort by](https://github.com/nushell/nushell/pull/7042). To sort lists without specifying a column name, `sort` can be used. - `seq`, `seq char`, and `seq date` no longer have `--separator` and `--terminator` flags ([#7045](https://github.com/nushell/nushell/pull/7045), [#7054](https://github.com/nushell/nushell/pull/7054), [#7096](https://github.com/nushell/nushell/pull/7096)). This helps ensure that the return type for those commands is consistent, and `str join` can be used to accomplish the same effect. -- [The `build-string` command has been removed](https://github.com/nushell/nushell/pull/7144). To concatenate strings, use the `+` operator, [string interpolation](https://www.nushell.sh/book/working_with_strings.html#string-interpolation), or `str join`. +- [The `build-string` command has been removed](https://github.com/nushell/nushell/pull/7144). To concatenate strings, use the `+` operator, [string interpolation](https://www.nushell.sh/book/working_with_strings#string-interpolation), or `str join`. - [`wrap` now expands ranges](https://github.com/nushell/nushell/pull/7159). It works the same as with lists or `seq`. - [`url parse` `url scheme`, `url host`, `url path`, and `url query` commands have been removed. We added the command `url parse`.](https://github.com/nushell/nushell/pull/7124) This new command returns a Record with scheme, username, password, host, path, query, params (as a Record) and fragment. - [`sort`, `sort-by`, `str contains` and `find` have had their `--insensitive` flags renamed to `--ignore-case`.](https://github.com/nushell/nushell/pull/7198). `--ignore-case` is used by `uniq`, as well as popular external commands like `less`, `grep` and `wget`, so it could be considered a standard flag name. diff --git a/src/content/docs/blog/2023-01-10-nushell_0_74.md b/src/content/docs/blog/2023-01-10-nushell_0_74.md index ba491ec3046..f327de8fb6a 100644 --- a/src/content/docs/blog/2023-01-10-nushell_0_74.md +++ b/src/content/docs/blog/2023-01-10-nushell_0_74.md @@ -65,7 +65,7 @@ The current batch of improvements can still be taken further. For example, custo _This is a proof-of-concept that we plan to expand in the future._ -_Tip: We also addedd a new [book section](https://www.nushell.sh/book/how_nushell_code_gets_run.html) with an in-depth explanation of Nushell's parsing and evaluation, hopefully clearing up some confusion about things like "Why can't I source a dynamic path?". It also touches on the concept of parse-time constants._ +_Tip: We also addedd a new [book section](https://www.nushell.sh/book/how_nushell_code_gets_run) with an in-depth explanation of Nushell's parsing and evaluation, hopefully clearing up some confusion about things like "Why can't I source a dynamic path?". It also touches on the concept of parse-time constants._ A new `const` keyword is added to Nushell to define "parse-time" constants. Constants defined with `const` behave the same as variables defined with `let`, but in addition, they are usable in some contexts that require values known at parse-time. Currently, this applies to files or names passed to `use`, `overlay use`, `source`, and `source-env`. For example, the following now works: diff --git a/src/content/docs/blog/2023-01-31-nushell_0_75.md b/src/content/docs/blog/2023-01-31-nushell_0_75.md index 30c0958300f..70fb45875c2 100644 --- a/src/content/docs/blog/2023-01-31-nushell_0_75.md +++ b/src/content/docs/blog/2023-01-31-nushell_0_75.md @@ -52,7 +52,7 @@ This format allows you to insert any Unicode code point into a string by specify We've simply dropped support for the old format since we're pre-1.0 and didn't want to carry forward redundant syntax. You will have to change any unicode escapes in your scripts to the new format. -_Why change?_ The old 4-digit syntax could not natively address recent extensions to Unicode standard, such as emoji, CJK extension and traditional scripts. There is a cumbersome workaround in the form of [surrogate pairs](https://unicodebook.readthedocs.io/unicode_encodings.html#surrogates), but this is not intuitive. +_Why change?_ The old 4-digit syntax could not natively address recent extensions to Unicode standard, such as emoji, CJK extension and traditional scripts. There is a cumbersome workaround in the form of [surrogate pairs](https://unicodebook.readthedocs.io/unicode_encodings#surrogates), but this is not intuitive. Why this change? The new format allows you to specify any Unicode code point with a single, predictable syntax. Rust and ECMAScript 6 support the same syntax. (Full disclosure: C++, Python and Java don't.) diff --git a/src/content/docs/blog/2023-04-25-nushell_0_79.md b/src/content/docs/blog/2023-04-25-nushell_0_79.md index fc48df74c82..40acee832b1 100644 --- a/src/content/docs/blog/2023-04-25-nushell_0_79.md +++ b/src/content/docs/blog/2023-04-25-nushell_0_79.md @@ -87,8 +87,8 @@ use std 'dirs show' ``` - one can follow the activity of the library in the [roadmap](https://github.com/nushell/nushell/issues/8450) -- the library comes with a test framework; see the [_Testing your Nushell code_](https://www.nushell.sh/book/testing.html) chapter of the book -- the long term information, changelog and updates shall be found in the [_Standard library_](https://www.nushell.sh/book/standard_library.html) chapter of the Nushell book +- the library comes with a test framework; see the [_Testing your Nushell code_](https://www.nushell.sh/book/testing) chapter of the book +- the long term information, changelog and updates shall be found in the [_Standard library_](https://www.nushell.sh/book/standard_library) chapter of the Nushell book - if you are a contributor willing to help out, everything happens in the [`nu-std` crate](https://github.com/nushell/nushell/tree/main/crates/nu-std), especially the [`CONTRIBUTING.md` document](https://github.com/nushell/nushell/blob/main/crates/nu-std/CONTRIBUTING.md) which explains all there is to know about "_developing with `std`_" in great details. diff --git a/src/content/docs/blog/2023-05-16-nushell_0_80.md b/src/content/docs/blog/2023-05-16-nushell_0_80.md index db4307b397c..f6082ed39e6 100644 --- a/src/content/docs/blog/2023-05-16-nushell_0_80.md +++ b/src/content/docs/blog/2023-05-16-nushell_0_80.md @@ -36,7 +36,7 @@ The above will require two fields to be present, a `name` that's a `string`, and ## Modules from directories ([@Kubouch](https://github.com/nushell/nushell/pull/9066)) -It is now possible to create a module from a directory. The directory must contain `mod.nu` and all other .nu files are added as a submodule of the module. This allows some traditional shell patterns such as dumping completion files into a directory to be loaded automatically. Check out the newly updated [book chapter](https://www.nushell.sh/book/modules.html) for more details and examples. +It is now possible to create a module from a directory. The directory must contain `mod.nu` and all other .nu files are added as a submodule of the module. This allows some traditional shell patterns such as dumping completion files into a directory to be loaded automatically. Check out the newly updated [book chapter](https://www.nushell.sh/book/modules) for more details and examples. The enabling feature for module directories was organizing modules into submodule structure instead of solely relying on re-importing symbols with `export use`. `module` and especially `export module` have been added as a result of this change. While not immediately visible, the module update allows for cleaner submodule oganization without relying on re-exporting symbols with `export use`. Since modules are now aware of their submodules, in the future we hope to improve discoverability of definitions within modules, enhancing our IDE support (such as our [LSP](https://github.com/nushell/vscode-nushell-lang)). diff --git a/src/content/docs/blog/2023-06-27-road-to-1_0.md b/src/content/docs/blog/2023-06-27-road-to-1_0.md index 55311cd8ac1..9b190246c57 100644 --- a/src/content/docs/blog/2023-06-27-road-to-1_0.md +++ b/src/content/docs/blog/2023-06-27-road-to-1_0.md @@ -24,18 +24,18 @@ For our contributors, this change also has the benefit that the impact of our in ### Nightly builds for the eager If you think that Nushell is moving at a glacial pace after this change, we luckily now have [nightly builds for you to download](https://github.com/nushell/nightly/tags) that reflect the current state of development. -If [building Nushell yourself](https://www.nushell.sh/book/installation.html#build-from-source) was too burdensome so far, you now have to chance to try out upcoming features and provide your feedback. +If [building Nushell yourself](https://www.nushell.sh/book/installation#build-from-source) was too burdensome so far, you now have to chance to try out upcoming features and provide your feedback. ## How things went from 0.60 to 0.8x -Our last very public milestone was the [release of the `0.60` version](https://www.nushell.sh/blog/2022-03-22-nushell_0_60.html), which included a massive refactor of Nushell's internals that we skipped to it from the `0.44` release. -Apart from rewriting the engine, it included our own line editor [reedline](https://github.com/nushell/reedline) for added [customization in the interactive experience](https://www.nushell.sh/book/line_editor.html). +Our last very public milestone was the [release of the `0.60` version](https://www.nushell.sh/blog/2022-03-22-nushell_0_60), which included a massive refactor of Nushell's internals that we skipped to it from the `0.44` release. +Apart from rewriting the engine, it included our own line editor [reedline](https://github.com/nushell/reedline) for added [customization in the interactive experience](https://www.nushell.sh/book/line_editor). The rewrite unlocked many improvements and opportunities for valuable experimentation. -Since `0.60`, we achieved a much more mature system of [modules](https://www.nushell.sh/book/modules.html) and [overlays](https://www.nushell.sh/book/overlays.html) that allow you to build more composable applications in Nu. -As part of this effort to strengthen the programming language chops of Nu, we also spent a lot of time finding the balance between our [functional programming philosophy of pipelined data](https://www.nushell.sh/book/thinking_in_nu.html) and the [mutation of variables](https://www.nushell.sh/book/variables_and_subexpressions.html#mutable-variables) to allow simple imperative patterns. +Since `0.60`, we achieved a much more mature system of [modules](https://www.nushell.sh/book/modules) and [overlays](https://www.nushell.sh/book/overlays) that allow you to build more composable applications in Nu. +As part of this effort to strengthen the programming language chops of Nu, we also spent a lot of time finding the balance between our [functional programming philosophy of pipelined data](https://www.nushell.sh/book/thinking_in_nu) and the [mutation of variables](https://www.nushell.sh/book/variables_and_subexpressions#mutable-variables) to allow simple imperative patterns. -We also saw a few efforts that didn't pan out yet. For example, we tried to integrate the [Polars](https://github.com/pola-rs/polars/) dataframe engine directly into the grammar of Nushell commands, but this left many rough edges. Thus [with version 0.76, we returned to a simpler dataframe integration](https://www.nushell.sh/blog/2023-02-21-nushell_0_76.html#dataframe-commands-are-again-explicitly-separated-from-core-nushell-commands-7998) to focus on getting the core Nushell experience right. +We also saw a few efforts that didn't pan out yet. For example, we tried to integrate the [Polars](https://github.com/pola-rs/polars/) dataframe engine directly into the grammar of Nushell commands, but this left many rough edges. Thus [with version 0.76, we returned to a simpler dataframe integration](https://www.nushell.sh/blog/2023-02-21-nushell_0_76#dataframe-commands-are-again-explicitly-separated-from-core-nushell-commands-7998) to focus on getting the core Nushell experience right. This all provided valuable lessons in how we decide which features are beginning to settle and where we need to focus our effort to get a consistent experience. diff --git a/src/content/docs/blog/2023-07-30-nushell_0_83_1.md b/src/content/docs/blog/2023-07-30-nushell_0_83_1.md index 9ce68058713..55ed85b6720 100644 --- a/src/content/docs/blog/2023-07-30-nushell_0_83_1.md +++ b/src/content/docs/blog/2023-07-30-nushell_0_83_1.md @@ -98,6 +98,6 @@ You may need to recompile or update your plugins and then re-register your plugi [Nushell 0.83]: https://github.com/nushell/nushell/releases/tag/0.83.0 [Nushell 0.83 notes]: https://www.nushell.sh/blog/2023-07-25-nushell_0_83.html -[input/output types]: https://www.nushell.sh/blog/2023-07-25-nushell_0_83.html#input-output-type-checking-and-annotations-jntrnr -[breaking changes]: https://www.nushell.sh/blog/2023-07-25-nushell_0_83.html#breaking-changes +[input/output types]: https://www.nushell.sh/blog/2023-07-25-nushell_0_83#input-output-type-checking-and-annotations-jntrnr +[breaking changes]: https://www.nushell.sh/blog/2023-07-25-nushell_0_83#breaking-changes [#9812]: https://github.com/nushell/nushell/issues/9812 diff --git a/src/content/docs/blog/2023-08-23-happy-birthday-nushell-4.md b/src/content/docs/blog/2023-08-23-happy-birthday-nushell-4.md index 4cf09c9c14f..679bc981744 100644 --- a/src/content/docs/blog/2023-08-23-happy-birthday-nushell-4.md +++ b/src/content/docs/blog/2023-08-23-happy-birthday-nushell-4.md @@ -8,7 +8,7 @@ excerpt: Today, we're celebrating 4 years since Nushell's first public release. # Nushell turns 4 years old! -Today marks 4 years since Nushell's [first public release](https://www.nushell.sh/blog/2019-08-23-introducing-nushell.html). In that time, Nushell has grown and changed, while always staying true to the idea that started it all: being a structure data language and shell. +Today marks 4 years since Nushell's [first public release](https://www.nushell.sh/blog/2019-08-23-introducing-nushell). In that time, Nushell has grown and changed, while always staying true to the idea that started it all: being a structure data language and shell. To celebrate, we thought we'd share stories of how people are using Nushell today. diff --git a/src/content/docs/blog/2023-09-19-nushell_0_85_0.md b/src/content/docs/blog/2023-09-19-nushell_0_85_0.md index a3dc12d8d7a..6ca44b2bffb 100644 --- a/src/content/docs/blog/2023-09-19-nushell_0_85_0.md +++ b/src/content/docs/blog/2023-09-19-nushell_0_85_0.md @@ -26,7 +26,7 @@ As part of this release, we also publish a set of optional plugins you can insta ## Nushell + Uutils = ❤️ -📢The Nushell team is thrilled to announce 🥳 that we've begun working with the [`uutils/coreutils` team on integrating some of their foundational core utilies into nushell](https://www.nushell.sh/blog/2023-09-05-why-uu.html). With this release, we've started with the coreutils `cp` command, which we've temporarily named `ucp`. We're starting with `ucp` to allow broad testing while the current nushell `cp` command remains the default. We've already found one [bug](https://github.com/uutils/coreutils/issues/5257) in the coreutils `cp` command and you might find others. Once it stabelizes, probably with the 0.86.0 release, we'll remove the nushell `cp` command and rename `ucp` to `cp`. In keeping with the nushell style, we've only added a handful of parameters. We can, and probably will, add more if the community determines we need them. We're so very excited and would like to thank [terts](https://github.com/tertsdiepraam), from the coreutils team, for his excellent help and special appreciation to [dmatos2012](https://github.com/dmatos2012) for the, very iterative, first `uutils/coreutils` integration PR [#10097](https://github.com/nushell/nushell/pull/10097) for the `cp` command. To read more about how this came to be, checkout [our blog post](https://www.nushell.sh/blog/2023-09-05-why-uu.html). +📢The Nushell team is thrilled to announce 🥳 that we've begun working with the [`uutils/coreutils` team on integrating some of their foundational core utilies into nushell](https://www.nushell.sh/blog/2023-09-05-why-uu). With this release, we've started with the coreutils `cp` command, which we've temporarily named `ucp`. We're starting with `ucp` to allow broad testing while the current nushell `cp` command remains the default. We've already found one [bug](https://github.com/uutils/coreutils/issues/5257) in the coreutils `cp` command and you might find others. Once it stabelizes, probably with the 0.86.0 release, we'll remove the nushell `cp` command and rename `ucp` to `cp`. In keeping with the nushell style, we've only added a handful of parameters. We can, and probably will, add more if the community determines we need them. We're so very excited and would like to thank [terts](https://github.com/tertsdiepraam), from the coreutils team, for his excellent help and special appreciation to [dmatos2012](https://github.com/dmatos2012) for the, very iterative, first `uutils/coreutils` integration PR [#10097](https://github.com/nushell/nushell/pull/10097) for the `cp` command. To read more about how this came to be, checkout [our blog post](https://www.nushell.sh/blog/2023-09-05-why-uu). ## Quite a few bug fixes diff --git a/src/content/docs/blog/2023-10-17-nushell_0_86.md b/src/content/docs/blog/2023-10-17-nushell_0_86.md index 202d2bcc5ef..2e4bb661809 100644 --- a/src/content/docs/blog/2023-10-17-nushell_0_86.md +++ b/src/content/docs/blog/2023-10-17-nushell_0_86.md @@ -51,7 +51,7 @@ As part of this release, we also publish a set of optional plugins you can insta - @@ -218,7 +218,7 @@ The following example is fictitious, `carapace-bin` should be able to complete i ::: Let's say you have [Carapace](https://rsteube.github.io/carapace/) setup as an -[external completer](https://www.nushell.sh/cookbook/external_completers.html#carapace-completer) but +[external completer](https://www.nushell.sh/cookbook/external_completers#carapace-completer) but it is not able to autocomplete `git comm`, then Nushell will try to do it. Because _most commands make sense only in the directory they were run in_, [@p00f](https://github.com/p00f) diff --git a/src/content/docs/blog/2023-12-12-nushell_0_88_0.md b/src/content/docs/blog/2023-12-12-nushell_0_88_0.md index 8cae791313c..134b78eaf2c 100644 --- a/src/content/docs/blog/2023-12-12-nushell_0_88_0.md +++ b/src/content/docs/blog/2023-12-12-nushell_0_88_0.md @@ -54,7 +54,7 @@ As part of this release, we also publish a set of optional plugins you can insta - @@ -550,7 +550,7 @@ Input/output types: ### Removed commands [[toc](#table-of-content)] -as part of the [deprecation plan of last release](https://www.nushell.sh/blog/2023-11-14-nushell_0_87_0.html#deprecated-commands-toc), +as part of the [deprecation plan of last release](https://www.nushell.sh/blog/2023-11-14-nushell_0_87_0#deprecated-commands-toc), the following commands and options have been removed by [@amtoine](https://github.com/amtoine): - `extern-wrapped` and `export extern-wrapped` in favor of `def --wrapped` in [#11000](https://github.com/nushell/nushell/pull/11000) diff --git a/src/content/docs/blog/2024-01-09-nushell_0_89_0.md b/src/content/docs/blog/2024-01-09-nushell_0_89_0.md index 2c3ca95fff0..d2cf5ec2656 100644 --- a/src/content/docs/blog/2024-01-09-nushell_0_89_0.md +++ b/src/content/docs/blog/2024-01-09-nushell_0_89_0.md @@ -72,7 +72,7 @@ As part of this release, we also publish a set of optional plugins you can insta - @@ -139,7 +139,7 @@ You can spread arguments to it like this: [1, 2, foo, bar, baz] ``` -See [the docs](/book/operators.html#spread-operator) for more information. +See [the docs](/book/operators#spread-operator) for more information. ## Editor Improvements diff --git a/src/content/docs/blog/2024-02-06-nushell_0_90_0.md b/src/content/docs/blog/2024-02-06-nushell_0_90_0.md index 9ae62aaa2d6..15b68f7811f 100644 --- a/src/content/docs/blog/2024-02-06-nushell_0_90_0.md +++ b/src/content/docs/blog/2024-02-06-nushell_0_90_0.md @@ -67,7 +67,7 @@ As part of this release, we also publish a set of optional plugins you can insta - diff --git a/src/content/docs/book/advanced.md b/src/content/docs/book/advanced.md index 17c1df86777..b77a5d87d17 100644 --- a/src/content/docs/book/advanced.md +++ b/src/content/docs/book/advanced.md @@ -6,19 +6,19 @@ title: Community While the "Advanced" title might sound daunting and you might be tempted to skip this chapter, in fact, some of the most interesting and powerful features can be found here. -Besides the built-in commands, Nushell has a [standard library](standard_library.md). +Besides the built-in commands, Nushell has a [standard library](standard_library). Nushell operates on _structured data_. You could say that Nushell is a "data-first" shell and a programming language. To further explore the data-centric direction, Nushell includes a full-featured dataframe processing engine using [Polars](https://github.com/pola-rs/polars) as the backend. -Make sure to check the [Dataframes documentation](dataframes.md) if you want to process large data efficiently directly in your shell. +Make sure to check the [Dataframes documentation](dataframes) if you want to process large data efficiently directly in your shell. -Values in Nushell contain some extra [metadata](metadata.md). -This metadata can be used, for example, to [create custom errors](creating_errors.md). +Values in Nushell contain some extra [metadata](metadata). +This metadata can be used, for example, to [create custom errors](creating_errors). -Thanks to Nushell's strict scoping rules, it is very easy to [iterate over collections in parallel](parallelism.md) which can help you speed up long-running scripts by just typing a few characters. +Thanks to Nushell's strict scoping rules, it is very easy to [iterate over collections in parallel](parallelism) which can help you speed up long-running scripts by just typing a few characters. -You can [interactively explore data](explore.md) with the [`explore`](/commands/docs/explore.md) command. +You can [interactively explore data](explore) with the [`explore`](/commands/docs/explore) command. -Finally, you can extend Nushell's functionality with [plugins](plugins.md). +Finally, you can extend Nushell's functionality with [plugins](plugins). Almost anything can be a plugin as long as it communicates with Nushell in a protocol that Nushell understands. diff --git a/src/content/docs/book/aliases.md b/src/content/docs/book/aliases.md index d92d1c08a1f..fdf332b8b3c 100644 --- a/src/content/docs/book/aliases.md +++ b/src/content/docs/book/aliases.md @@ -52,7 +52,7 @@ The solution is to define a command without parameters that calls the system pro def uuidgen [] { ^uuidgen | tr A-F a-f } ``` -See more in the [custom commands](custom_commands.md) section of this book. +See more in the [custom commands](custom_commands) section of this book. Or a more idiomatic example with nushell internal commands diff --git a/src/content/docs/book/background_task.md b/src/content/docs/book/background_task.md index 6acc8a7cd92..69561dead82 100644 --- a/src/content/docs/book/background_task.md +++ b/src/content/docs/book/background_task.md @@ -27,7 +27,7 @@ Then you will get some commands to schedule background tasks. (e.g: `task spawn` Cons: It spawns a new Nushell interpreter to execute every single task, so it doesn't inherit current scope's variables, custom commands, alias definition. It only inherits environment variables whose value can be converted to a string. -Therefore, if you want to use custom commands or variables, you have to [`use`](/commands/docs/use.md) or [`def`](/commands/docs/def.md) them within the given block. +Therefore, if you want to use custom commands or variables, you have to [`use`](/commands/docs/use) or [`def`](/commands/docs/def) them within the given block. ## Using nu with terminal multiplexer diff --git a/src/content/docs/book/coloring_and_theming.md b/src/content/docs/book/coloring_and_theming.md index 476849c301a..e278b6f1b59 100644 --- a/src/content/docs/book/coloring_and_theming.md +++ b/src/content/docs/book/coloring_and_theming.md @@ -412,9 +412,9 @@ If you want to go back to the normal left prompt, you'll have to unset `TRANSIEN > hide-env TRANSIENT_PROMPT_COMMAND ``` -## `LS_COLORS` colors for the [`ls`](/commands/docs/ls.md) command +## `LS_COLORS` colors for the [`ls`](/commands/docs/ls) command -Nushell will respect and use the `LS_COLORS` environment variable setting on Mac, Linux, and Windows. This setting allows you to define the color of file types when you do a [`ls`](/commands/docs/ls.md). For instance, you can make directories one color, _.md markdown files another color, _.toml files yet another color, etc. There are a variety of ways to color your file types. +Nushell will respect and use the `LS_COLORS` environment variable setting on Mac, Linux, and Windows. This setting allows you to define the color of file types when you do a [`ls`](/commands/docs/ls). For instance, you can make directories one color, _.md markdown files another color, _.toml files yet another color, etc. There are a variety of ways to color your file types. There's an exhaustive list [here](https://github.com/trapd00r/LS_COLORS), which is overkill, but gives you an rudimentary understanding of how to create a ls_colors file that `dircolors` can turn into a `LS_COLORS` environment variable. @@ -561,4 +561,4 @@ $env.config = { Reedline (Nu’s line editor) style is not using the `color_config` key. Instead, each menu has its own style to be configured separately. -See the [section dedicated to Reedline’s menus configuration](line_editor.md#menus) to learn more on this. +See the [section dedicated to Reedline’s menus configuration](/book/line_editor#menus) to learn more on this. diff --git a/src/content/docs/book/coming_from_bash.md b/src/content/docs/book/coming_from_bash.md index a9a0e49346d..13b6adf2775 100644 --- a/src/content/docs/book/coming_from_bash.md +++ b/src/content/docs/book/coming_from_bash.md @@ -39,7 +39,7 @@ Note: this table assumes Nu 0.60.0 or later. | `rm ` | `rm ` | Remove the given file | | | `rm -t ` | Move the given file to the system trash | | `rm -rf ` | `rm -r ` | Recursively removes the given path | -| `date -d ` | `"" \| into datetime -f ` | Parse a date ([format documentation](https://docs.rs/chrono/0.4.15/chrono/format/strftime/index.html)) | +| `date -d ` | `"" \| into datetime -f ` | Parse a date ([format documentation](https://docs.rs/chrono/0.4.15/chrono/format/strftime/index)) | | `sed` | `str replace` | Find and replace a pattern in a string | | `grep ` | `where $it =~ ` or `find ` | Filter strings that contain the substring | | `man ` | `help ` | Get the help for a given command | diff --git a/src/content/docs/book/coming_from_cmd.md b/src/content/docs/book/coming_from_cmd.md index f10115272f2..a8b4b24a7e8 100644 --- a/src/content/docs/book/coming_from_cmd.md +++ b/src/content/docs/book/coming_from_cmd.md @@ -59,4 +59,4 @@ This table was last updated for Nu 0.67.0. | `VERIFY` | | Verify that file writes happen | | `VOL` | | Show drive information | -Before Nu version 0.67, Nu [used to](https://www.nushell.sh/blog/2022-08-16-nushell-0_67.html#windows-cmd-exe-changes-rgwood) use CMD.EXE to launch external commands, which meant that the above builtins could be run as an `^external` command. As of version 0.67, however, Nu no longer uses CMD.EXE to launch externals, meaning the above builtins cannot be run from within Nu, except for `ASSOC`, `CLS`, `ECHO`, `FTYPE`, `MKLINK`, `PAUSE`, `START`, `VER`, and `VOL`, which are explicitly allowed to be interpreted by CMD if no executable by that name exists. +Before Nu version 0.67, Nu [used to](https://www.nushell.sh/blog/2022-08-16-nushell-0_67#windows-cmd-exe-changes-rgwood) use CMD.EXE to launch external commands, which meant that the above builtins could be run as an `^external` command. As of version 0.67, however, Nu no longer uses CMD.EXE to launch externals, meaning the above builtins cannot be run from within Nu, except for `ASSOC`, `CLS`, `ECHO`, `FTYPE`, `MKLINK`, `PAUSE`, `START`, `VER`, and `VOL`, which are explicitly allowed to be interpreted by CMD if no executable by that name exists. diff --git a/src/content/docs/book/coming_to_nu.md b/src/content/docs/book/coming_to_nu.md index 0209d3766b3..584a278f530 100644 --- a/src/content/docs/book/coming_to_nu.md +++ b/src/content/docs/book/coming_to_nu.md @@ -1,13 +1,11 @@ --- -title: Community +title: Coming to Nu --- -# Coming to Nu - If you are familiar with other shells or programming languages, you might find this chapter useful to get up to speed. -[Coming from Bash](coming_from_bash.md) shows how some patterns typical for Bash, or POSIX shells in general, can be mapped to Nushell. -Similarly, [Coming from CMD.EXE](coming_from_cmd.md) shows how built-in commands in the Windows Command Prompt can be mapped to Nushell. +[Coming from Bash](coming_from_bash) shows how some patterns typical for Bash, or POSIX shells in general, can be mapped to Nushell. +Similarly, [Coming from CMD.EXE](coming_from_cmd) shows how built-in commands in the Windows Command Prompt can be mapped to Nushell. -Similar comparisons are made for some [other shells and domain-specific languages](nushell_map.md), [imperative languages](nushell_map_imperative.md), and [functional languages](nushell_map_functional.md). -A separate comparison is made specifically for [operators](nushell_operator_map.md). +Similar comparisons are made for some [other shells and domain-specific languages](nushell_map), [imperative languages](nushell_map_imperative), and [functional languages](nushell_map_functional). +A separate comparison is made specifically for [operators](nushell_operator_map). diff --git a/src/content/docs/book/command_signature.md b/src/content/docs/book/command_signature.md index 79834f07b2f..a1e6f0ec95f 100644 --- a/src/content/docs/book/command_signature.md +++ b/src/content/docs/book/command_signature.md @@ -2,22 +2,22 @@ title: Command signature --- -nu commands can be given explicit signatures; take [`str stats`](/commands/docs/str_stats.md) as an example, the signature is like this: +nu commands can be given explicit signatures; take [`str stats`](/commands/docs/str_stats) as an example, the signature is like this: ```nushell def "str stats" []: string -> record { } ``` -The type names between the `:` and the opening curly brace `{` describe the command's input/output pipeline types. The input type for a given pipeline, in this case `string`, is given before the `->`; and the output type `record` is given after `->`. There can be multiple input/output types. If there are multiple input/output types, they can be placed within brackets and separated with commas, as in [`str join`](/commands/docs/str_join.md): +The type names between the `:` and the opening curly brace `{` describe the command's input/output pipeline types. The input type for a given pipeline, in this case `string`, is given before the `->`; and the output type `record` is given after `->`. There can be multiple input/output types. If there are multiple input/output types, they can be placed within brackets and separated with commas, as in [`str join`](/commands/docs/str_join): ```nushell def "str join" [separator?: string]: [list -> string, string -> string] { } ``` -It says that the [`str join`](/commands/docs/str_join.md) command takes an optional `string` type argument, and an input pipeline of either a `list` (implying `list`) with output type of `string`, or a single `string`, again with output type of `string`. +It says that the [`str join`](/commands/docs/str_join) command takes an optional `string` type argument, and an input pipeline of either a `list` (implying `list`) with output type of `string`, or a single `string`, again with output type of `string`. Some commands don't accept or require data through the input pipeline, thus the input type will be ``. -The same is true for the output type if the command returns `null` (e.g. [`rm`](/commands/docs/rm.md) or [`hide`](/commands/docs/hide.md)): +The same is true for the output type if the command returns `null` (e.g. [`rm`](/commands/docs/rm) or [`hide`](/commands/docs/hide)): ```nushell def hide [module: string, members?]: nothing -> nothing { } diff --git a/src/content/docs/book/configuration.md b/src/content/docs/book/configuration.md index 16deb3cefbb..fb9ed951140 100644 --- a/src/content/docs/book/configuration.md +++ b/src/content/docs/book/configuration.md @@ -62,7 +62,7 @@ These are some important variables to look at for Nushell-specific settings: ### Configurations with built-in commands -Starting with release v0.64 of Nushell, we have introduced two new commands([`config nu`](/commands/docs/config_nu.md) and [`config env`](/commands/docs/config_env.md)) which help you quickly edit nu configurations with your preferred text editor/IDE +Starting with release v0.64 of Nushell, we have introduced two new commands([`config nu`](/commands/docs/config_nu) and [`config env`](/commands/docs/config_env)) which help you quickly edit nu configurations with your preferred text editor/IDE Nushell follows underneath orders to locate the editor: @@ -74,7 +74,7 @@ Note: Previous versions of Nushell were launching `notepad` on windows, otherwis ### Color Config section -You can learn more about setting up colors and theming in the [associated chapter](coloring_and_theming.md). +You can learn more about setting up colors and theming in the [associated chapter](/book/coloring_and_theming). ## Remove Welcome Message @@ -130,9 +130,9 @@ There is an environment variable `$nu.loginshell-path` containing the path to th ### macOS: Keeping `/usr/bin/open` as `open` -Some tools (e.g. Emacs) rely on an [`open`](/commands/docs/open.md) command to open files on Mac. -As Nushell has its own [`open`](/commands/docs/open.md) command which has different semantics and shadows `/usr/bin/open`, these tools will error out when trying to use it. -One way to work around this is to define a custom command for Nushell's [`open`](/commands/docs/open.md) and create an alias for the system's [`open`](/commands/docs/open.md) in your `config.nu` file like this: +Some tools (e.g. Emacs) rely on an [`open`](/commands/docs/open) command to open files on Mac. +As Nushell has its own [`open`](/commands/docs/open) command which has different semantics and shadows `/usr/bin/open`, these tools will error out when trying to use it. +One way to work around this is to define a custom command for Nushell's [`open`](/commands/docs/open) and create an alias for the system's [`open`](/commands/docs/open) in your `config.nu` file like this: ```nushell def nuopen [arg, --raw (-r)] { if $raw { open -r $arg } else { open $arg } } @@ -140,19 +140,19 @@ alias open = ^open ``` The `^` symbol _escapes_ the Nushell `open` command, which invokes the operating system's `open` command. -For more about escape and `^` see the [chapter about escapes](escaping.md). +For more about escape and `^` see the [chapter about escapes](/book/escaping). ## PATH configuration -In Nushell, [the PATH environment variable]() (Path on Windows) is a list of paths. To append a new path to it, you can use `$env. = ` and [`append`](/commands/docs/append.md) in `env.nu`: +In Nushell, [the PATH environment variable]() (Path on Windows) is a list of paths. To append a new path to it, you can use `$env. = ` and [`append`](/commands/docs/append) in `env.nu`: ```nushell $env.PATH = ($env.PATH | split row (char esep) | append '/some/path') ``` -This will append `/some/path` to the end of PATH; you can also use [`prepend`](/commands/docs/prepend.md) to add entries to the start of PATH. +This will append `/some/path` to the end of PATH; you can also use [`prepend`](/commands/docs/prepend) to add entries to the start of PATH. -Note the `split row (char esep)` step. We need to add it because in `env.nu`, the environment variables inherited from the host process are still strings. The conversion step of environment variables to Nushell values happens after reading the config files (see also the [Environment](environment.html#environment-variable-conversions) section). After that, for example in the Nushell REPL when `PATH`/`Path` is a list , you can use [`append`](/commands/docs/append.md)/[`prepend`](/commands/docs/prepend.md) directly. +Note the `split row (char esep)` step. We need to add it because in `env.nu`, the environment variables inherited from the host process are still strings. The conversion step of environment variables to Nushell values happens after reading the config files (see also the [Environment](/book/environment#environment-variable-conversions) section). After that, for example in the Nushell REPL when `PATH`/`Path` is a list , you can use [`append`](/commands/docs/append)/[`prepend`](/commands/docs/prepend) directly. To prepend a new path only if not already listed, one can add to `env.nu`: diff --git a/src/content/docs/book/control_flow.md b/src/content/docs/book/control_flow.md index f288889f039..b97e1243c6a 100644 --- a/src/content/docs/book/control_flow.md +++ b/src/content/docs/book/control_flow.md @@ -5,19 +5,19 @@ title: Control Flow Nushell provides several commands that help determine how different groups of code are executed. In programming languages this functionality is often referred to as _control flow_. :::tip -One thing to note is that all of the commands discussed on this page use [blocks](/book/types_of_data.html#blocks). This means you can mutate [environmental variables](/book/environment.html) and other [mutable variables](http://localhost:8080/book/variables_and_subexpressions.html#mutable-variables) in them. +One thing to note is that all of the commands discussed on this page use [blocks](/book/types_of_data#blocks). This means you can mutate [environmental variables](/book/environment) and other [mutable variables](/book/variables_and_subexpressions#mutable-variables) in them. ::: ## Already covered Below we cover some commands related to control flow, but before we get to them, it's worthwhile to note there are several pieces of functionality and concepts that have already been covered in other sections that are also related to control flow or that can be used in the same situations. These include: -- Pipes on the [pipelines](/book/pipelines.html) page. -- Closures on the [types of data](/book/types_of_data.html) page. -- Iteration commands on the [working with lists](/book/working_with_lists.html) page. Such as: - - [`each`](/commands/docs/each.html) - - [`where`](/commands/docs/where.html) - - [`reduce`](/commands/docs/reduce.html) +- Pipes on the [pipelines](/book/pipelines) page. +- Closures on the [types of data](/book/types_of_data) page. +- Iteration commands on the [working with lists](/book/working_with_lists) page. Such as: + - [`each`](/commands/docs/each) + - [`where`](/commands/docs/where) + - [`reduce`](/commands/docs/reduce) ## Choice (Conditionals) @@ -35,7 +35,7 @@ The choice/conditional commands are expressions so they return values, unlike th ### `if` -[`if`](/commands/docs/if.html) evaluates branching [blocks](/book/types_of_data.html#blocks) of code based on the results of one or more conditions similar to the "if" functionality in other programming languages. For example: +[`if`](/commands/docs/if) evaluates branching [blocks](/book/types_of_data#blocks) of code based on the results of one or more conditions similar to the "if" functionality in other programming languages. For example: ```nushell frame="terminal" if $x > 0 { 'positive' } @@ -61,9 +61,9 @@ When the first condition is `true` (`$x` is greater than zero) it will return `' ### `match` -[`match`](/commands/docs/match.html) executes one of several conditional branches based on the value given to match. You can also do some [pattern matching](/cookbook/pattern_matching.html) to unpack values in composite types like lists and records. +[`match`](/commands/docs/match) executes one of several conditional branches based on the value given to match. You can also do some [pattern matching](/cookbook/pattern_matching) to unpack values in composite types like lists and records. -Basic usage of [`match`](/commands/docs/match.html) can conditionally run different code like a "switch" statement common in other languages. [`match`](/commands/docs/match.html) checks if the value after the word [`match`](/commands/docs/match.html) is equal to the value at the start of each branch before the `=>` and if it does, it executes the code after that branch's `=>`. +Basic usage of [`match`](/commands/docs/match) can conditionally run different code like a "switch" statement common in other languages. [`match`](/commands/docs/match) checks if the value after the word [`match`](/commands/docs/match) is equal to the value at the start of each branch before the `=>` and if it does, it executes the code after that branch's `=>`. ```nushell frame="terminal" match 3 { @@ -78,7 +78,7 @@ match 3 { # three ``` -The branches can either return a single value or, as shown in the second branch, can return the results of a [block](/book/types_of_data.html#blocks). +The branches can either return a single value or, as shown in the second branch, can return the results of a [block](/book/types_of_data#blocks). #### Catch all branch @@ -95,11 +95,11 @@ $foo # other number ``` -(Reminder, [`match`](/commands/docs/match.html) is an expression which is why we can assign the result to `$foo` here). +(Reminder, [`match`](/commands/docs/match) is an expression which is why we can assign the result to `$foo` here). #### Pattern Matching -You can "unpack" values from types like lists and records with [pattern matching](/cookbook/pattern_matching.html). You can then assign variables to the parts you want to unpack and use them in the matched expressions. +You can "unpack" values from types like lists and records with [pattern matching](/cookbook/pattern_matching). You can then assign variables to the parts you want to unpack and use them in the matched expressions. ```nushell frame="terminal" let foo = { name: 'bar', count: 7 } @@ -129,7 +129,7 @@ match $foo { --- -You can find more details about [`match`](/commands/docs/match.html) in the [pattern matching cookbook page](https://www.nushell.sh/cookbook/pattern_matching.html). +You can find more details about [`match`](/commands/docs/match) in the [pattern matching cookbook page](/cookbook/pattern_matching). ## Loops @@ -137,7 +137,7 @@ The loop commands allow you to repeat a block of code multiple times. ### Loops and other iterating commands -The functionality of the loop commands is similar to commands that apply a closure over elements in a list or table like [`each`](/commands/docs/each.html) or [`where`](/commands/docs/where.html) and many times you can accomplish the same thing with either. For example: +The functionality of the loop commands is similar to commands that apply a closure over elements in a list or table like [`each`](/commands/docs/each) or [`where`](/commands/docs/where) and many times you can accomplish the same thing with either. For example: ```nushell frame="terminal" mut result = [] @@ -158,13 +158,13 @@ $result ╰───┴───╯ ``` -While it may be tempting to use loops if you're familiar with them in other languages, it is considered more in the [Nushell-style](book/thinking_in_nu.html) (idiomatic) to use commands that apply closures when you can solve a problem either way. The reason for this is because of a pretty big downside with using loops. +While it may be tempting to use loops if you're familiar with them in other languages, it is considered more in the [Nushell-style](/book/thinking_in_nu) (idiomatic) to use commands that apply closures when you can solve a problem either way. The reason for this is because of a pretty big downside with using loops. #### Loop disadvantages -The biggest downside of loops is that they are statements, unlike [`each`](/commands/docs/each.html) which is an expression. Expressions, like [`each`](/commands/docs/each.html) always result in some output value, however statements do not. +The biggest downside of loops is that they are statements, unlike [`each`](/commands/docs/each) which is an expression. Expressions, like [`each`](/commands/docs/each) always result in some output value, however statements do not. -This means that they don't work well with immutable variables and using immutable variables is considered a more [Nushell-style](/book/thinking_in_nu.html#variables-are-immutable). Without a mutable variable declared beforehand in the example in the previous section, it would be impossible to use [`for`](/commands/docs/each.html) to get the list of numbers with incremented numbers, or any value at all. +This means that they don't work well with immutable variables and using immutable variables is considered a more [Nushell-style](/book/thinking_in_nu#variables-are-immutable). Without a mutable variable declared beforehand in the example in the previous section, it would be impossible to use [`for`](/commands/docs/each) to get the list of numbers with incremented numbers, or any value at all. Statements also don't work in Nushell pipelines which require some output. In fact Nushell will give an error if you try: @@ -181,11 +181,11 @@ Error: nu::parser::unexpected_keyword help: 'for' keyword is not allowed in pipeline. Use 'for' by itself, outside of a pipeline. ``` -Because Nushell is very pipeline oriented, this means using expression commands like [`each`](/commands/docs/each.html) is typically more natural than loop statements. +Because Nushell is very pipeline oriented, this means using expression commands like [`each`](/commands/docs/each) is typically more natural than loop statements. #### Loop advantages -If loops have such a big disadvantage, why do they exist? Well, one reason is that closures, like [`each`](/commands/docs/each.html) uses, can't modify mutable variables in the surrounding environment. If you try to modify a mutable variable in a closure you will get an error: +If loops have such a big disadvantage, why do they exist? Well, one reason is that closures, like [`each`](/commands/docs/each) uses, can't modify mutable variables in the surrounding environment. If you try to modify a mutable variable in a closure you will get an error: ```nushell frame="terminal" mut foo = [] @@ -200,7 +200,7 @@ Error: nu::parser::expected_keyword ╰──── ``` -If you modify an environmental variable in a closure, you can, but it will only modify it within the scope of the closure, leaving it unchanged everywhere else. Loops, however, use [blocks](/book/types_of_data.html#blocks) which means they can modify a regular mutable variable or an environmental variable within the larger scope. +If you modify an environmental variable in a closure, you can, but it will only modify it within the scope of the closure, leaving it unchanged everywhere else. Loops, however, use [blocks](/book/types_of_data#blocks) which means they can modify a regular mutable variable or an environmental variable within the larger scope. ```nushell frame="terminal" mut result = [] @@ -215,7 +215,7 @@ $result ### `for` -[`for`](/commands/docs/for.html) loops over a range or collection like a list or a table. +[`for`](/commands/docs/for) loops over a range or collection like a list or a table. ```nushell frame="terminal" for x in [1 2 3] { $x * $x | print } @@ -226,14 +226,14 @@ for x in [1 2 3] { $x * $x | print } #### Expression command alternatives -- [`each`](/commands/docs/each.html) -- [`par-each`](/commands/docs/par-each.html) -- [`where`](/commands/docs/where.html)/[`filter`](/commands/docs/filter.html) -- [`reduce`](/commands/docs/reduce.html) +- [`each`](/commands/docs/each) +- [`par-each`](/commands/docs/par-each) +- [`where`](/commands/docs/where)/[`filter`](/commands/docs/filter) +- [`reduce`](/commands/docs/reduce) ### `while` -[`while`](/commands/docs/while.html) loops the same block of code until the given condition is `false`. +[`while`](/commands/docs/while) loops the same block of code until the given condition is `false`. ```nushell frame="terminal" mut x = 0; while $x < 10 { $x = $x + 1 }; $x @@ -244,14 +244,14 @@ mut x = 0; while $x < 10 { $x = $x + 1 }; $x The "until" and other "while" commands -- [`take until`](/commands/docs/take_until.html) -- [`take while`](/commands/docs/take_while.html) -- [`skip until`](/commands/docs/skip_until.html) -- [`skip while`](/commands/docs/skip_while.html) +- [`take until`](/commands/docs/take_until) +- [`take while`](/commands/docs/take_while) +- [`skip until`](/commands/docs/skip_until) +- [`skip while`](/commands/docs/skip_while) ### `loop` -[`loop`](/commands/docs/loop.html) loops a block infinitely. You can use [`break`](/commands/docs/break.html) (as described in the next section) to limit how many times it loops. It can also be handy for continuously running scripts, like an interactive prompt. +[`loop`](/commands/docs/loop) loops a block infinitely. You can use [`break`](/commands/docs/break) (as described in the next section) to limit how many times it loops. It can also be handy for continuously running scripts, like an interactive prompt. ```nushell frame="terminal" mut x = 0; loop { if $x > 10 { break }; $x = $x + 1 }; $x @@ -260,7 +260,7 @@ mut x = 0; loop { if $x > 10 { break }; $x = $x + 1 }; $x ### `break` -[`break`](/commands/docs/break.html) will stop executing the code in a loop and resume execution after the loop. Effectively "break"ing out of the loop. +[`break`](/commands/docs/break) will stop executing the code in a loop and resume execution after the loop. Effectively "break"ing out of the loop. ```nushell frame="terminal" for x in 1..10 { if $x > 3 { break }; print $x } @@ -271,7 +271,7 @@ for x in 1..10 { if $x > 3 { break }; print $x } ### `continue` -[`continue`](/commands/docs/continue.html) will stop execution of the current loop, skipping the rest of the code in the loop, and will go to the next loop. If the loop would normally end, like if [`for`](/commands/docs/for.html) has iterated through all the given elements, or if [`while`](/commands/docs/while.html)'s condition is now false, it won't loop again and execution will continue after the loop block. +[`continue`](/commands/docs/continue) will stop execution of the current loop, skipping the rest of the code in the loop, and will go to the next loop. If the loop would normally end, like if [`for`](/commands/docs/for) has iterated through all the given elements, or if [`while`](/commands/docs/while)'s condition is now false, it won't loop again and execution will continue after the loop block. ```nushell frame="terminal" mut x = -1; while $x <= 6 { $x = $x + 1; if $x mod 3 == 0 { continue }; print $x } @@ -286,7 +286,7 @@ mut x = -1; while $x <= 6 { $x = $x + 1; if $x mod 3 == 0 { continue }; print $x ### `error make` -[`error make`](/commands/docs/error_make.html) creates an error that stops execution of the code and any code that called it, until either it is handled by a [`try`](/commands/docs/try.html) block, or it ends the script and outputs the error message. This functionality is the same as "exceptions" in other languages. +[`error make`](/commands/docs/error_make) creates an error that stops execution of the code and any code that called it, until either it is handled by a [`try`](/commands/docs/try) block, or it ends the script and outputs the error message. This functionality is the same as "exceptions" in other languages. ```nushell frame="terminal" print 'printed'; error make { msg: 'Some error info' }; print 'unprinted' @@ -301,11 +301,11 @@ Error: × Some error info The record passed to it provides some information to the code that catches it or the resulting error message. -You can find more information about [`error make`](/commands/docs/error_make.html) and error concepts on the [Creating your own errors page](/book/creating_errors.html). +You can find more information about [`error make`](/commands/docs/error_make) and error concepts on the [Creating your own errors page](/book/creating_errors). ### `try` -[`try`](/commands/docs/try.html) will catch errors created anywhere in the [`try`](/commands/docs/try.html)'s code block and resume execution of the code after the block. +[`try`](/commands/docs/try) will catch errors created anywhere in the [`try`](/commands/docs/try)'s code block and resume execution of the code after the block. ```nushell frame="terminal" try { error make { msg: 'Some error info' }}; print 'Resuming' @@ -321,7 +321,7 @@ try { 1 / 0 }; print 'Resuming' The resulting value will be `nothing` if an error occurs and the returned value of the block if an error did not occur. -If you include a `catch` block after the [`try`](/commands/docs/try.html) block, it will execute the code in the `catch` block if an error occurred in the [`try`](/commands/docs/try.html) block. +If you include a `catch` block after the [`try`](/commands/docs/try) block, it will execute the code in the `catch` block if an error occurred in the [`try`](/commands/docs/try) block. ```nushell frame="terminal" try { 1 / 0 } catch { 'An error happened!' } | $in ++ ' And now I am resuming.' @@ -334,7 +334,7 @@ It will not execute the `catch` block if an error did not occur. ### `return` -[`return`](/commands/docs/return.html) Ends a closure or command early where it is called, without running the rest of the command/closure, and returns the given value. Not often necessary since the last value in a closure or command is also returned, but it can sometimes be convenient. +[`return`](/commands/docs/return) Ends a closure or command early where it is called, without running the rest of the command/closure, and returns the given value. Not often necessary since the last value in a closure or command is also returned, but it can sometimes be convenient. ```nushell frame="terminal" def 'positive-check' [it] { diff --git a/src/content/docs/book/creating_errors.md b/src/content/docs/book/creating_errors.md index 0e077245f2d..179ae7cdaf8 100644 --- a/src/content/docs/book/creating_errors.md +++ b/src/content/docs/book/creating_errors.md @@ -2,12 +2,12 @@ title: Creating your own errors --- -Using the [metadata](metadata.md) information, you can create your own custom error messages. Error messages are built of multiple parts: +Using the [metadata](metadata) information, you can create your own custom error messages. Error messages are built of multiple parts: - The title of the error - The label of error message, which includes both the text of the label and the span to underline -You can use the [`error make`](/commands/docs/error_make.md) command to create your own error messages. For example, let's say you had your own command called `my-command` and you wanted to give an error back to the caller about something wrong with a parameter that was passed in. +You can use the [`error make`](/commands/docs/error_make) command to create your own error messages. For example, let's say you had your own command called `my-command` and you wanted to give an error back to the caller about something wrong with a parameter that was passed in. First, you can take the span of where the argument is coming from: @@ -15,7 +15,7 @@ First, you can take the span of where the argument is coming from: let span = (metadata $x).span; ``` -Next, you can create an error using the [`error make`](/commands/docs/error_make.md) command. This command takes in a record that describes the error to create: +Next, you can create an error using the [`error make`](/commands/docs/error_make) command. This command takes in a record that describes the error to create: ```nushell error make {msg: "this is fishy", label: {text: "fish right here", span: $span } } diff --git a/src/content/docs/book/custom_commands.md b/src/content/docs/book/custom_commands.md index a9844f133e6..64132a8bac5 100644 --- a/src/content/docs/book/custom_commands.md +++ b/src/content/docs/book/custom_commands.md @@ -15,7 +15,7 @@ def greet [name] { ``` :::tip -The value produced by the last line of a command becomes the command's returned value. In this case, a list containing the string `'hello'` and `$name` is returned. To prevent this, you can place `null` (or the [`ignore`](/commands/docs/ignore.md) command) at the end of the pipeline, like so: `['hello' $name] | null`. Also note that most file system commands, such as [`save`](/commands/docs/save.md) or [`cd`](/commands/docs/cd.md), always output `null`. +The value produced by the last line of a command becomes the command's returned value. In this case, a list containing the string `'hello'` and `$name` is returned. To prevent this, you can place `null` (or the [`ignore`](/commands/docs/ignore) command) at the end of the pipeline, like so: `['hello' $name] | null`. Also note that most file system commands, such as [`save`](/commands/docs/save) or [`cd`](/commands/docs/cd), always output `null`. ::: In this definition, we define the `greet` command, which takes a single parameter `name`. Following this parameter is the block that represents what will happen when the custom command runs. When called, the custom command will set the value passed for `name` as the `$name` variable, which will be available to the block. @@ -57,7 +57,7 @@ _Note: It's common practice in Nushell to separate the words of the command with ## Sub-commands -You can also define subcommands to commands using a space. For example, if we wanted to add a new subcommand to [`str`](/commands/docs/str.md), we can create it by naming our subcommand to start with "str ". For example: +You can also define subcommands to commands using a space. For example, if we wanted to add a new subcommand to [`str`](/commands/docs/str), we can create it by naming our subcommand to start with "str ". For example: ```nushell frame="terminal" def "str mycommand" [] { @@ -65,7 +65,7 @@ def "str mycommand" [] { } ``` -Now we can call our custom command as if it were a built-in subcommand of [`str`](/commands/docs/str.md): +Now we can call our custom command as if it were a built-in subcommand of [`str`](/commands/docs/str): ```nushell frame="terminal" str mycommand @@ -419,7 +419,7 @@ def greet [ } ``` -The comments that we put on the definition and its parameters then appear as descriptions inside the [`help`](/commands/docs/help.md) of the command. +The comments that we put on the definition and its parameters then appear as descriptions inside the [`help`](/commands/docs/help) of the command. :::caution[Note] A Nushell comment that continues on the same line for argument documentation purposes requires a space before the ` #` pound sign. @@ -454,13 +454,13 @@ Custom commands stream their output just like built-in commands. For example, le ls | get name ``` -Let's move [`ls`](/commands/docs/ls.md) into a command that we've written: +Let's move [`ls`](/commands/docs/ls) into a command that we've written: ```nushell frame="terminal" def my-ls [] { ls } ``` -We can use the output from this command just as we would [`ls`](/commands/docs/ls.md). +We can use the output from this command just as we would [`ls`](/commands/docs/ls). ```nushell frame="terminal" my-ls | get name @@ -509,4 +509,4 @@ def nullify [...cols] { ## Persisting -For information about how to persist custom commands so that they're visible when you start up Nushell, see the [configuration chapter](configuration.md) and add your startup script. +For information about how to persist custom commands so that they're visible when you start up Nushell, see the [configuration chapter](configuration) and add your startup script. diff --git a/src/content/docs/book/custom_completions.md b/src/content/docs/book/custom_completions.md index 0786c9d420d..56714205ad3 100644 --- a/src/content/docs/book/custom_completions.md +++ b/src/content/docs/book/custom_completions.md @@ -2,7 +2,7 @@ title: Custom completions --- -Custom completions allow you to mix together two features of Nushell: custom commands and completions. With them, you're able to create commands that handle the completions for positional parameters and flag parameters. These custom completions work both for [custom commands](custom_commands.md) and [known external, or `extern`, commands](externs.md). +Custom completions allow you to mix together two features of Nushell: custom commands and completions. With them, you're able to create commands that handle the completions for positional parameters and flag parameters. These custom completions work both for [custom commands](custom_commands) and [known external, or `extern`, commands](externs). There are two parts to a custom command: the command that handles a completion and attaching this command to the type of another command using `@`. @@ -17,7 +17,7 @@ Let's look at an example: cat dog eel ``` -In the first line, we create a custom command that will return a list of three different animals. These are the values we'd like to use in the completion. Once we've created this command, we can now use it to provide completions for other custom commands and [`extern`](/commands/docs/extern.md)s. +In the first line, we create a custom command that will return a list of three different animals. These are the values we'd like to use in the completion. Once we've created this command, we can now use it to provide completions for other custom commands and [`extern`](/commands/docs/extern)s. In the second line, we use `string@animals`. This tells Nushell two things: the shape of the argument for type-checking and the custom completion to use if the user wants to complete values at that position. @@ -87,9 +87,9 @@ The dog is named Enzo On the second line, once we press the `` key, the argument `"my-command dog"` is passed to the `animal-names` command as context. -## Custom completion and [`extern`](/commands/docs/extern.md) +## Custom completion and [`extern`](/commands/docs/extern) -A powerful combination is adding custom completions to [known `extern` commands](externs.md). These work the same way as adding a custom completion to a custom command: by creating the custom completion and then attaching it with a `@` to the type of one of the positional or flag arguments of the `extern`. +A powerful combination is adding custom completions to [known `extern` commands](externs). These work the same way as adding a custom completion to a custom command: by creating the custom completion and then attaching it with a `@` to the type of one of the positional or flag arguments of the `extern`. If you look closely at the examples in the default config, you'll see this: @@ -140,7 +140,7 @@ only the value, i.e. "5c2464" or "f3a377", will be used in the command arguments External completers can also be integrated, instead of relying solely on Nushell ones. -For this, set the `external_completer` field in `config.nu` to a [closure](types_of_data.md#closures) which will be evaluated if no Nushell completions were found. +For this, set the `external_completer` field in `config.nu` to a [closure](types_of_data#closures) which will be evaluated if no Nushell completions were found. ```nushell > $env.config.completions.external = { @@ -168,4 +168,4 @@ let carapace_completer = {|spans| } ``` -[More examples of custom completers can be found in the cookbook](../cookbook/external_completers.md). +[More examples of custom completers can be found in the cookbook](../cookbook/external_completers). diff --git a/src/content/docs/book/dataframes.md b/src/content/docs/book/dataframes.md index e109c3aa66b..715c9c8c25c 100644 --- a/src/content/docs/book/dataframes.md +++ b/src/content/docs/book/dataframes.md @@ -3,7 +3,7 @@ title: Dataframes --- :::caution[WARNING] -To use the dataframe support you need a fully-featured build with `cargo build --features dataframe`. Starting with version 0.72, dataframes are _not_ included with binary releases of Nushell. [See the installation instructions](/book/installation.md) for further details. +To use the dataframe support you need a fully-featured build with `cargo build --features dataframe`. Starting with version 0.72, dataframes are _not_ included with binary releases of Nushell. [See the installation instructions](/book/installation) for further details. ::: As we have seen so far, Nushell makes working with data its main priority. @@ -31,7 +31,7 @@ processing data. For this little benchmark exercise we will be comparing native Nushell commands, dataframe Nushell commands and [Python Pandas](https://pandas.pydata.org/) commands. For the time being don't pay too -much attention to the [`Dataframe` commands](/commands/categories/dataframe.md). They will be explained in later +much attention to the [`Dataframe` commands](/commands/categories/dataframe). They will be explained in later sections of this page. > System Details: The benchmarks presented in this section were run using a @@ -61,7 +61,7 @@ The dataset has 5 columns and 5,429,252 rows. We can check that by using the ╰───┴────────┴─────────┴─────────╯ ``` -We can have a look at the first lines of the file using [`first`](/commands/docs/first.md): +We can have a look at the first lines of the file using [`first`](/commands/docs/first): ```nushell ❯ $df | dfr first @@ -90,7 +90,7 @@ We can have a look at the first lines of the file using [`first`](/commands/docs ### Loading the file Let's start by comparing loading times between the various methods. First, we -will load the data using Nushell's [`open`](/commands/docs/open.md) command: +will load the data using Nushell's [`open`](/commands/docs/open) command: ```nushell ❯ timeit {open .\Data7602DescendingYearOrder.csv} @@ -194,7 +194,7 @@ and the benchmark with dataframes is: Luckily Nushell dataframes managed to halve the time again. Isn't that great? -As you can see, Nushell's [`Dataframe` commands](/commands/categories/dataframe.md) +As you can see, Nushell's [`Dataframe` commands](/commands/categories/dataframe) are as fast as the most common tools that exist today to do data analysis. The commands that are included in this release have the potential to become your go-to tool for doing data analysis. By composing complex Nushell pipelines, you can extract information @@ -202,7 +202,7 @@ from data in a reliable way. ## Working with Dataframes -After seeing a glimpse of the things that can be done with [`Dataframe` commands](/commands/categories/dataframe.md), +After seeing a glimpse of the things that can be done with [`Dataframe` commands](/commands/categories/dataframe), now it is time to start testing them. To begin let's create a sample CSV file that will become our sample dataframe that we will be using along with the examples. In your favorite file editor paste the next lines to create out @@ -299,7 +299,7 @@ that exist in `df` by using the `aggregate` command As you can see, the aggregate function computes the sum for those columns where a sum makes sense. If you want to filter out the text column, you can select -the columns you want by using the [`dfr select`](/commands/docs/dfr_select.md) command +the columns you want by using the [`dfr select`](/commands/docs/dfr_select) command ```nushell ❯ $df | dfr sum | dfr select int_1 int_2 float_1 float_2 @@ -380,7 +380,7 @@ right dataframe :::tip In `Nu` when a command has multiple arguments that are expecting multiple values we use brackets `[]` to enclose those values. In the case of -[`dfr join`](/commands/docs/dfr_join.md) we can join on multiple columns +[`dfr join`](/commands/docs/dfr_join) we can join on multiple columns as long as they have the same type. ::: @@ -403,14 +403,14 @@ in order to use it for further operations. ## DataFrame group-by One of the most powerful operations that can be performed with a DataFrame is -the [`dfr group-by`](/commands/docs/dfr_group-by.md). This command will allow you to perform aggregation operations +the [`dfr group-by`](/commands/docs/dfr_group-by). This command will allow you to perform aggregation operations based on a grouping criteria. In Nushell, a `GroupBy` is a type of object that can be stored and reused for multiple aggregations. This is quite handy, since the creation of the grouped pairs is the most expensive operation while doing group-by and there is no need to repeat it if you are planning to do multiple operations with the same group condition. -To create a `GroupBy` object you only need to use the [`dfr_group-by`](/commands/docs/dfr_group-by.md) command +To create a `GroupBy` object you only need to use the [`dfr_group-by`](/commands/docs/dfr_group-by) command ```nushell ❯ let group = ($df | dfr group-by first) @@ -509,7 +509,7 @@ while working with dataframes, and this is thanks to **Apache Arrow** and **Polars**. In a very simple representation, each column in a DataFrame is an Arrow Array, which is using several memory specifications in order to maintain the data as packed as possible (check [Arrow columnar -format](https://arrow.apache.org/docs/format/Columnar.html)). The other +format](https://arrow.apache.org/docs/format/Columnar)). The other optimization trick is the fact that whenever possible, the columns from the dataframes are shared between dataframes, avoiding memory duplication for the same data. This means that dataframes `$a` and `$a2` are sharing the same two @@ -788,7 +788,7 @@ extract that information ╰───┴───────┴───────┴─────────┴─────────┴───────┴────────┴───────┴────────╯ ``` -The command [`dfr take`](/commands/docs/dfr_take.md) is very handy, especially if we mix it with other commands. +The command [`dfr take`](/commands/docs/dfr_take) is very handy, especially if we mix it with other commands. Let's say that we want to extract all rows for the first duplicated element for column `first`. In order to do that, we can use the command `dfr arg-unique` as shown in the next example @@ -810,7 +810,7 @@ We can use the `arg-sort` to accomplish that. In the next example we can sort the dataframe by the column `word` :::tip -The same result could be accomplished using the command [`sort`](/commands/docs/sort.md) +The same result could be accomplished using the command [`sort`](/commands/docs/sort) ::: ```nushell @@ -1082,9 +1082,9 @@ whenever possible, their analogous Nushell command. :::caution[WARNING] This list may be outdated. To get the up-to-date command list, see -[Dataframe](/commands/categories/dataframe.md) -[Lazyframe](/commands/categories/lazyframe.md) and -[Dataframe Or Lazyframe](/commands/categories/dataframe_or_lazyframe.md) +[Dataframe](/commands/categories/dataframe) +[Lazyframe](/commands/categories/lazyframe) and +[Dataframe Or Lazyframe](/commands/categories/dataframe_or_lazyframe) command categories. ::: diff --git a/src/content/docs/book/design_notes.md b/src/content/docs/book/design_notes.md index cfac1f07dff..f8e1a30100d 100644 --- a/src/content/docs/book/design_notes.md +++ b/src/content/docs/book/design_notes.md @@ -8,4 +8,4 @@ This chapter intends to give more in-depth overview of certain aspects of Nushel We intend to expand this chapter in the future. If there is some topic that you find confusing and hard to understand, let us know. It might be a good candidate for a page here. -[How Nushell Code Gets Run](how_nushell_code_gets_run.md) explains what happens when you run Nushell source code. It explains how Nushell is in many ways closer to classic compiled languages, like C or Rust, than to other shells and dynamic languages and hopefully clears some confusion that stems from that. +[How Nushell Code Gets Run](how_nushell_code_gets_run) explains what happens when you run Nushell source code. It explains how Nushell is in many ways closer to classic compiled languages, like C or Rust, than to other shells and dynamic languages and hopefully clears some confusion that stems from that. diff --git a/src/content/docs/book/environment.md b/src/content/docs/book/environment.md index e6951678572..c955ac7b877 100644 --- a/src/content/docs/book/environment.md +++ b/src/content/docs/book/environment.md @@ -33,7 +33,7 @@ In Nushell, environment variables can be any value and have any type. You can se To send environment variables to external applications, the values will need to be converted to strings. See [Environment variable conversions](#environment-variable-conversions) on how this works. -The environment is initially created from the Nu [configuration files](configuration.md) and from the environment that Nu is run inside of. +The environment is initially created from the Nu [configuration files](configuration) and from the environment that Nu is run inside of. ## Setting environment variables @@ -54,11 +54,11 @@ $env.Path = ($env.Path | prepend 'C:\path\you\want\to\add') ``` Here we've prepended our folder to the existing folders in the Path, so it will have the highest priority. -If you want to give it the lowest priority instead, you can use the [`append`](/commands/docs/append.md) command. +If you want to give it the lowest priority instead, you can use the [`append`](/commands/docs/append) command. -### [`load-env`](/commands/docs/load-env.md) +### [`load-env`](/commands/docs/load-env) -If you have more than one environment variable you'd like to set, you can use [`load-env`](/commands/docs/load-env.md) to create a table of name/value pairs and load multiple variables at the same time: +If you have more than one environment variable you'd like to set, you can use [`load-env`](/commands/docs/load-env) to create a table of name/value pairs and load multiple variables at the same time: ```nushell > load-env { "BOB": "FOO", "JAY": "BAR" } @@ -67,15 +67,15 @@ If you have more than one environment variable you'd like to set, you can use [` ### One-shot environment variables These are defined to be active only temporarily for a duration of executing a code block. -See [Single-use environment variables](environment.md#single-use-environment-variables) for details. +See [Single-use environment variables](environment#single-use-environment-variables) for details. -### Calling a command defined with [`def --env`](/commands/docs/def.md) +### Calling a command defined with [`def --env`](/commands/docs/def) -See [Defining environment from custom commands](environment.md#defining-environment-from-custom-commands) for details. +See [Defining environment from custom commands](environment#defining-environment-from-custom-commands) for details. ### Using module's exports -See [Modules](modules.md) for details. +See [Modules](modules) for details. ## Reading environment variables @@ -86,7 +86,7 @@ Individual environment variables are fields of a record that is stored in the `$ BAR ``` -Sometimes, you may want to access an environmental variable which might be unset. Consider using the [question mark operator](variables_and_subexpressions.md#variable-paths) to avoid an error: +Sometimes, you may want to access an environmental variable which might be unset. Consider using the [question mark operator](variables_and_subexpressions#variable-paths) to avoid an error: ```nushell > $env.FOO | describe @@ -138,8 +138,8 @@ true ## Changing directory -Common task in a shell is to change directory with the [`cd`](/commands/docs/cd.md) command. -In Nushell, calling [`cd`](/commands/docs/cd.md) is equivalent to setting the `PWD` environment variable. +Common task in a shell is to change directory with the [`cd`](/commands/docs/cd) command. +In Nushell, calling [`cd`](/commands/docs/cd) is equivalent to setting the `PWD` environment variable. Therefore, it follows the same rules as other environment variables (for example, scoping). ## Single-use environment variables @@ -151,19 +151,19 @@ A common shorthand to set an environment variable once is available, inspired by BAR ``` -You can also use [`with-env`](/commands/docs/with-env.md) to do the same thing more explicitly: +You can also use [`with-env`](/commands/docs/with-env) to do the same thing more explicitly: ```nushell > with-env { FOO: BAR } { $env.FOO } BAR ``` -The [`with-env`](/commands/docs/with-env.md) command will temporarily set the environment variable to the value given (here: the variable "FOO" is given the value "BAR"). Once this is done, the [block](types_of_data.md#blocks) will run with this new environment variable set. +The [`with-env`](/commands/docs/with-env) command will temporarily set the environment variable to the value given (here: the variable "FOO" is given the value "BAR"). Once this is done, the [block](types_of_data#blocks) will run with this new environment variable set. ## Permanent environment variables You can also set environment variables at startup so they are available for the duration of Nushell running. -To do this, set an environment variable inside [the Nu configuration file](configuration.md). +To do this, set an environment variable inside [the Nu configuration file](configuration). For example: ```nushell title="config.nu" @@ -173,7 +173,7 @@ $env.FOO = 'BAR' ## Defining environment from custom commands Due to the scoping rules, any environment variables defined inside a custom command will only exist inside the command's scope. -However, a command defined as [`def --env`](/commands/docs/def.md) instead of [`def`](/commands/docs/def.md) (it applies also to [`export def`](/commands/docs/export_def.md), see [Modules](modules.md)) will preserve the environment on the caller's side: +However, a command defined as [`def --env`](/commands/docs/def) instead of [`def`](/commands/docs/def) (it applies also to [`export def`](/commands/docs/export_def), see [Modules](modules)) will preserve the environment on the caller's side: ```nushell > def --env foo [] { @@ -240,7 +240,7 @@ _(Important! The environment conversion string -> value happens **after** the en ## Removing environment variables -You can remove an environment variable only if it was set in the current scope via [`hide-env`](/commands/docs/hide_env.md): +You can remove an environment variable only if it was set in the current scope via [`hide-env`](/commands/docs/hide_env): ```nushell > $env.FOO = 'BAR' diff --git a/src/content/docs/book/escaping.md b/src/content/docs/book/escaping.md index d7fea62949c..97e9305cefb 100644 --- a/src/content/docs/book/escaping.md +++ b/src/content/docs/book/escaping.md @@ -2,7 +2,7 @@ title: Escaping to the system --- -Nu provides a set of commands that you can use across different OSes ("internal" commands), and having this consistency is helpful. Sometimes, though, you want to run an external command that has the same name as an internal Nu command. To run the external [`ls`](/commands/docs/ls.md) or [`date`](/commands/docs/date.md) command, for example, you use the caret (^) command. Escaping with the caret prefix calls the command that's in the user's PATH (e.g. `/bin/ls` instead of Nu's internal [`ls`](/commands/docs/ls.md) command). +Nu provides a set of commands that you can use across different OSes ("internal" commands), and having this consistency is helpful. Sometimes, though, you want to run an external command that has the same name as an internal Nu command. To run the external [`ls`](/commands/docs/ls) or [`date`](/commands/docs/date) command, for example, you use the caret (^) command. Escaping with the caret prefix calls the command that's in the user's PATH (e.g. `/bin/ls` instead of Nu's internal [`ls`](/commands/docs/ls) command). Nu internal command: @@ -18,4 +18,4 @@ Escape to external command: ## Windows note -When running an external command on Windows, nushell [used to](https://www.nushell.sh/blog/2022-08-16-nushell-0_67.html#windows-cmd-exe-changes-rgwood) use [Cmd.exe](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/cmd) to run the command, as a number of common commands on Windows are actually shell builtins and not available as separate executables. [Coming from CMD.EXE](coming_from_cmd.md) contains a list of these commands and how to map them to nushell native concepts. +When running an external command on Windows, nushell [used to](https://www.nushell.sh/blog/2022-08-16-nushell-0_67#windows-cmd-exe-changes-rgwood) use [Cmd.exe](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/cmd) to run the command, as a number of common commands on Windows are actually shell builtins and not available as separate executables. [Coming from CMD.EXE](coming_from_cmd) contains a list of these commands and how to map them to nushell native concepts. diff --git a/src/content/docs/book/explore.md b/src/content/docs/book/explore.md index 385a329fad0..0c265ab29b2 100644 --- a/src/content/docs/book/explore.md +++ b/src/content/docs/book/explore.md @@ -23,7 +23,7 @@ ls | explore -i ![explore-ls-png](https://user-images.githubusercontent.com/20165848/207849604-421312e3-537f-4b2e-b83e-f1f83f2a79d5.png) -So the main point of [`explore`](/commands/docs/explore.md) is `:table` (Which you see on the above screenshot). +So the main point of [`explore`](/commands/docs/explore) is `:table` (Which you see on the above screenshot). You can interact with it via ``, ``, ``, `` _arrow keys_. @@ -35,7 +35,7 @@ You can obtain more information about the various aspects of it by `:help`. ## Commands -[`explore`](/commands/docs/explore.md) has a list of built in commands you can use. Commands are run through pressing `<:>` and then a command name. +[`explore`](/commands/docs/explore) has a list of built in commands you can use. Commands are run through pressing `<:>` and then a command name. To find out the comprehensive list of commands you can type `:help`. diff --git a/src/content/docs/book/externs.md b/src/content/docs/book/externs.md index e16cab105ee..cef76c89793 100644 --- a/src/content/docs/book/externs.md +++ b/src/content/docs/book/externs.md @@ -46,7 +46,7 @@ A Nushell comment that continues on the same line for argument documentation pur ## Types and custom completions -In the above example, you'll notice some types are followed by `@` followed by the name of a command. We talk more about [custom completions](custom_completions.md) in their own section. +In the above example, you'll notice some types are followed by `@` followed by the name of a command. We talk more about [custom completions](custom_completions) in their own section. Both the type (or shape) of the argument and the custom completion tell Nushell about how to complete values for that flag or position. For example, setting a shape to `path` allows Nushell to complete the value to a filepath for you. Using the `@` with a custom completion overrides this default behavior, letting the custom completion give you full completion list. diff --git a/src/content/docs/book/getting_started.md b/src/content/docs/book/getting_started.md index 9845c665aa7..28517074649 100644 --- a/src/content/docs/book/getting_started.md +++ b/src/content/docs/book/getting_started.md @@ -4,8 +4,8 @@ title: Getting Started Let's get started! :elephant: -First, to be able to use Nushell, we need to [install it](installation.md). +First, to be able to use Nushell, we need to [install it](/book/installation). -The next sections will give you a [short tour of Nushell by example](quick_tour.md) (including how to get help from within Nushell), and show you how to [move around your file system](moving_around.md). +The next sections will give you a [short tour of Nushell by example](/book/quick_tour) (including how to get help from within Nushell), and show you how to [move around your file system](/book/moving_around). -Finally, because Nushell takes some design decisions that are quite different from typical shells or dynamic scripting languages, make sure to check [Thinking in Nu](thinking_in_nu.md) that explains some of these concepts. +Finally, because Nushell takes some design decisions that are quite different from typical shells or dynamic scripting languages, make sure to check [Thinking in Nu](/book/thinking_in_nu) that explains some of these concepts. diff --git a/src/content/docs/book/hooks.md b/src/content/docs/book/hooks.md index 8e598dfc9c6..4677a451417 100644 --- a/src/content/docs/book/hooks.md +++ b/src/content/docs/book/hooks.md @@ -27,7 +27,7 @@ The steps to evaluate one line in the REPL mode are as follows: ## Basic Hooks -To enable hooks, define them in your [config](configuration.md): +To enable hooks, define them in your [config](configuration): ```nushell $env.config = { @@ -86,7 +86,7 @@ $env.config = ($env.config | upsert hooks { ## Changing Environment One feature of the hooks is that they preserve the environment. -Environment variables defined inside the hook **block** will be preserved in a similar way as [`def --env`](environment.md#defining-environment-from-custom-commands). +Environment variables defined inside the hook **block** will be preserved in a similar way as [`def --env`](environment#defining-environment-from-custom-commands). You can test it with the following example: ```nushell @@ -118,7 +118,7 @@ $env.config = ($env.config | upsert hooks { }) ``` -This won't work because the environment will be active only within the [`if`](/commands/docs/if.md) block. +This won't work because the environment will be active only within the [`if`](/commands/docs/if) block. In this case, you could easily rewrite it as `load-env (if $after == ... { ... } else { {} })` but this pattern is fairly common and later we'll see that not all cases can be rewritten like this. To deal with the above problem, we introduce another way to define a hook -- **a record**: @@ -256,7 +256,7 @@ You can view the result by opening `file:///tmp/nu-output.html` in a web browser. Of course this isn't very convenient unless you use a browser that automatically reloads when the file changes. -Instead of the [`save`](/commands/docs/save.md) command, you would normally customize this +Instead of the [`save`](/commands/docs/save) command, you would normally customize this to send the HTML output to a desired window. ### Changing how output is displayed diff --git a/src/content/docs/book/how_nushell_code_gets_run.md b/src/content/docs/book/how_nushell_code_gets_run.md index 62a344f21d0..c550de4eba3 100644 --- a/src/content/docs/book/how_nushell_code_gets_run.md +++ b/src/content/docs/book/how_nushell_code_gets_run.md @@ -4,7 +4,7 @@ title: Community # How Nushell Code Gets Run -As you probably noticed, Nushell behaves quite differently from other shells and dynamic languages. In [Thinking in Nu](thinking_in_nu.md#think-of-nushell-as-a-compiled-language), we advise you to _think of Nushell as a compiled language_ but we do not give much insight into why. This section hopefully fills the gap. +As you probably noticed, Nushell behaves quite differently from other shells and dynamic languages. In [Thinking in Nu](/book/thinking_in_nu#think-of-nushell-as-a-compiled-language), we advise you to _think of Nushell as a compiled language_ but we do not give much insight into why. This section hopefully fills the gap. First, let's give a few example which you might intuitively try but which do not work in Nushell. @@ -62,7 +62,7 @@ First, the source code is analyzed by the parser and converted into an intermedi ### Compiled Languages -On the other side are languages that are typically "compiled", such as C, C++, or Rust. Assuming a simple ["hello world"](https://doc.rust-lang.org/stable/book/ch01-02-hello-world.html) in Rust +On the other side are languages that are typically "compiled", such as C, C++, or Rust. Assuming a simple ["hello world"](https://doc.rust-lang.org/stable/book/ch01-02-hello-world) in Rust ```rust // main.rs @@ -85,7 +85,7 @@ One big difference, however, between interpreted and compiled languages is that ### Eval Function -Most languages considered as "dynamic" or "interpreted" have an eval function, for example Python (it has two, [eval](https://docs.python.org/3/library/functions.html#eval) and [exec](https://docs.python.org/3/library/functions.html#exec)) or [Bash](https://linux.die.net/man/1/bash). It is used to take source code and interpret it within a running interpreter. This can get a bit confusing, so let's give a Python example: +Most languages considered as "dynamic" or "interpreted" have an eval function, for example Python (it has two, [eval](https://docs.python.org/3/library/functions#eval) and [exec](https://docs.python.org/3/library/functions#exec)) or [Bash](https://linux.die.net/man/1/bash). It is used to take source code and interpret it within a running interpreter. This can get a bit confusing, so let's give a Python example: ```python # hello_eval.py @@ -106,7 +106,7 @@ Of course, you can have more fun and try `eval("eval(\"print('Hello eval!')\")") You can see the eval function adds a new "meta" layer into the code execution. Instead of parsing the whole source code, then evaluating it, there is an extra parse-eval step during the evaluation. This means that the IR produced by the parser (whatever it is) can be further modified during the evaluation. -We've seen that without `eval`, the difference between compiled and interpreted languages is actually not that big. This is exactly what we mean by [thinking of Nushell as a compiled language](https://www.nushell.sh/book/thinking_in_nu.html#think-of-nushell-as-a-compiled-language): Despite Nushell being an interpreted language, its lack of `eval` gives it characteristics and limitations typical for traditional compiled languages like C or Rust. We'll dig deeper into what it means in the next section. +We've seen that without `eval`, the difference between compiled and interpreted languages is actually not that big. This is exactly what we mean by [thinking of Nushell as a compiled language](https://www.nushell.sh/book/thinking_in_nu#think-of-nushell-as-a-compiled-language): Despite Nushell being an interpreted language, its lack of `eval` gives it characteristics and limitations typical for traditional compiled languages like C or Rust. We'll dig deeper into what it means in the next section. ## Implications @@ -138,13 +138,13 @@ This is the complete parse-eval sequence. Not having `eval`-like functionality prevents `eval`-related bugs from happening. Calling a non-existent function is 100% guaranteed parse-time error in Nushell. Furthermore, after the parse step, we have a deep insight into the program and we're 100% sure it is not going to change during evaluation. This trivially allows for powerful and reliable static analysis and IDE integration which is challenging to achieve with more dynamic languages. In general, you have more peace of mind when scaling Nushell programs to bigger applications. -_Before going into examples, one note about the "dynamic" and "static" terminology. Stuff that happens at runtime (during evaluation, after parsing) is considered "dynamic". Stuff that happens before running (during parsing / compilation) is called "static". Languages that have more stuff (such as `eval`, type checking, etc.) happening at runtime are sometimes called "dynamic". Languages that analyze most of the information (type checking, [data ownership](https://doc.rust-lang.org/stable/book/ch04-00-understanding-ownership.html), etc.) before evaluating the program are sometimes called "static". The whole debate can get quite confusing, but for the purpose of this text, the main difference between a "static" and "dynamic" language is whether it has or has not the eval function._ +_Before going into examples, one note about the "dynamic" and "static" terminology. Stuff that happens at runtime (during evaluation, after parsing) is considered "dynamic". Stuff that happens before running (during parsing / compilation) is called "static". Languages that have more stuff (such as `eval`, type checking, etc.) happening at runtime are sometimes called "dynamic". Languages that analyze most of the information (type checking, [data ownership](https://doc.rust-lang.org/stable/book/ch04-00-understanding-ownership), etc.) before evaluating the program are sometimes called "static". The whole debate can get quite confusing, but for the purpose of this text, the main difference between a "static" and "dynamic" language is whether it has or has not the eval function._ ## Common Mistakes By insisting on strict parse-evaluation separation, we lose much of a flexibility users expect from dynamic interpreted languages, especially other shells, such as bash, fish, zsh and others. This leads to the examples at the beginning of this page not working. Let's break them down one by one -_Note: The following examples use [`source`](/commands/docs/source.md), but similar conclusions apply to other commands that parse Nushell source code, such as [`use`](/commands/docs/use.md), [`overlay use`](/commands/docs/overlay_use.md), [`hide`](/commands/docs/hide.md), [`register`](/commands/docs/register.md) or [`source-env`](/commands/docs/source-env.md)._ +_Note: The following examples use [`source`](/commands/docs/source), but similar conclusions apply to other commands that parse Nushell source code, such as [`use`](/commands/docs/use), [`overlay use`](/commands/docs/overlay_use), [`hide`](/commands/docs/hide), [`register`](/commands/docs/register) or [`source-env`](/commands/docs/source-env)._ ### 1. Sourcing a dynamic path @@ -218,7 +218,7 @@ if ('spam/foo.nu' | path exists) { } ``` -This one is similar to the previous example. `cd spam` changes the directory _during evaluation_ but [`source-env`](/commands/docs/source-env.md) attempts to open and read `foo.nu` during parsing. +This one is similar to the previous example. `cd spam` changes the directory _during evaluation_ but [`source-env`](/commands/docs/source-env) attempts to open and read `foo.nu` during parsing. ## REPL @@ -242,7 +242,7 @@ means the following: 1. Launch `nu` 2. Type `print "Hello world!"`, press Enter -3. Type [`ls`](/commands/docs/ls.md), press Enter +3. Type [`ls`](/commands/docs/ls), press Enter Hopefully, that's clear. Now, when you press Enter, these things happen: @@ -260,7 +260,7 @@ cd spam source-env foo.nu ``` -does not work because the directory will be changed _after_ [`source-env`](/commands/docs/source-env.md) attempts to read the file. Running these commands as separate REPL entries, however, works: +does not work because the directory will be changed _after_ [`source-env`](/commands/docs/source-env) attempts to read the file. Running these commands as separate REPL entries, however, works: ```nushell > cd spam @@ -279,13 +279,13 @@ To see why, let's break down what happens in the example: 6. Evaluate `source-env foo.nu` 7. Merge environment (including the current directory) into the Nushell state -When [`source-env`](/commands/docs/source-env.md) tries to open `foo.nu` during the parsing in step 5., it can do so because the directory change from step 3. was merged into the Nushell state in step 4. and therefore is visible in the following parse-evaluation cycles. +When [`source-env`](/commands/docs/source-env) tries to open `foo.nu` during the parsing in step 5., it can do so because the directory change from step 3. was merged into the Nushell state in step 4. and therefore is visible in the following parse-evaluation cycles. ### Parse-time Evaluation While it is impossible to add parsing into the evaluation, we can add _a little bit_ of evaluation into parsing. This feature has been added [only recently](https://github.com/nushell/nushell/pull/7436) and we're going to expand it as needed. -One pattern that this unlocks is being able to [`source`](/commands/docs/source.md)/[`use`](/commands/docs/use.md)/etc. a path from a "variable". We've seen that +One pattern that this unlocks is being able to [`source`](/commands/docs/source)/[`use`](/commands/docs/use)/etc. a path from a "variable". We've seen that ```nushell let some_path = $nu.default-config-dir @@ -326,4 +326,4 @@ Compiled ("static") languages also tend to have a way to convey some logic at co ## Conclusion -Nushell operates in a scripting language space typically dominated by "dynamic" "interpreted" languages, such as Python, bash, zsh, fish, etc. While Nushell is also "interpreted" in a sense that it runs the code immediately, instead of storing the intermediate representation (IR) to a disk, one feature sets it apart from the pack: It does not have an **eval function**. In other words, Nushell cannot parse code and manipulate its IR during evaluation. This gives Nushell one characteristic typical for "static" "compiled" languages, such as C or Rust: All the source code must be visible to the parser beforehand, just like all the source code must be available to a C or Rust compiler. For example, you cannot [`source`](/commands/docs/source.md) or [`use`](/commands/docs/use.md) a path computed "dynamically" (during evaluation). This is surprising for users of more traditional scripting languages, but it helps to _think of Nushell as a compiled language_. +Nushell operates in a scripting language space typically dominated by "dynamic" "interpreted" languages, such as Python, bash, zsh, fish, etc. While Nushell is also "interpreted" in a sense that it runs the code immediately, instead of storing the intermediate representation (IR) to a disk, one feature sets it apart from the pack: It does not have an **eval function**. In other words, Nushell cannot parse code and manipulate its IR during evaluation. This gives Nushell one characteristic typical for "static" "compiled" languages, such as C or Rust: All the source code must be visible to the parser beforehand, just like all the source code must be available to a C or Rust compiler. For example, you cannot [`source`](/commands/docs/source) or [`use`](/commands/docs/use) a path computed "dynamically" (during evaluation). This is surprising for users of more traditional scripting languages, but it helps to _think of Nushell as a compiled language_. diff --git a/src/content/docs/book/installation.mdx b/src/content/docs/book/installation.mdx index 76ee6125091..45905262176 100644 --- a/src/content/docs/book/installation.mdx +++ b/src/content/docs/book/installation.mdx @@ -110,7 +110,7 @@ Nu releases are published as source to the popular Rust package registry [crates That's it! The `cargo` tool will do the work of downloading Nu and its source dependencies, building it, and installing it into the cargo bin path. -If you want to install with support for [dataframes](dataframes.md), you can install using the `--features=dataframe` flag. +If you want to install with support for [dataframes](/book/dataframes), you can install using the `--features=dataframe` flag. diff --git a/src/content/docs/book/introduction.md b/src/content/docs/book/introduction.md index 43d65baf63e..f74127f0d01 100644 --- a/src/content/docs/book/introduction.md +++ b/src/content/docs/book/introduction.md @@ -10,66 +10,201 @@ Nu takes cues from a lot of familiar territory: traditional shells like bash, ob The easiest way to see what Nu can do is to start with some examples, so let's dive in. -The first thing you'll notice when you run a command like [`ls`](/commands/docs/ls.md) is that instead of a block of text coming back, you get a structured table. - -@[code](@snippets/introduction/ls_example.sh) +The first thing you'll notice when you run a command like [`ls`](/commands/docs/ls) is that instead of a block of text coming back, you get a structured table. + +```nushell +> ls +╭────┬───────────────────────┬──────┬───────────┬─────────────╮ +│ # │ name │ type │ size │ modified │ +├────┼───────────────────────┼──────┼───────────┼─────────────┤ +│ 0 │ 404.html │ file │ 429 B │ 3 days ago │ +│ 1 │ CONTRIBUTING.md │ file │ 955 B │ 8 mins ago │ +│ 2 │ Gemfile │ file │ 1.1 KiB │ 3 days ago │ +│ 3 │ Gemfile.lock │ file │ 6.9 KiB │ 3 days ago │ +│ 4 │ LICENSE │ file │ 1.1 KiB │ 3 days ago │ +│ 5 │ README.md │ file │ 213 B │ 3 days ago │ +... +``` The table is more than just showing the directory in a different way. Just like tables in a spreadsheet, this table allows us to work with the data more interactively. -The first thing we'll do is to sort our table by size. To do this, we'll take the output from [`ls`](/commands/docs/ls.md) and feed it into a command that can sort tables based on the contents of a column. - -@[code](@snippets/introduction/ls_sort_by_reverse_example.sh) - -You can see that to make this work we didn't pass commandline arguments to [`ls`](/commands/docs/ls.md). Instead, we used the [`sort-by`](/commands/docs/sort-by.md) command that Nu provides to do the sorting of the output of the [`ls`](/commands/docs/ls.md) command. To see the biggest files on top, we also used [`reverse`](/commands/docs/reverse.md). - -Nu provides many commands that can work on tables. For example, we could filter the contents of the [`ls`](/commands/docs/ls.md) table so that it only shows files over 1 kilobyte: - -@[code](@snippets/introduction/ls_where_example.sh) +The first thing we'll do is to sort our table by size. To do this, we'll take the output from [`ls`](/commands/docs/ls) and feed it into a command that can sort tables based on the contents of a column. + +```nushell +> ls | sort-by size | reverse +╭────┬───────────────────────┬──────┬───────────┬─────────────╮ +│ # │ name │ type │ size │ modified │ +├────┼───────────────────────┼──────┼───────────┼─────────────┤ +│ 0 │ Gemfile.lock │ file │ 6.9 KiB │ 3 days ago │ +│ 1 │ SUMMARY.md │ file │ 3.7 KiB │ 3 days ago │ +│ 2 │ Gemfile │ file │ 1.1 KiB │ 3 days ago │ +│ 3 │ LICENSE │ file │ 1.1 KiB │ 3 days ago │ +│ 4 │ CONTRIBUTING.md │ file │ 955 B │ 9 mins ago │ +│ 5 │ books.md │ file │ 687 B │ 3 days ago │ +... +``` + +You can see that to make this work we didn't pass commandline arguments to [`ls`](/commands/docs/ls). Instead, we used the [`sort-by`](/commands/docs/sort-by) command that Nu provides to do the sorting of the output of the [`ls`](/commands/docs/ls) command. To see the biggest files on top, we also used [`reverse`](/commands/docs/reverse). + +Nu provides many commands that can work on tables. For example, we could filter the contents of the [`ls`](/commands/docs/ls) table so that it only shows files over 1 kilobyte: + +```nushell +> ls | where size > 1kb +╭───┬───────────────────┬──────┬─────────┬────────────╮ +│ # │ name │ type │ size │ modified │ +├───┼───────────────────┼──────┼─────────┼────────────┤ +│ 0 │ Gemfile │ file │ 1.1 KiB │ 3 days ago │ +│ 1 │ Gemfile.lock │ file │ 6.9 KiB │ 3 days ago │ +│ 2 │ LICENSE │ file │ 1.1 KiB │ 3 days ago │ +│ 3 │ SUMMARY.md │ file │ 3.7 KiB │ 3 days ago │ +╰───┴───────────────────┴──────┴─────────┴────────────╯ +``` Just as in the Unix philosophy, being able to have commands talk to each other gives us ways to mix-and-match in many different combinations. Let's look at a different command: -@[code](@snippets/introduction/ps_example.sh) - -You may be familiar with the [`ps`](/commands/docs/ps.md) command if you've used Linux. With it, we can get a list of all the current processes that the system is running, what their status is, and what their name is. We can also see the CPU load for the processes. - -What if we wanted to show the processes that were actively using the CPU? Just like we did with the [`ls`](/commands/docs/ls.md) command earlier, we can also work with the table that the [`ps`](/commands/docs/ps.md) command gives back to us: - -@[code](@snippets/introduction/ps_where_example.sh) - -So far, we've been using [`ls`](/commands/docs/ls.md) and [`ps`](/commands/docs/ps.md) to list files and processes. Nu also offers other commands that can create tables of useful information. Next, let's explore [`date`](/commands/docs/date.md) and [`sys`](/commands/docs/sys.md). - -Running [`date now`](/commands/docs/date_now.md) gives us information about the current day and time: - -@[code](@snippets/introduction/date_example.sh) - -To get the date as a table we can feed it into [`date to-table`](/commands/docs/date_to-table.md) - -@[code](@snippets/introduction/date_table_example.sh) - -Running [`sys`](/commands/docs/sys.md) gives information about the system that Nu is running on: - -@[code](@snippets/introduction/sys_example.sh) - -This is a bit different than the tables we saw before. The [`sys`](/commands/docs/sys.md) command gives us a table that contains structured tables in the cells instead of simple values. To take a look at this data, we need to _get_ the column to view: - -@[code](@snippets/introduction/sys_get_example.sh) - -The [`get`](/commands/docs/get.md) command lets us jump into the contents of a column of the table. Here, we're looking into the "host" column, which contains information about the host that Nu is running on. The name of the OS, the hostname, the CPU, and more. Let's get the name of the users on the system: - -@[code](@snippets/introduction/sys_get_nested_example.sh) +```nushell +> ps +╭─────┬───────┬───────┬──────────────────────────────────────────────┬─────────┬───────┬──────────┬──────────╮ +│ # │ pid │ ppid │ name │ status │ cpu │ mem │ virtual │ +├─────┼───────┼───────┼──────────────────────────────────────────────┼─────────┼───────┼──────────┼──────────┤ +│ 0 │ 87194 │ 1 │ mdworker_shared │ Sleep │ 0.00 │ 25.9 MB │ 418.0 GB │ +│ 1 │ 87183 │ 2314 │ Arc Helper (Renderer) │ Sleep │ 0.00 │ 59.9 MB │ 1.6 TB │ +│ 2 │ 87182 │ 2314 │ Arc Helper (Renderer) │ Sleep │ 0.23 │ 224.3 MB │ 1.6 TB │ +│ 3 │ 87156 │ 87105 │ Code Helper (Plugin) │ Sleep │ 0.00 │ 56.0 MB │ 457.4 GB │ +... +``` + +You may be familiar with the [`ps`](/commands/docs/ps) command if you've used Linux. With it, we can get a list of all the current processes that the system is running, what their status is, and what their name is. We can also see the CPU load for the processes. + +What if we wanted to show the processes that were actively using the CPU? Just like we did with the [`ls`](/commands/docs/ls) command earlier, we can also work with the table that the [`ps`](/commands/docs/ps) command gives back to us: + +```nushell +> ps | where cpu > 5 +╭───┬───────┬───────┬─────────────────────────────────────────┬─────────┬───────┬──────────┬──────────╮ +│ # │ pid │ ppid │ name │ status │ cpu │ mem │ virtual │ +├───┼───────┼───────┼─────────────────────────────────────────┼─────────┼───────┼──────────┼──────────┤ +│ 0 │ 86759 │ 86275 │ nu │ Running │ 6.27 │ 38.7 MB │ 419.7 GB │ +│ 1 │ 89134 │ 1 │ com.apple.Virtualization.VirtualMachine │ Running │ 23.92 │ 1.5 GB │ 427.3 GB │ +│ 2 │ 70414 │ 1 │ VTDecoderXPCService │ Sleep │ 19.04 │ 17.5 MB │ 419.7 GB │ +│ 3 │ 2334 │ 1 │ TrackpadExtension │ Sleep │ 7.47 │ 25.3 MB │ 418.8 GB │ +│ 4 │ 1205 │ 1 │ iTerm2 │ Sleep │ 11.92 │ 657.2 MB │ 421.7 GB │ +╰───┴───────┴───────┴─────────────────────────────────────────┴─────────┴───────┴──────────┴──────────╯ +``` + +So far, we've been using [`ls`](/commands/docs/ls) and [`ps`](/commands/docs/ps) to list files and processes. Nu also offers other commands that can create tables of useful information. Next, let's explore [`date`](/commands/docs/date) and [`sys`](/commands/docs/sys). + +Running [`date now`](/commands/docs/date_now) gives us information about the current day and time: + +```nushell +> date now +Mon, 12 Feb 2024 12:32:15 -0800 (now) +``` + +To get the date as a table we can feed it into [`date to-table`](/commands/docs/date_to-table) + +```nushell +> date now | date to-table +╭───┬──────┬───────┬─────┬──────┬────────┬────────┬────────────┬──────────╮ +│ # │ year │ month │ day │ hour │ minute │ second │ nanosecond │ timezone │ +├───┼──────┼───────┼─────┼──────┼────────┼────────┼────────────┼──────────┤ +│ 0 │ 2024 │ 2 │ 12 │ 12 │ 32 │ 50 │ 701310000 │ -08:00 │ +╰───┴──────┴───────┴─────┴──────┴────────┴────────┴────────────┴──────────╯ +``` + +Running [`sys`](/commands/docs/sys) gives information about the system that Nu is running on: + +```nushell +> sys +╭───────┬──────────────────────────────────────────────────────────────────────────────────────────╮ +│ │ ╭───────────────────┬──────────────────────────────────────────────────────────────────╮ │ +│ host │ │ name │ Darwin │ │ +│ │ │ os_version │ 14.3.1 │ │ +│ │ │ long_os_version │ MacOS 14.3.1 │ │ +│ │ │ kernel_version │ 23.3.0 │ │ +│ │ │ hostname │ Johns-MacBook-Air.local │ │ +│ │ │ uptime │ 2day 17hr 6min 18sec │ │ +│ │ │ boot_time │ 2024-02-09T19:27:03-08:00 │ │ +``` + +This is a bit different than the tables we saw before. The [`sys`](/commands/docs/sys) command gives us a table that contains structured tables in the cells instead of simple values. To take a look at this data, we need to _get_ the column to view: + +```nushell +> sys | get host +╭─────────────────────────┬────────────────────────────────────────────────────────────────────────╮ +│ name │ Darwin │ +│ os_version │ 14.3.1 │ +│ long_os_version │ MacOS 14.3.1 │ +│ kernel_version │ 23.3.0 │ +│ hostname │ Johns-MacBook-Air.local │ +│ uptime │ 2day 17hr 7min 14sec │ +│ boot_time │ 2024-02-09T19:27:03-08:00 │ +``` + +The [`get`](/commands/docs/get) command lets us jump into the contents of a column of the table. Here, we're looking into the "host" column, which contains information about the host that Nu is running on. The name of the OS, the hostname, the CPU, and more. Let's get the name of the users on the system: + +```nushell +> sys | get host.sessions.name +╭───┬────╮ +│ 0 │ jt │ +╰───┴────╯ +``` Right now, there's just one user on the system named "jt". You'll notice that we can pass a column path (the `host.sessions.name` part) and not just the name of the column. Nu will take the column path and go to the corresponding bit of data in the table. You might have noticed something else that's different. Rather than having a table of data, we have just a single element: the string "jt". Nu works with both tables of data as well as strings. Strings are an important part of working with commands outside of Nu. -Let's see how strings work outside of Nu in action. We'll take our example from before and run the external [`echo`](/commands/docs/echo.md) command (the `^` tells Nu to not use the built-in [`echo`](/commands/docs/echo.md) command): +Let's see how strings work outside of Nu in action. We'll take our example from before and run the external [`echo`](/commands/docs/echo) command (the `^` tells Nu to not use the built-in [`echo`](/commands/docs/echo) command): -@[code](@snippets/introduction/sys_get_external_echo_example.sh) +```nushell +> sys | get host.sessions.name | each { |it| ^echo $it } +jt +``` -If this looks very similar to what we had before, you have a keen eye! It is similar, but with one important difference: we've called `^echo` with the value we saw earlier. This allows us to pass data out of Nu into [`echo`](/commands/docs/echo.md) (or any command outside of Nu, like `git` for example). +If this looks very similar to what we had before, you have a keen eye! It is similar, but with one important difference: we've called `^echo` with the value we saw earlier. This allows us to pass data out of Nu into [`echo`](/commands/docs/echo) (or any command outside of Nu, like `git` for example). ### Getting Help -Help text for any of Nu's built-in commands can be discovered with the [`help`](/commands/docs/help.md) command. To see all commands, run [`help commands`](/commands/docs/help_commands.md). You can also search for a topic by doing `help -f `. - -@[code](@snippets/introduction/help_example.sh) +Help text for any of Nu's built-in commands can be discovered with the [`help`](/commands/docs/help) command. To see all commands, run [`help commands`](/commands/docs/help_commands). You can also search for a topic by doing `help -f `. + +```nushell +Explore and manipulate paths. + +You must use one of the following subcommands. Using this command as-is will only produce this help message. + +There are three ways to represent a path: + +* As a path literal, e.g., '/home/viking/spam.txt' +* As a structured path: a table with 'parent', 'stem', and 'extension' (and +* 'prefix' on Windows) columns. This format is produced by the 'path parse' + subcommand. +* As a list of path parts, e.g., '[ / home viking spam.txt ]'. Splitting into + parts is done by the `path split` command. + +All subcommands accept all three variants as an input. Furthermore, the 'path +join' subcommand can be used to join the structured path or path parts back into +the path literal. + +Usage: + > path + +Subcommands: + path basename - Get the final component of a path. + path dirname - Get the parent directory of a path. + path exists - Check whether a path exists. + path expand - Try to expand a path to its absolute form. + path join - Join a structured path or a list of path parts. + path parse - Convert a path into structured data. + path relative-to - Express a path as relative to another path. + path split - Split a path into a list based on the system's path separator. + path type - Get the type of the object a path refers to (e.g., file, dir, symlink). + +Flags: + -h, --help - Display the help message for this command + +Input/output types: + ╭───┬─────────┬────────╮ + │ # │ input │ output │ + ├───┼─────────┼────────┤ + │ 0 │ nothing │ string │ + ╰───┴─────────┴────────╯ +``` diff --git a/src/content/docs/book/line_editor.md b/src/content/docs/book/line_editor.md index ee260b916e3..3a97cd5bdae 100644 --- a/src/content/docs/book/line_editor.md +++ b/src/content/docs/book/line_editor.md @@ -241,7 +241,7 @@ Each keybinding requires the next elements: :::tip All of the available modifiers, keycodes and events can be found with -the command [`keybindings list`](/commands/docs/keybindings_list.md) +the command [`keybindings list`](/commands/docs/keybindings_list) ::: :::tip @@ -542,7 +542,7 @@ e.g. to disable screen clearing with `Ctrl + l` for all edit modes ### Troubleshooting keybinding problems Your terminal environment may not always propagate your key combinations on to nushell the way you expect it to. -You can use the command [`keybindings listen`](/commands/docs/keybindings_listen.md) to figure out if certain keypresses are actually received by nushell, and how. +You can use the command [`keybindings listen`](/commands/docs/keybindings_listen) to figure out if certain keypresses are actually received by nushell, and how. ## Menus @@ -775,8 +775,8 @@ With that in mind, the desired menu would look like this ``` As you can see, the new menu is identical to the `history_menu` previously -described. The only huge difference is the new field called [`source`](/commands/docs/source.md). The -[`source`](/commands/docs/source.md) field is a nushell definition of the values you want to display in the +described. The only huge difference is the new field called [`source`](/commands/docs/source). The +[`source`](/commands/docs/source) field is a nushell definition of the values you want to display in the menu. For this menu we are extracting the data from `$nu.scope.vars` and we are using it to create records that will be used to populate the menu. diff --git a/src/content/docs/book/loading_data.md b/src/content/docs/book/loading_data.md index 7e595f2aac4..6060c1a0c62 100644 --- a/src/content/docs/book/loading_data.md +++ b/src/content/docs/book/loading_data.md @@ -2,11 +2,11 @@ title: Loading Data --- -Earlier, we saw how you can use commands like [`ls`](/commands/docs/ls.md), [`ps`](/commands/docs/ps.md), [`date`](/commands/docs/date.md), and [`sys`](/commands/docs/sys.md) to load information about your files, processes, time of date, and the system itself. Each command gives us a table of information that we can explore. There are other ways we can load in a table of data to work with. +Earlier, we saw how you can use commands like [`ls`](/commands/docs/ls), [`ps`](/commands/docs/ps), [`date`](/commands/docs/date), and [`sys`](/commands/docs/sys) to load information about your files, processes, time of date, and the system itself. Each command gives us a table of information that we can explore. There are other ways we can load in a table of data to work with. ## Opening files -One of Nu's most powerful assets in working with data is the [`open`](/commands/docs/open.md) command. It is a multi-tool that can work with a number of different data formats. To see what this means, let's try opening a json file: +One of Nu's most powerful assets in working with data is the [`open`](/commands/docs/open) command. It is a multi-tool that can work with a number of different data formats. To see what this means, let's try opening a json file: ```nushell frame="terminal" open package.json @@ -24,9 +24,9 @@ open package.json ╰─────────────────┴──────────────────────────────────╯ ``` -In a similar way to [`ls`](/commands/docs/ls.md), opening a file type that Nu understands will give us back something that is more than just text (or a stream of bytes). Here we open a "package.json" file from a JavaScript project. Nu can recognize the JSON text and parse it to a table of data. +In a similar way to [`ls`](/commands/docs/ls), opening a file type that Nu understands will give us back something that is more than just text (or a stream of bytes). Here we open a "package.json" file from a JavaScript project. Nu can recognize the JSON text and parse it to a table of data. -If we wanted to check the version of the project we were looking at, we can use the [`get`](/commands/docs/get.md) command. +If we wanted to check the version of the project we were looking at, we can use the [`get`](/commands/docs/get) command. ```nushell frame="terminal" open editors/vscode/package.json | get version @@ -104,7 +104,7 @@ That is, any JSON code is a valid NUON code, therefore a valid Nushell code. Compared to JSON, NUON is more "human-friendly". For example, comments are allowed and commas are not required. -One limitation of NUON currently is that it cannot represent all of the Nushell [data types](types_of_data.md). +One limitation of NUON currently is that it cannot represent all of the Nushell [data types](types_of_data). Most notably, NUON does not allow to serialize blocks. ## Handling Strings @@ -133,7 +133,7 @@ open people.txt | lines ───┴────────────────────────────── ``` -We can see that we're working with the lines because we're back into a list. Our next step is to see if we can split up the rows into something a little more useful. For that, we'll use the [`split`](/commands/docs/split.md) command. [`split`](/commands/docs/split.md), as the name implies, gives us a way to split a delimited string. We will use [`split`](/commands/docs/split.md)'s `column` subcommand to split the contents across multiple columns. We tell it what the delimiter is, and it does the rest: +We can see that we're working with the lines because we're back into a list. Our next step is to see if we can split up the rows into something a little more useful. For that, we'll use the [`split`](/commands/docs/split) command. [`split`](/commands/docs/split), as the name implies, gives us a way to split a delimited string. We will use [`split`](/commands/docs/split)'s `column` subcommand to split the contents across multiple columns. We tell it what the delimiter is, and it does the rest: ```nushell frame="terminal" open people.txt | lines | split column "|" @@ -146,7 +146,7 @@ open people.txt | lines | split column "|" ───┴──────────┴───────────┴─────────── ``` -That _almost_ looks correct. It looks like there's an extra space there. Let's [`trim`](/commands/docs/str_trim.md) that extra space: +That _almost_ looks correct. It looks like there's an extra space there. Let's [`trim`](/commands/docs/str_trim) that extra space: ```nushell frame="terminal" open people.txt | lines | split column "|" | str trim @@ -159,7 +159,7 @@ open people.txt | lines | split column "|" | str trim ───┴─────────┴─────────┴────────── ``` -Not bad. The [`split`](/commands/docs/split.md) command gives us data we can use. It also goes ahead and gives us default column names: +Not bad. The [`split`](/commands/docs/split) command gives us data we can use. It also goes ahead and gives us default column names: ```nushell frame="terminal" open people.txt | lines | split column "|" | str trim | get column1 @@ -198,9 +198,9 @@ open people.txt | lines | split column "|" first_name last_name job | str trim | There are other commands you can use to work with strings: -- [`str`](/commands/docs/str.md) -- [`lines`](/commands/docs/lines.md) -- [`size`](/commands/docs/size.md) +- [`str`](/commands/docs/str) +- [`lines`](/commands/docs/lines) +- [`size`](/commands/docs/size) There is also a set of helper commands we can call if we know the data has a structure that Nu should be able to understand. For example, let's open a Rust lock file: @@ -213,7 +213,7 @@ name = "adhoc_derive" version = "0.7.20" ``` -The "Cargo.lock" file is actually a .toml file, but the file extension isn't .toml. That's okay, we can use the [`from`](/commands/docs/from.md) command using the `toml` subcommand: +The "Cargo.lock" file is actually a .toml file, but the file extension isn't .toml. That's okay, we can use the [`from`](/commands/docs/from) command using the `toml` subcommand: ```nushell frame="terminal" open Cargo.lock | from toml @@ -223,11 +223,11 @@ open Cargo.lock | from toml ╰─────────┴──────────────────╯ ``` -The [`from`](/commands/docs/from.md) command can be used for each of the structured data text formats that Nu can open and understand by passing it the supported format as a subcommand. +The [`from`](/commands/docs/from) command can be used for each of the structured data text formats that Nu can open and understand by passing it the supported format as a subcommand. ## Opening in raw mode -While it's helpful to be able to open a file and immediately work with a table of its data, this is not always what you want to do. To get to the underlying text, the [`open`](/commands/docs/open.md) command can take an optional `--raw` flag: +While it's helpful to be able to open a file and immediately work with a table of its data, this is not always what you want to do. To get to the underlying text, the [`open`](/commands/docs/open) command can take an optional `--raw` flag: ```nushell frame="terminal" [package] @@ -243,13 +243,13 @@ edition = "2021" ## SQLite -SQLite databases are automatically detected by [`open`](/commands/docs/open.md), no matter what their file extension is. You can open a whole database: +SQLite databases are automatically detected by [`open`](/commands/docs/open), no matter what their file extension is. You can open a whole database: ```nushell frame="terminal" open foo.db ``` -Or [`get`](/commands/docs/get.md) a specific table: +Or [`get`](/commands/docs/get) a specific table: ```nushell frame="terminal" open foo.db | get some_table @@ -265,7 +265,7 @@ open foo.db | query db "select * from some_table" ## Fetching URLs -In addition to loading files from your filesystem, you can also load URLs by using the [`http get`](/commands/docs/http.md) command. This will fetch the contents of the URL from the internet and return it: +In addition to loading files from your filesystem, you can also load URLs by using the [`http get`](/commands/docs/http) command. This will fetch the contents of the URL from the internet and return it: ```nushell frame="terminal" http get https://blog.rust-lang.org/feed.xml diff --git a/src/content/docs/book/metadata.md b/src/content/docs/book/metadata.md index 5f355f4ac2a..e84d29e98a9 100644 --- a/src/content/docs/book/metadata.md +++ b/src/content/docs/book/metadata.md @@ -15,11 +15,11 @@ error: Expected a string from pipeline | ---------- object originates from here ``` -The error message tells us not only that what we gave [`from toml`](/commands/docs/from_toml.md) wasn't a string, but also where the value originally came from. How would it know that? +The error message tells us not only that what we gave [`from toml`](/commands/docs/from_toml) wasn't a string, but also where the value originally came from. How would it know that? Values that flow through a pipeline in Nu often have a set of additional information, or metadata, attached to them. These are known as tags, like the tags on an item in a store. These tags don't affect the data, but they give Nu a way to improve the experience of working with that data. -Let's run the [`open`](/commands/docs/open.md) command again, but this time, we'll look at the tags it gives back: +Let's run the [`open`](/commands/docs/open) command again, but this time, we'll look at the tags it gives back: ```nushell > metadata (open Cargo.toml) diff --git a/src/content/docs/book/modules.md b/src/content/docs/book/modules.md index 028176dc142..36720f07d97 100644 --- a/src/content/docs/book/modules.md +++ b/src/content/docs/book/modules.md @@ -118,7 +118,7 @@ You can define `main` command inside `mod.nu` to create a command named after th ## Import Pattern -Anything after the [`use`](/commands/docs/use.md) keyword forms an **import pattern** which controls how the definitions are imported. +Anything after the [`use`](/commands/docs/use) keyword forms an **import pattern** which controls how the definitions are imported. The import pattern has the following structure `use head members...` where `head` defines the module (name of an existing module, file, or directory). The members are optional and specify what exactly should be imported from the module. Using our `greetings` example: @@ -260,7 +260,7 @@ As you can see, defining the submodule structure also shapes the command line AP ## Environment Variables -Modules can also define an environment using [`export-env`](/commands/docs/export-env.md): +Modules can also define an environment using [`export-env`](/commands/docs/export-env): ```nushell title="greetings.nu" @@ -273,7 +273,7 @@ export def hello [] { } ``` -When [`use`](/commands/docs/use.md) is evaluated, it will run the code inside the [`export-env`](/commands/docs/export-env.md) block and merge its environment into the current scope: +When [`use`](/commands/docs/use) is evaluated, it will run the code inside the [`export-env`](/commands/docs/export-env) block and merge its environment into the current scope: ```nushell frame="terminal" use greetings.nu @@ -310,7 +310,7 @@ Like any programming language, Nushell is also a product of a tradeoff and there ### `export-env` runs only when the `use` call is _evaluated_ -If you also want to keep your variables in separate modules and export their environment, you could try to [`export use`](/commands/docs/export_use.md) it: +If you also want to keep your variables in separate modules and export their environment, you could try to [`export use`](/commands/docs/export_use) it: ```nushell title="purpose.nu" export-env { @@ -367,7 +367,7 @@ This section describes some useful patterns using modules. ### Local Definitions -Anything defined in a module without the [`export`](/commands/docs/export.md) keyword will work only in the module's scope. +Anything defined in a module without the [`export`](/commands/docs/export) keyword will work only in the module's scope. ```nushell title="greetings.nu" @@ -470,7 +470,7 @@ Another example could be our unofficial Conda module: https://github.com/nushell ## Hiding Any custom command or alias, imported from a module or not, can be "hidden", restoring the previous definition. -We do this with the [`hide`](/commands/docs/hide.md) command: +We do this with the [`hide`](/commands/docs/hide) command: ```nushell frame="terminal" def foo [] { "foo" } @@ -484,7 +484,7 @@ hide foo # error! command not found! ``` -The [`hide`](/commands/docs/hide.md) command also accepts import patterns, just like [`use`](/commands/docs/use.md). +The [`hide`](/commands/docs/hide) command also accepts import patterns, just like [`use`](/commands/docs/use). The import pattern is interpreted slightly differently, though. It can be one of the following: diff --git a/src/content/docs/book/moving_around.mdx b/src/content/docs/book/moving_around.mdx index d63219eae9d..370cc41ae4b 100644 --- a/src/content/docs/book/moving_around.mdx +++ b/src/content/docs/book/moving_around.mdx @@ -10,9 +10,9 @@ Early shells allow you to move around your filesystem and run commands, and mode -As we've seen in other chapters, [`ls`](/commands/docs/ls.md) is a command for viewing the contents of a path. Nu will return the contents as a table that we can use. +As we've seen in other chapters, [`ls`](/commands/docs/ls) is a command for viewing the contents of a path. Nu will return the contents as a table that we can use. -The [`ls`](/commands/docs/ls.md) command also takes an optional argument, to change what you'd like to view. For example, we can list the files that end in ".md" +The [`ls`](/commands/docs/ls) command also takes an optional argument, to change what you'd like to view. For example, we can list the files that end in "" ```nushell frame="terminal" ls *.md @@ -52,9 +52,9 @@ ls **/*.md Here, we're looking for any file that ends with ".md", and the two asterisks further say "in any directory starting from here". -In other shells (like bash), glob expansion happens in the shell and the invoked program (`ls` in the example above) receives a list of matched files. In Nushell however, the string you enter is passed "as is" to the command, and some commands (like `ls`, `mv`, `cp` and `rm`) interpret their input string as a glob pattern. For example the [`ls` command's help page](https://www.nushell.sh/commands/docs/ls.html) shows that it takes the parameter: `pattern: the glob pattern to use (optional)`. +In other shells (like bash), glob expansion happens in the shell and the invoked program (`ls` in the example above) receives a list of matched files. In Nushell however, the string you enter is passed "as is" to the command, and some commands (like `ls`, `mv`, `cp` and `rm`) interpret their input string as a glob pattern. For example the [`ls` command's help page](https://www.nushell.sh/commands/docs/ls) shows that it takes the parameter: `pattern: the glob pattern to use (optional)`. -Globbing syntax in these commands not only supports `*`, but also matching [single characters with `?` and character groups with `[...]`](https://docs.rs/nu-glob/latest/nu_glob/struct.Pattern.html). Note that this is a more limited syntax than what the dedicated [`glob` Nushell command](https://www.nushell.sh/commands/docs/glob.html) supports. +Globbing syntax in these commands not only supports `*`, but also matching [single characters with `?` and character groups with `[...]`](https://docs.rs/nu-glob/latest/nu_glob/struct.Pattern). Note that this is a more limited syntax than what the dedicated [`glob` Nushell command](https://www.nushell.sh/commands/docs/glob) supports. Escaping `*`, `?`, `[]` works by quoting them with single quotes or double quotes. To show the contents of a directory named `[slug]`, use `ls "[slug]"` or `ls '[slug]'`. Note that backtick quote doesn't escape glob, for example: cp `test dir/*` will copy all files inside `test dir` to current direcroty. @@ -63,32 +63,32 @@ Note that backtick quote doesn't escape glob, for example: cp `test dir/*` -To change from the current directory to a new one, we use the [`cd`](/commands/docs/cd.md) command. Just as in other shells, we can use either the name of the directory, or if we want to go up a directory we can use the `..` shortcut. +To change from the current directory to a new one, we use the [`cd`](/commands/docs/cd) command. Just as in other shells, we can use either the name of the directory, or if we want to go up a directory we can use the `..` shortcut. -Changing the current working directory can also be done if [`cd`](/commands/docs/cd.md) is omitted and a path by itself is given: +Changing the current working directory can also be done if [`cd`](/commands/docs/cd) is omitted and a path by itself is given: -**Note:** changing the directory with [`cd`](/commands/docs/cd.md) changes the `PWD` environment variable. This means that a change of a directory is kept to the current block. Once you exit the block, you'll return to the previous directory. You can learn more about working with this in the [environment chapter](./environment.md). +**Note:** changing the directory with [`cd`](/commands/docs/cd) changes the `PWD` environment variable. This means that a change of a directory is kept to the current block. Once you exit the block, you'll return to the previous directory. You can learn more about working with this in the [environment chapter](./environment). ## Filesystem commands Nu also provides some basic filesystem commands that work cross-platform. -We can move an item from one place to another using the [`mv`](/commands/docs/mv.md) command: +We can move an item from one place to another using the [`mv`](/commands/docs/mv) command: -We can copy an item from one location to another with the [`cp`](/commands/docs/cp.md) command: +We can copy an item from one location to another with the [`cp`](/commands/docs/cp) command: -We can remove an item with the [`rm`](/commands/docs/rm.md) command: +We can remove an item with the [`rm`](/commands/docs/rm) command: -The three commands also can use the glob capabilities we saw earlier with [`ls`](/commands/docs/ls.md). +The three commands also can use the glob capabilities we saw earlier with [`ls`](/commands/docs/ls). -Finally, we can create a new directory using the [`mkdir`](/commands/docs/mkdir.md) command: +Finally, we can create a new directory using the [`mkdir`](/commands/docs/mkdir) command: diff --git a/src/content/docs/book/nu_as_a_shell.md b/src/content/docs/book/nu_as_a_shell.md index 701aad7876c..1b61a80e437 100644 --- a/src/content/docs/book/nu_as_a_shell.md +++ b/src/content/docs/book/nu_as_a_shell.md @@ -4,29 +4,29 @@ title: Community # Nu as a Shell -The [Nu Fundamentals](nu_fundamentals.md) and [Programming in Nu](programming_in_nu.md) chapter focused mostly on the language aspects of Nushell. +The [Nu Fundamentals](nu_fundamentals) and [Programming in Nu](programming_in_nu) chapter focused mostly on the language aspects of Nushell. This chapter sheds the light on the parts of Nushell that are related to the Nushell interpreter (the Nushell [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop)). Some of the concepts are directly a part of the Nushell programming language (such as environment variables) while others are implemented purely to enhance the interactive experience (such as hooks) and thus are not present when, for example, running a script. -Many parameters of Nushell can be [configured](configuration.md). +Many parameters of Nushell can be [configured](configuration). The config itself is stored as an environment variable. Furthermore, Nushell has several different configuration files that are run on startup where you can put custom commands, aliases, etc. -A big feature of any shell are [environment variables](environment.md). +A big feature of any shell are [environment variables](environment). In Nushell, environment variables are scoped and can have any type supported by Nushell. This brings in some additional design considerations so please refer to the linked section for more details. -The other sections explain how to work with [stdout, stderr and exit codes](stdout_stderr_exit_codes.md), how to [escape a command call to the external command call](escaping.md), and how to [configure 3rd party prompts](3rdpartyprompts.md) to work with Nushell. +The other sections explain how to work with [stdout, stderr and exit codes](stdout_stderr_exit_codes), how to [escape a command call to the external command call](escaping), and how to [configure 3rd party prompts](3rdpartyprompts) to work with Nushell. -An interesting feature of Nushell is [shells](shells_in_shells.md) which let you work in multiple directories simultaneously. +An interesting feature of Nushell is [shells](shells_in_shells) which let you work in multiple directories simultaneously. -Nushell also has its own line editor [Reedline](line_editor.md). +Nushell also has its own line editor [Reedline](line_editor). With Nushell's config, it is possible to configure some of the Reedline's features, such as the prompt, keybindings, history, or menus. -It is also possible to define [custom signatures for external commands](externs.md) which lets you define [custom completions](custom_completions.md) for them (the custom completions work also for Nushell custom commands). +It is also possible to define [custom signatures for external commands](externs) which lets you define [custom completions](custom_completions) for them (the custom completions work also for Nushell custom commands). -[Coloring and Theming in Nu](coloring_and_theming.md) goes into more detail about how to configure Nushell's appearance. +[Coloring and Theming in Nu](coloring_and_theming) goes into more detail about how to configure Nushell's appearance. -If you want to schedule some commands to run in the background, [Background task in Nu](background_task.md) provide a simple guideline for you to follow. +If you want to schedule some commands to run in the background, [Background task in Nu](background_task) provide a simple guideline for you to follow. -And finally, [hooks](hooks.md) allow you to insert fragments of Nushell code to run at certain events. +And finally, [hooks](hooks) allow you to insert fragments of Nushell code to run at certain events. diff --git a/src/content/docs/book/nu_fundamentals.md b/src/content/docs/book/nu_fundamentals.md index 37c0357b1ad..98e1863df09 100644 --- a/src/content/docs/book/nu_fundamentals.md +++ b/src/content/docs/book/nu_fundamentals.md @@ -11,14 +11,14 @@ Nushell has a rich type system. You will find typical data types such as strings or integers and less typical data types, such as cell paths. Furthermore, one of the defining features of Nushell is the notion of _structured data_ which means that you can organize types into collections: lists, records, or tables. Contrary to the traditional Unix approach where commands communicate via plain text, Nushell commands communicate via these data types. -All of the above is explained in [Types of Data](types_of_data.md). +All of the above is explained in [Types of Data](types_of_data). -[Loading Data](loading_data.md) explains how to read common data formats, such as JSON, into _structured data_. This includes our own "NUON" data format. +[Loading Data](loading_data) explains how to read common data formats, such as JSON, into _structured data_. This includes our own "NUON" data format. -Just like Unix shells, Nushell commands can be composed into [pipelines](pipelines.md) to pass and modify a stream of data. +Just like Unix shells, Nushell commands can be composed into [pipelines](pipelines) to pass and modify a stream of data. -Some data types have interesting features that deserve their own sections: [strings](working_with_strings.md), [lists](working_with_lists.md), and [tables](working_with_tables.md). +Some data types have interesting features that deserve their own sections: [strings](working_with_strings), [lists](working_with_lists), and [tables](working_with_tables). Apart from explaining the features, these sections also show how to do some common operations, such as composing strings or updating values in a list. Finally, [Command Reference](/commands/) lists all the built-in commands with brief descriptions. -Note that you can also access this info from within Nushell using the [`help`](/commands/docs/help.md) command. +Note that you can also access this info from within Nushell using the [`help`](/commands/docs/help) command. diff --git a/src/content/docs/book/operators.md b/src/content/docs/book/operators.md index 89eafa4fa4a..ed5c2a02652 100644 --- a/src/content/docs/book/operators.md +++ b/src/content/docs/book/operators.md @@ -98,7 +98,7 @@ foobarbaz !~ bar # returns false ls | where name =~ ^nu # returns all files whose names start with "nu" ``` -Both operators use [the Rust regex crate's `is_match()` function](https://docs.rs/regex/latest/regex/struct.Regex.html#method.is_match). +Both operators use [the Rust regex crate's `is_match()` function](https://docs.rs/regex/latest/regex/struct.Regex#method.is_match). ## Case Sensitivity @@ -111,13 +111,13 @@ Operators are usually case-sensitive when operating on strings. There are a few "FOO" =~ "(?i)foo" # returns true ``` -2. Use the [`str contains`](/commands/docs/str_contains.md) command's `--insensitive` flag: +2. Use the [`str contains`](/commands/docs/str_contains) command's `--insensitive` flag: ```nushell frame="terminal" "FOO" | str contains --insensitive "foo" ``` -3. Convert strings to lowercase with [`str downcase`](/commands/docs/str_downcase.md) before comparing: +3. Convert strings to lowercase with [`str downcase`](/commands/docs/str_downcase) before comparing: ```nushell frame="terminal" ("FOO" | str downcase) == ("Foo" | str downcase) diff --git a/src/content/docs/book/overlays.md b/src/content/docs/book/overlays.md index 8e6798c94ad..60b3023c712 100644 --- a/src/content/docs/book/overlays.md +++ b/src/content/docs/book/overlays.md @@ -5,12 +5,12 @@ title: Overlays Overlays act as "layers" of definitions (custom commands, aliases, environment variables) that can be activated and deactivated on demand. They resemble virtual environments found in some languages, such as Python. -_Note: To understand overlays, make sure to check [Modules](modules.md) first as overlays build on top of modules._ +_Note: To understand overlays, make sure to check [Modules](modules) first as overlays build on top of modules._ ## Basics First, Nushell comes with one default overlay called `zero`. -You can inspect which overlays are active with the [`overlay list`](/commands/docs/overlay_list.md) command. +You can inspect which overlays are active with the [`overlay list`](/commands/docs/overlay_list) command. You should see the default overlay listed there. To create a new overlay, you first need a module: @@ -32,14 +32,14 @@ module spam { We'll use this module throughout the chapter, so whenever you see `overlay use spam`, assume `spam` is referring to this module. :::tip -The module can be created by any of the three methods described in [Modules](modules.md): +The module can be created by any of the three methods described in [Modules](modules): - "inline" modules (used in this example) - file - directory ::: -To create the overlay, call [`overlay use`](/commands/docs/overlay_use.md): +To create the overlay, call [`overlay use`](/commands/docs/overlay_use): ```nushell overlay use spam @@ -60,7 +60,7 @@ overlay list ───┴────── ``` -It brought the module's definitions into the current scope and evaluated the [`export-env`](/commands/docs/export-env.md) block the same way as [`use`](/commands/docs/use.md) command would (see [Modules](modules.md#environment-variables) chapter). +It brought the module's definitions into the current scope and evaluated the [`export-env`](/commands/docs/export-env) block the same way as [`use`](/commands/docs/use) command would (see [Modules](modules#environment-variables) chapter). :::tip In the following sections, the `>` prompt will be preceded by the name of the last active overlay. @@ -69,7 +69,7 @@ In the following sections, the `>` prompt will be preceded by the name of the la ## Removing an Overlay -If you don't need the overlay definitions anymore, call [`overlay hide`](/commands/docs/overlay_remove.md): +If you don't need the overlay definitions anymore, call [`overlay hide`](/commands/docs/overlay_remove): ```nushell (spam)> overlay hide spam @@ -96,7 +96,7 @@ foo ───┴────── ``` -The last way to remove an overlay is to call [`overlay hide`](/commands/docs/overlay_remove.md) without an argument which will remove the last active overlay. +The last way to remove an overlay is to call [`overlay hide`](/commands/docs/overlay_remove) without an argument which will remove the last active overlay. ## Overlays Are Recordable @@ -146,7 +146,7 @@ The solution can be to create a new empty overlay that would be used just for re The `eggs` command is added into `scratchpad` while keeping `spam` intact. -To make it less verbose, you can use the [`overlay new`](/commands/docs/overlay_new.md) command: +To make it less verbose, you can use the [`overlay new`](/commands/docs/overlay_new) command: ```nushell (zero)> overlay use spam @@ -160,7 +160,7 @@ To make it less verbose, you can use the [`overlay new`](/commands/docs/overlay_ ## Prefixed Overlays -The [`overlay use`](/commands/docs/overlay_use.md) command would take all commands and aliases from the module and put them directly into the current namespace. +The [`overlay use`](/commands/docs/overlay_use) command would take all commands and aliases from the module and put them directly into the current namespace. However, you might want to keep them as subcommands behind the module's name. That's what `--prefix` is for: @@ -236,7 +236,7 @@ foo The overlays are arranged as a stack. If multiple overlays contain the same definition, say `foo`, the one from the last active one would take precedence. -To bring an overlay to the top of the stack, you can call [`overlay use`](/commands/docs/overlay_use.md) again: +To bring an overlay to the top of the stack, you can call [`overlay use`](/commands/docs/overlay_use) again: ```nushell (zero)> def foo [] { "foo-in-zero" } diff --git a/src/content/docs/book/parallelism.md b/src/content/docs/book/parallelism.md index c7f7508fcf5..e785c130c4b 100644 --- a/src/content/docs/book/parallelism.md +++ b/src/content/docs/book/parallelism.md @@ -8,11 +8,11 @@ You will notice these commands with their characteristic `par-` naming. Each cor ## par-each -The most common parallel command is [`par-each`](/commands/docs/par-each.md), a companion to the [`each`](/commands/docs/each.md) command. +The most common parallel command is [`par-each`](/commands/docs/par-each), a companion to the [`each`](/commands/docs/each) command. -Like [`each`](/commands/docs/each.md), [`par-each`](/commands/docs/par-each.md) works on each element in the pipeline as it comes in, running a block on each. Unlike [`each`](/commands/docs/each.md), [`par-each`](/commands/docs/par-each.md) will do these operations in parallel. +Like [`each`](/commands/docs/each), [`par-each`](/commands/docs/par-each) works on each element in the pipeline as it comes in, running a block on each. Unlike [`each`](/commands/docs/each), [`par-each`](/commands/docs/par-each) will do these operations in parallel. -Let's say you wanted to count the number of files in each sub-directory of the current directory. Using [`each`](/commands/docs/each.md), you could write this as: +Let's say you wanted to count the number of files in each sub-directory of the current directory. Using [`each`](/commands/docs/each), you could write this as: ```nushell > ls | where type == dir | each { |it| @@ -24,7 +24,7 @@ We create a record for each entry, and fill it with the name of the directory an On your machine, the times may vary. For this machine, it took 21 milliseconds for the current directory. -Now, since this operation can be run in parallel, let's convert the above to parallel by changing [`each`](/commands/docs/each.md) to [`par-each`](/commands/docs/par-each.md): +Now, since this operation can be run in parallel, let's convert the above to parallel by changing [`each`](/commands/docs/each) to [`par-each`](/commands/docs/par-each): ```nushell > ls | where type == dir | par-each { |it| @@ -34,7 +34,7 @@ Now, since this operation can be run in parallel, let's convert the above to par On this machine, it now runs in 6ms. That's quite a difference! -As a side note: Because [environment variables are scoped](environment.md#scoping), you can use [`par-each`](/commands/docs/par-each.md) to work in multiple directories in parallel (notice the [`cd`](/commands/docs/cd.md) command): +As a side note: Because [environment variables are scoped](environment#scoping), you can use [`par-each`](/commands/docs/par-each) to work in multiple directories in parallel (notice the [`cd`](/commands/docs/cd) command): ```nushell > ls | where type == dir | par-each { |it| @@ -42,4 +42,4 @@ As a side note: Because [environment variables are scoped](environment.md#scopin } ``` -You'll notice, if you look at the results, that they come back in different orders each run (depending on the number of hardware threads on your system). As tasks finish, and we get the correct result, we may need to add additional steps if we want our results in a particular order. For example, for the above, we may want to sort the results by the "name" field. This allows both [`each`](/commands/docs/each.md) and [`par-each`](/commands/docs/par-each.md) versions of our script to give the same result. +You'll notice, if you look at the results, that they come back in different orders each run (depending on the number of hardware threads on your system). As tasks finish, and we get the correct result, we may need to add additional steps if we want our results in a particular order. For example, for the above, we may want to sort the results by the "name" field. This allows both [`each`](/commands/docs/each) and [`par-each`](/commands/docs/par-each) versions of our script to give the same result. diff --git a/src/content/docs/book/pipelines.md b/src/content/docs/book/pipelines.md index 0ee8dc236d1..a01bb72e317 100644 --- a/src/content/docs/book/pipelines.md +++ b/src/content/docs/book/pipelines.md @@ -12,9 +12,9 @@ A pipeline is composed of three parts: the input, the filter, and the output. open "Cargo.toml" | inc package.version --minor | save "Cargo_new.toml" ``` -The first command, `open "Cargo.toml"`, is an input (sometimes also called a "source" or "producer"). This creates or loads data and feeds it into a pipeline. It's from input that pipelines have values to work with. Commands like [`ls`](/commands/docs/ls.md) are also inputs, as they take data from the filesystem and send it through the pipelines so that it can be used. +The first command, `open "Cargo.toml"`, is an input (sometimes also called a "source" or "producer"). This creates or loads data and feeds it into a pipeline. It's from input that pipelines have values to work with. Commands like [`ls`](/commands/docs/ls) are also inputs, as they take data from the filesystem and send it through the pipelines so that it can be used. -The second command, `inc package.version --minor`, is a filter. Filters take the data they are given and often do something with it. They may change it (as with the [`inc`](/commands/docs/inc.md) command in our example), or they may do another operation, like logging, as the values pass through. +The second command, `inc package.version --minor`, is a filter. Filters take the data they are given and often do something with it. They may change it (as with the [`inc`](/commands/docs/inc) command in our example), or they may do another operation, like logging, as the values pass through. The last command, `save "Cargo_new.toml"`, is an output (sometimes called a "sink"). An output takes input from the pipeline and does some final operation on it. In our example, we save what comes through the pipeline to a file as the final step. Other types of output commands may take the values and view them for the user. @@ -37,7 +37,7 @@ If a pipeline is getting a bit long for one line, you can enclose it within `(` ) ``` -Also see [Subexpressions](https://www.nushell.sh/book/variables_and_subexpressions.html#subexpressions) +Also see [Subexpressions](https://www.nushell.sh/book/variables_and_subexpressions#subexpressions) ## Semicolons @@ -54,7 +54,7 @@ Here, semicolons are used in conjunction with pipelines. When a semicolon is use ## Working with external commands -Nu commands communicate with each other using the Nu data types (see [types of data](types_of_data.md)), but what about commands outside of Nu? Let's look at some examples of working with external commands: +Nu commands communicate with each other using the Nu data types (see [types of data](types_of_data)), but what about commands outside of Nu? Let's look at some examples of working with external commands: `internal_command | external_command` @@ -62,7 +62,7 @@ Data will flow from the internal_command to the external_command. This data will `external_command | internal_command` -Data coming from an external command into Nu will come in as bytes that Nushell will try to automatically convert to UTF-8 text. If successful, a stream of text data will be sent to internal_command. If unsuccessful, a stream of binary data will be sent to internal command. Commands like [`lines`](/commands/docs/lines.md) help make it easier to bring in data from external commands, as it gives discrete lines of data to work with. +Data coming from an external command into Nu will come in as bytes that Nushell will try to automatically convert to UTF-8 text. If successful, a stream of text data will be sent to internal_command. If unsuccessful, a stream of binary data will be sent to internal command. Commands like [`lines`](/commands/docs/lines) help make it easier to bring in data from external commands, as it gives discrete lines of data to work with. `external_command_1 | external_command_2` @@ -70,7 +70,7 @@ Nu works with data piped between two external commands in the same way as other ## Behind the scenes -You may have wondered how we see a table if [`ls`](/commands/docs/ls.md) is an input and not an output. Nu adds this output for us automatically using another command called [`table`](/commands/docs/table.md). The [`table`](/commands/docs/table.md) command is appended to any pipeline that doesn't have an output. This allows us to see the result. +You may have wondered how we see a table if [`ls`](/commands/docs/ls) is an input and not an output. Nu adds this output for us automatically using another command called [`table`](/commands/docs/table). The [`table`](/commands/docs/table) command is appended to any pipeline that doesn't have an output. This allows us to see the result. In effect, the command: @@ -120,14 +120,14 @@ ls /usr/share/nvim/runtime/ ╰────┴───────────────────────────────────────┴──────┴─────────┴───────────────╯ ``` -You decided to use `grep` and [pipe](https://www.nushell.sh/book/pipelines.html) the result to external `^ls` +You decided to use `grep` and [pipe](https://www.nushell.sh/book/pipelines) the result to external `^ls` ```nushell frame="terminal" ls /usr/share/nvim/runtime/ | get name | ^grep tutor | ^ls -la $in ls: cannot access ''$'\342\224\202'' 32 '$'\342\224\202'' /usr/share/nvim/runtime/tutor '$'\342\224\202\n': No such file or directory ``` -What's wrong? Nushell renders lists and tables (by adding a border with characters like `╭`,`─`,`┬`,`╮`) before piping them as text to external commands. If that's not the behavior you want, you must explicitly convert the data to a string before piping it to an external. For example, you can do so with [`to text`](/commands/docs/to_text.md): +What's wrong? Nushell renders lists and tables (by adding a border with characters like `╭`,`─`,`┬`,`╮`) before piping them as text to external commands. If that's not the behavior you want, you must explicitly convert the data to a string before piping it to an external. For example, you can do so with [`to text`](/commands/docs/to_text): ```nushell frame="terminal" ls /usr/share/nvim/runtime/ | get name | to text | ^grep tutor | tr -d '\n' | ^ls -la $in @@ -138,7 +138,7 @@ drwxr-xr-x@ 4 pengs admin 128 14 Nov 13:42 en -rw-r--r--@ 1 pengs admin 1191 14 Nov 13:42 tutor.tutor.json ``` -(Actually, for this simple usage you can just use [`find`](/commands/docs/find.md)) +(Actually, for this simple usage you can just use [`find`](/commands/docs/find)) ```nushell frame="terminal" ls /usr/share/nvim/runtime/ | get name | find tutor | ^ls -al $in @@ -167,7 +167,7 @@ For instance, the above example sets the `$env.config.table.mode` configuration do { $env.config.table.mode = none; ls } | table ``` -Because Nushell `$env` variables are [scoped](https://www.nushell.sh/book/environment.html#scoping), this means that the `table` command in the example is not affected by the +Because Nushell `$env` variables are [scoped](https://www.nushell.sh/book/environment#scoping), this means that the `table` command in the example is not affected by the environment modification inside the `do` block and the data will not be shown with the applied configuration. When displaying data early is desired, it is possible to explicitly apply `| table` inside the scope, or use the `print` command. diff --git a/src/content/docs/book/plugins.mdx b/src/content/docs/book/plugins.mdx index 7d7facf03a7..e1b0d171e5b 100644 --- a/src/content/docs/book/plugins.mdx +++ b/src/content/docs/book/plugins.mdx @@ -10,7 +10,7 @@ Nu plugins are executables; Nu launches them as needed and communicates with the ## Adding a plugin -To add a plugin, call the [`register`](/commands/docs/register.md) command to tell Nu where to find it. As you do, you'll need to also tell Nushell what encoding the plugin uses. +To add a plugin, call the [`register`](/commands/docs/register) command to tell Nu where to find it. As you do, you'll need to also tell Nushell what encoding the plugin uses. Please note that the plugin name needs to start with `nu_plugin_`, Nu uses the name prefix to detect plugins. @@ -23,7 +23,7 @@ Please note that the plugin name needs to start with `nu_plugin_`, Nu uses the n -When [`register`](/commands/docs/register.md) is called: +When [`register`](/commands/docs/register) is called: 1. Nu launches the plugin, and waits for the plugin to tell Nu which communication encoding it should use 2. Nu sends it a "Signature" message over stdin @@ -53,4 +53,4 @@ Nu's plugin documentation is a work in progress. If you're unsure about somethin ## More details -The [plugin chapter in the contributor book](/contributor-book/plugins.md) offers more details on the intricacies of how plugins work from a software developer point of view. +The [plugin chapter in the contributor book](/contributor-book/plugins) offers more details on the intricacies of how plugins work from a software developer point of view. diff --git a/src/content/docs/book/programming_in_nu.md b/src/content/docs/book/programming_in_nu.md index 0ca1b1468c3..345eca14fa9 100644 --- a/src/content/docs/book/programming_in_nu.md +++ b/src/content/docs/book/programming_in_nu.md @@ -7,28 +7,28 @@ title: Community This chapter goes into more detail of Nushell as a programming language. Each major language feature has its own section. -Just like most programming languages allow you to define functions, Nushell uses [custom commands](custom_commands.md) for this purpose. +Just like most programming languages allow you to define functions, Nushell uses [custom commands](/book/custom_commands) for this purpose. -From other shells you might be used to [aliases](aliases.md). +From other shells you might be used to [aliases](/book/aliases). Nushell's aliases work in a similar way and are a part of the programming language, not just a shell feature. -Common operations can, such as addition or regex search, be done with [operators](operators.md). +Common operations can, such as addition or regex search, be done with [operators](/book/operators). Not all operations are supported for all data types and Nushell will make sure to let you know. -You can store intermediate results to [variables](variables_and_subexpressions.md) and immediately evaluate subroutines with [subexpressions](variables_and_subexpressions.html#subexpressions). +You can store intermediate results to [variables](/book/variables_and_subexpressions) and immediately evaluate subroutines with [subexpressions](/book/variables_and_subexpressions#subexpressions). The last three sections are aimed at organizing your code: -[Scripts](scripts.md) are the simplest form of code organization: You just put the code into a file and source it. +[Scripts](/book/scripts) are the simplest form of code organization: You just put the code into a file and source it. However, you can also run scripts as standalone programs with command line signatures using the "special" `main` command. -With [modules](modules.md), just like in many other programming languages, it is possible to compose your code from smaller pieces. +With [modules](/book/modules), just like in many other programming languages, it is possible to compose your code from smaller pieces. Modules let you define a public interface vs. private commands and you can import custom commands, aliases, and environment variables from them. -[Overlays](overlays.md) build on top of modules. +[Overlays](/book/overlays) build on top of modules. By defining an overlay, you bring in module's definitions into its own swappable "layer" that gets applied on top of other overlays. This enables features like activating virtual environments or overriding sets of default commands with custom variants. -The help message of some built-in commands shows a [signature](command_signature.md). You can take a look at it to get general rules how the command can be used. +The help message of some built-in commands shows a [signature](/book/command_signature). You can take a look at it to get general rules how the command can be used. -The standard library also has a [testing framework](testing.md) if you want to prove your reusable code works perfectly. +The standard library also has a [testing framework](/book/testing) if you want to prove your reusable code works perfectly. diff --git a/src/content/docs/book/quick_tour.md b/src/content/docs/book/quick_tour.md index b0b63f5ed37..ec172c28a8c 100644 --- a/src/content/docs/book/quick_tour.md +++ b/src/content/docs/book/quick_tour.md @@ -4,7 +4,7 @@ title: Quick Tour The easiest way to see what Nu can do is to start with some examples, so let's dive in. -The first thing you'll notice when you run a command like [`ls`](/commands/docs/ls.md) is that instead of a block of text coming back, you get a structured table. +The first thing you'll notice when you run a command like [`ls`](/commands/docs/ls) is that instead of a block of text coming back, you get a structured table. ```nushell frame='terminal' ls @@ -12,16 +12,16 @@ ls │ # │ name │ type │ size │ modified │ ├────┼───────────────────────┼──────┼───────────┼─────────────┤ │ 0 │ 404.html │ file │ 429 B │ 3 days ago │ -│ 1 │ CONTRIBUTING.md │ file │ 955 B │ 8 mins ago │ +│ 1 │ CONTRIBUTING │ file │ 955 B │ 8 mins ago │ │ 2 │ Gemfile │ file │ 1.1 KiB │ 3 days ago │ │ 3 │ Gemfile.lock │ file │ 6.9 KiB │ 3 days ago │ │ 4 │ LICENSE │ file │ 1.1 KiB │ 3 days ago │ -│ 5 │ README.md │ file │ 213 B │ 3 days ago │ +│ 5 │ README │ file │ 213 B │ 3 days ago │ ``` The table does more than show the directory in a different way. Just like tables in a spreadsheet, this table allows us to work with the data more interactively. -The first thing we'll do is to sort our table by size. To do this, we'll take the output from [`ls`](/commands/docs/ls.md) and feed it into a command that can sort tables based on the contents of a column. +The first thing we'll do is to sort our table by size. To do this, we'll take the output from [`ls`](/commands/docs/ls) and feed it into a command that can sort tables based on the contents of a column. ```nushell frame='terminal' ls | sort-by size | reverse @@ -29,16 +29,16 @@ ls | sort-by size | reverse │ # │ name │ type │ size │ modified │ ├────┼───────────────────────┼──────┼───────────┼─────────────┤ │ 0 │ Gemfile.lock │ file │ 6.9 KiB │ 3 days ago │ -│ 1 │ SUMMARY.md │ file │ 3.7 KiB │ 3 days ago │ +│ 1 │ SUMMARY │ file │ 3.7 KiB │ 3 days ago │ │ 2 │ Gemfile │ file │ 1.1 KiB │ 3 days ago │ │ 3 │ LICENSE │ file │ 1.1 KiB │ 3 days ago │ -│ 4 │ CONTRIBUTING.md │ file │ 955 B │ 9 mins ago │ -│ 5 │ books.md │ file │ 687 B │ 3 days ago │ +│ 4 │ CONTRIBUTING │ file │ 955 B │ 9 mins ago │ +│ 5 │ books │ file │ 687 B │ 3 days ago │ ``` -You can see that to make this work we didn't pass commandline arguments to [`ls`](/commands/docs/ls.md). Instead, we used the [`sort-by`](/commands/docs/sort-by.md) command that Nu provides to do the sorting of the output of the [`ls`](/commands/docs/ls.md) command. To see the biggest files on top, we also used [`reverse`](/commands/docs/reverse.md). +You can see that to make this work we didn't pass commandline arguments to [`ls`](/commands/docs/ls). Instead, we used the [`sort-by`](/commands/docs/sort-by) command that Nu provides to do the sorting of the output of the [`ls`](/commands/docs/ls) command. To see the biggest files on top, we also used [`reverse`](/commands/docs/reverse). -Nu provides many commands that can work on tables. For example, we could use [`where`](/commands/docs/where.md) to filter the contents of the [`ls`](/commands/docs/ls.md) table so that it only shows files over 1 kilobyte: +Nu provides many commands that can work on tables. For example, we could use [`where`](/commands/docs/where) to filter the contents of the [`ls`](/commands/docs/ls) table so that it only shows files over 1 kilobyte: ```nushell frame='terminal' ls | where size > 1kb @@ -48,7 +48,7 @@ ls | where size > 1kb │ 0 │ Gemfile │ file │ 1.1 KiB │ 3 days ago │ │ 1 │ Gemfile.lock │ file │ 6.9 KiB │ 3 days ago │ │ 2 │ LICENSE │ file │ 1.1 KiB │ 3 days ago │ -│ 3 │ SUMMARY.md │ file │ 3.7 KiB │ 3 days ago │ +│ 3 │ SUMMARY │ file │ 3.7 KiB │ 3 days ago │ ╰───┴───────────────────┴──────┴─────────┴────────────╯ ``` @@ -65,9 +65,9 @@ ps │ 3 │ 87156 │ 87105 │ Code Helper (Plugin) │ Sleep │ 0.00 │ 56.0 MB │ 457.4 GB │ ``` -You may be familiar with the [`ps`](/commands/docs/ps.md) command if you've used Linux. With it, we can get a list of all the current processes that the system is running, what their status is, and what their name is. We can also see the CPU load for the processes. +You may be familiar with the [`ps`](/commands/docs/ps) command if you've used Linux. With it, we can get a list of all the current processes that the system is running, what their status is, and what their name is. We can also see the CPU load for the processes. -What if we wanted to show the processes that were actively using the CPU? Just like we did with the [`ls`](/commands/docs/ls.md) command earlier, we can also work with the table that the [`ps`](/commands/docs/ps.md) command gives back to us: +What if we wanted to show the processes that were actively using the CPU? Just like we did with the [`ls`](/commands/docs/ls) command earlier, we can also work with the table that the [`ps`](/commands/docs/ps) command gives back to us: ```nushell frame='terminal' ps | where cpu > 5 @@ -82,16 +82,16 @@ ps | where cpu > 5 ╰───┴───────┴───────┴─────────────────────────────────────────┴─────────┴───────┴──────────┴──────────╯ ``` -So far, we've been using [`ls`](/commands/docs/ls.md) and [`ps`](/commands/docs/ps.md) to list files and processes. Nu also offers other commands that can create tables of useful information. Next, let's explore [`date`](/commands/docs/date.md) and [`sys`](/commands/docs/sys.md). +So far, we've been using [`ls`](/commands/docs/ls) and [`ps`](/commands/docs/ps) to list files and processes. Nu also offers other commands that can create tables of useful information. Next, let's explore [`date`](/commands/docs/date) and [`sys`](/commands/docs/sys). -Running [`date now`](/commands/docs/date_now.md) gives us information about the current day and time: +Running [`date now`](/commands/docs/date_now) gives us information about the current day and time: ```nushell frame='terminal' date now Fri, 9 Feb 2024 22:32:19 -0800 (now) ``` -To get the date as a table we can feed it into [`date to-table`](/commands/docs/date_to-table.md) +To get the date as a table we can feed it into [`date to-table`](/commands/docs/date_to-table) ```nushell frame='terminal' date now | date to-table @@ -102,7 +102,7 @@ date now | date to-table ╰───┴──────┴───────┴─────┴──────┴────────┴────────┴────────────┴──────────╯ ``` -Running [`sys`](/commands/docs/sys.md) gives information about the system that Nu is running on: +Running [`sys`](/commands/docs/sys) gives information about the system that Nu is running on: ```nushell frame='terminal' sys @@ -116,7 +116,7 @@ sys ╰───────┴───────────────────╯ ``` -This is a bit different than the tables we saw before. The [`sys`](/commands/docs/sys.md) command gives us a table that contains structured tables in the cells instead of simple values. To take a look at this data, we need to _get_ the column to view: +This is a bit different than the tables we saw before. The [`sys`](/commands/docs/sys) command gives us a table that contains structured tables in the cells instead of simple values. To take a look at this data, we need to _get_ the column to view: ```nushell frame='terminal' sys | get host @@ -132,7 +132,7 @@ sys | get host ╰─────────────────┴───────────────────────────╯ ``` -The [`get`](/commands/docs/get.md) command lets us jump into the contents of a column of the table. Here, we're looking into the "host" column, which contains information about the host that Nu is running on. The name of the OS, the hostname, the CPU, and more. Let's get the name of the users on the system: +The [`get`](/commands/docs/get) command lets us jump into the contents of a column of the table. Here, we're looking into the "host" column, which contains information about the host that Nu is running on. The name of the OS, the hostname, the CPU, and more. Let's get the name of the users on the system: ```nushell frame='terminal' sys | get host.sessions.name @@ -146,7 +146,7 @@ Right now, there's just one user on the system named "jt". You'll notice that we You might have noticed something else that's different. Rather than having a table of data, we have just a single element: the string "jt". Nu works with both tables of data as well as strings. Strings are an important part of working with commands outside of Nu. -Let's see how strings work outside of Nu in action. We'll take our example from before and run the external [`echo`](/commands/docs/echo.md) command (the `^` tells Nu to not use the built-in [`echo`](/commands/docs/echo.md) command): +Let's see how strings work outside of Nu in action. We'll take our example from before and run the external [`echo`](/commands/docs/echo) command (the `^` tells Nu to not use the built-in [`echo`](/commands/docs/echo) command): ```nushell frame='terminal' sys | get host.sessions.name | each { |it| ^echo $it } @@ -157,11 +157,11 @@ jt ╰────────────╯ ``` -If this looks very similar to what we had before, you have a keen eye! It is similar, but with one important difference: we've called `^echo` with the value we saw earlier. This allows us to pass data out of Nu into [`echo`](/commands/docs/echo.md) (or any command outside of Nu, like `git` for example). +If this looks very similar to what we had before, you have a keen eye! It is similar, but with one important difference: we've called `^echo` with the value we saw earlier. This allows us to pass data out of Nu into [`echo`](/commands/docs/echo) (or any command outside of Nu, like `git` for example). ### Getting Help -Help text for any of Nu's built-in commands can be discovered with the [`help`](/commands/docs/help.md) command. To see all commands, run [`help commands`](/commands/docs/help_commands.md). You can also search for a topic by doing `help -f `. +Help text for any of Nu's built-in commands can be discovered with the [`help`](/commands/docs/help) command. To see all commands, run [`help commands`](/commands/docs/help_commands). You can also search for a topic by doing `help -f `. ```nushell frame='terminal' help path diff --git a/src/content/docs/book/scripts.md b/src/content/docs/book/scripts.md index c989a3236e1..e3b2babdd33 100644 --- a/src/content/docs/book/scripts.md +++ b/src/content/docs/book/scripts.md @@ -8,7 +8,7 @@ In Nushell, you can write and run scripts in the Nushell language. To run a scri nu myscript.nu ``` -This will run the script to completion in a new instance of Nu. You can also run scripts inside the _current_ instance of Nu using [`source`](/commands/docs/source.md): +This will run the script to completion in a new instance of Nu. You can also run scripts inside the _current_ instance of Nu using [`source`](/commands/docs/source): ```nushell frame="terminal" source myscript.nu @@ -53,7 +53,7 @@ a b; c | d ``` -When this script is run, Nushell will first run the `a` command to completion and view its results. Next, Nushell will run `b; c | d` following the rules in the ["Semicolons" section](pipelines.html#semicolons). +When this script is run, Nushell will first run the `a` command to completion and view its results. Next, Nushell will run `b; c | d` following the rules in the ["Semicolons" section](/book/pipelines#semicolons). ## Parameterizing Scripts @@ -103,7 +103,7 @@ nu explicit_type.nu +1 ## Subcommands -A script can have multiple sub-commands like `run`, `build`, etc. which allows to execute a specific main sub-function. The important part is to expose them correctly with `def main [] {}`. See more details in the [Custom Command](custom_commands.html#sub-commands) section. +A script can have multiple sub-commands like `run`, `build`, etc. which allows to execute a specific main sub-function. The important part is to expose them correctly with `def main [] {}`. See more details in the [Custom Command](/book/custom_commands#sub-commands) section. For example: diff --git a/src/content/docs/book/shells_in_shells.md b/src/content/docs/book/shells_in_shells.md index 884414dba29..481c4ac2e65 100644 --- a/src/content/docs/book/shells_in_shells.md +++ b/src/content/docs/book/shells_in_shells.md @@ -15,12 +15,12 @@ To get started, let's enter a directory: # │ name │ type │ size │ modified ────┼────────────────────┼──────┼────────┼───────────── 0 │ 404.html │ File │ 429 B │ 2 hours ago - 1 │ CONTRIBUTING.md │ File │ 955 B │ 2 hours ago + 1 │ CONTRIBUTING │ File │ 955 B │ 2 hours ago 2 │ Gemfile │ File │ 1.1 KB │ 2 hours ago 3 │ Gemfile.lock │ File │ 6.9 KB │ 2 hours ago ``` -Entering is similar to changing directories (as we saw with the [`cd`](/commands/docs/cd.md) command). This allows you to jump into a directory to work in it. Instead of changing the directory, we now are in two directories. To see this more clearly, we can use the [`shells`](/commands/docs/shells.md) command to list the current directories we have active: +Entering is similar to changing directories (as we saw with the [`cd`](/commands/docs/cd) command). This allows you to jump into a directory to work in it. Instead of changing the directory, we now are in two directories. To see this more clearly, we can use the [`shells`](/commands/docs/shells) command to list the current directories we have active: ```nushell /home/jonathan/Source/book(main)> enter ../music @@ -34,9 +34,9 @@ Entering is similar to changing directories (as we saw with the [`cd`](/commands ───┴────────┴─────────────────────────────── ``` -The [`shells`](/commands/docs/shells.md) command shows us there are three shells: our original "nushell" source directory, "book" directory and "music" directory which is currently active. +The [`shells`](/commands/docs/shells) command shows us there are three shells: our original "nushell" source directory, "book" directory and "music" directory which is currently active. -We can jump between these shells with the [`n`](/commands/docs/n.md), [`p`](/commands/docs/p.md) and [`g`](/commands/docs/g.md) shortcuts, short for "next", "previous" and "goto": +We can jump between these shells with the [`n`](/commands/docs/n), [`p`](/commands/docs/p) and [`g`](/commands/docs/g) shortcuts, short for "next", "previous" and "goto": ```nushell /home/jonathan/Source/music(main)> p @@ -49,6 +49,6 @@ We can see the directory changing, but we're always able to get back to a previo ## Exiting the shell -You can leave a shell you have [`enter`](/commands/docs/enter.md)ed using the `dexit` command. +You can leave a shell you have [`enter`](/commands/docs/enter)ed using the `dexit` command. You can always quit Nu, even if multiple shells are active, using `exit`. diff --git a/src/content/docs/book/stdout_stderr_exit_codes.md b/src/content/docs/book/stdout_stderr_exit_codes.md index 4ecd2646aba..69302800cce 100644 --- a/src/content/docs/book/stdout_stderr_exit_codes.md +++ b/src/content/docs/book/stdout_stderr_exit_codes.md @@ -14,7 +14,7 @@ Stdout is the way that most external apps will send data into the pipeline or to > external | str join ``` -The above would call the external named `external` and would redirect the stdout output stream into the pipeline. With this redirection, Nushell can then pass the data to the next command in the pipeline, here [`str join`](/commands/docs/str_join.md). +The above would call the external named `external` and would redirect the stdout output stream into the pipeline. With this redirection, Nushell can then pass the data to the next command in the pipeline, here [`str join`](/commands/docs/str_join). Without the pipeline, Nushell will not do any redirection, allowing it to print directly to the screen. @@ -39,13 +39,13 @@ Nushell tracks the last exit code of the recently completed external in one of t > $env.LAST_EXIT_CODE ``` -The second uses a command called [`complete`](/commands/docs/complete.md). +The second uses a command called [`complete`](/commands/docs/complete). -## Using the [`complete`](/commands/docs/complete.md) command +## Using the [`complete`](/commands/docs/complete) command -The [`complete`](/commands/docs/complete.md) command allows you to run an external to completion, and gather the stdout, stderr, and exit code together in one record. +The [`complete`](/commands/docs/complete) command allows you to run an external to completion, and gather the stdout, stderr, and exit code together in one record. -If we try to run the external `cat` on a file that doesn't exist, we can see what [`complete`](/commands/docs/complete.md) does with the streams, including the redirected stderr: +If we try to run the external `cat` on a file that doesn't exist, we can see what [`complete`](/commands/docs/complete) does with the streams, including the redirected stderr: ```nushell > do { cat unknown.txt } | complete @@ -58,11 +58,11 @@ If we try to run the external `cat` on a file that doesn't exist, we can see wha ## `echo`, `print`, and `log` commands -The [`echo`](/commands/docs/echo.md) command is mainly for _pipes_. It returns its arguments, ignoring the piped-in value. There is usually little reason to use this over just writing the values as-is. +The [`echo`](/commands/docs/echo) command is mainly for _pipes_. It returns its arguments, ignoring the piped-in value. There is usually little reason to use this over just writing the values as-is. -In contrast, the [`print`](/commands/docs/print.md) command prints the given values to stdout as plain text. It can be used to write to standard error output, as well. Unlike [`echo`](/commands/docs/echo.md), this command does not return any value (`print | describe` will return "nothing"). Since this command has no output, there is no point in piping it with other commands. +In contrast, the [`print`](/commands/docs/print) command prints the given values to stdout as plain text. It can be used to write to standard error output, as well. Unlike [`echo`](/commands/docs/echo), this command does not return any value (`print | describe` will return "nothing"). Since this command has no output, there is no point in piping it with other commands. -The [standard library](/book/standard_library.md) has commands to write out messages in different logging levels. For example: +The [standard library](/book/standard_library) has commands to write out messages in different logging levels. For example: ```nushell use std log @@ -106,7 +106,7 @@ Because streams of bytes can be difficult to work with, especially given how com Nushell attempts to convert to text using UTF-8. If at any time the conversion fails, the rest of the stream is assumed to always be bytes. -If you want more control over the decoding of the byte stream, you can use the [`decode`](/commands/docs/decode.md) command. The [`decode`](/commands/docs/decode.md) command can be inserted into the pipeline after the external, or other raw stream-creating command, and will handle decoding the bytes based on the argument you give decode. For example, you could decode shift-jis text this way: +If you want more control over the decoding of the byte stream, you can use the [`decode`](/commands/docs/decode) command. The [`decode`](/commands/docs/decode) command can be inserted into the pipeline after the external, or other raw stream-creating command, and will handle decoding the bytes based on the argument you give decode. For example, you could decode shift-jis text this way: ```nushell > 0x[8a 4c] | decode shift-jis diff --git a/src/content/docs/book/testing.md b/src/content/docs/book/testing.md index c5886f65442..0d9ba62677f 100644 --- a/src/content/docs/book/testing.md +++ b/src/content/docs/book/testing.md @@ -2,7 +2,7 @@ title: Testing --- -The [standard library](standard_library.md) has a unit testing framework to ensure that your code works as expected. +The [standard library](standard_library) has a unit testing framework to ensure that your code works as expected. ## Quick start @@ -110,7 +110,7 @@ Error: ╰──── ``` -In general for base `assert` command it is encouraged to always provide the additional message to show what went wrong. If you cannot use any built-in assert command, you can create a custom one with passing the label for [`error make`](/commands/docs/error_make.md) for the `assert` command: +In general for base `assert` command it is encouraged to always provide the additional message to show what went wrong. If you cannot use any built-in assert command, you can create a custom one with passing the label for [`error make`](/commands/docs/error_make) for the `assert` command: ```nushell def "assert even" [number: int] { diff --git a/src/content/docs/book/thinking_in_nu.mdx b/src/content/docs/book/thinking_in_nu.mdx index e92d5d7bef9..c7e1303505f 100644 --- a/src/content/docs/book/thinking_in_nu.mdx +++ b/src/content/docs/book/thinking_in_nu.mdx @@ -38,7 +38,7 @@ source "output.nu" abc ``` -The [`source`](/commands/docs/source.md) command will grow the source that is compiled, but the [`save`](/commands/docs/save.md) from the earlier line won't have had a chance to run. Nushell runs the whole block as if it were a single file, rather than running one line at a time. In the example, since the output.nu file is not created until after the 'compilation' step, the [`source`](/commands/docs/source.md) command is unable to read definitions from it during parse time. +The [`source`](/commands/docs/source) command will grow the source that is compiled, but the [`save`](/commands/docs/save) from the earlier line won't have had a chance to run. Nushell runs the whole block as if it were a single file, rather than running one line at a time. In the example, since the output.nu file is not created until after the 'compilation' step, the [`source`](/commands/docs/source) command is unable to read definitions from it during parse time. Another common issue is trying to dynamically create the filename to source from: @@ -57,13 +57,13 @@ source $"($my_path)/common.nu" # sources /home/user/nushell/common.nu **Thinking in Nushell:** Nushell is designed to use a single compile step for all the source you send it, and this is separate from evaluation. This will allow for strong IDE support, accurate error messages, an easier language for third-party tools to work with, and in the future even fancier output like being able to compile Nushell directly to a binary file. -For more in-depth explanation, check [How Nushell Code Gets Run](how_nushell_code_gets_run.md). +For more in-depth explanation, check [How Nushell Code Gets Run](how_nushell_code_gets_run). ## Variables are immutable Another common surprise for folks coming from other languages is that Nushell variables are immutable (and indeed some people have started to call them "constants" to reflect this). Coming to Nushell you'll want to spend some time becoming familiar with working in a more functional style, as this tends to help write code that works best with immutable variables. -You might wonder why Nushell uses immutable variables. Early on in Nushell's development we decided to see how long we could go using a more data-focused, functional style in the language. More recently, we added a key bit of functionality into Nushell that made these early experiments show their value: parallelism. By switching from [`each`](/commands/docs/each.md) to [`par-each`](/commands/docs/par-each.md) in any Nushell script, you're able to run the corresponding block of code in parallel over the input. This is possible because Nushell's design leans heavily on immutability, composition, and pipelining. +You might wonder why Nushell uses immutable variables. Early on in Nushell's development we decided to see how long we could go using a more data-focused, functional style in the language. More recently, we added a key bit of functionality into Nushell that made these early experiments show their value: parallelism. By switching from [`each`](/commands/docs/each) to [`par-each`](/commands/docs/par-each) in any Nushell script, you're able to run the corresponding block of code in parallel over the input. This is possible because Nushell's design leans heavily on immutability, composition, and pipelining. Just because Nushell variables are immutable doesn't mean things don't change. Nushell makes heavy use of the technique of "shadowing". Shadowing means creating a new variable with the same name as a previously declared variable. For example, say you had an `$x` in scope, and you wanted a new `$x` that was one greater: @@ -71,7 +71,7 @@ Just because Nushell variables are immutable doesn't mean things don't change. N This new `x` is visible to any code that follows this line. Careful use of shadowing can make for an easier time working with variables, though it's not required. -Loop counters are another common pattern for mutable variables and are built into most iterating commands, for example you can get both each item and an index of each item using [`each`](/commands/docs/each.md): +Loop counters are another common pattern for mutable variables and are built into most iterating commands, for example you can get both each item and an index of each item using [`each`](/commands/docs/each): -You can also use the [`reduce`](/commands/docs/reduce.md) command to work in the same way you might mutate a variable in a loop. For example, if you wanted to find the largest string in a list of strings, you might do: +You can also use the [`reduce`](/commands/docs/reduce) command to work in the same way you might mutate a variable in a loop. For example, if you wanted to find the largest string in a list of strings, you might do: ```nushell frame="terminal" [one, two, three, four, five, six] | reduce {|curr, max| @@ -108,10 +108,10 @@ ls | each { |it| } ``` -The [`cd`](/commands/docs/cd.md) command changes the `PWD` environment variables, and this variable change does not escape the block, allowing each iteration to start from the current directory and enter the next subdirectory. +The [`cd`](/commands/docs/cd) command changes the `PWD` environment variables, and this variable change does not escape the block, allowing each iteration to start from the current directory and enter the next subdirectory. -Having the environment scoped like this makes commands more predictable, easier to read, and when the time comes, easier to debug. Nushell also provides helper commands like [`def --env`](/commands/docs/def.md), [`load-env`](/commands/docs/load-env.md), as convenient ways of doing batches of updates to the environment. +Having the environment scoped like this makes commands more predictable, easier to read, and when the time comes, easier to debug. Nushell also provides helper commands like [`def --env`](/commands/docs/def), [`load-env`](/commands/docs/load-env), as convenient ways of doing batches of updates to the environment. -_There is one exception here, where [`def --env`](/commands/docs/def.md) allows you to create a command that participates in the caller's environment._ +_There is one exception here, where [`def --env`](/commands/docs/def) allows you to create a command that participates in the caller's environment._ **Thinking in Nushell:** - The coding best practice of no global mutable variables extends to the environment in Nushell. Using the built-in helper commands will let you more easily work with the environment in Nushell. Taking advantage of the fact that environments are scoped to blocks can also help you write more concise scripts and interact with external commands without adding things into a global environment you don't need. diff --git a/src/content/docs/book/types_of_data.md b/src/content/docs/book/types_of_data.md index f217f3857eb..45f2f05df97 100644 --- a/src/content/docs/book/types_of_data.md +++ b/src/content/docs/book/types_of_data.md @@ -8,7 +8,7 @@ Nu embraces this approach, and expands it to include other types of data, in add Like many programming languages, Nu models data using a set of simple, and structured data types. Simple data types include integers, floats, strings, booleans, dates. There are also special types for filesizes and time durations. -The [`describe`](/commands/docs/describe.md) command returns the type of a data value: +The [`describe`](/commands/docs/describe) command returns the type of a data value: ```nushell frame="terminal" 42 | describe @@ -37,7 +37,7 @@ The [`describe`](/commands/docs/describe.md) command returns the type of a data ## Integers Examples of integers (i.e. "round numbers") include 1, 0, -5, and 100. -You can parse a string into an integer with the [`into int`](/commands/docs/into_int.md) command +You can parse a string into an integer with the [`into int`](/commands/docs/into_int) command ```nushell frame="terminal" "-5" | into int @@ -46,7 +46,7 @@ You can parse a string into an integer with the [`into int`](/commands/docs/into ## Decimals (floats) Decimal numbers are numbers with some fractional component. Examples include 1.5, 2.0, and 15.333. -You can cast a string into a Float with the [`into float`](/commands/docs/into_float.md) command +You can cast a string into a Float with the [`into float`](/commands/docs/into_float) command ```nushell frame="terminal" "1.2" | into float @@ -67,7 +67,7 @@ A string of characters that represents text. There are a few ways these can be c - `print hello` - `[foo bar baz]` -See [Working with strings](working_with_strings.md) and [Handling Strings](https://www.nushell.sh/book/loading_data.html#handling-strings) for details. +See [Working with strings](working_with_strings) and [Handling Strings](https://www.nushell.sh/book/loading_data#handling-strings) for details. ## Booleans @@ -161,14 +161,14 @@ As with durations, you can make fractional file sizes, and do calculations: A range is a way of expressing a sequence of integer or float values from start to finish. They take the form \..\. For example, the range `1..3` means the numbers 1, 2, and 3. :::tip -You can also easily create lists of characters with a form similar to ranges with the command [`seq char`](/commands/docs/seq_char.html) as well as with dates using the [`seq date`](/commands/docs/seq_date.html) command. +You can also easily create lists of characters with a form similar to ranges with the command [`seq char`](/commands/docs/seq_char) as well as with dates using the [`seq date`](/commands/docs/seq_date) command. ::: ### Specifying the step You can specify the step of a range with the form \..\..\, where the step between values in the range is the distance between the \ and \ values, which numerically is \ - \. For example, the range `2..5..11` means the numbers 2, 5, 8, and 11 because the step is \ - \ = 5 - 2 = 3. The third value is 5 + 3 = 8 and the fourth value is 8 + 3 = 11. -[`seq`](/commands/docs/seq.md) can also create sequences of numbers, and provides an alternate way of specifying the step with three parameters. It's called with `seq $start $step $end` where the step amount is the second parameter rather than being the second parameter minus the first parameter. So `2..5..9` would be equivalent to `seq 2 3 9`. +[`seq`](/commands/docs/seq) can also create sequences of numbers, and provides an alternate way of specifying the step with three parameters. It's called with `seq $start $step $end` where the step amount is the second parameter rather than being the second parameter minus the first parameter. So `2..5..9` would be equivalent to `seq 2 3 9`. ### Inclusive and non-inclusive ranges @@ -180,7 +180,7 @@ Sometimes, you may want a range that is limited by a number but doesn't use that Ranges can also be open-ended. You can remove the start or the end of the range to make it open-ended. -Let's say you wanted to start counting at 3, but you didn't have a specific end in mind. You could use the range `3..` to represent this. When you use a range that's open-ended on the right side, remember that this will continue counting for as long as possible, which could be a very long time! You'll often want to use open-ended ranges with commands like [`take`](/commands/docs/take.md), so you can take the number of elements you want from the range. +Let's say you wanted to start counting at 3, but you didn't have a specific end in mind. You could use the range `3..` to represent this. When you use a range that's open-ended on the right side, remember that this will continue counting for as long as possible, which could be a very long time! You'll often want to use open-ended ranges with commands like [`take`](/commands/docs/take), so you can take the number of elements you want from the range. You can also make the start of the range open. In this case, Nushell will start counting with `0`. For example, the range `..2` is the numbers 0, 1, and 2. @@ -222,7 +222,7 @@ As these can sometimes have many fields, a record is printed up-down rather than :::tip A record is identical to a single row of a table (see below). You can think of a record as essentially being a "one-row table", with each of its keys as a column (although a true one-row table is something distinct from a record). -This means that any command that operates on a table's rows _also_ operates on records. For instance, [`insert`](/commands/docs/insert.md), which adds data to each of a table's rows, can be used with records: +This means that any command that operates on a table's rows _also_ operates on records. For instance, [`insert`](/commands/docs/insert), which adds data to each of a table's rows, can be used with records: ```nushell frame="terminal" {x:3 y:1} | insert z 0 @@ -264,7 +264,7 @@ Lists are ordered sequences of data values. List syntax is very similar to array ``` :::tip -Lists are equivalent to the individual columns of tables. You can think of a list as essentially being a "one-column table" (with no column name). Thus, any command which operates on a column _also_ operates on a list. For instance, [`where`](/commands/docs/where.md) can be used with lists: +Lists are equivalent to the individual columns of tables. You can think of a list as essentially being a "one-column table" (with no column name). Thus, any command which operates on a column _also_ operates on a list. For instance, [`where`](/commands/docs/where) can be used with lists: ```nushell frame="terminal" [bell book candle] | where ($it =~ 'b') @@ -278,7 +278,7 @@ Accessing lists' data is done by placing a `.` before a bare integer: [a b c].1 ``` -To get a sub-list from a list, you can use the [`range`](/commands/docs/range.md) command: +To get a sub-list from a list, you can use the [`range`](/commands/docs/range) command: ```nushell frame="terminal" [a b c d e f] | range 1..3 @@ -340,13 +340,13 @@ Moreover, you can also access entire columns of a table by name, to obtain lists [{x:12 y:5} {x:4 y:7} {x:2 y:2}].x ``` -Of course, these resulting lists don't have the column names of the table. To remove columns from a table while leaving it as a table, you'll commonly use the [`select`](/commands/docs/select.md) command with column names: +Of course, these resulting lists don't have the column names of the table. To remove columns from a table while leaving it as a table, you'll commonly use the [`select`](/commands/docs/select) command with column names: ```nushell frame="terminal" [{x:0 y:5 z:1} {x:4 y:7 z:3} {x:2 y:2 z:0}] | select y z ``` -To remove rows from a table, you'll commonly use the [`select`](/commands/docs/select.md) command with row numbers, as you would with a list: +To remove rows from a table, you'll commonly use the [`select`](/commands/docs/select) command with row numbers, as you would with a list: ```nushell frame="terminal" [{x:0 y:5 z:1} {x:4 y:7 z:3} {x:2 y:2 z:0}] | select 1 2 @@ -371,7 +371,7 @@ Closure parameters are specified between a pair of pipe symbols (for example, `| You can also use a pipeline input as `$in` in most closures instead of providing an explicit parameter: `each { print $in }` Closures itself can be bound to a named variable and passed as a parameter. -To call a closure directly in your code use the [`do`](/commands/docs/do.md) command. +To call a closure directly in your code use the [`do`](/commands/docs/do) command. ```nushell frame="terminal" # Assign a closure to a variable @@ -380,14 +380,14 @@ do $greet "Julian" ``` Closures are a useful way to represent code that can be executed on each row of data. -It is idiomatic to use `$it` as a parameter name in [`each`](/commands/docs/each.md) blocks, but not required; +It is idiomatic to use `$it` as a parameter name in [`each`](/commands/docs/each) blocks, but not required; `each { |x| print $x }` works the same way as `each { |it| print $it }`. ## Blocks Blocks don't close over variables, don't have parameters, and can't be passed as a value. However, unlike closures, blocks can access mutable variable in the parent closure. -For example, mutating a variable inside the block used in an [`if`](/commands/docs/if.md) call is valid: +For example, mutating a variable inside the block used in an [`if`](/commands/docs/if) call is valid: ```nushell frame="terminal" mut x = 1 @@ -399,7 +399,7 @@ print $x ## Null -Finally, there is `null` which is the language's "nothing" value, similar to JSON's "null". Whenever Nushell would print the `null` value (outside of a string or data structure), it prints nothing instead. Hence, most of Nushell's file system commands (like [`save`](/commands/docs/save.md) or [`cd`](/commands/docs/cd.md)) produce `null`. +Finally, there is `null` which is the language's "nothing" value, similar to JSON's "null". Whenever Nushell would print the `null` value (outside of a string or data structure), it prints nothing instead. Hence, most of Nushell's file system commands (like [`save`](/commands/docs/save) or [`cd`](/commands/docs/cd)) produce `null`. You can place `null` at the end of a pipeline to replace the pipeline's output with it, and thus print nothing: diff --git a/src/content/docs/book/variables_and_subexpressions.md b/src/content/docs/book/variables_and_subexpressions.md index 75400e42b7b..43bc05bf33c 100644 --- a/src/content/docs/book/variables_and_subexpressions.md +++ b/src/content/docs/book/variables_and_subexpressions.md @@ -75,7 +75,7 @@ To use mutable variables for such behavior, you are encouraged to use the loops #### Constant Variables -A constant variable is an immutable variable that can be fully evaluated at parse-time. These are useful with commands that need to know the value of an argument at parse time, like [`source`](/commands/docs/source.md), [`use`](/commands/docs/use.md) and [`register`](/commands/docs/register.md). See [how nushell code gets run](how_nushell_code_gets_run.md) for a deeper explanation. They are declared using the `const` keyword +A constant variable is an immutable variable that can be fully evaluated at parse-time. These are useful with commands that need to know the value of an argument at parse time, like [`source`](/commands/docs/source), [`use`](/commands/docs/use) and [`register`](/commands/docs/register). See [how nushell code gets run](how_nushell_code_gets_run) for a deeper explanation. They are declared using the `const` keyword ```nushell frame="terminal" const plugin = 'path/to/plugin' @@ -132,7 +132,7 @@ $files.name?.0? You can always evaluate a subexpression and use its result by wrapping the expression with parentheses `()`. Note that previous versions of Nushell (prior to 0.32) used `$()`. -The parentheses contain a pipeline that will run to completion, and the resulting value will then be used. For example, `(ls)` would run the [`ls`](/commands/docs/ls.md) command and give back the resulting table and `(git branch --show-current)` runs the external git command and returns a string with the name of the current branch. You can also use parentheses to run math expressions like `(2 + 3)`. +The parentheses contain a pipeline that will run to completion, and the resulting value will then be used. For example, `(ls)` would run the [`ls`](/commands/docs/ls) command and give back the resulting table and `(git branch --show-current)` runs the external git command and returns a string with the name of the current branch. You can also use parentheses to run math expressions like `(2 + 3)`. Subexpressions can also be pipelines and not just single commands. If we wanted to get a table of files larger than ten kilobytes, we could use a subexpression to run a pipeline and assign its result to a variable: @@ -143,7 +143,7 @@ $big_files # │ name │ type │ size │ modified ───┼────────────┼──────┼──────────┼────────────── 0 │ Cargo.lock │ File │ 155.3 KB │ 17 hours ago - 1 │ README.md │ File │ 15.9 KB │ 17 hours ago + 1 │ README │ File │ 15.9 KB │ 17 hours ago ───┴────────────┴──────┴──────────┴────────────── ``` @@ -165,13 +165,13 @@ It depends on the needs of the code and your particular style which form works b ## Short-hand subexpressions (row conditions) -Nushell supports accessing columns in a subexpression using a simple short-hand. You may have already used this functionality before. If, for example, we wanted to only see rows from [`ls`](/commands/docs/ls.md) where the entry is at least ten kilobytes we could write: +Nushell supports accessing columns in a subexpression using a simple short-hand. You may have already used this functionality before. If, for example, we wanted to only see rows from [`ls`](/commands/docs/ls) where the entry is at least ten kilobytes we could write: ```nushell frame="terminal" ls | where size > 10kb ``` -The `where size > 10kb` is a command with two parts: the command name [`where`](/commands/docs/where.md) and the short-hand expression `size > 10kb`. We say short-hand because `size` here is the shortened version of writing `$it.size`. This could also be written in any of the following ways: +The `where size > 10kb` is a command with two parts: the command name [`where`](/commands/docs/where) and the short-hand expression `size > 10kb`. We say short-hand because `size` here is the shortened version of writing `$it.size`. This could also be written in any of the following ways: ```nushell frame="terminal" ls | where $it.size > 10kb diff --git a/src/content/docs/book/working_with_lists.md b/src/content/docs/book/working_with_lists.md index effe040b6a6..75f76c776ca 100644 --- a/src/content/docs/book/working_with_lists.md +++ b/src/content/docs/book/working_with_lists.md @@ -10,14 +10,14 @@ For example, `[foo bar baz]` or `[foo, bar, baz]`. ## Updating lists -You can [`update`](/commands/docs/update.md) and [`insert`](/commands/docs/insert.md) values into lists as they flow through the pipeline, for example let's insert the value `10` into the middle of a list: +You can [`update`](/commands/docs/update) and [`insert`](/commands/docs/insert) values into lists as they flow through the pipeline, for example let's insert the value `10` into the middle of a list: ```nushell frame="terminal" [1, 2, 3, 4] | insert 2 10 # [1, 2, 10, 3, 4] ``` -We can also use [`update`](/commands/docs/update.md) to replace the 2nd element with the value `10`. +We can also use [`update`](/commands/docs/update) to replace the 2nd element with the value `10`. ```nushell frame="terminal" [1, 2, 3, 4] | update 1 10 @@ -26,7 +26,7 @@ We can also use [`update`](/commands/docs/update.md) to replace the 2nd element ## Removing or adding items from list -In addition to [`insert`](/commands/docs/insert.md) and [`update`](/commands/docs/update.md), we also have [`prepend`](/commands/docs/prepend.md) and [`append`](/commands/docs/append.md). These let you insert to the beginning of a list or at the end of the list, respectively. +In addition to [`insert`](/commands/docs/insert) and [`update`](/commands/docs/update), we also have [`prepend`](/commands/docs/prepend) and [`append`](/commands/docs/append). These let you insert to the beginning of a list or at the end of the list, respectively. For example: @@ -40,7 +40,7 @@ $colors # [black red yellow green purple blue] ``` -In case you want to remove items from list, there are many ways. [`skip`](/commands/docs/skip.md) allows you skip first rows from input, while [`drop`](/commands/docs/drop.md) allows you to skip specific numbered rows from end of list. +In case you want to remove items from list, there are many ways. [`skip`](/commands/docs/skip) allows you skip first rows from input, while [`drop`](/commands/docs/drop) allows you to skip specific numbered rows from end of list. ```nushell frame="terminal" let colors = [red yellow green purple] @@ -50,7 +50,7 @@ $colors # [yellow] ``` -We also have [`last`](/commands/docs/last.md) and [`first`](/commands/docs/first.md) which allow you to [`take`](/commands/docs/take.md) from the end or beginning of the list, respectively. +We also have [`last`](/commands/docs/last) and [`first`](/commands/docs/first) which allow you to [`take`](/commands/docs/take) from the end or beginning of the list, respectively. ```nushell frame="terminal" let colors = [red yellow green purple black magenta] @@ -68,9 +68,9 @@ $colors # [yellow green] ## Iterating over lists -To iterate over the items in a list, use the [`each`](/commands/docs/each.md) command with a [block](types_of_data.html#blocks) +To iterate over the items in a list, use the [`each`](/commands/docs/each) command with a [block](/book/types_of_data#blocks) of Nu code that specifies what to do to each item. The block parameter (e.g. `|it|` in `{ |it| print $it }`) is the current list -item, but the [`enumerate`](/commands/docs/enumerate.md) filter can be used to provide `index` and `item` values if needed. For example: +item, but the [`enumerate`](/commands/docs/enumerate) filter can be used to provide `index` and `item` values if needed. For example: ```nushell frame="terminal" let names = [Mark Tami Amanda Jeremy] @@ -81,7 +81,7 @@ $names | enumerate | each { |it| $"($it.index + 1) - ($it.item)" } # Outputs "1 - Mark", "2 - Tami", etc. ``` -The [`where`](/commands/docs/where.md) command can be used to create a subset of a list, effectively filtering the list based on a condition. +The [`where`](/commands/docs/where) command can be used to create a subset of a list, effectively filtering the list based on a condition. The following example gets all the colors whose names end in "e". @@ -100,10 +100,10 @@ $scores | where $it > 7 # [10 8] ``` -The [`reduce`](/commands/docs/reduce.md) command computes a single value from a list. +The [`reduce`](/commands/docs/reduce) command computes a single value from a list. It uses a block which takes 2 parameters: the current item (conventionally named `it`) and an accumulator (conventionally named `acc`). To specify an initial value for the accumulator, use the `--fold` (`-f`) flag. -To change `it` to have `index` and `item` values, use the [`enumerate`](/commands/docs/enumerate.md) filter. +To change `it` to have `index` and `item` values, use the [`enumerate`](/commands/docs/enumerate) filter. For example: ```nushell frame="terminal" @@ -141,10 +141,10 @@ $names | get $index # Tami ``` -The [`length`](/commands/docs/length.md) command returns the number of items in a list. +The [`length`](/commands/docs/length) command returns the number of items in a list. For example, `[red green blue] | length` outputs `3`. -The [`is-empty`](/commands/docs/is-empty.md) command determines whether a string, list, or table is empty. +The [`is-empty`](/commands/docs/is-empty) command determines whether a string, list, or table is empty. It can be used with lists as follows: ```nushell frame="terminal" @@ -169,7 +169,7 @@ let colors = [red green blue] # true ``` -The [`any`](/commands/docs/any.md) command determines if any item in a list +The [`any`](/commands/docs/any) command determines if any item in a list matches a given condition. For example: @@ -193,7 +193,7 @@ $scores | any {|it| $it mod 2 == 1 } # true ``` -The [`all`](/commands/docs/all.md) command determines if every item in a list +The [`all`](/commands/docs/all) command determines if every item in a list matches a given condition. For example: @@ -219,7 +219,7 @@ $scores | all {|it| $it mod 2 == 0 } ## Converting the list -The [`flatten`](/commands/docs/flatten.md) command creates a new list from an existing list +The [`flatten`](/commands/docs/flatten) command creates a new list from an existing list by adding items in nested lists to the top-level list. This can be called multiple times to flatten lists nested at any depth. For example: @@ -232,7 +232,7 @@ For example: # [1 2 3 4 5 6 7 8] ``` -The [`wrap`](/commands/docs/wrap.md) command converts a list to a table. Each list value will +The [`wrap`](/commands/docs/wrap) command converts a list to a table. Each list value will be converted to a separate row with a single column: ```nushell frame="terminal" diff --git a/src/content/docs/book/working_with_strings.md b/src/content/docs/book/working_with_strings.md index a0c573878db..67d857812d1 100644 --- a/src/content/docs/book/working_with_strings.md +++ b/src/content/docs/book/working_with_strings.md @@ -130,7 +130,7 @@ let foo = 'C:\Program Files\exiftool.exe' ^$foo ``` -You can also use the [`run-external`](/commands/docs/run-external.md) command for this purpose, which provides additional flags and options. +You can also use the [`run-external`](/commands/docs/run-external) command for this purpose, which provides additional flags and options. ## Appending and Prepending to strings @@ -200,7 +200,7 @@ const x = $"(2kb)" ## Splitting strings -The [`split row`](/commands/docs/split_row.md) command creates a list from a string based on a delimiter. +The [`split row`](/commands/docs/split_row) command creates a list from a string based on a delimiter. ```nushell frame="terminal" "red,green,blue" | split row "," @@ -211,7 +211,7 @@ The [`split row`](/commands/docs/split_row.md) command creates a list from a str ╰───┴───────╯ ``` -The [`split column`](/commands/docs/split_column.md) command will create a table from a string based on a delimiter. This applies generic column names to the table. +The [`split column`](/commands/docs/split_column) command will create a table from a string based on a delimiter. This applies generic column names to the table. ```nushell frame="terminal" "red,green,blue" | split column "," @@ -222,7 +222,7 @@ The [`split column`](/commands/docs/split_column.md) command will create a table ╰───┴─────────┴─────────┴─────────╯ ``` -Finally, the [`split chars`](/commands/docs/split_chars.md) command will split a string into a list of characters. +Finally, the [`split chars`](/commands/docs/split_chars) command will split a string into a list of characters. ```nushell frame="terminal" 'aeiou' | split chars @@ -235,11 +235,11 @@ Finally, the [`split chars`](/commands/docs/split_chars.md) command will split a ╰───┴───╯ ``` -## The [`str`](/commands/docs/str.md) command +## The [`str`](/commands/docs/str) command -Many string functions are subcommands of the [`str`](/commands/docs/str.md) command. You can get a full list using `help str`. +Many string functions are subcommands of the [`str`](/commands/docs/str) command. You can get a full list using `help str`. -For example, you can look if a string contains a particular substring using [`str contains`](/commands/docs/str_contains.md): +For example, you can look if a string contains a particular substring using [`str contains`](/commands/docs/str_contains): ```nushell frame="terminal" "hello world" | str contains "o wo" @@ -250,7 +250,7 @@ For example, you can look if a string contains a particular substring using [`st ### Trimming strings -You can trim the sides of a string with the [`str trim`](/commands/docs/str_trim.md) command. By default, the [`str trim`](/commands/docs/str_trim.md) commands trims whitespace from both sides of the string. For example: +You can trim the sides of a string with the [`str trim`](/commands/docs/str_trim) command. By default, the [`str trim`](/commands/docs/str_trim) commands trims whitespace from both sides of the string. For example: ```nushell frame="terminal" ' My string ' | str trim @@ -283,7 +283,7 @@ Substrings are slices of a string. They have a startpoint and an endpoint. Here' ### String padding -With the [`fill`](/commands/docs/fill.md) command you can add padding to a string. Padding adds characters to string until it's a certain length. For example: +With the [`fill`](/commands/docs/fill) command you can add padding to a string. Padding adds characters to string until it's a certain length. For example: ```nushell frame="terminal" '1234' | fill -a right -c '0' -w 10 @@ -294,7 +294,7 @@ With the [`fill`](/commands/docs/fill.md) command you can add padding to a strin ### Reversing strings -This can be done easily with the [`str reverse`](/commands/docs/str_reverse.md) command. +This can be done easily with the [`str reverse`](/commands/docs/str_reverse) command. ```nushell frame="terminal" 'Nushell' | str reverse @@ -309,7 +309,7 @@ This can be done easily with the [`str reverse`](/commands/docs/str_reverse.md) ## String parsing -With the [`parse`](/commands/docs/parse.md) command you can parse a string into columns. For example: +With the [`parse`](/commands/docs/parse) command you can parse a string into columns. For example: ```nushell frame="terminal" 'Nushell 0.80' | parse '{shell} {version}' @@ -326,7 +326,7 @@ With the [`parse`](/commands/docs/parse.md) command you can parse a string into ╰───┴──────────┴────────────╯ ``` -If a string is known to contain comma-separated, tab-separated or multi-space-separated data, you can use [`from csv`](/commands/docs/from_csv.md), [`from tsv`](/commands/docs/from_tsv.md) or [`from ssv`](/commands/docs/from_ssv.md): +If a string is known to contain comma-separated, tab-separated or multi-space-separated data, you can use [`from csv`](/commands/docs/from_csv), [`from tsv`](/commands/docs/from_tsv) or [`from ssv`](/commands/docs/from_ssv): ```nushell frame="terminal" "acronym,long\nAPL,A Programming Language" | from csv @@ -378,16 +378,16 @@ There are multiple ways to convert strings to and from other types. ### To string -1. Using [`into string`](/commands/docs/into_string.md). e.g. `123 | into string` +1. Using [`into string`](/commands/docs/into_string). e.g. `123 | into string` 2. Using string interpolation. e.g. `$'(123)'` ### From string -1. Using [`into `](/commands/docs/into.md). e.g. `'123' | into int` +1. Using [`into `](/commands/docs/into). e.g. `'123' | into int` ## Coloring strings -You can color strings with the [`ansi`](/commands/docs/ansi.md) command. For example: +You can color strings with the [`ansi`](/commands/docs/ansi) command. For example: ```nushell frame="terminal" $'(ansi purple_bold)This text is a bold purple!(ansi reset)' diff --git a/src/content/docs/book/working_with_tables.md b/src/content/docs/book/working_with_tables.md index af881cce83e..68d1bd102c5 100644 --- a/src/content/docs/book/working_with_tables.md +++ b/src/content/docs/book/working_with_tables.md @@ -23,12 +23,12 @@ ls :::tip[Changing how tables are displayed] Nu will try to expands all table's structure by default. You can change this behavior by changing the `display_output` hook. -See [hooks](/book/hooks.md#changing-how-output-is-displayed) for more information. +See [hooks](/book/hooks#changing-how-output-is-displayed) for more information. ::: ## Sorting the data -We can sort a table by calling the [`sort-by`](/commands/docs/sort-by.md) command and telling it which columns we want to use in the sort. Let's say we wanted to sort our table by the size of the file: +We can sort a table by calling the [`sort-by`](/commands/docs/sort-by) command and telling it which columns we want to use in the sort. Let's say we wanted to sort our table by the size of the file: ```nushell frame="terminal" ls | sort-by size @@ -49,7 +49,7 @@ We can sort a table by any column that can be compared. For example, we could al ## Selecting the data you want -We can select data from a table by choosing to select specific columns or specific rows. Let's [`select`](/commands/docs/select.md) a few columns from our table to use: +We can select data from a table by choosing to select specific columns or specific rows. Let's [`select`](/commands/docs/select) a few columns from our table to use: ```nushell frame="terminal" ls | select name size @@ -83,7 +83,7 @@ ls | sort-by size | first 5 You'll notice we first sort the table by size to get to the smallest file, and then we use the `first 5` to return the first 5 rows of the table. -You can also [`skip`](/commands/docs/skip.md) rows that you don't want. Let's skip the first two of the 5 rows we returned above: +You can also [`skip`](/commands/docs/skip) rows that you don't want. Let's skip the first two of the 5 rows we returned above: ```nushell frame="terminal" ls | sort-by size | first 5 | skip 2 @@ -98,7 +98,7 @@ ls | sort-by size | first 5 | skip 2 We've narrowed it to three rows we care about. -Let's look at a few other commands for selecting data. You may have wondered why the rows of the table are numbers. This acts as a handy way to get to a single row. Let's sort our table by the file name and then pick one of the rows with the [`select`](/commands/docs/select.md) command using its row number: +Let's look at a few other commands for selecting data. You may have wondered why the rows of the table are numbers. This acts as a handy way to get to a single row. Let's sort our table by the file name and then pick one of the rows with the [`select`](/commands/docs/select) command using its row number: ```nushell frame="terminal" ls | sort-by name @@ -124,7 +124,7 @@ ls | sort-by name | select 5 ## Getting data out of a table -So far, we've worked with tables by trimming the table down to only what we need. Sometimes we may want to go a step further and only look at the values in the cells themselves rather than taking a whole column. Let's say, for example, we wanted to only get a list of the names of the files. For this, we use the [`get`](/commands/docs/get.md) command: +So far, we've worked with tables by trimming the table down to only what we need. Sometimes we may want to go a step further and only look at the values in the cells themselves rather than taking a whole column. Let's say, for example, we wanted to only get a list of the names of the files. For this, we use the [`get`](/commands/docs/get) command: ```nushell frame="terminal" ls | get name @@ -141,7 +141,7 @@ ls | get name We now have the values for each of the filenames. -This might look like the [`select`](/commands/docs/select.md) command we saw earlier, so let's put that here as well to compare the two: +This might look like the [`select`](/commands/docs/select) command we saw earlier, so let's put that here as well to compare the two: ```nushell frame="terminal" ls | select name @@ -160,12 +160,12 @@ ls | select name These look very similar! Let's see if we can spell out the difference between these two commands to make it clear: -- [`select`](/commands/docs/select.md) - creates a new table which includes only the columns specified -- [`get`](/commands/docs/get.md) - returns the values inside the column specified as a list +- [`select`](/commands/docs/select) - creates a new table which includes only the columns specified +- [`get`](/commands/docs/get) - returns the values inside the column specified as a list The one way to tell these apart looking at the table is that the column names are missing, which lets us know that this is going to be a list of values we can work with. -The [`get`](/commands/docs/get.md) command can go one step further and take a path to data deeper in the table. This simplifies working with more complex data, like the structures you might find in a .json file. +The [`get`](/commands/docs/get) command can go one step further and take a path to data deeper in the table. This simplifies working with more complex data, like the structures you might find in a .json file. ## Changing data in a table @@ -173,7 +173,7 @@ In addition to selecting data from a table, we can also update what the table ha ### Concatenating Tables -We can concatenate tables using [`append`](/commands/docs/append.md): +We can concatenate tables using [`append`](/commands/docs/append): ```nushell frame="terminal" let first = [[a b]; [1 2]] @@ -218,7 +218,7 @@ $first ++ $second ++ $third ### Merging Tables -We can use the [`merge`](/commands/docs/merge.md) command to merge two (or more) tables together +We can use the [`merge`](/commands/docs/merge) command to merge two (or more) tables together ```nushell frame="terminal" let first = [[a b]; [1 2]] @@ -248,7 +248,7 @@ $first | merge $second | merge $third ───┴───┴───┴───┴───┴───┴─── ``` -Or we could use the [`reduce`](/commands/docs/reduce.md) command to dynamically merge all tables: +Or we could use the [`reduce`](/commands/docs/reduce) command to dynamically merge all tables: ```nushell frame="terminal" [$first $second $third] | reduce {|it, acc| $acc | merge $it } @@ -261,7 +261,7 @@ Or we could use the [`reduce`](/commands/docs/reduce.md) command to dynamically ### Adding a new column -We can use the [`insert`](/commands/docs/insert.md) command to add a new column to the table. Let's look at an example: +We can use the [`insert`](/commands/docs/insert) command to add a new column to the table. Let's look at an example: ```nushell frame="terminal" open rustfmt.toml @@ -302,7 +302,7 @@ open rustfmt.toml ─────────┴────── ``` -Changes in Nu are functional changes, meaning that they work on values themselves rather than trying to cause a permanent change. This lets us do many different types of work in our pipeline until we're ready to write out the result with any changes we'd like if we choose to. Here we could write out the result using the [`save`](/commands/docs/save.md) command: +Changes in Nu are functional changes, meaning that they work on values themselves rather than trying to cause a permanent change. This lets us do many different types of work in our pipeline until we're ready to write out the result with any changes we'd like if we choose to. Here we could write out the result using the [`save`](/commands/docs/save) command: ```nushell frame="terminal" >open rustfmt.toml | insert next_edition 2021 | save rustfmt2.toml @@ -315,7 +315,7 @@ open rustfmt2.toml ### Updating a column -In a similar way to the [`insert`](/commands/docs/insert.md) command, we can also use the [`update`](/commands/docs/update.md) command to change the contents of a column to a new value. To see it in action let's open the same file: +In a similar way to the [`insert`](/commands/docs/insert) command, we can also use the [`update`](/commands/docs/update) command to change the contents of a column to a new value. To see it in action let's open the same file: ```nushell frame="terminal" open rustfmt.toml @@ -333,11 +333,11 @@ open rustfmt.toml | update edition 2021 ─────────┴────── ``` -You can also use the [`upsert`](/commands/docs/upsert.md) command to insert or update depending on whether the column already exists. +You can also use the [`upsert`](/commands/docs/upsert) command to insert or update depending on whether the column already exists. ### Moving columns -You can use [`move`](/commands/docs/move.md) to move columns in the table. For example, if we wanted to move the "name" column from [`ls`](/commands/docs/ls.md) after the "size" column, we could do: +You can use [`move`](/commands/docs/move) to move columns in the table. For example, if we wanted to move the "name" column from [`ls`](/commands/docs/ls) after the "size" column, we could do: ```nushell frame="terminal" ls | move name --after size @@ -354,7 +354,7 @@ ls | move name --after size ### Renaming columns -You can also [`rename`](/commands/docs/rename.md) columns in a table by passing it through the rename command. If we wanted to run [`ls`](/commands/docs/ls.md) and rename the columns, we can use this example: +You can also [`rename`](/commands/docs/rename) columns in a table by passing it through the rename command. If we wanted to run [`ls`](/commands/docs/ls) and rename the columns, we can use this example: ```nushell frame="terminal" ls | rename filename filetype filesize date @@ -371,7 +371,7 @@ ls | rename filename filetype filesize date ### Rejecting/Deleting columns -You can also [`reject`](/commands/docs/reject.md) columns in a table by passing it through the reject command. If we wanted to run [`ls`](/commands/docs/ls.md) and delete the columns, we can use this example: +You can also [`reject`](/commands/docs/reject) columns in a table by passing it through the reject command. If we wanted to run [`ls`](/commands/docs/ls) and delete the columns, we can use this example: ```nushell frame="terminal" ls -l / |reject readonly num_links inode created accessed modified diff --git a/src/content/docs/commands.mdx b/src/content/docs/commands.mdx index 0b3c75447b6..b1c38b23f75 100644 --- a/src/content/docs/commands.mdx +++ b/src/content/docs/commands.mdx @@ -6,9 +6,9 @@ author_image: https://www.nushell.sh/blog/images/jonathandturner.jpg excerpt: Today, we're introducing a new shell, written in Rust. It draws inspiration from the classic Unix philosophy of pipelines, the structured data approach of PowerShell, functional programming, systems programming, and more. --- -If you're new to Nushell, [the quick tour](/book/quick_tour.md) can show you the most important commands. You don't need to know them all! +If you're new to Nushell, [the quick tour](/book/quick_tour) can show you the most important commands. You don't need to know them all! -To see all commands from inside Nushell, run [`help commands`](/commands/docs/help.md). +To see all commands from inside Nushell, run [`help commands`](/commands/docs/help). import GetCommands from "../../components/GetCommands.astro"; diff --git a/src/content/docs/commands/docs/ansi.md b/src/content/docs/commands/docs/ansi.md index cbd29e842c6..84fad5b1c28 100644 --- a/src/content/docs/commands/docs/ansi.md +++ b/src/content/docs/commands/docs/ansi.md @@ -152,6 +152,6 @@ Operating system commands: | name | type | usage | | -------------------------------------------------- | ------- | ------------------------------------------------------------------ | -| [`ansi gradient`](/commands/docs/ansi_gradient.md) | Builtin | Add a color gradient (using ANSI color codes) to the given string. | -| [`ansi link`](/commands/docs/ansi_link.md) | Builtin | Add a link (using OSC 8 escape sequence) to the given string. | -| [`ansi strip`](/commands/docs/ansi_strip.md) | Builtin | Strip ANSI escape sequences from a string. | +| [`ansi gradient`](/commands/docs/ansi_gradient) | Builtin | Add a color gradient (using ANSI color codes) to the given string. | +| [`ansi link`](/commands/docs/ansi_link) | Builtin | Add a link (using OSC 8 escape sequence) to the given string. | +| [`ansi strip`](/commands/docs/ansi_strip) | Builtin | Strip ANSI escape sequences from a string. | diff --git a/src/content/docs/commands/docs/bits.md b/src/content/docs/commands/docs/bits.md index 439b6a0dac3..cf85f54f7d2 100644 --- a/src/content/docs/commands/docs/bits.md +++ b/src/content/docs/commands/docs/bits.md @@ -38,11 +38,11 @@ You must use one of the following subcommands. Using this command as-is will onl | name | type | usage | | ---------------------------------------- | ------- | -------------------------------------- | -| [`bits and`](/commands/docs/bits_and.md) | Builtin | Performs bitwise and for ints. | -| [`bits not`](/commands/docs/bits_not.md) | Builtin | Performs logical negation on each bit. | -| [`bits or`](/commands/docs/bits_or.md) | Builtin | Performs bitwise or for ints. | -| [`bits rol`](/commands/docs/bits_rol.md) | Builtin | Bitwise rotate left for ints. | -| [`bits ror`](/commands/docs/bits_ror.md) | Builtin | Bitwise rotate right for ints. | -| [`bits shl`](/commands/docs/bits_shl.md) | Builtin | Bitwise shift left for ints. | -| [`bits shr`](/commands/docs/bits_shr.md) | Builtin | Bitwise shift right for ints. | -| [`bits xor`](/commands/docs/bits_xor.md) | Builtin | Performs bitwise xor for ints. | +| [`bits and`](/commands/docs/bits_and) | Builtin | Performs bitwise and for ints. | +| [`bits not`](/commands/docs/bits_not) | Builtin | Performs logical negation on each bit. | +| [`bits or`](/commands/docs/bits_or) | Builtin | Performs bitwise or for ints. | +| [`bits rol`](/commands/docs/bits_rol) | Builtin | Bitwise rotate left for ints. | +| [`bits ror`](/commands/docs/bits_ror) | Builtin | Bitwise rotate right for ints. | +| [`bits shl`](/commands/docs/bits_shl) | Builtin | Bitwise shift left for ints. | +| [`bits shr`](/commands/docs/bits_shr) | Builtin | Bitwise shift right for ints. | +| [`bits xor`](/commands/docs/bits_xor) | Builtin | Performs bitwise xor for ints. | diff --git a/src/content/docs/commands/docs/bytes.md b/src/content/docs/commands/docs/bytes.md index 250fe66d255..bcdf59f014d 100644 --- a/src/content/docs/commands/docs/bytes.md +++ b/src/content/docs/commands/docs/bytes.md @@ -34,14 +34,14 @@ You must use one of the following subcommands. Using this command as-is will onl | name | type | usage | | ---------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------ | -| [`bytes add`](/commands/docs/bytes_add.md) | Builtin | Add specified bytes to the input. | -| [`bytes at`](/commands/docs/bytes_at.md) | Builtin | Get bytes defined by a range. | -| [`bytes build`](/commands/docs/bytes_build.md) | Builtin | Create bytes from the arguments. | -| [`bytes collect`](/commands/docs/bytes_collect.md) | Builtin | Concatenate multiple binary into a single binary, with an optional separator between each. | -| [`bytes ends-with`](/commands/docs/bytes_ends-with.md) | Builtin | Check if bytes ends with a pattern. | -| [`bytes index-of`](/commands/docs/bytes_index-of.md) | Builtin | Returns start index of first occurrence of pattern in bytes, or -1 if no match. | -| [`bytes length`](/commands/docs/bytes_length.md) | Builtin | Output the length of any bytes in the pipeline. | -| [`bytes remove`](/commands/docs/bytes_remove.md) | Builtin | Remove bytes. | -| [`bytes replace`](/commands/docs/bytes_replace.md) | Builtin | Find and replace binary. | -| [`bytes reverse`](/commands/docs/bytes_reverse.md) | Builtin | Reverse the bytes in the pipeline. | -| [`bytes starts-with`](/commands/docs/bytes_starts-with.md) | Builtin | Check if bytes starts with a pattern. | +| [`bytes add`](/commands/docs/bytes_add) | Builtin | Add specified bytes to the input. | +| [`bytes at`](/commands/docs/bytes_at) | Builtin | Get bytes defined by a range. | +| [`bytes build`](/commands/docs/bytes_build) | Builtin | Create bytes from the arguments. | +| [`bytes collect`](/commands/docs/bytes_collect) | Builtin | Concatenate multiple binary into a single binary, with an optional separator between each. | +| [`bytes ends-with`](/commands/docs/bytes_ends-with) | Builtin | Check if bytes ends with a pattern. | +| [`bytes index-of`](/commands/docs/bytes_index-of) | Builtin | Returns start index of first occurrence of pattern in bytes, or -1 if no match. | +| [`bytes length`](/commands/docs/bytes_length) | Builtin | Output the length of any bytes in the pipeline. | +| [`bytes remove`](/commands/docs/bytes_remove) | Builtin | Remove bytes. | +| [`bytes replace`](/commands/docs/bytes_replace) | Builtin | Find and replace binary. | +| [`bytes reverse`](/commands/docs/bytes_reverse) | Builtin | Reverse the bytes in the pipeline. | +| [`bytes starts-with`](/commands/docs/bytes_starts-with) | Builtin | Check if bytes starts with a pattern. | diff --git a/src/content/docs/commands/docs/config.md b/src/content/docs/commands/docs/config.md index d87656145e3..4572a95e6b2 100644 --- a/src/content/docs/commands/docs/config.md +++ b/src/content/docs/commands/docs/config.md @@ -34,6 +34,6 @@ You must use one of the following subcommands. Using this command as-is will onl | name | type | usage | | ------------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------- | -| [`config env`](/commands/docs/config_env.md) | Builtin | Edit nu environment configurations. | -| [`config nu`](/commands/docs/config_nu.md) | Builtin | Edit nu configurations. | -| [`config reset`](/commands/docs/config_reset.md) | Builtin | Reset nushell environment configurations to default, and saves old config files in the config location as oldconfig.nu and oldenv.nu. | +| [`config env`](/commands/docs/config_env) | Builtin | Edit nu environment configurations. | +| [`config nu`](/commands/docs/config_nu) | Builtin | Edit nu configurations. | +| [`config reset`](/commands/docs/config_reset) | Builtin | Reset nushell environment configurations to default, and saves old config files in the config location as oldconfig.nu and oldenv.nu. | diff --git a/src/content/docs/commands/docs/date.md b/src/content/docs/commands/docs/date.md index 92b83c8256c..4844de0c60e 100644 --- a/src/content/docs/commands/docs/date.md +++ b/src/content/docs/commands/docs/date.md @@ -34,10 +34,10 @@ You must use one of the following subcommands. Using this command as-is will onl | name | type | usage | | ------------------------------------------------------------ | ------- | --------------------------------------------------------- | -| [`date format`](/commands/docs/date_format.md) | Builtin | Removed command: use `format date` instead. | -| [`date humanize`](/commands/docs/date_humanize.md) | Builtin | Print a 'humanized' format for the date, relative to now. | -| [`date list-timezone`](/commands/docs/date_list-timezone.md) | Builtin | List supported time zones. | -| [`date now`](/commands/docs/date_now.md) | Builtin | Get the current date. | -| [`date to-record`](/commands/docs/date_to-record.md) | Builtin | Convert the date into a record. | -| [`date to-table`](/commands/docs/date_to-table.md) | Builtin | Convert the date into a structured table. | -| [`date to-timezone`](/commands/docs/date_to-timezone.md) | Builtin | Convert a date to a given time zone. | +| [`date format`](/commands/docs/date_format) | Builtin | Removed command: use `format date` instead. | +| [`date humanize`](/commands/docs/date_humanize) | Builtin | Print a 'humanized' format for the date, relative to now. | +| [`date list-timezone`](/commands/docs/date_list-timezone) | Builtin | List supported time zones. | +| [`date now`](/commands/docs/date_now) | Builtin | Get the current date. | +| [`date to-record`](/commands/docs/date_to-record) | Builtin | Convert the date into a record. | +| [`date to-table`](/commands/docs/date_to-table) | Builtin | Convert the date into a structured table. | +| [`date to-timezone`](/commands/docs/date_to-timezone) | Builtin | Convert a date to a given time zone. | diff --git a/src/content/docs/commands/docs/debug.md b/src/content/docs/commands/docs/debug.md index 1e25aac642a..fa9f2bc8123 100644 --- a/src/content/docs/commands/docs/debug.md +++ b/src/content/docs/commands/docs/debug.md @@ -66,4 +66,4 @@ Debug print a table | name | type | usage | | -------------------------------------------- | ------- | ------------------------- | -| [`debug info`](/commands/docs/debug_info.md) | Builtin | View process memory info. | +| [`debug info`](/commands/docs/debug_info) | Builtin | View process memory info. | diff --git a/src/content/docs/commands/docs/decode.md b/src/content/docs/commands/docs/decode.md index f9e51e0f076..a050f38f309 100644 --- a/src/content/docs/commands/docs/decode.md +++ b/src/content/docs/commands/docs/decode.md @@ -58,5 +58,5 @@ documentation link at https://docs.rs/encoding_rs/latest/encoding_rs/#statics | name | type | usage | | -------------------------------------------------- | ------- | ---------------------- | -| [`decode base64`](/commands/docs/decode_base64.md) | Builtin | Base64 decode a value. | -| [`decode hex`](/commands/docs/decode_hex.md) | Builtin | Hex decode a value. | +| [`decode base64`](/commands/docs/decode_base64) | Builtin | Base64 decode a value. | +| [`decode hex`](/commands/docs/decode_hex) | Builtin | Hex decode a value. | diff --git a/src/content/docs/commands/docs/dfr.md b/src/content/docs/commands/docs/dfr.md index c6b4abbb095..4c69e7dce6f 100644 --- a/src/content/docs/commands/docs/dfr.md +++ b/src/content/docs/commands/docs/dfr.md @@ -38,111 +38,111 @@ You must use one of the following subcommands. Using this command as-is will onl | name | type | usage | | -------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------ | -| [`dfr agg`](/commands/docs/dfr_agg.md) | Builtin | Performs a series of aggregations from a group-by. | -| [`dfr agg-groups`](/commands/docs/dfr_agg-groups.md) | Builtin | Creates an agg_groups expression. | -| [`dfr all-false`](/commands/docs/dfr_all-false.md) | Builtin | Returns true if all values are false. | -| [`dfr all-true`](/commands/docs/dfr_all-true.md) | Builtin | Returns true if all values are true. | -| [`dfr append`](/commands/docs/dfr_append.md) | Builtin | Appends a new dataframe. | -| [`dfr arg-max`](/commands/docs/dfr_arg-max.md) | Builtin | Return index for max value in series. | -| [`dfr arg-min`](/commands/docs/dfr_arg-min.md) | Builtin | Return index for min value in series. | -| [`dfr arg-sort`](/commands/docs/dfr_arg-sort.md) | Builtin | Returns indexes for a sorted series. | -| [`dfr arg-true`](/commands/docs/dfr_arg-true.md) | Builtin | Returns indexes where values are true. | -| [`dfr arg-unique`](/commands/docs/dfr_arg-unique.md) | Builtin | Returns indexes for unique values. | -| [`dfr arg-where`](/commands/docs/dfr_arg-where.md) | Builtin | Creates an expression that returns the arguments where expression is true. | -| [`dfr as`](/commands/docs/dfr_as.md) | Builtin | Creates an alias expression. | -| [`dfr as-date`](/commands/docs/dfr_as-date.md) | Builtin | Converts string to date. | -| [`dfr as-datetime`](/commands/docs/dfr_as-datetime.md) | Builtin | Converts string to datetime. | -| [`dfr cache`](/commands/docs/dfr_cache.md) | Builtin | Caches operations in a new LazyFrame. | -| [`dfr col`](/commands/docs/dfr_col.md) | Builtin | Creates a named column expression. | -| [`dfr collect`](/commands/docs/dfr_collect.md) | Builtin | Collect lazy dataframe into eager dataframe. | -| [`dfr columns`](/commands/docs/dfr_columns.md) | Builtin | Show dataframe columns. | -| [`dfr concat-str`](/commands/docs/dfr_concat-str.md) | Builtin | Creates a concat string expression. | -| [`dfr concatenate`](/commands/docs/dfr_concatenate.md) | Builtin | Concatenates strings with other array. | -| [`dfr contains`](/commands/docs/dfr_contains.md) | Builtin | Checks if a pattern is contained in a string. | -| [`dfr count`](/commands/docs/dfr_count.md) | Builtin | Creates a count expression. | -| [`dfr count-null`](/commands/docs/dfr_count-null.md) | Builtin | Counts null values. | -| [`dfr cumulative`](/commands/docs/dfr_cumulative.md) | Builtin | Cumulative calculation for a series. | -| [`dfr datepart`](/commands/docs/dfr_datepart.md) | Builtin | Creates an expression for capturing the specified datepart in a column. | -| [`dfr drop`](/commands/docs/dfr_drop.md) | Builtin | Creates a new dataframe by dropping the selected columns. | -| [`dfr drop-duplicates`](/commands/docs/dfr_drop-duplicates.md) | Builtin | Drops duplicate values in dataframe. | -| [`dfr drop-nulls`](/commands/docs/dfr_drop-nulls.md) | Builtin | Drops null values in dataframe. | -| [`dfr dtypes`](/commands/docs/dfr_dtypes.md) | Builtin | Show dataframe data types. | -| [`dfr dummies`](/commands/docs/dfr_dummies.md) | Builtin | Creates a new dataframe with dummy variables. | -| [`dfr explode`](/commands/docs/dfr_explode.md) | Builtin | Explodes a dataframe or creates a explode expression. | -| [`dfr expr-not`](/commands/docs/dfr_expr-not.md) | Builtin | Creates a not expression. | -| [`dfr fetch`](/commands/docs/dfr_fetch.md) | Builtin | Collects the lazyframe to the selected rows. | -| [`dfr fill-nan`](/commands/docs/dfr_fill-nan.md) | Builtin | Replaces NaN values with the given expression. | -| [`dfr fill-null`](/commands/docs/dfr_fill-null.md) | Builtin | Replaces NULL values with the given expression. | -| [`dfr filter`](/commands/docs/dfr_filter.md) | Builtin | Filter dataframe based in expression. | -| [`dfr filter-with`](/commands/docs/dfr_filter-with.md) | Builtin | Filters dataframe using a mask or expression as reference. | -| [`dfr first`](/commands/docs/dfr_first.md) | Builtin | Show only the first number of rows or create a first expression | -| [`dfr flatten`](/commands/docs/dfr_flatten.md) | Builtin | An alias for dfr explode. | -| [`dfr get`](/commands/docs/dfr_get.md) | Builtin | Creates dataframe with the selected columns. | -| [`dfr get-day`](/commands/docs/dfr_get-day.md) | Builtin | Gets day from date. | -| [`dfr get-hour`](/commands/docs/dfr_get-hour.md) | Builtin | Gets hour from date. | -| [`dfr get-minute`](/commands/docs/dfr_get-minute.md) | Builtin | Gets minute from date. | -| [`dfr get-month`](/commands/docs/dfr_get-month.md) | Builtin | Gets month from date. | -| [`dfr get-nanosecond`](/commands/docs/dfr_get-nanosecond.md) | Builtin | Gets nanosecond from date. | -| [`dfr get-ordinal`](/commands/docs/dfr_get-ordinal.md) | Builtin | Gets ordinal from date. | -| [`dfr get-second`](/commands/docs/dfr_get-second.md) | Builtin | Gets second from date. | -| [`dfr get-week`](/commands/docs/dfr_get-week.md) | Builtin | Gets week from date. | -| [`dfr get-weekday`](/commands/docs/dfr_get-weekday.md) | Builtin | Gets weekday from date. | -| [`dfr get-year`](/commands/docs/dfr_get-year.md) | Builtin | Gets year from date. | -| [`dfr group-by`](/commands/docs/dfr_group-by.md) | Builtin | Creates a group-by object that can be used for other aggregations. | -| [`dfr implode`](/commands/docs/dfr_implode.md) | Builtin | Aggregates a group to a Series. | -| [`dfr into-df`](/commands/docs/dfr_into-df.md) | Builtin | Converts a list, table or record into a dataframe. | -| [`dfr into-lazy`](/commands/docs/dfr_into-lazy.md) | Builtin | Converts a dataframe into a lazy dataframe. | -| [`dfr into-nu`](/commands/docs/dfr_into-nu.md) | Builtin | Converts a dataframe or an expression into into nushell value for access and exploration. | -| [`dfr is-duplicated`](/commands/docs/dfr_is-duplicated.md) | Builtin | Creates mask indicating duplicated values. | -| [`dfr is-in`](/commands/docs/dfr_is-in.md) | Builtin | Creates an is-in expression. | -| [`dfr is-not-null`](/commands/docs/dfr_is-not-null.md) | Builtin | Creates mask where value is not null. | -| [`dfr is-null`](/commands/docs/dfr_is-null.md) | Builtin | Creates mask where value is null. | -| [`dfr is-unique`](/commands/docs/dfr_is-unique.md) | Builtin | Creates mask indicating unique values. | -| [`dfr join`](/commands/docs/dfr_join.md) | Builtin | Joins a lazy frame with other lazy frame. | -| [`dfr last`](/commands/docs/dfr_last.md) | Builtin | Creates new dataframe with tail rows or creates a last expression. | -| [`dfr lit`](/commands/docs/dfr_lit.md) | Builtin | Creates a literal expression. | -| [`dfr lowercase`](/commands/docs/dfr_lowercase.md) | Builtin | Lowercase the strings in the column. | -| [`dfr ls`](/commands/docs/dfr_ls.md) | Builtin | Lists stored dataframes. | -| [`dfr max`](/commands/docs/dfr_max.md) | Builtin | Creates a max expression or aggregates columns to their max value. | -| [`dfr mean`](/commands/docs/dfr_mean.md) | Builtin | Creates a mean expression for an aggregation or aggregates columns to their mean value. | -| [`dfr median`](/commands/docs/dfr_median.md) | Builtin | Aggregates columns to their median value | -| [`dfr melt`](/commands/docs/dfr_melt.md) | Builtin | Unpivot a DataFrame from wide to long format. | -| [`dfr min`](/commands/docs/dfr_min.md) | Builtin | Creates a min expression or aggregates columns to their min value. | -| [`dfr n-unique`](/commands/docs/dfr_n-unique.md) | Builtin | Counts unique values. | -| [`dfr not`](/commands/docs/dfr_not.md) | Builtin | Inverts boolean mask. | -| [`dfr open`](/commands/docs/dfr_open.md) | Builtin | Opens CSV, JSON, JSON lines, arrow, avro, or parquet file to create dataframe. | -| [`dfr otherwise`](/commands/docs/dfr_otherwise.md) | Builtin | Completes a when expression. | -| [`dfr quantile`](/commands/docs/dfr_quantile.md) | Builtin | Aggregates the columns to the selected quantile. | -| [`dfr query`](/commands/docs/dfr_query.md) | Builtin | Query dataframe using SQL. Note: The dataframe is always named 'df' in your query's from clause. | -| [`dfr rename`](/commands/docs/dfr_rename.md) | Builtin | Rename a dataframe column. | -| [`dfr replace`](/commands/docs/dfr_replace.md) | Builtin | Replace the leftmost (sub)string by a regex pattern. | -| [`dfr replace-all`](/commands/docs/dfr_replace-all.md) | Builtin | Replace all (sub)strings by a regex pattern. | -| [`dfr reverse`](/commands/docs/dfr_reverse.md) | Builtin | Reverses the LazyFrame | -| [`dfr rolling`](/commands/docs/dfr_rolling.md) | Builtin | Rolling calculation for a series. | -| [`dfr sample`](/commands/docs/dfr_sample.md) | Builtin | Create sample dataframe. | -| [`dfr schema`](/commands/docs/dfr_schema.md) | Builtin | Show schema for a dataframe. | -| [`dfr select`](/commands/docs/dfr_select.md) | Builtin | Selects columns from lazyframe. | -| [`dfr set`](/commands/docs/dfr_set.md) | Builtin | Sets value where given mask is true. | -| [`dfr set-with-idx`](/commands/docs/dfr_set-with-idx.md) | Builtin | Sets value in the given index. | -| [`dfr shape`](/commands/docs/dfr_shape.md) | Builtin | Shows column and row size for a dataframe. | -| [`dfr shift`](/commands/docs/dfr_shift.md) | Builtin | Shifts the values by a given period. | -| [`dfr slice`](/commands/docs/dfr_slice.md) | Builtin | Creates new dataframe from a slice of rows. | -| [`dfr sort-by`](/commands/docs/dfr_sort-by.md) | Builtin | Sorts a lazy dataframe based on expression(s). | -| [`dfr std`](/commands/docs/dfr_std.md) | Builtin | Creates a std expression for an aggregation of std value from columns in a dataframe. | -| [`dfr str-lengths`](/commands/docs/dfr_str-lengths.md) | Builtin | Get lengths of all strings. | -| [`dfr str-slice`](/commands/docs/dfr_str-slice.md) | Builtin | Slices the string from the start position until the selected length. | -| [`dfr strftime`](/commands/docs/dfr_strftime.md) | Builtin | Formats date based on string rule. | -| [`dfr sum`](/commands/docs/dfr_sum.md) | Builtin | Creates a sum expression for an aggregation or aggregates columns to their sum value. | -| [`dfr summary`](/commands/docs/dfr_summary.md) | Builtin | For a dataframe, produces descriptive statistics (summary statistics) for its numeric columns. | -| [`dfr take`](/commands/docs/dfr_take.md) | Builtin | Creates new dataframe using the given indices. | -| [`dfr to-arrow`](/commands/docs/dfr_to-arrow.md) | Builtin | Saves dataframe to arrow file. | -| [`dfr to-avro`](/commands/docs/dfr_to-avro.md) | Builtin | Saves dataframe to avro file. | -| [`dfr to-csv`](/commands/docs/dfr_to-csv.md) | Builtin | Saves dataframe to CSV file. | -| [`dfr to-jsonl`](/commands/docs/dfr_to-jsonl.md) | Builtin | Saves dataframe to a JSON lines file. | -| [`dfr to-parquet`](/commands/docs/dfr_to-parquet.md) | Builtin | Saves dataframe to parquet file. | -| [`dfr unique`](/commands/docs/dfr_unique.md) | Builtin | Returns unique values from a dataframe. | -| [`dfr uppercase`](/commands/docs/dfr_uppercase.md) | Builtin | Uppercase the strings in the column. | -| [`dfr value-counts`](/commands/docs/dfr_value-counts.md) | Builtin | Returns a dataframe with the counts for unique values in series. | -| [`dfr var`](/commands/docs/dfr_var.md) | Builtin | Create a var expression for an aggregation. | -| [`dfr when`](/commands/docs/dfr_when.md) | Builtin | Creates and modifies a when expression. | -| [`dfr with-column`](/commands/docs/dfr_with-column.md) | Builtin | Adds a series to the dataframe. | +| [`dfr agg`](/commands/docs/dfr_agg) | Builtin | Performs a series of aggregations from a group-by. | +| [`dfr agg-groups`](/commands/docs/dfr_agg-groups) | Builtin | Creates an agg_groups expression. | +| [`dfr all-false`](/commands/docs/dfr_all-false) | Builtin | Returns true if all values are false. | +| [`dfr all-true`](/commands/docs/dfr_all-true) | Builtin | Returns true if all values are true. | +| [`dfr append`](/commands/docs/dfr_append) | Builtin | Appends a new dataframe. | +| [`dfr arg-max`](/commands/docs/dfr_arg-max) | Builtin | Return index for max value in series. | +| [`dfr arg-min`](/commands/docs/dfr_arg-min) | Builtin | Return index for min value in series. | +| [`dfr arg-sort`](/commands/docs/dfr_arg-sort) | Builtin | Returns indexes for a sorted series. | +| [`dfr arg-true`](/commands/docs/dfr_arg-true) | Builtin | Returns indexes where values are true. | +| [`dfr arg-unique`](/commands/docs/dfr_arg-unique) | Builtin | Returns indexes for unique values. | +| [`dfr arg-where`](/commands/docs/dfr_arg-where) | Builtin | Creates an expression that returns the arguments where expression is true. | +| [`dfr as`](/commands/docs/dfr_as) | Builtin | Creates an alias expression. | +| [`dfr as-date`](/commands/docs/dfr_as-date) | Builtin | Converts string to date. | +| [`dfr as-datetime`](/commands/docs/dfr_as-datetime) | Builtin | Converts string to datetime. | +| [`dfr cache`](/commands/docs/dfr_cache) | Builtin | Caches operations in a new LazyFrame. | +| [`dfr col`](/commands/docs/dfr_col) | Builtin | Creates a named column expression. | +| [`dfr collect`](/commands/docs/dfr_collect) | Builtin | Collect lazy dataframe into eager dataframe. | +| [`dfr columns`](/commands/docs/dfr_columns) | Builtin | Show dataframe columns. | +| [`dfr concat-str`](/commands/docs/dfr_concat-str) | Builtin | Creates a concat string expression. | +| [`dfr concatenate`](/commands/docs/dfr_concatenate) | Builtin | Concatenates strings with other array. | +| [`dfr contains`](/commands/docs/dfr_contains) | Builtin | Checks if a pattern is contained in a string. | +| [`dfr count`](/commands/docs/dfr_count) | Builtin | Creates a count expression. | +| [`dfr count-null`](/commands/docs/dfr_count-null) | Builtin | Counts null values. | +| [`dfr cumulative`](/commands/docs/dfr_cumulative) | Builtin | Cumulative calculation for a series. | +| [`dfr datepart`](/commands/docs/dfr_datepart) | Builtin | Creates an expression for capturing the specified datepart in a column. | +| [`dfr drop`](/commands/docs/dfr_drop) | Builtin | Creates a new dataframe by dropping the selected columns. | +| [`dfr drop-duplicates`](/commands/docs/dfr_drop-duplicates) | Builtin | Drops duplicate values in dataframe. | +| [`dfr drop-nulls`](/commands/docs/dfr_drop-nulls) | Builtin | Drops null values in dataframe. | +| [`dfr dtypes`](/commands/docs/dfr_dtypes) | Builtin | Show dataframe data types. | +| [`dfr dummies`](/commands/docs/dfr_dummies) | Builtin | Creates a new dataframe with dummy variables. | +| [`dfr explode`](/commands/docs/dfr_explode) | Builtin | Explodes a dataframe or creates a explode expression. | +| [`dfr expr-not`](/commands/docs/dfr_expr-not) | Builtin | Creates a not expression. | +| [`dfr fetch`](/commands/docs/dfr_fetch) | Builtin | Collects the lazyframe to the selected rows. | +| [`dfr fill-nan`](/commands/docs/dfr_fill-nan) | Builtin | Replaces NaN values with the given expression. | +| [`dfr fill-null`](/commands/docs/dfr_fill-null) | Builtin | Replaces NULL values with the given expression. | +| [`dfr filter`](/commands/docs/dfr_filter) | Builtin | Filter dataframe based in expression. | +| [`dfr filter-with`](/commands/docs/dfr_filter-with) | Builtin | Filters dataframe using a mask or expression as reference. | +| [`dfr first`](/commands/docs/dfr_first) | Builtin | Show only the first number of rows or create a first expression | +| [`dfr flatten`](/commands/docs/dfr_flatten) | Builtin | An alias for dfr explode. | +| [`dfr get`](/commands/docs/dfr_get) | Builtin | Creates dataframe with the selected columns. | +| [`dfr get-day`](/commands/docs/dfr_get-day) | Builtin | Gets day from date. | +| [`dfr get-hour`](/commands/docs/dfr_get-hour) | Builtin | Gets hour from date. | +| [`dfr get-minute`](/commands/docs/dfr_get-minute) | Builtin | Gets minute from date. | +| [`dfr get-month`](/commands/docs/dfr_get-month) | Builtin | Gets month from date. | +| [`dfr get-nanosecond`](/commands/docs/dfr_get-nanosecond) | Builtin | Gets nanosecond from date. | +| [`dfr get-ordinal`](/commands/docs/dfr_get-ordinal) | Builtin | Gets ordinal from date. | +| [`dfr get-second`](/commands/docs/dfr_get-second) | Builtin | Gets second from date. | +| [`dfr get-week`](/commands/docs/dfr_get-week) | Builtin | Gets week from date. | +| [`dfr get-weekday`](/commands/docs/dfr_get-weekday) | Builtin | Gets weekday from date. | +| [`dfr get-year`](/commands/docs/dfr_get-year) | Builtin | Gets year from date. | +| [`dfr group-by`](/commands/docs/dfr_group-by) | Builtin | Creates a group-by object that can be used for other aggregations. | +| [`dfr implode`](/commands/docs/dfr_implode) | Builtin | Aggregates a group to a Series. | +| [`dfr into-df`](/commands/docs/dfr_into-df) | Builtin | Converts a list, table or record into a dataframe. | +| [`dfr into-lazy`](/commands/docs/dfr_into-lazy) | Builtin | Converts a dataframe into a lazy dataframe. | +| [`dfr into-nu`](/commands/docs/dfr_into-nu) | Builtin | Converts a dataframe or an expression into into nushell value for access and exploration. | +| [`dfr is-duplicated`](/commands/docs/dfr_is-duplicated) | Builtin | Creates mask indicating duplicated values. | +| [`dfr is-in`](/commands/docs/dfr_is-in) | Builtin | Creates an is-in expression. | +| [`dfr is-not-null`](/commands/docs/dfr_is-not-null) | Builtin | Creates mask where value is not null. | +| [`dfr is-null`](/commands/docs/dfr_is-null) | Builtin | Creates mask where value is null. | +| [`dfr is-unique`](/commands/docs/dfr_is-unique) | Builtin | Creates mask indicating unique values. | +| [`dfr join`](/commands/docs/dfr_join) | Builtin | Joins a lazy frame with other lazy frame. | +| [`dfr last`](/commands/docs/dfr_last) | Builtin | Creates new dataframe with tail rows or creates a last expression. | +| [`dfr lit`](/commands/docs/dfr_lit) | Builtin | Creates a literal expression. | +| [`dfr lowercase`](/commands/docs/dfr_lowercase) | Builtin | Lowercase the strings in the column. | +| [`dfr ls`](/commands/docs/dfr_ls) | Builtin | Lists stored dataframes. | +| [`dfr max`](/commands/docs/dfr_max) | Builtin | Creates a max expression or aggregates columns to their max value. | +| [`dfr mean`](/commands/docs/dfr_mean) | Builtin | Creates a mean expression for an aggregation or aggregates columns to their mean value. | +| [`dfr median`](/commands/docs/dfr_median) | Builtin | Aggregates columns to their median value | +| [`dfr melt`](/commands/docs/dfr_melt) | Builtin | Unpivot a DataFrame from wide to long format. | +| [`dfr min`](/commands/docs/dfr_min) | Builtin | Creates a min expression or aggregates columns to their min value. | +| [`dfr n-unique`](/commands/docs/dfr_n-unique) | Builtin | Counts unique values. | +| [`dfr not`](/commands/docs/dfr_not) | Builtin | Inverts boolean mask. | +| [`dfr open`](/commands/docs/dfr_open) | Builtin | Opens CSV, JSON, JSON lines, arrow, avro, or parquet file to create dataframe. | +| [`dfr otherwise`](/commands/docs/dfr_otherwise) | Builtin | Completes a when expression. | +| [`dfr quantile`](/commands/docs/dfr_quantile) | Builtin | Aggregates the columns to the selected quantile. | +| [`dfr query`](/commands/docs/dfr_query) | Builtin | Query dataframe using SQL. Note: The dataframe is always named 'df' in your query's from clause. | +| [`dfr rename`](/commands/docs/dfr_rename) | Builtin | Rename a dataframe column. | +| [`dfr replace`](/commands/docs/dfr_replace) | Builtin | Replace the leftmost (sub)string by a regex pattern. | +| [`dfr replace-all`](/commands/docs/dfr_replace-all) | Builtin | Replace all (sub)strings by a regex pattern. | +| [`dfr reverse`](/commands/docs/dfr_reverse) | Builtin | Reverses the LazyFrame | +| [`dfr rolling`](/commands/docs/dfr_rolling) | Builtin | Rolling calculation for a series. | +| [`dfr sample`](/commands/docs/dfr_sample) | Builtin | Create sample dataframe. | +| [`dfr schema`](/commands/docs/dfr_schema) | Builtin | Show schema for a dataframe. | +| [`dfr select`](/commands/docs/dfr_select) | Builtin | Selects columns from lazyframe. | +| [`dfr set`](/commands/docs/dfr_set) | Builtin | Sets value where given mask is true. | +| [`dfr set-with-idx`](/commands/docs/dfr_set-with-idx) | Builtin | Sets value in the given index. | +| [`dfr shape`](/commands/docs/dfr_shape) | Builtin | Shows column and row size for a dataframe. | +| [`dfr shift`](/commands/docs/dfr_shift) | Builtin | Shifts the values by a given period. | +| [`dfr slice`](/commands/docs/dfr_slice) | Builtin | Creates new dataframe from a slice of rows. | +| [`dfr sort-by`](/commands/docs/dfr_sort-by) | Builtin | Sorts a lazy dataframe based on expression(s). | +| [`dfr std`](/commands/docs/dfr_std) | Builtin | Creates a std expression for an aggregation of std value from columns in a dataframe. | +| [`dfr str-lengths`](/commands/docs/dfr_str-lengths) | Builtin | Get lengths of all strings. | +| [`dfr str-slice`](/commands/docs/dfr_str-slice) | Builtin | Slices the string from the start position until the selected length. | +| [`dfr strftime`](/commands/docs/dfr_strftime) | Builtin | Formats date based on string rule. | +| [`dfr sum`](/commands/docs/dfr_sum) | Builtin | Creates a sum expression for an aggregation or aggregates columns to their sum value. | +| [`dfr summary`](/commands/docs/dfr_summary) | Builtin | For a dataframe, produces descriptive statistics (summary statistics) for its numeric columns. | +| [`dfr take`](/commands/docs/dfr_take) | Builtin | Creates new dataframe using the given indices. | +| [`dfr to-arrow`](/commands/docs/dfr_to-arrow) | Builtin | Saves dataframe to arrow file. | +| [`dfr to-avro`](/commands/docs/dfr_to-avro) | Builtin | Saves dataframe to avro file. | +| [`dfr to-csv`](/commands/docs/dfr_to-csv) | Builtin | Saves dataframe to CSV file. | +| [`dfr to-jsonl`](/commands/docs/dfr_to-jsonl) | Builtin | Saves dataframe to a JSON lines file. | +| [`dfr to-parquet`](/commands/docs/dfr_to-parquet) | Builtin | Saves dataframe to parquet file. | +| [`dfr unique`](/commands/docs/dfr_unique) | Builtin | Returns unique values from a dataframe. | +| [`dfr uppercase`](/commands/docs/dfr_uppercase) | Builtin | Uppercase the strings in the column. | +| [`dfr value-counts`](/commands/docs/dfr_value-counts) | Builtin | Returns a dataframe with the counts for unique values in series. | +| [`dfr var`](/commands/docs/dfr_var) | Builtin | Create a var expression for an aggregation. | +| [`dfr when`](/commands/docs/dfr_when) | Builtin | Creates and modifies a when expression. | +| [`dfr with-column`](/commands/docs/dfr_with-column) | Builtin | Adds a series to the dataframe. | diff --git a/src/content/docs/commands/docs/drop.md b/src/content/docs/commands/docs/drop.md index beb955349df..16041dd7259 100644 --- a/src/content/docs/commands/docs/drop.md +++ b/src/content/docs/commands/docs/drop.md @@ -85,5 +85,5 @@ Remove the last row in a table | name | type | usage | | ---------------------------------------------- | ------- | --------------------------------------------------------------------------------------------------- | -| [`drop column`](/commands/docs/drop_column.md) | Builtin | Remove N columns at the right-hand end of the input table. To remove columns by name, use `reject`. | -| [`drop nth`](/commands/docs/drop_nth.md) | Builtin | Drop the selected rows. | +| [`drop column`](/commands/docs/drop_column) | Builtin | Remove N columns at the right-hand end of the input table. To remove columns by name, use `reject`. | +| [`drop nth`](/commands/docs/drop_nth) | Builtin | Drop the selected rows. | diff --git a/src/content/docs/commands/docs/each.md b/src/content/docs/commands/docs/each.md index 21d0a0724db..4795a3a2c31 100644 --- a/src/content/docs/commands/docs/each.md +++ b/src/content/docs/commands/docs/each.md @@ -109,4 +109,4 @@ with 'transpose' first. | name | type | usage | | -------------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------- | -| [`each while`](/commands/docs/each_while.md) | Builtin | Run a block on each row of the input list until a null is found, then create a new list with the results. | +| [`each while`](/commands/docs/each_while) | Builtin | Run a block on each row of the input list until a null is found, then create a new list with the results. | diff --git a/src/content/docs/commands/docs/encode.md b/src/content/docs/commands/docs/encode.md index ec25407a429..6f02588531d 100644 --- a/src/content/docs/commands/docs/encode.md +++ b/src/content/docs/commands/docs/encode.md @@ -70,5 +70,5 @@ documentation link at https://docs.rs/encoding_rs/latest/encoding_rs/#statics | name | type | usage | | -------------------------------------------------- | ------- | --------------------------------------------- | -| [`encode base64`](/commands/docs/encode_base64.md) | Builtin | Encode a string or binary value using Base64. | -| [`encode hex`](/commands/docs/encode_hex.md) | Builtin | Encode a binary value using hex. | +| [`encode base64`](/commands/docs/encode_base64) | Builtin | Encode a string or binary value using Base64. | +| [`encode hex`](/commands/docs/encode_hex) | Builtin | Encode a binary value using hex. | diff --git a/src/content/docs/commands/docs/export.md b/src/content/docs/commands/docs/export.md index 2095eb6f5c9..4a4206cbc0b 100644 --- a/src/content/docs/commands/docs/export.md +++ b/src/content/docs/commands/docs/export.md @@ -44,9 +44,9 @@ https://www.nushell.sh/book/thinking_in_nu.html | name | type | usage | | -------------------------------------------------- | ------- | -------------------------------------------------------------------------------- | -| [`export alias`](/commands/docs/export_alias.md) | Builtin | Alias a command (with optional flags) to a new name and export it from a module. | -| [`export const`](/commands/docs/export_const.md) | Builtin | Use parse-time constant from a module and export them from this module. | -| [`export def`](/commands/docs/export_def.md) | Builtin | Define a custom command and export it from a module. | -| [`export extern`](/commands/docs/export_extern.md) | Builtin | Define an extern and export it from a module. | -| [`export module`](/commands/docs/export_module.md) | Builtin | Export a custom module from a module. | -| [`export use`](/commands/docs/export_use.md) | Builtin | Use definitions from a module and export them from this module. | +| [`export alias`](/commands/docs/export_alias) | Builtin | Alias a command (with optional flags) to a new name and export it from a module. | +| [`export const`](/commands/docs/export_const) | Builtin | Use parse-time constant from a module and export them from this module. | +| [`export def`](/commands/docs/export_def) | Builtin | Define a custom command and export it from a module. | +| [`export extern`](/commands/docs/export_extern) | Builtin | Define an extern and export it from a module. | +| [`export module`](/commands/docs/export_module) | Builtin | Export a custom module from a module. | +| [`export use`](/commands/docs/export_use) | Builtin | Use definitions from a module and export them from this module. | diff --git a/src/content/docs/commands/docs/format.md b/src/content/docs/commands/docs/format.md index 04932f0921a..1d457c842dc 100644 --- a/src/content/docs/commands/docs/format.md +++ b/src/content/docs/commands/docs/format.md @@ -34,7 +34,7 @@ You must use one of the following subcommands. Using this command as-is will onl | name | type | usage | | ------------------------------------------------------ | ------- | -------------------------------------------------------- | -| [`format date`](/commands/docs/format_date.md) | Builtin | Format a given date using a format string. | -| [`format duration`](/commands/docs/format_duration.md) | Builtin | Outputs duration with a specified unit of time. | -| [`format filesize`](/commands/docs/format_filesize.md) | Builtin | Converts a column of filesizes to some specified format. | -| [`format pattern`](/commands/docs/format_pattern.md) | Builtin | Format columns into a string using a simple pattern. | +| [`format date`](/commands/docs/format_date) | Builtin | Format a given date using a format string. | +| [`format duration`](/commands/docs/format_duration) | Builtin | Outputs duration with a specified unit of time. | +| [`format filesize`](/commands/docs/format_filesize) | Builtin | Converts a column of filesizes to some specified format. | +| [`format pattern`](/commands/docs/format_pattern) | Builtin | Format columns into a string using a simple pattern. | diff --git a/src/content/docs/commands/docs/from.md b/src/content/docs/commands/docs/from.md index 964405b3fec..7c9c8dfb736 100644 --- a/src/content/docs/commands/docs/from.md +++ b/src/content/docs/commands/docs/from.md @@ -34,19 +34,19 @@ You must use one of the following subcommands. Using this command as-is will onl | name | type | usage | | ------------------------------------------ | -------------- | -------------------------------------------------------------------------------------------------------------------------- | -| [`from csv`](/commands/docs/from_csv.md) | Builtin | Parse text as .csv and create table. | -| [`from eml`](/commands/docs/from_eml.md) | Builtin,Plugin | Parse text as .eml and create record. | -| [`from ics`](/commands/docs/from_ics.md) | Builtin,Plugin | Parse text as .ics and create table. | -| [`from ini`](/commands/docs/from_ini.md) | Builtin,Plugin | Parse text as .ini and create table. | -| [`from json`](/commands/docs/from_json.md) | Builtin | Convert from json to structured data. | -| [`from nuon`](/commands/docs/from_nuon.md) | Builtin | Convert from nuon to structured data. | -| [`from ods`](/commands/docs/from_ods.md) | Builtin | Parse OpenDocument Spreadsheet(.ods) data and create table. | -| [`from ssv`](/commands/docs/from_ssv.md) | Builtin | Parse text as space-separated values and create a table. The default minimum number of spaces counted as a separator is 2. | -| [`from toml`](/commands/docs/from_toml.md) | Builtin | Parse text as .toml and create record. | -| [`from tsv`](/commands/docs/from_tsv.md) | Builtin | Parse text as .tsv and create table. | -| [`from url`](/commands/docs/from_url.md) | Builtin | Parse url-encoded string as a record. | -| [`from vcf`](/commands/docs/from_vcf.md) | Builtin,Plugin | Parse text as .vcf and create table. | -| [`from xlsx`](/commands/docs/from_xlsx.md) | Builtin | Parse binary Excel(.xlsx) data and create table. | -| [`from xml`](/commands/docs/from_xml.md) | Builtin | Parse text as .xml and create record. | -| [`from yaml`](/commands/docs/from_yaml.md) | Builtin | Parse text as .yaml/.yml and create table. | -| [`from yml`](/commands/docs/from_yml.md) | Builtin | Parse text as .yaml/.yml and create table. | +| [`from csv`](/commands/docs/from_csv) | Builtin | Parse text as .csv and create table. | +| [`from eml`](/commands/docs/from_eml) | Builtin,Plugin | Parse text as .eml and create record. | +| [`from ics`](/commands/docs/from_ics) | Builtin,Plugin | Parse text as .ics and create table. | +| [`from ini`](/commands/docs/from_ini) | Builtin,Plugin | Parse text as .ini and create table. | +| [`from json`](/commands/docs/from_json) | Builtin | Convert from json to structured data. | +| [`from nuon`](/commands/docs/from_nuon) | Builtin | Convert from nuon to structured data. | +| [`from ods`](/commands/docs/from_ods) | Builtin | Parse OpenDocument Spreadsheet(.ods) data and create table. | +| [`from ssv`](/commands/docs/from_ssv) | Builtin | Parse text as space-separated values and create a table. The default minimum number of spaces counted as a separator is 2. | +| [`from toml`](/commands/docs/from_toml) | Builtin | Parse text as .toml and create record. | +| [`from tsv`](/commands/docs/from_tsv) | Builtin | Parse text as .tsv and create table. | +| [`from url`](/commands/docs/from_url) | Builtin | Parse url-encoded string as a record. | +| [`from vcf`](/commands/docs/from_vcf) | Builtin,Plugin | Parse text as .vcf and create table. | +| [`from xlsx`](/commands/docs/from_xlsx) | Builtin | Parse binary Excel(.xlsx) data and create table. | +| [`from xml`](/commands/docs/from_xml) | Builtin | Parse text as .xml and create record. | +| [`from yaml`](/commands/docs/from_yaml) | Builtin | Parse text as .yaml/.yml and create table. | +| [`from yml`](/commands/docs/from_yml) | Builtin | Parse text as .yaml/.yml and create table. | diff --git a/src/content/docs/commands/docs/from_eml.md b/src/content/docs/commands/docs/from_eml.md index 68bd0b460ed..c97901f0a05 100644 --- a/src/content/docs/commands/docs/from_eml.md +++ b/src/content/docs/commands/docs/from_eml.md @@ -17,7 +17,7 @@ feature: default
{{ $frontmatter.formats }}
::: warning -Command `from eml` resides in [plugin](/book/plugins.html) [`nu_plugin_formats`](https://crates.io/crates/nu_plugin_formats). To use this command, you must install/compile and register nu_plugin_formats +Command `from eml` resides in [plugin](/book/plugins) [`nu_plugin_formats`](https://crates.io/crates/nu_plugin_formats). To use this command, you must install/compile and register nu_plugin_formats ::: ## Signature diff --git a/src/content/docs/commands/docs/from_ics.md b/src/content/docs/commands/docs/from_ics.md index 7c26c666513..9a232a2b622 100644 --- a/src/content/docs/commands/docs/from_ics.md +++ b/src/content/docs/commands/docs/from_ics.md @@ -17,7 +17,7 @@ feature: default
{{ $frontmatter.formats }}
::: warning -Command `from ics` resides in [plugin](/book/plugins.html) [`nu_plugin_formats`](https://crates.io/crates/nu_plugin_formats). To use this command, you must install/compile and register nu_plugin_formats +Command `from ics` resides in [plugin](/book/plugins) [`nu_plugin_formats`](https://crates.io/crates/nu_plugin_formats). To use this command, you must install/compile and register nu_plugin_formats ::: ## Signature diff --git a/src/content/docs/commands/docs/from_ini.md b/src/content/docs/commands/docs/from_ini.md index 902f1d7a7b4..31f3b61fc3c 100644 --- a/src/content/docs/commands/docs/from_ini.md +++ b/src/content/docs/commands/docs/from_ini.md @@ -17,7 +17,7 @@ feature: default
{{ $frontmatter.formats }}
::: warning -Command `from ini` resides in [plugin](/book/plugins.html) [`nu_plugin_formats`](https://crates.io/crates/nu_plugin_formats). To use this command, you must install/compile and register nu_plugin_formats +Command `from ini` resides in [plugin](/book/plugins) [`nu_plugin_formats`](https://crates.io/crates/nu_plugin_formats). To use this command, you must install/compile and register nu_plugin_formats ::: ## Signature diff --git a/src/content/docs/commands/docs/from_vcf.md b/src/content/docs/commands/docs/from_vcf.md index e7bb762f165..e9ce7fae5ab 100644 --- a/src/content/docs/commands/docs/from_vcf.md +++ b/src/content/docs/commands/docs/from_vcf.md @@ -17,7 +17,7 @@ feature: default
{{ $frontmatter.formats }}
::: warning -Command `from vcf` resides in [plugin](/book/plugins.html) [`nu_plugin_formats`](https://crates.io/crates/nu_plugin_formats). To use this command, you must install/compile and register nu_plugin_formats +Command `from vcf` resides in [plugin](/book/plugins) [`nu_plugin_formats`](https://crates.io/crates/nu_plugin_formats). To use this command, you must install/compile and register nu_plugin_formats ::: ## Signature diff --git a/src/content/docs/commands/docs/hash.md b/src/content/docs/commands/docs/hash.md index c95b6b82a7e..f899065c74c 100644 --- a/src/content/docs/commands/docs/hash.md +++ b/src/content/docs/commands/docs/hash.md @@ -34,5 +34,5 @@ You must use one of the following subcommands. Using this command as-is will onl | name | type | usage | | ---------------------------------------------- | ------- | --------------------------------------------- | -| [`hash md5`](/commands/docs/hash_md5.md) | Builtin | Hash a value using the md5 hash algorithm. | -| [`hash sha256`](/commands/docs/hash_sha256.md) | Builtin | Hash a value using the sha256 hash algorithm. | +| [`hash md5`](/commands/docs/hash_md5) | Builtin | Hash a value using the md5 hash algorithm. | +| [`hash sha256`](/commands/docs/hash_sha256) | Builtin | Hash a value using the sha256 hash algorithm. | diff --git a/src/content/docs/commands/docs/help.md b/src/content/docs/commands/docs/help.md index f4e10c706a5..cfcd0ce14f5 100644 --- a/src/content/docs/commands/docs/help.md +++ b/src/content/docs/commands/docs/help.md @@ -65,9 +65,9 @@ search for string in command names, usage and search terms | name | type | usage | | ---------------------------------------------------- | ------- | ------------------------------------ | -| [`help aliases`](/commands/docs/help_aliases.md) | Builtin | Show help on nushell aliases. | -| [`help commands`](/commands/docs/help_commands.md) | Builtin | Show help on nushell commands. | -| [`help escapes`](/commands/docs/help_escapes.md) | Builtin | Show help on nushell string escapes. | -| [`help externs`](/commands/docs/help_externs.md) | Builtin | Show help on nushell externs. | -| [`help modules`](/commands/docs/help_modules.md) | Builtin | Show help on nushell modules. | -| [`help operators`](/commands/docs/help_operators.md) | Builtin | Show help on nushell operators. | +| [`help aliases`](/commands/docs/help_aliases) | Builtin | Show help on nushell aliases. | +| [`help commands`](/commands/docs/help_commands) | Builtin | Show help on nushell commands. | +| [`help escapes`](/commands/docs/help_escapes) | Builtin | Show help on nushell string escapes. | +| [`help externs`](/commands/docs/help_externs) | Builtin | Show help on nushell externs. | +| [`help modules`](/commands/docs/help_modules) | Builtin | Show help on nushell modules. | +| [`help operators`](/commands/docs/help_operators) | Builtin | Show help on nushell operators. | diff --git a/src/content/docs/commands/docs/history.md b/src/content/docs/commands/docs/history.md index 37923640c8a..14558ddedc4 100644 --- a/src/content/docs/commands/docs/history.md +++ b/src/content/docs/commands/docs/history.md @@ -58,4 +58,4 @@ Search all the commands from history that contains 'cargo' | name | type | usage | | ------------------------------------------------------ | ------- | -------------------------------- | -| [`history session`](/commands/docs/history_session.md) | Builtin | Get the command history session. | +| [`history session`](/commands/docs/history_session) | Builtin | Get the command history session. | diff --git a/src/content/docs/commands/docs/http.md b/src/content/docs/commands/docs/http.md index d88d8167cd8..44d4d0a0b9e 100644 --- a/src/content/docs/commands/docs/http.md +++ b/src/content/docs/commands/docs/http.md @@ -34,10 +34,10 @@ You must use one of the following subcommands. Using this command as-is will onl | name | type | usage | | ------------------------------------------------ | ------- | --------------------------------------------------------- | -| [`http delete`](/commands/docs/http_delete.md) | Builtin | Delete the specified resource. | -| [`http get`](/commands/docs/http_get.md) | Builtin | Fetch the contents from a URL. | -| [`http head`](/commands/docs/http_head.md) | Builtin | Get the headers from a URL. | -| [`http options`](/commands/docs/http_options.md) | Builtin | Requests permitted communication options for a given URL. | -| [`http patch`](/commands/docs/http_patch.md) | Builtin | Patch a body to a URL. | -| [`http post`](/commands/docs/http_post.md) | Builtin | Post a body to a URL. | -| [`http put`](/commands/docs/http_put.md) | Builtin | Put a body to a URL. | +| [`http delete`](/commands/docs/http_delete) | Builtin | Delete the specified resource. | +| [`http get`](/commands/docs/http_get) | Builtin | Fetch the contents from a URL. | +| [`http head`](/commands/docs/http_head) | Builtin | Get the headers from a URL. | +| [`http options`](/commands/docs/http_options) | Builtin | Requests permitted communication options for a given URL. | +| [`http patch`](/commands/docs/http_patch) | Builtin | Patch a body to a URL. | +| [`http post`](/commands/docs/http_post) | Builtin | Post a body to a URL. | +| [`http put`](/commands/docs/http_put) | Builtin | Put a body to a URL. | diff --git a/src/content/docs/commands/docs/input.md b/src/content/docs/commands/docs/input.md index 1cbf28158e8..1b59cfaad6f 100644 --- a/src/content/docs/commands/docs/input.md +++ b/src/content/docs/commands/docs/input.md @@ -56,5 +56,5 @@ Get two characters from the user, and assign to a variable | name | type | usage | | ------------------------------------------------ | ------- | -------------------------------- | -| [`input list`](/commands/docs/input_list.md) | Builtin | Interactive list selection. | -| [`input listen`](/commands/docs/input_listen.md) | Builtin | Listen for user interface event. | +| [`input list`](/commands/docs/input_list) | Builtin | Interactive list selection. | +| [`input listen`](/commands/docs/input_listen) | Builtin | Listen for user interface event. | diff --git a/src/content/docs/commands/docs/into.md b/src/content/docs/commands/docs/into.md index fec7a3eac96..2b1d64b685e 100644 --- a/src/content/docs/commands/docs/into.md +++ b/src/content/docs/commands/docs/into.md @@ -34,16 +34,16 @@ You must use one of the following subcommands. Using this command as-is will onl | name | type | usage | | ---------------------------------------------------- | ------- | ------------------------------------------ | -| [`into binary`](/commands/docs/into_binary.md) | Builtin | Convert value to a binary primitive. | -| [`into bits`](/commands/docs/into_bits.md) | Builtin | Convert value to a binary primitive. | -| [`into bool`](/commands/docs/into_bool.md) | Builtin | Convert value to boolean. | -| [`into cell-path`](/commands/docs/into_cell-path.md) | Builtin | Convert value to a cell-path. | -| [`into datetime`](/commands/docs/into_datetime.md) | Builtin | Convert text or timestamp into a datetime. | -| [`into duration`](/commands/docs/into_duration.md) | Builtin | Convert value to duration. | -| [`into filesize`](/commands/docs/into_filesize.md) | Builtin | Convert value to filesize. | -| [`into float`](/commands/docs/into_float.md) | Builtin | Convert data into floating point number. | -| [`into int`](/commands/docs/into_int.md) | Builtin | Convert value to integer. | -| [`into record`](/commands/docs/into_record.md) | Builtin | Convert value to record. | -| [`into sqlite`](/commands/docs/into_sqlite.md) | Builtin | Convert table into a SQLite database. | -| [`into string`](/commands/docs/into_string.md) | Builtin | Convert value to string. | -| [`into value`](/commands/docs/into_value.md) | Builtin | Infer nushell datatype for each cell. | +| [`into binary`](/commands/docs/into_binary) | Builtin | Convert value to a binary primitive. | +| [`into bits`](/commands/docs/into_bits) | Builtin | Convert value to a binary primitive. | +| [`into bool`](/commands/docs/into_bool) | Builtin | Convert value to boolean. | +| [`into cell-path`](/commands/docs/into_cell-path) | Builtin | Convert value to a cell-path. | +| [`into datetime`](/commands/docs/into_datetime) | Builtin | Convert text or timestamp into a datetime. | +| [`into duration`](/commands/docs/into_duration) | Builtin | Convert value to duration. | +| [`into filesize`](/commands/docs/into_filesize) | Builtin | Convert value to filesize. | +| [`into float`](/commands/docs/into_float) | Builtin | Convert data into floating point number. | +| [`into int`](/commands/docs/into_int) | Builtin | Convert value to integer. | +| [`into record`](/commands/docs/into_record) | Builtin | Convert value to record. | +| [`into sqlite`](/commands/docs/into_sqlite) | Builtin | Convert table into a SQLite database. | +| [`into string`](/commands/docs/into_string) | Builtin | Convert value to string. | +| [`into value`](/commands/docs/into_value) | Builtin | Infer nushell datatype for each cell. | diff --git a/src/content/docs/commands/docs/keybindings.md b/src/content/docs/commands/docs/keybindings.md index 6008e72be2b..ab339ffbea1 100644 --- a/src/content/docs/commands/docs/keybindings.md +++ b/src/content/docs/commands/docs/keybindings.md @@ -37,6 +37,6 @@ https://www.nushell.sh/book/line_editor.html | name | type | usage | | -------------------------------------------------------------- | ------- | -------------------------------------------------------------- | -| [`keybindings default`](/commands/docs/keybindings_default.md) | Builtin | List default keybindings. | -| [`keybindings list`](/commands/docs/keybindings_list.md) | Builtin | List available options that can be used to create keybindings. | -| [`keybindings listen`](/commands/docs/keybindings_listen.md) | Builtin | Get input from the user. | +| [`keybindings default`](/commands/docs/keybindings_default) | Builtin | List default keybindings. | +| [`keybindings list`](/commands/docs/keybindings_list) | Builtin | List available options that can be used to create keybindings. | +| [`keybindings listen`](/commands/docs/keybindings_listen) | Builtin | Get input from the user. | diff --git a/src/content/docs/commands/docs/math.md b/src/content/docs/commands/docs/math.md index 7e901fa2d52..5cabddd6150 100644 --- a/src/content/docs/commands/docs/math.md +++ b/src/content/docs/commands/docs/math.md @@ -34,32 +34,32 @@ You must use one of the following subcommands. Using this command as-is will onl | name | type | usage | | -------------------------------------------------- | ------- | ------------------------------------------------------------------------------------- | -| [`math abs`](/commands/docs/math_abs.md) | Builtin | Returns the absolute value of a number. | -| [`math arccos`](/commands/docs/math_arccos.md) | Builtin | Returns the arccosine of the number. | -| [`math arccosh`](/commands/docs/math_arccosh.md) | Builtin | Returns the inverse of the hyperbolic cosine function. | -| [`math arcsin`](/commands/docs/math_arcsin.md) | Builtin | Returns the arcsine of the number. | -| [`math arcsinh`](/commands/docs/math_arcsinh.md) | Builtin | Returns the inverse of the hyperbolic sine function. | -| [`math arctan`](/commands/docs/math_arctan.md) | Builtin | Returns the arctangent of the number. | -| [`math arctanh`](/commands/docs/math_arctanh.md) | Builtin | Returns the inverse of the hyperbolic tangent function. | -| [`math avg`](/commands/docs/math_avg.md) | Builtin | Returns the average of a list of numbers. | -| [`math ceil`](/commands/docs/math_ceil.md) | Builtin | Returns the ceil of a number (smallest integer greater than or equal to that number). | -| [`math cos`](/commands/docs/math_cos.md) | Builtin | Returns the cosine of the number. | -| [`math cosh`](/commands/docs/math_cosh.md) | Builtin | Returns the hyperbolic cosine of the number. | -| [`math exp`](/commands/docs/math_exp.md) | Builtin | Returns e raised to the power of x. | -| [`math floor`](/commands/docs/math_floor.md) | Builtin | Returns the floor of a number (largest integer less than or equal to that number). | -| [`math ln`](/commands/docs/math_ln.md) | Builtin | Returns the natural logarithm. Base: (math e). | -| [`math log`](/commands/docs/math_log.md) | Builtin | Returns the logarithm for an arbitrary base. | -| [`math max`](/commands/docs/math_max.md) | Builtin | Returns the maximum of a list of values, or of columns in a table. | -| [`math median`](/commands/docs/math_median.md) | Builtin | Computes the median of a list of numbers. | -| [`math min`](/commands/docs/math_min.md) | Builtin | Finds the minimum within a list of values or tables. | -| [`math mode`](/commands/docs/math_mode.md) | Builtin | Returns the most frequent element(s) from a list of numbers or tables. | -| [`math product`](/commands/docs/math_product.md) | Builtin | Returns the product of a list of numbers or the products of each column of a table. | -| [`math round`](/commands/docs/math_round.md) | Builtin | Returns the input number rounded to the specified precision. | -| [`math sin`](/commands/docs/math_sin.md) | Builtin | Returns the sine of the number. | -| [`math sinh`](/commands/docs/math_sinh.md) | Builtin | Returns the hyperbolic sine of the number. | -| [`math sqrt`](/commands/docs/math_sqrt.md) | Builtin | Returns the square root of the input number. | -| [`math stddev`](/commands/docs/math_stddev.md) | Builtin | Returns the standard deviation of a list of numbers, or of each column in a table. | -| [`math sum`](/commands/docs/math_sum.md) | Builtin | Returns the sum of a list of numbers or of each column in a table. | -| [`math tan`](/commands/docs/math_tan.md) | Builtin | Returns the tangent of the number. | -| [`math tanh`](/commands/docs/math_tanh.md) | Builtin | Returns the hyperbolic tangent of the number. | -| [`math variance`](/commands/docs/math_variance.md) | Builtin | Returns the variance of a list of numbers or of each column in a table. | +| [`math abs`](/commands/docs/math_abs) | Builtin | Returns the absolute value of a number. | +| [`math arccos`](/commands/docs/math_arccos) | Builtin | Returns the arccosine of the number. | +| [`math arccosh`](/commands/docs/math_arccosh) | Builtin | Returns the inverse of the hyperbolic cosine function. | +| [`math arcsin`](/commands/docs/math_arcsin) | Builtin | Returns the arcsine of the number. | +| [`math arcsinh`](/commands/docs/math_arcsinh) | Builtin | Returns the inverse of the hyperbolic sine function. | +| [`math arctan`](/commands/docs/math_arctan) | Builtin | Returns the arctangent of the number. | +| [`math arctanh`](/commands/docs/math_arctanh) | Builtin | Returns the inverse of the hyperbolic tangent function. | +| [`math avg`](/commands/docs/math_avg) | Builtin | Returns the average of a list of numbers. | +| [`math ceil`](/commands/docs/math_ceil) | Builtin | Returns the ceil of a number (smallest integer greater than or equal to that number). | +| [`math cos`](/commands/docs/math_cos) | Builtin | Returns the cosine of the number. | +| [`math cosh`](/commands/docs/math_cosh) | Builtin | Returns the hyperbolic cosine of the number. | +| [`math exp`](/commands/docs/math_exp) | Builtin | Returns e raised to the power of x. | +| [`math floor`](/commands/docs/math_floor) | Builtin | Returns the floor of a number (largest integer less than or equal to that number). | +| [`math ln`](/commands/docs/math_ln) | Builtin | Returns the natural logarithm. Base: (math e). | +| [`math log`](/commands/docs/math_log) | Builtin | Returns the logarithm for an arbitrary base. | +| [`math max`](/commands/docs/math_max) | Builtin | Returns the maximum of a list of values, or of columns in a table. | +| [`math median`](/commands/docs/math_median) | Builtin | Computes the median of a list of numbers. | +| [`math min`](/commands/docs/math_min) | Builtin | Finds the minimum within a list of values or tables. | +| [`math mode`](/commands/docs/math_mode) | Builtin | Returns the most frequent element(s) from a list of numbers or tables. | +| [`math product`](/commands/docs/math_product) | Builtin | Returns the product of a list of numbers or the products of each column of a table. | +| [`math round`](/commands/docs/math_round) | Builtin | Returns the input number rounded to the specified precision. | +| [`math sin`](/commands/docs/math_sin) | Builtin | Returns the sine of the number. | +| [`math sinh`](/commands/docs/math_sinh) | Builtin | Returns the hyperbolic sine of the number. | +| [`math sqrt`](/commands/docs/math_sqrt) | Builtin | Returns the square root of the input number. | +| [`math stddev`](/commands/docs/math_stddev) | Builtin | Returns the standard deviation of a list of numbers, or of each column in a table. | +| [`math sum`](/commands/docs/math_sum) | Builtin | Returns the sum of a list of numbers or of each column in a table. | +| [`math tan`](/commands/docs/math_tan) | Builtin | Returns the tangent of the number. | +| [`math tanh`](/commands/docs/math_tanh) | Builtin | Returns the hyperbolic tangent of the number. | +| [`math variance`](/commands/docs/math_variance) | Builtin | Returns the variance of a list of numbers or of each column in a table. | diff --git a/src/content/docs/commands/docs/overlay.md b/src/content/docs/commands/docs/overlay.md index 2ad61f43d83..45f1f36992c 100644 --- a/src/content/docs/commands/docs/overlay.md +++ b/src/content/docs/commands/docs/overlay.md @@ -37,7 +37,7 @@ You must use one of the following subcommands. Using this command as-is will onl | name | type | usage | | ------------------------------------------------ | ------- | -------------------------------------------- | -| [`overlay hide`](/commands/docs/overlay_hide.md) | Builtin | Hide an active overlay. | -| [`overlay list`](/commands/docs/overlay_list.md) | Builtin | List all active overlays. | -| [`overlay new`](/commands/docs/overlay_new.md) | Builtin | Create an empty overlay. | -| [`overlay use`](/commands/docs/overlay_use.md) | Builtin | Use definitions from a module as an overlay. | +| [`overlay hide`](/commands/docs/overlay_hide) | Builtin | Hide an active overlay. | +| [`overlay list`](/commands/docs/overlay_list) | Builtin | List all active overlays. | +| [`overlay new`](/commands/docs/overlay_new) | Builtin | Create an empty overlay. | +| [`overlay use`](/commands/docs/overlay_use) | Builtin | Use definitions from a module as an overlay. | diff --git a/src/content/docs/commands/docs/path.md b/src/content/docs/commands/docs/path.md index 359ec271e61..e57012414bc 100644 --- a/src/content/docs/commands/docs/path.md +++ b/src/content/docs/commands/docs/path.md @@ -47,12 +47,12 @@ the path literal. | name | type | usage | | -------------------------------------------------------- | ------- | ----------------------------------------------------------------------- | -| [`path basename`](/commands/docs/path_basename.md) | Builtin | Get the final component of a path. | -| [`path dirname`](/commands/docs/path_dirname.md) | Builtin | Get the parent directory of a path. | -| [`path exists`](/commands/docs/path_exists.md) | Builtin | Check whether a path exists. | -| [`path expand`](/commands/docs/path_expand.md) | Builtin | Try to expand a path to its absolute form. | -| [`path join`](/commands/docs/path_join.md) | Builtin | Join a structured path or a list of path parts. | -| [`path parse`](/commands/docs/path_parse.md) | Builtin | Convert a path into structured data. | -| [`path relative-to`](/commands/docs/path_relative-to.md) | Builtin | Express a path as relative to another path. | -| [`path split`](/commands/docs/path_split.md) | Builtin | Split a path into a list based on the system's path separator. | -| [`path type`](/commands/docs/path_type.md) | Builtin | Get the type of the object a path refers to (e.g., file, dir, symlink). | +| [`path basename`](/commands/docs/path_basename) | Builtin | Get the final component of a path. | +| [`path dirname`](/commands/docs/path_dirname) | Builtin | Get the parent directory of a path. | +| [`path exists`](/commands/docs/path_exists) | Builtin | Check whether a path exists. | +| [`path expand`](/commands/docs/path_expand) | Builtin | Try to expand a path to its absolute form. | +| [`path join`](/commands/docs/path_join) | Builtin | Join a structured path or a list of path parts. | +| [`path parse`](/commands/docs/path_parse) | Builtin | Convert a path into structured data. | +| [`path relative-to`](/commands/docs/path_relative-to) | Builtin | Express a path as relative to another path. | +| [`path split`](/commands/docs/path_split) | Builtin | Split a path into a list based on the system's path separator. | +| [`path type`](/commands/docs/path_type) | Builtin | Get the type of the object a path refers to (e.g., file, dir, symlink). | diff --git a/src/content/docs/commands/docs/query.md b/src/content/docs/commands/docs/query.md index b7706fe3b56..6c1449039d9 100644 --- a/src/content/docs/commands/docs/query.md +++ b/src/content/docs/commands/docs/query.md @@ -30,7 +30,7 @@ feature: default | name | type | usage | | -------------------------------------------- | -------------- | ---------------------------------------------------- | -------------------------- | -| [`query db`](/commands/docs/query_db.md) | Builtin | Query a database using SQL. | -| [`query json`](/commands/docs/query_json.md) | Builtin,Plugin | execute json query on json file (open --raw \ | query json 'query string') | -| [`query web`](/commands/docs/query_web.md) | Builtin,Plugin | execute selector query on html/web | -| [`query xml`](/commands/docs/query_xml.md) | Builtin,Plugin | execute xpath query on xml | +| [`query db`](/commands/docs/query_db) | Builtin | Query a database using SQL. | +| [`query json`](/commands/docs/query_json) | Builtin,Plugin | execute json query on json file (open --raw \ | query json 'query string') | +| [`query web`](/commands/docs/query_web) | Builtin,Plugin | execute selector query on html/web | +| [`query xml`](/commands/docs/query_xml) | Builtin,Plugin | execute xpath query on xml | diff --git a/src/content/docs/commands/docs/random.md b/src/content/docs/commands/docs/random.md index 564a8b972e2..12759a4dde9 100644 --- a/src/content/docs/commands/docs/random.md +++ b/src/content/docs/commands/docs/random.md @@ -34,9 +34,9 @@ You must use one of the following subcommands. Using this command as-is will onl | name | type | usage | | ------------------------------------------------ | ------- | -------------------------------------------------- | -| [`random bool`](/commands/docs/random_bool.md) | Builtin | Generate a random boolean value. | -| [`random chars`](/commands/docs/random_chars.md) | Builtin | Generate random chars. | -| [`random dice`](/commands/docs/random_dice.md) | Builtin | Generate a random dice roll. | -| [`random float`](/commands/docs/random_float.md) | Builtin | Generate a random float within a range [min..max]. | -| [`random int`](/commands/docs/random_int.md) | Builtin | Generate a random integer [min..max]. | -| [`random uuid`](/commands/docs/random_uuid.md) | Builtin | Generate a random uuid4 string. | +| [`random bool`](/commands/docs/random_bool) | Builtin | Generate a random boolean value. | +| [`random chars`](/commands/docs/random_chars) | Builtin | Generate random chars. | +| [`random dice`](/commands/docs/random_dice) | Builtin | Generate a random dice roll. | +| [`random float`](/commands/docs/random_float) | Builtin | Generate a random float within a range [min..max]. | +| [`random int`](/commands/docs/random_int) | Builtin | Generate a random integer [min..max]. | +| [`random uuid`](/commands/docs/random_uuid) | Builtin | Generate a random uuid4 string. | diff --git a/src/content/docs/commands/docs/roll.md b/src/content/docs/commands/docs/roll.md index e869c842f23..985358862e2 100644 --- a/src/content/docs/commands/docs/roll.md +++ b/src/content/docs/commands/docs/roll.md @@ -38,7 +38,7 @@ You must use one of the following subcommands. Using this command as-is will onl | name | type | usage | | -------------------------------------------- | ------- | ---------------------------------- | -| [`roll down`](/commands/docs/roll_down.md) | Builtin | Roll table rows down. | -| [`roll left`](/commands/docs/roll_left.md) | Builtin | Roll record or table columns left. | -| [`roll right`](/commands/docs/roll_right.md) | Builtin | Roll table columns right. | -| [`roll up`](/commands/docs/roll_up.md) | Builtin | Roll table rows up. | +| [`roll down`](/commands/docs/roll_down) | Builtin | Roll table rows down. | +| [`roll left`](/commands/docs/roll_left) | Builtin | Roll record or table columns left. | +| [`roll right`](/commands/docs/roll_right) | Builtin | Roll table columns right. | +| [`roll up`](/commands/docs/roll_up) | Builtin | Roll table rows up. | diff --git a/src/content/docs/commands/docs/scope.md b/src/content/docs/commands/docs/scope.md index b77947a70f9..27c60e7392c 100644 --- a/src/content/docs/commands/docs/scope.md +++ b/src/content/docs/commands/docs/scope.md @@ -30,9 +30,9 @@ feature: default | name | type | usage | | ------------------------------------------------------------ | ------- | -------------------------------------------------------- | -| [`scope aliases`](/commands/docs/scope_aliases.md) | Builtin | Output info on the aliases in the current scope. | -| [`scope commands`](/commands/docs/scope_commands.md) | Builtin | Output info on the commands in the current scope. | -| [`scope engine-stats`](/commands/docs/scope_engine-stats.md) | Builtin | Output stats on the engine in the current state. | -| [`scope externs`](/commands/docs/scope_externs.md) | Builtin | Output info on the known externals in the current scope. | -| [`scope modules`](/commands/docs/scope_modules.md) | Builtin | Output info on the modules in the current scope. | -| [`scope variables`](/commands/docs/scope_variables.md) | Builtin | Output info on the variables in the current scope. | +| [`scope aliases`](/commands/docs/scope_aliases) | Builtin | Output info on the aliases in the current scope. | +| [`scope commands`](/commands/docs/scope_commands) | Builtin | Output info on the commands in the current scope. | +| [`scope engine-stats`](/commands/docs/scope_engine-stats) | Builtin | Output stats on the engine in the current state. | +| [`scope externs`](/commands/docs/scope_externs) | Builtin | Output info on the known externals in the current scope. | +| [`scope modules`](/commands/docs/scope_modules) | Builtin | Output info on the modules in the current scope. | +| [`scope variables`](/commands/docs/scope_variables) | Builtin | Output info on the variables in the current scope. | diff --git a/src/content/docs/commands/docs/seq.md b/src/content/docs/commands/docs/seq.md index 84cda214282..408935b2586 100644 --- a/src/content/docs/commands/docs/seq.md +++ b/src/content/docs/commands/docs/seq.md @@ -82,5 +82,5 @@ sequence 1 to 5, then convert to a string with a pipe separator | name | type | usage | | ---------------------------------------- | ------- | ------------------------------------- | -| [`seq char`](/commands/docs/seq_char.md) | Builtin | Print a sequence of ASCII characters. | -| [`seq date`](/commands/docs/seq_date.md) | Builtin | Print sequences of dates. | +| [`seq char`](/commands/docs/seq_char) | Builtin | Print a sequence of ASCII characters. | +| [`seq date`](/commands/docs/seq_date) | Builtin | Print sequences of dates. | diff --git a/src/content/docs/commands/docs/skip.md b/src/content/docs/commands/docs/skip.md index 7d97d764a71..221eefbe2e9 100644 --- a/src/content/docs/commands/docs/skip.md +++ b/src/content/docs/commands/docs/skip.md @@ -65,5 +65,5 @@ To skip specific numbered rows, try `drop nth`. To skip specific named columns, | name | type | usage | | -------------------------------------------- | ------- | ----------------------------------------------------- | -| [`skip until`](/commands/docs/skip_until.md) | Builtin | Skip elements of the input until a predicate is true. | -| [`skip while`](/commands/docs/skip_while.md) | Builtin | Skip elements of the input while a predicate is true. | +| [`skip until`](/commands/docs/skip_until) | Builtin | Skip elements of the input until a predicate is true. | +| [`skip while`](/commands/docs/skip_while) | Builtin | Skip elements of the input while a predicate is true. | diff --git a/src/content/docs/commands/docs/split.md b/src/content/docs/commands/docs/split.md index bea4bdd49fd..f9bc132c0ed 100644 --- a/src/content/docs/commands/docs/split.md +++ b/src/content/docs/commands/docs/split.md @@ -34,8 +34,8 @@ You must use one of the following subcommands. Using this command as-is will onl | name | type | usage | | ------------------------------------------------ | ------- | ------------------------------------------------------- | -| [`split chars`](/commands/docs/split_chars.md) | Builtin | Split a string into a list of characters. | -| [`split column`](/commands/docs/split_column.md) | Builtin | Split a string into multiple columns using a separator. | -| [`split list`](/commands/docs/split_list.md) | Builtin | Split a list into multiple lists using a separator. | -| [`split row`](/commands/docs/split_row.md) | Builtin | Split a string into multiple rows using a separator. | -| [`split words`](/commands/docs/split_words.md) | Builtin | Split a string's words into separate rows. | +| [`split chars`](/commands/docs/split_chars) | Builtin | Split a string into a list of characters. | +| [`split column`](/commands/docs/split_column) | Builtin | Split a string into multiple columns using a separator. | +| [`split list`](/commands/docs/split_list) | Builtin | Split a list into multiple lists using a separator. | +| [`split row`](/commands/docs/split_row) | Builtin | Split a string into multiple rows using a separator. | +| [`split words`](/commands/docs/split_words) | Builtin | Split a string's words into separate rows. | diff --git a/src/content/docs/commands/docs/stor.md b/src/content/docs/commands/docs/stor.md index 1e976a94b22..111abe9a83e 100644 --- a/src/content/docs/commands/docs/stor.md +++ b/src/content/docs/commands/docs/stor.md @@ -34,11 +34,11 @@ You must use one of the following subcommands. Using this command as-is will onl | name | type | usage | | ---------------------------------------------- | ------- | --------------------------------------------------------------------------- | -| [`stor create`](/commands/docs/stor_create.md) | Builtin | Create a table in the in-memory sqlite database. | -| [`stor delete`](/commands/docs/stor_delete.md) | Builtin | Delete a table or specified rows in the in-memory sqlite database. | -| [`stor export`](/commands/docs/stor_export.md) | Builtin | Export the in-memory sqlite database to a sqlite database file. | -| [`stor import`](/commands/docs/stor_import.md) | Builtin | Import a sqlite database file into the in-memory sqlite database. | -| [`stor insert`](/commands/docs/stor_insert.md) | Builtin | Insert information into a specified table in the in-memory sqlite database. | -| [`stor open`](/commands/docs/stor_open.md) | Builtin | Opens the in-memory sqlite database. | -| [`stor reset`](/commands/docs/stor_reset.md) | Builtin | Reset the in-memory database by dropping all tables. | -| [`stor update`](/commands/docs/stor_update.md) | Builtin | Update information in a specified table in the in-memory sqlite database. | +| [`stor create`](/commands/docs/stor_create) | Builtin | Create a table in the in-memory sqlite database. | +| [`stor delete`](/commands/docs/stor_delete) | Builtin | Delete a table or specified rows in the in-memory sqlite database. | +| [`stor export`](/commands/docs/stor_export) | Builtin | Export the in-memory sqlite database to a sqlite database file. | +| [`stor import`](/commands/docs/stor_import) | Builtin | Import a sqlite database file into the in-memory sqlite database. | +| [`stor insert`](/commands/docs/stor_insert) | Builtin | Insert information into a specified table in the in-memory sqlite database. | +| [`stor open`](/commands/docs/stor_open) | Builtin | Opens the in-memory sqlite database. | +| [`stor reset`](/commands/docs/stor_reset) | Builtin | Reset the in-memory database by dropping all tables. | +| [`stor update`](/commands/docs/stor_update) | Builtin | Update information in a specified table in the in-memory sqlite database. | diff --git a/src/content/docs/commands/docs/str.md b/src/content/docs/commands/docs/str.md index e4f61d48af3..69effaa3a77 100644 --- a/src/content/docs/commands/docs/str.md +++ b/src/content/docs/commands/docs/str.md @@ -38,26 +38,26 @@ You must use one of the following subcommands. Using this command as-is will onl | name | type | usage | | ------------------------------------------------------------------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------- | -| [`str camel-case`](/commands/docs/str_camel-case.md) | Builtin | Convert a string to camelCase. | -| [`str capitalize`](/commands/docs/str_capitalize.md) | Builtin | Capitalize first letter of text. | -| [`str contains`](/commands/docs/str_contains.md) | Builtin | Checks if string input contains a substring. | -| [`str distance`](/commands/docs/str_distance.md) | Builtin | Compare two strings and return the edit distance/Levenshtein distance. | -| [`str downcase`](/commands/docs/str_downcase.md) | Builtin | Make text lowercase. | -| [`str ends-with`](/commands/docs/str_ends-with.md) | Builtin | Check if an input ends with a string. | -| [`str escape-glob`](/commands/docs/str_escape-glob.md) | Builtin | Escape glob pattern. | -| [`str expand`](/commands/docs/str_expand.md) | Builtin | Generates all possible combinations defined in brace expansion syntax. | -| [`str index-of`](/commands/docs/str_index-of.md) | Builtin | Returns start index of first occurrence of string in input, or -1 if no match. | -| [`str join`](/commands/docs/str_join.md) | Builtin | Concatenate multiple strings into a single string, with an optional separator between each. | -| [`str kebab-case`](/commands/docs/str_kebab-case.md) | Builtin | Convert a string to kebab-case. | -| [`str length`](/commands/docs/str_length.md) | Builtin | Output the length of any strings in the pipeline. | -| [`str pascal-case`](/commands/docs/str_pascal-case.md) | Builtin | Convert a string to PascalCase. | -| [`str replace`](/commands/docs/str_replace.md) | Builtin | Find and replace text. | -| [`str reverse`](/commands/docs/str_reverse.md) | Builtin | Reverse every string in the pipeline. | -| [`str screaming-snake-case`](/commands/docs/str_screaming-snake-case.md) | Builtin | Convert a string to SCREAMING_SNAKE_CASE. | -| [`str snake-case`](/commands/docs/str_snake-case.md) | Builtin | Convert a string to snake_case. | -| [`str starts-with`](/commands/docs/str_starts-with.md) | Builtin | Check if an input starts with a string. | -| [`str stats`](/commands/docs/str_stats.md) | Builtin | Gather word count statistics on the text. | -| [`str substring`](/commands/docs/str_substring.md) | Builtin | Get part of a string. Note that the start is included but the end is excluded, and that the first character of a string is index 0. | -| [`str title-case`](/commands/docs/str_title-case.md) | Builtin | Convert a string to Title Case. | -| [`str trim`](/commands/docs/str_trim.md) | Builtin | Trim whitespace or specific character. | -| [`str upcase`](/commands/docs/str_upcase.md) | Builtin | Make text uppercase. | +| [`str camel-case`](/commands/docs/str_camel-case) | Builtin | Convert a string to camelCase. | +| [`str capitalize`](/commands/docs/str_capitalize) | Builtin | Capitalize first letter of text. | +| [`str contains`](/commands/docs/str_contains) | Builtin | Checks if string input contains a substring. | +| [`str distance`](/commands/docs/str_distance) | Builtin | Compare two strings and return the edit distance/Levenshtein distance. | +| [`str downcase`](/commands/docs/str_downcase) | Builtin | Make text lowercase. | +| [`str ends-with`](/commands/docs/str_ends-with) | Builtin | Check if an input ends with a string. | +| [`str escape-glob`](/commands/docs/str_escape-glob) | Builtin | Escape glob pattern. | +| [`str expand`](/commands/docs/str_expand) | Builtin | Generates all possible combinations defined in brace expansion syntax. | +| [`str index-of`](/commands/docs/str_index-of) | Builtin | Returns start index of first occurrence of string in input, or -1 if no match. | +| [`str join`](/commands/docs/str_join) | Builtin | Concatenate multiple strings into a single string, with an optional separator between each. | +| [`str kebab-case`](/commands/docs/str_kebab-case) | Builtin | Convert a string to kebab-case. | +| [`str length`](/commands/docs/str_length) | Builtin | Output the length of any strings in the pipeline. | +| [`str pascal-case`](/commands/docs/str_pascal-case) | Builtin | Convert a string to PascalCase. | +| [`str replace`](/commands/docs/str_replace) | Builtin | Find and replace text. | +| [`str reverse`](/commands/docs/str_reverse) | Builtin | Reverse every string in the pipeline. | +| [`str screaming-snake-case`](/commands/docs/str_screaming-snake-case) | Builtin | Convert a string to SCREAMING_SNAKE_CASE. | +| [`str snake-case`](/commands/docs/str_snake-case) | Builtin | Convert a string to snake_case. | +| [`str starts-with`](/commands/docs/str_starts-with) | Builtin | Check if an input starts with a string. | +| [`str stats`](/commands/docs/str_stats) | Builtin | Gather word count statistics on the text. | +| [`str substring`](/commands/docs/str_substring) | Builtin | Get part of a string. Note that the start is included but the end is excluded, and that the first character of a string is index 0. | +| [`str title-case`](/commands/docs/str_title-case) | Builtin | Convert a string to Title Case. | +| [`str trim`](/commands/docs/str_trim) | Builtin | Trim whitespace or specific character. | +| [`str upcase`](/commands/docs/str_upcase) | Builtin | Make text uppercase. | diff --git a/src/content/docs/commands/docs/take.md b/src/content/docs/commands/docs/take.md index bf5a5716083..dbee4a1959a 100644 --- a/src/content/docs/commands/docs/take.md +++ b/src/content/docs/commands/docs/take.md @@ -94,5 +94,5 @@ Return the first 3 elements of a range | name | type | usage | | -------------------------------------------- | ------- | ----------------------------------------------------- | -| [`take until`](/commands/docs/take_until.md) | Builtin | Take elements of the input until a predicate is true. | -| [`take while`](/commands/docs/take_while.md) | Builtin | Take elements of the input while a predicate is true. | +| [`take until`](/commands/docs/take_until) | Builtin | Take elements of the input until a predicate is true. | +| [`take while`](/commands/docs/take_while) | Builtin | Take elements of the input while a predicate is true. | diff --git a/src/content/docs/commands/docs/to.md b/src/content/docs/commands/docs/to.md index c6c4732759b..a676d9a043e 100644 --- a/src/content/docs/commands/docs/to.md +++ b/src/content/docs/commands/docs/to.md @@ -34,13 +34,13 @@ You must use one of the following subcommands. Using this command as-is will onl | name | type | usage | | -------------------------------------- | ------- | ------------------------------------------------------------- | -| [`to csv`](/commands/docs/to_csv.md) | Builtin | Convert table into .csv text . | -| [`to html`](/commands/docs/to_html.md) | Builtin | Convert table into simple HTML. | -| [`to json`](/commands/docs/to_json.md) | Builtin | Converts table data into JSON text. | -| [`to md`](/commands/docs/to_md.md) | Builtin | Convert table into simple Markdown. | -| [`to nuon`](/commands/docs/to_nuon.md) | Builtin | Converts table data into Nuon (Nushell Object Notation) text. | -| [`to text`](/commands/docs/to_text.md) | Builtin | Converts data into simple text. | -| [`to toml`](/commands/docs/to_toml.md) | Builtin | Convert record into .toml text. | -| [`to tsv`](/commands/docs/to_tsv.md) | Builtin | Convert table into .tsv text. | -| [`to xml`](/commands/docs/to_xml.md) | Builtin | Convert special record structure into .xml text. | -| [`to yaml`](/commands/docs/to_yaml.md) | Builtin | Convert table into .yaml/.yml text. | +| [`to csv`](/commands/docs/to_csv) | Builtin | Convert table into .csv text . | +| [`to html`](/commands/docs/to_html) | Builtin | Convert table into simple HTML. | +| [`to json`](/commands/docs/to_json) | Builtin | Converts table data into JSON text. | +| [`to md`](/commands/docs/to_md) | Builtin | Convert table into simple Markdown. | +| [`to nuon`](/commands/docs/to_nuon) | Builtin | Converts table data into Nuon (Nushell Object Notation) text. | +| [`to text`](/commands/docs/to_text) | Builtin | Converts data into simple text. | +| [`to toml`](/commands/docs/to_toml) | Builtin | Convert record into .toml text. | +| [`to tsv`](/commands/docs/to_tsv) | Builtin | Convert table into .tsv text. | +| [`to xml`](/commands/docs/to_xml) | Builtin | Convert special record structure into .xml text. | +| [`to yaml`](/commands/docs/to_yaml) | Builtin | Convert table into .yaml/.yml text. | diff --git a/src/content/docs/commands/docs/update.md b/src/content/docs/commands/docs/update.md index 0c435a4162c..6b3d3f2308a 100644 --- a/src/content/docs/commands/docs/update.md +++ b/src/content/docs/commands/docs/update.md @@ -97,4 +97,4 @@ Use a closure to compute a new value at an index | name | type | usage | | ------------------------------------------------ | ------- | ----------------------- | -| [`update cells`](/commands/docs/update_cells.md) | Builtin | Update the table cells. | +| [`update cells`](/commands/docs/update_cells) | Builtin | Update the table cells. | diff --git a/src/content/docs/commands/docs/url.md b/src/content/docs/commands/docs/url.md index 5161ff6e1b1..7c66fb3bf91 100644 --- a/src/content/docs/commands/docs/url.md +++ b/src/content/docs/commands/docs/url.md @@ -34,8 +34,8 @@ You must use one of the following subcommands. Using this command as-is will onl | name | type | usage | | ------------------------------------------------------ | ------- | --------------------------------------------------------------------- | -| [`url build-query`](/commands/docs/url_build-query.md) | Builtin | Converts record or table into query string applying percent-encoding. | -| [`url decode`](/commands/docs/url_decode.md) | Builtin | Converts a percent-encoded web safe string to a string. | -| [`url encode`](/commands/docs/url_encode.md) | Builtin | Converts a string to a percent encoded web safe string. | -| [`url join`](/commands/docs/url_join.md) | Builtin | Converts a record to url. | -| [`url parse`](/commands/docs/url_parse.md) | Builtin | Parses a url. | +| [`url build-query`](/commands/docs/url_build-query) | Builtin | Converts record or table into query string applying percent-encoding. | +| [`url decode`](/commands/docs/url_decode) | Builtin | Converts a percent-encoded web safe string to a string. | +| [`url encode`](/commands/docs/url_encode) | Builtin | Converts a string to a percent encoded web safe string. | +| [`url join`](/commands/docs/url_join) | Builtin | Converts a record to url. | +| [`url parse`](/commands/docs/url_parse) | Builtin | Parses a url. | diff --git a/src/content/docs/commands/docs/view.md b/src/content/docs/commands/docs/view.md index 535dbba82ef..933caac4dc5 100644 --- a/src/content/docs/commands/docs/view.md +++ b/src/content/docs/commands/docs/view.md @@ -34,6 +34,6 @@ You must use one of the following subcommands. Using this command as-is will onl | name | type | usage | | ---------------------------------------------- | ------- | ---------------------------------------------------------- | -| [`view files`](/commands/docs/view_files.md) | Builtin | View the files registered in nushell's EngineState memory. | -| [`view source`](/commands/docs/view_source.md) | Builtin | View a block, module, or a definition. | -| [`view span`](/commands/docs/view_span.md) | Builtin | View the contents of a span. | +| [`view files`](/commands/docs/view_files) | Builtin | View the files registered in nushell's EngineState memory. | +| [`view source`](/commands/docs/view_source) | Builtin | View a block, module, or a definition. | +| [`view span`](/commands/docs/view_span) | Builtin | View the contents of a span. | diff --git a/src/content/docs/contributor-book/commands.md b/src/content/docs/contributor-book/commands.md index 3a1950d6695..28ebe14cc3f 100644 --- a/src/content/docs/contributor-book/commands.md +++ b/src/content/docs/contributor-book/commands.md @@ -8,11 +8,11 @@ Commands are the building blocks for pipelines in Nu. They do the action of the ## Internal commands -All commands inside of Nu, including plugins, are internal commands. Internal commands communicate with each other using [`PipelineData`](https://docs.rs/nu-protocol/latest/nu_protocol/enum.PipelineData.html). +All commands inside of Nu, including plugins, are internal commands. Internal commands communicate with each other using [`PipelineData`](https://docs.rs/nu-protocol/latest/nu_protocol/enum.PipelineData). ### Signature -Commands use a light typechecking pass to ensure that arguments passed to them can be handled correctly. To enable this, each [`Command`](https://docs.rs/nu-protocol/latest/nu_protocol/engine/trait.Command.html) provides a [`Signature`](https://docs.rs/nu-protocol/latest/nu_protocol/struct.Signature.html) which tells Nu: +Commands use a light typechecking pass to ensure that arguments passed to them can be handled correctly. To enable this, each [`Command`](https://docs.rs/nu-protocol/latest/nu_protocol/engine/trait.Command) provides a [`Signature`](https://docs.rs/nu-protocol/latest/nu_protocol/struct.Signature) which tells Nu: - The name of the command - The positional arguments (e.g. in `start x y` the `x` and `y` are positional arguments) diff --git a/src/content/docs/cookbook/jq_v_nushell.md b/src/content/docs/cookbook/jq_v_nushell.md index 0d6f2728c86..8b2be44d8e4 100644 --- a/src/content/docs/cookbook/jq_v_nushell.md +++ b/src/content/docs/cookbook/jq_v_nushell.md @@ -34,7 +34,7 @@ Output: ╰──────────────────┴───────────────╯ ``` -The output for `jq` is a JSON string whereas in `nu` it's a Nushell value. To get the output of any pipeline as JSON, simply apply a [`to json`](/commands/docs/to_json.html) at the end: +The output for `jq` is a JSON string whereas in `nu` it's a Nushell value. To get the output of any pipeline as JSON, simply apply a [`to json`](/commands/docs/to_json) at the end: ```nushell '[{"name": "Alice", "age": 30}, {"name": "Bob", "age": 25}]' @@ -57,7 +57,7 @@ Output: ] ``` -When your JSON data is stored in a file, you can use [open](/commands/docs/open.html) instead of [from json](/commands/docs/from_json.html). +When your JSON data is stored in a file, you can use [open](/commands/docs/open) instead of [from json](/commands/docs/from_json). Before we get into the examples, the following glossary can help familiarise yourself with how Nushell data types map to jq data types. @@ -345,7 +345,7 @@ Output: ╰───┴───╯ ``` -Alternatively, you can use [`compact`](/commands/docs/compact.html): +Alternatively, you can use [`compact`](/commands/docs/compact): ```nushell '[1, null, 3, null, 5]' @@ -377,7 +377,7 @@ Output: Name: Alice, Name: 30 ``` -This approach is a bit involved but if we [install the full version](https://github.com/nushell/nushell/releases) which includes the _extra commands_ we can benefit from the [`format`](/commands/docs/format.html): +This approach is a bit involved but if we [install the full version](https://github.com/nushell/nushell/releases) which includes the _extra commands_ we can benefit from the [`format`](/commands/docs/format): ```nushell '{"name": "Alice", "age": 30}' @@ -449,7 +449,7 @@ echo '{"data": [{"values": [1, 2, 3]}, {"values": [4, 5, 6]}]}' | jq -r '.data[].values[] | select(. > 3)' ``` -In `nu` we can take advantage of the fact that [a list of records is in fact a table](/book/types_of_data.html#tables) and simply do: +In `nu` we can take advantage of the fact that [a list of records is in fact a table](/book/types_of_data#tables) and simply do: ```nushell '{"data": [{"values": [1, 2, 3]}, {"values": [4, 5, 6]}]}' @@ -583,7 +583,7 @@ In `nu` we do: | group-by --to-table category ``` -Note that `--to-table` was added to Nushell in [version 0.87.0](blog/2023-11-14-nushell_0_87_0.html). Before that you had to [`transpose`](/commands/docs/transpose) the record resulting from `group-by` which was substantially slower for large sets. +Note that `--to-table` was added to Nushell in [version 0.87.0](blog/2023-11-14-nushell_0_87_0). Before that you had to [`transpose`](/commands/docs/transpose) the record resulting from `group-by` which was substantially slower for large sets. Output: @@ -738,7 +738,7 @@ Note that if what you are after is computing a histogram, you can benefit from t ## Appendix: Custom commands -This section provides the implementation of the custom commands used in this cookbook. Note that they are illustrative and in no way optimised for large inputs. If you are interested in that, [plugins](/book/plugins.html) will likely be the answer as they can be written in general purpose languages such as Rust or Python. +This section provides the implementation of the custom commands used in this cookbook. Note that they are illustrative and in no way optimised for large inputs. If you are interested in that, [plugins](/book/plugins) will likely be the answer as they can be written in general purpose languages such as Rust or Python. ```nushell > use toolbox.nu * diff --git a/src/content/docs/cookbook/pattern_matching.md b/src/content/docs/cookbook/pattern_matching.md index 55e9cd2a684..d015e805aed 100644 --- a/src/content/docs/cookbook/pattern_matching.md +++ b/src/content/docs/cookbook/pattern_matching.md @@ -6,7 +6,7 @@ title: Pattern Matching ## Using the `match` keyword -Like many other languages, nu offers a [`match`](https://www.nushell.sh/commands/docs/match.html#frontmatter-title-for-core) keyword. Usually this is used as a slightly more ergonomic version of `if-else` statements if you have many branches +Like many other languages, nu offers a [`match`](https://www.nushell.sh/commands/docs/match#frontmatter-title-for-core) keyword. Usually this is used as a slightly more ergonomic version of `if-else` statements if you have many branches ```nushell [black red yellow green purple blue indigo] | each {|c| @@ -71,7 +71,7 @@ Output: ## Pattern matching on types -You can use the [`describe`](https://www.nushell.sh/commands/docs/describe.html) command to get more info about the types of values. For example: +You can use the [`describe`](https://www.nushell.sh/commands/docs/describe) command to get more info about the types of values. For example: ```nushell {one: 1 two: 2} | describe diff --git a/src/content/docs/cookbook/setup.md b/src/content/docs/cookbook/setup.md index b9b449f2bb2..adb8b1bd411 100644 --- a/src/content/docs/cookbook/setup.md +++ b/src/content/docs/cookbook/setup.md @@ -19,7 +19,7 @@ Alternately, if you want to append a folder to your `PATH` environment variable $env.PATH = ($env.PATH | split row (char esep) | append "some/other/path") ``` -For more detailed instructions, see the documentation about [environment variables](/book/environment.html#setting-environment-variables) and [PATH configuration](/book/configuration.html#path-configuration). +For more detailed instructions, see the documentation about [environment variables](/book/environment#setting-environment-variables) and [PATH configuration](/book/configuration#path-configuration). ### How to list your environment variables @@ -126,11 +126,11 @@ To be most compatible, the `starship` binary will run every prompt render and is absolute stateless. Nushell, however, is very stateful in a single instance. -[Hooks](https://www.nushell.sh/book/hooks.html#hooks) allow registration of +[Hooks](https://www.nushell.sh/book/hooks#hooks) allow registration of custom callback functions. In this case, the `pre_prompt` hook is very useful. With it, we can export state information as an environment variable, for -example, what [overlays](https://www.nushell.sh/book/overlays.html) are +example, what [overlays](https://www.nushell.sh/book/overlays) are currently activated. ```nushell diff --git a/src/content/docs/cookbook/tables.md b/src/content/docs/cookbook/tables.md index d3f3281d186..7f26778f564 100644 --- a/src/content/docs/cookbook/tables.md +++ b/src/content/docs/cookbook/tables.md @@ -6,7 +6,7 @@ title: Advanced table workflows ### Merging tables of different size -Examples shown in [`Working with tables`](../book/working_with_tables.md) work fine when our tables have equal amount of rows but what if we want to merge tables of different sizes? +Examples shown in [`Working with tables`](../book/working_with_tables) work fine when our tables have equal amount of rows but what if we want to merge tables of different sizes? ```nushell let first = [[a b]; [1 2] [3 4]] @@ -26,7 +26,7 @@ Output: ───┴───┴───┴───┴─── ``` -Second row in columns `c` and `d` is empty because our `second` table only contained a single row so nushell has nothing to fill the remaining rows with. But what if we wanted the smaller table to 'wrap around' and keep filling the rows? For that we can use the [`group`](/commands/docs/group.md) command to split the larger table into subtables, merge each of them with the smaller table and then combine the merged tables together using [`flatten`](/commands/docs/flatten.md) command like this: +Second row in columns `c` and `d` is empty because our `second` table only contained a single row so nushell has nothing to fill the remaining rows with. But what if we wanted the smaller table to 'wrap around' and keep filling the rows? For that we can use the [`group`](/commands/docs/group) command to split the larger table into subtables, merge each of them with the smaller table and then combine the merged tables together using [`flatten`](/commands/docs/flatten) command like this: ```nushell let first = [[a b]; [1 2] [3 4]] @@ -79,7 +79,7 @@ Output: ───┴───┴───┴───┴───┴───┴─── ``` -Or just like last time we could use the [`reduce`](../book/docs/reduce.md) command to merge tables together recursively: +Or just like last time we could use the [`reduce`](../book/docs/reduce) command to merge tables together recursively: ```nushell [$first_table $second_table $third_table] diff --git a/src/content/docs/index.mdx b/src/content/docs/index.mdx index be7e00d68df..25a4958d8be 100644 --- a/src/content/docs/index.mdx +++ b/src/content/docs/index.mdx @@ -38,7 +38,7 @@ import { Card, CardGrid } from "@astrojs/starlight/components"; ## Nu works with existing data -Nu speaks [JSON, YAML, SQLite, Excel, and more](https://www.nushell.sh/book/loading_data.html) out of the box. It's easy to bring data into a Nu pipeline whether it's in a file, a database, or a web API: +Nu speaks [JSON, YAML, SQLite, Excel, and more](https://www.nushell.sh/book/loading_data) out of the box. It's easy to bring data into a Nu pipeline whether it's in a file, a database, or a web API: ![Screenshot showing fetch with a web API](../../assets/images/fetch-example.png) diff --git a/src/content/docs/introduction.md b/src/content/docs/introduction.md index f2390e74f3d..58621b4ffd8 100644 --- a/src/content/docs/introduction.md +++ b/src/content/docs/introduction.md @@ -17,13 +17,13 @@ Nu takes cues from a lot of familiar territory: traditional shells like bash, ob The book is split into chapters which are further broken down into sections. You can click on the chapter headers to get more information about it. -- [Getting Started](getting_started.md) teaches you how to install Nushell and shows you the ropes. It also explains some of the design principles where Nushell differs from typical shells, such as bash. -- [Nu Fundamentals](nu_fundamentals.md) explains basic concepts of the Nushell language. -- [Programming in Nu](programming_in_nu.md) dives more deeply into the language features and shows several ways how to organize and structure your code. -- [Nu as a Shell](nu_as_a_shell.md) focuses on the shell features, most notably the configuration and environment. -- [Coming to Nu](coming_to_nu.md) is intended to give a quick start for users coming from other shells or languages. -- [Design Notes](design_notes.md) has in-depth explanation of some of the Nushell's design choices. -- [(Not So) Advanced](advanced.md) includes some more advanced topics (they are not _so_ advanced, make sure to check them out, too!). +- [Getting Started](/book/getting_started) teaches you how to install Nushell and shows you the ropes. It also explains some of the design principles where Nushell differs from typical shells, such as bash. +- [Nu Fundamentals](/book/nu_fundamentals) explains basic concepts of the Nushell language. +- [Programming in Nu](/book/programming_in_nu) dives more deeply into the language features and shows several ways how to organize and structure your code. +- [Nu as a Shell](/book/nu_as_a_shell) focuses on the shell features, most notably the configuration and environment. +- [Coming to Nu](/book/coming_to_nu) is intended to give a quick start for users coming from other shells or languages. +- [Design Notes](/book/design_notes) has in-depth explanation of some of the Nushell's design choices. +- [(Not So) Advanced](/book/advanced) includes some more advanced topics (they are not _so_ advanced, make sure to check them out, too!). ## The Many Parts of Nushell @@ -48,7 +48,7 @@ Most repositories contain `CONTRIBUTING.md` file with tips and details that shou Nushell itself is written in [Rust](https://www.rust-lang.org). However, you do not have to be a Rust programmer to help. If you know some web development, you can contribute to improving this website or the Nana project. -[Dataframes](dataframes.md) can use your data processing expertise. +[Dataframes](/book/dataframes) can use your data processing expertise. If you wrote a cool script, plugin or integrated Nushell somewhere, we'd welcome your contribution to `nu_scripts` or Awesome Nu. Discovering bugs with reproduction steps and filing GitHub issues for them is a valuable help, too! From efe4e1596a2a20a5da854e3e1dc08b2f8cbc4f78 Mon Sep 17 00:00:00 2001 From: Jacob Lamb Date: Mon, 12 Feb 2024 13:03:12 -0800 Subject: [PATCH 15/72] Format --- src/content/docs/commands/docs/ansi.md | 4 ++-- src/content/docs/commands/docs/bits.md | 4 ++-- src/content/docs/commands/docs/bytes.md | 4 ++-- src/content/docs/commands/docs/config.md | 4 ++-- src/content/docs/commands/docs/date.md | 4 ++-- src/content/docs/commands/docs/debug.md | 4 ++-- src/content/docs/commands/docs/decode.md | 4 ++-- src/content/docs/commands/docs/dfr.md | 4 ++-- src/content/docs/commands/docs/drop.md | 4 ++-- src/content/docs/commands/docs/each.md | 4 ++-- src/content/docs/commands/docs/encode.md | 4 ++-- src/content/docs/commands/docs/export.md | 4 ++-- src/content/docs/commands/docs/format.md | 4 ++-- src/content/docs/commands/docs/from.md | 4 ++-- src/content/docs/commands/docs/hash.md | 4 ++-- src/content/docs/commands/docs/help.md | 4 ++-- src/content/docs/commands/docs/history.md | 4 ++-- src/content/docs/commands/docs/http.md | 4 ++-- src/content/docs/commands/docs/input.md | 4 ++-- src/content/docs/commands/docs/into.md | 4 ++-- src/content/docs/commands/docs/keybindings.md | 4 ++-- src/content/docs/commands/docs/math.md | 4 ++-- src/content/docs/commands/docs/overlay.md | 4 ++-- src/content/docs/commands/docs/path.md | 4 ++-- src/content/docs/commands/docs/query.md | 4 ++-- src/content/docs/commands/docs/random.md | 4 ++-- src/content/docs/commands/docs/roll.md | 4 ++-- src/content/docs/commands/docs/scope.md | 4 ++-- src/content/docs/commands/docs/seq.md | 4 ++-- src/content/docs/commands/docs/skip.md | 4 ++-- src/content/docs/commands/docs/split.md | 4 ++-- src/content/docs/commands/docs/stor.md | 4 ++-- src/content/docs/commands/docs/str.md | 4 ++-- src/content/docs/commands/docs/take.md | 4 ++-- src/content/docs/commands/docs/to.md | 4 ++-- src/content/docs/commands/docs/update.md | 4 ++-- src/content/docs/commands/docs/url.md | 4 ++-- src/content/docs/commands/docs/view.md | 4 ++-- 38 files changed, 76 insertions(+), 76 deletions(-) diff --git a/src/content/docs/commands/docs/ansi.md b/src/content/docs/commands/docs/ansi.md index 84fad5b1c28..934a588acf4 100644 --- a/src/content/docs/commands/docs/ansi.md +++ b/src/content/docs/commands/docs/ansi.md @@ -150,8 +150,8 @@ Operating system commands: ## Subcommands: -| name | type | usage | -| -------------------------------------------------- | ------- | ------------------------------------------------------------------ | +| name | type | usage | +| ----------------------------------------------- | ------- | ------------------------------------------------------------------ | | [`ansi gradient`](/commands/docs/ansi_gradient) | Builtin | Add a color gradient (using ANSI color codes) to the given string. | | [`ansi link`](/commands/docs/ansi_link) | Builtin | Add a link (using OSC 8 escape sequence) to the given string. | | [`ansi strip`](/commands/docs/ansi_strip) | Builtin | Strip ANSI escape sequences from a string. | diff --git a/src/content/docs/commands/docs/bits.md b/src/content/docs/commands/docs/bits.md index cf85f54f7d2..7dc34fe8c55 100644 --- a/src/content/docs/commands/docs/bits.md +++ b/src/content/docs/commands/docs/bits.md @@ -36,8 +36,8 @@ You must use one of the following subcommands. Using this command as-is will onl ## Subcommands: -| name | type | usage | -| ---------------------------------------- | ------- | -------------------------------------- | +| name | type | usage | +| ------------------------------------- | ------- | -------------------------------------- | | [`bits and`](/commands/docs/bits_and) | Builtin | Performs bitwise and for ints. | | [`bits not`](/commands/docs/bits_not) | Builtin | Performs logical negation on each bit. | | [`bits or`](/commands/docs/bits_or) | Builtin | Performs bitwise or for ints. | diff --git a/src/content/docs/commands/docs/bytes.md b/src/content/docs/commands/docs/bytes.md index bcdf59f014d..91bc20aed12 100644 --- a/src/content/docs/commands/docs/bytes.md +++ b/src/content/docs/commands/docs/bytes.md @@ -32,8 +32,8 @@ You must use one of the following subcommands. Using this command as-is will onl ## Subcommands: -| name | type | usage | -| ---------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------ | +| name | type | usage | +| ------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------ | | [`bytes add`](/commands/docs/bytes_add) | Builtin | Add specified bytes to the input. | | [`bytes at`](/commands/docs/bytes_at) | Builtin | Get bytes defined by a range. | | [`bytes build`](/commands/docs/bytes_build) | Builtin | Create bytes from the arguments. | diff --git a/src/content/docs/commands/docs/config.md b/src/content/docs/commands/docs/config.md index 4572a95e6b2..d5a1081fa7f 100644 --- a/src/content/docs/commands/docs/config.md +++ b/src/content/docs/commands/docs/config.md @@ -32,8 +32,8 @@ You must use one of the following subcommands. Using this command as-is will onl ## Subcommands: -| name | type | usage | -| ------------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| name | type | usage | +| --------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------- | | [`config env`](/commands/docs/config_env) | Builtin | Edit nu environment configurations. | | [`config nu`](/commands/docs/config_nu) | Builtin | Edit nu configurations. | | [`config reset`](/commands/docs/config_reset) | Builtin | Reset nushell environment configurations to default, and saves old config files in the config location as oldconfig.nu and oldenv.nu. | diff --git a/src/content/docs/commands/docs/date.md b/src/content/docs/commands/docs/date.md index 4844de0c60e..b34c849b3ad 100644 --- a/src/content/docs/commands/docs/date.md +++ b/src/content/docs/commands/docs/date.md @@ -32,8 +32,8 @@ You must use one of the following subcommands. Using this command as-is will onl ## Subcommands: -| name | type | usage | -| ------------------------------------------------------------ | ------- | --------------------------------------------------------- | +| name | type | usage | +| --------------------------------------------------------- | ------- | --------------------------------------------------------- | | [`date format`](/commands/docs/date_format) | Builtin | Removed command: use `format date` instead. | | [`date humanize`](/commands/docs/date_humanize) | Builtin | Print a 'humanized' format for the date, relative to now. | | [`date list-timezone`](/commands/docs/date_list-timezone) | Builtin | List supported time zones. | diff --git a/src/content/docs/commands/docs/debug.md b/src/content/docs/commands/docs/debug.md index fa9f2bc8123..d4935abe572 100644 --- a/src/content/docs/commands/docs/debug.md +++ b/src/content/docs/commands/docs/debug.md @@ -64,6 +64,6 @@ Debug print a table ## Subcommands: -| name | type | usage | -| -------------------------------------------- | ------- | ------------------------- | +| name | type | usage | +| ----------------------------------------- | ------- | ------------------------- | | [`debug info`](/commands/docs/debug_info) | Builtin | View process memory info. | diff --git a/src/content/docs/commands/docs/decode.md b/src/content/docs/commands/docs/decode.md index a050f38f309..792414ef7c2 100644 --- a/src/content/docs/commands/docs/decode.md +++ b/src/content/docs/commands/docs/decode.md @@ -56,7 +56,7 @@ documentation link at https://docs.rs/encoding_rs/latest/encoding_rs/#statics ## Subcommands: -| name | type | usage | -| -------------------------------------------------- | ------- | ---------------------- | +| name | type | usage | +| ----------------------------------------------- | ------- | ---------------------- | | [`decode base64`](/commands/docs/decode_base64) | Builtin | Base64 decode a value. | | [`decode hex`](/commands/docs/decode_hex) | Builtin | Hex decode a value. | diff --git a/src/content/docs/commands/docs/dfr.md b/src/content/docs/commands/docs/dfr.md index 4c69e7dce6f..1bfc51884a8 100644 --- a/src/content/docs/commands/docs/dfr.md +++ b/src/content/docs/commands/docs/dfr.md @@ -36,8 +36,8 @@ You must use one of the following subcommands. Using this command as-is will onl ## Subcommands: -| name | type | usage | -| -------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------ | +| name | type | usage | +| ----------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------ | | [`dfr agg`](/commands/docs/dfr_agg) | Builtin | Performs a series of aggregations from a group-by. | | [`dfr agg-groups`](/commands/docs/dfr_agg-groups) | Builtin | Creates an agg_groups expression. | | [`dfr all-false`](/commands/docs/dfr_all-false) | Builtin | Returns true if all values are false. | diff --git a/src/content/docs/commands/docs/drop.md b/src/content/docs/commands/docs/drop.md index 16041dd7259..68377221f73 100644 --- a/src/content/docs/commands/docs/drop.md +++ b/src/content/docs/commands/docs/drop.md @@ -83,7 +83,7 @@ Remove the last row in a table ## Subcommands: -| name | type | usage | -| ---------------------------------------------- | ------- | --------------------------------------------------------------------------------------------------- | +| name | type | usage | +| ------------------------------------------- | ------- | --------------------------------------------------------------------------------------------------- | | [`drop column`](/commands/docs/drop_column) | Builtin | Remove N columns at the right-hand end of the input table. To remove columns by name, use `reject`. | | [`drop nth`](/commands/docs/drop_nth) | Builtin | Drop the selected rows. | diff --git a/src/content/docs/commands/docs/each.md b/src/content/docs/commands/docs/each.md index 4795a3a2c31..4a49f8afd83 100644 --- a/src/content/docs/commands/docs/each.md +++ b/src/content/docs/commands/docs/each.md @@ -107,6 +107,6 @@ with 'transpose' first. ## Subcommands: -| name | type | usage | -| -------------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------- | +| name | type | usage | +| ----------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------- | | [`each while`](/commands/docs/each_while) | Builtin | Run a block on each row of the input list until a null is found, then create a new list with the results. | diff --git a/src/content/docs/commands/docs/encode.md b/src/content/docs/commands/docs/encode.md index 6f02588531d..1045c5f0fac 100644 --- a/src/content/docs/commands/docs/encode.md +++ b/src/content/docs/commands/docs/encode.md @@ -68,7 +68,7 @@ documentation link at https://docs.rs/encoding_rs/latest/encoding_rs/#statics ## Subcommands: -| name | type | usage | -| -------------------------------------------------- | ------- | --------------------------------------------- | +| name | type | usage | +| ----------------------------------------------- | ------- | --------------------------------------------- | | [`encode base64`](/commands/docs/encode_base64) | Builtin | Encode a string or binary value using Base64. | | [`encode hex`](/commands/docs/encode_hex) | Builtin | Encode a binary value using hex. | diff --git a/src/content/docs/commands/docs/export.md b/src/content/docs/commands/docs/export.md index 4a4206cbc0b..8bce2b07a14 100644 --- a/src/content/docs/commands/docs/export.md +++ b/src/content/docs/commands/docs/export.md @@ -42,8 +42,8 @@ https://www.nushell.sh/book/thinking_in_nu.html ## Subcommands: -| name | type | usage | -| -------------------------------------------------- | ------- | -------------------------------------------------------------------------------- | +| name | type | usage | +| ----------------------------------------------- | ------- | -------------------------------------------------------------------------------- | | [`export alias`](/commands/docs/export_alias) | Builtin | Alias a command (with optional flags) to a new name and export it from a module. | | [`export const`](/commands/docs/export_const) | Builtin | Use parse-time constant from a module and export them from this module. | | [`export def`](/commands/docs/export_def) | Builtin | Define a custom command and export it from a module. | diff --git a/src/content/docs/commands/docs/format.md b/src/content/docs/commands/docs/format.md index 1d457c842dc..4602d8314ac 100644 --- a/src/content/docs/commands/docs/format.md +++ b/src/content/docs/commands/docs/format.md @@ -32,8 +32,8 @@ You must use one of the following subcommands. Using this command as-is will onl ## Subcommands: -| name | type | usage | -| ------------------------------------------------------ | ------- | -------------------------------------------------------- | +| name | type | usage | +| --------------------------------------------------- | ------- | -------------------------------------------------------- | | [`format date`](/commands/docs/format_date) | Builtin | Format a given date using a format string. | | [`format duration`](/commands/docs/format_duration) | Builtin | Outputs duration with a specified unit of time. | | [`format filesize`](/commands/docs/format_filesize) | Builtin | Converts a column of filesizes to some specified format. | diff --git a/src/content/docs/commands/docs/from.md b/src/content/docs/commands/docs/from.md index 7c9c8dfb736..ef1937afd53 100644 --- a/src/content/docs/commands/docs/from.md +++ b/src/content/docs/commands/docs/from.md @@ -32,8 +32,8 @@ You must use one of the following subcommands. Using this command as-is will onl ## Subcommands: -| name | type | usage | -| ------------------------------------------ | -------------- | -------------------------------------------------------------------------------------------------------------------------- | +| name | type | usage | +| --------------------------------------- | -------------- | -------------------------------------------------------------------------------------------------------------------------- | | [`from csv`](/commands/docs/from_csv) | Builtin | Parse text as .csv and create table. | | [`from eml`](/commands/docs/from_eml) | Builtin,Plugin | Parse text as .eml and create record. | | [`from ics`](/commands/docs/from_ics) | Builtin,Plugin | Parse text as .ics and create table. | diff --git a/src/content/docs/commands/docs/hash.md b/src/content/docs/commands/docs/hash.md index f899065c74c..e610b2df868 100644 --- a/src/content/docs/commands/docs/hash.md +++ b/src/content/docs/commands/docs/hash.md @@ -32,7 +32,7 @@ You must use one of the following subcommands. Using this command as-is will onl ## Subcommands: -| name | type | usage | -| ---------------------------------------------- | ------- | --------------------------------------------- | +| name | type | usage | +| ------------------------------------------- | ------- | --------------------------------------------- | | [`hash md5`](/commands/docs/hash_md5) | Builtin | Hash a value using the md5 hash algorithm. | | [`hash sha256`](/commands/docs/hash_sha256) | Builtin | Hash a value using the sha256 hash algorithm. | diff --git a/src/content/docs/commands/docs/help.md b/src/content/docs/commands/docs/help.md index cfcd0ce14f5..f5f7ed34cf7 100644 --- a/src/content/docs/commands/docs/help.md +++ b/src/content/docs/commands/docs/help.md @@ -63,8 +63,8 @@ search for string in command names, usage and search terms ## Subcommands: -| name | type | usage | -| ---------------------------------------------------- | ------- | ------------------------------------ | +| name | type | usage | +| ------------------------------------------------- | ------- | ------------------------------------ | | [`help aliases`](/commands/docs/help_aliases) | Builtin | Show help on nushell aliases. | | [`help commands`](/commands/docs/help_commands) | Builtin | Show help on nushell commands. | | [`help escapes`](/commands/docs/help_escapes) | Builtin | Show help on nushell string escapes. | diff --git a/src/content/docs/commands/docs/history.md b/src/content/docs/commands/docs/history.md index 14558ddedc4..a95ebe842ea 100644 --- a/src/content/docs/commands/docs/history.md +++ b/src/content/docs/commands/docs/history.md @@ -56,6 +56,6 @@ Search all the commands from history that contains 'cargo' ## Subcommands: -| name | type | usage | -| ------------------------------------------------------ | ------- | -------------------------------- | +| name | type | usage | +| --------------------------------------------------- | ------- | -------------------------------- | | [`history session`](/commands/docs/history_session) | Builtin | Get the command history session. | diff --git a/src/content/docs/commands/docs/http.md b/src/content/docs/commands/docs/http.md index 44d4d0a0b9e..0def6407c35 100644 --- a/src/content/docs/commands/docs/http.md +++ b/src/content/docs/commands/docs/http.md @@ -32,8 +32,8 @@ You must use one of the following subcommands. Using this command as-is will onl ## Subcommands: -| name | type | usage | -| ------------------------------------------------ | ------- | --------------------------------------------------------- | +| name | type | usage | +| --------------------------------------------- | ------- | --------------------------------------------------------- | | [`http delete`](/commands/docs/http_delete) | Builtin | Delete the specified resource. | | [`http get`](/commands/docs/http_get) | Builtin | Fetch the contents from a URL. | | [`http head`](/commands/docs/http_head) | Builtin | Get the headers from a URL. | diff --git a/src/content/docs/commands/docs/input.md b/src/content/docs/commands/docs/input.md index 1b59cfaad6f..fc05b579a46 100644 --- a/src/content/docs/commands/docs/input.md +++ b/src/content/docs/commands/docs/input.md @@ -54,7 +54,7 @@ Get two characters from the user, and assign to a variable ## Subcommands: -| name | type | usage | -| ------------------------------------------------ | ------- | -------------------------------- | +| name | type | usage | +| --------------------------------------------- | ------- | -------------------------------- | | [`input list`](/commands/docs/input_list) | Builtin | Interactive list selection. | | [`input listen`](/commands/docs/input_listen) | Builtin | Listen for user interface event. | diff --git a/src/content/docs/commands/docs/into.md b/src/content/docs/commands/docs/into.md index 2b1d64b685e..8c2e2c56fec 100644 --- a/src/content/docs/commands/docs/into.md +++ b/src/content/docs/commands/docs/into.md @@ -32,8 +32,8 @@ You must use one of the following subcommands. Using this command as-is will onl ## Subcommands: -| name | type | usage | -| ---------------------------------------------------- | ------- | ------------------------------------------ | +| name | type | usage | +| ------------------------------------------------- | ------- | ------------------------------------------ | | [`into binary`](/commands/docs/into_binary) | Builtin | Convert value to a binary primitive. | | [`into bits`](/commands/docs/into_bits) | Builtin | Convert value to a binary primitive. | | [`into bool`](/commands/docs/into_bool) | Builtin | Convert value to boolean. | diff --git a/src/content/docs/commands/docs/keybindings.md b/src/content/docs/commands/docs/keybindings.md index ab339ffbea1..a5395b00ac9 100644 --- a/src/content/docs/commands/docs/keybindings.md +++ b/src/content/docs/commands/docs/keybindings.md @@ -35,8 +35,8 @@ https://www.nushell.sh/book/line_editor.html ## Subcommands: -| name | type | usage | -| -------------------------------------------------------------- | ------- | -------------------------------------------------------------- | +| name | type | usage | +| ----------------------------------------------------------- | ------- | -------------------------------------------------------------- | | [`keybindings default`](/commands/docs/keybindings_default) | Builtin | List default keybindings. | | [`keybindings list`](/commands/docs/keybindings_list) | Builtin | List available options that can be used to create keybindings. | | [`keybindings listen`](/commands/docs/keybindings_listen) | Builtin | Get input from the user. | diff --git a/src/content/docs/commands/docs/math.md b/src/content/docs/commands/docs/math.md index 5cabddd6150..a17b1faa022 100644 --- a/src/content/docs/commands/docs/math.md +++ b/src/content/docs/commands/docs/math.md @@ -32,8 +32,8 @@ You must use one of the following subcommands. Using this command as-is will onl ## Subcommands: -| name | type | usage | -| -------------------------------------------------- | ------- | ------------------------------------------------------------------------------------- | +| name | type | usage | +| ----------------------------------------------- | ------- | ------------------------------------------------------------------------------------- | | [`math abs`](/commands/docs/math_abs) | Builtin | Returns the absolute value of a number. | | [`math arccos`](/commands/docs/math_arccos) | Builtin | Returns the arccosine of the number. | | [`math arccosh`](/commands/docs/math_arccosh) | Builtin | Returns the inverse of the hyperbolic cosine function. | diff --git a/src/content/docs/commands/docs/overlay.md b/src/content/docs/commands/docs/overlay.md index 45f1f36992c..5e7d9515457 100644 --- a/src/content/docs/commands/docs/overlay.md +++ b/src/content/docs/commands/docs/overlay.md @@ -35,8 +35,8 @@ You must use one of the following subcommands. Using this command as-is will onl ## Subcommands: -| name | type | usage | -| ------------------------------------------------ | ------- | -------------------------------------------- | +| name | type | usage | +| --------------------------------------------- | ------- | -------------------------------------------- | | [`overlay hide`](/commands/docs/overlay_hide) | Builtin | Hide an active overlay. | | [`overlay list`](/commands/docs/overlay_list) | Builtin | List all active overlays. | | [`overlay new`](/commands/docs/overlay_new) | Builtin | Create an empty overlay. | diff --git a/src/content/docs/commands/docs/path.md b/src/content/docs/commands/docs/path.md index e57012414bc..ae6e62d82c5 100644 --- a/src/content/docs/commands/docs/path.md +++ b/src/content/docs/commands/docs/path.md @@ -45,8 +45,8 @@ the path literal. ## Subcommands: -| name | type | usage | -| -------------------------------------------------------- | ------- | ----------------------------------------------------------------------- | +| name | type | usage | +| ----------------------------------------------------- | ------- | ----------------------------------------------------------------------- | | [`path basename`](/commands/docs/path_basename) | Builtin | Get the final component of a path. | | [`path dirname`](/commands/docs/path_dirname) | Builtin | Get the parent directory of a path. | | [`path exists`](/commands/docs/path_exists) | Builtin | Check whether a path exists. | diff --git a/src/content/docs/commands/docs/query.md b/src/content/docs/commands/docs/query.md index 6c1449039d9..872a5462c35 100644 --- a/src/content/docs/commands/docs/query.md +++ b/src/content/docs/commands/docs/query.md @@ -28,8 +28,8 @@ feature: default ## Subcommands: -| name | type | usage | -| -------------------------------------------- | -------------- | ---------------------------------------------------- | -------------------------- | +| name | type | usage | +| ----------------------------------------- | -------------- | ---------------------------------------------------- | -------------------------- | | [`query db`](/commands/docs/query_db) | Builtin | Query a database using SQL. | | [`query json`](/commands/docs/query_json) | Builtin,Plugin | execute json query on json file (open --raw \ | query json 'query string') | | [`query web`](/commands/docs/query_web) | Builtin,Plugin | execute selector query on html/web | diff --git a/src/content/docs/commands/docs/random.md b/src/content/docs/commands/docs/random.md index 12759a4dde9..ae73e07918e 100644 --- a/src/content/docs/commands/docs/random.md +++ b/src/content/docs/commands/docs/random.md @@ -32,8 +32,8 @@ You must use one of the following subcommands. Using this command as-is will onl ## Subcommands: -| name | type | usage | -| ------------------------------------------------ | ------- | -------------------------------------------------- | +| name | type | usage | +| --------------------------------------------- | ------- | -------------------------------------------------- | | [`random bool`](/commands/docs/random_bool) | Builtin | Generate a random boolean value. | | [`random chars`](/commands/docs/random_chars) | Builtin | Generate random chars. | | [`random dice`](/commands/docs/random_dice) | Builtin | Generate a random dice roll. | diff --git a/src/content/docs/commands/docs/roll.md b/src/content/docs/commands/docs/roll.md index 985358862e2..de47f83e155 100644 --- a/src/content/docs/commands/docs/roll.md +++ b/src/content/docs/commands/docs/roll.md @@ -36,8 +36,8 @@ You must use one of the following subcommands. Using this command as-is will onl ## Subcommands: -| name | type | usage | -| -------------------------------------------- | ------- | ---------------------------------- | +| name | type | usage | +| ----------------------------------------- | ------- | ---------------------------------- | | [`roll down`](/commands/docs/roll_down) | Builtin | Roll table rows down. | | [`roll left`](/commands/docs/roll_left) | Builtin | Roll record or table columns left. | | [`roll right`](/commands/docs/roll_right) | Builtin | Roll table columns right. | diff --git a/src/content/docs/commands/docs/scope.md b/src/content/docs/commands/docs/scope.md index 27c60e7392c..dd5dddb43c2 100644 --- a/src/content/docs/commands/docs/scope.md +++ b/src/content/docs/commands/docs/scope.md @@ -28,8 +28,8 @@ feature: default ## Subcommands: -| name | type | usage | -| ------------------------------------------------------------ | ------- | -------------------------------------------------------- | +| name | type | usage | +| --------------------------------------------------------- | ------- | -------------------------------------------------------- | | [`scope aliases`](/commands/docs/scope_aliases) | Builtin | Output info on the aliases in the current scope. | | [`scope commands`](/commands/docs/scope_commands) | Builtin | Output info on the commands in the current scope. | | [`scope engine-stats`](/commands/docs/scope_engine-stats) | Builtin | Output stats on the engine in the current state. | diff --git a/src/content/docs/commands/docs/seq.md b/src/content/docs/commands/docs/seq.md index 408935b2586..0b52e805787 100644 --- a/src/content/docs/commands/docs/seq.md +++ b/src/content/docs/commands/docs/seq.md @@ -80,7 +80,7 @@ sequence 1 to 5, then convert to a string with a pipe separator ## Subcommands: -| name | type | usage | -| ---------------------------------------- | ------- | ------------------------------------- | +| name | type | usage | +| ------------------------------------- | ------- | ------------------------------------- | | [`seq char`](/commands/docs/seq_char) | Builtin | Print a sequence of ASCII characters. | | [`seq date`](/commands/docs/seq_date) | Builtin | Print sequences of dates. | diff --git a/src/content/docs/commands/docs/skip.md b/src/content/docs/commands/docs/skip.md index 221eefbe2e9..dcd53d0c983 100644 --- a/src/content/docs/commands/docs/skip.md +++ b/src/content/docs/commands/docs/skip.md @@ -63,7 +63,7 @@ To skip specific numbered rows, try `drop nth`. To skip specific named columns, ## Subcommands: -| name | type | usage | -| -------------------------------------------- | ------- | ----------------------------------------------------- | +| name | type | usage | +| ----------------------------------------- | ------- | ----------------------------------------------------- | | [`skip until`](/commands/docs/skip_until) | Builtin | Skip elements of the input until a predicate is true. | | [`skip while`](/commands/docs/skip_while) | Builtin | Skip elements of the input while a predicate is true. | diff --git a/src/content/docs/commands/docs/split.md b/src/content/docs/commands/docs/split.md index f9bc132c0ed..258e60d971d 100644 --- a/src/content/docs/commands/docs/split.md +++ b/src/content/docs/commands/docs/split.md @@ -32,8 +32,8 @@ You must use one of the following subcommands. Using this command as-is will onl ## Subcommands: -| name | type | usage | -| ------------------------------------------------ | ------- | ------------------------------------------------------- | +| name | type | usage | +| --------------------------------------------- | ------- | ------------------------------------------------------- | | [`split chars`](/commands/docs/split_chars) | Builtin | Split a string into a list of characters. | | [`split column`](/commands/docs/split_column) | Builtin | Split a string into multiple columns using a separator. | | [`split list`](/commands/docs/split_list) | Builtin | Split a list into multiple lists using a separator. | diff --git a/src/content/docs/commands/docs/stor.md b/src/content/docs/commands/docs/stor.md index 111abe9a83e..577ed79235a 100644 --- a/src/content/docs/commands/docs/stor.md +++ b/src/content/docs/commands/docs/stor.md @@ -32,8 +32,8 @@ You must use one of the following subcommands. Using this command as-is will onl ## Subcommands: -| name | type | usage | -| ---------------------------------------------- | ------- | --------------------------------------------------------------------------- | +| name | type | usage | +| ------------------------------------------- | ------- | --------------------------------------------------------------------------- | | [`stor create`](/commands/docs/stor_create) | Builtin | Create a table in the in-memory sqlite database. | | [`stor delete`](/commands/docs/stor_delete) | Builtin | Delete a table or specified rows in the in-memory sqlite database. | | [`stor export`](/commands/docs/stor_export) | Builtin | Export the in-memory sqlite database to a sqlite database file. | diff --git a/src/content/docs/commands/docs/str.md b/src/content/docs/commands/docs/str.md index 69effaa3a77..20222ed9351 100644 --- a/src/content/docs/commands/docs/str.md +++ b/src/content/docs/commands/docs/str.md @@ -36,8 +36,8 @@ You must use one of the following subcommands. Using this command as-is will onl ## Subcommands: -| name | type | usage | -| ------------------------------------------------------------------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| name | type | usage | +| --------------------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------- | | [`str camel-case`](/commands/docs/str_camel-case) | Builtin | Convert a string to camelCase. | | [`str capitalize`](/commands/docs/str_capitalize) | Builtin | Capitalize first letter of text. | | [`str contains`](/commands/docs/str_contains) | Builtin | Checks if string input contains a substring. | diff --git a/src/content/docs/commands/docs/take.md b/src/content/docs/commands/docs/take.md index dbee4a1959a..1df15d43f2c 100644 --- a/src/content/docs/commands/docs/take.md +++ b/src/content/docs/commands/docs/take.md @@ -92,7 +92,7 @@ Return the first 3 elements of a range ## Subcommands: -| name | type | usage | -| -------------------------------------------- | ------- | ----------------------------------------------------- | +| name | type | usage | +| ----------------------------------------- | ------- | ----------------------------------------------------- | | [`take until`](/commands/docs/take_until) | Builtin | Take elements of the input until a predicate is true. | | [`take while`](/commands/docs/take_while) | Builtin | Take elements of the input while a predicate is true. | diff --git a/src/content/docs/commands/docs/to.md b/src/content/docs/commands/docs/to.md index a676d9a043e..bfeeb40834d 100644 --- a/src/content/docs/commands/docs/to.md +++ b/src/content/docs/commands/docs/to.md @@ -32,8 +32,8 @@ You must use one of the following subcommands. Using this command as-is will onl ## Subcommands: -| name | type | usage | -| -------------------------------------- | ------- | ------------------------------------------------------------- | +| name | type | usage | +| ----------------------------------- | ------- | ------------------------------------------------------------- | | [`to csv`](/commands/docs/to_csv) | Builtin | Convert table into .csv text . | | [`to html`](/commands/docs/to_html) | Builtin | Convert table into simple HTML. | | [`to json`](/commands/docs/to_json) | Builtin | Converts table data into JSON text. | diff --git a/src/content/docs/commands/docs/update.md b/src/content/docs/commands/docs/update.md index 6b3d3f2308a..2107702a155 100644 --- a/src/content/docs/commands/docs/update.md +++ b/src/content/docs/commands/docs/update.md @@ -95,6 +95,6 @@ Use a closure to compute a new value at an index ## Subcommands: -| name | type | usage | -| ------------------------------------------------ | ------- | ----------------------- | +| name | type | usage | +| --------------------------------------------- | ------- | ----------------------- | | [`update cells`](/commands/docs/update_cells) | Builtin | Update the table cells. | diff --git a/src/content/docs/commands/docs/url.md b/src/content/docs/commands/docs/url.md index 7c66fb3bf91..655dd6d3d00 100644 --- a/src/content/docs/commands/docs/url.md +++ b/src/content/docs/commands/docs/url.md @@ -32,8 +32,8 @@ You must use one of the following subcommands. Using this command as-is will onl ## Subcommands: -| name | type | usage | -| ------------------------------------------------------ | ------- | --------------------------------------------------------------------- | +| name | type | usage | +| --------------------------------------------------- | ------- | --------------------------------------------------------------------- | | [`url build-query`](/commands/docs/url_build-query) | Builtin | Converts record or table into query string applying percent-encoding. | | [`url decode`](/commands/docs/url_decode) | Builtin | Converts a percent-encoded web safe string to a string. | | [`url encode`](/commands/docs/url_encode) | Builtin | Converts a string to a percent encoded web safe string. | diff --git a/src/content/docs/commands/docs/view.md b/src/content/docs/commands/docs/view.md index 933caac4dc5..3728ec6add9 100644 --- a/src/content/docs/commands/docs/view.md +++ b/src/content/docs/commands/docs/view.md @@ -32,8 +32,8 @@ You must use one of the following subcommands. Using this command as-is will onl ## Subcommands: -| name | type | usage | -| ---------------------------------------------- | ------- | ---------------------------------------------------------- | +| name | type | usage | +| ------------------------------------------- | ------- | ---------------------------------------------------------- | | [`view files`](/commands/docs/view_files) | Builtin | View the files registered in nushell's EngineState memory. | | [`view source`](/commands/docs/view_source) | Builtin | View a block, module, or a definition. | | [`view span`](/commands/docs/view_span) | Builtin | View the contents of a span. | From 1c829c167a660eaad28dac23c4ea5fa34b67848b Mon Sep 17 00:00:00 2001 From: Jacob Lamb Date: Mon, 12 Feb 2024 13:15:10 -0800 Subject: [PATCH 16/72] Add blog --- astro.config.mjs | 5 +---- src/components/GetBlogPosts.astro | 14 ++++++++++++++ .../docs/blog/2019-08-23-introducing-nushell.md | 16 ++++++++-------- .../docs/blog/2019-09-24-nushell_0_3_0.md | 6 +++--- .../docs/blog/2019-10-15-nushell-0_4_0.md | 4 ++-- .../blog/2019-11-23-nushell-survey-results.md | 12 ++++++------ .../docs/blog/2019-11-26-nushell-0_6_0.md | 2 +- .../docs/blog/2019-12-31-happy-nu-year-2020.md | 2 +- .../docs/blog/2020-01-28-nushell-0_9_0.md | 2 +- .../docs/blog/2020-03-31-nushell_0_12_0.md | 2 +- .../docs/blog/2020-05-12-nushell_0_14_0.md | 2 +- .../docs/blog/2020-06-09-nushell_0_15_0.md | 2 +- .../docs/blog/2020-06-30-nushell_0_16_0.md | 10 +++++----- .../docs/blog/2020-07-21-nushell_0_17_0.md | 2 +- .../docs/blog/2020-08-23-year_of_nushell.md | 2 +- src/content/docs/blog/2020-09-01-nushell_0_19.md | 6 +++--- src/content/docs/blog/2020-10-13-nushell_0_21.md | 4 ++-- src/content/docs/blog/2020-11-03-nushell_0_22.md | 2 +- src/content/docs/blog/2020-11-24-nushell_0_23.md | 2 +- src/content/docs/blog/2021-04-20-nushell_0_30.md | 2 +- src/content/docs/blog/2021-06-22-nushell_0_33.md | 2 +- .../docs/blog/2021-08-23-two-years-of-nushell.md | 16 ++++++++-------- src/content/docs/blog/2021-08-24-nushell_0_36.md | 2 +- src/content/docs/blog/2021-09-14-nushell_0_37.md | 4 ++-- src/content/docs/blog/2022-03-22-nushell_0_60.md | 16 ++++++++-------- src/content/docs/blog/2022-04-12-nushell_0_61.md | 4 ++-- src/content/docs/blog/2022-08-16-nushell-0_67.md | 6 +++--- src/content/docs/blog/2022-10-18-nushell-0_70.md | 2 +- src/content/docs/blog/2022-11-08-nushell-0.71.md | 4 ++-- src/content/docs/blog/2022-11-29-nushell-0.72.md | 2 +- src/content/docs/blog/2022-12-20-nushell-0.73.md | 2 +- src/content/docs/blog/2023-01-10-nushell_0_74.md | 4 ++-- src/content/docs/blog/2023-01-31-nushell_0_75.md | 2 +- src/content/docs/blog/2023-02-21-nushell_0_76.md | 10 +++++----- src/content/docs/blog/2023-04-25-nushell_0_79.md | 2 +- .../docs/blog/2023-08-22-nushell_0_84_0.md | 4 ++-- .../blog/2023-08-23-happy-birthday-nushell-4.md | 8 ++++---- src/content/docs/blog/2023-10-17-nushell_0_86.md | 2 +- .../2023-11-16-nushell-2023-survey-results.md | 10 +++++----- src/content/docs/blog/2023-12-21-logo-contest.md | 6 +++--- src/content/docs/blog/README.md | 13 ------------- src/content/docs/blog/index.mdx | 7 +++++++ .../docs/book/stdout_stderr_exit_codes.md | 2 +- src/content/docs/index.mdx | 6 +++--- 44 files changed, 120 insertions(+), 115 deletions(-) create mode 100644 src/components/GetBlogPosts.astro delete mode 100644 src/content/docs/blog/README.md create mode 100644 src/content/docs/blog/index.mdx diff --git a/astro.config.mjs b/astro.config.mjs index 5e38374e400..5222d4af8cd 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -160,10 +160,7 @@ export default defineConfig({ }, { label: "Blog", - items: [ - { label: "Introduction", link: "/introduction/" }, - { label: "Getting Started", link: "/book/getting_started/" }, - ], + link: "/blog/", }, ], }), diff --git a/src/components/GetBlogPosts.astro b/src/components/GetBlogPosts.astro new file mode 100644 index 00000000000..07db984b209 --- /dev/null +++ b/src/components/GetBlogPosts.astro @@ -0,0 +1,14 @@ +--- +const posts = await Astro.glob("../content/docs/blog/*.md"); // returns an array of posts that live at ./src/pages/post/*.md +--- +
diff --git a/src/content/docs/blog/2019-08-23-introducing-nushell.md b/src/content/docs/blog/2019-08-23-introducing-nushell.md index 1ccc2cb34b9..fa4bd33d645 100644 --- a/src/content/docs/blog/2019-08-23-introducing-nushell.md +++ b/src/content/docs/blog/2019-08-23-introducing-nushell.md @@ -14,7 +14,7 @@ It's called Nushell, or just Nu for short. We have a [book](https://book.nushell This release was made by Jonathan Turner (me), Yehuda Katz, and Andrés Robalino, with contributions from Odin Dutton. -![Nu in action](../assets/images/nushell-autocomplete4.gif) +![Nu in action](/assets/images/nushell-autocomplete4.gif) # But why? @@ -28,19 +28,19 @@ In this post, I'll talk about how a few simple ideas drive how Nu works, what Nu To Nu, everything is data. When you type `ls`, you're given a table of information about the directory you're listing: -![ls command](../assets/images/nu_ls.png) +![ls command](/assets/images/nu_ls.png) Rather than having to remember different flags to `ls`, we can just work with the data it gives back. We can find the files greater than a certain size: -![ls with filtering](../assets/images/nu_ls_filter.png) +![ls with filtering](/assets/images/nu_ls_filter.png) Or we could choose to sort it by a column, or only show directories, or more. That by itself is fun but perhaps not compelling enough. -![ps with filtering](../assets/images/nu_ps_filter.png) +![ps with filtering](/assets/images/nu_ps_filter.png) Where this simple concept - that everything in Nu is data - starts to shine when we try other commands and realize that we're using the same commands to filter, to sort, etc. Rather than having the need to remember all the parameters to all the commands, we can just use the same verbs to act over our data, regardless of where the data came from. Nu pushes this idea even further. -![opening toml file](../assets/images/open_cargo.png) +![opening toml file](/assets/images/open_cargo.png) Nu also understands structured text files like JSON, TOML, YAML, and more. Opening these files gives us the same tables we saw with `ls` and `ps`. Again, this lets us use the same commands to filter our data, explore it, and use it. @@ -216,19 +216,19 @@ You can see that we can mix-and-match commands that are inside of Nu with those As we built Nu, we realized we could experiment with other parts of how a shell works. The first of these experiments lead us to an observation: if everything is data in Nu, we should be able to view this data. -![viewing source file](../assets/images/view_source.png) +![viewing source file](/assets/images/view_source.png) We've seen the tables. Nu also supports opening and looking at text and binary data. If we open a source file, we can scroll around in a syntax-highlighted file. If we open an xml, we can look at its data. We can even open a binary file and look at what's inside (hint: there's even a fun easter egg if you open certain kinds binary files, especially if you've installed Nu with the optional `rawkey` feature). Being able to view data is helpful, and this kind of polish extends to other aspects, like error messages: -![simple error](../assets/images/nu_error2.png) +![simple error](/assets/images/nu_error2.png) Nu takes heavy inspiration from the [error messages in Rust](https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come). As much as possible, draw your eyes to the problem. Combined with the pipeline, some pretty interesting errors are possible: -![error with metadata](../assets/images/nu_error_metadata.png) +![error with metadata](/assets/images/nu_error_metadata.png) You might wonder how does that even work. Nu has a metadata system (still early!) that you can read about in the [Metadata chapter](https://book.nushell.sh/en/metadata) of the [Nu book](https://book.nushell.sh). Let's just take a quick peek at it: diff --git a/src/content/docs/blog/2019-09-24-nushell_0_3_0.md b/src/content/docs/blog/2019-09-24-nushell_0_3_0.md index 514771411ad..eca07559bc6 100644 --- a/src/content/docs/blog/2019-09-24-nushell_0_3_0.md +++ b/src/content/docs/blog/2019-09-24-nushell_0_3_0.md @@ -20,11 +20,11 @@ Nu 0.3.0 is available as [pre-built binaries](https://github.com/nushell/nushell ## New table design (Porges, jonathandturner) -![Table with utf8 box drawing](../assets/images/utf8_table.png) +![Table with utf8 box drawing](/assets/images/utf8_table.png) One of the most striking differences is that Nu now uses UTF-8 box drawing to draw its tables. -![Table with utf8 box drawing in light mode](../assets/images/utf8_light_table.png) +![Table with utf8 box drawing in light mode](/assets/images/utf8_light_table.png) The table is also configurable. If you feel like the table is a bit too heavy, you can also configure it to work in light mode using this command: @@ -53,7 +53,7 @@ Since the 0.2.0 release, Nu has gained a set of additional commands, including: ## Error improvements (jonathandturner) -![Improve error messages](../assets/images/did_you_mean.png) +![Improve error messages](/assets/images/did_you_mean.png) We've made steady progress on improving error messages. Recently, we added "did you mean?" errors to help when you mistype the name of columns. Nu 0.3.0 also has gone through a few passes to generally polish the errors to include more information when an error occurs. diff --git a/src/content/docs/blog/2019-10-15-nushell-0_4_0.md b/src/content/docs/blog/2019-10-15-nushell-0_4_0.md index 34ad388faf1..feced62da07 100644 --- a/src/content/docs/blog/2019-10-15-nushell-0_4_0.md +++ b/src/content/docs/blog/2019-10-15-nushell-0_4_0.md @@ -20,14 +20,14 @@ Nu 0.4.0 is available as [pre-built binaries](https://github.com/nushell/nushell ## New Colors (wycats) -![Example of nushell](../assets/images/0_4_0_new_colors.png) +![Example of nushell](/assets/images/0_4_0_new_colors.png) New colors! With 0.4.0, we're adding some new colors to show off different types of the command, where errors might be happening, and if the command is internal or external. The coloring is just the tip of the iceberg, as it were, and builds from a reworking of the parser to make it more accurate, more stable, and more feature-complete. ## Streaming table (jonathandturner) -![Animation of a long table streaming out](../assets/images/0_4_0_streaming_table.gif) +![Animation of a long table streaming out](/assets/images/0_4_0_streaming_table.gif) Streaming tables Up to this point, we've taken a few shortcuts with how streams worked in Nushell. We knew that a table, in theory, was a stream of rows. In practice, though, this wasn't the case as the code has lots of assumptions about how tables worked. diff --git a/src/content/docs/blog/2019-11-23-nushell-survey-results.md b/src/content/docs/blog/2019-11-23-nushell-survey-results.md index 088c4df97cf..45f1c9206ab 100644 --- a/src/content/docs/blog/2019-11-23-nushell-survey-results.md +++ b/src/content/docs/blog/2019-11-23-nushell-survey-results.md @@ -14,7 +14,7 @@ In total, **160** people responded. An impressive amount for a project still in # Do you use Nu? -![63.1% don't use, 24.4% use but stopped, 12.5% use](../assets/images/nushell_survey_2019_percent.png) +![63.1% don't use, 24.4% use but stopped, 12.5% use](/assets/images/nushell_survey_2019_percent.png) The survey welcomed both users and non-users of Nu. In our first question, we wanted to see how many folks are using Nu already. Perhaps unsurprising for a project still missing major functionality, most respondents aren't users, yet. As we'll see, there are themes around what people are waiting for before they jump in. @@ -24,7 +24,7 @@ But first, let's take a look at the responses from folks how are currently using ## What do you like? (20 responses) -![favorite features (tables #1 by a long margin)](../assets/images/nushell_survey_2019_fave_features.png) +![favorite features (tables #1 by a long margin)](/assets/images/nushell_survey_2019_fave_features.png) Overwhelmingly, Nu users love tables! People currently using Nushell felt that tables and Nu's structured approach were their favorite features. @@ -40,7 +40,7 @@ Other topics mentioned: syntax highlighting, good plugins, shells feature, tags ## Where should Nushell improve? (20 responses) -![needs work: top ones are autocomplete, shortcuts, tool integration](../assets/images/nushell_survey_2019_needs_work.png) +![needs work: top ones are autocomplete, shortcuts, tool integration](/assets/images/nushell_survey_2019_needs_work.png) Nu users also pointed out a few areas where they hoped Nu would improve over time. Top of mind were improvements around auto-completion, improving the keyboard shortcuts, and better integration with existing shells and tools. @@ -57,7 +57,7 @@ There were also a batch of additional improvements people wished for: full scrip ## What's stopping you from using Nu? (100 responses) -![blocked adoption: top ones are time and maturity](../assets/images/nushell_survey_2019_blockers.png) +![blocked adoption: top ones are time and maturity](/assets/images/nushell_survey_2019_blockers.png) We also asked for feedback from people not using Nu what their thoughts were. What are the kinds of things that block them from using Nu? @@ -74,7 +74,7 @@ We also heard from many people who were perfectly comfortable in their current s ## Used Nu but stopped (38 responses) -![made me stop: top ones are maturity, time, and don't need it](../assets/images/nushell_survey_2019_stoppers.png) +![made me stop: top ones are maturity, time, and don't need it](/assets/images/nushell_survey_2019_stoppers.png) For those folks who tried Nu, but decided it wasn't for them, we also gave them a chance to tell us why. Similarly to the previous question, "stability" and "time" were at the top of the list. @@ -90,7 +90,7 @@ Other topics that came up: needing better autocomplete, needing aliases, better # Anything else we should know? (68 responses) -![so much love](../assets/images/nushell_survey_2019_anything_else.png) +![so much love](/assets/images/nushell_survey_2019_anything_else.png) As our final question, we gave responders a chance to give us any last thoughts they felt we should know. diff --git a/src/content/docs/blog/2019-11-26-nushell-0_6_0.md b/src/content/docs/blog/2019-11-26-nushell-0_6_0.md index d3249c3a79c..b1c4954cfb2 100644 --- a/src/content/docs/blog/2019-11-26-nushell-0_6_0.md +++ b/src/content/docs/blog/2019-11-26-nushell-0_6_0.md @@ -18,7 +18,7 @@ Nu 0.6.0 is available as [pre-built binaries](https://github.com/nushell/nushell # Starship support (Southclaws, jonathandturner) -![Example of starship prompt](../assets/images/0_6_0_starship_prompt.png) +![Example of starship prompt](/assets/images/0_6_0_starship_prompt.png) _Welcome to the starship!_ Having a configurable prompt has been a regularly requested feature, dating back to our first release of Nu. With 0.6.0, we're excited to show off the ability to integrate with [starship](https://starship.rs/). Starship is a powerful prompt being built in Rust, and it includes tons of fun features. diff --git a/src/content/docs/blog/2019-12-31-happy-nu-year-2020.md b/src/content/docs/blog/2019-12-31-happy-nu-year-2020.md index 315a9f0275c..af899e75490 100644 --- a/src/content/docs/blog/2019-12-31-happy-nu-year-2020.md +++ b/src/content/docs/blog/2019-12-31-happy-nu-year-2020.md @@ -8,7 +8,7 @@ excerpt: 2019 was quite the year for Nushell. We landed the initial commit on Ma # Happy Nu Year 2020 -![Happy Nu Year!](../assets/images/happy_nu_year_2020.png) +![Happy Nu Year!](/assets/images/happy_nu_year_2020.png) 2019 was quite the year for Nushell. We landed the initial commit on May 10th, and 1881 commits later we find ourselves at the end of 2019. What all happened this year? diff --git a/src/content/docs/blog/2020-01-28-nushell-0_9_0.md b/src/content/docs/blog/2020-01-28-nushell-0_9_0.md index 2aeb30dd0e3..ac110bdca4d 100644 --- a/src/content/docs/blog/2020-01-28-nushell-0_9_0.md +++ b/src/content/docs/blog/2020-01-28-nushell-0_9_0.md @@ -28,7 +28,7 @@ One of the first things a user might do in a new shell is to type a familiar com ## Better error feedback (wycats, andrasio) -![Better inline errors!](../assets/images/0_9_0_error_highlight.png) +![Better inline errors!](/assets/images/0_9_0_error_highlight.png) Our improvements to the parser as part of 0.9.0 also come with some fun perks. One of these is that unknown flags, and similar errors, will now get highlighted red to let you know that this isn't a valid input to the command. diff --git a/src/content/docs/blog/2020-03-31-nushell_0_12_0.md b/src/content/docs/blog/2020-03-31-nushell_0_12_0.md index d3e2ccb0b96..ef6c93a782a 100644 --- a/src/content/docs/blog/2020-03-31-nushell_0_12_0.md +++ b/src/content/docs/blog/2020-03-31-nushell_0_12_0.md @@ -60,7 +60,7 @@ We've been hard at work at improving how we read in unstructured data. In this r ## Jupyter notebook support (jonathandturner) -![image of Nu in Jupyter notebook](../assets/images/0_12_0_jupyter.png) +![image of Nu in Jupyter notebook](/assets/images/0_12_0_jupyter.png) Nu's core design goal is that it should be easier to work with your system and your data. In this release, we take a step beyond being just a shell with [Jupyter notebook support](https://github.com/nushell/nu_jupyter). diff --git a/src/content/docs/blog/2020-05-12-nushell_0_14_0.md b/src/content/docs/blog/2020-05-12-nushell_0_14_0.md index 60eb86f1400..e9d4580d10d 100644 --- a/src/content/docs/blog/2020-05-12-nushell_0_14_0.md +++ b/src/content/docs/blog/2020-05-12-nushell_0_14_0.md @@ -68,7 +68,7 @@ You can pass in flags to give you additional columns for the year, month, and ev A last minute update also gave us a big improvement in our built-in help. Starting with 0.14, we'll now have examples as part of the help commands can use: -![image of new command help with colored example](../assets/images/0_14_0_help_examples.png) +![image of new command help with colored example](/assets/images/0_14_0_help_examples.png) We're working to add examples to all commands. If that's something you're interested in helping with, come join us on [discord](https://discord.gg/NtAbbGn). diff --git a/src/content/docs/blog/2020-06-09-nushell_0_15_0.md b/src/content/docs/blog/2020-06-09-nushell_0_15_0.md index 25f7a83b36a..0ca306738ea 100644 --- a/src/content/docs/blog/2020-06-09-nushell_0_15_0.md +++ b/src/content/docs/blog/2020-06-09-nushell_0_15_0.md @@ -81,7 +81,7 @@ My current history path is /home/jonathant/.local/share/nu/history.txt We've switched from language-reporting to codespan, giving us nicer looking errors: -![image of a prettier error message](../assets/images/0_15_0_prettier_errors.png) +![image of a prettier error message](/assets/images/0_15_0_prettier_errors.png) ## Big history by default (aeosynth, lightclient) diff --git a/src/content/docs/blog/2020-06-30-nushell_0_16_0.md b/src/content/docs/blog/2020-06-30-nushell_0_16_0.md index 4923911c349..8be745766d3 100644 --- a/src/content/docs/blog/2020-06-30-nushell_0_16_0.md +++ b/src/content/docs/blog/2020-06-30-nushell_0_16_0.md @@ -82,7 +82,7 @@ You can make the prompt even fancier. For example, this prompt prints the curren > config --set [prompt 'echo [ $(ansi green) $(pwd) $(ansi reset) $(do -i {git rev-parse --abbrev-ref HEAD } | trim | echo [ "(" $(ansi blue) $it $(ansi reset) ")" ] | str join) $(char newline) $(ansi cyan) $(date --format "%d/%m/%Y %H:%M:%S").formatted $(ansi reset) "> " ]'] ``` -![image of full prompt](../assets/images/0_16_0_prompt_3.png) +![image of full prompt](/assets/images/0_16_0_prompt_3.png) _Example of full prompt_ @@ -94,7 +94,7 @@ Or update your prompt to show an abbreviated path: (note: the above assumes Unix-based systems, so on Windows use "\" as the path separator)) -![image of abbreviated prompt](../assets/images/0_16_0_prompt_4.png) +![image of abbreviated prompt](/assets/images/0_16_0_prompt_4.png) _Example of abbreviated prompt_ @@ -116,17 +116,17 @@ To enable starship, set the `use_starship` setting: With 0.16.0, we now use a new table drawing algorithm. Here's the before and after for comparison: -![image of a table before](../assets/images/0_16_0_before_table.png) +![image of a table before](/assets/images/0_16_0_before_table.png) _Table drawn with 0.15.0_ -![image of a table before](../assets/images/0_16_0_after_table.png) +![image of a table before](/assets/images/0_16_0_after_table.png) _Table drawn with 0.16.0_ If you're struggling to see much difference, that's a good thing! Where you'll really see the difference is in the time it takes to draw these tables: -![image of a table before](../assets/images/0_16_0_rendering_time.png) +![image of a table before](/assets/images/0_16_0_rendering_time.png) _0.16.0 renders tables 40% faster than 0.15.0_ diff --git a/src/content/docs/blog/2020-07-21-nushell_0_17_0.md b/src/content/docs/blog/2020-07-21-nushell_0_17_0.md index 191c8de4c2b..a66b803c160 100644 --- a/src/content/docs/blog/2020-07-21-nushell_0_17_0.md +++ b/src/content/docs/blog/2020-07-21-nushell_0_17_0.md @@ -24,7 +24,7 @@ As part of this release, we also publish a set of plugins you can install and us ## WebAssembly support (jonathandturner) and upcoming wasm-based playground (jzaefferer, jonathandturner) -![image of a wasm-based Nushell playground](../assets/images/0_17_0_playground.png) +![image of a wasm-based Nushell playground](/assets/images/0_17_0_playground.png) _Nu, now in your browser_ diff --git a/src/content/docs/blog/2020-08-23-year_of_nushell.md b/src/content/docs/blog/2020-08-23-year_of_nushell.md index 696eef73476..1a180a5061b 100644 --- a/src/content/docs/blog/2020-08-23-year_of_nushell.md +++ b/src/content/docs/blog/2020-08-23-year_of_nushell.md @@ -196,7 +196,7 @@ In addition to kebab case, you can use `?` as part of the identifier, allowing n Nushell currently sits at just over 55k lines of code, built from almost 1300 merged pull requests. -![image of a Nu growing from under 20000 lines of code to over 55000 lines of code](../assets/images/year_1_kloc.png) +![image of a Nu growing from under 20000 lines of code to over 55000 lines of code](/assets/images/year_1_kloc.png) _Growth in code size with each version_ diff --git a/src/content/docs/blog/2020-09-01-nushell_0_19.md b/src/content/docs/blog/2020-09-01-nushell_0_19.md index 66f19cf835e..159a066e70f 100644 --- a/src/content/docs/blog/2020-09-01-nushell_0_19.md +++ b/src/content/docs/blog/2020-09-01-nushell_0_19.md @@ -24,7 +24,7 @@ As part of this release, we also publish a set of plugins you can install and us ## New completion engine (thegedge) -![animation of Nu completion](../assets/images/0_19_autocomplete.gif) +![animation of Nu completion](/assets/images/0_19_autocomplete.gif) Nushell's completion suggestions are now built around the nushell parser. This means completers can now use a much richer context to provide relevant suggestions. This is still a work in progress, but one immediate improvement is that we can now complete commands, flags, and arguments in most nested structures. For example, `echo $(l` will show you all commands that start with l. @@ -32,13 +32,13 @@ The completion work is still very "new", with parts landing in the hours before ## Improved theming (fdncred) -![image of a Nu table built with hearts](../assets/images/0_19_heart_theme.png) +![image of a Nu table built with hearts](/assets/images/0_19_heart_theme.png) _Nu, with love_ We're continuing to expand what's possible with Nu's themes, allowing you to configure more areas of how your data is displayed. -![image of a Nu table custom colors](../assets/images/0_19_table_colors.png) +![image of a Nu table custom colors](/assets/images/0_19_table_colors.png) You can also configure how the various Nu data types are displayed. You can learn about the [new custom data colors](https://github.com/nushell/nushell/pull/2449) if you're interested in configuring them for yourself. There's also and example `config.toml` [here](https://github.com/nushell/nushell/blob/main/docs/sample_config/config.toml) with an example of how to set the colors you like. diff --git a/src/content/docs/blog/2020-10-13-nushell_0_21.md b/src/content/docs/blog/2020-10-13-nushell_0_21.md index 27e0badbab5..4ce4814d434 100644 --- a/src/content/docs/blog/2020-10-13-nushell_0_21.md +++ b/src/content/docs/blog/2020-10-13-nushell_0_21.md @@ -26,7 +26,7 @@ As part of this release, we also publish a set of plugins you can install and us ### Charting (andrasio) -![animation of building different types of bar charts](../assets/images/0_21_bar_charts.gif) +![animation of building different types of bar charts](/assets/images/0_21_bar_charts.gif) _New charting functionality_ @@ -38,7 +38,7 @@ Here's an example of using `chart` to chart out contributions to a git repositor > git log "--pretty=format:%h%aN%s%aD" | lines | split column "" sha1 author desc merged_at | where author == "Andrés N. Robalino" | update merged_at { get merged_at | str to-datetime } | reverse | chart line merged_at -f "%b-%Y" ``` -![line chart of github contributions](../assets/images/0_21_line_chart.png) +![line chart of github contributions](/assets/images/0_21_line_chart.png) _Line chart of GitHub contributions_ diff --git a/src/content/docs/blog/2020-11-03-nushell_0_22.md b/src/content/docs/blog/2020-11-03-nushell_0_22.md index ed31b7381d7..1648776ec25 100644 --- a/src/content/docs/blog/2020-11-03-nushell_0_22.md +++ b/src/content/docs/blog/2020-11-03-nushell_0_22.md @@ -28,7 +28,7 @@ As part of this release, we also publish a set of plugins you can install and us ### The `flatten` command (andrasio) -![animation of using the flatten command](../assets/images/0_22_flatten.gif) +![animation of using the flatten command](/assets/images/0_22_flatten.gif) _New flatten command_ diff --git a/src/content/docs/blog/2020-11-24-nushell_0_23.md b/src/content/docs/blog/2020-11-24-nushell_0_23.md index f0a103a0026..08c5a91a52b 100644 --- a/src/content/docs/blog/2020-11-24-nushell_0_23.md +++ b/src/content/docs/blog/2020-11-24-nushell_0_23.md @@ -26,7 +26,7 @@ As part of this release, we also publish a set of plugins you can install and us ## New website (ibraheemdev) -![picture of the new Nushell website](../assets/images/0_23_website.png) +![picture of the new Nushell website](/assets/images/0_23_website.png) _The new website_ diff --git a/src/content/docs/blog/2021-04-20-nushell_0_30.md b/src/content/docs/blog/2021-04-20-nushell_0_30.md index 3f45a586cdf..81d5b0551fd 100644 --- a/src/content/docs/blog/2021-04-20-nushell_0_30.md +++ b/src/content/docs/blog/2021-04-20-nushell_0_30.md @@ -28,7 +28,7 @@ As part of this release, we also publish a set of plugins you can install and us ## Performance improvements (jonathandturner) -![image of the 0.30 release being 8-20 times faster than 0.29](../assets/images/0_30_0_speed.png) +![image of the 0.30 release being 8-20 times faster than 0.29](/assets/images/0_30_0_speed.png) _Nu, now noticeably faster_ diff --git a/src/content/docs/blog/2021-06-22-nushell_0_33.md b/src/content/docs/blog/2021-06-22-nushell_0_33.md index b04aaf182aa..abac4487c05 100644 --- a/src/content/docs/blog/2021-06-22-nushell_0_33.md +++ b/src/content/docs/blog/2021-06-22-nushell_0_33.md @@ -55,7 +55,7 @@ You can add back in the ignore ability using the new `ignore` command, which wil ## Syntax highlighting themes (fdncred) -![image of syntax highlighting themes in Nushell](../assets/images/0_32_themes.png) +![image of syntax highlighting themes in Nushell](/assets/images/0_32_themes.png) _Nu, with configurable colors_ diff --git a/src/content/docs/blog/2021-08-23-two-years-of-nushell.md b/src/content/docs/blog/2021-08-23-two-years-of-nushell.md index d07c207ce14..367f5cf03ba 100644 --- a/src/content/docs/blog/2021-08-23-two-years-of-nushell.md +++ b/src/content/docs/blog/2021-08-23-two-years-of-nushell.md @@ -8,7 +8,7 @@ excerpt: Happy birthday, Nushell! Today mark's the second year for Nushell. # Two years of Nushell -![Stock cake photo with a 2](../assets/images/two_year_cake.png) +![Stock cake photo with a 2](/assets/images/two_year_cake.png) _Happy birthday, Nushell!_ @@ -26,7 +26,7 @@ Nushell (sometimes shortened to just Nu) is a language that allows you to easily We've started collecting examples to share with each other as Nushell grows and our skill with it grows with it. You can check them out in the [Nu Scripts repo](https://github.com/nushell/nu_scripts). -![Dark theme vscode showing Nushell](../assets/images/two_year_vscode.png) +![Dark theme vscode showing Nushell](/assets/images/two_year_vscode.png) To work with Nushell, we also published a [vscode extension](https://marketplace.visualstudio.com/items?itemName=TheNuProjectContributors.vscode-nushell-lang). @@ -54,19 +54,19 @@ One example that shows this off is the script we use every week to create the Th We're seeing a growing amount of love for Nushell as more people try it and share their experiences. Here are some tweets from the last few weeks: -![Oh damn @nu_shell is awesome. It's a really powerful advancement over existing shells on unix!](../assets/images/two_year_tweet1.png) +![Oh damn @nu_shell is awesome. It's a really powerful advancement over existing shells on unix!](/assets/images/two_year_tweet1.png) -![The pandas style dataframe feature in nushell is Exploding head♥](../assets/images/two_year_tweet2.png) +![The pandas style dataframe feature in nushell is Exploding head♥](/assets/images/two_year_tweet2.png) -![@nu_shell has fundamentally changed the way I interact with data on my computer. It's no longer a process to get anything out of a csv, etc. It's just... there. however I want it served up.](../assets/images/two_year_tweet3.png) +![@nu_shell has fundamentally changed the way I interact with data on my computer. It's no longer a process to get anything out of a csv, etc. It's just... there. however I want it served up.](/assets/images/two_year_tweet3.png) -![Acabo de probar el @nu_shell y estoy enamorao](../assets/images/two_year_tweet4.png) +![Acabo de probar el @nu_shell y estoy enamorao](/assets/images/two_year_tweet4.png) -![Nu Shell is amazing. I can’t believe it took me this long to find it.](../assets/images/two_year_tweet5.png) +![Nu Shell is amazing. I can’t believe it took me this long to find it.](/assets/images/two_year_tweet5.png) The Nushell repo has also felt a recent surge of interest. Since this time last year, the number of stars has nearly doubled! -![image of with the number of GitHub stars doubling over the last year](../assets/images/two_year_stars.png) +![image of with the number of GitHub stars doubling over the last year](/assets/images/two_year_stars.png) _Growing interest in Nushell (shown: number of GitHub stars)_ diff --git a/src/content/docs/blog/2021-08-24-nushell_0_36.md b/src/content/docs/blog/2021-08-24-nushell_0_36.md index 046b36b1466..c89e9e7b27a 100644 --- a/src/content/docs/blog/2021-08-24-nushell_0_36.md +++ b/src/content/docs/blog/2021-08-24-nushell_0_36.md @@ -47,7 +47,7 @@ You can now use `help -f ` and search the help for text. This can come in In addition to the new help search, we've also started to build out a built-in Nushell tutorial. You can navigate by topic or search the help text for a string. -![Screenshot showing the tutor command running 'tutor table'](../assets/images/0_36_tutor.png) +![Screenshot showing the tutor command running 'tutor table'](/assets/images/0_36_tutor.png) We've only added a few topics so far, but we hope to grow these topics (with your help) over the coming releases. diff --git a/src/content/docs/blog/2021-09-14-nushell_0_37.md b/src/content/docs/blog/2021-09-14-nushell_0_37.md index 4756777c9fe..e2daa3c39af 100644 --- a/src/content/docs/blog/2021-09-14-nushell_0_37.md +++ b/src/content/docs/blog/2021-09-14-nushell_0_37.md @@ -26,7 +26,7 @@ As part of this release, we also publish a set of plugins you can install and us ## `find`ing data in tables -![Screenshot showing using the new find command to find the phrase toml in a table](../assets/images/0_37_find.png) +![Screenshot showing using the new find command to find the phrase toml in a table](/assets/images/0_37_find.png) In 0.37, you now have access to a new `find` command, which can help you quickly look for data across all columns in a table. @@ -67,7 +67,7 @@ As you can see, we're taking full advantage of the opportunity to fix long-stand Oh, there is one more thing. -![Animated gif showing off dynaming git branch completions](../assets/images/eq_git_branch_completion.gif) +![Animated gif showing off dynaming git branch completions](/assets/images/eq_git_branch_completion.gif) A big motivator for the rewrite was to make it easier to add dynamic custom completions, like the kind you use when completing a git branch while doing `git checkout`. The above gif shows a very early prototype of how we might implement this using the engine-q system. It works by running actually nushell code at completion time, getting the list of git branches as a list, and handing that list back to the completion system. diff --git a/src/content/docs/blog/2022-03-22-nushell_0_60.md b/src/content/docs/blog/2022-03-22-nushell_0_60.md index 46868dd79c6..bebd73c9300 100644 --- a/src/content/docs/blog/2022-03-22-nushell_0_60.md +++ b/src/content/docs/blog/2022-03-22-nushell_0_60.md @@ -40,7 +40,7 @@ Let's talk about the features new in this release. # Custom completions -![Custom completions for git and winget](../assets/images/0_60_completions.gif) +![Custom completions for git and winget](/assets/images/0_60_completions.gif) Let's start with Nushell's most-requested feature: custom completions. The long-awaited, long-requested feature of having nice completions is finally here. With 0.60, you'll be able to write scripts that help you complete parameters and flag values. Let's take a look at an example. When you create a new config, you'll see a section like this: @@ -80,7 +80,7 @@ When you first start up Nushell, you'll be asked if you'd like to create a defau # Table improvements -![Better tables](../assets/images/0_60_ls_colors.png) +![Better tables](/assets/images/0_60_ls_colors.png) Tables can now be configured to show a footer with the column names. @@ -498,7 +498,7 @@ We're working to bring the [book up to date](https://www.nushell.sh/book/), and ## Better multiline editing -![Multiline editing](../assets/images/0_59_1_for_multiline_indicator.png) +![Multiline editing](/assets/images/0_59_1_for_multiline_indicator.png) With the switch to reedline, you can also get better feedback when working on multiline edits. For example, moving to the next line, you'll now see `:::` by default preceding the extended input: @@ -517,7 +517,7 @@ You can configure the `:::` default value by setting the `PROMPT_MULTILINE_INDIC Nushell also now has a more compact `ls` representation you can use called `grid`. -![Grid file listing](../assets/images/0_59_1_ls_gridc.png) +![Grid file listing](/assets/images/0_59_1_ls_gridc.png) ## Better `less` support @@ -533,7 +533,7 @@ Nushell by default will strip the ANSI colors, letting you look at the data with We're moving to a new error reporter called [miette](https://github.com/zkat/miette). It's an attractive way of showing errors back while you're working in the REPL or on scripts. -![Miette error message](../assets/images/0_60_miette.png) +![Miette error message](/assets/images/0_60_miette.png) # Reedline @@ -543,7 +543,7 @@ new improvements are: ## Completions menus -![Commands menu](../assets/images/0_60_0_completions_internal.gif) +![Commands menu](/assets/images/0_60_0_completions_internal.gif) Do you want to search for commands using a menu? Nushell has you covered. Press tab and a completion menu will appear with options for you to select. Based on the context different @@ -551,14 +551,14 @@ options will be available to you ## History menu -![History menu](../assets/images/0_60_0_history.gif) +![History menu](/assets/images/0_60_0_history.gif) Your shell history can be easily accessed as well via menus. Using ctrl-x, you can search for a history item or you could just simply navigate the menu until you find what you are looking for. You can also use the history menu to compose a pipe with smaller pipes you have used before. -![History complete](../assets/images/0_60_0_history_complete.gif) +![History complete](/assets/images/0_60_0_history_complete.gif) ## New Keybindings diff --git a/src/content/docs/blog/2022-04-12-nushell_0_61.md b/src/content/docs/blog/2022-04-12-nushell_0_61.md index 2ab31ea0dd9..54659e417f6 100644 --- a/src/content/docs/blog/2022-04-12-nushell_0_61.md +++ b/src/content/docs/blog/2022-04-12-nushell_0_61.md @@ -24,7 +24,7 @@ As part of this release, we also publish a set of optional plugins you can insta # Help Menu (elferherrera) -![Help menu](../assets/images/0_61_help_menu.png) +![Help menu](/assets/images/0_61_help_menu.png) In 0.61, you can now use `` to ask a question/query in Nushell. Currently, this will search through the commands and show you commands that mention the word you type. @@ -34,7 +34,7 @@ You can use up/down to pick the example you'd like to use. Pressing enter will s # Completion descriptions (elferherrera, fdncred, jt) -![Completion descriptions](../assets/images/0_61_completion_descriptions.png) +![Completion descriptions](/assets/images/0_61_completion_descriptions.png) Completions now show you a description of the command you're completing, if it's available. diff --git a/src/content/docs/blog/2022-08-16-nushell-0_67.md b/src/content/docs/blog/2022-08-16-nushell-0_67.md index f7bcf500455..906e1e69d89 100644 --- a/src/content/docs/blog/2022-08-16-nushell-0_67.md +++ b/src/content/docs/blog/2022-08-16-nushell-0_67.md @@ -26,7 +26,7 @@ As part of this release, we also publish a set of optional plugins you can insta ## We have a new welcome banner ([fdncred](https://github.com/nushell/nushell/pull/6163)) -![New Nushell banner](../assets/images/0_67_header.png) +![New Nushell banner](/assets/images/0_67_header.png) You can disable the banner using the `config nu` command to modify the config.nu file, just set `show_banner` to false: @@ -77,11 +77,11 @@ Previously Nushell was limited to reading SQLite database files. Now we allow yo @fdncred worked with @Tyriar from the Visual Studio Code team on shell integration. Now Nushell will display round blue/red/gray decorations indicating the start of commands in the [VS Code terminal](https://code.visualstudio.com/docs/terminal/shell-integration): -![VS Code decorations](../assets/images/0_67_vs_code.png) +![VS Code decorations](/assets/images/0_67_vs_code.png) ## Error Messages ([rgwood](https://github.com/nushell/nushell/pull/6256)) -![new command not found error message](../assets/images/0_67_error_message.png) +![new command not found error message](/assets/images/0_67_error_message.png) The error message when an external command is not found has been improved. Nu now displays fancy [`miette`](https://github.com/zkat/miette) errors on all platforms including Windows, and it offers helpful suggestions for typos and mistaken command names. diff --git a/src/content/docs/blog/2022-10-18-nushell-0_70.md b/src/content/docs/blog/2022-10-18-nushell-0_70.md index 25ff7478c22..d6ed7a988b4 100644 --- a/src/content/docs/blog/2022-10-18-nushell-0_70.md +++ b/src/content/docs/blog/2022-10-18-nushell-0_70.md @@ -26,7 +26,7 @@ As part of this release, we also publish a set of optional plugins you can insta ## New table flags -![Expanded table](../assets/images/0_70_table_expand.png) +![Expanded table](/assets/images/0_70_table_expand.png) - `--expand`: changes a standard table view; expand the table structure so internally all data will be displayed as inner tables diff --git a/src/content/docs/blog/2022-11-08-nushell-0.71.md b/src/content/docs/blog/2022-11-08-nushell-0.71.md index b27402dbc07..37dc81c4fc8 100644 --- a/src/content/docs/blog/2022-11-08-nushell-0.71.md +++ b/src/content/docs/blog/2022-11-08-nushell-0.71.md @@ -64,11 +64,11 @@ let-env config { Default -![Default right prompt](../assets/images/right_prompt_default.png) +![Default right prompt](/assets/images/right_prompt_default.png) Right prompt at bottom -![Right prompt on the last line](../assets/images/right_prompt.png) +![Right prompt on the last line](/assets/images/right_prompt.png) ## Configuring the default value viewer via `display_output` hook (perbothner) diff --git a/src/content/docs/blog/2022-11-29-nushell-0.72.md b/src/content/docs/blog/2022-11-29-nushell-0.72.md index b7a8c776acd..8d2b086f852 100644 --- a/src/content/docs/blog/2022-11-29-nushell-0.72.md +++ b/src/content/docs/blog/2022-11-29-nushell-0.72.md @@ -51,7 +51,7 @@ try { ## Auto-expanding data views -![Expanded data view](../assets/images/0_72_auto_expand.png) +![Expanded data view](/assets/images/0_72_auto_expand.png) With the new default config, we now also detect the terminal width and will automatically expand the data view to include more information if it's available. diff --git a/src/content/docs/blog/2022-12-20-nushell-0.73.md b/src/content/docs/blog/2022-12-20-nushell-0.73.md index b12fe6e4ea5..4534a95de0d 100644 --- a/src/content/docs/blog/2022-12-20-nushell-0.73.md +++ b/src/content/docs/blog/2022-12-20-nushell-0.73.md @@ -30,7 +30,7 @@ The boolean `&&` is now `and` and the boolean `||` is now `or`. These were depre ## Experimental interactive `explore` command ([zhiburt](https://github.com/nushell/nushell/pull/6984)) -![Explore try mode](../assets/images/0_73_explore_try_mode.png) +![Explore try mode](/assets/images/0_73_explore_try_mode.png) This release includes a new experimental command called `explore` for viewing Nu data in an interactive UI. Some things to try: diff --git a/src/content/docs/blog/2023-01-10-nushell_0_74.md b/src/content/docs/blog/2023-01-10-nushell_0_74.md index f327de8fb6a..9d98636ac95 100644 --- a/src/content/docs/blog/2023-01-10-nushell_0_74.md +++ b/src/content/docs/blog/2023-01-10-nushell_0_74.md @@ -57,7 +57,7 @@ In this release, we allow user-defined help messages with aliases and modules. T The help messages now also treat the first line followed by an empty line as a "brief" description displayed in summary tables generated by `help commands`, `$nu.scope.aliases`, etc. The full description is available when querying a particular command/alias/module (e.g., `help spam`). This brief vs. full separation was already present for built-in commands, like `path`, but now it is applied also to all user-defined help messages. An example of using custom module and alias help messages: -![Help messages for modules and aliases](../assets/images/0_74_new_help.png) +![Help messages for modules and aliases](/assets/images/0_74_new_help.png) The current batch of improvements can still be taken further. For example, custom help messages could possibly be defined also for variables and environment variables (via comments adjacent to `let` and `let-env`). We could also further improve the presentation of existing `help xxx` commands. @@ -223,7 +223,7 @@ With this release we finally declare those input and output types for all core n This can help you as user to see what a command expects from the pipeline and might return. We are exploring how nushell can leverage that for more useful diagnostics and completions. In the future we may introduce syntax for user-defined commands to declare their input and output types explicitly. -![help for wrap command shows I/O type signatures](../assets/images/0_74_io_signatures.png) +![help for wrap command shows I/O type signatures](/assets/images/0_74_io_signatures.png) # Breaking changes diff --git a/src/content/docs/blog/2023-01-31-nushell_0_75.md b/src/content/docs/blog/2023-01-31-nushell_0_75.md index 70fb45875c2..32060ee23b2 100644 --- a/src/content/docs/blog/2023-01-31-nushell_0_75.md +++ b/src/content/docs/blog/2023-01-31-nushell_0_75.md @@ -188,7 +188,7 @@ It is also a stepping stone towards being able to handle directories which in tu To watch the progress when saving large files you can now pass the `--progress` flag to `save`. It gives information about the throughput and an interactive progress bar if available. -![Progress for saving a file](../assets/images/0_75_save_progress.png) +![Progress for saving a file](/assets/images/0_75_save_progress.png) # Breaking changes diff --git a/src/content/docs/blog/2023-02-21-nushell_0_76.md b/src/content/docs/blog/2023-02-21-nushell_0_76.md index 11675cb51cc..c4a6862231e 100644 --- a/src/content/docs/blog/2023-02-21-nushell_0_76.md +++ b/src/content/docs/blog/2023-02-21-nushell_0_76.md @@ -36,13 +36,13 @@ We've added a few new commands to help with nushell debugging. The explain command attempts to explain to you how the pipeline, in the passed in block, is going to be interpreted. It shows the pipeline and command index, the looked up and found command name, the command argument data type, and argument details, among other things. Note that spans are also included and can be used with `view span`. -![explain command](../assets/images/0_76_explain_cmd.png) +![explain command](/assets/images/0_76_explain_cmd.png) - [`inspect`](https://github.com/nushell/nushell/pull/8028) - Immediately prints out the contents of a pipeline The purpose of the `inspect` command is to help to debug pipelines. It works by allowing you to inject the `inspect` command into a pipeline at any point. Then it shows you what the input description is and what the input values are that are passed into `inspect`. With each step it prints this information out while also passing the value information on to the next step in the pipeline. -![inspect command](../assets/images/0_76_inspect_cmd.png) +![inspect command](/assets/images/0_76_inspect_cmd.png) - `metadata` - The `metadata` command works the same as before. @@ -50,7 +50,7 @@ The purpose of the `inspect` command is to help to debug pipelines. It works by Enables fine-grained profiling of individual pipeline elements and recursively stepping into blocks/closures. The recursion depth can be controlled (default is 1) and it can optionally collect the profiled source segments for easier orientation and value in each step for easier debugging. -![profile_prompt](../assets/images/0_76_profile_prompt.png) +![profile_prompt](/assets/images/0_76_profile_prompt.png) _Note: There are known limitations that the profiler can't run. For example, it can't collect data from subexpressions and loop iterations. It is caused by profiling data being collected as pipeline metadata and a known bug that pipeline metadata is not preserved in some cases._ @@ -65,7 +65,7 @@ _Note: There are known limitations that the profiler can't run. For example, it `view files` lists the files and entries loaded into nushell's EngineState memory. Note the spans, for use with `view span` and the size of each file's contents stored. -![explain command](../assets/images/0_76_view_files.png) +![explain command](/assets/images/0_76_view_files.png) - [`view source`](https://github.com/nushell/nushell/pull/7989) (formerly known as `view-source`, same functionality) @@ -221,7 +221,7 @@ In an effort to both make the core nushell binary smaller and to improve our plu To make sure you still have a first-class experience while using these commands, our plugins can now support code examples in the `help` and `F1` menu. -![Plugin nu_plugin_formats shows the help for from ini](../assets/images/0_76_plugin_with_example.png) +![Plugin nu_plugin_formats shows the help for from ini](/assets/images/0_76_plugin_with_example.png) As a result, plugin authors need to slightly update their command `Signature` to `PluginSignature` which supports the examples and recompile. diff --git a/src/content/docs/blog/2023-04-25-nushell_0_79.md b/src/content/docs/blog/2023-04-25-nushell_0_79.md index 40acee832b1..dd7c1371841 100644 --- a/src/content/docs/blog/2023-04-25-nushell_0_79.md +++ b/src/content/docs/blog/2023-04-25-nushell_0_79.md @@ -99,7 +99,7 @@ If, for some reason, you want to load Nushell without the standard library, star ## enhanced IDE support in our VS code extension ([JT](https://github.com/nushell/nushell/pull/8745), [fdncred](https://github.com/nushell/vscode-nushell-lang/pull/89)) -![IDE support](../assets/images/0_79_ide.png) +![IDE support](/assets/images/0_79_ide.png) Nushell now has a first [LSP (Language Server Protocol)](https://en.wikipedia.org/wiki/Language_Server_Protocol) implementation with a VSCode integration. If you install the latest version of our [VSCode plugin](https://github.com/nushell/vscode-nushell-lang), you'll see hovers, inlays, tooltips, error squigglies and other features. We are still very early in the LSP development, but the extension is already very usable and definitely moves the experience of writing Nu code to another level! diff --git a/src/content/docs/blog/2023-08-22-nushell_0_84_0.md b/src/content/docs/blog/2023-08-22-nushell_0_84_0.md index f54f4631db8..6695f5ea612 100644 --- a/src/content/docs/blog/2023-08-22-nushell_0_84_0.md +++ b/src/content/docs/blog/2023-08-22-nushell_0_84_0.md @@ -87,11 +87,11 @@ The exported values are true constants which means that you can use them in some To save screen space, you can now display tables with the header directly displayed on the border through the `$env.config.table.header_on_separator` option. -![Table with header displayed on border](../assets/images/0_84_table_compact.png) +![Table with header displayed on border](/assets/images/0_84_table_compact.png) Additionally you can now configure the `padding` left and right of the table cell content either separately or all at once to adjust the layout for your readability needs. -![Table with different padding options](../assets/images/0_84_table_padding.png) +![Table with different padding options](/assets/images/0_84_table_padding.png) ## More consistent `format ...` commands ([@sholderbach](https://github.com/nushell/nushell/pull/9788), [@WindSoilder](https://github.com/nushell/nushell/pull/9902)) diff --git a/src/content/docs/blog/2023-08-23-happy-birthday-nushell-4.md b/src/content/docs/blog/2023-08-23-happy-birthday-nushell-4.md index 679bc981744..745da46d002 100644 --- a/src/content/docs/blog/2023-08-23-happy-birthday-nushell-4.md +++ b/src/content/docs/blog/2023-08-23-happy-birthday-nushell-4.md @@ -28,13 +28,13 @@ To celebrate, we thought we'd share stories of how people are using Nushell toda Using `ls | sort-by type name -i | grid -c`, it looks like this: -![Grid showing pretty sorted items with pretty colours](../assets/images/bday_4_grid.png) +![Grid showing pretty sorted items with pretty colours](/assets/images/bday_4_grid.png) ## Converting SVG to PDF in bulk (sholderbach) "Converting SVG drawings and figures to PDFs in bulk. I like how explicit and clean that is compared to a solution with xargs in bash" -![Highlighted source converting files using path parse, where, and inkspace](../assets/images/bday_4_bulk_convert.jpeg) +![Highlighted source converting files using path parse, where, and inkspace](/assets/images/bday_4_bulk_convert.jpeg) ## Gotta have a Chuck Norris joke @@ -65,7 +65,7 @@ def "main" [] { ``` It even comes with its own help -![automated help generated for the script subcommand](../assets/images/bday_4_subcommand_help.png) +![automated help generated for the script subcommand](/assets/images/bday_4_subcommand_help.png) ## Crossplatform symlinks (Kubouch) @@ -96,7 +96,7 @@ export def symlink [ add `string: {|x| if $x =~ '^#[a-fA-F\d]+' { $x } else { 'white' } }` to your `$env.config.color_config` and you'll get: -![screenshot showing each hex value colored to match the color of that hex value](../assets/images/bday_4_hex_colours.png) +![screenshot showing each hex value colored to match the color of that hex value](/assets/images/bday_4_hex_colours.png) # And many more diff --git a/src/content/docs/blog/2023-10-17-nushell_0_86.md b/src/content/docs/blog/2023-10-17-nushell_0_86.md index 2e4bb661809..12befc2f51e 100644 --- a/src/content/docs/blog/2023-10-17-nushell_0_86.md +++ b/src/content/docs/blog/2023-10-17-nushell_0_86.md @@ -174,7 +174,7 @@ in the [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop hitting TAB will autocomplete to `./target/debug/incremental` if you are in a Rust directory with compiled artifact. -![Animation showing shorthand directory expansion](../assets/images/0_86_completions.gif) +![Animation showing shorthand directory expansion](/assets/images/0_86_completions.gif) ::: warning Breaking change See a full overview of the [breaking changes](#breaking-changes) diff --git a/src/content/docs/blog/2023-11-16-nushell-2023-survey-results.md b/src/content/docs/blog/2023-11-16-nushell-2023-survey-results.md index 4e43efb1908..1549cf4fe7c 100644 --- a/src/content/docs/blog/2023-11-16-nushell-2023-survey-results.md +++ b/src/content/docs/blog/2023-11-16-nushell-2023-survey-results.md @@ -14,7 +14,7 @@ The survey had 451 responses, nearly triple what our 2019 survey had. ## Do you use Nushell? -![graph showing over half of respondents using Nushell](../assets/images/nushell_survey_2023_use_nushell.png) +![graph showing over half of respondents using Nushell](/assets/images/nushell_survey_2023_use_nushell.png) Heart-warmingly, over half of the respondents say they're using Nushell. This gives us both a good view of how Nushell is being used, as well as good info about why it isn't. @@ -22,7 +22,7 @@ Let's first look at how Nushell is being used. ## Where are you running Nushell? -![graph showing 93% personal machine, 52.9% work, 13.1% server, 3.7% cloud](../assets/images/nushell_survey_2023_running_nushell.png) +![graph showing 93% personal machine, 52.9% work, 13.1% server, 3.7% cloud](/assets/images/nushell_survey_2023_running_nushell.png) While the vast majority of Nushell users use Nushell on their personal machines, we couldn't help but notice over 50%(!) of users are using Nushell at work. @@ -30,7 +30,7 @@ That's a great vote of confidence for Nushell as a tool in the toolbox. ## What area(s) should Nushell prioritize? -![graph showing a variety of different topics including file operations, completions, GUI and more](../assets/images/nushell_survey_2023_priorities.png) +![graph showing a variety of different topics including file operations, completions, GUI and more](/assets/images/nushell_survey_2023_priorities.png) The four main areas people wanted the Nushell project to focus on are: @@ -77,7 +77,7 @@ People coming to Nushell from shells like Bash mentioned the difficulty in makin ## What platform(s) are you running Nushell on? -![graph showing different platforms (described below)](../assets/images/nushell_survey_2023_platforms.png) +![graph showing different platforms (described below)](/assets/images/nushell_survey_2023_platforms.png) Our top four platforms for Nushell area: @@ -88,7 +88,7 @@ Our top four platforms for Nushell area: ## How did you install Nushell -![graph showing how people install Nushell (described below)](../assets/images/nushell_survey_2023_how_install.png) +![graph showing how people install Nushell (described below)](/assets/images/nushell_survey_2023_how_install.png) - cargo install nu (44.7%) - native package manager (37.7%) diff --git a/src/content/docs/blog/2023-12-21-logo-contest.md b/src/content/docs/blog/2023-12-21-logo-contest.md index 2c4c6c91ac5..130ef310070 100644 --- a/src/content/docs/blog/2023-12-21-logo-contest.md +++ b/src/content/docs/blog/2023-12-21-logo-contest.md @@ -67,15 +67,15 @@ following the themes detailed above: - Ellie the friendly and yet powerful mascot -ellie-mascot +ellie-mascot - a minimalist font-like logo, featuring "nu" and an abstract elephant -font-logo +font-logo - a blue and friendly shell mascot -shell-mascot +shell-mascot ## Submissions diff --git a/src/content/docs/blog/README.md b/src/content/docs/blog/README.md deleted file mode 100644 index b3856f47664..00000000000 --- a/src/content/docs/blog/README.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Introducing nushell -author: Jonathan Turner -author_site: https://twitter.com/jntrnr -author_image: https://www.nushell.sh/blog/images/jonathandturner.jpg -excerpt: Today, we're introducing a new shell, written in Rust. It draws inspiration from the classic Unix philosophy of pipelines, the structured data approach of PowerShell, functional programming, systems programming, and more. ---- - -# Nu Blog - -[RSS](/rss.xml) / [Atom](/atom.xml) - - diff --git a/src/content/docs/blog/index.mdx b/src/content/docs/blog/index.mdx new file mode 100644 index 00000000000..a53458408bb --- /dev/null +++ b/src/content/docs/blog/index.mdx @@ -0,0 +1,7 @@ +--- +title: Nu Blog +--- + +import GetBlogPosts from "../../../components/GetBlogPosts.astro"; + + diff --git a/src/content/docs/book/stdout_stderr_exit_codes.md b/src/content/docs/book/stdout_stderr_exit_codes.md index 69302800cce..a0376e6d557 100644 --- a/src/content/docs/book/stdout_stderr_exit_codes.md +++ b/src/content/docs/book/stdout_stderr_exit_codes.md @@ -76,7 +76,7 @@ def main [] { } ``` -![Log message examples](../../../assets/images/0_79_std_log.png) +![Log message examples](../..//assets/images/0_79_std_log.png) The log level for output can be set with the `NU_LOG_LEVEL` environment variable: diff --git a/src/content/docs/index.mdx b/src/content/docs/index.mdx index 25a4958d8be..a1bf1a54959 100644 --- a/src/content/docs/index.mdx +++ b/src/content/docs/index.mdx @@ -34,16 +34,16 @@ import { Card, CardGrid } from "@astrojs/starlight/components";
-![Screenshot showing using the ls command](../../assets/images/ls-example.png) +![Screenshot showing using the ls command](..//assets/images/ls-example.png) ## Nu works with existing data Nu speaks [JSON, YAML, SQLite, Excel, and more](https://www.nushell.sh/book/loading_data) out of the box. It's easy to bring data into a Nu pipeline whether it's in a file, a database, or a web API: -![Screenshot showing fetch with a web API](../../assets/images/fetch-example.png) +![Screenshot showing fetch with a web API](..//assets/images/fetch-example.png) ## Nu has great error messages Nu operates on typed data, so it catches bugs that other shells don't. And when things break, Nu tells you exactly where and why: -![Screenshot showing Nu catching a type error](../../assets/images/0_60_miette.png) +![Screenshot showing Nu catching a type error](..//assets/images/0_60_miette.png) From 758f099976dfeea3b9ba21c622da6198d560d6d9 Mon Sep 17 00:00:00 2001 From: Jacob Lamb Date: Mon, 12 Feb 2024 13:15:28 -0800 Subject: [PATCH 17/72] Update GetBlogPosts.astro --- src/components/GetBlogPosts.astro | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/GetBlogPosts.astro b/src/components/GetBlogPosts.astro index 07db984b209..a6cc5403bb3 100644 --- a/src/components/GetBlogPosts.astro +++ b/src/components/GetBlogPosts.astro @@ -1,14 +1,13 @@ --- const posts = await Astro.glob("../content/docs/blog/*.md"); // returns an array of posts that live at ./src/pages/post/*.md --- -