Make typing shell commands a toggleable feature
nsrosenqvist opened this issue · 3 comments
Today, if you want to run a shell command, you enclose it within backticks. It'd be neat if you could toggle between typing PHP and shell commands by pressing a button, e.g. "§" (or whatever you have above tab). What you type in shell-mode could be colored differently to indicate that you will be executing the code in your default shell. Thoughts?
This is an interesting idea. I think the difficulty would be the uncanny valley between what you'd be executing in that mode and what you'd execute in an actual shell. With the explicit backticks, it's clear that what you're running is PHP code that's eval'd. So you know how to deal with escaping, what variables and methods are available, etc. I'm inclined to say the slight convenience isn't worth the added mental complexity for "a shell but not actually your shell".
I understand your perspective, and I'm inclined to agree with you. Sounded like a good idea to me at first, but I fear it adds a layer of complexity with little added benefit. Thanks for considering it! I'll leave it up to you to decide if you want to close this ticket or leave it open.
Sounds good. Thanks again for the request!