Skip to content

Instantly share code, notes, and snippets.

@yuliji
Last active February 17, 2021 23:24
Show Gist options
  • Save yuliji/0a8650333f366e626deaf909681001b7 to your computer and use it in GitHub Desktop.
Save yuliji/0a8650333f366e626deaf909681001b7 to your computer and use it in GitHub Desktop.
[kill current script when quit]
trap 'kill -- $$' INT TERM QUIT;
# -- is a conventional marker recognised by most argument parsers which means "consider everything beyond this to be positional arguments (not flags)".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment