← 返回命令列表

Linux command

starship-init 命令

网络

复制后可按需替换文件名、目录或参数。

常用示例

Initialize for bash

eval "$(starship init bash)"

Initialize for zsh

eval "$(starship init zsh)"

Initialize for fish

starship init fish | source

Initialize for PowerShell

Invoke-Expression (&starship init powershell)

说明

starship init generates shell initialization for Starship prompt. Outputs script to be evaluated by shell. Add to shell config for persistent prompt customization.

参数

bash
Bash shell.
zsh
Zsh shell.
fish
Fish shell.
powershell
PowerShell.
--print-full-init
Print full initialization script.

FAQ

What is the starship-init command used for?

starship init generates shell initialization for Starship prompt. Outputs script to be evaluated by shell. Add to shell config for persistent prompt customization.

How do I run a basic starship-init example?

Run `eval "$(starship init bash)"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does bash do in starship-init?

Bash shell.