You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In ZSH or Bash, I can execute scripts/commands when I close the interactive shell. In Bash and ZSH this functionnality is given by a script file, respectively ".bash_logout" and ".zlogout". Code inside this file is executed while the shell is closing. It seems that this functionnality doesnt exist in Nushell.
Describe the solution you'd like
Add any kind of functionality that allow code to be run while the shell exit.
Describe alternatives you've considered
No response
Additional context and details
Simple usage case :
While using the shell I use custom commands to populate in-memory database. I can initialise the database in the config.nu file for example but I cannot automaticaly save the database when exiting the shell.
This can be useful too for some cleaning like deleting temp files.
The text was updated successfully, but these errors were encountered:
I don't know if this is the right place for a hook, but maybe that's another option - just having an exit hook.
Have to watch out for exit() gotchas
devyn
added
needs-design
this feature requires design
hooks
Hooks are used to react to changes during interactive execution
and removed
needs-triage
An issue that hasn't had any proper look
labels
May 3, 2024
Related problem
In ZSH or Bash, I can execute scripts/commands when I close the interactive shell. In Bash and ZSH this functionnality is given by a script file, respectively ".bash_logout" and ".zlogout". Code inside this file is executed while the shell is closing. It seems that this functionnality doesnt exist in Nushell.
Describe the solution you'd like
Add any kind of functionality that allow code to be run while the shell exit.
Describe alternatives you've considered
No response
Additional context and details
Simple usage case :
While using the shell I use custom commands to populate in-memory database. I can initialise the database in the config.nu file for example but I cannot automaticaly save the database when exiting the shell.
This can be useful too for some cleaning like deleting temp files.
The text was updated successfully, but these errors were encountered: