This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
# If the cwd is a git repo, display the branch name in the tmux status bar. | |
get_git_branch() { | |
if [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" ]; then | |
local branch short_branch | |
branch=$(git symbolic-ref -q HEAD) | |
branch=${branch##refs/heads/} | |
branch=${branch:-HEAD} | |
short_branch=$(echo "$branch" | cut -c1-20) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Simple JIRA CLI utility. | |
# Currently only works on OSX (since it makes use of OSX's built-in | |
# open command). | |
jira() { | |
if [ -z "$1" ]; then | |
open "$JIRA_URL""/secure/Dashboard.jspa" | |
return 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Print all of the terminal colors. | |
colors() { | |
local count=0 | |
local cols=$(tput cols) | |
for i in {0..255}; do | |
((count+=4)) | |
if [ $count -gt $cols ]; then | |
printf "\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Aliases for changing directories. | |
alias ..="cd .." | |
alias ...="cd ../.." | |
alias ....="cd ../../.." | |
alias .....="cd ../../../.." | |
alias -- -="cd - >/dev/null 2>&1" |
NewerOlder