-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.fish
96 lines (80 loc) · 2.63 KB
/
config.fish
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
set -U fish_greeting
if status is-login
if test -e /opt/homebrew/bin/brew
eval (/opt/homebrew/bin/brew shellenv)
else if test -e /usr/local/Homebrew/bin/brew
eval (/usr/local/Homebrew/bin/brew shellenv)
end
set -gx EDITOR editor
set -gx CARGO_HOME $HOME/.cargo
set -gx VENVS $HOME/.venvs
set -gx P $HOME/projects
set -gx GOPATH $P/go
set -gx HTML_TIDY $HOME/.config/tidy/config.txt
set -gx VOLTA_HOME "$HOME/.volta"
set -gx XDG_CONFIG_HOME "$HOME/.config"
set -gx RIPGREP_CONFIG_PATH "$XDG_CONFIG_HOME/ripgrep/ripgreprc"
fish_add_path -p \
/usr/local/bin \
/usr/local/go/bin
fish_add_path -m (brew --prefix)/bin
fish_add_path -p \
$HOME/.amplify/bin \
$HOME/.cabal/bin \
$HOME/.cargo/bin \
$HOME/.nimble/bin \
$GOPATH/bin \
$VOLTA_HOME/bin \
(brew --prefix)/opt/coreutils/libexec/gnubin \
$HOME/.emacs.d/bin \
$HOME/.local/bin \
$HOME/bin
pyenv init - | source
pyenv virtualenv-init - | source
jenv init - | source
jenv enable-plugin export >/dev/null
end
# Load directory shortcuts.
if test -e ~/.dirs
source ~/.dirs
end
# Load local machine exports.
# This is probably where you will find work related exports.
if test -e ~/.local-exports
source ~/.local-exports
end
if status is-interactive
function fish_title
echo (string replace $HOME '~' $PWD)
end
set fzf_diff_highlighter delta --paging=never --width=20
set fzf_fd_opts --hidden --exclude=.git
set fzf_preview_dir_cmd eza --all --color=always
set --export fzf_dir_opts --bind "ctrl-e:execute(editor {} &> /dev/tty)"
set -gx fish_vi_force_cursor 1
set -gx fish_cursor_default block blink
set -gx fish_cursor_insert line blink
set -gx fish_cursor_replace_one underscore blink
set -gx fish_cursor_visual block
fish_vi_key_bindings
bind -M insert \cf accept-autosuggestion # Default but for vim.
bind -M insert \ce accept-autosuggestion # Maybe better.
if test -z (pgrep ssh-agent | string collect)
eval (ssh-agent -c)
set -Ux SSH_AUTH_SOCK $SSH_AUTH_SOCK
set -Ux SSH_AGENT_PID $SSH_AGENT_PID
end
# fzf.fish history
fzf_configure_bindings --history=\e\ch
# atuin history
bind \cr _atuin_search
bind -M insert \cr _atuin_search
# Load abbreviations and functions.
source ~/.config/fish/conf.d/abbreviations.fish
source ~/.config/fish/conf.d/functions.fish
starship init fish | source
atuin init fish --disable-up-arrow | source
end
alias ls=eza
direnv hook fish | source
zoxide init fish | source