Last active
January 25, 2026 10:30
-
-
Save Sansui233/55778f5a828ed3b53a45ce69fed5ffc6 to your computer and use it in GitHub Desktop.
【Windows MSYS2/Git bash】 config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [[ "$-" != *i* ]] && return | |
| function win-alias() { | |
| local name=$1 | |
| local winpath=$2 | |
| alias $name="$(cygpath -u "$winpath")" | |
| } | |
| # win-alias vim 'C:\Users\lingn\scoop\shims\nvim.exe' | |
| # win-alias sudo 'C:\Program Files (x86)\gsudo\sudo.exe' | |
| # 打开文件 | |
| function open() { | |
| # ${1:-.} 表示:如果第一个参数为空,则取 "."(当前目录) | |
| local target="${1:-.}" | |
| powershell.exe -NoProfile -Command "Invoke-Item '$(cygpath -w "$target")'" | |
| } | |
| alias proxy="export http_proxy='http://127.0.0.1:7890';export https_proxy='http://127.0.0.1:7890'" | |
| alias unproxy="export http_proxy='';export https_proxy=''" | |
| alias path='echo -e ${PATH//:/\\n}' # 格式化查看PATH | |
| # eza -- ls | |
| # export FPATH="/c/Users/lingn/.config/eza/completions/bash:$FPATH" | |
| alias ls=eza | |
| alias ll='eza -h -l' | |
| alias la='eza -a' | |
| alias vim=nvim | |
| export EDITOR='nvim' | |
| export VISUAL='nvim' | |
| # starship | |
| eval "$(starship init bash)" | |
| # zoxide | |
| eval "$(zoxide init bash)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source ~/.bashrc | |
| alias -g '~~'="/c/Users/lingn" | |
| # Lines configured by zsh-newuser-install | |
| HISTFILE=~/.histfile | |
| HISTSIZE=1000 | |
| SAVEHIST=1000 | |
| bindkey -v # vim mode | |
| # End of lines configured by zsh-newuser-install | |
| # The following lines were added by compinstall | |
| zstyle :compinstall filename '/home/lingn/.zshrc' | |
| autoload -Uz compinit | |
| compinit | |
| # End of lines added by compinstall | |
| setopt AUTO_PUSHD | |
| export CLICOLOR=1 | |
| export LSCOLORS="ExGxFxdaCxDaDahbadeche" | |
| zstyle ':completion:*' list-colors "${(@s.:.)LS_COLORS}" | |
| # custom end | |
| # zi start | |
| typeset -A ZI | |
| ZI[BIN_DIR]="${HOME}/.zi/bin" | |
| source "${ZI[BIN_DIR]}/zi.zsh" | |
| autoload -Uz _zi | |
| (( ${+_comps} )) && _comps[zi]=_zi | |
| zi light sindresorhus/pure # 提前运行一次 zi ice pick"async.zsh" src"pure.zsh" | |
| zi light agkozak/zsh-z | |
| zi snippet OMZP::git | |
| zi light zsh-users/zsh-completions | |
| zi light zsh-users/zsh-autosuggestions | |
| # zi light zdharma/fast-syntax-highlighting | |
| # zi end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment