Fix some aliases and improve on gbr
This commit is contained in:
parent
f2d80ebd2b
commit
c4c0b0fc01
@ -42,7 +42,9 @@ function ack_open { nvim $( ack -m 1 -T junkFiles "$@" | grep -Po "^(?:lib|t|tmp
|
|||||||
|
|
||||||
# git
|
# git
|
||||||
alias gst="git status"
|
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+(?<branch>\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 ggn { git grep -Pn --color=always "$@" :/; }
|
||||||
function ggt { git grep -Pn --color=always "$@" t/lib ; }
|
function ggt { git grep -Pn --color=always "$@" t/lib ; }
|
||||||
function ggp { ggn --color=always "$@" $(git rev-list --all); }
|
function ggp { ggn --color=always "$@" $(git rev-list --all); }
|
||||||
@ -83,7 +85,7 @@ git() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
alias TODO="ggn 'TODO: jry:'"
|
alias TODO="ggn 'TODO: jry:?'"
|
||||||
|
|
||||||
title() {
|
title() {
|
||||||
# set input argument as window title
|
# set input argument as window title
|
||||||
@ -195,10 +197,16 @@ fi
|
|||||||
if [ $HOSTNAME = 'gnu' ] && [ $USER = 'jry' ]; then
|
if [ $HOSTNAME = 'gnu' ] && [ $USER = 'jry' ]; then
|
||||||
alias fzy="~/.fzy/fzy"
|
alias fzy="~/.fzy/fzy"
|
||||||
|
|
||||||
alias perlperl="/home/perl/bin/perl"
|
alias perlperl="/usr/bin/perl"
|
||||||
alias perlprove="/home/perl/bin/prove"
|
alias perlprove="/home/perl/bin/prove"
|
||||||
function prove { jix-shell TEST_METHOD=$TEST_METHOD BAIL_ON_FAIL=$BAIL_ON_FAIL 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 {
|
function profiling {
|
||||||
local JIX_USERID=233476; # userid of JRY
|
local JIX_USERID=233476; # userid of JRY
|
||||||
|
Loading…
Reference in New Issue
Block a user