mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
Merge c7295796f3 into e9fc134236
This commit is contained in:
commit
b0b42308a2
2 changed files with 85 additions and 0 deletions
30
plugins/exegol/README.md
Normal file
30
plugins/exegol/README.md
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
# Exegol plugin
|
||||||
|
|
||||||
|
The Exegol plugin provides useful aliases
|
||||||
|
|
||||||
|
To use it, add `exegol` to the plugins array of your zshrc file:
|
||||||
|
|
||||||
|
```zsh
|
||||||
|
plugins=(... exegol)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Aliases
|
||||||
|
|
||||||
|
| Alias | Command | Description |
|
||||||
|
| :------ | :------------------------------- | :-------------------------------------------------------- |
|
||||||
|
| `e` | `exegol` | Shorthand for exegol command |
|
||||||
|
| `ei` | `exegol info` | Displays exegol information |
|
||||||
|
| `eu` | `exegol update` | Updates exegol to the latest version |
|
||||||
|
| `es` | `exegol start` | Starts an Exegol instance |
|
||||||
|
| `esn` | `exegol start [default] nightly` | Starts a nightly Exegol instance |
|
||||||
|
| `esf` | `exegol start [default] full` | Starts a full Exegol instance |
|
||||||
|
| `esf!` | `esf --privileged` | Starts a full Exegol instance with privileged access |
|
||||||
|
| `esn!` | `esn --privileged` | Starts a nightly Exegol instance with privileged access |
|
||||||
|
| `etmpn` | `exegol exec --tmp nightly` | Executes a command in a temporary nightly Exegol instance |
|
||||||
|
| `etmpf` | `exegol exec --tmp full` | Executes a command in a temporary full Exegol instance |
|
||||||
|
| `estp` | `exegol stop` | Stops an Exegol instance |
|
||||||
|
| `estpa` | `exegol stop --all` | Stops all Exegol instances |
|
||||||
|
| `erm` | `exegol remove` | Removes an Exegol instance |
|
||||||
|
| `erm!` | `exegol remove --force` | Removes an Exegol instance forcefully |
|
||||||
|
| `erma` | `exegol remove --all` | Removes all Exegol instances |
|
||||||
|
| `erma!` | `exegol remove --force --all` | Removes all Exegol instances forcefully |
|
||||||
55
plugins/exegol/exegol.plugin.zsh
Normal file
55
plugins/exegol/exegol.plugin.zsh
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
# Return immediately if exegol is not found
|
||||||
|
if (( ! ${+commands[exegol]} )); then
|
||||||
|
echo OK
|
||||||
|
fi
|
||||||
|
|
||||||
|
alias e='exegol'
|
||||||
|
alias ei='exegol info'
|
||||||
|
alias eu='exegol update'
|
||||||
|
|
||||||
|
alias es='exegol start'
|
||||||
|
function esn() {
|
||||||
|
local only_dashes=true
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [[ ! "$arg" == -* ]]; then
|
||||||
|
only_dashes=false
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ "$#" == 0 ]] || $only_dashes; then
|
||||||
|
# If all arguments are dashes or empty, use default name
|
||||||
|
exegol start default nightly "$@"
|
||||||
|
else
|
||||||
|
exegol start "$@" nightly
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
function esf() {
|
||||||
|
local only_dashes=true
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [[ ! "$arg" == -* ]]; then
|
||||||
|
only_dashes=false
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ "$#" == 0 ]] || $only_dashes; then
|
||||||
|
# If all arguments are dashes or empty, use default name
|
||||||
|
exegol start default full "$@"
|
||||||
|
else
|
||||||
|
exegol start "$@" full
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
alias esf!='esf --privileged'
|
||||||
|
alias esn!='esn --privileged'
|
||||||
|
|
||||||
|
alias etmpn='exegol exec --tmp nightly'
|
||||||
|
alias etmpf='exegol exec --tmp full'
|
||||||
|
|
||||||
|
alias estp='exegol stop'
|
||||||
|
alias estpa='exegol stop --all'
|
||||||
|
|
||||||
|
alias erm='exegol remove'
|
||||||
|
alias erm!='exegol remove --force'
|
||||||
|
alias erma='exegol remove --all'
|
||||||
|
alias erma!='exegol remove --force --all'
|
||||||
Loading…
Add table
Add a link
Reference in a new issue