Commit graph

18 commits

Author SHA1 Message Date
John Bachir 032090e847
Add persistent history to git-repl (#1226)
* persistent command history

* notes

* decision on which commands to save

* configurable history location

* fix history initialization in various scenarios

* documentation

* comment

* don't add whitespace or consecutive duplicates to history

* fix manpage output

* Update bin/git-repl

Co-authored-by: Edwin Kofler <edwin@kofler.dev>

* Update bin/git-repl

Co-authored-by: Edwin Kofler <edwin@kofler.dev>

* Update git-repl

* Update bin/git-repl

* Apply suggestions from code review

* Add `extglob` and generate docs

* Fix regex

* update docs

rm man/git-repl.{1,html}
touch man/git-repl.md
make man/git-repl.{1,html}

---------

Co-authored-by: Edwin Kofler <edwin@kofler.dev>
2026-02-05 11:05:01 -08:00
John Bachir 6ed2643252
ability to specify command when hitting enter (#1223)
* ability to specify command when hitting enter

* documentation

* man page

* generate man page and html

* run default command through same logic as other commands

impetuous: persist return val for display in promt if non-zero

also future-proofs for other benefits / DRYness. no need for another eval invocation.

* fix generated manpage
2026-01-20 14:11:45 +08:00
John Bachir b9bd309a87
Improve git-repl prompt (#1224)
* repl config ideas

* documentation

* Update bin/git-repl

Co-authored-by: Edwin Kofler <edwin@kofler.dev>

* separator

* man page and web docs

* always use dir for project name

---------

Co-authored-by: Edwin Kofler <edwin@kofler.dev>
2026-01-19 16:15:42 -08:00
oikarinen e691826b4b
Fix all ShellCheck errors and add to CI (#1179)
Some checks failed
ci / lint (push) Has been cancelled
ci / typo (push) Has been cancelled
ci / test (push) Has been cancelled
ci / build (macos-latest) (push) Has been cancelled
ci / build (ubuntu-latest) (push) Has been cancelled
2024-12-20 23:16:39 -08:00
wyattscarpenter 5ca9360109
Enhance git-repl (#1160)
Some checks failed
ci / lint (push) Has been cancelled
ci / typo (push) Has been cancelled
ci / test (push) Has been cancelled
ci / build (macos-latest) (push) Has been cancelled
ci / build (ubuntu-latest) (push) Has been cancelled
2024-09-22 20:22:58 -07:00
Edwin Kofler 4611b24320
chore: Fix more Bash inconsistencies (#1021) 2023-01-20 18:17:49 +08:00
William Montgomery 554d779344 Add built in 'exit' command to git-repl 2016-08-11 15:45:51 -04:00
spacewander 5f35004d08 add welcome in git-repl 2014-09-13 20:56:36 +08:00
Konstantin Schukraft e4290dfb32 invoke bash via /usr/bin/env for portability 2014-07-02 09:41:37 +02:00
Florian H ae5b596117 Execute commands that are already prefixed with git directly 2013-03-03 16:33:11 +01:00
Florian H ce888d0664 Execute a shell command, if the command is prefixed with ! 2013-03-03 16:24:07 +01:00
TJ Holowaychuk d79a310ed1 fixed git-repl conditional 2012-03-27 08:01:59 -07:00
nulltask 50e47e0be0 Added displaying current branch name to git-repl(1) prompt 2012-03-27 17:33:39 +09:00
Dave James Miller 8fcabe34a3 Improvements to git-repl
Fix history support by padding -e to read again, and forcing use of Bash instead of default shell (dash on Debian doesn't work).

Fix support of quotes in commands by using eval.

Don't show git help when pressing enter without typing a command.
2012-03-26 15:19:36 -07:00
Tj Holowaychuk 938bf5420f Styling 2010-09-13 16:12:59 -07:00
Tj Holowaychuk 573440a2b3 Alias repl "ls" as ls-files 2010-09-13 16:12:28 -07:00
Nick Campbell d666fa409a read doesn't have the -e option in SH on my machine at least.
Signed-off-by: Nick Campbell <ncampbell@siteworx.com>
2010-08-26 10:40:20 -07:00
Tj Holowaychuk 0e6361331d Added git-repl 2010-08-10 21:29:39 -07:00