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
7 views

Count of table as file-trailer [migrated]

I'm spooling out a table in EDW to a text file and I need the count of table as the file-trailer. Below is the spool code I'm using Set pagesize 0 Set linesize 2098 Set trimspool on Set heading ...
1
vote
1answer
30 views

How to update prompt on directory change

For example with following: prompt_git() { local PL_BRANCH_CHAR () { PL_BRANCH_CHAR='!' } local ref mode repo_path repo_path=$(git rev-parse --git-dir 2>/dev/null) if $(git rev-...
-1
votes
2answers
24 views

How to highlight command prompt in Guake / ArchLinux? [duplicate]

I am starting to use Arch Linux / Mate, and Guake with it (last versions). I would like Guake can highlight the command prompt, like in this image. You can see the prompt is light green, and the other ...
1
vote
2answers
41 views

Condition Inside String in Bashscript

I want to print exit code of previous command in shell if it failed. So I changed PS1 variable in /etc/bash.bashrc like this: PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w [$?] \$ ' #...
0
votes
1answer
34 views

HH:MM:SS (with AM/PM) 12 Hour Timestamp for Bash Prompt

I'm trying to add a timestamp to the beginning of my bash prompt in the format of a 12 hour HH:MM:SS AM/AM clock, and as of now, I've had no luck. Here's a couple things I've tried. I've tried date +%...
2
votes
1answer
32 views

Terminal prompt is being written over top of [duplicate]

I should preface this by saying this terminal session is via ssh from Windows PuTTY to Linux OpenSSH. I'm not sure if this matters, but I figured I should say it anyways. Currently, when I write more ...
3
votes
1answer
35 views

Spurious @ symbol at start of bash prompt in Debian Jessie

As of late, and without my deliberately doing anything to make it happen, my Bash prompt has an at sign (i.e. @) prepended to it. This did not previously happen. Nor can I see anything in my ~/.bashrc ...
1
vote
1answer
128 views

“-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)”

Running a brand new Ubuntu 16.04 and a Debian 8 server. Trying to connect via ssh and getting the following strange terminal output. I refer to the rectangles with the numbers in it. The problem ...
3
votes
2answers
36 views

Execute command within current shell before every prompt

I'd like to have the current jobs status displayed in the title of my terminal. In Bash, I can use PROMPT_COMMAND for that. Korn Shell (ksh93) doesn't have that. Other answers suggest using command ...
0
votes
2answers
35 views

Terminal doesn't wrap properly

I'm using Gnome Terminal to connect via SSH to my server. My account on the remote server (which is Ubuntu) uses bash. My bashrc contains a line that sets the shell prompt to include my current git ...
1
vote
1answer
21 views

Conditional prompt for mercurial

I'm trying to have a prompt that looks like this: $ some-folder (patch-name): I was able to get that to work when I did the following: hg_ps1() { hg prompt " ({patch})" 2> /dev/null } ...
1
vote
0answers
34 views

Is there any history to the shell prompt? [duplicate]

Traditionally, users get the $ prompt and root gets the # prompt but is there any history why this is so?
5
votes
1answer
245 views

Newline (“\n”) before output in bash

I want to modify my output in bash for better view of output. Simply put \n before this. How can I change it in .bashrc? For example: It's default: root@comp:$ abc bash: abc: command not found I ...
1
vote
2answers
49 views

How to fix shell prompt ( ps1 ) after remote login

I am observing the below strange prompt after login to my remote machine from ubuntu 14.04. This only happens while I'm using the ubuntu gui terminal and not via putty. Any suggestion to fix it?
3
votes
1answer
20 views

How can I escape an exclamation point in the PS1 environment variable?

It is substituted with the history number even if I try to escape it with a backslash.
0
votes
1answer
27 views

PROMPT_DIRTRIM not working

I have the following in my .bash_profile: PROMPT_DIRTRIM=3 export PS1='$ \u in \w: ' However, when I navigate deep within a directory, the path doesn't shorten. This is what the prompt shows: $ ...
2
votes
2answers
97 views

Why is $ the default symbol for a user shell and # the default symbol for a root shell?

Operating a standard bash shell on a server, the PS1 prompt defaults to ending in a $ for non-root users, and # for root. IE: ubuntu@server:~$ sudo su root@server:/home/ubuntu# Why is this?
0
votes
1answer
32 views

Custom Linux log in prompt and system health check

I am looking for an existing tool or direction on creating a custom login terminal and system health-check scripts when booting/logging into my linux machine. Upon opening or closing the laptop much ...
0
votes
0answers
19 views

Define root prompt and non root prompt in one rc file

I'm writing a restore script for my dotfiles and I find it really irritating that I have to have two .tcshrc for both root and user where they only differ by one line. Is there a way of defining the ...
0
votes
1answer
65 views

Weird user in shell

I use iTerm on OS X 10.10 When I start iTerm I get the weird user unknownA988274AC:~ myUserName$: That was not there before. Before there was myUserName$: Any ideas where that comes from?!
2
votes
1answer
58 views

Fish shell shows dark-grey “⎔ characters in prompt

I'm pretty certain this is some foible of my SSH client (RoyalTS for Windows) but, having just installed and changed to fish shell, my prompt is preceded by two dark-grey ⎠characters. It doesn't ...
0
votes
1answer
35 views

Different hostname / prompt is shown after logging in as root

[mayur@centos ~]$ su Password: [root@centos mayur]# I want it to be "centos" only. How to do it?
0
votes
1answer
41 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 ...
0
votes
0answers
19 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 ...
3
votes
1answer
50 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) ...
1
vote
0answers
15 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 ~ ...
1
vote
0answers
17 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?
2
votes
2answers
48 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 ...
4
votes
0answers
25 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 ...
0
votes
2answers
54 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 ...
3
votes
1answer
52 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
57 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
29 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
92 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 ...
4
votes
5answers
503 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 ...
0
votes
0answers
19 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}\]"; PS1+="\$(...
2
votes
2answers
74 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 ...
3
votes
4answers
304 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
58 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), ...
2
votes
1answer
35 views

What does [vmuser@localhost ~]$ mean?

What does the vmuser, localhost, ~, and $ mean in: [vmuser@localhost ~]$
2
votes
3answers
374 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
624 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
275 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
53 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
68 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
108 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
268 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 ...
1
vote
1answer
85 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
425 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 --...