Questions tagged [command-prompt]

The command prompt is the string of text that a command-line interpreter displays to you, the user, to prompt you for input in interactive mode. For programs with textual user interfaces in general, not specifically addressing their prompts for user input, see either the CONSOLE-APPLICATION (Microsoft Windows) or TERMINAL (Unices, MacOS 10, and Linux) tags. See COMMAND-LINE or SuperUser for commands invoked by command lines at a command prompt.

This tag covers questions addressing how to control the command prompt in various command interpreters, from sh to COMMAND, and programs that issue command prompts.

Command prompt reference material

4223 questions
49
votes
2 answers

How to mouse scroll with Git Bash?

Using Git Bash or MinGW Shell, if I put in a command with much output, for example env, I cannot mouse scroll. A regular old Command Prompt (cmd.exe) window will do this however.
Zombo
  • 1
  • 62
  • 391
  • 407
49
votes
6 answers

Is there a command to clear screen in SQLite3?

To clear the SQLite console screen I tried cls, .cls, cls; and .cls; but no luck. Is there no cls command in SQLite?
saeed
  • 497
  • 1
  • 4
  • 6
48
votes
2 answers

How to show records vertically in mysql command line?

First explaining what is on my mind {I'm not good at English} On Alan Storm's blog, I found a tricky thing about mysql. I am not sure if he's using the command line or not. The comment section has closed over there, so I'm putting this query here…
AZinkey
  • 5,209
  • 5
  • 28
  • 46
43
votes
4 answers

Batchfile: What's the best way to declare and use a boolean variable?

What's the best way to declare and use a boolean variable in Batch files? This is what I'm doing now: set "condition=true" :: Some code that may change the condition if %condition% == true ( :: Some work ) Is there a better, more "formal" way…
James Ko
  • 32,215
  • 30
  • 128
  • 239
43
votes
4 answers

How to suppress (or customize) Mac Terminal shell prompt

Currently in my Terminal, every shell prompt looks like ComputerName: FooDir UserName$. The UserName part simply wastes too much space out of my precious 80 columns. Is there a way to suppress it?
4ae1e1
  • 7,228
  • 8
  • 44
  • 77
42
votes
14 answers

Open text file and program shortcut in a Windows batch file

I have two files in the same folder that I'd like to run. One is a .txt file, and the other is the program shortcut to an .exe. I'd like to make a batch file in the same location to open the text file and the shortcut then close the batch file (but…
Mark Ursino
  • 31,209
  • 11
  • 51
  • 83
40
votes
1 answer

How to complete the RUNAS command in one line

This Stack Overflow question suggests a command which looks as if it should work, but it doesn't (that answer is deleted now, though): Single line command for Run as a different user on Window 7 that contains a password also The command would…
Accendi
  • 627
  • 1
  • 7
  • 15
40
votes
14 answers

How to run TestNG from command line

How exactly do I run a .java TestNG project from a command line? I have read through the TestNG documentation, and tried the following to no avail: C:\projectfred> java org.testng.TestNG testng.xml ... with the following testng.xml file in my…
Fuzzy Analysis
  • 3,168
  • 2
  • 42
  • 66
39
votes
6 answers

Use shebang/hashbang in Windows Command Prompt

I'm currently using the serve script to serve up directories with Node.js on Windows 7. It works well in the MSYS shell or using sh, as I've put node.exe and the serve script in my ~/bin (which is on my PATH), and typing just "serve" works because…
Adam M-W
  • 3,509
  • 9
  • 49
  • 69
39
votes
7 answers

show current GIT branch name in windows command prompt

Is is possible to display current git branch name in regular windows command prompt? Let's say on windows 7 or 10.
CoR
  • 3,826
  • 5
  • 35
  • 42
39
votes
11 answers

'RM' is not recognized as an internal or external command while using Meteor on Windows

i am currently having problem with 'meteor' and i am currently new to this learning this stuff. So, after installing 'Meteor' i opened command prompt on Windows and typed : meteor create goodboy and then, cd goodboy But to delete the live and…
user2891869
  • 569
  • 1
  • 4
  • 12
38
votes
3 answers

What is `cmd /s` for?

The Windows command prompt (cmd.exe) has an optional /s parameter, which modifies the behavior of /c (run a particular command and then exit) or /k (run a particular command and then show a shell prompt). This /s parameter evidently has something to…
Joe White
  • 94,807
  • 60
  • 220
  • 330
38
votes
3 answers

How to open Visual Studio Solution File from the Command Prompt

Today I was in the Windows Command Prompt after doing a git clone https://...MySolution.git and wanted to open the .sln (i.e., solution file) from the new directory of the cloned repo. What is the command to open this new solution in Visual Studio?…
Eric D. Johnson
  • 10,219
  • 9
  • 39
  • 46
38
votes
1 answer

How to print current directory name via MS-DOS commands

I need to print current directory name after CD command. Is it possible to do? Thanks! echo off echo. echo This batch program deletes some files echo. pause cd "D:\Folder1\" pause
NoWar
  • 36,338
  • 80
  • 323
  • 498
37
votes
23 answers

Create React App not working

Help! I have no idea what is going on here, create react app is not working I have also tried reinstalling and yet to no avail, please help! Npm version: 5.4.2 Node version: 8.70 Tried the npm install --save --save-exact --loglevel error react…
Zubair Amjad
  • 463
  • 2
  • 5
  • 10