Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Commit

Permalink
preset open in var
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Hartmann committed Apr 10, 2017
1 parent 661c707 commit cf4471b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ if [ "$1" == "token" ]; then
elif [ "$1" == "list" ]; then
shift

OPEN_IN=false

if has_parameter "-b" $@; then
OPEN_IN="browser"
shift
Expand Down Expand Up @@ -58,14 +60,14 @@ elif [ "$1" == "list" ]; then
GIST_COLOR=$YELLOW
fi

if [ $OPEN_IN != false ]; then
if $OPEN_IN; then
printf "%d. ${GIST_COLOR}${GIST_ID}${NORMAL}: ${GIST_DESC}\n" $(($i+1))
else
printf "${GIST_COLOR}${GIST_ID}${NORMAL}: ${GIST_DESC}\n"
fi
done

if [ $OPEN_IN != false ]; then
if $OPEN_IN; then
printf "\n"
read -p "Number to open (1..${GIST_COUNT}): " GIST_NO

Expand Down

0 comments on commit cf4471b

Please sign in to comment.