babashka / neil

A CLI to add common aliases and features to deps.edn-based projects
MIT License
360 stars 26 forks source link

Make code snippet executable when using copy button #193

Closed rogererens closed 9 months ago

rogererens commented 9 months ago

The code snippets have a copy button on the far right side of the 'code area'. But when you paste the copied text into your terminal, the copied text is not executable: it has a dollar sign in the front. On the web page, it signifies the user's prompt, but in the terminal, the shell can't make any chocolate of it ;-)

So in order to facilitate the users that want to copy the code examples into their terminal windows, this PR proposes to remove the leading $-sign in the code snippets. And maybe you know something smart for multi-line snippets as well (rewrite using && perhaps?).

Please answer the following questions and leave the below in as part of your PR.