mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-12 15:34:50 +08:00
Compare commits
4 Commits
5c1a5c6ce9
...
ff7618cf74
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ff7618cf74 | ||
|
|
68b98c9d53 | ||
|
|
8260005dc7 | ||
|
|
93e9b80d3f |
@ -28,3 +28,4 @@ plugins=(... docker-compose)
|
||||
| dclf | `docker-compose logs -f` | Show logs and follow output |
|
||||
| dcpull | `docker-compose pull` | Pull image of a service |
|
||||
| dcstart | `docker-compose start` | Start a container |
|
||||
| dck | `docker-compose kill` | Kills containers |
|
||||
|
||||
@ -24,3 +24,4 @@ alias dcl='docker-compose logs'
|
||||
alias dclf='docker-compose logs -f'
|
||||
alias dcpull='docker-compose pull'
|
||||
alias dcstart='docker-compose start'
|
||||
alias dck='docker-compose kill'
|
||||
|
||||
@ -11,4 +11,10 @@ plugins=(... httpie)
|
||||
|
||||
It uses completion from [zsh-completions](https://github.com/zsh-users/zsh-completions).
|
||||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command |
|
||||
| ------------ | ---------------------------------------------------------------- |
|
||||
| `https` | `http --default-scheme=https` |
|
||||
|
||||
**Maintainer:** [lululau](https://github.com/lululau)
|
||||
|
||||
7
plugins/httpie/httpie.plugin.zsh
Normal file
7
plugins/httpie/httpie.plugin.zsh
Normal file
@ -0,0 +1,7 @@
|
||||
#
|
||||
# Aliases
|
||||
# (sorted alphabetically)
|
||||
#
|
||||
|
||||
alias https='http --default-scheme=https'
|
||||
|
||||
@ -33,7 +33,8 @@ plugins=(... kubectl)
|
||||
| kep | `kubectl edit pods` | Edit pods from the default editor |
|
||||
| kdp | `kubectl describe pods` | Describe all pods |
|
||||
| kdelp | `kubectl delete pods` | Delete all pods matching passed arguments |
|
||||
| kgpl | `kgp -l` | Get pod by label. Example: `kgpl "app=myapp" -n myns` |
|
||||
| kgpl | `kgp -l` | Get pods by label. Example: `kgpl "app=myapp" -n myns` |
|
||||
| kgpn | `kgp -n` | Get pods by namespace. Example: `kgpn kube-system` |
|
||||
| | | **Service management** |
|
||||
| kgs | `kubectl get svc` | List all services in ps output format |
|
||||
| kgsw | `kgs --watch` | After listing all services, watch for changes |
|
||||
|
||||
@ -47,6 +47,9 @@ alias kdelp='kubectl delete pods'
|
||||
# get pod by label: kgpl "app=myapp" -n myns
|
||||
alias kgpl='kgp -l'
|
||||
|
||||
# get pod by namespace: kgpn kube-system"
|
||||
alias kgpn='kgp -n'
|
||||
|
||||
# Service management.
|
||||
alias kgs='kubectl get svc'
|
||||
alias kgsa='kubectl get svc --all-namespaces'
|
||||
|
||||
@ -3,6 +3,7 @@ This plugin allows to display command's execution time in a very nonintrusive wa
|
||||
Timer can be tuned by these two variables:
|
||||
* `TIMER_PRECISION` allows to control number of decimal places (default `1`)
|
||||
* `TIMER_FORMAT` allows to adjust display format (default `'/%d'`)
|
||||
* `TIMER_THRESHOLD` allows to set the minimum execution time that causes the timer to be shown (default `0`)
|
||||
|
||||
Sample session:
|
||||
|
||||
|
||||
@ -19,9 +19,11 @@ __timer_display_timer_precmd() {
|
||||
local cmd_end_time=$(__timer_current_time)
|
||||
local tdiff=$((cmd_end_time - __timer_cmd_start_time))
|
||||
unset __timer_cmd_start_time
|
||||
local tdiffstr=$(__timer_format_duration ${tdiff})
|
||||
local cols=$((COLUMNS - ${#tdiffstr} - 1))
|
||||
echo -e "\033[1A\033[${cols}C ${tdiffstr}"
|
||||
if [[ -z "${TIMER_THRESHOLD}" || ${tdiff} -ge "${TIMER_THRESHOLD}" ]]; then
|
||||
local tdiffstr=$(__timer_format_duration ${tdiff})
|
||||
local cols=$((COLUMNS - ${#tdiffstr} - 1))
|
||||
echo -e "\033[1A\033[${cols}C ${tdiffstr}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user