finestructure,
@finestructure@mastodon.social avatar

I really want to give a go as my login shell but I'm struggling with weird a error. Last time I tried I set up a scripts module dir .config/scripts with some nu scripts I want sourced on launch. I have in env.nu

$env.NU_LIB_DIRS = ($env.NU_LIB_DIRS | append [
'~/.config/nushell'
])

and in config.nu

use scripts *

But now I get “module directory is missing a mod.nu file” on launch. There •is• a mod.nu file in the directory and this setup worked briefly.

Baffled 🤔

Eastcheap,

@finestructure
If I'm understanding this correctly, nothing happens to NU_LIB_DIRS if something is already assigned. Seems to me you'd need to test for that, append a colon (or whatever nushell uses for a separator) if so, and just unconditionally append '~/.config/nushell'.

I guess something like:

$env.NU_LIB_DIRS = ($env.NU_LIB_DIRS & append [':'])

$env.NU_LIB_DIRS = append ['~/.config/nushell']

But, then, I don't know anything about nushell.

finestructure,
@finestructure@mastodon.social avatar

@Eastcheap I'm pretty sure my version is correct - in fact, it's working again now 🤪

I've not touched the config since I posted this yesterday and now everything is working as expected on launch. Computers are weird 😅

finestructure,
@finestructure@mastodon.social avatar

Ok, I've figured this out. The problem is that I had an unrelated scripts directory in the directory I was launching from. That seems to override my NU_LIB_DIRS setting and lead to the error.

I've now moved my scripts to .config/nushell/_scripts and now use _scripts * works fine.

https://discord.com/channels/601130461678272522/614593951969574961/1153269044728840264

jntrnr,

@finestructure

There's work going on now to make it easier to use .config, though I don't think it's landed yet

finestructure,
@finestructure@mastodon.social avatar

@jntrnr That’s great to hear, I’ll try again in a while then 🙂

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • mdbf
  • ethstaker
  • magazineikmin
  • GTA5RPClips
  • rosin
  • thenastyranch
  • Youngstown
  • InstantRegret
  • slotface
  • osvaldo12
  • kavyap
  • khanakhh
  • Durango
  • megavids
  • everett
  • cisconetworking
  • normalnudes
  • tester
  • ngwrru68w68
  • cubers
  • modclub
  • tacticalgear
  • provamag3
  • Leos
  • anitta
  • JUstTest
  • lostlight
  • All magazines