function extract --description "Extracts almost any file"
set file $argv[1]
if test -f $file
switch $file
case *.tar.bz2
tar xvjf $file
case *.tar.gz
tar xvzf $file
case *.tar.xz
tar -xvf $file
case *.bz2
bunzip2 $file
case *.rar
unrar x $file
case *.gz
gunzip $file
case *.tar
tar xvf $file
case *.tbz2
tar xvjf $file
case *.tgz
tar xvzf $file
case *.zip
unzip $file
case *.Z
uncompress $file
case *.7z
7z x $file
case '*'
echo "'$file' cannot be extracted via >extract<"
end
else
echo "'$file' is not a valid file!"
end
end
function fish_greeting
fortune | cowsay | lolcat
if [ "$TERM" != "screen" ]; or [ -z $TMUX ]
tmux a
if [ $status -ne 0 ]
tmux
end
end
end
# Bad to set to 0 (messes with other command stuff)
set -s escape-time 50
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
# Change split-window key bindings
bind | split-window -h
bind - split-window -v
# Set default Shell
set-option -g default-shell /usr/local/bin/fish
set number
syntax enable
filetype plugin indent on
" show existing tab with 4 spaces width
set tabstop=4
" when indenting with '>', use 4 spaces width
set shiftwidth=4