Skip to content

Instantly share code, notes, and snippets.

View Malekaia's full-sized avatar
🇬🇧

Malekai Malekaia

🇬🇧
View GitHub Profile
@Malekaia
Malekaia / NoGit.py
Created January 25, 2023 02:53
A repetition free CLI for git, NoGit is a Python script that prevents unnecessary repetition of the `git` keyword.
#!/usr/bin/env python
import sys, os, signal, atexit, readline, subprocess
commands, stop, history_file = [], False, os.path.join(os.getcwd(), "nogit.history")
def run_commands():
stop = True
for cmd in commands:
command = ["git" if not cmd.startswith("git ") else ""]
command = [cmd] if command[0] == "" else [command[0], cmd]