mirror of https://github.com/bjeanes/dotfiles.git
Fish configuration from benhoskings
parent
31984641cb
commit
e5efdafeea
|
@ -0,0 +1,2 @@
|
|||
fish/fish_history
|
||||
fish/fishd.*
|
|
@ -0,0 +1 @@
|
|||
set -x PATH $PATH /usr/local/git/bin /usr/local/mysql/bin
|
|
@ -0,0 +1,7 @@
|
|||
function confirm
|
||||
echo "OK [y/N]?"
|
||||
read confirm_result
|
||||
test 'y' = $confirm_result
|
||||
|
||||
|
||||
end
|
|
@ -0,0 +1,16 @@
|
|||
function deplol
|
||||
gitst
|
||||
and gitco deploy
|
||||
and git merge work
|
||||
and gitlcg -25
|
||||
and gitco work
|
||||
and gitstp
|
||||
and gitlc origin/deploy..deploy
|
||||
and echo "Hit enter if that looks OK."
|
||||
and read
|
||||
and echo "Pushing..."
|
||||
and git push
|
||||
and cap deploy:all
|
||||
|
||||
|
||||
end
|
|
@ -0,0 +1,10 @@
|
|||
function fish_prompt --description 'Write out the prompt'
|
||||
set pr_timestamp (date '+%a %H:%M:%S')
|
||||
set pr_user (whoami)
|
||||
set pr_host (hostname | cut -d . -f 1)
|
||||
set pr_cwd (prompt_pwd)
|
||||
set pr_git_info (git_cwd_info)
|
||||
echo -e "\033[90m$pr_timestamp\033[0m $pr_user\033[90m@\033[0m$pr_host \033[90m$pr_cwd$pr_git_info\033[0m \033[32m>\033[0m "
|
||||
|
||||
|
||||
end
|
|
@ -0,0 +1,13 @@
|
|||
function git_cwd_info
|
||||
if test -d .git
|
||||
printf -- " - %s, " (git_parse_branch)
|
||||
if test (git ls-files -m | wc -l) -eq 0
|
||||
echo 'clean'
|
||||
else
|
||||
printf "%s" (git_dirty_files_count)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
function git_dirty_files_count
|
||||
if test -d .git
|
||||
git diff --stat | tail -n1 | sed -E 's/^ *//' | sed -E 's/ [a-z ]+\((.)(\),)?/\1/g' | sed -E 's/[a-z ]+, / (/' | sed -E "s/([0-9]+)\+/$pr_green\1$pr_grey+/g" | sed -E "s/([0-9]+)\-/$pr_red\1$pr_grey-/g"
|
||||
end
|
||||
|
||||
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
function git_parse_branch
|
||||
sh -c 'git branch --no-color 2> /dev/null' | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
|
||||
|
||||
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
function gita
|
||||
git add $argv;
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
function gitau
|
||||
git add -u $argv;
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
function gitc
|
||||
git commit -v $argv;
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
function gitco
|
||||
git checkout $argv;
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
function gitd.
|
||||
git diff --color-words='.' $argv;
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
function gitd
|
||||
git diff $argv;
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
function gitdc.
|
||||
git diff --cached --color-words='.' $argv;
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
function gitdc
|
||||
git diff --cached $argv;
|
||||
end
|
|
@ -0,0 +1,4 @@
|
|||
function gitdcw
|
||||
git diff --cached $color_ruby_words $argv
|
||||
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
function gitdw
|
||||
git diff $color_ruby_words $argv
|
||||
|
||||
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
function gitl
|
||||
git log -p $argv;
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
function gitlc
|
||||
git log $git_concise_log_format $argv;
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
function gitlcg
|
||||
gitlc --graph $argv;
|
||||
end
|
|
@ -0,0 +1,8 @@
|
|||
function gitlpend
|
||||
printf "commits from %s%s/%s%s to %sHEAD%s" (set_color red) (git config branch.(git_parse_branch).remote) (git_parse_branch) (set_color normal) (set_color red) (set_color normal)
|
||||
echo
|
||||
git --no-pager log --graph (git config branch.(git_parse_branch).remote)/(git_parse_branch)..HEAD $git_concise_log_format
|
||||
echo
|
||||
|
||||
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
function gitrb
|
||||
git rebase $argv;
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
function gitrbc
|
||||
git rebase --continue $argv;
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
function gits
|
||||
git status $argv;
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
function gitst
|
||||
git stash $argv;
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
function gitstp
|
||||
git stash pop $argv;
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
function gl
|
||||
git log $argv
|
||||
|
||||
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
function m
|
||||
mate . $argv;
|
||||
end
|
|
@ -0,0 +1,4 @@
|
|||
function parse_git_branch
|
||||
sh -c 'git branch --no-color 2> /dev/null' | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
|
||||
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
function tigs
|
||||
tig status $argv;
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
function vi
|
||||
mate $argv;
|
||||
end
|
Loading…
Reference in New Issue