From e3aeb454276c4be56709b1560081f20ee8939f7f Mon Sep 17 00:00:00 2001 From: typebrook Date: Sat, 14 Mar 2020 23:36:47 +0800 Subject: Fix behaviro in gist detail --- gist | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gist b/gist index a5d91c7..a85e826 100755 --- a/gist +++ b/gist @@ -471,9 +471,10 @@ _show_detail() { echo API: https://api.github.com/gists/$GIST_ID echo created_at: $(echo $record | cut -d' ' -f7) echo updated_at: $(echo $record | cut -d' ' -f8) - if [[ -d $folder/$GIST_ID ]]; then - echo files - ls | sed -e 's/^/ /' + repo=$folder/$GIST_ID + if [[ -d $repo ]]; then + echo files: + ls $repo | sed -e 's/^/ /' fi } -- cgit v1.2.3-70-g09d2