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
function gg() { | |
local grep="$1" | |
until [ -z "$3" ] | |
do | |
shift | |
grep+=" $1" | |
done | |
local path=$2 |
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
view_github_issue() { | |
open -a Google\ Chrome https://github.com/$github_org/$github_repo/issues/$1 | |
} | |
alias issue=view_github_issue |
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
github_org='narvar' | |
github_repo=${PWD##*/} | |
git_branch() { | |
local git_status="$(git status 2> /dev/null)" | |
local on_branch="On branch ([^${IFS}]*)" | |
local on_commit="HEAD detached at ([^${IFS}]*)" | |
if [[ $git_status =~ $on_branch ]]; then | |
local branch=${BASH_REMATCH[1]} |