mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
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:
parent
8aa9daf582
commit
f3333d2292
7 changed files with 470 additions and 479 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue