mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-11 05:39:45 +08:00
Compare commits
4 Commits
0f4c8721c3
...
d97b7fd7f6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d97b7fd7f6 | ||
|
|
40b80a0283 | ||
|
|
9df4ea095f | ||
|
|
1a253c375a |
2
.github/workflows/dependencies.yml
vendored
2
.github/workflows/dependencies.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
|||||||
contents: write # this is needed to push commits and branches
|
contents: write # this is needed to push commits and branches
|
||||||
steps:
|
steps:
|
||||||
- name: Harden the runner (Audit all outbound calls)
|
- name: Harden the runner (Audit all outbound calls)
|
||||||
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
|
|||||||
4
.github/workflows/installer.yml
vendored
4
.github/workflows/installer.yml
vendored
@ -26,7 +26,7 @@ jobs:
|
|||||||
- macos-latest
|
- macos-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Harden the runner (Audit all outbound calls)
|
- name: Harden the runner (Audit all outbound calls)
|
||||||
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ jobs:
|
|||||||
- test
|
- test
|
||||||
steps:
|
steps:
|
||||||
- name: Harden the runner (Audit all outbound calls)
|
- name: Harden the runner (Audit all outbound calls)
|
||||||
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -24,7 +24,7 @@ jobs:
|
|||||||
if: github.repository == 'ohmyzsh/ohmyzsh'
|
if: github.repository == 'ohmyzsh/ohmyzsh'
|
||||||
steps:
|
steps:
|
||||||
- name: Harden the runner (Audit all outbound calls)
|
- name: Harden the runner (Audit all outbound calls)
|
||||||
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/project.yml
vendored
2
.github/workflows/project.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
|||||||
if: github.repository == 'ohmyzsh/ohmyzsh'
|
if: github.repository == 'ohmyzsh/ohmyzsh'
|
||||||
steps:
|
steps:
|
||||||
- name: Harden the runner (Audit all outbound calls)
|
- name: Harden the runner (Audit all outbound calls)
|
||||||
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
- name: Authenticate as @ohmyzsh
|
- name: Authenticate as @ohmyzsh
|
||||||
|
|||||||
4
.github/workflows/scorecard.yml
vendored
4
.github/workflows/scorecard.yml
vendored
@ -36,7 +36,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden the runner (Audit all outbound calls)
|
- name: Harden the runner (Audit all outbound calls)
|
||||||
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
@ -60,6 +60,6 @@ jobs:
|
|||||||
retention-days: 5
|
retention-days: 5
|
||||||
|
|
||||||
- name: "Upload to code-scanning"
|
- name: "Upload to code-scanning"
|
||||||
uses: github/codeql-action/upload-sarif@19b2f06db2b6f5108140aeb04014ef02b648f789 # v4.31.11
|
uses: github/codeql-action/upload-sarif@b20883b0cd1f46c72ae0ba6d1090936928f9fa30 # v4.32.0
|
||||||
with:
|
with:
|
||||||
sarif_file: results.sarif
|
sarif_file: results.sarif
|
||||||
|
|||||||
25
plugins/opencode/README.md
Normal file
25
plugins/opencode/README.md
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# opencode plugin
|
||||||
|
|
||||||
|
This plugin adds several aliases and shell completion for the [`opencode`](https://opencode.ai) command line tool from Anomaly Innovations.
|
||||||
|
|
||||||
|
To use it, add `opencode` to the plugins array of your `.zshrc` file:
|
||||||
|
|
||||||
|
```zsh
|
||||||
|
plugins=(... opencode)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
See the [opencode docs](https://opencode.ai/docs#install) for installation instructions.
|
||||||
|
|
||||||
|
|
||||||
|
## Aliases
|
||||||
|
|
||||||
|
|Alias|Command|Description|
|
||||||
|
|-|-|-|
|
||||||
|
|`oc`|`opencode`|Run the `opencode` command|
|
||||||
|
|`ocr`|`opencode run` |Run `opencode` with a message|
|
||||||
|
|
||||||
|
## Completions
|
||||||
|
|
||||||
|
This plugin configures shell completion for the `opencode` command.
|
||||||
30
plugins/opencode/opencode.plugin.zsh
Normal file
30
plugins/opencode/opencode.plugin.zsh
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
if ! (( $+commands[opencode] )); then
|
||||||
|
print "zsh opencode plugin: opencode not found. Please install opencode \
|
||||||
|
before using this plugin." >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# See `opencode completion`
|
||||||
|
_opencode_yargs_completions() {
|
||||||
|
local reply
|
||||||
|
local si=$IFS
|
||||||
|
IFS=$'
|
||||||
|
' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" \
|
||||||
|
COMP_POINT="$CURSOR" opencode --get-yargs-completions "${words[@]}"))
|
||||||
|
IFS=$si
|
||||||
|
if [[ ${#reply} -gt 0 ]]; then
|
||||||
|
_describe 'values' reply
|
||||||
|
else
|
||||||
|
_default
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ "'${zsh_eval_context[-1]}" == "loadautofunc" ]]; then
|
||||||
|
_opencode_yargs_completions "$@"
|
||||||
|
else
|
||||||
|
compdef _opencode_yargs_completions opencode
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Aliases
|
||||||
|
alias oc="opencode"
|
||||||
|
alias ocr="opencode run"
|
||||||
Loading…
Reference in New Issue
Block a user