You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何自动向sh命令传递yes以一键安装Starship

自动确认安装Starship的几种方法
  • 使用yes命令自动输入确认
    把yes命令的输出通过管道传给安装脚本,它会持续输出y来响应脚本的确认提示:

    yes | curl -sS https://starship.rs/install.sh | sh
    
  • 用安装脚本自带的非交互参数(推荐)
    Starship的安装脚本本身支持-y或--yes参数来跳过确认,直接执行安装,这种方式更精准,不会对其他潜在提示(当前脚本没有但后续可能新增的)误输入:

    curl -sS https://starship.rs/install.sh | sh -s -- -y
    

    或者用长参数:

    curl -sS https://starship.rs/install.sh | sh -s -- --yes
    

内容的提问来源于stack exchange,提问作者Takuya HARA

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.13 07:15:38