A string of characters displayed by interactive shells to signal the shell is waiting a user input.

learn more… | top users | synonyms

0
votes
0answers
18 views

Why is Debian's PS1 variable different from the other distros? [duplicate]

I've noticed that Debian's PS1 variable is a little different. For example: root@debian:~# echo $PS1 ${debian_chroot:+($debian_chroot)}\u@\h:\w\$ What is this part: ...
2
votes
1answer
47 views

How can I make Debian 8's terminal show box-drawing characters? [closed]

I just upgraded to Debian 8 with a fresh install and my terminal prompt (prompt adam2 8bit with ZSH) no longer displays some characters correctly: I've checked the terminal encoding (set to Unicode ...
1
vote
1answer
33 views

How to edit shell prompt to show time?

I would like to edit my shell prompt to display time. Am currently using zsh, though I would like the customize the shell prompt to show time. I understand an echo $PS1 will give me the environment ...
0
votes
1answer
48 views

Describe the prompt I see when I first logged into the Linux computer

Can you please describe and explain each part of the command prompt pi@raspberrypi ~ $ This is what I saw when I first logged in to my Linux computer.
3
votes
2answers
68 views

preventing terminal prompt from being overwritten by program output

Suppose I run a command like this in the terminal: ~$ echo 'sleep 2; echo "hello!"' | sh then start typing the next line. After two seconds the words "hello!\n" will be inserted into whatever I'm ...
2
votes
1answer
18 views

Bell and escape character in prompt string

My prompt string is printed using this statement, printf '\033]0;%s@%s:%s\007' user host /home/user Why does it need an escape character (\033) and a bell character (007)? When i ran the same ...
0
votes
1answer
31 views

Custom bash prompt - cursor positioning issue [duplicate]

I know there are many related questions, however I couldn't find any other way to get help on this problem: On my CentOS VM I made a custom script for my bash prompt in /etc/profile.d/custom.sh ...
1
vote
3answers
57 views

How to change bash prompt string in current bash session? [duplicate]

I have a following bash prompt string: root@LAB-VM-host:~# echo "$PS1" ${debian_chroot:+($debian_chroot)}\u@\h:\w\$ root@LAB-VM-host:~# hostname LAB-VM-host root@LAB-VM-host:~# Now if I change ...
2
votes
2answers
49 views

Bash input in the same line

My server is a Debian distro. I am currently configuring this bad boy up. In my Bash, I'm used to having the input to the command line being in one line, i.e.: root@my-server:~ $ cd .. ...
5
votes
2answers
72 views

Elegant way to prevent command substitution from removing trailing newline

I'm customizing my zsh PROMPT and calling a function that may or may not echo a string based on the state of an environment variable: function my_info { [[ -n "$ENV_VAR"]] && echo "Some ...
3
votes
1answer
47 views

Bash prompt: using \[ and \] within PROMPT_COMMAND

I'm working on a bash prompt. I'm also trying to create the prompt intelligently, so that it will be easily readable and maintainable. That means not having one huge export PS1. Various sources ...
1
vote
1answer
37 views

Bashrc PS1 error

I created a nice PS1 for bash with http://bashrcgenerator.com/, but something seems to go wrong. The terminal emulator shows me some random, characters which means that PS1 probably has a syntax ...
-1
votes
1answer
52 views

Add git information to a bash prompt with colors

I set my PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ ' I followed this link, to setup my git. And I lost the color of my prompt. If I remove the variable, the color comes back. I am using Xubuntu, 15.04, ...
0
votes
1answer
35 views

ksh: Not importing prompt settings from /etc/profile

I am using SUSE Linux Enterprise Server 11 SP3 and I am facing an issue related with a user using ksh. I have created a user as follows: ...
1
vote
1answer
43 views

How to wrap bash commands after adding color

My current .bash_profile is equal to the below. I add some color and add a command that outputs whether or not I am in a git repository to my PS1 for my bash profile. ORIG=$PS1 ...
3
votes
1answer
54 views

Combine 2 prompts into one, showing error condition in red/orange

Not a very interesting question, but the answer could be beneficial to a lot of users. ;-) As everyone, I have a customized prompt. Mine turns red for root and is green for a normal user and a few ...
-2
votes
2answers
71 views

autocomplete weirdness as a result of ugly hack for zsh prompt

