nushell support
This commit is contained in:
9
nushell/modules/pj.nu
Normal file
9
nushell/modules/pj.nu
Normal file
@@ -0,0 +1,9 @@
|
||||
use pj_starship.nu
|
||||
use pj_zoxide.nu
|
||||
|
||||
export def --env init [] {
|
||||
# zoxide
|
||||
pj_zoxide init
|
||||
# starship
|
||||
pj_starship init
|
||||
}
|
||||
11
nushell/modules/pj_starship.nu
Normal file
11
nushell/modules/pj_starship.nu
Normal file
@@ -0,0 +1,11 @@
|
||||
export def --env config [name: string] {
|
||||
$env.starship_config = ($env.NU_POLYJUICE_PATH | path join ".." "starship" $"starship_($name).toml")
|
||||
}
|
||||
|
||||
export def --env init [] {
|
||||
let starship_nushell_path = ($env.NU_POLYJUICE_AUTOLOAD_DIRS | path join "starship.nu")
|
||||
if ($starship_nushell_path | path exists) {
|
||||
rm $starship_nushell_path
|
||||
}
|
||||
starship init nu | save -f $starship_nushell_path
|
||||
}
|
||||
7
nushell/modules/pj_zoxide.nu
Normal file
7
nushell/modules/pj_zoxide.nu
Normal file
@@ -0,0 +1,7 @@
|
||||
export def --env init [] {
|
||||
let zoxide_nushell_path = ($env.NU_POLYJUICE_AUTOLOAD_DIRS | path join "zoxide.nu")
|
||||
if ($zoxide_nushell_path | path exists) {
|
||||
rm $zoxide_nushell_path
|
||||
}
|
||||
zoxide init nushell --cmd z | save -f $zoxide_nushell_path
|
||||
}
|
||||
Reference in New Issue
Block a user