mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-07-03 05:31:17 +02:00
Merge branch 'master' of syshlt-github:/ohmyzsh/ohmyzsh into iw_plugin
This commit is contained in:
commit
f6b750cb24
17 changed files with 54 additions and 52 deletions
2
.github/workflows/dependencies.yml
vendored
2
.github/workflows/dependencies.yml
vendored
|
|
@ -21,7 +21,7 @@ jobs:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Authenticate as @ohmyzsh
|
- name: Authenticate as @ohmyzsh
|
||||||
|
|
|
||||||
4
.github/workflows/installer.yml
vendored
4
.github/workflows/installer.yml
vendored
|
|
@ -31,7 +31,7 @@ jobs:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: Set up git repository
|
- name: Set up git repository
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Install zsh
|
- name: Install zsh
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
run: sudo apt-get update; sudo apt-get install zsh
|
run: sudo apt-get update; sudo apt-get install zsh
|
||||||
|
|
@ -52,7 +52,7 @@ jobs:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Install Vercel CLI
|
- name: Install Vercel CLI
|
||||||
run: npm install -g vercel
|
run: npm install -g vercel
|
||||||
- name: Setup project and deploy
|
- name: Setup project and deploy
|
||||||
|
|
|
||||||
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
|
|
@ -29,7 +29,7 @@ jobs:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: Set up git repository
|
- name: Set up git repository
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Install zsh
|
- name: Install zsh
|
||||||
run: sudo apt-get update; sudo apt-get install zsh
|
run: sudo apt-get update; sudo apt-get install zsh
|
||||||
- name: Check syntax
|
- name: Check syntax
|
||||||
|
|
|
||||||
4
.github/workflows/scorecard.yml
vendored
4
.github/workflows/scorecard.yml
vendored
|
|
@ -41,7 +41,7 @@ jobs:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: "Checkout code"
|
- name: "Checkout code"
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
|
|
@ -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@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
|
uses: github/codeql-action/upload-sarif@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
|
||||||
with:
|
with:
|
||||||
sarif_file: results.sarif
|
sarif_file: results.sarif
|
||||||
|
|
|
||||||
|
|
@ -162,13 +162,13 @@ if zstyle -t ':omz:alpha:lib:git' async-prompt \
|
||||||
# or any of the other prompt variables
|
# or any of the other prompt variables
|
||||||
function _defer_async_git_register() {
|
function _defer_async_git_register() {
|
||||||
# Check if git_prompt_info is used in a prompt variable
|
# Check if git_prompt_info is used in a prompt variable
|
||||||
case "${PS1}:${PS2}:${PS3}:${PS4}:${RPROMPT}:${RPS1}:${RPS2}:${RPS3}:${RPS4}" in
|
case "${PS1}:${PS2}:${PS3}:${PS4}:${RPROMPT-}:${RPS1-}:${RPS2-}:${RPS3-}:${RPS4-}" in
|
||||||
*(\$\(git_prompt_info\)|\`git_prompt_info\`)*)
|
*(\$\(git_prompt_info\)|\`git_prompt_info\`)*)
|
||||||
_omz_register_handler _omz_git_prompt_info
|
_omz_register_handler _omz_git_prompt_info
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "${PS1}:${PS2}:${PS3}:${PS4}:${RPROMPT}:${RPS1}:${RPS2}:${RPS3}:${RPS4}" in
|
case "${PS1}:${PS2}:${PS3}:${PS4}:${RPROMPT-}:${RPS1-}:${RPS2-}:${RPS3-}:${RPS4-}" in
|
||||||
*(\$\(git_prompt_status\)|\`git_prompt_status\`)*)
|
*(\$\(git_prompt_status\)|\`git_prompt_status\`)*)
|
||||||
_omz_register_handler _omz_git_prompt_status
|
_omz_register_handler _omz_git_prompt_status
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
# Functions
|
# Functions
|
||||||
function ansible-version(){
|
function ansible-version() {
|
||||||
ansible --version
|
ansible --version
|
||||||
}
|
}
|
||||||
|
|
||||||
function ansible-role-init(){
|
function ansible-role-init() {
|
||||||
if ! [ -z $1 ] ; then
|
if [[ -n "$1" ]]; then
|
||||||
echo "Ansible Role : $1 Creating...."
|
echo "Ansible Role : $1 Creating...."
|
||||||
ansible-galaxy init $1
|
ansible-galaxy init "$1"
|
||||||
tree $1
|
tree "$1"
|
||||||
else
|
else
|
||||||
echo "Usage : ansible-role-init <role name>"
|
echo "Usage : ansible-role-init <role name>"
|
||||||
echo "Example : ansible-role-init role1"
|
echo "Example : ansible-role-init role1"
|
||||||
|
|
|
||||||
|
|
@ -9,14 +9,14 @@ function agr() {
|
||||||
# Update state file if enabled
|
# Update state file if enabled
|
||||||
function _aws_update_state() {
|
function _aws_update_state() {
|
||||||
if [[ "$AWS_PROFILE_STATE_ENABLED" == true ]]; then
|
if [[ "$AWS_PROFILE_STATE_ENABLED" == true ]]; then
|
||||||
test -d $(dirname ${AWS_STATE_FILE}) || exit 1
|
test -d $(dirname ${AWS_STATE_FILE}) || return 1
|
||||||
echo "${AWS_PROFILE} ${AWS_REGION}" > "${AWS_STATE_FILE}"
|
echo "${AWS_PROFILE} ${AWS_REGION}" > "${AWS_STATE_FILE}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function _aws_clear_state() {
|
function _aws_clear_state() {
|
||||||
if [[ "$AWS_PROFILE_STATE_ENABLED" == true ]]; then
|
if [[ "$AWS_PROFILE_STATE_ENABLED" == true ]]; then
|
||||||
test -d $(dirname ${AWS_STATE_FILE}) || exit 1
|
test -d $(dirname ${AWS_STATE_FILE}) || return 1
|
||||||
echo -n > "${AWS_STATE_FILE}"
|
echo -n > "${AWS_STATE_FILE}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,17 +4,17 @@ This plugin sets up completion and aliases for [Deno](https://deno.land).
|
||||||
|
|
||||||
## Aliases
|
## Aliases
|
||||||
|
|
||||||
| Alias | Full command |
|
| Alias | Full command |
|
||||||
| ----- | ------------------- |
|
| ----- | ---------------- |
|
||||||
| db | deno bundle |
|
| dc | deno compile |
|
||||||
| dc | deno compile |
|
| dca | deno cache |
|
||||||
| dca | deno cache |
|
| dck | deno check |
|
||||||
| dfmt | deno fmt |
|
| dfmt | deno fmt |
|
||||||
| dh | deno help |
|
| dh | deno help |
|
||||||
| dli | deno lint |
|
| dli | deno lint |
|
||||||
| drn | deno run |
|
| drn | deno run |
|
||||||
| drA | deno run -A |
|
| drA | deno run -A |
|
||||||
| drw | deno run --watch |
|
| drw | deno run --watch |
|
||||||
| dru | deno run --unstable |
|
| dsv | deno serve |
|
||||||
| dts | deno test |
|
| dts | deno test |
|
||||||
| dup | deno upgrade |
|
| dup | deno upgrade |
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
# ALIASES
|
# ALIASES
|
||||||
alias db='deno bundle'
|
|
||||||
alias dc='deno compile'
|
alias dc='deno compile'
|
||||||
alias dca='deno cache'
|
alias dca='deno cache'
|
||||||
|
alias dck='deno check'
|
||||||
alias dfmt='deno fmt'
|
alias dfmt='deno fmt'
|
||||||
alias dh='deno help'
|
alias dh='deno help'
|
||||||
alias dli='deno lint'
|
alias dli='deno lint'
|
||||||
alias drn='deno run'
|
alias drn='deno run'
|
||||||
alias drA='deno run -A'
|
alias drA='deno run -A'
|
||||||
alias drw='deno run --watch'
|
alias drw='deno run --watch'
|
||||||
alias dru='deno run --unstable'
|
alias dsv='deno serve'
|
||||||
alias dts='deno test'
|
alias dts='deno test'
|
||||||
alias dup='deno upgrade'
|
alias dup='deno upgrade'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,18 +15,19 @@ of `dnf5` and uses it as drop-in alternative to the slower `dnf`.
|
||||||
|
|
||||||
## Aliases
|
## Aliases
|
||||||
|
|
||||||
| Alias | Command | Description |
|
| Alias | Command | Description |
|
||||||
|-------|-------------------------|--------------------------|
|
|-------|-------------------------------|------------------------------------------|
|
||||||
| dnfl | `dnf list` | List packages |
|
| dnfl | `dnf list` | List packages |
|
||||||
| dnfli | `dnf list --installed` | List installed packages |
|
| dnfli | `dnf list --installed` | List installed packages |
|
||||||
| dnfgl | `dnf grouplist` | List package groups |
|
| dnfgl | `dnf grouplist` | List package groups |
|
||||||
| dnfmc | `dnf makecache` | Generate metadata cache |
|
| dnfmc | `dnf makecache` | Generate metadata cache |
|
||||||
| dnfp | `dnf info` | Show package information |
|
| dnfp | `dnf info` | Show package information |
|
||||||
| dnfs | `dnf search` | Search package |
|
| dnfs | `dnf search` | Search package |
|
||||||
| **Use `sudo`** |
|
| **Use `sudo`** |
|
||||||
| dnfu | `sudo dnf upgrade` | Upgrade package |
|
| dnfu | `sudo dnf upgrade` | Upgrade package |
|
||||||
| dnfi | `sudo dnf install` | Install package |
|
| dnfur | `sudo dnf upgrade --refresh` | Upgrade package (force metadata refresh) |
|
||||||
| dnfgi | `sudo dnf groupinstall` | Install package group |
|
| dnfi | `sudo dnf install` | Install package |
|
||||||
| dnfr | `sudo dnf remove` | Remove package |
|
| dnfgi | `sudo dnf groupinstall` | Install package group |
|
||||||
| dnfgr | `sudo dnf groupremove` | Remove package group |
|
| dnfr | `sudo dnf remove` | Remove package |
|
||||||
| dnfc | `sudo dnf clean all` | Clean cache |
|
| dnfgr | `sudo dnf groupremove` | Remove package group |
|
||||||
|
| dnfc | `sudo dnf clean all` | Clean cache |
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ alias dnfp="${dnfprog} info" # Show package information
|
||||||
alias dnfs="${dnfprog} search" # Search package
|
alias dnfs="${dnfprog} search" # Search package
|
||||||
|
|
||||||
alias dnfu="sudo ${dnfprog} upgrade" # Upgrade package
|
alias dnfu="sudo ${dnfprog} upgrade" # Upgrade package
|
||||||
|
alias dnfur="sudo ${dnfprog} upgrade --refresh" # Upgrade package and refresh repos
|
||||||
alias dnfi="sudo ${dnfprog} install" # Install package
|
alias dnfi="sudo ${dnfprog} install" # Install package
|
||||||
alias dnfr="sudo ${dnfprog} remove" # Remove package
|
alias dnfr="sudo ${dnfprog} remove" # Remove package
|
||||||
alias dnfc="sudo ${dnfprog} clean all" # Clean cache
|
alias dnfc="sudo ${dnfprog} clean all" # Clean cache
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ Requirements
|
||||||
Install
|
Install
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
Using the [Homebrew]( https://brew.sh ) package manager:
|
Using the [Homebrew](https://brew.sh) package manager:
|
||||||
|
|
||||||
brew install zsh-history-substring-search
|
brew install zsh-history-substring-search
|
||||||
echo 'source $(brew --prefix)/share/zsh-history-substring-search/zsh-history-substring-search.zsh' >> ~/.zshrc
|
echo 'source $(brew --prefix)/share/zsh-history-substring-search/zsh-history-substring-search.zsh' >> ~/.zshrc
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ alias puo="sudo port upgrade outdated"
|
||||||
alias pup="sudo port selfupdate && sudo port upgrade outdated"
|
alias pup="sudo port selfupdate && sudo port upgrade outdated"
|
||||||
|
|
||||||
port-livecheck-maintainer() {
|
port-livecheck-maintainer() {
|
||||||
(( ${+commands[port]} == 0 )) || {
|
(( ${+commands[port]} )) || {
|
||||||
print -- "port: not found" >&2
|
print -- "port: not found" >&2
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ typeset -g VI_MODE_CURSOR_OPPEND=${VI_MODE_CURSOR_OPPEND:=0}
|
||||||
typeset -g VI_KEYMAP=${VI_KEYMAP:=main}
|
typeset -g VI_KEYMAP=${VI_KEYMAP:=main}
|
||||||
|
|
||||||
function _vi-mode-set-cursor-shape-for-keymap() {
|
function _vi-mode-set-cursor-shape-for-keymap() {
|
||||||
[[ "$VI_MODE_SET_CURSOR" = true ]] || return
|
[[ "$VI_MODE_SET_CURSOR" = true ]] || return 0
|
||||||
|
|
||||||
# https://vt100.net/docs/vt510-rm/DECSCUSR
|
# https://vt100.net/docs/vt510-rm/DECSCUSR
|
||||||
local _shape=0
|
local _shape=0
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ Available search contexts are:
|
||||||
| `gopkg` | `https://pkg.go.dev/search?m=package&q=` |
|
| `gopkg` | `https://pkg.go.dev/search?m=package&q=` |
|
||||||
| `chatgpt` | `https://chatgpt.com/?q=` |
|
| `chatgpt` | `https://chatgpt.com/?q=` |
|
||||||
| `claudeai` | `https://claude.ai/new?q=` |
|
| `claudeai` | `https://claude.ai/new?q=` |
|
||||||
| `grok` | `https://grok.com/?q=` |
|
| `grokcom` | `https://grok.com/?q=` |
|
||||||
| `reddit` | `https://www.reddit.com/search/?q=` |
|
| `reddit` | `https://www.reddit.com/search/?q=` |
|
||||||
| `ppai` | `https://www.perplexity.ai/search/new?q=` |
|
| `ppai` | `https://www.perplexity.ai/search/new?q=` |
|
||||||
| `rscrate` | `https://crates.io/search?q=` |
|
| `rscrate` | `https://crates.io/search?q=` |
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ alias npmpkg='web_search npmpkg'
|
||||||
alias packagist='web_search packagist'
|
alias packagist='web_search packagist'
|
||||||
alias gopkg='web_search gopkg'
|
alias gopkg='web_search gopkg'
|
||||||
alias chatgpt='web_search chatgpt'
|
alias chatgpt='web_search chatgpt'
|
||||||
alias grok='web_search grok'
|
alias grokcom='web_search grok'
|
||||||
alias claudeai='web_search claudeai'
|
alias claudeai='web_search claudeai'
|
||||||
alias reddit='web_search reddit'
|
alias reddit='web_search reddit'
|
||||||
alias ppai='web_search ppai'
|
alias ppai='web_search ppai'
|
||||||
|
|
|
||||||
|
|
@ -473,7 +473,7 @@ EOF
|
||||||
# be prompted for the password either way, so this shouldn't cause any issues.
|
# be prompted for the password either way, so this shouldn't cause any issues.
|
||||||
#
|
#
|
||||||
if user_can_sudo; then
|
if user_can_sudo; then
|
||||||
sudo -k >/dev/null 2>&1 # -k forces the password prompt
|
sudo -k >/dev/null 2>&1 || true # -k forces the password prompt when supported
|
||||||
sudo chsh -s "$zsh" "$USER"
|
sudo chsh -s "$zsh" "$USER"
|
||||||
else
|
else
|
||||||
chsh -s "$zsh" "$USER" # run chsh normally
|
chsh -s "$zsh" "$USER" # run chsh normally
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue