alias.coffee !f(){ if [ $(date -j +%a) = 'Fri' ]; then echo 'Friday! Time for beer!'; else echo 'Time for a coffee break. Go get a cup of joe.'; fi };f
An alias for a quick status:
alias.st status -s -uno
An alias to do a diff with my configured difftool:
alias.d difftool
An alias to use kdiff3 to display my changes in my branch from master:
I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
I'd suggest dropping the -j on your date command. It doesn't need to be there because you're not setting a date, and it's not compatible with GNU date, so it won't work on 99% of servers.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
An alias to show my aliases:
alias.alias config --get-regexp ^alias\.
An alias to make a branch, with a date suffix:
alias.mkbr !f(){ local args="$*"_; local gituser=$(git config user.email); gituser=${gituser%@*}; if [ "$args" = "_" ]; then args=""; fi; args=${gituser:-${USER}}/$args$(date "+%Y-%b-%d"); args=$(echo "$args" | tr ' [A-Z]' '_[a-z]'); git checkout -b "$args"; };f
An alias to delete a branch:
alias.rmbr !f(){ git branch -d "${1}"; git push origin --delete "${1}"; };f
An alias to go to master:
alias.master checkout master
An alias to get coffee:
alias.coffee !f(){ if [ $(date -j +%a) = 'Fri' ]; then echo 'Friday! Time for beer!'; else echo 'Time for a coffee break. Go get a cup of joe.'; fi };f
An alias for a quick status:
alias.st status -s -uno
An alias to do a diff with my configured difftool:
alias.d difftool
An alias to use kdiff3 to display my changes in my branch from master:
alias.d3master difftool --tool kdiff3 --dir-diff origin/master..
A bash shell alias to do a git log of just the branch's first parent:
alias log=git log --pretty=oneline --graph --max-count=$(( $LINES / 2 )) --first-parent --use-mailmap --date=format:%Y-%b-%d\ %H:%M --pretty=format:'\''%C(red)%h%C(reset) -%C(yellow)%d%C(reset) %C(green)%cd %C(bold blue)%aN%C(reset) %s'\'' --abbrev-commit
I'd suggest dropping the
-j
on yourdate
command. It doesn't need to be there because you're not setting a date, and it's not compatible with GNU date, so it won't work on 99% of servers.