mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-08-23 08:43:30 +08:00
Compare commits
4 Commits
677a4592b1
...
add-docker
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4222944ca7 | ||
|
|
b2b5b47245 | ||
|
|
45b97508e5 | ||
|
|
8392894ca9 |
2
.github/workflows/scorecard.yml
vendored
2
.github/workflows/scorecard.yml
vendored
@@ -60,6 +60,6 @@ jobs:
|
||||
retention-days: 5
|
||||
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # v4.36.3
|
||||
uses: github/codeql-action/upload-sarif@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
This plugin provides completion for [docker-compose](https://docs.docker.com/compose/) as well as some
|
||||
aliases for frequent docker-compose commands.
|
||||
This plugin chooses automatically between the legacy `docker-compose` command and the modern
|
||||
This plugin chooses automatically between the legacy `docker-compose` command and the modern
|
||||
`docker compose` subcommand, preferring `docker-compose` when both are available.
|
||||
|
||||
To use it, add docker-compose to the plugins array of your zshrc file:
|
||||
@@ -17,6 +17,7 @@ plugins=(... docker-compose)
|
||||
|-----------|----------------------------------|----------------------------------------------------------------------------------|
|
||||
| dco | `docker-compose` | Docker-compose main command |
|
||||
| dcb | `docker-compose build` | Build containers |
|
||||
| dcc | `docker-compose config` | Parse, resolve and render compose file in canonical format |
|
||||
| dce | `docker-compose exec` | Execute command inside a container |
|
||||
| dcps | `docker-compose ps` | List containers |
|
||||
| dcrestart | `docker-compose restart` | Restart container |
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
alias dco="$dccmd"
|
||||
alias dcb="$dccmd build"
|
||||
alias dcc="$dccmd config"
|
||||
alias dce="$dccmd exec"
|
||||
alias dcps="$dccmd ps"
|
||||
alias dcrestart="$dccmd restart"
|
||||
|
||||
@@ -16,4 +16,3 @@ Some of the commands include:
|
||||
* `deny <port>/<optional: protocol>` add deny rule
|
||||
* `disable` disables the firewall
|
||||
* `enable` enables the firewall
|
||||
* `route` add route rule
|
||||
|
||||
@@ -31,7 +31,6 @@ _1st_arguments=(
|
||||
'reject:add reject rule'
|
||||
'reload:reloads firewall'
|
||||
'reset:reset firewall'
|
||||
'route:add route rule'
|
||||
'show:show firewall report'
|
||||
'status:show firewall status'
|
||||
'version:display version information'
|
||||
@@ -44,7 +43,6 @@ _arguments -C \
|
||||
'1:: :->cmds' \
|
||||
'2:: :->subcmds' \
|
||||
'3:: :->subsubcmds' \
|
||||
'4:: :->subsubsubcmds' \
|
||||
&& return 0
|
||||
|
||||
local rules
|
||||
@@ -85,17 +83,6 @@ case "$state" in
|
||||
'raw' 'builtins' 'before-rules' 'user-rules' 'after-rules' 'logging-rules' 'listening' 'added' \
|
||||
&& ret=0
|
||||
;;
|
||||
(route)
|
||||
_values 'route' \
|
||||
'delete[delete route rule]' \
|
||||
'insert[insert route rule at NUM]' \
|
||||
'prepend[prepend route rule]' \
|
||||
'allow[add allow route rule]' \
|
||||
'deny[add deny route rule]' \
|
||||
'reject[add reject route rule]' \
|
||||
'limit[add limit route rule]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(delete)
|
||||
rules="$(_ufw_delete_rules)"
|
||||
if [[ -n "$rules" ]] ; then
|
||||
@@ -122,37 +109,6 @@ case "$state" in
|
||||
'incoming' 'outgoing' \
|
||||
&& ret=0
|
||||
;;
|
||||
(route)
|
||||
case "$line[2]" in
|
||||
(delete|prepend)
|
||||
_values 'route-action' \
|
||||
'allow[route allow rule]' \
|
||||
'deny[route deny rule]' \
|
||||
'reject[route reject rule]' \
|
||||
'limit[route limit rule]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(insert)
|
||||
_message 'route rule number'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
(subsubsubcmds)
|
||||
case "$line[1]" in
|
||||
(route)
|
||||
case "$line[2]" in
|
||||
(insert)
|
||||
_values 'route-action' \
|
||||
'allow[route allow rule]' \
|
||||
'deny[route deny rule]' \
|
||||
'reject[route reject rule]' \
|
||||
'limit[route limit rule]' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ function josh_prompt {
|
||||
prompt=" "
|
||||
|
||||
branch=$(git_current_branch)
|
||||
branch="${branch//\%/%%}"
|
||||
ruby_version=$(ruby_prompt_info)
|
||||
path_size=${#PWD}
|
||||
branch_size=${#branch}
|
||||
@@ -32,7 +31,7 @@ function josh_prompt {
|
||||
prompt=" $prompt"
|
||||
done
|
||||
|
||||
prompt="%{%F{green}%}$PWD$prompt%{%F{red}%}$(ruby_prompt_info)%{$reset_color%} ${branch}"
|
||||
prompt="%{%F{green}%}$PWD$prompt%{%F{red}%}$(ruby_prompt_info)%{$reset_color%} ${branch//\%/%%}"
|
||||
|
||||
echo $prompt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user