mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-11-30 12:23:04 +01:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
adf9eeea22 |
No files matched your search
@@ -1,7 +1,7 @@
|
||||
certifi==2026.11.20
|
||||
charset-normalizer==3.5.3
|
||||
certifi==2026.10.23
|
||||
charset-normalizer==3.5.2
|
||||
idna==3.20
|
||||
PyYAML==6.0.4
|
||||
PyYAML==6.0.3
|
||||
requests==2.34.2
|
||||
semver==3.1.3
|
||||
semver==3.1.2
|
||||
urllib3==2.8.0
|
||||
@@ -49,7 +49,7 @@ jobs:
|
||||
- name: Set up git repository
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
||||
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
||||
with:
|
||||
python-version: '3.14'
|
||||
- name: Install dependencies
|
||||
|
||||
@@ -60,6 +60,6 @@ jobs:
|
||||
retention-days: 5
|
||||
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5
|
||||
uses: github/codeql-action/upload-sarif@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
@@ -2,8 +2,6 @@
|
||||
# P.C. Shyamshankar <sykora@lucentbeing.com>
|
||||
# Copied from https://github.com/sykora/etc/blob/master/zsh/functions/spectrum/
|
||||
|
||||
autoload -Uz is-at-least
|
||||
|
||||
typeset -AHg FX FG BG
|
||||
|
||||
FX=(
|
||||
@@ -20,16 +18,7 @@ FX=(
|
||||
() {
|
||||
setopt localoptions noksharrays
|
||||
local -a codes fg bg
|
||||
local code
|
||||
codes=({000..255})
|
||||
# ${a:^b} array zipping needs zsh 5.0.6
|
||||
if ! is-at-least 5.0.6; then
|
||||
for code in $codes; do
|
||||
FG[$code]="%{"$'\e'"[38;5;${code}m%}"
|
||||
BG[$code]="%{"$'\e'"[48;5;${code}m%}"
|
||||
done
|
||||
return
|
||||
fi
|
||||
fg=( "%{"$'\e'"[38;5;"${^codes}"m%}" )
|
||||
bg=( "%{"$'\e'"[48;5;"${^codes}"m%}" )
|
||||
FG=( ${codes:^fg} )
|
||||
|
||||
@@ -177,6 +177,7 @@ plugins=(... git)
|
||||
| `grhh` | `git reset --hard` |
|
||||
| `grhk` | `git reset --keep` |
|
||||
| `grhs` | `git reset --soft` |
|
||||
| `grpa` | `git reset --patch` |
|
||||
| `gpristine` | `git reset --hard && git clean --force -dfx` |
|
||||
| `gwipe` | `git reset --hard && git clean --force -df` |
|
||||
| `groh` | `git reset origin/$(git_current_branch) --hard` |
|
||||
|
||||
@@ -378,6 +378,7 @@ alias gru='git reset --'
|
||||
alias grhh='git reset --hard'
|
||||
alias grhk='git reset --keep'
|
||||
alias grhs='git reset --soft'
|
||||
alias grpa='git reset --patch'
|
||||
alias gpristine='git reset --hard && git clean --force -dfx'
|
||||
alias gwipe='git reset --hard && git clean --force -df'
|
||||
alias groh='git reset origin/$(git_current_branch) --hard'
|
||||
|
||||
@@ -28,10 +28,10 @@ lsk() {
|
||||
# Example
|
||||
# sqs-send user user.json
|
||||
sqs-send(){
|
||||
if [ -z "$1" ] || [ -z "$2" ]; then
|
||||
echo "Use: sqs-send <queue> <payload>" >&2
|
||||
if [ -z "$1" ]; then
|
||||
echo "Use: sqs-send <queue> <payload>"
|
||||
return 1
|
||||
fi
|
||||
|
||||
curl -X POST "http://localhost:4566/000000000000/$1" -d "Action=SendMessage" -d "MessageBody=$(cat "$2")"
|
||||
curl -X POST "http://localhost:4566/000000000000/$1" -d "Action=SendMessage" -d "MessageBody=$(cat $2)"
|
||||
}
|
||||
@@ -12,14 +12,6 @@ plugins=(... terraform)
|
||||
## Requirements
|
||||
|
||||
- [Terraform](https://terraform.io/)
|
||||
- [terraform-docs](https://terraform-docs.io/) (optional, for completion)
|
||||
|
||||
## terraform-docs completion
|
||||
|
||||
If `terraform-docs` is installed, this plugin also enables its completion.
|
||||
The completion script is generated from the installed version and cached in
|
||||
`$ZSH_CACHE_DIR/completions/_terraform-docs`. It is refreshed in the background
|
||||
each time the plugin loads, so completion stays in sync with the installed CLI.
|
||||
|
||||
## Aliases
|
||||
|
||||
|
||||
@@ -39,23 +39,3 @@ alias tfsh='terraform show'
|
||||
alias tfw='terraform workspace'
|
||||
alias tfwl='terraform workspace list'
|
||||
alias tfws='terraform workspace select'
|
||||
|
||||
if (( $+commands[terraform-docs] )); then
|
||||
# If the completion file doesn't exist yet, compinit hasn't registered it.
|
||||
if [[ ! -f "$ZSH_CACHE_DIR/completions/_terraform-docs" ]]; then
|
||||
typeset -g -A _comps
|
||||
autoload -Uz _terraform-docs
|
||||
_comps[terraform-docs]=_terraform-docs
|
||||
fi
|
||||
|
||||
zmodload -F zsh/files b:zf_mv
|
||||
() {
|
||||
local completions
|
||||
completions=$(command terraform-docs completion zsh) || return
|
||||
[[ -n "$completions" ]] || return
|
||||
|
||||
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._terraform-docs"
|
||||
zf_mv -f -- =(print -r -- "$completions") \
|
||||
"$ZSH_CACHE_DIR/completions/_terraform-docs"
|
||||
} &|
|
||||
fi
|
||||
@@ -4,9 +4,7 @@
|
||||
|
||||
To use it, add thefuck to the plugins array of your zshrc file:
|
||||
|
||||
```zsh
|
||||
plugins=(... thefuck)
|
||||
```
|
||||
|
||||
## Usage
|
||||
Press `ESC` twice to correct previous console command.
|
||||
|
||||
@@ -43,32 +43,12 @@ function _vi-mode-set-cursor-shape-for-keymap() {
|
||||
printf $'\e[%d q' "${_shape}"
|
||||
}
|
||||
|
||||
autoload -Uz is-at-least
|
||||
if is-at-least 5.3; then
|
||||
# Visual mode doesn't change $KEYMAP, it only activates the region, so
|
||||
# zle-keymap-select never runs when it starts or ends
|
||||
function _vi-mode-zle-line-pre-redraw() {
|
||||
if [[ "$KEYMAP" = vicmd ]] && (( REGION_ACTIVE )); then
|
||||
[[ "$VI_KEYMAP" != visual ]] || return 0
|
||||
typeset -g VI_KEYMAP=visual
|
||||
elif [[ "$VI_KEYMAP" = visual ]]; then
|
||||
typeset -g VI_KEYMAP=$KEYMAP
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
_vi-mode-set-cursor-shape-for-keymap "$VI_KEYMAP"
|
||||
}
|
||||
autoload -Uz add-zle-hook-widget
|
||||
add-zle-hook-widget zle-line-pre-redraw _vi-mode-zle-line-pre-redraw
|
||||
else
|
||||
# zle-line-pre-redraw needs zsh 5.3
|
||||
function _visual-mode {
|
||||
typeset -g VI_KEYMAP=visual
|
||||
_vi-mode-set-cursor-shape-for-keymap "$VI_KEYMAP"
|
||||
zle .visual-mode
|
||||
}
|
||||
zle -N visual-mode _visual-mode
|
||||
fi
|
||||
function _visual-mode {
|
||||
typeset -g VI_KEYMAP=visual
|
||||
_vi-mode-set-cursor-shape-for-keymap "$VI_KEYMAP"
|
||||
zle .visual-mode
|
||||
}
|
||||
zle -N visual-mode _visual-mode
|
||||
|
||||
function _vi-mode-should-reset-prompt() {
|
||||
# If $VI_MODE_RESET_PROMPT_ON_MODE_CHANGE is unset (default), dynamically
|
||||
|
||||
Reference in new issue
Block a user