Skip to content

Commit c0d5516

Browse files
committed
#283: ExtraOptionsModal: Change stdin help texts.
1 parent b4bf652 commit c0d5516

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/settings/ExtraOptionsModal.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ import {decorateMultilineField} from "./setting_elements/multilineField";
7575
* TODO: Rename to ShellCommandSettingsModal
7676
*/
7777
export class ExtraOptionsModal extends SC_Modal {
78-
public static GENERAL_OPTIONS_SUMMARY = "Alias, Icon, Confirmation";
78+
public static GENERAL_OPTIONS_SUMMARY = "Alias, Icon, Confirmation, Stdin";
7979
public static PREACTIONS_OPTIONS_SUMMARY = "Preactions: Prompt for asking values from user";
8080
public static OUTPUT_OPTIONS_SUMMARY = "Stdout/stderr handling, Ignore errors";
8181
public static ENVIRONMENTS_OPTIONS_SUMMARY = "Shell selection, Operating system specific shell commands";
@@ -269,6 +269,7 @@ export class ExtraOptionsModal extends SC_Modal {
269269
// Stdin field
270270
new Setting(container_element)
271271
.setName("Pass variables to stdin")
272+
.setDesc("Used to pass long texts as input to the shell command. There is a limit to command line length, and e.g. {{note_content}} might provide a value too long to be used as an argument, so it works better when passed to stdin. Also, programs that ask multiple values interactively, can be fed with values using stdin. If there are multiple values that need to be inputted, put them on separate lines. Many shell programs interpret newlines as separators between different values.")
272273
.addExtraButton(extraButtonComponent => extraButtonComponent
273274
.setIcon("help")
274275
.setTooltip("Documentation: Pass variables to stdin")
@@ -287,7 +288,7 @@ export class ExtraOptionsModal extends SC_Modal {
287288
await this.plugin.saveSettings();
288289
};
289290
new Setting(stdinSettingContainer)
290-
.setDesc("Can be used to pass long texts as input to the shell command. Very long texts cannot be passed as command arguments, so e.g. {{note_content}} works better when passed to stdin. Static text is also supported, and linebreaks.")
291+
.setDesc("Can contain {{variables}} and/or static text.")
291292
.addTextArea(textareaComponent => {
292293
textareaComponent
293294
.setValue(this.t_shell_command.getInputChannels().stdin ?? "")

0 commit comments

Comments
 (0)