D
D
DarkByte20152016-12-23 07:44:44
linux
DarkByte2015, 2016-12-23 07:44:44

Command line utility?

How are commands actually implemented in command-line utilities? Those. they are not requested (if we talk about python for example) by input and a dictionary? For some reason, after all, the utility parameters pop up if you press TAB? How it's done? I wanted to write one utility and now I'm thinking how to make it more beautiful.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Rsa97, 2016-12-23
@Rsa97

https://habrahabr.ru/post/71525/

M
Maxim Gabelkov, 2016-12-23
@MaksymGabielkov

Of course, it would not be good to ask for all command line arguments with input and a dictionary. There are libraries for this: here is argparse
And for TAB autocompletion too: argcomplete

X
xotkot, 2016-12-23
@xotkot

Writing your own completions for Shell

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question