mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-12 15:34:50 +08:00
Compare commits
4 Commits
7d73908223
...
3b1699b595
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b1699b595 | ||
|
|
80d2e4336b | ||
|
|
bf5574fc93 | ||
|
|
3f42700c0d |
@ -1,7 +1,7 @@
|
||||
# fixme - the load process here seems a bit bizarre
|
||||
zmodload -i zsh/complist
|
||||
|
||||
WORDCHARS='_-'
|
||||
WORDCHARS=''
|
||||
|
||||
unsetopt menu_complete # do not autoselect the first completion entry
|
||||
unsetopt flowcontrol
|
||||
|
||||
@ -12,8 +12,8 @@ _cargo() {
|
||||
'(-q --quiet)*'{-v,--verbose}'[use verbose output]'
|
||||
'(-q --quiet -v --verbose)'{-q,--quiet}'[no output printed to stdout]'
|
||||
'-Z+[pass unstable (nightly-only) flags to cargo]: :_cargo_unstable_flags'
|
||||
'--frozen[require that Cargo.lock and cache are up-to-date]'
|
||||
'--locked[require that Cargo.lock is up-to-date]'
|
||||
'--frozen[require that Cargo.lock and cache are up to date]'
|
||||
'--locked[require that Cargo.lock is up to date]'
|
||||
'--color=[specify colorization option]:coloring:(auto always never)'
|
||||
'(- 1 *)'{-h,--help}'[show help message]'
|
||||
)
|
||||
|
||||
@ -41,7 +41,7 @@ __go_tool_complete() {
|
||||
return
|
||||
fi
|
||||
build_flags=(
|
||||
'-a[force reinstallation of packages that are already up-to-date]'
|
||||
'-a[force reinstallation of packages that are already up to date]'
|
||||
'-n[print the commands but do not run them]'
|
||||
'-p[number of parallel builds]:number'
|
||||
'-race[enable data race detection]'
|
||||
|
||||
@ -22,7 +22,7 @@ plugins=(... kubectl)
|
||||
| kcsc | `kubectl config set-context` | Set a context entry in kubeconfig |
|
||||
| kcdc | `kubectl config delete-context` | Delete the specified context from the kubeconfig |
|
||||
| kccc | `kubectl config current-context` | Display the current-context |
|
||||
| kcgc | `kubectl config get-contexts` | List of contexts available
|
||||
| kcgc | `kubectl config get-contexts` | List of contexts available
|
||||
| | | **General aliases** |
|
||||
| kdel | `kubectl delete` | Delete resources by filenames, stdin, resources and names, or by resources and label selector |
|
||||
| kdelf | `kubectl delete -f` | Delete a pod using the type and name specified in -f argument |
|
||||
@ -91,13 +91,13 @@ plugins=(... kubectl)
|
||||
| keno | `kubectl edit node` | Edit nodes resource from the default editor |
|
||||
| kdno | `kubectl describe node` | Describe node resource in detail |
|
||||
| kdelno | `kubectl delete node` | Delete the node |
|
||||
| | | **Persistent Volume Claim management** |
|
||||
| | | **Persistent Volume Claim management** |
|
||||
| kgpvc | `kubectl get pvc` | List all PVCs |
|
||||
| kgpvcw | `kgpvc --watch` | After listing/getting the requested object, watch for changes |
|
||||
| kepvc | `kubectl edit pvc` | Edit pvcs from the default editor |
|
||||
| kdpvc | `kubectl describe pvc` | Descirbe all pvcs |
|
||||
| kdpvc | `kubectl describe pvc` | Describe all pvcs |
|
||||
| kdelpvc | `kubectl delete pvc` | Delete all pvcs matching passed arguments |
|
||||
| | | |
|
||||
| | | **StatefulSets management** |
|
||||
| kgss | `kubectl get statefulset` | List the statefulsets in ps format |
|
||||
| kgssw | `kgss --watch` | After getting the list of statefulsets, watch for changes |
|
||||
| kgsswide| `kgss -o wide` | After getting the statefulsets, output in plain-text format with any additional information |
|
||||
@ -106,6 +106,21 @@ plugins=(... kubectl)
|
||||
| kdelss | `kubectl delete statefulset` | Delete the statefulset |
|
||||
| ksss | `kubectl scale statefulset` | Scale a statefulset |
|
||||
| krsss | `kubectl rollout status statefulset`| Check the rollout status of a deployment |
|
||||
| | | **Service Accounts management** |
|
||||
| kgsa | `kubectl get sa` | List all service accounts |
|
||||
| kdsa | `kubectl describe sa` | Describe a service account in details |
|
||||
| kdelsa | `kubectl delete sa` | Delete the service account |
|
||||
| | | **DaemonSet management** |
|
||||
| kgds | `kubectl get daemonset` | List all DaemonSets in ps output format |
|
||||
| kgdsw | `kgds --watch` | After listing all DaemonSets, watch for changes |
|
||||
| keds | `kubectl edit daemonset` | Edit DaemonSets from the default editor |
|
||||
| kdds | `kubectl describe daemonset` | Describe all DaemonSets in detail |
|
||||
| kdelds | `kubectl delete daemonset` | Delete all DaemonSets matching passed argument |
|
||||
| | | **CronJob management** |
|
||||
| kgcj | `kubectl get cronjob` | List all CronJobs in ps output format |
|
||||
| kecj | `kubectl edit cronjob` | Edit CronJob from the default editor |
|
||||
| kdcj | `kubectl describe cronjob` | Describe a CronJob in details |
|
||||
| kdelcj | `kubectl delete cronjob` | Delete the CronJob |
|
||||
|
||||
## Wrappers
|
||||
|
||||
|
||||
@ -150,6 +150,24 @@ alias kepvc='kubectl edit pvc'
|
||||
alias kdpvc='kubectl describe pvc'
|
||||
alias kdelpvc='kubectl delete pvc'
|
||||
|
||||
# Service account management.
|
||||
alias kgsa="kubectl get sa"
|
||||
alias kdsa="kubectl describe sa"
|
||||
alias kdelsa="kubectl delete sa"
|
||||
|
||||
# DaemonSet management.
|
||||
alias kgds='kubectl get daemonset'
|
||||
alias kgdsw='kgds --watch'
|
||||
alias keds='kubectl edit daemonset'
|
||||
alias kdds='kubectl describe daemonset'
|
||||
alias kdelds='kubectl delete daemonset'
|
||||
|
||||
# CronJob management.
|
||||
alias kgcj='kubectl get cronjob'
|
||||
alias kecj='kubectl edit cronjob'
|
||||
alias kdcj='kubectl describe cronjob'
|
||||
alias kdelcj='kubectl delete cronjob'
|
||||
|
||||
# Only run if the user actually has kubectl installed
|
||||
if (( ${+_comps[kubectl]} )); then
|
||||
kj() { kubectl "$@" -o json | jq; }
|
||||
|
||||
@ -1,21 +1,15 @@
|
||||
# NPX Plugin
|
||||
> npx(1) -- execute npm package binaries. ([more info](https://github.com/zkat/npx))
|
||||
|
||||
> npx(1) -- execute npm package binaries. ([more info](https://github.com/npm/npx))
|
||||
|
||||
This plugin automatically registers npx command-not-found handler if `npx` exists in your `$PATH`.
|
||||
|
||||
## Setup
|
||||
To use it, add `npx` to the plugins array in your zshrc file:
|
||||
|
||||
- Add plugin to `~/.zshrc`
|
||||
|
||||
```bash
|
||||
```zsh
|
||||
plugins=(.... npx)
|
||||
```
|
||||
|
||||
- Globally install npx binary (npx will be auto installed with recent versions of Node.js)
|
||||
```bash
|
||||
sudo npm install -g npx
|
||||
```
|
||||
|
||||
## Note
|
||||
|
||||
The shell auto-fallback doesn't auto-install plain packages. In order to get it to install something, you need to add `@`:
|
||||
@ -29,3 +23,17 @@ Started
|
||||
|
||||
It does it this way so folks using the fallback don't accidentally try to install regular typoes.
|
||||
|
||||
## Deprecation
|
||||
|
||||
Since npm v7, `npx` has been moved to `npm exec`. With the move, [the `--shell-auto-fallback` argument
|
||||
for `npx` has been removed](https://github.com/npm/cli/blob/v7.0.0/docs/content/cli-commands/npm-exec.md#compatibility-with-older-npx-versions):
|
||||
|
||||
> Shell fallback functionality is removed, as it is not advisable.
|
||||
|
||||
When using npm v7, you'll get this error:
|
||||
|
||||
> npx: the --shell-auto-fallback argument has been removed
|
||||
|
||||
If you get this error, just disable the plugin by removing it from the plugins array in your zshrc file.
|
||||
This plugin will no longer be maintained and will be removed in the future, when the older `npx` versions
|
||||
are no longer available.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user