mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-02-17 06:40:57 +01:00
Compare commits
9 Commits
67cd8c4673
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45dd7d006a | ||
|
|
993afc8267 | ||
|
|
a8aca3fba5 | ||
|
|
cdd31a7ab3 | ||
|
|
88659ed193 | ||
|
|
41c5b9677a | ||
|
|
116be8badd | ||
|
|
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
|
||||
steps:
|
||||
- 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:
|
||||
egress-policy: audit
|
||||
|
||||
|
||||
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@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
||||
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
@@ -47,7 +47,7 @@ jobs:
|
||||
- test
|
||||
steps:
|
||||
- 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:
|
||||
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@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
||||
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
|
||||
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@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
||||
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
|
||||
with:
|
||||
egress-policy: audit
|
||||
- name: Authenticate as @ohmyzsh
|
||||
|
||||
4
.github/workflows/scorecard.yml
vendored
4
.github/workflows/scorecard.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- 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:
|
||||
egress-policy: audit
|
||||
|
||||
@@ -60,6 +60,6 @@ jobs:
|
||||
retention-days: 5
|
||||
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@19b2f06db2b6f5108140aeb04014ef02b648f789 # v4.31.11
|
||||
uses: github/codeql-action/upload-sarif@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
|
||||
@@ -40,9 +40,9 @@ if [[ -z "$LS_COLORS" ]]; then
|
||||
fi
|
||||
|
||||
function test-ls-args {
|
||||
local cmd="$1" # ls, gls, colorls, ...
|
||||
local args="${@[2,-1]}" # arguments except the first one
|
||||
command "$cmd" "$args" /dev/null &>/dev/null
|
||||
# Usage: test-ls-args cmd args...
|
||||
# e.g. test-ls-args gls --color
|
||||
command "$@" /dev/null &>/dev/null
|
||||
}
|
||||
|
||||
# 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 dnfli="${dnfprog} list installed" # List installed packages
|
||||
alias dnfgl="${dnfprog} grouplist" # List package groups
|
||||
alias dnfmc="${dnfprog} makecache" # Generate metadata cache
|
||||
alias dnfp="${dnfprog} info" # Show package information
|
||||
alias dnfs="${dnfprog} search" # Search package
|
||||
|
||||
alias dnfu="sudo ${dnfprog} upgrade" # Upgrade package
|
||||
alias dnfi="sudo ${dnfprog} install" # Install package
|
||||
alias dnfgi="sudo ${dnfprog} groupinstall" # Install package group
|
||||
alias dnfr="sudo ${dnfprog} remove" # Remove package
|
||||
alias dnfgr="sudo ${dnfprog} groupremove" # Remove package group
|
||||
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
|
||||
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
|
||||
|
||||
**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
|
||||
|
||||
source_env() {
|
||||
if [[ ! -f "$ZSH_DOTENV_FILE" ]]; then
|
||||
if [[ ! -f "$ZSH_DOTENV_FILE" ]] && [[ ! -p "$ZSH_DOTENV_FILE" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
|
||||
@@ -55,9 +55,9 @@ _nlist_cursor_visibility() {
|
||||
[ "$1" = "1" ] && { tput cvvis; tput cnorm }
|
||||
[ "$1" = "0" ] && tput civis
|
||||
elif [ "$_nlist_has_terminfo" = "1" ]; then
|
||||
[ "$1" = "1" ] && { [ -n $terminfo[cvvis] ] && echo -n $terminfo[cvvis];
|
||||
[ -n $terminfo[cnorm] ] && echo -n $terminfo[cnorm] }
|
||||
[ "$1" = "0" ] && [ -n $terminfo[civis] ] && echo -n $terminfo[civis]
|
||||
[ "$1" = "1" ] && { [ -n "$terminfo[cvvis]" ] && echo -n "$terminfo[cvvis]";
|
||||
[ -n "$terminfo[cnorm]" ] && echo -n "$terminfo[cnorm]" }
|
||||
[ "$1" = "0" ] && [ -n "$terminfo[civis]" ] && echo -n "$terminfo[civis]"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user