hyperpower icon indicating copy to clipboard operation
hyperpower copied to clipboard

Viewing the source of hyperpower in the terminal activates the wow mode command

Open nilliams opened this issue 9 years ago • 14 comments

Was wondering what was going on for while, seems like a problem that the 'wow' command is being executed just by viewing a text file that contains the string that toggles it.

E.g.

vim ~/.hyperterm_plugins/node_modules/hyperpower/index.js

Then alternate between gg and G to jump to top/bottom of file.

Or, just cat it:

cat ~/.hyperterm_plugins/node_modules/hyperpower/index.js

nilliams avatar Aug 01 '16 20:08 nilliams

It looks like the issue is on line 18-19 in the index.js file. The regex matches against the text from action.data. When we are viewing the index.js file, the regex matches because the text of the file itself is part of action.data

We could do a more strict regex, and check that the regex starts with the shell prefix. /^bash: (wow: command not found|command not found: wow)/

This would interfere with #1 though; I haven't worked on other shells so I'm not sure what their exact output looks like.

newyork-anthonyng avatar Aug 04 '16 16:08 newyork-anthonyng

well, I cannot figure out how to turn on wow mode until reaching this issue page:)

mocheng avatar Aug 17 '16 05:08 mocheng

But, how to turn of wow mode?

mocheng avatar Aug 17 '16 05:08 mocheng

Hi @mocheng!

You can toggle "wow" mode by typing "wow" inside of hyperterminal.

newyork-anthonyng avatar Aug 17 '16 08:08 newyork-anthonyng

I couldn't turn on wow mode either. Only other plugin I have is atom dark theme. superpower

bali182 avatar Oct 24 '16 13:10 bali182

I couldn't turn on wow mode too in in Hyper 0.8.3

Everything worked well except wow。。。

kanye0405 avatar Dec 05 '16 03:12 kanye0405

wow is not working for me

mgroth0 avatar Mar 13 '17 14:03 mgroth0

It was just been fixed. Have a try now.

regisbsb avatar Mar 19 '17 22:03 regisbsb

Actually I'm having trouble with hyperpower in general. Perhaps I'm forgetting something?

Here it is in my plugins: image

Current version: image

But wow command doesn't work: image

I'm using hyper 1.3.1 OSX: 10.12.3

mgroth0 avatar Mar 27 '17 15:03 mgroth0

I can pull resquest a fix. But I've remember seeing something about that being fixed already

regisbsb avatar Mar 27 '17 19:03 regisbsb

https://github.com/zeit/hyperpower/blob/master/index.js#L35

regisbsb avatar Mar 27 '17 19:03 regisbsb

https://github.com/zeit/hyperpower/pull/29/files @matthew-groth maybe update your hyper.

regisbsb avatar Mar 27 '17 19:03 regisbsb

Yes this ^ (I replied, but then realised it was already fixed and deleted my comment) but also, please start a new issue for unrelated problems with wow as this is about a specific issue (see title).

Namely: Reading a file should not trigger a command. If this becomes a common pattern in Hyper plugins, this is arguably an attack vector.

nilliams avatar Mar 27 '17 20:03 nilliams