I currently have the following line in my .zshrc: export PROMPT=$(printf "\e[38;5;6m")%m$(printf "\e[m")%d-%h:" " Which is supposed to show the hostname in blue and history and current working ...
1
vote
0answers
30 views

Responding to prompts automatically?

Lets say I have a script called RPS that simulates rock paper scissors. For example lets say I run the script with "$sh RPS". The script will echo "paper" and then prompt me for an input. Obviously ...
0
votes
0answers
36 views

How to change the password display in linux? [duplicate]

In general when we enter the password, nothing is display in the screen. I want to display * when I enter password in Linux. Current behavior: abc@123:$ su testuser ...
7
votes
1answer
335 views

In which situations are PS2, PS3, PS4 used as the prompt?

When I log on into the shell I see the prompt whose value is stored in PS1. I also encountereded another prompt (but do not know which one) when I used the here-document syntax: bc << HERE ...
2
votes
2answers
42 views

Is it possible to change the PS1 periodically by a script in the background?

I just came across the PS1 variable (so I am far from being an expert). It is possible to change the prompt by simply changing this variables value, for instance: PS1="\h" hostname as Prompt PS1="\j" ...
1
vote
1answer
97 views

bash: The prompt gets visually broken [duplicate]

The idea of my PS1 configuration is to show some extended info like Mercurial or Git repo status, command execution time, etc. The prompt is split by two lines because it produces too many characters ...
1
vote
2answers
31 views

tcsh: make 2-digit hours in prompt

I am attempting to simply get a standard lexigraphical time display in the prompt and the history file in the range of 00:00:00 to 23:59:59. I've tried set prompt=%P$ but this just produces, for ...
0
votes
2answers
75 views

Why would the prompt get overwritten?

p_ash-3.2$ cp some_file1234.html /some/loc/ation/ofthe/some_file1234.html.html_Backu Have been seeing this intermittent issue with the command-line, while typing longer lines as part of any command, ...
1
vote
1answer
244 views

Shell script `rm -r`: Redirect write-protected prompt and answer “n”

I have a few lines in a shell script whose function is to iterate through directories, match some names, and delete them. Some areas of the file system are write protected and I would like to leave ...
1
vote
2answers
30 views

Does X mangle prompt environment variables?

I'm starting it with startx. Before that I have PS1 in my environment: $ cat /proc/self/environ | tr '\0' '\n' | egrep '^PS' PS1=[\u@\H \w] PS3=> PS2=> PS4=+ From inside X I get: $ cat ...
1
vote
1answer
85 views

Why did a recent Ubuntu 14.04 update mess up my PS1 prompt?

I recently updated my Ubuntu 14.04 using the software update. This caused some problems. Initially I couldn't open up a new terminal window due to unknown errors with my .bashrc I had to use ...
0
votes
2answers
50 views

Maintaining the Current Style of the Command Prompt After Using 'su?'

When I use the su command in OS X's Terminal — say, to quickly switch to an administrator account to mount a drive using diskutil — the style of the command prompt changes. ...
0
votes
0answers
53 views

Broken prompt writes from the wrong position and overwrites text

From time to time, when I SSH from my Android device to my home Linux server my terminal randomly start overwriting text that was previously outputted. I am using JuiceSSH as my SSH client, and I've ...
2
votes
2answers
102 views

How can I invoke a prompt for an ssh key passphrase during the execution of a script?

In my ssh_config file there are multiple entries for sites on the same server such as: Host site1 HostName 123.1.1.1 User myuser Port 13245 GSSAPIAuthentication no ...
1
vote
1answer
91 views

Command prompt (PS1) including the number of files in directory (both hidden and regular entries)

I have finally come up with a favourite PS1 format but I find it takes too long to load. I need help optimizing... The part that is slowing it down is when I call the external commands in the prompt. ...
1
vote
1answer
53 views

How to trim the CWD, shown in the command promt

To know, what is my CWD in console, I added the following to ~/.bash_profile: export PS1='$(pwd)$ ' So, pwd result it shown before the $ symbol. It was very nice. But when I go to a directory with ...
9
votes
1answer
336 views

Echoing progress from a background process without hijacking prompt

Consider the simple script hello: #!/bin/bash echo 'hello world!' Now from bash if I try to run this in the background: $ hello & [1] 12345 $ hello world! █ <--- prompt is stuck here until ...
0
votes
1answer
78 views

