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.
|
2014-09-30 03:20:11 +00:00
|
|
|
set -gx PATH /usr/sbin /sbin /usr/bin /bin /usr/local/sbin /usr/local/bin $HOME/bin $HOME/go/bin $HOME/android/sdk/platform-tools
|
2014-03-03 22:22:04 +00:00
|
|
|
|
2014-04-11 22:22:21 +00:00
|
|
|
set -gx EDITOR /usr/bin/vim
|
|
|
|
|
2014-03-04 01:55:05 +00:00
|
|
|
# 256 colors
|
|
|
|
if test $TERM = "xterm"
|
|
|
|
set -x TERM "xterm-256color"
|
|
|
|
end
|
|
|
|
|
2014-03-03 22:22:04 +00:00
|
|
|
# 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
|
|
|
|
|
2014-11-13 19:52:25 +00:00
|
|
|
# Source local system-specific config.
|
|
|
|
if test -e ~/.local.fish
|
|
|
|
. ~/.local.fish
|
|
|
|
end
|
|
|
|
|