Changelog
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.
Unreleased
Features that are in development, but are not released yet. Does not include stuff that requires longer planning - for those, see Roadmap on GitHub.
To be Added
- A modal for asking values from user (= prompt) (#37).
- Hotkeys for output channel: Ask after execution (#145).
- Add autocomplete menu to Alias field (#182).
To be Changed
To be Fixed
- 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
0.11.1 - 2022-03-05
Fixed
- 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
Added
- 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).
Changed
- 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).
Fixed
- 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
Added
- 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).
Changed
Fixed
0.9.0 - 2021-12-18
Added
{{caret_position}}variable (#119). Thank you vrajur for this contribution!{{yaml_value}}variable (#120).{{file_extension}}variable (#122).
Changed
Fixed
0.8.0 - 2021-12-10
Added
- 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.yamlfile 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).
Changed
- 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
Fixed
0.7.0 - 2021-11-25
VERSION 0.7.0 INCLUDES POSSIBLY BACKWARDS INCOMPATIBLE CHANGES, see below.
Added
- 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
Changed
- 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/shas a shell on Linux and Mac (/bin/shcame as a default value from Node.js's child_process).0.7.0changes this so that the default shell is retrieved from the current user's$SHELLenvironment variable. On Windows, default shell is retrieved fromCOMSPECenvironment 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
commandsfield 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).
Fixed
0.6.1 - 2021-11-02
Fixed
0.6.0 - 2021-10-12
Added
- 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.
Changed
- 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
Fixed
{{tags}}does not give duplicate tags anymore (#65).- Error balloon: Exit code was sometimes null (#67).
0.5.0 - 2021-10-02
Added
- 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!)
Changed
- 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
Fixed
- 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
Added
- 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.
Changed
- 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
Added
- {{workspace}} variable (#14) (Thank you FelipeRearden for this idea!)
- Settings: Display hotkeys next to commands. (#21)
Changed
- 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
Added
- 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
Changed
- 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.
Deprecated
commandsconfiguration setting (#8): Version0.1.1(and above) will replace this setting in users'data.jsonsettings file with a newshell_commandssetting. 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.0in the future, because1.0.0will finally remove the migration support forcommandssetting (#9). That being said,1.0.0is 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).
Fixed
- Deleting commands should not cause non-removed commands to change/lose their hotkeys.
0.1.0 - 2021-08-29
Added
- 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.
Changed
- Determine vault directory automatically.
- A bit better behaving settings view.
0.0.0 - 2021-08-22
- Initial release.