The prompt is what asks a user for their interactive input
Questions tagged [prompt]
259 questions
100
votes
5 answers
Avoid password prompt for keys and prompts for DN information
I am using following code to generate keys:
apt-get -qq -y install openssl;
mkdir -p /etc/apache2/ssl;
openssl genrsa -des3 -out server.key 1024;
openssl req -new -key server.key -out server.csr;
cp server.key server.key.org;
openssl rsa -in…
JP19
99
votes
6 answers
What is the origin of the UNIX $ (dollar) prompt?
The UNIX prompt uses a $ symbol to indicate that your input is expected.
I was wondering why this symbol was chosen—if there is a reason. Dollar just seems a little unexpected. A > symbol would have been more suggestive in my opinion.
Max Howell
- 617
- 2
- 9
- 13
64
votes
5 answers
How can I display the absolute path in bash prompt?
I currently have my bash PS1 set to something like this:
PS1="\[\`if [[ \$? = "0" ]]; then echo '\e[32m\h\e[0m'; else echo '\e[31m\h\e[0m' ; fi\`:\w\n\$ "
How can I make it show the absolute path instead of the relative one (e.g. /home/dave/dir…
David B
- 2,254
- 6
- 25
- 32
44
votes
4 answers
Tmux and ZSH custom prompt : bug with window name
I have customized my ZSH prompt with oh-my-zsh to make it more readable and add information about git if I'm in a repository.
Example :
bob@inf [~/docs] %
bob@inf [~/src/nicest] master % (in a git repository)
It works well but I have some bugs with…
Adrien Coquio
- 543
- 1
- 4
- 6
42
votes
3 answers
Schedule a task with admin privileges without a user prompt in windows 7
In windows 7, I'd like to schedule a program to be run with administrative privileges, without having the user need to respond to a prompt (which requests elevated privileges) every time the scheduled task is run. Is there any way to accomplish this…
notAlex
- 527
- 1
- 4
- 6
39
votes
6 answers
Why does this bash prompt sometimes keep part of previous commands when scrolling history?
My bash prompt, which I'll admit to have stolen from a few places and cobbled together, will sometimes add part of previous commands to its length when scrolling the bash history with up/down arrows.
For example, if my previous commands were:
ls
cd…
Caleb Hearth
- 517
- 1
- 4
- 8
30
votes
3 answers
How do I hide the path in command line prompt on Windows?
I'm working on Windows 7 using the cmd console.
How do I hide the path in the prompt?
Chris
- 1,039
- 3
- 12
- 18
26
votes
4 answers
Escape non-printing characters in a function for a Bash prompt
In a Bash Prompt (PS1 variable), I'm calling a function to potentially add text to the prompt: export PS1="\u@\h \$(my_function) \$ "
However, the function in the prompt contains ANSI color codes that change based on the output of the function…
MidnightLightning
- 425
- 6
- 10
25
votes
3 answers
CMD prompt window pops up and instantly disappears periodically
Windows 10 - Every 10 minutes or so, a command line window flashes on my computer. I'm afraid I may have been infected by something. I've been staring at the Task Manager (and process explorer) for days, and can't narrow it down to what is causing…
boscher50
- 571
- 3
- 11
23
votes
5 answers
MySQL command line color prompt
I want to add colors to the MySQL command line color prompt.
I have so far in a script (database.sh):
mysql -uroot -hlocalhost -A --prompt="\u@\h:\d> "
I would like root to be red, @ to be blue, localhost to be green and database to be…
EscoMaji
- 331
- 1
- 2
- 6
22
votes
1 answer
What is rootfs# and what can you do with it?
I have been dropped to a [rootfs /]# prompt many times when booting my distro failed. Usually I found I couldn't fix the problem with the limited commands available, so I would use any spare Live CD I had laying around.
But what is the rootfs…
Wolfizen
- 1,182
- 3
- 14
- 29
21
votes
4 answers
zsh right-justify in ps1
I'd like a multi-line zsh prompt with a right alined part, that will look something like this:
2.nate@host:/current/dir 16:00
->
I know about RPROMPT in zsh, but that has a right-aligned prompt opposite…
So8res
- 1,451
- 1
- 17
- 29
21
votes
6 answers
How to Run an app as Administrator without the prompt?
When I start SQL Server Management Studio 2008, I get an error that's been around forever and is documented here. One of the suggestions to fix it that actually worked was to start SSMS with Run as Administrator.
So I modified the properties of the…
AngryHacker
- 17,063
- 63
- 144
- 199
20
votes
3 answers
Why doesn't "cd D:" change the command context to D:?
Possible Duplicate:
Using cd Command in Windows Command Line, Can't Navigate to D:\
Every time I want to change directory context to another drive (D, E, F, or whatever..) on a Windows command-prompt, I must use "Drive letter":\ command to…
Diogo
- 29,494
- 64
- 146
- 220
19
votes
2 answers
How can I put a newline in my zsh prompt without causing terminal redraw issues?
I'm trying to fix a minor (but annoying) issue with my zsh prompt. The problem I'm seeing is that when I'm using a terminal in a GUI OS environment (for example, Terminal.app or iTerm 2 on OS X 10.7.2) and resize the terminal window, the terminal is…
user45283