-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calling save from config.nu not saving file #15222
Comments
If an error is encountered at some point in your It looks like |
Can we now generate and source the file in the same file? I thought it was still impossible. |
Oh good catch @weirdan. No it's not possible to generate and source a file in the same file. @amk91 This part of the docs may help you understand why. You'll need to generate ohmyposh.nu and Carapce's init.nu before config.nu is loaded, and then you only As far as I know, these are your options:
|
I recommend using the vendor autoload directories for these configs. Just run the following one-time, and then the Carapace and Oh-My-Posh configs will be loaded on every startup after that: let autoload_dir = ($nu.data-dir | path join 'vendor/autoload')
mkdir $autoload_dir
carapace _carapace nushell | save -f $"($autoload_dir)/carapace.nu"
oh-my-posh init nu --config $"($env.POSH_THEMES_PATH)/stelbent.minimal.omp.json" --print | save -f $"($autoload_dir)/ohmyposh.nu" Remove all of the other files and the related items from |
Thank you for the reply, I'll try that later today!
I didn't try to use the |
Well, might be deprecated at some point in the future. But yes, we're seeing if we can discourage its use and have alternate ways of doing things. A similar method to the
|
Hello everybody, I'm trying to set up oh-my-posh in my nushell, but I'm having issues with saving the oh-my-posh configuration on file and then source it.
This is my entire
config.nu
file:I had the same issue with the
carapace
call.Running the same command in the terminal works correctly. The file is generated correctly.
Am I missing some flags and/or commands to run before trying to save the file?
I'm running on Win11 24H2, Windows Terminal.
Thanks
The text was updated successfully, but these errors were encountered: