1
0
.dotfiles/home/.config/fish/config.fish

93 lines
1.9 KiB
Fish
Raw Normal View History

2014-03-03 22:22:04 +00:00
# config.fish
# Kirsle's config.fish
# Updated: 2014-03-03
2014-03-03 22:34:14 +00:00
function fish_greeting
echo -s (set_color FF9900) "-== " (fish --version ^&1) " ==-" (set_color normal)
echo -s (set_color FFFF00) " Date: " (set_color FFFFFF) (date) (set_color normal)
echo -s (set_color FFFF00) "Uptime: " (set_color FFFFFF) (uptime) (set_color normal)
end
2014-03-03 22:22:04 +00:00
# Normalize the $PATH.
set -gx PATH /usr/sbin /sbin /usr/bin /bin /usr/local/sbin /usr/local/bin $HOME/bin $HOME/go/bin
# Source local system-specific config.
if test -e ~/.local.fish
. ~/.local.fish
end
# VirtualEnv
set -g VIRTUALFISH_HOME $HOME/.virtualenv
set -g VIRTUALFISH_COMPAT_ALIASES
. ~/.config/fish/virtual.fish
# Shell prompt
function fish_prompt
# VirtualEnv prefix
if set -q VIRTUAL_ENV
2014-03-03 22:50:35 +00:00
echo -n -s (set_color FF9900) "(" (basename "$VIRTUAL_ENV") ")" (set_color normal)
2014-03-03 22:22:04 +00:00
end
set_color --bold 0099FF
echo -n "["
set_color FF99FF
echo -n (whoami)
set_color 0099FF
echo -n "@"
set_color FF99FF
echo -n (hostname)
echo -n " "
set_color 00FF00
echo -n (prompt_pwd)
set_color 0099FF
echo -n "]\$ "
set_color normal
end
# Title bar
function fish_title
if set -q FISH_CUSTOM_TITLE
echo -n $FISH_CUSTOM_TITLE
else
echo -n -s (whoami) "@" (hostname) ":" (prompt_pwd)
end
end
# ___ ____ _ _ ____ ____ __ __
# / __)( ___)( \( )( ___)( _ \ /__\ ( )
# ( (_-. )__) ) ( )__) ) / /(__)\ )(__
# \___/(____)(_)\_)(____)(_)\_)(__)(__)(____)
# -==General Aliases and Functions==-
function vi
/usr/bin/vim $argv
end
function refish
. ~/.config/fish/config.fish
end
# A DOS-like title command
function title
set -gx FISH_CUSTOM_TITLE "$argv"
end
# Color grepping!
set -gx GREP_COLOR 31
function grep
2014-03-03 22:34:14 +00:00
/bin/grep --exclude=*.min.js --exclude=*.map.js --color=auto $argv
2014-03-03 22:22:04 +00:00
end
# ls aliases. Fedora defaults, but here for compatibility
function ls
2014-03-03 22:34:14 +00:00
/bin/ls --color=auto $argv
2014-03-03 22:22:04 +00:00
end
function ll
2014-03-03 22:34:14 +00:00
/bin/ls -hl --color=auto $argv
2014-03-03 22:22:04 +00:00
end
function ping
2014-03-03 22:34:14 +00:00
/bin/ping -c 10 $argv
2014-03-03 22:22:04 +00:00
end