Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/shell/bash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl Shell for Bash {
local command
command="${{1:-}}"
if [ "$#" = 0 ]; then
command {exe}
command '{exe}'
return
fi
shift
Expand All @@ -47,12 +47,12 @@ impl Shell for Bash {
deactivate|shell|sh)
# if argv doesn't contains -h,--help
if [[ ! " $@ " =~ " --help " ]] && [[ ! " $@ " =~ " -h " ]]; then
eval "$(command {exe} "$command" "$@")"
eval "$(command '{exe}' "$command" "$@")"
return $?
fi
;;
esac
command {exe} "$command" "$@"
command '{exe}' "$command" "$@"
}}

_mise_hook() {{
Expand Down Expand Up @@ -85,7 +85,7 @@ impl Shell for Bash {
fi

command_not_found_handle() {{
if [[ "$1" != "mise" && "$1" != "mise-"* ]] && {exe} hook-not-found -s bash -- "$1"; then
if [[ "$1" != "mise" && "$1" != "mise-"* ]] && '{exe}' hook-not-found -s bash -- "$1"; then
_mise_hook
"$@"
elif [ -n "$(declare -f _command_not_found_handle)" ]; then
Expand Down
8 changes: 4 additions & 4 deletions src/shell/snapshots/mise__shell__bash__tests__activate.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ mise() {
local command
command="${1:-}"
if [ "$#" = 0 ]; then
command /some/dir/mise
command '/some/dir/mise'
return
fi
shift
Expand All @@ -23,12 +23,12 @@ mise() {
deactivate|shell|sh)
# if argv doesn't contains -h,--help
if [[ ! " $@ " =~ " --help " ]] && [[ ! " $@ " =~ " -h " ]]; then
eval "$(command /some/dir/mise "$command" "$@")"
eval "$(command '/some/dir/mise' "$command" "$@")"
return $?
fi
;;
esac
command /some/dir/mise "$command" "$@"
command '/some/dir/mise' "$command" "$@"
}

_mise_hook() {
Expand Down Expand Up @@ -77,7 +77,7 @@ if [ -z "${_mise_cmd_not_found:-}" ]; then
fi

command_not_found_handle() {
if [[ "$1" != "mise" && "$1" != "mise-"* ]] && /some/dir/mise hook-not-found -s bash -- "$1"; then
if [[ "$1" != "mise" && "$1" != "mise-"* ]] && '/some/dir/mise' hook-not-found -s bash -- "$1"; then
_mise_hook
"$@"
elif [ -n "$(declare -f _command_not_found_handle)" ]; then
Expand Down
Loading