aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xgist7
1 files changed, 3 insertions, 4 deletions
diff --git a/gist b/gist
index 7629c8d..51844e8 100755
--- a/gist
+++ b/gist
@@ -40,7 +40,6 @@
40# It is your business to do git commit and git push 40# It is your business to do git commit and git push
41 41
42# TODO codebase statistics, like C++ or something 42# TODO codebase statistics, like C++ or something
43# TODO subcommand tag for #TAG in description
44# TODO migrate to gh-page, with install.sh and check_md5 in README 43# TODO migrate to gh-page, with install.sh and check_md5 in README
45 44
46currentVersion="1.23.0" 45currentVersion="1.23.0"
@@ -183,7 +182,7 @@ _configure() {
183# Prompt for username 182# Prompt for username
184_ask_username() { 183_ask_username() {
185 while [[ ! $user =~ ^[[:alnum:]]+$ ]]; do 184 while [[ ! $user =~ ^[[:alnum:]]+$ ]]; do
186 [[ -n $user ]] && echo "Not a valid username" 185 [[ -n $user ]] && echo "Invalid username"
187 read -r -p "Github username: " user < /dev/tty 186 read -r -p "Github username: " user < /dev/tty
188 done 187 done
189 _configure user "$user" 188 _configure user "$user"
@@ -199,7 +198,7 @@ _ask_token() {
199 fi 198 fi
200 199
201 while [[ ! $token =~ ^[[:alnum:]]{40}$ ]]; do 200 while [[ ! $token =~ ^[[:alnum:]]{40}$ ]]; do
202 [[ -n $token ]] && echo "Not a valid token" 201 [[ -n $token ]] && echo "Invalid token"
203 read -r -p "Paste your token here (Ctrl-C to skip): " token < /dev/tty 202 read -r -p "Paste your token here (Ctrl-C to skip): " token < /dev/tty
204 done 203 done
205 _configure token "$token" 204 _configure token "$token"
@@ -423,7 +422,7 @@ _gist_id() {
423 if [[ -z $GIST_ID || ! $1 =~ [0-9a-z]+ ]]; then 422 if [[ -z $GIST_ID || ! $1 =~ [0-9a-z]+ ]]; then
424 echo -e "$(hint=false _show_list | sed -Ee 's/^( *[0-9a-z]+)/\\e[5m\1\\e[0m/')" 423 echo -e "$(hint=false _show_list | sed -Ee 's/^( *[0-9a-z]+)/\\e[5m\1\\e[0m/')"
425 echo 424 echo
426 echo -e "Not a valid index: \e[33m$1\e[0m" 425 echo -e "Invalid index: \e[33m$1\e[0m"
427 echo 'Use the indices blinking instead (like 1 or s1)' 426 echo 'Use the indices blinking instead (like 1 or s1)'
428 return 1 427 return 1
429 fi 428 fi