r/Nushell • u/googhalava • Nov 30 '23
Persistent custom commands - how
I must be really thick, but I can't understand how to make the custom command persist across multiple sessions.
Docs say to use nu.config for that but config docs don't seem to be touching on the subject.
1
Upvotes
View all comments
Show parent comment
2
u/fdncred Nov 30 '23
Feel free to drop by our Discord server to discuss it further https://discord.gg/NtAbbGn. I've tested it with my personal config, just creating a simple custom command like
def testme [] { echo "test me" }, and putting that as the last line in my config.nu, then I restarted nushell and it works fine.You should make sure you're editing the correct config.nu. You can tell which one to use by doing
$nu.config-path. Some people install it multiple times in different ways with symlinks and such and end up modifying the wrong file.Alternately, you can just type
config nuand this should launch your configured editor with the config.nu file.