mirror of
https://github.com/initialcommit-com/git-sim.git
synced 2026-04-26 19:15:51 +03:00
[GH-ISSUE #59] Feature Request - Chaining multiple commands in series #42
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/git-sim#42
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jygastaud on GitHub (Feb 16, 2023).
Original GitHub issue: https://github.com/initialcommit-com/git-sim/issues/59
Hi,
Thanks for the time you invest in that project. It will help a lot to explain concept.
What could be really cool would be to be able to chain many command and display an image with all those steps and not each step in individual image.
"Basic exemple" would be to have
checkouta new branch,add,commit+ merge in previous branch in the same image.@paketb0te commented on GitHub (Feb 16, 2023):
Not a bad idea IMO, but I am not sure how we can build that - somehow we'd need to know whether a "word" is an argument to a previous command, or if it is already the next command to execute 🤔
To illustrate:
It might be kinda easy to figure out that
foo.pyis a file name (but what about files without extension?) and not a command, but how would we know ifpopis a subcommand ofstash, or a command on it's own?I guess this might be doable by comparing each word to all command names and comparing it to "where in the command/subcommand tree are we right now?", but to me it looks not trivial to implement.
@paketb0te commented on GitHub (Feb 16, 2023):
The simple case where each command takes no arguments is actually surprisingly simple, but of course it does not help with the previously mentioned problem...
@jygastaud commented on GitHub (Feb 16, 2023):
I can imagine at least 3 different ways to handle that :
You exemple will become
git-sim -ithen enter a command, press enter, an other command, press enter…That is easy for small workflow but not that good from a UX perspective
@initialcommit-io commented on GitHub (Feb 16, 2023):
@jygastaud Interesting thought! We might consider this in the future but for now, we have to focus on getting full coverage of the most common Git commands before we think about chaining together into a larger workflow. Closing for now.
@Shahar-do commented on GitHub (Jul 18, 2024):
Just started using git-sim few days ago and thought exactly the same.
So just wanted to say that the idea of chaining multiple commands sounds awesome to me and for me personally that would be extremely helpful.
I guess some kind of strategy to tackle the above mentioned issue regarding of separating commands, words, and arguments,
is simply requesting the user to create a file in which each command is in a separate line.
One other strategy, is using any special character to separate between commands (quotation marks would clearly be most intuitive but I aint sure that's gonna work)