diff --git a/.bash_aliases b/.bash_aliases index 6b38a3a..905e92e 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -42,7 +42,9 @@ function ack_open { nvim $( ack -m 1 -T junkFiles "$@" | grep -Po "^(?:lib|t|tmp # git alias gst="git status" -alias gbr="git branch --sort=-committerdate" +# alias gbr="git branch --sort=-committerdate" +# function gbr2 { git branch --sort=-committerdate | perl -pE 'my $branch = $_ =~ s/^[*+]?\s(\S+)\s*$/$1/r; my $merged = qx{git log \$(git rev-parse $branch) ^master --no-merges}; if ($merged) { $_ =~ s/^/[ ] / } else { $_ =~ s/^/[x] / };'; } +function gbr { git branch --sort=-committerdate --format '%(if)%(HEAD)%(then)*%(else)%(if)%(worktreepath)%(then)+%(else) %(end)%(end) %(align:width=40,position=left)%(refname:short)%(end) %(align:width=10,position=right)%(color:green)(%(committerdate:relative))%(end)' | perl -pE '$_ =~ /^[*+]?\s+(?\S+)\s*/; my $branch = $+{branch}; my $merged = qx{git log \$(git rev-parse $branch) ^master --no-merges}; if ($merged) { $_ =~ s/^/[ ] / } else { $_ =~ s/^/[x] / };'; } function ggn { git grep -Pn --color=always "$@" :/; } function ggt { git grep -Pn --color=always "$@" t/lib ; } function ggp { ggn --color=always "$@" $(git rev-list --all); } @@ -83,7 +85,7 @@ git() { esac } -alias TODO="ggn 'TODO: jry:'" +alias TODO="ggn 'TODO: jry:?'" title() { # set input argument as window title @@ -195,10 +197,16 @@ fi if [ $HOSTNAME = 'gnu' ] && [ $USER = 'jry' ]; then alias fzy="~/.fzy/fzy" - alias perlperl="/home/perl/bin/perl" + alias perlperl="/usr/bin/perl" alias perlprove="/home/perl/bin/prove" function prove { jix-shell TEST_METHOD=$TEST_METHOD BAIL_ON_FAIL=$BAIL_ON_FAIL prove "$@"; } - function perl { jix-shell TEST_METHOD=$TEST_METHOD BAIL_ON_FAIL=$BAIL_ON_FAIL perl "$@"; } + function prove-on-backend { jix-shell TEST_METHOD=$TEST_METHOD BAIL_ON_FAIL=$BAIL_ON_FAIL USER=$USER JIX_USERID=$JIX_USERID prove-on-backend "$@"; } + function perl { jix-shell TEST_METHOD=$TEST_METHOD BAIL_ON_FAIL=$BAIL_ON_FAIL USER=$USER JIX_USERID=$JIX_USERID perl -MJIX "$@"; } + alias open_url="jix-shell open_url" + alias colorlog="jix-shell colorlog.pl" + alias jix-gettext="jix-shell jix-gettext" + alias arc="jix-shell arc" + alias solr="ssh -L 1214:localhost:8983 solr@gnu.dev.job.dk firefox http://localhost:1214/solr/" function profiling { local JIX_USERID=233476; # userid of JRY