Skip to content

FR: Support executing external custom_commands #352

@abourget

Description

@abourget

Problem

When I review patches and want to go to that file for editing in my IDE, I need to copy the file name, or remember it, go to the IDE and open it there.

Potential solution

I want to execute zed $file when navigating the list of files (hitting l over a commit), to quickly jump to it.
I imagine one could add a command to change the default jj command for execution in

type CustomRunCommand struct {

  • The doc doesn't show clearly that it will only run jj.
  • Lazygit has the same notion of custom commands, but allows to run anything, so I was confused:
customCommands:
  - description: "Open Zed"
    context: "files"
    key: "E"
    command: 'echo Opening file; zed .{{ with .SelectedFile }} "{{ .Name }}"{{ end }}'

Potential alternatives

I use the $ history, to go up-arrow and select zed $file, but it's not as quick to navigate, and I'd like to have a shortcut (E, like in lazygit) to just jump in the editor.

thanks :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions