Questions tagged [prompt]

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

73 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
149 views

How can I properly use an American flag emoji in my bash prompt?

I want to use an American flag emoji in my bash prompt (i.e. PS1 environment variable). However, the American flag emoji causes the terminal cursor to offset an extra character to the right. 🇺🇸 is ...
5
votes
2answers
2k views

Difficult authorized_keys login problem only for root on Solaris 11

Here's a difficult ssh problem I can't figure out on Solaris 11, although I think I'm an experienced UNIX/Linux sysadmin. :) I've copied the root@server1:/root/.ssh/id_rsa.pub file to: root@server2:/...
4
votes
1answer
82 views

Unknown word comes up automatically after changing password on a user

I am using Redhat 5.4 and when I tend to change Oracle user password this comes up right after hitting Enter: passwd oracle Retype new UNIX password: passwd: all authentication tokens updated ...
3
votes
0answers
53 views

Colorize the PS4 prompt?

With the option set -x, each command is echoed to STDERR before execution, prefixed by the expanded $PS4, with the first character being repeated according to the call stack depth. I want the output ...
3
votes
0answers
3k views

Why is initramfs dropping to a shell after installing Ubuntu next to a Windows 10 installation?

I have installed Ubuntu 18.04 LTS via Live USB on an ASUS Zenbook 13 UX331UN that is shipped with a preinstalled Windows 10. It is a UEFI system with secure boot enabled and fast boot disabled. I'm ...
3
votes
0answers
399 views

Bash 4.4 change color vi mode

I am using +~ $ bash --version GNU bash, version 4.4.0(1)-release (x86_64-unknown-linux-gnu) Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://...
3
votes
1answer
255 views

Bash prompt - backspace deletes right aligned text (possible to stop?)

I have a really annoying problem. I have followed all of the protocol for making a bash PS1. I know about surrounding non-printable characters with \[ and \] or \001 and \002; however, I have a ...
3
votes
1answer
234 views

Android bash prompt corrupt with long pwd

I'm using bash inside Jack Palevich's Android Terminal Emulator, run on an Android phone. The bash version is 4.2.20(1)-release, obtained from samveen on the XDA forum. My prompt is: export PS1='\[\...
3
votes
0answers
679 views

assigning a multiline variable (tcsh prompt) to another

For tcsh, I have a prompt that is multiline: set prompt = "%/\\ %n@%m[%h]% " This shows the cwd on one line and then the user/host on second line. However, with this, I cannot make a copy of that: ...
2
votes
0answers
67 views

Bash search prompt overlapping value

Running a docker alpine container, my PS1 is: PS1="\u@\h:\w\$ " So when logging into the container, you get root@worker:/$ So if I type in something like root@worker:/$ cd /tmp/dir/path And then ...
2
votes
1answer
720 views

ssh shows no prompt and authentication fails

I have a VPS running Debian 7 which I use to access through ssh for as long as 4 years. Now, suddenly, when I try to connect to it, no prompt for password is shown, although the connection to remote ...
2
votes
1answer
798 views

Display git branch in terminal

I am using fedora OS and I want to display git branch or tag in terminal when I go into the git folder project. I follow this tutorial. After I ran: source /usr/share/git-core/contrib/completion/git-...
2
votes
1answer
2k views

How to stop execution of command from prompt in shell?

My prompt contains some info about git repo under current directory. When I do cd somewhere, my shell executes some commands (i.e. git status). Is there a way to stop execution of such commands via ...
2
votes
1answer
159 views

bash prompt messed up

Today I had to install a couple of applications (a Postgres client and other stuff) and I had to setup a few things like environment paths. I had a couple of aliases working and they stopped working ...
2
votes
1answer
384 views

Color folders in ZSH based off directory depth

I'm currently editing the agnoster theme from oh-my-zsh to my preferences, and was wondering if there is some way to color the names of directories in the status bar based off depth. Something like... ...
2
votes
0answers
80 views

Changing the word “password” at login

Wanted to know if there was a way to change the word password here to say passcode? We use a custom application that authenticates users through passcodes and to not confuse users, I wanted to change ...
2
votes
0answers
751 views

