Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

goatfiles/nu_scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nu_scripts

The collection of nushell scripts for GOATs.

⚠️ 📯 this repository has been moved to goatfiles/scripts

source the scripts

in my nushell environment configuration file, env.nu i run the following:

  • define the upstream remote URL
let-env NU_SCRIPTS_REMOTE = "ssh://git@github.com/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 to nushell
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
}
use scripts/<nu_script>.nu

add a new script

it is important

  • to add the script in scripts/
  • reference the other scripts with use scripts/<nu_script>