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

learn more… | top users | synonyms

3
votes
1answer
26 views

align rprompt with top of prompt

I've recently been getting really excited about zsh, and making myself an extravagant prompt, but I'm stuck trying to align my RPROMPT. I have an output like this: | [14:59:44] git:(master) ...
0
votes
1answer
35 views

Shell prompt displays .f>

I am running SSH through this command: ssh <machine-name> But instead of seeing the machine name in the prompt, I see .f>. Normally the prompt looks something like machinename> Any ...
37
votes
4answers
28k views

What color codes can I use in my PS1 prompt?

I used several colors in my PS1 prompt such as \033]01;31\] # pink \033]00m\] # white \033]01;36\] # bold green \033]02;36\] # green \033]01;34\] # blue \033]01;33\] # bold yellow Where can I ...
0
votes
0answers
18 views

tcsh prompt changes with change of directory

I am trying to change my prompt to be permanent no matter what directory I am in. I put set prompt = "%n@%M %T>" in my .cshrc and upon opening a console it looks as expected. However as soon as I ...
1
vote
0answers
13 views

Show last three directories in the prompt [duplicate]

I am trying to set prompt of the shell to show atleast last 3 directories. I am using the following to show present working directory, set prompt = " %~>" (Home directory will be replace with ~ ...
0
votes
0answers
12 views

how to make your tcsh command promt show LSF job count?

I want to monitor LSF job count through command promt. %j will not give me LSF job count. Can anyone tell how to configure command prompt to show LSF job count ?
2
votes
2answers
39 views

bash prompt got reset every time I login

I asked this question some time ago about the shell does not displaying the path. Recently I found out that the .bashrc does not get sourced (and this should be a normal practice?). Currently, the ...
1
vote
0answers
15 views

Redirect all output, including input prompts [duplicate]

I know that doing command &> /dev/null suppresses all output file descriptors. But I notice that it does not work for commands that request input from the user, most notably ssh: > ssh ...
3
votes
0answers
19 views

tcsh shell prompt to show unfinished jobs count

How do I make my tcsh shell prompt to show unfinished background jobs? I understand %j will tell me unfinished job number count but prompt goes stale if I keep it idle. Ideally, I would like prompt to ...
17
votes
3answers
3k views

Display command in xterm titlebar

My Bash Prompt is currently setting the xterm titlebar using the following sequence: PS1='\033]0;\u@\h>\w\007' Is there an easy way to display the current command in the titlebar. For example, ...
0
votes
2answers
38 views

tty, console prompt customization?

My Arch based system directly boots to tty and i never use x system or gui. I want to change prompt or whatever which looks like [root@0 ~]#. I want to change it to current time 12 hours format and no ...
0
votes
1answer
2k views

Changing title without changing prompt on Cygwin

I have the following shell script function from this site that allows me to change the title in both Putty and Cygwin. In Putty connected to a Linux host it changes the title and leaves the prompt as ...
3
votes
1answer
32 views

How to always print the prompt on a new line & keep input

We all know this annoying issue: $ printf "abc" > some-file $ cat some-file abc$ which tends to mess up the prompt if it is any more complex than $, throws off the current cursor position and ...
3
votes
3answers
45 views

Conditional PS1

I'm basically trying to make my PS1 look like this when in a git repo: $ ~/Projects/Blah (master): Or if I'm not in a Git repo, I want it to look like this: $ ~/Projects/Blah: This is my current ...
0
votes
1answer
24 views

Setting up command promt in tcsh to show only last 3 working directory instead of complete path?

I have command prompt in tcsh that shows the current working directory. The problem is that the command prompt becomes very big once I am in a deep hierarchy of folders. How do I set the command ...
1
vote
1answer
48 views

Save cursor position and restore it in terminal

I am playing with some terminal capabilities to create async prompt output on bash. I want to get something like this: while outputting string in PROMPT_COMMAND, save terminal cursor position, print ...
6
votes
3answers
15k views

How can I change my bash prompt to show my working directory?

I can print my current working dir like this myPrompt$ pwd /Users/me/myDir I want my shell to look like this /Users/me/myDir$ pwd /Users/me/myDir Is that possible? How can I do it?
4
votes
5answers
443 views

Can I display GIT in prompt when current directory has a .git folder?

Can I display GIT in prompt when current directory has/contains a .git folder? Is there a way to do this? My current prompt is defined like so: export PS1="[\u@\h] \w $ " So, my prompt looks ...
49
votes
2answers
37k views

Awesome symbols and characters in a bash prompt

I just ran across a screenshot of someone's terminal: Is there a list of all of the characters which can be used in a Bash prompt, or can someone get me the character for the star and the right ...
0
votes
0answers
17 views

Utility for managing and defining prompt definitions

Due to escape sequences, prompt definitions often have dyslexia-inducing complexity. For example, here is one person's definition: ORIG=$PS1 PS1="\[${txtund}${green}\]LOCAL\[\[${reset}\]"; ...
2
votes
2answers
48 views

Prompt: replace custom path with a short word like ~ for home

When I call cd /Users/mu3/apps the prompt simplifies it like this: mu3 [~/apps]: Is this possible to do the same for custom path like cd /Users/mu3/Development/Web/test: mu3 [DEV/test]: I'm ...
14
votes
6answers
3k views

Abbreviated current directory in shell prompt?

vim has a really nice feature which it utilizes in its paths when they're a bit long: It abbreviates the path to the document in the tab at the top. Is there a way to do something similar to this ...
3
votes
4answers
160 views

Shorten path in zsh prompt

Bash has the PROMPT_DIRTRIM option, e.g. when I set PROMPT_DIRTRIM=3, then a long path like: user@computer: /this/is/some/silly/path would show instead as: user@computer: .../some/silly/path ...
3
votes
1answer
54 views

What configuration exists in CentOS but not in Ubuntu, which shows user@hostname for remote terminal sessions?

We have a standard "basic server" install of CentOS 6.7 for our servers, and Ubuntu 14.04 for our desktops. From my Ubuntu desktop, when I ssh into a remote server (ie: ssh into a CentOS instance), ...
131
votes
15answers
219k views

Colorizing your terminal and shell environment?

I spend most of my time working in Unix environments and using terminal emulators. I try to use color on the command line, because color makes the output more useful and intuitive. What options exist ...
3
votes
2answers
569 views

How to set up `screen` to modify the window title and xterm-window title?

I'd like to have my current $PS1 prompt (\u@\h:\w$(__git_ps1 "(%s)")\$ plus some coloring) to be also used as screen's window title (in the hardline) and as the xterm window title. How can this be ...
2
votes
1answer
32 views

What does [vmuser@localhost ~]$ mean?

What does the vmuser, localhost, ~, and $ mean in: [vmuser@localhost ~]$
6
votes
3answers
439 views

Display Non-Zero Return Status in PS1

I want to include the return status in my prompt. (Easy add '$? ', right?) However, I only want the status returned (and trailing space) if non-zero. Example: sd ~ $ false 1 sd ~ $ true sd ~ $
2
votes
3answers
359 views

New line after the command prompt

Is there any way I can configure terminal applications to display command text from front of $ to under the user name on terminal window? See image attached. I use terminator.
14
votes
7answers
611 views

Compact bash prompt when using a directory tree / filename

In a system with Ubuntu 14.04 and bash, I have the PS1 variable ending with the following contents: \u@\h:\w\$ so that the prompt appears as user@machinename:/home/mydirectory$ Sometimes, ...
3
votes
2answers
228 views

How to change the part after root@

For example. [root@ip-10-0-7-225 ~]# I edited /etc/hosts but it didn't work.
0
votes
1answer
44 views

Update 'changing' variables every time PS1 is called, i.e. every new prompt [duplicate]

The reason I need to be able to do this, is to have 'updating' variables in my PS1. I'd like to have my prompt span across the entire width of the terminal, not wrapping around or going down to a new ...
1
vote
1answer
55 views

Can Bash tell an interactive SSH session from an in-line SSH session?

I have a Bash script that needs to be run from an interactive prompt, due to environment variables and configuration that only seems to be read when actually logged into a session. Examples below: ...
0
votes
0answers
78 views

Meaning of three dots in default terminal window in Debian

I have a debian machine, and each time when I login and open the terminal, the default window used to start up with [mgiri-deb7-64:~]1 % However, yesterday, I used putty to login into this ...
1
vote
4answers
164 views

Bash prompt execute command every time a new prompt is displayed

I have the following prompt in bash which shows the current git branch: PS1+="$(git_prompt)" #git_prompt is a function in my .bashrc which works when I source the .bashrc, but not when I change the ...
8
votes
2answers
279 views

PS1 prompt to show elapsed time

I currently use this to display the current time in my bash prompt: PS1=\[\e[0;32m\]\t \W>\[\e[1;37m\] 20:42:23 ~> Is it possible to display the elapsed time since the previous prompt? Such ...
0
votes
1answer
127 views

NixOS no login prompt in virtual terminals

I have NixOS built using 15.09 channel, session manager is sddm, display manager is KDE 5. Switching to virtual ttys from 1 to 6 gives me no login prompt, I see same piece of log everywhere: ...
1
vote
1answer
73 views

Updating a git variable in the Shell prompt on every command

I am running TCSH and I would like to update my prompt every time I run a command. I think can currently do that via backticks. set tmpstr = `git status --untracked-files=no --porcelain` set ...
0
votes
1answer
237 views

How do I ask password by GUI prompt while using sudo in script?

I use Trisquel GNU/Linux with GNOME Flashback Desktop Environment. I need a GUI password prompt for user for executing command with sudo in script. Example consider following script: zenity ...
1
vote
1answer
69 views

How to make the prompt beep with every key press/character printed?

You know how hollywood movies depict hacking scenes with fast yet scrolling CLI technobabble in this fashion : https://www.youtube.com/watch?v=-jkj60TUWaE I want to know how to modify linux to make ...
1
vote
2answers
949 views

Mac OS X: Terminal Prompt Username

I'm using Mac OS Snow Leopard (v10.6.8). I've changed the account name under System Preferences > System > Accounts > Full Name. However, that does not change the username on the terminal ...
1
vote
0answers
39 views

How can I make tcsh echo the time that a command is executed, before it is executed?

I would like tcsh to print the time that each command is executed, preferably in the right-hand column of the screen. This is similar to what rprompt can be used to do with the following setting, ...
1
vote
0answers
12 views

Can I set a text color for the prompt or text I type to to be different from text generated. using bash konsole [duplicate]

when iuse the konsole for a period of time I sometimes have to scrollup to remind myself what has been going on but most of the text is green on black, warnings are purple and error messages are red. ...
6
votes
1answer
107 views

Change in bash prompt depending on whether first character is a space

Right now every command which starts with a space character gets ignored by bash history (HISTCONTROL=ignoreboth in ~/.bashrc). I would like to have a better visual cue when I press space as the first ...
1
vote
1answer
46 views

Bash $PS1 collapsing in MAC terminal [duplicate]

So I have declared as PS1="\[\W \u\e[0;31m\] ❤ \e[0m\] " in my ~/.profile file. At the start my terminal look like this ~ mihkel ❤ - what is the desired output. But when I'm going back in historly ...
0
votes
1answer
64 views

Why don't I get my bash customizations when I log in normally?

My user's shell prompt is stuck as [bash-4.2]$ and many useful commands like ll don't work on that bash-4.2 shell. I tried the chsh command and usermod commands, but neither fixed this. I've checked ...
0
votes
1answer
69 views

How do I write a Bash script that will ask users to define a variable?

I am presently modifying this shell script to turn it into a shell script for installing Arch Linux, with custom username(s), password(s), etc. At the moment I am wondering what I need to do in order ...
4
votes
1answer
163 views

Zsh prompt filling whole width with user input in next line

I'd like to have the left and right prompt in one line and a background color spanning the full line. The user input should be in the next line. hostname | ~/path/to/cwd ...
4
votes
0answers
76 views

Highlight current bash prompt line

I want the terminal to highlight the current bash prompt line. The effect I'm trying to acheive is the same as in text editors where the current line with the cursor is highlighted. Something like ...
4
votes
2answers
1k views

How do I make the Xterm window title switch between the current running command and the current path?

I want to set the Xterm window title to switch between two states: When a command is running, show the command name (e.g. "less") When no command is running, show the current path (e.g. "src") I ...