Skip to content

Instantly share code, notes, and snippets.

@aranchelk
aranchelk / gist:8adb47d87226942b9466d414b61bc922
Last active March 27, 2017 22:23
Interactive partial function completion prompt for interactive cli tools
#!/usr/bin/env python3.6
import inspect
def cli_prompt_decorator(func):
f_spec = inspect.getfullargspec(func)
def wrapper(*args):
arg_list = list(args)
if not len(arg_list) >= len(f_spec.args):
### Keybase proof
I hereby claim:
* I am aranchelk on github.
* I am aranchelk (https://keybase.io/aranchelk) on keybase.
* I have a public key whose fingerprint is 1317 C3C3 5395 5A17 1039 D4A0 CE32 6E01 7D94 055B
To claim this, I am signing this object: