星船启动!
原文 How to start a Starship
So the story begins with an acquisition, which is something worth celebrating. [Fig](https://fig.io/) is acquired by AWS. Although speculators claim that the developers are probably acqui-hired. As a long-term user, I'm happy for them. I have been using Fig as my iTerm companion / zsh buddy for a few years, maybe even from the very beginning?But for a product, as commercial as it is, not an open-source project, if I don’t see its future, gotta say this line:
Thank you, next
Something I realize after uninstalling Fig is that some needs are not compulsory but created.
And simplicity is beauty.
The major issue is that I need to reinstall oh-my-zsh because my prior installation was bundled with Fig. The same goes with some zsh plugins. Luckily, I don’t have too many to deal with:
- https://github.com/ohmyzsh/ohmyzsh
- https://github.com/zsh-users/zsh-syntax-highlighting
- https://github.com/zsh-users/zsh-autosuggestions
- https://github.com/MichaelAquilina/zsh-you-should-use
In terms of customization of the prompt, I am torn between spaceship and starship. And I picked starship because it seems to be more minimalistic and easier to install.
# oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# starship prompt
brew install starship
# zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# you-should-use
git clone https://github.com/MichaelAquilina/zsh-you-should-use.git $ZSH_CUSTOM/plugins/you-should-use
# add two lines of aliases in .zshrc file
alias pip=pip3
alias python=python
Installed a compatible theme:
# Snazzy theme
(curl -Ls https://raw.githubusercontent.com/sindresorhus/iterm2-snazzy/main/Snazzy.itermcolors > /tmp/Snazzy.itermcolors && open /tmp/Snazzy.itermcolors)
Additionally, I installed a Nerd font (FYI: not your ordinary font that supports ligature!) for starship prompt and switched to its official Tokyo Night preset.
以下为 GPT-4o 翻译内容:
以下是文章内容的翻译,涉及到代码块的部分保持不变:
如何启动Starship
故事始于一次收购,这值得庆祝。Fig 被 AWS 收购了。尽管投机者声称开发者可能是被收购后雇佣的。作为长期用户,我为他们感到高兴。我使用 Fig 作为我的 iTerm 伙伴/ zsh 助手已经有几年了,可能从一开始就用了?
但对于一个产品来说,商业化是不可避免的,而不是一个开源项目,如果我看不到它的未来,只能说:
谢谢,下一位
在卸载 Fig 后我意识到的一件事是,有些需求不是必须的,而是被创造出来的。
而且简单就是美。
主要问题是我需要重新安装 oh-my-zsh ,因为我之前的安装是与Fig捆绑在一起的。同样的情况也适用于一些 zsh 插件。幸运的是,我没有太多需要处理的:
- https://github.com/ohmyzsh/ohmyzsh
- https://github.com/zsh-users/zsh-syntax-highlighting
- https://github.com/zsh-users/zsh-autosuggestions
- https://github.com/MichaelAquilina/zsh-you-should-use
在提示符的自定义方面,我在 spaceship 和 starship 之间犹豫不决。我选择了 starship,因为它看起来更简约,安装也更简单。
# oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# starship prompt
brew install starship
# zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# you-should-use
git clone https://github.com/MichaelAquilina/zsh-you-should-use.git $ZSH_CUSTOM/plugins/you-should-use
# 在.zshrc文件中添加两行别名
alias pip=pip3
alias python=python
安装了一个兼容的主题:
# Snazzy主题
(curl -Ls https://raw.githubusercontent.com/sindresorhus/iterm2-snazzy/main/Snazzy.itermcolors > /tmp/Snazzy.itermcolors && open /tmp/Snazzy.itermcolors)
此外,我为 starship 提示符安装了一个 Nerd font(供参考:这不是支持连字的普通字体!),并切换到了其官方的 Tokyo Night预设。