mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
allow for changing the current directory on exit
For this to work you'll need to put this in your ~/.zshrc (or equivalent rc file): lg() { export LAZYGIT_NEW_DIR_FILE=/Users/jesseduffieldduffield/Library/Application\ Support/jesseduffield/lazygit/.lastd lazygit "$@" if [ -f $LAZYGIT_NEW_DIR_FILE ]; then cd "$(cat $LAZYGIT_NEW_DIR_FILE)" rm -f $LAZYGIT_NEW_DIR_FILE > /dev/null fi }
This commit is contained in:
@ -72,17 +72,22 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
|
||||
ViewName: "",
|
||||
Key: 'q',
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: gui.quit,
|
||||
Handler: gui.handleQuit,
|
||||
}, {
|
||||
ViewName: "",
|
||||
Key: 'Q',
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: gui.handleQuitWithoutChangingDirectory,
|
||||
}, {
|
||||
ViewName: "",
|
||||
Key: gocui.KeyCtrlC,
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: gui.quit,
|
||||
Handler: gui.handleQuit,
|
||||
}, {
|
||||
ViewName: "",
|
||||
Key: gocui.KeyEsc,
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: gui.quit,
|
||||
Handler: gui.handleQuit,
|
||||
}, {
|
||||
ViewName: "",
|
||||
Key: gocui.KeyPgup,
|
||||
|
Reference in New Issue
Block a user