-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.fish
More file actions
102 lines (80 loc) · 2.57 KB
/
config.fish
File metadata and controls
102 lines (80 loc) · 2.57 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
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
97
98
99
100
101
102
################################################################################
# basic settings
################################################################################
## fish
fish_vi_key_bindings
# homebrew
set -x PATH /usr/local/bin:/usr/local/sbin $PATH
export HOMEBREW_CACHE=~/Library/Caches/Homebrew
export HOMEBREW_EDITOR=/usr/local/bin/vim
# export HOMEBREW_GITHUB_API_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# git
export GIT_TERMINAL_PROMPT=0
export GIT_PS1_SHOWDIRTYSTATE=true
# openssl
set -x PATH /usr/local/opt/openssl/bin $PATH
# python user packages to use `pip install --user`
set -x PATH $HOME/.local/bin $PATH
# fzf
set -U FZF_LEGACY_KEYBINDINGS 0
set -U FZF_REVERSE_ISEARCH_OPTS "--reverse --height=100%"
################################################################################
# functions
################################################################################
function fish_user_key_bindings
bind \cr 'peco_select_history (commandline -b)'
end
function peco_select_history_order
if test (count $argv) = 0
set peco_flags --layout=top-down
else
set peco_flags --layout=bottom-up --query "$argv"
end
history|peco $peco_flags|read foo
if [ $foo ]
commandline $foo
else
commandline ''
end
end
################################################################################
# aliases
################################################################################
# alias ls='ls -F -G'
# alias ll='ls -l'
# alias la='ls -a'
# alias lla='ls -la'
# alias rm='rm -i'
# alias rd='rmdir'
alias ...='cd ../..'
alias ....='cd ../../..'
alias relogin='exec $SHELL -l'
alias df='df -h' # display MB instead of KB
alias f='open .' # open Finder
alias myip='curl ifconfig.io'
alias brewup='brew upgrade && brew cask upgrade'
alias j='z'
alias rm='trash'
alias cat='ccat'
alias c='code' # open Visual Studio Code
export FISH_CONF=$HOME/.config/fish/config.fish
alias ef='vi $FISH_CONF'
alias reload='source $FISH_CONF'
################################################################################
# others
################################################################################
# anyenv
set -x PATH $HOME/.anyenv/bin $PATH
status --is-interactive; and source (anyenv init -|psub)
# pipenv
export PIPENV_VENV_IN_PROJECT=1
# Android SDK
export ANDROID_HOME=$HOME/Library/Android/sdk
set -x PATH $PATH $ANDROID_HOME/tools
set -x PATH $PATH $ANDROID_HOME/tools/bin
set -x PATH $PATH $ANDROID_HOME/platform-tools
# Golang
export GOPATH=$HOME/go
set -x PATH $GOPATH/bin $PATH
# TypeScript runtime
set -x PATH $HOME/.deno/bin $PATH