hash revised this gist . Go to revision
1 file changed, 49 insertions
config.fish(file created)
| @@ -0,0 +1,49 @@ | |||
| 1 | + | function fish_prompt | |
| 2 | + | set_color -o red | |
| 3 | + | echo -n "> " | |
| 4 | + | set_color normal | |
| 5 | + | end | |
| 6 | + | ||
| 7 | + | # From https://github.com/mduvall/dotfiles/blob/master/fish_prompt.fish. | |
| 8 | + | function fuller_prompt_cwd --description 'Print the current working directory, NOT shortened to fit the prompt' | |
| 9 | + | if test "$PWD" != "$HOME" | |
| 10 | + | printf "%s" (echo $PWD|sed -e 's|/private||' -e "s|^$HOME|~|") | |
| 11 | + | else | |
| 12 | + | echo '~' | |
| 13 | + | end | |
| 14 | + | end | |
| 15 | + | ||
| 16 | + | function fish_right_prompt | |
| 17 | + | set_color -o green | |
| 18 | + | echo -n (fuller_prompt_cwd) | |
| 19 | + | set_color normal | |
| 20 | + | end | |
| 21 | + | ||
| 22 | + | set -g fish_greeting | |
| 23 | + | ||
| 24 | + | set -g -x EDITOR vim | |
| 25 | + | ||
| 26 | + | if status is-interactive | |
| 27 | + | if type -p zoxide > /dev/null | |
| 28 | + | zoxide init fish | source | |
| 29 | + | end | |
| 30 | + | end | |
| 31 | + | ||
| 32 | + | # ls alias | |
| 33 | + | alias la='ls -al' | |
| 34 | + | alias la='ls -alh' | |
| 35 | + | ||
| 36 | + | # git | |
| 37 | + | alias g='git' | |
| 38 | + | alias gcl='git clone' | |
| 39 | + | alias gst='git status' | |
| 40 | + | alias gp='git push' | |
| 41 | + | alias gf='git fetch' | |
| 42 | + | alias gl='git pull' | |
| 43 | + | alias gd='git diff' | |
| 44 | + | alias gc='git commit' | |
| 45 | + | ||
| 46 | + | # alpine | |
| 47 | + | alias apks='apk search' | |
| 48 | + | alias apki='apk info' | |
| 49 | + | alias apka='doas apk add' | |
Newer
Older