Execute system commands via hotkeys or command palette in Obsidian (https://obsidian.md). Some automated events are also supported, and execution via URI links.
[x] Set preventSubmit to true in the library settings.
[x] Remove all the current as HTMLInputElement quirks (there are two three places where those are used).
[x] Add to CHANGELOG.
[x] Read through the new library version's source code.
Test suite:
[x] Add a simple testcase that checks that executing a multiline command works ok.
Documentation:
[x] Mention that it's possible to hit enter in shell command fields to split the command to multiple lines (it's not so clear because the fields are one line tall by default).
[x] Mention that shells interpret each line as their own command. Example:
echo Hello
ls
This command first echoes Hello, then executes the ls command which displays directory contents. It does not echo Hello ls!
Discussed in https://github.com/Taitava/obsidian-shellcommands/discussions/153
Programming:
<input>
element to<textarea>
.https://github.com/kraaden/autocomplete/pull/90(edit 2022-05-01: The latter is merged 🙂👍 ).preventSubmit
totrue
in the library settings.as HTMLInputElement
quirks (there aretwothree places where those are used).Test suite:
Documentation:
This command first echoes Hello, then executes the
ls
command which displays directory contents. It does not echo Hello ls!max_visible_lines_in_shell_command_fields
.autocomplete
version information in the History section here: https://publish.obsidian.md/shellcommands/Variables/Autocomplete/Autocomplete#History