mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-08-06 22:33:07 +02:00
Add runCommand
function to Go template syntax
This makes it possible to use date and time in initial values like this: ```yaml initialValue: 'ruudk/{{ runCommand "date +\"%Y/%-m\"" }}/' ``` I want to use this to configure my BranchPrefix like this: ```yaml git: branchPrefix: 'ruudk/{{ runCommand "date +\"%Y/%-m\"" }}/' ```
This commit is contained in:
committed by
Stefan Haller
parent
c7feba9bb1
commit
12820481e6
@ -1027,6 +1027,15 @@ git:
|
||||
branchPrefix: "firstlast/"
|
||||
```
|
||||
|
||||
It's possible to use a dynamic prefix by using the `runCommand` function:
|
||||
|
||||
```yaml
|
||||
git:
|
||||
branchPrefix: "firstlast/{{ runCommand "date +\"%Y/%-m\"" }}/"
|
||||
```
|
||||
|
||||
This would produce something like: `firstlast/2025/4/`
|
||||
|
||||
## Custom git log command
|
||||
|
||||
You can override the `git log` command that's used to render the log of the selected branch like so:
|
||||
|
Reference in New Issue
Block a user