fix(posix-shell): fix on checking command exist

Use `command -v $CMD >/dev/null 2>&1` to check if command exist
This commit is contained in:
js0ny 2025-02-23 20:31:13 +00:00
parent 8aa9daf582
commit f3333d2292
7 changed files with 470 additions and 479 deletions

View file

@ -25,7 +25,7 @@ alias ollama="ollama.exe"
open() {
local target=$1
if command -v "$FILE_EXPLORER" > /dev/null; then
if command -v "$FILE_EXPLORER" >/dev/null 2>&1; then
"$FILE_EXPLORER" "$target"
else
command open "$target"