Skip to content

Instantly share code, notes, and snippets.

@taviso
Created August 29, 2019 18:14
Show Gist options
  • Save taviso/c987a7245335cf1ad1e2b565e77668d4 to your computer and use it in GitHub Desktop.
Save taviso/c987a7245335cf1ad1e2b565e77668d4 to your computer and use it in GitHub Desktop.
UNIX signals as emoji
declare -ar _status=(
[ 0]=๐Ÿ˜€ # Success
[ 1]=๐Ÿคจ # Error
[129]=๐Ÿ“ž # SIGHUP
[130]=๐Ÿ›‘ # SIGINT
[131]="(โ•ฏยฐโ–กยฐ๏ผ‰โ•ฏ๏ธต โ”ปโ”โ”ป" # SIGQUIT
[132]=๐Ÿ‘ฎ # SIGILL
[133]=๐Ÿ # SIGTRAP
[134]=๐Ÿ’ฅ # SIGABRT
[135]=๐ŸšŒ # SIGBUS
[136]=๐Ÿงฎ # SIGFPE
[137]=๐Ÿ”ซ # SIGKILL
[138]=๐Ÿฅ‡ # SIGUSR1
[139]=๐Ÿ’ฃ # SIGSEGV
[140]=๐Ÿฅˆ # SIGUSR2
[141]=๐Ÿšฟ # SIGPIPE
[142]=โฐ # SIGALRM
[143]=๐Ÿ’€ # SIGTERM
[147]=๐Ÿ’ค # SIGSTOP
[148]=๐Ÿ˜ด # SIGTSTP
)
PS1='[${_status[$?]:-๐Ÿคท}:\u@\h \W]\$ '
@taviso
Copy link
Author

taviso commented Aug 29, 2019

๐Ÿ‘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment