-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.fish
More file actions
63 lines (50 loc) · 1.67 KB
/
Copy pathconfig.fish
File metadata and controls
63 lines (50 loc) · 1.67 KB
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
set -gx src $HOME/src
function path -a dir
set -gx PATH $PATH $dir
end
# Terminal tab/window title.
# Usage:
# st my project set the title to "my project"
# dt set the title to the current dir basename
# set -e custom_title clear the title (falls back to shortened pwd)
# Notes:
# - fish calls fish_title before each prompt and wraps the output in the
# OSC set-title escape itself, so we just echo the text (no raw escapes).
# - zsh used `t` to set the title, but here `t` is `alias t tree`, so `st`.
function fish_title
if set -q custom_title[1]
echo -- $custom_title
else
echo -- (prompt_pwd)
end
end
function st
set -gx custom_title $argv
end
function dt
set -gx custom_title (basename $PWD)
end
path /opt/homebrew/bin
path $HOME/.cargo/bin
path $HOME/.local/bin
path $HOME/.local/share/solana/install/active_release/bin
set -gx EDITOR nvim
set -gx LSCOLORS Exfxcxdxbxegedabagacad
if status is-interactive
alias a 'ls -oAhFG'
alias g git
alias e nvim
alias t tree
alias car cargo
alias r 'nnn -HoUC'
# alias unset 'set -e'
alias cdr 'cd (git rev-parse --show-toplevel)'
[ -f /opt/homebrew/share/autojump/autojump.fish ]; and source /opt/homebrew/share/autojump/autojump.fish
# https://github.com/junegunn/fzf
fzf --fish | source
set -gx FZF_DEFAULT_OPTS '--no-separator --tabstop=4'
set -gx FZF_CTRL_T_COMMAND 'fd --type file --type directory --hidden --follow'
# TODO: C-t must respect path like `cat ~/src/` then C-t shows relative to
# bind ctrl-j fzf-cd-widget # TODO: fix gnvi false-fire when Sublime Merge open it
end
source ~/.env.fish 2>/dev/null