Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/BlaineEXE/zsh-cmd-status
ZSH plugin to report the status of commands including return code and time taken.
https://github.com/BlaineEXE/zsh-cmd-status
Last synced: about 1 month ago
JSON representation
ZSH plugin to report the status of commands including return code and time taken.
- Host: GitHub
- URL: https://github.com/BlaineEXE/zsh-cmd-status
- Owner: BlaineEXE
- License: mit
- Created: 2021-02-02T02:03:05.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-04-19T23:01:37.000Z (about 3 years ago)
- Last Synced: 2024-01-24T16:49:35.517Z (4 months ago)
- Language: Shell
- Size: 5.86 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-zsh-plugins - cmd-status - Reports the status of commands including return code and duration. (Plugins / ZSH on Windows)
- fucking-awesome-zsh-plugins - cmd-status - Reports the status of commands including return code and duration. (Plugins / ZSH on Windows)
- fucking-awesome-zsh-plugins - cmd-status - Reports the status of commands including return code and duration. (Plugins / ZSH on Windows)
- awesome-zsh-plugins - cmd-status - Reports the status of commands including return code and duration. (Plugins / ZSH on Windows)
README
# zsh-cmd-status
ZSH plugin to report the status of commands including return code and time taken (duration).This plugin will report the return code of the previously run command if it returns nonzero.
It will report the time taken to run the command if its greater than the duration threshold
([ZSH_CMD_STATUS_DURATION_THRESHOLD](#config)).## Examples
```
> falsereturned 1
``````
> sleep 10took 10s
``````
> sleep 11 && falsereturned 1 & took 11s
``````
> grep
usage: grep [-abcDEFGHhIiJLlmnOoqRSsUVvwxZ] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]returned 2
```## Config
| Option env var | Default | Description |
| --------------------------------- | ------- | ----------------------------------------------------------- |
| ZSH_CMD_STATUS_DURATION_THRESHOLD | 10 | time in seconds under which duration should not be reported |