config.fish
· 933 B · Fish
Bruto
function fish_prompt
set_color -o red
echo -n "> "
set_color normal
end
# From https://github.com/mduvall/dotfiles/blob/master/fish_prompt.fish.
function fuller_prompt_cwd --description 'Print the current working directory, NOT shortened to fit the prompt'
if test "$PWD" != "$HOME"
printf "%s" (echo $PWD|sed -e 's|/private||' -e "s|^$HOME|~|")
else
echo '~'
end
end
function fish_right_prompt
set_color -o green
echo -n (fuller_prompt_cwd)
set_color normal
end
set -g fish_greeting
set -g -x EDITOR vim
if status is-interactive
if type -p zoxide > /dev/null
zoxide init fish | source
end
end
# ls alias
alias la='ls -al'
alias la='ls -alh'
# git
alias g='git'
alias gcl='git clone'
alias gst='git status'
alias gp='git push'
alias gf='git fetch'
alias gl='git pull'
alias gd='git diff'
alias gc='git commit'
# alpine
alias apks='apk search'
alias apki='apk info'
alias apka='doas apk add'
| 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' |
| 50 |