mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-02-16 22:31:03 +01:00
Compare commits
5 Commits
41c5b9677a
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45dd7d006a | ||
|
|
993afc8267 | ||
|
|
a8aca3fba5 | ||
|
|
cdd31a7ab3 | ||
|
|
88659ed193 |
2
.github/workflows/scorecard.yml
vendored
2
.github/workflows/scorecard.yml
vendored
@@ -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@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2
|
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
|
||||||
|
|
||||||
|
|||||||
@@ -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