mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-04 13:25:05 +08:00
Compare commits
11 Commits
45dd7d006a
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf2948322b | ||
|
|
25d4d753bf | ||
|
|
3fd2331ae8 | ||
|
|
6bb9718dd2 | ||
|
|
5c4f27b716 | ||
|
|
400591e71c | ||
|
|
536515d186 | ||
|
|
2117ee5cf7 | ||
|
|
7f8d6b1fca | ||
|
|
52d93f18d6 | ||
|
|
44f2a128aa |
2
.github/dependencies.yml
vendored
2
.github/dependencies.yml
vendored
@@ -30,7 +30,7 @@ dependencies:
|
||||
plugins/kube-ps1:
|
||||
repo: jonmosco/kube-ps1
|
||||
branch: master
|
||||
version: 0b0e6daf4197ecabb1ae4f2d46fb148a8e1e73e5
|
||||
version: 9b41c091d5dd4a99e58cf58b5d98a4847937b1bb
|
||||
precopy: |
|
||||
set -e
|
||||
find . ! -name kube-ps1.sh ! -name LICENSE ! -name README.md -delete
|
||||
|
||||
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
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
|
||||
uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2.15.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
certifi==2026.1.4
|
||||
certifi==2026.2.25
|
||||
charset-normalizer==3.4.4
|
||||
idna==3.11
|
||||
PyYAML==6.0.3
|
||||
|
||||
4
.github/workflows/installer.yml
vendored
4
.github/workflows/installer.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
||||
- macos-latest
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
|
||||
uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2.15.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
@@ -47,7 +47,7 @@ jobs:
|
||||
- test
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
|
||||
uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2.15.0
|
||||
with:
|
||||
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'
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
|
||||
uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2.15.0
|
||||
with:
|
||||
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'
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
|
||||
uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2.15.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
- name: Authenticate as @ohmyzsh
|
||||
|
||||
6
.github/workflows/scorecard.yml
vendored
6
.github/workflows/scorecard.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
|
||||
uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2.15.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
@@ -53,13 +53,13 @@ jobs:
|
||||
publish_results: true
|
||||
|
||||
- name: "Upload artifact"
|
||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: SARIF file
|
||||
path: results.sarif
|
||||
retention-days: 5
|
||||
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
|
||||
uses: github/codeql-action/upload-sarif@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
|
||||
@@ -43,7 +43,7 @@ function colored() {
|
||||
environment+=( PATH="${__colored_man_pages_dir}:$PATH" )
|
||||
fi
|
||||
|
||||
command env $environment "$@"
|
||||
command env "${environment[@]}" "$@"
|
||||
}
|
||||
|
||||
# Colorize man and dman/debman (from debian-goodies)
|
||||
|
||||
@@ -385,9 +385,9 @@ kube_ps1() {
|
||||
local KUBE_PS1_RESET_COLOR="${_KUBE_PS1_OPEN_ESC}${_KUBE_PS1_DEFAULT_FG}${_KUBE_PS1_CLOSE_ESC}"
|
||||
|
||||
# If background color is set, reset color should also reset the background
|
||||
if [[ -n "${KUBE_PS1_BG_COLOR}" ]]; then
|
||||
KUBE_PS1_RESET_COLOR="${_KUBE_PS1_OPEN_ESC}${_KUBE_PS1_DEFAULT_FG}${_KUBE_PS1_DEFAULT_BG}${_KUBE_PS1_CLOSE_ESC}"
|
||||
fi
|
||||
# if [[ -n "${KUBE_PS1_BG_COLOR}" ]]; then
|
||||
# KUBE_PS1_RESET_COLOR="${_KUBE_PS1_OPEN_ESC}${_KUBE_PS1_DEFAULT_FG}${_KUBE_PS1_DEFAULT_BG}${_KUBE_PS1_CLOSE_ESC}"
|
||||
# fi
|
||||
|
||||
# Background Color
|
||||
[[ -n "${KUBE_PS1_BG_COLOR}" ]] && KUBE_PS1+="$(_kube_ps1_color_bg "${KUBE_PS1_BG_COLOR}")"
|
||||
|
||||
20
plugins/molecule/README.md
Normal file
20
plugins/molecule/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Molecule plugin
|
||||
|
||||
This plugin adds aliases and completion for [Molecule](https://ansible.readthedocs.io/projects/molecule/), the
|
||||
project designed to aid in the development and testing of Ansible roles..
|
||||
|
||||
To use it, add `molecule` to the plugins array in your zshrc file:
|
||||
|
||||
```zsh
|
||||
plugins=(... molecule)
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command | Description |
|
||||
| :---- | :---------------- | ---------------------------------------------------------------------------------- |
|
||||
| mol | molecule | Molecule aids in the development and testing of Ansible roles. |
|
||||
| mcr | molecule create | Use the provisioner to start the instances. |
|
||||
| mcon | molecule converge | Use the provisioner to configure instances (dependency, create, prepare converge). |
|
||||
| mls | molecule list | List status of instances. |
|
||||
| mvf | molecule verify | Run automated tests against instances. |
|
||||
22
plugins/molecule/molecule.plugin.zsh
Normal file
22
plugins/molecule/molecule.plugin.zsh
Normal file
@@ -0,0 +1,22 @@
|
||||
# Completion
|
||||
if (( ! $+commands[molecule] )); then
|
||||
return
|
||||
fi
|
||||
|
||||
# If the completion file doesn't exist yet, we need to autoload it and
|
||||
# bind it to `molecule`. Otherwise, compinit will have already done that.
|
||||
if [[ ! -f "$ZSH_CACHE_DIR/completions/_molecule" ]]; then
|
||||
typeset -g -A _comps
|
||||
autoload -Uz _molecule
|
||||
_comps[molecule]=_molecule
|
||||
fi
|
||||
|
||||
_MOLECULE_COMPLETE=zsh_source molecule >| "$ZSH_CACHE_DIR/completions/_molecule" &|
|
||||
|
||||
# Alias
|
||||
# molecule: https://docs.ansible.com/projects/molecule/
|
||||
alias mol='molecule'
|
||||
alias mcr='molecule create'
|
||||
alias mcon='molecule converge'
|
||||
alias mls='molecule list'
|
||||
alias mvf='molecule verify'
|
||||
@@ -5,8 +5,8 @@ if [[ -z $commands[thefuck] ]]; then
|
||||
fi
|
||||
|
||||
# Register alias
|
||||
[[ ! -a $ZSH_CACHE_DIR/thefuck ]] && thefuck --alias > $ZSH_CACHE_DIR/thefuck
|
||||
source $ZSH_CACHE_DIR/thefuck
|
||||
[[ ! -a "$ZSH_CACHE_DIR/thefuck" ]] && thefuck --alias > "$ZSH_CACHE_DIR/thefuck"
|
||||
source "$ZSH_CACHE_DIR/thefuck"
|
||||
|
||||
fuck-command-line() {
|
||||
local FUCK="$(THEFUCK_REQUIRE_CONFIRMATION=0 thefuck $(fc -ln -1 | tail -n 1) 2> /dev/null)"
|
||||
|
||||
@@ -4,6 +4,7 @@ function {
|
||||
$commands[virtualenvwrapper.sh] \
|
||||
/usr/share/virtualenvwrapper/virtualenvwrapper{_lazy,}.sh \
|
||||
/usr/local/bin/virtualenvwrapper{_lazy,}.sh \
|
||||
/usr/bin/virtualenvwrapper{_lazy,}.sh \
|
||||
/etc/bash_completion.d/virtualenvwrapper \
|
||||
/usr/share/bash-completion/completions/virtualenvwrapper \
|
||||
$HOME/.local/bin/virtualenvwrapper.sh
|
||||
|
||||
@@ -22,6 +22,6 @@ plugins=(... yum)
|
||||
| yi | `sudo yum install` | Install package |
|
||||
| ygi | `sudo yum groupinstall` | Install package group |
|
||||
| yr | `sudo yum remove` | Remove package |
|
||||
| ygr | `sudo yum groupremove` | Remove pagage group |
|
||||
| ygr | `sudo yum groupremove` | Remove package group |
|
||||
| yrl | `sudo yum remove --remove-leaves` | Remove package and leaves |
|
||||
| yc | `sudo yum clean all` | Clean yum cache |
|
||||
|
||||
Reference in New Issue
Block a user