Skip to content

Custom command and custom command #3799

@yam-liu

Description

@yam-liu

Topic

  1. Rename the 'Custom command' thing associated with : to Execute Shell Command or Shell command.
  2. Bring Custom command placeholders like `{{ .SelectedPath }} to Shell command.

Your thoughts

  1. We have two features named Custom command. It's hard to refer clearly to which one when we use the 'custom command' keyword. Like this context.
    I propose to use:

    • Custom command: for custom command defined in config.yml.
    • Shell command: execute the shell command that user inputs.
  2. Another thought, we cannot use placeholders in Shell command. But it is convenient to provide this feature.

    • Use case 1:
      To execute a git command over the current selected file, what I want is:

      git --update-index --skip-worktree {{ .SelectedPath }}
      

      The file is modified and selected in Files tab, I hope I can pass the selected file path to execute arbitrary commands.

    • Use case 2:
      To change file attribute, add execute permission. Example command:

      chmod +x {{ .SelectedPath }}
      

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions