jesseduffield / jesseduffield/lazygit

Run custom commands in interactive shell

Open
#4,047 6 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

**Is your feature request related to a problem? Please describe.**
When a custom command is specified in the config it runs it with `bash -c ""`. I'd like this shell to be interactive to be able to run shell aliases which lie in my `.bashrc`.

**Describe the solution you'd like**
Run `bash -ic "`

**Describe alternatives you've considered**
Currently I am adding a layer of bash:
```yaml
- key:
context: "localBranches, remoteBranches"
command: bash -ic "git_delete_old_branches"
stream: true
```
which runs `bash -c bash -ic "git_delete_old_branches"`

**Additional context**
Maybe make this a config variable?

I tried to go through the source code to check where the `bash -c` (without `-i`) is invoked but was a bit overwhelmed by the search results. If someone could show me where this is done I'd take a crack at creating a PR.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.