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
13 changes: 7 additions & 6 deletions src/shell_snippets/pixi-bash.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# shellcheck shell=bash
pixi() {
local first_arg="$1"
local cmd="$PIXI_EXE $*"
local first_arg="${1-}"

eval "$cmd"
"${PIXI_EXE-}" "$@" || return $?

case "$first_arg" in
case "${first_arg-}" in
add|a|remove|rm|install|i)
eval "$($PIXI_EXE shell-hook --change-ps1 false)"
eval "$("$PIXI_EXE" shell-hook --change-ps1 false)"
hash -r
;;
esac
esac || :

return 0
}
13 changes: 7 additions & 6 deletions src/shell_snippets/pixi-zsh.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# shellcheck disable=all
pixi() {
local first_arg="$1"
local cmd="$PIXI_EXE $*"
local first_arg="${1-}"

eval "$cmd"
"${PIXI_EXE-}" "$@" || return $?

case "$first_arg" in
case "${first_arg-}" in
add|a|remove|rm|install|i)
eval "$($PIXI_EXE shell-hook --change-ps1 false)"
eval "$("$PIXI_EXE" shell-hook --change-ps1 false)"
rehash # Clear the command hash table in zsh
;;
esac
esac || :

return 0
}
Loading