abhishekjairath / htyt

Hyper plugin to search and play youtube videos
17 stars 6 forks source link

Unknown command 'htyt.' #5

Open mgroth0 opened 7 years ago

mgroth0 commented 7 years ago

happens every time

abhishekjairath commented 7 years ago

Can you tell the hyper version and OS?

mgroth0 commented 7 years ago

10.12.3 & 1.3.1

postmart commented 7 years ago

@matthew-groth do you have a space between htyt. and the song name? as far as i understand it should be htyt."name of the song"

csrgxtu commented 6 years ago

not work on my side too

davegregg commented 5 months ago

I believe I've discovered a common cause of this issue.

The RegEx patterns which are used to detect the htyt."whatever" command will only match word characters (alphanumeric characters and underscores), whitespace, and commas.

https://github.com/abhishekjairath/htyt/blame/5c092cf24d58f6273da92eb0ee9e42a202f592e1/index.js#L6

htyt\.[\w\s,]+

So any search string containing an apostrophe, a quotation mark, parentheses, hyphens, etc., will fail, resulting in the "Command not found."

However, the plugin fails silently for me on Windows/Git Bash even with simple strings which pass the RegEx pattern and which match a YouTube video title exactly.