From 483dd30e187c00da49468b5e33c258fa86edd224 Mon Sep 17 00:00:00 2001 From: Izhar Ameer Shaikh Date: Wed, 8 May 2024 23:44:35 -0700 Subject: [PATCH] shell-integration/ssh: Support arch=arm64, for MacOS On some Macs (e.g. M1, 2020), `uname` returns 'Darwin' and `uname -m` retuns 'arm64', this case is not handled in shell-integration. As a result, ssh kitten transfer fails with: >> Unknown CPU architecture arm64 Fix this by adding the case for arch=arm64 in kitten and kitty shell-integration scripts. Tested this on Mac Pro (M1, 2020). --- shell-integration/ssh/kitten | 1 + shell-integration/ssh/kitty | 1 + 2 files changed, 2 insertions(+) diff --git a/shell-integration/ssh/kitten b/shell-integration/ssh/kitten index d2cf49442..4375eca47 100755 --- a/shell-integration/ssh/kitten +++ b/shell-integration/ssh/kitten @@ -72,6 +72,7 @@ case "$(command uname -m)" in amd64|x86_64) arch="amd64";; aarch64*) arch="arm64";; armv8*) arch="arm64";; + arm64) arch="arm64";; arm|armv7l) arch="arm";; i386) arch="386";; i686) arch="386";; diff --git a/shell-integration/ssh/kitty b/shell-integration/ssh/kitty index 3cc6b7c3d..cd2b5600f 100755 --- a/shell-integration/ssh/kitty +++ b/shell-integration/ssh/kitty @@ -78,6 +78,7 @@ if [ "$OS" = "linux" ]; then amd64|x86_64) arch="x86_64";; aarch64*) arch="arm64";; armv8*) arch="arm64";; + arm64) arch="arm64";; i386) arch="i686";; i686) arch="i686";; *) die "Unknown CPU architecture $(command uname -m)";;