aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-04-10 11:03:30 +0800
committertypebrook <typebrook@gmail.com>2020-04-10 11:03:30 +0800
commitea0a9ccddc1855c0ace138ff258928faeac022f2 (patch)
treef29e2b44d733bd3927dc4d0eac9e02fbe4e4159a
parent89887cee78d9f897dae7df8e6301e6bb995438ea (diff)
Enable backspace and readline hotkeys with 'gist new'
-rwxr-xr-xgist4
1 files changed, 2 insertions, 2 deletions
diff --git a/gist b/gist
index 241bf43..2e75003 100755
--- a/gist
+++ b/gist
@@ -623,7 +623,7 @@ _new_file() {
623 fi 623 fi
624 624
625 echo > /dev/tty 625 echo > /dev/tty
626 [[ -z $1 ]] && read -r -p 'Type file name: ' filename < /dev/tty 626 [[ -z $1 ]] && read -e -r -p 'Type file name: ' filename < /dev/tty
627 mv "$tmp_file" /tmp/"$filename" 627 mv "$tmp_file" /tmp/"$filename"
628 echo /tmp/"$filename" 628 echo /tmp/"$filename"
629} 629}
@@ -647,7 +647,7 @@ _create_gist() {
647 _set_gist "$@" || return 1 647 _set_gist "$@" || return 1
648 checkInternet || exit 1 648 checkInternet || exit 1
649 [[ -z ${files[*]} ]] && files+=($(_new_file "$filename")) 649 [[ -z ${files[*]} ]] && files+=($(_new_file "$filename"))
650 [[ -z $description ]] && read -r -p 'Type description: ' description < /dev/tty 650 [[ -z $description ]] && read -e -r -p 'Type description: ' description < /dev/tty
651 651
652 echo 'Creating a new gist...' 652 echo 'Creating a new gist...'
653 http_data=$(mktemp) 653 http_data=$(mktemp)