Command-line interface or command-line interpreter, a means of interacting with a computer by means of textual commands and short scripts.
Questions tagged [command-line]
67 questions
94
votes
17 answers
Is it a good idea to design an architecture thinking that the User Interface classes can be replaced by a command line interface?
In Code Complete page 25, it's said that it's a good idea to be able to easily replace the regular user interface classes by a command line one.
Knowing its advantages for testing, what about the problems it may bring?
Will this extra work really…

Julio Rodrigues
- 940
- 2
- 9
- 19
22
votes
12 answers
How to write a command interpreter/parser?
Problem: Run commands in the form of a string.
command example:
/user/files/ list all;
equivalent to:
/user/files/ ls -la;
another one:
post tw fb "HOW DO YOU STOP THE TICKLE MONSTER?;"
equivalent to:
post -tf "HOW DO YOU STOP THE TICKLE…

alfa64
- 413
- 1
- 4
- 14
20
votes
4 answers
Command line options style - POSIX or what?
Somewhere I saw a rant against java/javac allegedly using a mix of Windows and Unix style like
java -classpath ... -ea ... Something
IMHO, it is no mix, it's just like find works as well, isn't it? AFAIK, according to POSIX, the syntax should be…

maaartinus
- 2,633
- 1
- 21
- 29
20
votes
3 answers
Where did the convention of naming command line arguments as 'argv' come from?
It seems like Python, PHP, and Ruby all use the name "argv" to refer to the list of command line arguments. Where does the name "argv" come from? Why not something like "args"?
My guess is that it comes from C, where the v would stand for "vector".…

Mark Hildreth
- 333
- 2
- 9
15
votes
3 answers
What is the right way to manage developer scripts?
Developers create scripts to help in their work. For example, to run Maven with certain parameters, to kill unneeded background tasks that crop up in development, or to connect to a certain server. The scripts are not core build scripts nor are they…

Joshua Fox
- 1,090
- 10
- 18
14
votes
3 answers
When is it appropriate to use colour in a command-line application?
Currently I have a command-line application in C called btcwatch. It has a -C option that it can receive as an argument that compares the current price of Bitcoin with a price that was stored beforehand with -S. Example output with this option is:
$…

Marco Scannadinari
- 293
- 1
- 5
12
votes
10 answers
When to learn the command line version of a programming tool?
Almost every programming tool has a command line version; many of which also have a gui version. It takes a lot of time and memorization effort to learn the different commands and various options/switches of the command line version.
So I have a…

explorest
- 903
- 1
- 9
- 16
10
votes
6 answers
Positional arguments vs options in a command-line interface
Consider the following command-line program manage-id. It does these things:
manage-id list (list all usernames and user-ids)
manage-id show (shows username's id)
manage-id clear …

rlandster
- 939
- 1
- 8
- 14
8
votes
4 answers
Is it allowed to embed an LGPL command-line tool?
I want to sell a closed-application that depends upon a certain command line tool. Am I allowed to distribute my software including this command line tool?
For example, as a separate binary accompanied by the proper NOTICE file and if needed the…

Nick Russler
- 191
- 4
8
votes
3 answers
How do Text User Interfaces (TUI) work?
I have recently been assigned to port an old COBOL program. I am used to GUIs, and I can't understand how a TUI works. I searched a lot through Google but couldn't find something.
I knew that console applications could output line by line, but how…

GorillaApe
- 555
- 1
- 4
- 15
8
votes
2 answers
Why do Windows commands allow `-` and `/` switches?
> shutdown /?
> Usage: shutdown [/i | /l | /s | /r | /g | /a | /p | /h | /e | /o] [/hybrid] [/f]
The windows cmd.exe command shutdown only documents forward slash / switches, but it accepts dash - switches as well. For instance, both work:
shutdown…

Caleb Jares
- 323
- 2
- 6
8
votes
3 answers
What are the benefits of using the command line for software development?
What benefits are gained from using the command line for software development over using an alternative GUI? Is the command line faster for certain tasks? Are certain tools only available via the command line?

br3w5
- 719
- 2
- 6
- 12
6
votes
1 answer
Name of notation used when documenting command line parameters
Often, command line parameters are documented using a vaguely EBNF-ish notation such as the following:
The output of dir /? on Windows:
DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N]
[/O[[:]sortorder]] [/P] [/Q] [/R]…

Jason C
- 391
- 2
- 14
6
votes
1 answer
Command line merge conflict tools
I sometimes prefer to work in a terminal. I use git, and sometimes have merge conflicts. Are there any merge-conflict-resolution tools that work in a command-line only environment?

Dan
- 395
- 4
- 14
5
votes
12 answers
Should Version Control Softwares be used from Command Line or GUI
I was going through some tutorials on TortoiseHg. Despite having a rich GUI, the first examples are given using command line options.
Does the ideal usage involve command line or it was started that way so one has idea of what is happening under…

Shamim Hafiz - MSFT
- 4,123
- 7
- 38
- 46