summaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gist4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/gist b/scripts/gist
index fe839a3..b82fa0a 100755
--- a/scripts/gist
+++ b/scripts/gist
@@ -65,7 +65,7 @@ set -eo pipefail
65_auth() { 65_auth() {
66 echo 'Hi fellow! To access your gists, I need your Github username and a personal token with scope which allows "gist"!' 66 echo 'Hi fellow! To access your gists, I need your Github username and a personal token with scope which allows "gist"!'
67 read -p "Github username: " user < /dev/tty 67 read -p "Github username: " user < /dev/tty
68 if [[ $new_token =~ ^[[:alnum:]]+$ ]]; then 68 if [[ $user =~ ^[[:alnum:]]+$ ]]; then
69 mkdir -p ~/.config 69 mkdir -p ~/.config
70 umask 0077 70 umask 0077
71 echo user=$user > $config 71 echo user=$user > $config
@@ -290,7 +290,7 @@ _edit_gist() {
290 290
291 echo -n 'Type new description: ' 291 echo -n 'Type new description: '
292 read DESC < /dev/tty 292 read DESC < /dev/tty
293 jq -n --arg DESC "$DESC" '{ description: ($DESC) }' \ 293 echo "{ \"description\": \"$DESC\" }" \
294 | curl -X PATCH -H "$auth_header" --data @- $github_api/gists/$GIST_ID > /dev/null \ 294 | curl -X PATCH -H "$auth_header" --data @- $github_api/gists/$GIST_ID > /dev/null \
295 && _update 295 && _update
296} 296}