Skip to content

📡 Status code to signal name translate

License

Notifications You must be signed in to change notification settings

info-mono/status2signal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

status2signal

Status code to signal name translate

License: GPL-3.0 Development completed

💡 About

status2signal is a tool to translate status code to signal name written in portable sh inspired by Fish's fish_status_to_signal command and Starship's Status module.

🚀 Setup

🧾 Dependencies

📥 Installation

🔧 Manually

Option 1: using curl

curl https://raw.githubusercontent.com/info-mono/status2signal/main/bin/status2signal > ~/.local/bin/status2signal
chmod +x ~/.local/bin/status2signal

Option 2: using git

git clone https://github.com/info-mono/status2signal.git ~/.local/share/status2signal
ln -s ~/.local/share/status2signal/bin/status2signal ~/.local/bin/status2signal

📦 Package manager

For Bpkg user:

bpkg install info-mono/status2signal

For Basher user:

basher install info-mono/status2signal

If you can and want to port status2signal to other package managers, feel free to do so.

⌨️ Usage

Run 'status2signal' in the terminal:

status2signal STATUSCODES

Here is the list of statuses and signals that they will be translated to:

Status Signal
0 empty
1 ERROR
2 USAGE
126 NOPERM
127 NOTFOUND
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
144 SIGSTKFLT
145 SIGCHLD
146 SIGCONT
147 SIGSTOP
148 SIGTSTP
149 SIGTTIN
150 SIGTTOU
151 SIGURG
152 SIGXCPU
153 SIGXFSZ
154 SIGVTALRM
155 SIGPROF
156 SIGWINCH
157 SIGIO
158 SIGPWR
159 SIGSYS

Other positive integer will be translated to ERROR.

💌 Credits

Special thanks to:






Made with ❤️ by @info-mono

Buy Me a Coffee