1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2026-02-11 05:39:45 +08:00

Compare commits

...

3 Commits

Author SHA1 Message Date
Ranga Nirmal
6f79e0b171
Merge bd6563f02d into 41c5b9677a 2026-02-10 19:21:59 +00:00
Marc Cornellà
bd6563f02d
Simplify 2026-02-10 20:21:55 +01:00
ranga-nir
3e21d93c84 fix(lib): use shift+"$@" in test-ls-args to preserve argument separation 2026-02-08 09:25:21 +05:30

View File

@ -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