Add fish configuration functions

This commit is contained in:
Tyrel Souza 2017-02-03 15:01:15 -05:00
parent 6c8ad380dd
commit 1096fab497
No known key found for this signature in database
GPG Key ID: 2EECB5087209E6A5
5 changed files with 39 additions and 1 deletions

View File

@ -12,7 +12,6 @@ alias deploy_all="fab -R silver-web deploy:master && fab -R gold-web deploy:mas
alias deploy_all_migration="fab -R silver-web deploy:master,1 && fab -R gold-web deploy:master,1 && fab -R jupyter deploy_jupyter & fab --parallel avail_staging_hosts deploy:master,1"
alias aenv='env | sort | grep ADDGENE'
alias sl='source local.env'
unalias mysql
if [[ $OSTYPE == darwin* ]]; then
alias rm=trash;

3
config/config.fish Normal file
View File

@ -0,0 +1,3 @@
set fish_greeting ''
eval (python -m virtualfish)

View File

@ -0,0 +1,4 @@
function adg
vf activate addgene-core
cd ~/code/github/addgene/addgene-core
end

View File

@ -0,0 +1,31 @@
function fish_prompt --description 'Write out the prompt'
# virtualenv stuff
if set -q VIRTUAL_ENV
echo -n -s (set_color -b blue white) "(" (basename "$VIRTUAL_ENV") ")" (set_color normal) " "
end
set -l last_status $status
if not set -q __fish_prompt_normal
set -g __fish_prompt_normal (set_color normal)
end
# PWD
set_color $fish_color_cwd
echo -n (prompt_pwd)
set_color normal
printf '%s ' (__fish_git_prompt)
if not test $last_status -eq 0
set_color $fish_color_error
end
# Set a pretty date
set_color -b black yellow
echo -n '['(date "+%I:%M %P")']'
set_color normal
echo -n ' $ '
set_color normal
end

View File

@ -12,3 +12,4 @@ tmp/**/*
.pre-commit-config.yaml
.ruby-version
release_package.sh
local.fish