Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Use cargo install exa to fix arm64 not supported #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
18 changes: 2 additions & 16 deletions zsh-exa.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,8 @@ _zsh_exa_last_version() {

_zsh_exa_download_install() {
local version=$1
local machine
case "$(uname -m)" in
x86_64)
machine=x86_64
# if on Darwin, set $OSTYPE to match the exa release
[[ "$OSTYPE" == "darwin"* ]] && local OSTYPE=macos
;;
*)
_zsh_exa_log $BOLD "red" "Machine $(uname -m) not supported by this plugin"
return 1
;;
esac
_zsh_exa_log $NONE "blue" " -> download and install exa ${version}"
curl -o "${EXA_HOME}/exa.zip" -fsSL https://github.com/ogham/exa/releases/download/${version}/exa-${OSTYPE%-*}-${machine}-${version}.zip || (_zsh_exa_log $BOLD "red" "Error while downloading exa release" ; return)
unzip -o ${EXA_HOME}/exa.zip -d ${EXA_HOME} 2>&1 > /dev/null
rm -rf ${EXA_HOME}/exa.zip
_zsh_exa_log $NONE "blue" " -> use cargo to install exa ${version}"
cargo install exa
echo ${version} > ${ZSH_EXA_VERSION_FILE}
_zsh_exa_log $BOLD "green" "Install OK"
}
Expand Down