diff --git a/README.md b/README.md index 6cef0af..d0d9ef2 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,22 @@ ## Quickstart +### `git` + ```nushell no-run > git clone https://github.com/nushell-prophet/dotnu; cd dotnu > use dotnu ``` +### [`nupm`](https://github.com/nushell/nupm) +``` +nupm install https://github.com/nushell-prophet/dotnu --git +# if nupm modules are not in `NU_LIB_DIRS`: +$env.NU_LIB_DIRS ++= [ ($env.NUPM_HOME | path join "modules") ] + +use dotnu +``` + ## Embeds — keeping examples in sync `dotnu` lets you write **literate Nushell**: ordinary Nushell scripts that include the real command output right after each pipeline ending in `| print $in`. See the [capture example](/dotnu-capture.nu) to grasp the idea quickly. diff --git a/dotnu/commands.nu b/dotnu/commands.nu index f7544de..60050e6 100644 --- a/dotnu/commands.nu +++ b/dotnu/commands.nu @@ -332,7 +332,7 @@ export def --env 'embeds-capture-stop' []: nothing -> nothing { #### helpers # they used to be separately here from the main code, but I want to experiment with structure -# so all the commands are in one file now, and all are exported, to be availible in my scripts +# so all the commands are in one file now, and all are exported, to be available in my scripts # that can use this file commands with 'use ..', though main commands are exported in mod.nu export def 'get-dotnu-capture-path' [] { @@ -374,7 +374,7 @@ export def check-clean-working-tree [ error make --unspanned { msg: ( "Working tree isn't empty. Please commit or stash changed files, " + - "or use `--no-git-check` flag. Uncommited files:\n" + $git_status + "or use `--no-git-check` flag. Uncommitted files:\n" + $git_status ) } } @@ -556,7 +556,7 @@ export def 'module-commands-code-to-record' [ | into record } -# prepare pairs of substituions of old results and new results +# prepare pairs of substitutions of old results and new results export def format-substitutions [ $examples $command_description diff --git a/dotnu/mod.nu b/dotnu/mod.nu index d622feb..409e926 100644 --- a/dotnu/mod.nu +++ b/dotnu/mod.nu @@ -13,5 +13,3 @@ export use commands.nu [ "module-commands-code-to-record" "set-x" ] - -use ('..' | path join tests nupm utils dirs.nu) find-root diff --git a/tests/nupm/utils/misc.nu b/tests/nupm/utils/misc.nu index 3f3e7be..e0ec943 100644 --- a/tests/nupm/utils/misc.nu +++ b/tests/nupm/utils/misc.nu @@ -58,7 +58,7 @@ export module url { export def update-name [new_name: string]: string -> string { url parse | update path {|url| - # skip the first '/' and replace last elemnt with the new name + # skip the first '/' and replace last element with the new name let parts = $url.path | path split | skip 1 | drop 1 $parts | append $new_name | str join '/' }