Taitava / obsidian-shellcommands

Execute system commands via hotkeys or command palette in Obsidian (https://obsidian.md). Some automated events are also supported, and execution via URI links.
GNU General Public License v3.0
351 stars 11 forks source link

[feature request] When using ask after execution, allow selection of output for inserting #158

Closed pcause closed 2 years ago

pcause commented 2 years ago

When one selected "ask" for the output destination, a box is show displaying the output. It would be great to allow a user to select which part of the output should be inserted/pasted/etc

Taitava commented 2 years ago

Hi, thank you for your suggestion! 🙂

Yea, I think that when something is selected in the output textarea, the current "Redirect:" could change to "Redirect selection:" (Edit 2022-02-22: See another message below). When nothing is selected, then the redirection would use all the text, just like now.

A workaround for now is to edit the output text by removing everything except the text that is wanted, but it's slower than just selecting text, so I do agree that this idea could be implemented. Should not even be a big thing to do.

Thanks! 🙂

P.S: In this repository, normally feature requests would be first opened in Discussions (in Ideas category), and later as issues after a conversation. But it's ok now. 🙂👍

Taitava commented 2 years ago

I think that when something is selected in the output textarea, the current "Redirect:" could change to "Redirect selection:".

Actually, that text will not change, but I'll add just a tip text telling that if something is selected, then the selection will be used instead of the whole text.

Taitava commented 2 years ago

Done. Will be released in 0.11.0.

pcause commented 2 years ago

Thanks.

Taitava commented 2 years ago

And it can be tested in a beta test: https://github.com/Taitava/obsidian-shellcommands/discussions/166