diff --git a/README.md b/README.md index ae1d7e7..ae84d78 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,12 @@ nupm install --path . Clone the repo, then add to `config.nu`: +```nushell +use /path/to/dagger.nu/mod.nu * +``` + +Or, if you prefer to load only the completions file directly: + ```nushell use /path/to/dagger.nu/completions/dagger.nu * ``` diff --git a/tests/completions.test.nu b/tests/completions.test.nu index 35251f6..171ded8 100644 --- a/tests/completions.test.nu +++ b/tests/completions.test.nu @@ -153,8 +153,9 @@ def "test no duplicate externs" [] { def "test mod.nu entry point" [] { # Verify the root mod.nu re-exports everything from completions/ # We load it in a subshell to get an isolated scope reading + let mod_path = ([$env.FILE_PWD ".." "mod.nu"] | path join | path expand) let out = ^nu --no-config-file -c $" - use '/workspaces/code/github.com/danielbodnar/dagger.nu/mod.nu' * + use '($mod_path)' * scope commands | where name =~ '^dagger' | get name | to json " | from json assert ($out | is-not-empty) "mod.nu must re-export dagger commands"