If the remote is not recognized, vim prints these messages. They are not very useful.
Error detected while processing function <SNR>36_gh_line:
line 44:
E121: Undefined variable: url
E15: Invalid expression: g:gh_open_command . url
line 46:
E121: Undefined variable: l:finalCmd
E15: Invalid expression: "vim-gh-line executing: " . l:finalCmd
line 48:
E121: Undefined variable: l:finalCmd
E116: Invalid arguments for function system
Press ENTER or type command to continue
We should add an else condition and give a reasonable error message to the user.
For example
The remote: <remote> has not been recognized as one of the supported git hosing frameworks: GitHub, GitLab, BitBucket, Cgit.
If the remote is not recognized, vim prints these messages. They are not very useful.
This is because the final else {} condition is missing in this if - else chain. https://github.com/ruanyl/vim-gh-line/blob/5f2bd335133a942b868bacd59cddc4fb488c86ee/plugin/vim-gh-line.vim#L93
We should add an else condition and give a reasonable error message to the user. For example
The remote: <remote> has not been recognized as one of the supported git hosing frameworks: GitHub, GitLab, BitBucket, Cgit.