aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xgist7
1 files changed, 4 insertions, 3 deletions
diff --git a/gist b/gist
index dcd6e58..a0ee803 100755
--- a/gist
+++ b/gist
@@ -48,7 +48,6 @@
48# Since now a gist is a local cloned repo 48# Since now a gist is a local cloned repo
49# It is your business to do git commit and git push 49# It is your business to do git commit and git push
50 50
51# FIXME 'gist -n [N]' is refered to range
52# TODO Save HEADER with wget and httpie 51# TODO Save HEADER with wget and httpie
53# TODO user friendly config file 52# TODO user friendly config file
54# TODO feature to exclude tag-value or grep-string 53# TODO feature to exclude tag-value or grep-string
@@ -531,7 +530,7 @@ _goto_gist() {
531 if [[ $* =~ (-n|--no-action) ]]; then 530 if [[ $* =~ (-n|--no-action) ]]; then
532 return 0 531 return 0
533 elif [[ -z $action ]]; then 532 elif [[ -z $action ]]; then
534 action='echo Inside subshell, press \<CTRL-D\> to exit; ${SHELL:-bash}' 533 action='echo Inside subshell, press \<CTRL-D\> to exit; echo; ls; ${SHELL:-bash}'
535 fi 534 fi
536 535
537 cd "${folder}/${GIST_ID}" && eval "$action" 536 cd "${folder}/${GIST_ID}" && eval "$action"
@@ -539,6 +538,7 @@ _goto_gist() {
539 538
540# Return the path of local repo with a given index 539# Return the path of local repo with a given index
541_goto_gist_by_index() { 540_goto_gist_by_index() {
541 [[ $1 =~ (-n|--no-action) ]] && set -- $2 -n # move '-n' as the last argument
542 _gist_id "$1" || return 1 542 _gist_id "$1" || return 1
543 543
544 if [[ ! -d $folder/$GIST_ID ]]; then 544 if [[ ! -d $folder/$GIST_ID ]]; then
@@ -844,6 +844,7 @@ _access_last_index() {
844 844
845_apply_config "$@" || exit 1 845_apply_config "$@" || exit 1
846if [[ $init ]]; then _update_gists; exit 0; fi 846if [[ $init ]]; then _update_gists; exit 0; fi
847shopt -s extglob
847case "$1" in 848case "$1" in
848 "") 849 "")
849 _print_records ;; 850 _print_records ;;
@@ -896,7 +897,7 @@ case "$1" in
896 lan | l) 897 lan | l)
897 shift 898 shift
898 _gists_with_languages "$@" ;; 899 _gists_with_languages "$@" ;;
899 *-*) 900 *([s0-9])-*([s0-9]))
900 mark=.; _gists_with_range "$@" ;; 901 mark=.; _gists_with_range "$@" ;;
901 last | L) 902 last | L)
902 _access_last_index "$@" ;; 903 _access_last_index "$@" ;;