Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Better zsh install fix (#14017)
Conrad Irwin0d527dfb9e1b
diff --git a/script/install.sh b/script/install.shindex 4141ae49a02..d5c2758f170 100755--- a/script/install.sh+++ b/script/install.sh@@ -44,6 +44,26 @@ main() {fi"$platform" "$@"++ if [ "$(which "zed")" = "$HOME/.local/bin/zed" ]; then+ echo "Zed has been installed. Run with 'zed'"+ else+ echo "To run Zed from your terminal, you must add ~/.local/bin to your PATH"+ echo "Run:"++ case "$SHELL" in+ *zsh)+ echo " echo 'export PATH=\$HOME/.local/bin:\$PATH' >> ~/.zshrc"+ echo " source ~/.zshrc"+ ;;+ *)+ echo " echo 'export PATH=\$HOME/.local/bin:\$PATH' >> ~/.bashrc"+ echo " source ~/.bashrc"+ ;;+ esac++ echo "To run Zed now, '~/.local/bin/zed'"+ fi}linux() {@@ -100,16 +120,6 @@ linux() {cp "$HOME/.local/zed$suffix.app/share/applications/zed$suffix.desktop" "${desktop_file_path}"sed -i "s|Icon=zed|Icon=$HOME/.local/zed$suffix.app/share/icons/hicolor/512x512/apps/zed.png|g" "${desktop_file_path}"sed -i "s|Exec=zed|Exec=$HOME/.local/zed$suffix.app/libexec/zed-editor|g" "${desktop_file_path}"-- if which "zed" >/dev/null 2>&1; then- echo "Zed has been installed. Run with 'zed'"- else- echo "To run Zed from your terminal, you must add ~/.local/bin to your PATH"- echo "Run:"- echo " echo 'export PATH=\$HOME/.local/bin:\$PATH' >> ~/.bashrc"- echo " source ~/.bashrc"- echo "To run Zed now, '~/.local/bin/zed'"- fi}macos() {@@ -128,26 +138,6 @@ macos() {mkdir -p "$HOME/.local/bin"# Link the binaryln -sf "/Applications/$app/Contents/MacOS/cli" "$HOME/.local/bin/zed"-- if [ "$(which "zed")" = "$HOME/.local/bin/zed" ]; then- echo "Zed has been installed. Run with 'zed'"- else- echo "To run Zed from your terminal, you must add ~/.local/bin to your PATH"- echo "Run:"-- case "$SHELL" in- *zsh)- echo " echo 'export PATH=\$HOME/.local/bin:\$PATH' >> ~/.zshrc"- echo " source ~/.zshrc"- ;;- *)- echo " echo 'export PATH=\$HOME/.local/bin:\$PATH' >> ~/.bashrc"- echo " source ~/.bashrc"- ;;- esac-- echo "To run Zed now, '~/.local/bin/zed'"- fi}main "$@"