diff options
author | typebrook <typebrook@gmail.com> | 2020-03-18 17:16:02 +0800 |
---|---|---|
committer | typebrook <typebrook@gmail.com> | 2020-03-18 18:33:30 +0800 |
commit | ba7868eec3ff6c9d764ce2fa3dda8943b91c2dc7 (patch) | |
tree | 546e72fed3d763028d4fb9a90804e95c4c47972e | |
parent | f403e31edff19d6ac67a489ea352d754b48cb2ad (diff) |
Modify hint wording
-rwxr-xr-x | gist | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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 | ||
46 | currentVersion="1.23.0" | 45 | currentVersion="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 |