event on exit

    0

    1

    lucycodes42

    Shell public recipes

    Shortcut: event.exit

    # Exit event handler
    function on_exit() {
      tput cnorm # Show cursor. You need this if animation is used.
      command
      exit 0 # Exit gracefully.
    }
    
    # Put this line at the beginning of your script (after functions used by event handlers).
    # Register exit event handler.
    trap on_exit EXIT
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.