diff --git a/it/!.py b/it/!.py new file mode 100644 index 0000000..29cdb9a --- /dev/null +++ b/it/!.py @@ -0,0 +1,11 @@ +import subprocess + +def main(buffer, command): + if len(command) == 1: + print("?") + else: + try: + print("[%d]" % subprocess.run(command[1:]).returncode) + except Exception as err: + print("%s" % str(err)) + return buffer diff --git a/it/README.md b/it/README.md index aa84489..00047c1 100644 --- a/it/README.md +++ b/it/README.md @@ -9,6 +9,10 @@ For disambiguation it's suggested that this project be referred to as "ited", pr ## Included commands +### ! + +Passes arguments to Python `subprocess.run`. + ### buffer This is where code relating to the Buffer class is kept but calling this from within the editor will allow you to view the current buffer's attributes.