Questions tagged [command-line-interface]

The interface to a program that consists entirely of text, as opposed to (although not necessarily mutually exclusive to) a GUI, or Graphical User Interface.

A command line interface (CLI) is an interface to a program based on a series of typed text lines, called commands, which follow a specific language structure. The command lines are then interpreted by a Command Language Interpreter (more commonly known as a Shell).

The CLI was a popular interface since the 1960's, and even with development of more modern UI experiences such as , it is still a ubiquitous interface today. Depending on the specific command language, the CLI could provide a quicker and more accurate way to perform commands compared to alternatives.

Useful Resources

7666 questions
2
votes
1 answer

Where does php cli log errors on a Mac 10.15

I develop a local script quick & dirty and let it run on the command line. I have no server installed. My php ini lies at /usr/local/etc/php/7.4/php.ini I activated the error log by using error_reporting = E_ALL display_errors = On log_errors =…
Calamity Jane
  • 1,557
  • 4
  • 21
  • 41
2
votes
1 answer

How to write to stdin in golang?

This is my code func InputRead() string { reader := bufio.NewReader(os.Stdin); fmt.Print("> "); text, _ := reader.ReadString('\n'); text = strings.Replace(text, "\n", "", -1); } I want to place some string in…
2
votes
0 answers

arg4j option but no params

I am trying to create a command line application using arg4j, I was able to do it using Apache CLI with ease but when using arg4j, it is causing trouble. I need to create a command line tool which will accept java -jar demo.jar -username johndoe…
sh4r4d
  • 644
  • 3
  • 12
2
votes
1 answer

Add attachment to github issue from the command line

Is it possible to add an attachment to a GitHub issue from the command line?
reallymemorable
  • 677
  • 1
  • 7
  • 15
2
votes
4 answers

Searching specific lines of files using GREP

I have a directory with many text files. I want to search a given string in specific lines in the files(like searching for 'abc' in only 2nd and 3rd line of each file). Then When I find A match I want to print line 1 of the matching file. My…
atin
  • 794
  • 1
  • 7
  • 22
2
votes
5 answers

Can I use interactive command line for Squeak/Pharo development?

I tried to install Squeak/Pharo into Ubuntu server machine. ./squeak -vm-display-null ./Pharo-1.2.2-12353/Pharo-1.2.image It executed, but there was no command-line. No way to use without GUI?
eonil
  • 75,400
  • 74
  • 294
  • 482
2
votes
1 answer

ERROR in node_modules/@auth0/angular-jwt/lib/jwtoptions.token.d.ts(2,50): error TS2304: Cannot find name 'unknown'

When compiling my angular project, I get the following error. I deleted my node_modules file and reinstalled it still didn't work. ERROR in node_modules/@auth0/angular-jwt/lib/jwtoptions.token.d.ts(2,50): error TS2304: Cannot find name…
2
votes
1 answer

Creating nested subcommands using Thor

I'd like to create a CLI tool which has commands in a format something like this: clitool jobs execute some-job --arg1 value --arg2 another_value Is it possible to have a subcommand of a subcommand within Thor? I would also like to preserve the…
Jeff Coe
  • 358
  • 1
  • 10
2
votes
1 answer

Is there a reason that shorthand options can't be stacked for Git's stash command?

There is a pattern in the Unix CLI world where frequently-used options are given a single-letter shorthand, and these can usually be combined together, or stacked. A very common example of this can be found with the rm command, which can remove…
Jonathan Holvey
  • 467
  • 5
  • 17
2
votes
1 answer

how to have a variable number of parameters using `argparse` for nim

I started today learning nim, so any kind of suggestion is welcome. I tried using argparse thinking its similarity with Python's library would make my life easy. I'd like to have an application with this interface: tool [options] File1 File2 ...…
Andrea T.
  • 642
  • 3
  • 12
2
votes
2 answers

How to stop escapeshellarg() from turning "s into blank spaces on Windows?

The PHP function escapeshellarg() turns this: "A schema"."A table" Into this: " A schema . A table " That is, it replaces the quotes with spaces instead of quoting them. The expected and desired result (by me) is: "\"A schema\".\"A table\"" This…
2
votes
1 answer

What does the -P option for "docker run" actually do?

I setup a pypiserver with docker for our team and ran into a problem, where publishing of packages didn't work. After reading the tutorial more carefully I saw, that -P .htpasswd packages was missing at the end of my docker run ... command. Compare…
2
votes
1 answer

Golang CLI cobra count flag

I would like to define a CLI flag that counts the number of times that it appears. For example, let's define the flag --verbose with its shorthand -v: # verbose value should be 0 > myCmd # verbose value should be 1 > myCmd -v # verbose value…
user13969944
2
votes
1 answer

When swapping Azure webapp deployment slots, not all traffic goes to production

I've set up a deployment slot called "staging", and have configured continuous deployment to deploy to the staging slot every time code is pushed to the master branch. When I swap staging with production - either using the portal UI, or with the…
Saqib
  • 6,850
  • 7
  • 31
  • 51
2
votes
1 answer

Two exclusive OptionGroup with Apache Commons CLI

I am building a command-line Java application and I have a problem with parsing the command line parameters with Apache Commons CLI. I am trying to cover my scenario where I need to have two exclusive command-line param groups with long (--abc) and…