Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ZSH plugin that maps exit status code to human readable string

License

NotificationsYou must be signed in to change notification settings

bric3/nice-exit-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

oh-my-zsh plugin that maps exit status code to human readable string.

For example :

Warning (1) :

~/.oh-my-zsh-custom/plugins/nice-exit-code ± ❯ git pull origin master:masterFrom github.com:bric3/nice-exit-code! [rejected]        master     -> master  (non-fast-forward)↪ WARN~/.oh-my-zsh-custom/plugins/nice-exit-code ± ❯

Command no found (127) :

~/.oh-my-zsh-custom/plugins/nice-exit-code ± ❯ failzsh:command not found: fail↪ CNOTFOUND~/.oh-my-zsh-custom/plugins/nice-exit-code ± ❯

Interrupted (130)

...* d4eb1c2 - (grin/master) adds grin config (2014-06-21 22:37:14 +0200) Brice Dutheil<brice.dutheil@gmail.com>* 9447ccb - Adds oh-my-git PR link (2014-06-18 18:07:43 +0200) Brice Dutheil<brice.dutheil@gmail.com>↪ INT~ ○ ❯

There's no real specifications for status codes, however some are commonly admitted for most programs, the mapping is inspired bythis script

This function replaces the exit status number with its associated signal name name. Note we can't know for sure if these return codes are actually caused by the signals, but usually they are, since few programs output exit codes superior to128 for error conditions.If no matching codes then output the raw code.

Install it

This install assume the current shell is ZSH with oh-my-zsh already installed.

Install a clone of this repository in oh-my-zsh plugin custom folder. *Note it is possible to change the default custom directory of oh-my-zsh by redefining the $ZSH_CUSTOM in the .zshrc *

mkdir -p$ZSH_CUSTOM/pluginsgit clone git@github.com:bric3/nice-exit-code.git$ZSH_CUSTOM/plugins/nice-exit-code

This will make oh-my-git available as a plugin for oh-my-zsh. Now you still need to activate it. In your .zshrc just activate the plugin by adding oh-my-git to the plugins variable :

plugins=( # custom plugins nice-exit-code oh-my-git # bundled plugins git osx mosh ...

Then to use it in a theme just add$(nice_exit_code) anywhere in your ZSH shell prompt.

PROMPT='$(nice_exit_code) %n@%m >'

About

ZSH plugin that maps exit status code to human readable string

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors2

  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp