mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-19 02:02:32 +01:00
feat: exegol aliases
This commit is contained in:
parent
3e7ef0182f
commit
c7295796f3
2 changed files with 85 additions and 0 deletions
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