TCSH Prompt Displays Syntax Error Regarding Missing Bracket

I have set the prompt on my machine using the following code: set prompt = " %B%{\033[34m%}`hostname`: %c %D/%w %p :) %b" It outputs my preferred customized display . It looks like : However ...
0
votes
3answers
144 views

Cannot prompt user using rm bultin prompt option -i with xargs and find

I am using xargs and rm with find in order to remove files that follow a specific pattern defined by find as follows. touch file find . -name file | xargs rm Everything works fine with the above ...
0
votes
1answer
41 views

Video-inverting my bash prompt

This is my prompt, as specified in ~/.bashrc: export PS1="${debian_chroot:+($debian_chroot)}\[\033[01;35m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ " ...that yields something like: I ...
5
votes
2answers
78 views

Long-generating Bash prompt wraps incorrectly when I start typing

I have a Bash prompt that takes a while (~100-200ms) to generate, because it includes Git working tree status that takes some time to compute. Sometimes I start typing a command before it appears, but ...
2
votes
2answers
84 views

Zsh: Expanding hashed directory names in prompt

I am experimenting with moving from bash to zsh, and in particular with the hash function; so that hash -d Do=~/Downloads means I can enter cd Do to move immediately to that directory. Nice. But ...
7
votes
1answer
593 views

Why ZSH ends a line with a highlighted percent symbol?

I've noticed this on occasion with a variety of applications. I've often thought it was because the output was cancelled early (ctrl+c, for example) or something similar, and zsh is filling in a new ...
2
votes
1answer
86 views

PS1 prompt showing different on local and remote console

This is my PS1 prompt: export PS1="\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;35m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ " That shows perfect in remote (SSH) ...
2
votes
1answer
75 views

How do I retain custom PS1 in super user mode?

The problem is this: I set a custom PS1 in my .bashrc, but it changes to the default one when I enter super-user mode. What I expected: ╓[coffee]─[Linux-Tower]─[2014-11-05, 23:41]─[~] ╙[$]-[sudo ...
2
votes
4answers
219 views

Change prompt when starting a terminal from bash script (but don't affect all terminals)

I have two terminals installed, gnome-terminal and xfce4-terminal. I would like to have only the xfce terminal showing a simple > as prompt when I start it. The gnome-terminal prompt should remain ...
2
votes
1answer
111 views

How to let a daemon prompt for a password (in Xsession, keyloggersafe)?

Exposition: Working inside an XSession. Some (background) deamon needs to prompt me for password input. How can I make the daemon to prompt me for a password using a popup in the Xsession? ...
0
votes
2answers
142 views

Why my bash prompt changed to be “root@bogon” [closed]

Used to be "root@localhost". The system is CentOS Release 6.4 in a VMware virtual machine. Yesterday I did some test of the user and group commands. And I noticed the tty1 login prompt changed to be ...
1
vote
1answer
87 views

How to check PIPESTATUS equivalent during PROMPT_COMMAND execution?

I have a custom $PROMPT_COMMAND in bash that logs the last executed command and its return code. I was using $? for the latter happily until I realized that for piped commands this was insufficient. I ...
2
votes
2answers
232 views

Meaning of \ before environment variable

In ksh on an old Solaris box I used: export PS1="$PWD $" to set the prompt to the current directory. It works great until you cd elsewhere, then you see that it's not evaluating PWD each time. I ...
1
vote
1answer
29 views

Partially duplicated history when setting PS1 in .bash_profile [duplicate]

When I set PS1 variable in ~/.bash_profile, it worked as configured. However, the history is somehow messed up. When I press Arrow Up or Ctrl+P to view commands I typed, it starts to duplicate ...
0
votes
1answer
102 views

ANSI escapes in Pash prompt are displayed as garbage in Gnome terminal

I would like to use Pash, a PowerShell implementation for mono on my CentOS box. After compilation I started it and got $ mono Source/PashConsole/bin/Debug/Pash.exe ...
2
votes
1answer
46 views

w command for the other network hosts

While the who command refers to the local machine, rwho shows the same informations about all the known hosts of the local network. Similarly, w shows informations about the users on the local ...
17
votes
5answers
2k views

Why do I sometimes get repeatedly prompted with “>” in the terminal?

Alright, when I run certain commands the wrong way, (misspelled, etc.) The terminal outputs this: > instead of computername:workingfolder username$, and when I type enter it goes like this: > ...