58 lines
1.1 KiB
Fish
58 lines
1.1 KiB
Fish
# ============
|
|
# Basics, etc…
|
|
# ============
|
|
|
|
# Default browser
|
|
set -g -x EDITOR "emacsclient"
|
|
set -g -x ALTERNATE_EDITOR "vim"
|
|
|
|
# Add ~/bin to PATH
|
|
set -g -x PATH ~/bin $PATH
|
|
|
|
# Disable Fish greeting banner
|
|
set --universal fish_greeting
|
|
|
|
# iTerm2 integration
|
|
source ~/.config/fish/fish_startup.in
|
|
|
|
# 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
|
|
|
|
# Machine-local config
|
|
if test -e ~/.config/fish/local.fish
|
|
source ~/.config/fish/local.fish
|
|
end
|
|
|
|
# ========
|
|
# Autojump
|
|
# https://github.com/wting/autojump
|
|
# ========
|
|
|
|
[ -f /usr/local/share/autojump/autojump.fish ]; and . /usr/local/share/autojump/autojump.fish
|
|
[ -f /usr/share/autojump/autojump.fish ]; and . /usr/share/autojump/autojump.fish
|
|
|
|
# =========
|
|
# Functions
|
|
# =========
|
|
|
|
function ec
|
|
emacsclient -n --alternate-editor=emacs $argv
|
|
end
|
|
|
|
# IP addresses
|
|
function ip
|
|
curl icanhazip.com
|
|
end
|
|
|
|
# reload your Fish config
|
|
function src
|
|
source ~/.config/fish/config.fish; and clear
|
|
end
|