> ## Documentation Index
> Fetch the complete documentation index at: https://base.bangwu.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Starship

> Starship 是基于 Rust 的跨 Shell 终端提示符美化工具，兼容 PowerShell、Bash、Zsh 与 CMD。本文介绍 Scoop 安装、超时问题解决、PowerShell 与 clink CMD 启动脚本配置及 Bracketed-segments 预设主题选用方法。

# Comand Line

## oh my zsh

## oh my posh

只有 powershell 自动补全难用

## [starship](https://starship.rs/guide/)

![starship-demo](https://raw.gitmirror.com/starship/starship/master/media/demo.gif)

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
scoop install starship
starship config command_timeout 3600 //解决超时问题 https://github.com/starship/starship/issues/5985
```

### 配置 power shell

需要在 power shell 执行`$PROFILE`查看配置路径`C:\Users\用户名\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1`然后写入

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
Invoke-Expression (&starship init powershell)
```

使用[Bracketed-segments](https://starship.rs/zh-CN/presets/bracketed-segments)主题，也可以前往[Staship 预设](https://starship.rs/presets/)查看其他喜欢的主题，需要注意的是有的需要配置[Nerd Font](https://www.nerdfonts.com/)

### 配置 cmd

starship 使用[clink](https://chrisant996.github.io/clink/)来配置 cmd

> \[!note]
> 使用 scoop 安装命令行不会命令高亮显示，原因是 scoop 安装的可能不带有`Enhanced default settings`这个功能，语法高亮是靠这个功能实现的，所以需要这个功能的还是从[Github Realease](https://github.com/chrisant996/clink/releases)下载吧【梦想是 scoop 管理所有应用，破碎第一步 😭】

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
code %LocalAppData%\clink\starship.lua

写入
load(io.popen('starship init cmd'):read("*a"))()
```

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
clink autorun install
clink set prompt.transient always
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.