diff --git a/dot_zsh_functions b/dot_zsh_functions index 3e4e8f9..ee55959 100644 --- a/dot_zsh_functions +++ b/dot_zsh_functions @@ -326,6 +326,10 @@ function checkenlist() { function checkenremote() { local target_url=$(echo "$1" | sed 's/github.com/raw.githubusercontent.com/g' | sed 's;blob/;;') + if [[ "$target_url" =~ "githubusercontent.com" && ! "$target_url" =~ "README" ]]; then + target_url=$(echo "$target_url/master/README.md") + fi + arrow "checking $target_url" curl --location --insecure --silent "$target_url" > /tmp/file && checkenlist /tmp/file && write-good --no-passive /tmp/file && proselint /tmp/file && \cat /tmp/file > alex -q --stdin }