-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ability to specify command when hitting enter #1223
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,7 +39,13 @@ while true; do | |
| # Built-in commands | ||
| case $cmd in | ||
| ls) cmd=ls-files;; | ||
| "") continue;; | ||
| "") | ||
| on_enter_cmd=$(git config --get --default '' git-extras.repl.on-enter-command) | ||
| if test -n "$on_enter_cmd"; then | ||
| eval "$on_enter_cmd" | ||
| fi | ||
| continue | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. before my change, when there was an empty command, the result was after my change, now there is the optional command executed, and then always (maybe you know this and are asking something else) i just now tested the exit_status feature with and without
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jjb
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. happy to make the dfault command also do this |
||
| ;; | ||
| quit|exit|q) break;; | ||
| esac | ||
|
|
||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also update https://github.com/tj/git-extras/blob/main/man/git-repl.md and generate new man page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done