-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom command and custom command #3799
Comments
I very much like the first suggestion; the double use of the term "Custom Command" has often bothered me. Here's a PR: #3800. I'm not so sure about the value of the second suggestion, but I wouldn't be opposed; seems like it shouldn't be too hard to implement it. |
The first issue is fixed by #3800. For the second, I have the feeling that what you really want is something else. The So it seems that you want to "abuse" the I feel it might be worth adding a configuration that allows configuring a key binding for a list of custom commands instead of just one. Pressing the key would bring up a menu that lists all the configured commands for that key, with filtering, very similar to the This would be very similar to what you are suggesting, but it would clearly separate those pre-configured commands from the commands that you really type ad-hoc. But it may well be easier to do what you suggested; just wanted to bring up this thought for discussion. |
FWIW - I think the ability to search for custom commands by name without needing to bind them to a key would be a great enhancement. I think it would be nice if there was a single command search functionality that suggested results from various sources (built-in, custom command, unbound custom command, recent ad-hoc, etc). But, I'd take the functionality however it comes. If this is something that could be a good fit for a PR from the community, I could take a stab at it |
@a-jentleman that's already possible, you can search in the help ( |
Oh, sweet. Wish I tried this earlier. Is this a known & supported setup? If so, perhaps my contribution would be small doc changes to Custom_Command_Keybindings.md and/or Custom-Commands-Compendium to demonstrate it |
Huh, it looks like the docs state |
…3846) - **PR Description** Update custom command documentation to describe how commands can be used without keybindings (see [issue 3799](#3799 (comment))) - **Please check if the PR fulfills these requirements** * [ ] Cheatsheets are up-to-date (run `go generate ./...`) * [ ] Code has been formatted (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting)) * [ ] Tests have been added/updated (see [here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md) for the integration test guide) * [ ] Text is internationalised (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation)) * [ ] If a new UserConfig entry was added, make sure it can be hot-reloaded (see [here](https://github.com/jesseduffield/lazygit/blob/master/docs/dev/Codebase_Guide.md#using-userconfig)) * [x] Docs have been updated if necessary * [x] You've read through your own file changes for silly mistakes etc
I finally got around to making a PR for this, because I want it myself: #4276. @yam-liu Please test! |
Topic
:
to Execute Shell Command or Shell command.Your thoughts
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:
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:
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:
The text was updated successfully, but these errors were encountered: