dot dot dotfiles
1#!/usr/bin/bash
2
3NC='\033[0m'
4ARG='\033[0;31m' # red
5TXT='\033[0;32m' # green, or 1;32m for light green
6SYM='\u2192' # right arrow
7
8if [ "$1" == "" ]; then
9 Rscript -e "dat <- mpmisc::latest_comments (); writeLines (dat[[\"repo_issue\"]], '~/Documents/issues')"
10elif [ "$1" == "help" ]; then
11 echo -e "${SYM} ${ARG}no arguments${NC} : ${TXT}update issue comment list.${NC}"
12 echo -e "${SYM} ${ARG}help${NC} : ${TXT}display these help messages.${NC}"
13 echo -e "${SYM} ${ARG}<repo>${NC} : ${TXT}open GitHub issues page for <repo>.${NC}"
14 echo -e "${SYM} ${ARG}<repo> <number>${NC} : ${TXT}open GitHub issue#<number> for <repo>.${NC}"
15elif [ "$2" == "" ]; then
16 Rscript -e "mpmisc::open_gh_issue (\"$1\")"
17else
18 Rscript -e "mpmisc::open_gh_issue (\"$1\", $2)"
19fi