config.fish (1784B)
1 # defaults 2 set -g EDITOR nvim 3 if test "$(uname -s)" = "Darwin" 4 set -gx BROWSER open 5 else 6 set -gx BROWSER xdg-open 7 end 8 9 # path 10 set -gx PATH "$HOME/.local/bin" $PATH 11 12 ## opencode 13 if test -d ~/.opencode/bin 14 fish_add_path ~/.opencode/bin 15 end 16 17 ## rust 18 if test -f ~/.cargo/env.fish 19 source ~/.cargo/env.fish 20 else if test -d ~/.cargo/bin 21 fish_add_path ~/.cargo/bin 22 end 23 24 ## bun 25 if test -f ~/.bun/bin/bun 26 fish_add_path ~/.bun/bin 27 end 28 29 ## go 30 if test -d ~/go/bin 31 fish_add_path ~/go/bin 32 end 33 34 # 1password ssh agent 35 set -gx SSH_AUTH_SOCK "$HOME/.1password/agent.sock" 36 37 # secrets 38 if test -f ~/.config/fish/secrets.fish 39 source ~/.config/fish/secrets.fish 40 end 41 42 if status is-interactive 43 # fish 44 set -U fish_greeting 45 fish_config theme choose "Base16 Eighties" 46 47 # tide prompt character 48 set -U tide_character_icon "→" 49 set -U tide_character_vi_icon_default "→" 50 51 # system 52 set -g PF_INFO "ascii title os kernel memory uptime pkgs" 53 alias fetch pfetch 54 alias top btop 55 56 # terminal 57 abbr x exit 58 abbr clr clear 59 60 # files 61 zoxide init fish | source 62 function zl 63 z $argv && eza 64 if set -q NVIM 65 command nvr --servername $NVIM -c "cd "(pwd) 66 end 67 end 68 alias cd zl 69 alias ls eza 70 alias la "eza -lA --git" 71 alias ll "eza -l --git" 72 alias cp "cp -rv" 73 alias mv "mv -v" 74 alias rm trash 75 alias cat bat 76 77 # programs 78 alias ed $EDITOR 79 alias web $BROWSER 80 81 # git 82 abbr dash "gh dash" 83 abbr repo "gh repo" 84 abbr issue "gh issue" 85 abbr branch "git branch" 86 abbr checkout "git checkout" 87 abbr commit "git commit" 88 abbr pr "gh pr" 89 abbr release "gh release" 90 end 91 92 # fnm 93 if command -sq fnm 94 fnm env --use-on-cd --shell fish | source 95 end