zsh/Prezto: difficulties with right prompt alignment

This may be stupidly simple, but... I am trying to make my own prompt for Prezto. I have been using numerous prompts for reference (I can post a list if necessary). My RPROMPT and cursor are refusing ...
2
votes
1answer
1k views

My bash prompt is not working in `screen`

On RedHat, screen resets my bash prompt. I set PS1=\u@\h:\w in ~/.bashrc and ~/.bash_profile. I added shell -$SHELL as well to ~/.screenrc. But, when I open a brand new terminal window, the prompt ...
2
votes
1answer
458 views

What is and how to use PS1 \#

I put this is .bashrc # colors NC="$(tput sgr0)" RED="$(tput setaf 1)" GREEN="$(tput setaf 2)" # etc ... PS1="\[$BROWN\]\u \[$CYAN\]#\# \[$PINK_BLD\]!\!\[$NC\] \[$BLUE\]\W: \[$NC\]" So deepo #50 !...
1
vote
0answers
28 views

User defined functions in zsh prompt

I'm trying to use a functions that returns the number of commits in a given branch in the zsh prompt. This is what I have now: setopt PROMPT_SUBST autoload -Uz vcs_info precmd() { vcs_info } zstyle ':...
1
vote
0answers
71 views

How to trigger a prompt redraw when the terminal window size changes?

So I created a trap to check if the change is being registered: trap 'echo $COLUMNS' WINCH And the change is indeed reflected. But my prompt is not redrawn, neither from re-issuing the $...
1
vote
0answers
22 views

How can I set the FTP prompt?

I using Ubuntu 18.04 from WSL and using the default Ubuntu FTP client. The man page mentions setting $FTPPROMPT which I have done in my .bashrc on my local machine and then sourced that file. $ echo $...
1
vote
1answer
168 views

Debian 10 only boots to GRUB (LUKS + LVM)

On reboot, my new installation of Debian 10 (amd64) only spits out a GRUB shell. The operating system is not loading. My disk is GPT, with the first parititon being ESP (/dev/sda1), formatted FAT32 ...
1
vote
0answers
65 views

Why does xterm's command line behave like this after changing the prompt?

In my .cshrc file I have the following line: set prompt="%B%n@%m [%d %T] (%h) %c3%#" When I open an xterm, I see user@host [Fri 13:37] (2) ~>0;238;0c Why is 0;238;0c there? I can't spot the ...
1
vote
0answers
67 views

text in text editors gets scrambled after defining set_prompt

I've set set_prompt to print prompt always on a new line. set_prompt() { local curpos stty -echo while read -t 0; do :; done echo -en "\033[6n" IFS=';' read -s -d R -a curpos stty ...
1
vote
0answers
124 views

bash prompt has a unknown prefix

console show strange prompt prefix like this: ;user@centos:~[user@centos ~]$ echo $PS1 [\u@\h \W]\$ ;user@centos:~[user@centos ~]$ this problem just appear in console, ssh remote login no this ...
1
vote
1answer
856 views

Bash prompt over-writing current line

I am having similar problems to this thread here, with the command line overwriting the line and my up arrow overwriting all of the text. Terminal prompt not wrapping correctly When I run $ shopt ...
1
vote
0answers
191 views

tcsh multiline prompt/rprompt

I know that this could look like something already asked before, but I cannot have those thing work for me, maybe because I use tcsh instead of zsh. And there is no way for me to change shell, so if ...
1
vote
0answers
996 views

$HOME path abbreviation in shell prompt

I changed my username using this instruction and now, in shell prompt current path, I no longer see $HOME to be abbreviated with a tilde as soon as I change directory. For example when I open gnome-...
1
vote
1answer
453 views

How can I display the insert mode prompt on the left when using zsh with the in vi-mode plugin?

I am using zsh with command-line editing using vi-mode and it displays the right hand prompt as <<< when in vi's INSERT mode. Is there a way to display or add it to the right prompt? The vi-...
1
vote
0answers
103 views

Bash first line rewriting

I am having the same issues as these guys, but following the recommended advice does not seem to fix my issue. I know I am missing something. Why does the below cause the first line to loop? COLOR1=...
1
vote
0answers
116 views

