All notable changes to this plugin will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Features that are currently in development and not released yet. This does not include features that require longer planning, for which please see the Roadmap and Ideas sections.
- Nothing at the moment.
0.23.0 - 2024-11-09
- Caret moved in editor event (#345).
- A non-working draft version of the event was accidentally released already in SC
0.20.0
, but now it's finally working.
- A non-working draft version of the event was accidentally released already in SC
- New variables:
{{yaml_values}}
and{{event_yaml_values}}
(#424).- Single value retrieving variables
{{yaml_value}}
and{{event_yaml_value}}
existed already, but these new variables can retrieve lists of values.
- Single value retrieving variables
- Notification balloon: Use custom monospace font set in Obsidian's Appearance settings (#431).
- Settings: Add more icons by getting them automatically from Obsidian (#425).
0.22.0 - 2024-05-05
- Event debouncing for avoiding executing shell commands too often (#380).
- New output channel: Assign custom variables (#382).
- Allows storing output from shell commands and reusing them as input for other shell commands later.
- Also added a setting for enabling notifications when custom variables' values change.
- Ribbon icon for Custom variables view (#386).
- New variables
{{obsidian_api_version}}
and{{shell_commands_plugin_version}}
(#387). {{event_type}}
variable (#394).
- Settings: Make "Show a notification when executing shell commands" decidable on a per shell command basis (388).
- Settings: Event Every n seconds: Allow one decimal (#385).
0.21.0 - 2023-12-30
SC VERSION 0.21.0
INCREASES THE MINIMUM OBSIDIAN VERSION REQUIREMENT TO 1.4.0
. Older versions of Obsidian cannot upgrade SC to 0.21.0
.
- Prompts: Support different field types (#365).
- Linux: Display a warning if Obsidian is installed using Flatpak (#368).
- Make variables
{{note_content}}
and{{yaml_content}}
compatible with Obsidian>= 1.4.0
(#372).- No practical changes to the variables' behavior.
- This change increases the SC plugin's minimum Obsidian version requirement to
1.4.0
.
0.20.1 - 2023-11-28
- Fixed: Cmd + click not working on macOS (#347).
- Fixed: UI bug in settings: Wrong shell names displayed under shell command previews (#366).
- Fixed: If
PATH
additions are cleared in settings, old additions still apply until the plugin is restarted (#362).
0.20.0 - 2023-06-25
- Text styling for output (ANSI code) (#329).
- Some shell programs style their text output with colors, emphasis, bolds, links etc. by inserting ANSI code to output. Previously, the plugin didn't do anything for ANSI code, and it ended up cluttering output. Now it's possible to convert ANSI code to HTML or turn the conversion off (on by default).
- Also, Notification/error balloon now displays monospaced output (can be turned off in settings). Improves error messages' readability (and code-like output's readability, too).
- Usage listings for custom variables and deletion confirmation prompts (#340).
- Settings: Make each shell command show their shell's name (#353).
- Command palette: Re-execute last shell command (#354).
- Incomplete code of an event named "Cared moved in editor" was accidentally released. The event does not work yet. (#345).
- Custom variables pane: Show linebreaks in variable values correctly (#355).
- Small improvements for shell command extra settings modal (#356).
- The title of the modal will show the alias text instead of shell command content.
- In Environments tab, a new textarea will be added for editing the default shell command (in addition to the current three operating system specific textareas).
- Add Execute now icon button to the bottom of the extra settings modal.
- Settings file: Convert shell commands' 'output_channels' from strings to configurable objects (#330).
- Not so visible to users, but makes #329 possible. Allows adding other output handler related settings later, too.
0.19.1 - 2023-05-27
- Executing shell commands does not work in 0.19.0 (#350).
- No shell commands could be executed, unless PATH additions were defined.
- When trying to execute a shell command, nothing happened, and there were no visible error messages (that said, error console had a message).
- This is now fixed, and you don't need to define PATH additions to overcome the problem.
0.19.0 - 2023-05-27
- Support for custom shells(#297).
- Define e.g. WSL (Windows Subsystem for Linux) or MinGW-w64 shell to execute shell commands in different environments. Documentation.
0.18.2 - 2023-03-26
- Global default values for variables not working when previewing a Prompt (#327).
- Settings panel opening does not always scroll precisely back to previous position (#336).
- Settings: Clicking 'New xxx' button does not always open a modal for editing the new item's settings (#332).
- Output channel Ask after execution: Hotkeys only work for stdout if both stdout and stderr outputs are present (#335).
0.18.1 - 2023-01-22
- Settings: A list of icons definable for shell commands misses some icons. This is because a commit was accidentally not merged to
0.14.0
release in July 2022. Also fixed a small UI annoyance: 'No icon' was not selected when opening settings for a shell command that had no icon defined. (Original feature: #240). - Menu items have no text on macOS (#314).
0.18.0 - 2023-01-06
VERSION 0.18.0 INCLUDES POSSIBLY BACKWARDS INCOMPATIBLE CHANGES to variables {{folder_name}}
and {{event_folder_name}}
, see below.
- Ability to pass variable values to stdin (#283).
- Globally default values for variables (#298).
- New variables: {{yaml_content}} and {{event_yaml_content}} (#267).
- Settings: Add documentation links to the list of {{variables}} (#302).
- Debug: Create a {{newline}} variable (#295).
- Only available in debug mode and used for testing.
- Change {{folder_name}} and {{event_folder_name}} to return a dot instead of an empty string when folder is vault root.
- Might be backwards incompatible! Make sure your shell commands that use
{{folder_name}}
/{{event_folder_name}}
work as expected when the root folder is denoted as a dot.
instead of an empty text
- Might be backwards incompatible! Make sure your shell commands that use
- {{selection}}: Show an error message if nothing is selected (#303).
- Before this, the variable gave an empty text. The old behavior can be restored by defining a default value.
- Settings: Hotkey text should not split over multiple lines (#294).
- Internal: TypeScript compiler: Use strict null checks (#70).
- This should not be visible to users, but as it touches most parts of the plugin, new bugs are always possible, even though the aim is to reduce the risk of new bugs being born.
- Internal: Variables: Prevent storing arguments.
- Internal: Variables: Handle errors by throwing them instead of returning null.
{{yaml_value}}
: Crash if a queried property has a null value (#277).{{caret_paragraph}}
should be able to have a default value defined (#311).
0.17.0 - 2022-11-26
SC VERSION 0.17.0
INCREASES THE MINIMUM OBSIDIAN VERSION REQUIREMENT TO 0.16.3
(practically the same as 1.0.0
). Older versions of Obsidian cannot upgrade SC to 0.17.0
. The requirement raising is done due to #276 and #291.
- Real time output handling (#275).
- This required switching to another execution method in Node.js's
child_process
library. This affects also the traditional way of executing shell commands, which should not have any visible changes, but bugs can always occur when doing changes.
- This required switching to another execution method in Node.js's
- New variable: {{caret_paragraph}} (#282).
- A button for terminating long running shell commands (#289).
- Add support for
sh
shell if it's system default (#281). - Output channel Open files: Support opening new tabs and windows (#291).
- New options:
new-tab
andnew-window
.
- New options:
- Fix layout glitches that came via Obsidian 0.16.0 (#264)
- Settings: Tried to revert tab system layout to how it was.
- Modals: Tried to revert width to make them wide again.
- Even thought the issue title mentions fixing, there's actually just one bug fix, others are change level modifications.
- Output channel 'Open files' opens a new pane again when using
new-pane
, not a new tab (#276).- If you want to open a new tab, you can use the new
new-tab
option (listed under Added).
- If you want to open a new tab, you can use the new
0.16.0 - 2022-09-25
- Output wrappers (#262).
- Show a notification when executing shell commands (#261).
- New variables:
- Show an error message if a shell command is too long to execute (#269).
- Internal: Refactor variable parsing to become asynchronous (#265).
- Should not cause any visible changes per se, but allows creating certain new variables that are dependent on asynchronous Obsidian API methods, such as the above-mentioned
{{note_content}}
.
- Should not cause any visible changes per se, but allows creating certain new variables that are dependent on asynchronous Obsidian API methods, such as the above-mentioned
0.15.0 - 2022-08-20
- New variables: {{file_uri}} and {{event_file_uri}} (#258).
- Settings: Add a search field for shell commands (#246).
- New shell commands will have alphanumeric ids instead of numeric (#253).
- Output channel 'Open file' supports opening multiple files (#255).
- Autocomplete: sort items more intelligently (#249).
0.14.0 - 2022-07-22
SC VERSION 0.14.0
INCREASES THE MINIMUM OBSIDIAN VERSION REQUIREMENT TO 0.15.4
. Older versions of Obsidian cannot upgrade SC to 0.14.0
. Read more below.
- New variables:
{{new_note_folder_name}}
and{{new_note_folder_path}}
(#235). - Menu icons for shell commands (#240).
- In order to support a wider range of icons, the SC plugin's minimum required version of Obsidian is raised from
0.12.12
to0.15.4
. In theory, I could have raised the requirement only to0.13.27
, but I thought that when increasing it once, let's increase to the newest API version, so that future development maybe does not need to increase it soon again. :)
- In order to support a wider range of icons, the SC plugin's minimum required version of Obsidian is raised from
- Settings: Extra options modal: Add hotkeys to switch between shell commands (#243).
- Settings: 'Execute now' button: Ctrl/Cmd + click to temporarily direct output to the 'Ask after execution' modal (#241).
- Settings: Display a text when no shell commands exist (#231).
- Improve an error message when a shell command does not exist for the current OS (but exist for some other OS) (#239).
- Internal: Miscellaneous updates from Obsidian Sample plugin (#196).
- Internal: Use ESLint to improve code readability (#242).
0.13.0 - 2022-06-28
- New events (#218):
- File content modified
- File created
- File deleted
- File moved
- File renamed
- Folder created
- Folder deleted
- Folder moved
- Folder renamed
- Execute shell commands via Obsidian URI (#202).
- Settings: Add directories to the
PATH
environment variable (#204). - Modals, such as prompts, can now be approved by pressing enter (#216).
- The feature can be turned off via a hidden setting to prevent accidental executions/deletions etc, but it's on by default.
- Settings: Add a shortcut icon for defining hotkeys (#210).
- From now on, hotkeys are not displayed for shell commands that are completely excluded from Obsidian's command palette (even if a shell command had hotkeys defined before it was configured as excluded from the command palette).
- Settings: Display shell command id in extra options modal (#205).
0.12.1 - 2022-05-16
- Bug: Autocomplete menu caused some unintended console logging (#223).
- Bug: {{event_yaml_value}} gives wrong error message when the wanted property is not found (#220).
0.12.0 - 2022-05-07
- A modal for asking values from user (= prompt) (#37).
- Custom variables, part 1 (#159): Used to store inputted values from prompts.
- Default values for variables (#190): If a variable cannot be accessed at a given moment, another value can be used instead.
- Hotkeys for output channel: Ask after execution (#145).
- Add autocomplete menu to Alias field (#182).
- Settings: Operating systems & shells tab names are shortened to Environments (#37 / commit 55e5de2b).
- Internal: Variable refactorings (#178).
- Bug: Output channel 'Open a file' causes an error in the console log if the file cannot be opened (#176).
- This same issue also fixes autocomplete to be able to display an error message if a custom help text cannot be read at startup due to incorrect datatype in
autocomplete.yaml
.
- This same issue also fixes autocomplete to be able to display an error message if a custom help text cannot be read at startup due to incorrect datatype in
- Bug: An empty argument in {{yaml_value}}/{{event_yaml_value}} causes a crash (#181).
0.11.1 - 2022-03-05
- Bug: Variable escaping corrupts four-byte unicode characters, e.g. emojis (#171).
- Bug: Content in 'Ask after execution' modal is some times clipped off (#172).
0.11.0 - 2022-02-26
- Output channel: Open a file (#143).
- Command palette: An ability to edit the "Execute: " prefix text (#164).
- A global option to disable all Events (#163).
- Internal: Miscellaneous refactorings (#133). E.g. shortened some CSS class names.
- Output channel Ask after execution: If some text is selected, use the selected text instead of the whole text (#158).
- Fix a latent bug when parsing arguments in variables (#152).
- Bug: Ghost shell commands are executed by events even after removal (#165).
0.10.0 - 2022-02-06
- Events: Execute shell commands automatically when something happens (#123).
- Output channel: Ask after execution (#134): Allows to direct shell command output to a modal where it can be edited and manually redirected to other channels, i.e. to clipboard, file or status bar.
- Ability to hide shell commands from the command palette (#125)
- Settings: Add availability information to the list of variables (#132).
0.9.0 - 2021-12-18
{{caret_position}}
variable (#119). Thank you vrajur for this contribution!{{yaml_value}}
variable (#120).{{file_extension}}
variable (#122).
0.8.0 - 2021-12-10
- Autocompletion menu for variables in shell command fields (#33): When typing
{{
in a shell command field, a dropdown menu will open up, suggesting variables that match the input after{{
. Variable help texts are also displayed. Extra: custom suggestions can be defined in an optionalautocomplete.yaml
file in the plugin's folder. It can contain e.g. all commands supported by a certain shell. Documentation for autocomplete. The autocomplete feature is powered by kraaden/autocomplete. Thank you FelipeRearden for this idea! - Show SC version number in settings, and a link to the changelog (#112).
- Settings: Variables are now located on their own tab (#110).
- Support ignoring error code 0 (#107)
- Internal: Save new main settings fields to file already during loading (#111).
0.7.1 - 2021-12-05
0.7.0 - 2021-11-25
VERSION 0.7.0 INCLUDES POSSIBLY BACKWARDS INCOMPATIBLE CHANGES, see below.
- An ability to select a shell that will be used for execution, and operating system specific versions of shell commands (#76).
- Internal: Store plugin version in the settings file (#90)
- Settings file will be backed up before any new migrations (#83).
- A documentation vault in Obsidian Publish (#100). Here's the link: https://publish.obsidian.md/shellcommands
- Possibly backwards incompatible change: {{Variable}} values are escaped when using PowerShell or Bash (#11). Check that your variables work correctly after this upgrade! Add an exclamation mark
!
in front of the variable name if you need to use unescaped variable values, e.g.{{!file_name}}
. - Possibly backwards incompatible change: Only the following shells will be supported: Bash, Dash, Zsh, Windows CMD, PowerShell 5 and PowerShell Core (#76). While SC now supports changing the shell in settings, it needs to be noted that if your operating system's user preferences are defined to use some other shell than those listed before, SC will no longer allow executing commands, because it will not know how to escape special characters for a shell that is unknown to it. This limitation will be removed later, when support for different shells gets improved.
- Linux and Mac: User's default shell will be used instead of /bin/sh (#76). SC versions prior to 0.7.0 used
/bin/sh
as a shell on Linux and Mac (/bin/sh
came as a default value from Node.js's child_process).0.7.0
changes this so that the default shell is retrieved from the current user's$SHELL
environment variable. On Windows, default shell is retrieved fromCOMSPEC
environment variable, and this has not changed. These are only defaults, and a user can change these shells in settings. If a shell has changed for you, your shell commands might run a bit differently after this upgrade. - Settings: Split settings content to tabs (#78 and #85).
- Settings: Clipboard output channel notification balloon can be turned off (#75).
- Settings: Make extra options modal scrollable (#84)
- Internal: Old
commands
field in data.json settings file is completely removed if it's empty, because it hasn't been used as of 0.1.1. - Internal: The plugin will not spam hidden console.log() messages anymore, unless a debug option is turned on (#69).
0.6.1 - 2021-11-02
0.6.0 - 2021-10-12
- New shell command output channels (#68):
- Status bar: Good for showing short outputs in a permanent place.
- Current file, top: Puts the output at the very beginning of a file.
- Current file, bottom: Puts the output at the very end of a file.
- Clipboard: So that you can easily paste the output anywhere you like.
- Settings: Scroll position is now remembered (#71)
{{tags}}
does not include preceding hash (#) characters anymore (#62). This is a backwards incompatible change (although a small one), and normally these kinds of changes would not be released in a minor version update. But this plugin is still in its 0.x era, so breaking changes are tolerated more than in stable releases. If you want to have your tags prefixed with a hash again, use something like#{{tags:,#}}
instead of{{tags:,}}
.- Internal: Support multiple parameters for variables (#43). In the future, allows developing new variables that takes multiple arguments, and/or optional arguments.
{{file_path}}
and{{folder_path}}
will not give an error message anymore if the given argument is not relative or absolute. Instead, the variable will be left unparsed silently. This change happened during #43.
0.5.1 - 2021-10-09
{{tags}}
does not give duplicate tags anymore (#65).- Error balloon: Exit code was sometimes null (#67).
0.5.0 - 2021-10-02
- Shell command output can now be accessed in various ways (#34):
- Output can be directed to a chosen channel: a notification balloon, or to currently open note file at caret position, possibly replacing a selection.
- Output can also be ignored = not displayed anywhere.
- Separate output channels can be defined for each output stream: stdout and stderr.
- Output channel definitions can be altered separately for each shell command.
- Previously stdout was always ignored, and stderr could only be directed into a notification balloon.
- A setting for how long to display notifications (#58). Mainly affects when shell command output is directed to a notification balloon.
- A new variable {{tags}}(#51) (Thank you FelipeRearden for this idea!)
- Error messages do not contain the failed shell command anymore, only exit code number and the actual error message (stderr). This is due to error message simplification that had to be done when implementing new ways to use outputs, including stderr in issue #34.
0.4.1 - 2021-09-29
- Variables
{{file_path:absolute}}
/{{folder_path:absolute}}
missed leading/
/\
slash (#44) - Variable
{{folder_path:relative}}
returned/
when current file is in vault root (#52) - Turning off 'Preview variables' setting left old previews to command palette (#45)
- Entering an alias for a new, empty command did not update the command title in settings (#46)
- Prevent executing empty shell commands (#53)
0.4.0 - 2021-09-26
- Confirmation before executing a shell command (#35)
- Settings: Execute now icon button for each command (#30)
- Ignore errors by code (#36): You can choose not to display error messages for certain exit codes.
- Working directory: support a relative path (#28)
- Internal: Make variables to return error messages in an array, not to display error messages directly (#39)
- The above internal change also made these changes:
- Settings: command preview can now show error messages from variables.
- If one variable fails to parse, parsing the rests of variables is cancelled, so in some cases less error messages are displayed at the same time.
0.3.0 - 2021-09-17
- {{workspace}} variable (#14) (Thank you FelipeRearden for this idea!)
- Settings: Display hotkeys next to commands. (#21)
- Settings: Widen the command fields. (#19)
- Settings: Shell commands are now deleted with an icon button, not by clearing a text field. (#20)
- Settings: When opening alias modal, the alias text field has now focus.
- Internal restructuring of code without external implications.
- Small improvement on descriptions of {{file_name}} and {{title}} in the plugin's settings.
0.2.0 - 2021-09-11
- Alias names for commands (#6) (Thank you FelipeRearden for this idea!)
- Preview variables in command palette (#10)
- A setting for how long to display error messages (#7)
0.1.1 - 2021-09-10
- Internal rewriting of how command settings are stored (#8)
- Settings: Changing or creating commands does not require pressing Apply button anymore. Apply is still needed after removing commands.
commands
configuration setting (#8): Version0.1.1
(and above) will replace this setting in users'data.json
settings file with a newshell_commands
setting. This is an internal change, and the plugin will handle it automatically, but it's important to be noted by end users, because users need to upgrade to0.1.1
(or newer) before upgrading to1.0.0
in the future, because1.0.0
will finally remove the migration support forcommands
setting (#9). That being said,1.0.0
is not going to be released any time soon, it's just a milestone in the far future (at the time of writing this on 2021-09-09).
- Deleting commands should not cause non-removed commands to change/lose their hotkeys.
0.1.0 - 2021-08-29
- Support for certain in-built variables (see the settings panel - actually I should put the variables to the README.md file too at some point).
- Display execution errors.
- README.md: Usage examples.
- Determine vault directory automatically.
- A bit better behaving settings view.
0.0.0 - 2021-08-22
- Initial release.