Skip to content

Commit 88659ed

Browse files
rangaNPmcornella
andauthored
fix(appearance): ensure arg separation in test-ls-args (ohmyzsh#13556)
Co-authored-by: Marc Cornellà <marc@mcornella.com>
1 parent 41c5b96 commit 88659ed

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/theme-and-appearance.zsh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ if [[ -z "$LS_COLORS" ]]; then
4040
fi
4141

4242
function test-ls-args {
43-
local cmd="$1" # ls, gls, colorls, ...
44-
local args="${@[2,-1]}" # arguments except the first one
45-
command "$cmd" "$args" /dev/null &>/dev/null
43+
# Usage: test-ls-args cmd args...
44+
# e.g. test-ls-args gls --color
45+
command "$@" /dev/null &>/dev/null
4646
}
4747

4848
# Find the option for using colors in ls, depending on the version

0 commit comments

Comments
 (0)