Issue with bash prompt wrapping

I know that non printing characters can mess with bash's wrapping behaviour, but I've been looking at my PS1 for awhile now and it doesn't seem to have any issues. Here is my prompt code in my ....
1
vote
0answers
104 views

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

I want to monitor LSF job count through command prompt. %j will not give me the LSF job count. Can anyone tell how to configure command prompt to show the LSF job count?
1
vote
0answers
496 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
133 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 ...
1
vote
2answers
729 views

debian prompt is broken

When I login via ssh or from the console this is what I see: Linux sensu.lbox.com 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1+deb7u1 x86_64 The programs included with the Debian GNU/Linux system are free ...
0
votes
0answers
16 views

creating a command regarding FastANI output?

This question is regarding fastANI of working on metagenomics, using fastANI. I have calculated the average nucleotide identity using 25 samples as REFERENCE and the same 25 samples as QUERY. I have ...
0
votes
1answer
20 views

How do I get different colored prompt depending on server?

I use ssh all the time, but I sometimes forget which server I am on. Can I using the same .bashrc (/home is NFS shared) have different colored prompt on different servers? Preferably without listing ...
0
votes
1answer
46 views

Does Korn shell have an equivalent feature to Bash's command_not_found_handle?

And does Korn shell have an equivalent to PROMPT_COMMAND? In Bash, I'm able to make function calls with a parameter when a single input word matches a regular expression. Can Korn shell do this? Let'...
0
votes
0answers
13 views

Python venv module cannot add virtual environment name to PS1, when using PROMPT_COMMAND?

I use the official Git Bash prompt support for displaying the current branch as part of the prompt. My problem is that activating a Python virtual environment (python -m venv <dir>) using ...
0
votes
0answers
62 views

How can I enable colours in ZSH for root user?

I'm trying to move from Bash to ZSH, whichc is the new default shell on Mac OS Catalina. I have some bash settings in my profile, and I'd like to translate these settings into the ZSH, including my ...
0
votes
1answer
39 views

Login prompt's weird behaviour

In TTY, my login prompt has got a strange and annoying behaviour: with my arrow keys, I can move the cursor everywhere on the screen, including the prompt itself, the welcome message, etc. If I press ...
0
votes
1answer
50 views

bash prompt wrapping to start of line

I was trying to add some color and the time to my PS1 prompt on Debian 10 in my ~/.bashrc file. It initially looks right, but if I type a line that's more than about 40 characters the cursor moves to ...
0
votes
0answers
29 views

how to have common prompt with date and time in bash as well as guake?

This is how .bashrc looks at my end - # ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples # If not ...
0
votes
1answer
61 views

Live time in prompt - bash

Is there any way to have the live time in the promt, such that when I execute a command, the time shown is the time the command was executed? So far I'm using S1="[\t me@here]\$ " for example, and ...
0
votes
0answers
24 views

Kubernetes context's awareness in prompt

I don't try to inject some precmd in shell's prompt. I want to source something that will enable later commands in shell prompt to aware that we have kubernetes in its context otherwise disable it. ...
0
votes
0answers
40 views

Customising the incremental search prompt in bash

Bash has an incremental search feature for history entries. I believe (correct me if wrong) this is part of the readline library utilised by bash. Using man 3 readline and searching for terms like "...
0
votes
0answers
36 views

Coloring Bash PS1 from within command substitution

I'd like my PS1 to include ANSI escape sequences dynamically via command substitution. Doing either of these things on their own is trivial: PS1="\[\e[0;36m\]Fancy\[\e[0m\] $ " # Correct colors and: ...
0
votes
2answers
106 views

Create bash prompt that shows the directory after my home directory

For example, if my home directory is 'FirstLast' and I am inside of /usr/FirstLast/Dir1/Dir2/Dir3 I want my prompt to read [username@srv1 Dir1] regardless of how deep in my directory I am. So the ...
0
votes
0answers
104 views

PuTTY terminal - Unable to type more than 80 chars in a single line

This is exactly the same issue that I am facing. Almost similar question here as well. I have tried all the answers published in the related "StackExchange" questions. I also have tried to increase ...