The collection of nushell
scripts for GOATs.
⚠️ 📯 this repository has been moved to goatfiles/scripts
in my nushell
environment configuration file,
env.nu
i run the following:
- define the upstream remote URL
let-env NU_SCRIPTS_REMOTE = "ssh://[email protected]/goatfiles/nu_scripts.git"
- define the local location of the
nu_scripts
let-env NU_SCRIPTS_DIR = ($env.GIT_REPOS_HOME | path join "github.com/goatfiles/nu_scripts")
- make the local
nu_scripts
available tonushell
let-env NU_LIB_DIRS = [
...
$env.NU_SCRIPTS_DIR
]
- make sure the
nu_scripts
are locally available, otherwise pull them
if not ($env.NU_SCRIPTS_DIR | path exists) {
print $"(ansi red_bold)error(ansi reset): ($env.NU_SCRIPTS_DIR) does not exist..."
print $"(ansi cyan)info(ansi reset): pulling the scripts from ($env.NU_SCRIPTS_REMOTE)..."
git clone $env.NU_SCRIPTS_REMOTE $env.NU_SCRIPTS_DIR
}
- source any script in
config.nu
use scripts/<nu_script>.nu
it is important
- to add the script in
scripts/
- reference the other scripts with
use scripts/<nu_script>