aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xgist6
1 files changed, 3 insertions, 3 deletions
diff --git a/gist b/gist
index dbf4c45..d5b4f41 100755
--- a/gist
+++ b/gist
@@ -593,9 +593,9 @@ _create_gist() {
593_edit_gist() { 593_edit_gist() {
594 _gist_id "$1" || return 1 594 _gist_id "$1" || return 1
595 595
596 local prefill=$(sed -ne "/^$1 / p" $INDEX | cut -d' ' -f9-)
596 if [[ -z $2 ]]; then 597 if [[ -z $2 ]]; then
597 echo 'Type new description:' 598 read -e -p 'Edit description: ' -i "$prefill" -r DESC < /dev/tty
598 read -e -r DESC < /dev/tty
599 else 599 else
600 DESC="$2" 600 DESC="$2"
601 fi 601 fi
@@ -606,7 +606,7 @@ _edit_gist() {
606 | sed -e '1 s/^/[/; $ s/$/]/' \ 606 | sed -e '1 s/^/[/; $ s/$/]/' \
607 | _parse_response "$1" ) 607 | _parse_response "$1" )
608 [[ -n $new_record ]] && sed -i'' -E -e "/^$1 / s^.+^$new_record^" $INDEX \ 608 [[ -n $new_record ]] && sed -i'' -E -e "/^$1 / s^.+^$new_record^" $INDEX \
609 && hint=false _show_list | grep -E "^[ ]+$1" \ 609 && hint=false mark="$1 " _show_list \
610 || echo 'Fail to modify gist description' 610 || echo 'Fail to modify gist description'
611} 611}
612 612