Skip to content

Instantly share code, notes, and snippets.

@filipelperes
Last active July 8, 2025 01:01
Show Gist options
  • Save filipelperes/212abbfd422b4f3c77a04a26f4729c4c to your computer and use it in GitHub Desktop.
Save filipelperes/212abbfd422b4f3c77a04a26f4729c4c to your computer and use it in GitHub Desktop.
Fish Shell With Starship on WIndows Git Bash

Fish Shell With Starship on Windows Git Bash

Why go through all these steps? Make things easier and simply use the 4devs menu in ๐Ÿš€ All-win-1 ๐Ÿš€ to get it done effortlessly


Old/Manual Mode
  1. To install fish shell on Windows Git Bash, install Git and MSYS executing the following commands in powershell:
winget install --id Git.Git --accept-package-agreements
winget install --id MSYS2.MSYS2 --accept-package-agreements

  1. Add C:\msys64\usr\bin to the system's path environment variables, or copy the following line into ~/.bash_profile (create it if it doesn't exist)
export PATH="/c/msys64/usr/bin:$PATH"

  1. Download the latest tar.zst files for fish (Direct Link) and pcre2_16 (Direct Link) (Note: The packages are compressed using zstd)

  1. Extract the contents to your git bash installation directory (Usually C:\Program Files\Git)
- First, extract fish
- Then, extract pcre2_16 **(do not overwrite existing content during extraction)**

Extraction Options:


  1. Test and configure fish:

Open git bash and type:

fish

  1. Configure fish as default shell

Add the following lines at the end of the ~/.bashrc file (create it if it doesn't exist)

# Launch Fish
if [ -t 1 ]; then
exec fish
fi

Reopen Git Bash.

Path to fish configuration: ~\.config\fish\config.fish

Note: If you receive the following error error: Unable to open shared memory with path simply configure Git Bash to run as administrator.


If you want Starship

Repository Instructions
crates.io cargo install starship --locked
Chocolatey choco install starship
conda-forge conda install -c conda-forge starship
Scoop scoop install starship
winget winget install --id Starship.Starship
fnm env --use-on-cd | source
starship init fish | source
pyenv init - fish | source
set SPACEFISH_PROMPT_ADD_NEWLINE false
set -U fish_greeting
set PATH $HOME/.jenv/bin $PATH
# Deno
export DENO_DEPLOY_TOKEN=""
export DENO_INSTALL="$HOME/.deno"
export OPEN_API_KEY=""
# Aliases
alias cat="bat --theme=\$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo default || echo GitHub)"
alias l="ls -la"
alias ls="eza --color=always --long --git --no-filesize --icons=always --no-time --no-user --no-permissions"
alias cd="z"
alias py="python"
alias y="yazi"
fzf --fish | source
zoxide init fish | source
export FZF_CTRL_T_OPTS="
--style full
--walker-skip .git,node_modules,target
--preview 'bat -n --color=always {}'
--bind 'ctrl-/:change-preview-window(down|hidden|)'
"
# Bun
set --export BUN_INSTALL ="$HOME/.bun"
function y
set tmp (mktemp -t "yazi-cwd.XXXXXX")
yazi $argv --cwd-file="$tmp"
if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
builtin cd -- "$cwd"
end
rm -f -- "$tmp"
end
status --is-interactive; and jenv init - | source
# ---------------- inshellisense shell plugin ----------------
if test -z "$ISTERM" && status --is-interactive
if status --is-login
is -s fish --login ; kill %self
else
is -s fish ; kill %self
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment