mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-02-18 15:21:01 +01:00
Compare commits
12 Commits
db66764f46
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44f2a128aa | ||
|
|
45dd7d006a | ||
|
|
993afc8267 | ||
|
|
a8aca3fba5 | ||
|
|
cdd31a7ab3 | ||
|
|
88659ed193 | ||
|
|
41c5b9677a | ||
|
|
116be8badd | ||
|
|
9df4ea095f | ||
|
|
1a253c375a | ||
|
|
67cd8c4673 | ||
|
|
0074e724f8 |
4
.github/workflows/dependencies.yml
vendored
4
.github/workflows/dependencies.yml
vendored
@@ -13,12 +13,12 @@ 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@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Authenticate as @ohmyzsh
|
- name: Authenticate as @ohmyzsh
|
||||||
|
|||||||
8
.github/workflows/installer.yml
vendored
8
.github/workflows/installer.yml
vendored
@@ -26,12 +26,12 @@ 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@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: Set up git repository
|
- name: Set up git repository
|
||||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
- 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
|
||||||
@@ -47,12 +47,12 @@ 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@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
- 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
|
||||||
|
|||||||
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
@@ -24,12 +24,12 @@ 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@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: Set up git repository
|
- name: Set up git repository
|
||||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
- 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
|
||||||
|
|||||||
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@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
- name: Authenticate as @ohmyzsh
|
- name: Authenticate as @ohmyzsh
|
||||||
|
|||||||
6
.github/workflows/scorecard.yml
vendored
6
.github/workflows/scorecard.yml
vendored
@@ -36,12 +36,12 @@ 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@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: "Checkout code"
|
- name: "Checkout code"
|
||||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
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@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10
|
uses: github/codeql-action/upload-sarif@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
|
||||||
with:
|
with:
|
||||||
sarif_file: results.sarif
|
sarif_file: results.sarif
|
||||||
|
|||||||
@@ -40,9 +40,9 @@ if [[ -z "$LS_COLORS" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
function test-ls-args {
|
function test-ls-args {
|
||||||
local cmd="$1" # ls, gls, colorls, ...
|
# Usage: test-ls-args cmd args...
|
||||||
local args="${@[2,-1]}" # arguments except the first one
|
# e.g. test-ls-args gls --color
|
||||||
command "$cmd" "$args" /dev/null &>/dev/null
|
command "$@" /dev/null &>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
# Find the option for using colors in ls, depending on the version
|
# Find the option for using colors in ls, depending on the version
|
||||||
|
|||||||
@@ -6,14 +6,22 @@ command -v dnf5 > /dev/null && dnfprog=dnf5
|
|||||||
|
|
||||||
alias dnfl="${dnfprog} list" # List packages
|
alias dnfl="${dnfprog} list" # List packages
|
||||||
alias dnfli="${dnfprog} list installed" # List installed packages
|
alias dnfli="${dnfprog} list installed" # List installed packages
|
||||||
alias dnfgl="${dnfprog} grouplist" # List package groups
|
|
||||||
alias dnfmc="${dnfprog} makecache" # Generate metadata cache
|
alias dnfmc="${dnfprog} makecache" # Generate metadata cache
|
||||||
alias dnfp="${dnfprog} info" # Show package information
|
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 dnfi="sudo ${dnfprog} install" # Install package
|
alias dnfi="sudo ${dnfprog} install" # Install package
|
||||||
alias dnfgi="sudo ${dnfprog} groupinstall" # Install package group
|
|
||||||
alias dnfr="sudo ${dnfprog} remove" # Remove package
|
alias dnfr="sudo ${dnfprog} remove" # Remove package
|
||||||
alias dnfgr="sudo ${dnfprog} groupremove" # Remove package group
|
|
||||||
alias dnfc="sudo ${dnfprog} clean all" # Clean cache
|
alias dnfc="sudo ${dnfprog} clean all" # Clean cache
|
||||||
|
|
||||||
|
# Conditional aliases based on dnfprog value
|
||||||
|
if [[ "${dnfprog}" == "dnf5" ]]; then
|
||||||
|
alias dnfgl="${dnfprog} group list" # List package groups (dnf5)
|
||||||
|
alias dnfgi="sudo ${dnfprog} group install" # Install package group (dnf5)
|
||||||
|
alias dnfgr="sudo ${dnfprog} group remove" # Remove package group (dnf5)
|
||||||
|
else
|
||||||
|
alias dnfgl="${dnfprog} grouplist" # List package groups (dnf)
|
||||||
|
alias dnfgi="sudo ${dnfprog} groupinstall" # Install package group (dnf)
|
||||||
|
alias dnfgr="sudo ${dnfprog} groupremove" # Remove package group (dnf)
|
||||||
|
fi
|
||||||
|
|||||||
@@ -78,6 +78,14 @@ change.
|
|||||||
NOTE: if a directory is found in both the allowed and disallowed lists, the disallowed list
|
NOTE: if a directory is found in both the allowed and disallowed lists, the disallowed list
|
||||||
takes preference, _i.e._ the .env file will never be sourced.
|
takes preference, _i.e._ the .env file will never be sourced.
|
||||||
|
|
||||||
|
## Named Pipe (FIFO) Support
|
||||||
|
|
||||||
|
The plugin supports `.env` files provided as UNIX named pipes (FIFOs) in addition to regular files.
|
||||||
|
This is useful when secrets managers like [1Password Environments](https://developer.1password.com/docs/environment/)
|
||||||
|
mount `.env` files as named pipes to inject secrets on-the-fly without writing them to disk.
|
||||||
|
|
||||||
|
No additional configuration is required — the plugin automatically detects and sources named pipes.
|
||||||
|
|
||||||
## Version Control
|
## Version Control
|
||||||
|
|
||||||
**It's strongly recommended to add `.env` file to `.gitignore`**, because usually it contains sensitive information such as your credentials, secret keys, passwords etc. You don't want to commit this file, it's supposed to be local only.
|
**It's strongly recommended to add `.env` file to `.gitignore`**, because usually it contains sensitive information such as your credentials, secret keys, passwords etc. You don't want to commit this file, it's supposed to be local only.
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
## Functions
|
## Functions
|
||||||
|
|
||||||
source_env() {
|
source_env() {
|
||||||
if [[ ! -f "$ZSH_DOTENV_FILE" ]]; then
|
if [[ ! -f "$ZSH_DOTENV_FILE" ]] && [[ ! -p "$ZSH_DOTENV_FILE" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ if [[ -z $commands[thefuck] ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Register alias
|
# Register alias
|
||||||
[[ ! -a $ZSH_CACHE_DIR/thefuck ]] && thefuck --alias > $ZSH_CACHE_DIR/thefuck
|
[[ ! -a "$ZSH_CACHE_DIR/thefuck" ]] && thefuck --alias > "$ZSH_CACHE_DIR/thefuck"
|
||||||
source $ZSH_CACHE_DIR/thefuck
|
source "$ZSH_CACHE_DIR/thefuck"
|
||||||
|
|
||||||
fuck-command-line() {
|
fuck-command-line() {
|
||||||
local FUCK="$(THEFUCK_REQUIRE_CONFIRMATION=0 thefuck $(fc -ln -1 | tail -n 1) 2> /dev/null)"
|
local FUCK="$(THEFUCK_REQUIRE_CONFIRMATION=0 thefuck $(fc -ln -1 | tail -n 1) 2> /dev/null)"
|
||||||
|
|||||||
@@ -55,9 +55,9 @@ _nlist_cursor_visibility() {
|
|||||||
[ "$1" = "1" ] && { tput cvvis; tput cnorm }
|
[ "$1" = "1" ] && { tput cvvis; tput cnorm }
|
||||||
[ "$1" = "0" ] && tput civis
|
[ "$1" = "0" ] && tput civis
|
||||||
elif [ "$_nlist_has_terminfo" = "1" ]; then
|
elif [ "$_nlist_has_terminfo" = "1" ]; then
|
||||||
[ "$1" = "1" ] && { [ -n $terminfo[cvvis] ] && echo -n $terminfo[cvvis];
|
[ "$1" = "1" ] && { [ -n "$terminfo[cvvis]" ] && echo -n "$terminfo[cvvis]";
|
||||||
[ -n $terminfo[cnorm] ] && echo -n $terminfo[cnorm] }
|
[ -n "$terminfo[cnorm]" ] && echo -n "$terminfo[cnorm]" }
|
||||||
[ "$1" = "0" ] && [ -n $terminfo[civis] ] && echo -n $terminfo[civis]
|
[ "$1" = "0" ] && [ -n "$terminfo[civis]" ] && echo -n "$terminfo[civis]"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user