- Add OS-specific config files - Set JAVA_HOME automatically on OS X - Disable fish greeting banner
57 lines
936 B
Fish
57 lines
936 B
Fish
# ============
|
|
# Basics, etc…
|
|
# ============
|
|
|
|
# Default browser
|
|
set -g -x EDITOR "emacsclient"
|
|
|
|
# Add ~/bin to PATH
|
|
set -g -x PATH ~/bin $PATH
|
|
|
|
# Machine-local config
|
|
if test -e ~/.config/fish/local.fish
|
|
source ~/.config/fish/local.fish
|
|
end
|
|
|
|
# OS-specific configuration
|
|
switch (uname)
|
|
case Linux
|
|
source ~/.config/fish/linux.fish
|
|
case Darwin
|
|
source ~/.config/fish/osx.fish
|
|
case '*'
|
|
echo 'Unknown OS. No specifc config'
|
|
end
|
|
|
|
# Disable Fish greeting banner
|
|
set --universal fish_greeting
|
|
|
|
# ========
|
|
# Autojump
|
|
# ========
|
|
|
|
[ -f /usr/local/share/autojump/autojump.fish ]; and . /usr/local/share/autojump/autojump.fish
|
|
|
|
# =========
|
|
# Functions
|
|
# =========
|
|
|
|
function ec
|
|
emacsclient -n $argv
|
|
end
|
|
|
|
# IP addresses
|
|
function ip
|
|
curl icanhazip.com
|
|
end
|
|
|
|
# edit config.fish (this file)
|
|
function cf
|
|
ec ~/.config/fish/config.fish
|
|
end
|
|
|
|
# reload your Fish config
|
|
function src
|
|
source ~/.config/fish/config.fish; and clear
|
|
end
|