I\'m wondering if there\'s a way to avoid having to type the word git
at the beginning of every Git command.
It would be nice if there was a way to use the
In your example, you compare it to a MySql prompt. The way that works is that a MySql process starts, and you give your commands to that process. As such, why not write something similar in your language of choice? Here's a simple example in C++:
#include
#include
int main(int argc, char *argv[]){
while(true){
std::cout << "git> ";
std::cout.flush();
std::string command;
std::getline(std::cin, command);
if(command == "exit") break;
std::system("git " + command);
}
return 0;
}
Please note that I just wrote that from memory and that I didn't check it with a compiler. There may be trivial syntax errors.