Send text selection(s) or entire active file as environment variables into a new shell/terminal. With the default configurations, the text sent is assigned to an environment variable named $VALUE.
Examples
Send selection to a new terminal
Make any selection in the editor.
Open commands list (Ctrl+Shift+P).
Type in Send to Terminal: Send selection and press Enter or Return. A new terminal opens with the command template:
echo -E "$VALUE" | cat
Modify the command as you wish.
⚠️ If there were more than one selection (e.g., by having multi-cursor selections or by selecting all occurrences of a text/pattern), you can access them via $VALUE_0, $VALUE_1, and so on.
Send active file to a new terminal
Bring the tab you need to send to terminal. It's not required to save it beforehand.
Open commands list (Ctrl+Shift+P).
Type in Send to Terminal: Send active file and press Enter or Return. A new terminal opens with the command template:
echo -E "$VALUE" | cat
Modify the command as you wish.
Contribution
Please feel free to contribute by submitting PR or opening new issues on the repository and discuss problem or new features. 🍏