config.fish (1062B)
1 # Fish shell configuration 2 3 set PATH /usr/local/bin $PATH 4 set EDITOR "nvim" 5 6 if status is-interactive 7 # Theming 8 fish_config theme choose "Mono Lace" 9 set fish_color_cwd black 10 set fish_greeting "" 11 12 # Functions 13 function fish_prompt -d "The almighty shell prompt" 14 printf '[%s@%s %s%s%s]$ \x1b[\x33 q' $USER $hostname \ 15 (set_color $fish_color_cwd) (prompt_pwd) (set_color normal) 16 end 17 18 function pastesrv -d "Upload a file and share a link" 19 if test $argv[1] 20 set dest $argv[1] 21 else 22 # Generate a random alphanumeric string of length 6 23 set dest "$(tr -cd \[:alnum:\] < /dev/urandom | fold -w6 | head -1)" 24 end 25 ssh cerberus "cat > /var/www/paritybit.ca/files/paste/$dest" 26 echo "https://www.paritybit.ca/files/paste/$dest" | tee -a "$HOME/.pastesrvhist" 27 end 28 29 # Aliases 30 alias ls='ls -lAF' 31 alias rm='rm -iv' 32 alias cp='cp -iv' 33 alias mv='mv -iv' 34 alias vi='nvim' 35 alias copy='xclip -sel c' 36 alias open='xdg-open' 37 alias pubip='curl -s https://ifconfig.me; printf "\n"' 38 alias tf='tail -f' 39 alias cdg='cd $(git rev-parse --show-toplevel)' 40 end