diff options
-rwxr-xr-x | gist | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -406,8 +406,8 @@ _repo_url() { | |||
406 | 406 | ||
407 | # Get gist id from index files | 407 | # Get gist id from index files |
408 | _gist_id() { | 408 | _gist_id() { |
409 | GIST_ID=$( (grep -hs '' $INDEX || true) | sed -n -e "/^$1 / p" | cut -d' ' -f2 | sed -E -e 's#.*/##') | 409 | GIST_ID=$(sed -n -e "/^$1 / p" $INDEX | cut -d' ' -f2 | sed -E -e 's#.*/##') |
410 | if [[ -z $GIST_ID ]]; then | 410 | if [[ -z $GIST_ID || ! $1 =~ [0-9a-z]+ ]]; then |
411 | echo -e "$(hint=false _show_list | sed -Ee 's/^( *[0-9a-z]+)/\\033[5m\1\\033[0m/')" | 411 | echo -e "$(hint=false _show_list | sed -Ee 's/^( *[0-9a-z]+)/\\033[5m\1\\033[0m/')" |
412 | echo | 412 | echo |
413 | echo -e "Not a valid index: \e[33m$1\e[0m" | 413 | echo -e "Not a valid index: \e[33m$1\e[0m" |