out-of-cheese-error / the-way

A code snippets manager for your terminal.
MIT License
354 stars 16 forks source link

Param input and output rendering incorrectly #91

Closed johnhayesio closed 3 years ago

johnhayesio commented 3 years ago

A couple of things I have noticed with a couple of snippets I have made. When using a snippet with a <param> and sending it to /dev/null 2>&1 & (background job), the param is not being captured correctly or sending to output correctly. For example, when using this specific snippet: aria2c --on-download-complete="/tmp/notify.sh" -s16 -x16 <download-link> > /tmp/aria.log 2>&1 &

The input renders as: ? download-link> > /tmp/aria.log 2 and the output as: aria2c --on-download-complete="/tmp/notify.sh" -s16 -x16 <download-link>&1 &

Last, it also seems that only works with the-way cmd and not when using the default editor to create a snippet. Is that intended? If not, then is there a way to allow this? I can create the command prior to adding it as a snippet cmd, but it kind of seems like it would defeat the purpose for some. Not such a big deal though.

Ninjani commented 3 years ago

Oops looks like I messed up the regex. Pushing a fix now and should be working fine in the next version, thanks!

(Should be fixed in v0.12.1)