Re: Difficulties with PS1.

2024-02-08 Thread Greg Wooledge
On Thu, Feb 08, 2024 at 02:17:54PM +0700, Dmitry wrote: > Greetings! > > Why variable PS1 dose not change when set it before a command: > Like this: > A="a1" LANG="C.UTF-8" PS1="new" B="b2" bash --noprofile > > $A, $B, $LANG -change

Re: Difficulties with PS1.

2024-02-07 Thread Dmitry
PS1="Works $PS1" bash --noprofile --norc https://stackoverflow.com/questions/9357464/how-to-start-a-shell-without-any-user-configuration

Re: Difficulties with PS1.

2024-02-07 Thread Michael Kjörling
On 8 Feb 2024 14:17 +0700, from lbvf50.mob...@gmail.com (Dmitry): > Why variable PS1 dose not change when set it before a command: > Like this: > A="a1" LANG="C.UTF-8" PS1="new" B="b2" bash --noprofile > > $A, $B, $LANG -changed, $PS1

Difficulties with PS1.

2024-02-07 Thread Dmitry
Greetings! Why variable PS1 dose not change when set it before a command: Like this: A="a1" LANG="C.UTF-8" PS1="new" B="b2" bash --noprofile $A, $B, $LANG -changed, $PS1 - not. Works only when I explicitly set in current process. export PS1="(chro

Re: Bash and the PS1 environment variable [was: grep: show matching line from pattern file]

2022-06-02 Thread David Christensen
On 6/2/22 22:50, Will Mengarini wrote: * David Christensen [22-06/02=Th 19:18 -0700]: [...] Now I can almost match your prompt -- there is a dash before 'bash': 2022-06-02 19:05:10 dpchrist@laalaa ~ $ PS1="\\h/${TTY#/dev/} \\s$SHLVL \\w \\A \$?\\\$" laalaa/pts/8 -bash1

Re: Bash and the PS1 environment variable [was: grep: show matching line from pattern file]

2022-06-02 Thread Will Mengarini
* David Christensen [22-06/02=Th 19:18 -0700]: > [...] > Now I can almost match your prompt -- there is a dash before 'bash': > > 2022-06-02 19:05:10 dpchrist@laalaa ~ > $ PS1="\\h/${TTY#/dev/} \\s$SHLVL \\w \\A \$?\\\$" > laalaa/pts/8 -bash1 ~ 19:08 0$ &g

Re: Bash and the PS1 environment variable [was: grep: show matching line from pattern file]

2022-06-02 Thread David Christensen
On 6/2/22 19:25, Greg Wooledge wrote: On Thu, Jun 02, 2022 at 06:01:11PM -0700, David Christensen wrote: This is my PS1. '\u' does not work on all of Debian, FreeBSD, Cygwin, and macOS, so the expansion of ${USER} is inserted between two string literals when .profile runs and sets

Re: Bash and the PS1 environment variable [was: grep: show matching line from pattern file]

2022-06-02 Thread Greg Wooledge
On Thu, Jun 02, 2022 at 06:01:11PM -0700, David Christensen wrote: > This is my PS1. '\u' does not work on all of Debian, FreeBSD, Cygwin, and > macOS, so the expansion of ${USER} is inserted between two string literals > when .profile runs and sets PS1: > > 2022-06-02

Re: Bash and the PS1 environment variable [was: grep: show matching line from pattern file]

2022-06-02 Thread David Christensen
$' is $?: debian/pts/4 bash3 ~ 14:56 0$perl -e 'open "gweeblefleep" || die' debian/pts/4 bash3 ~ 14:57 0$perl -e 'open "gweeblefleep" or die' Died at -e line 1. debian/pts/4 bash3 ~ 14:57 2$ -------- What is you

Re: Bash and the PS1 environment variable [was: grep: show matching line from pattern file]

2022-06-02 Thread Will Mengarini
r before the prompt-ending '$' is $?: >>>> >>>> debian/pts/4 bash3 ~ 14:56 0$perl -e 'open "gweeblefleep" || die' >>>> debian/pts/4 bash3 ~ 14:57 0$perl -e 'open "gweeblefleep" or die' >>>> Died at -e line 1. >&

Bash and the PS1 environment variable [was: grep: show matching line from pattern file]

2022-06-02 Thread David Christensen
gt; debian/pts/4 bash3 ~ 14:56 0$perl -e 'open "gweeblefleep" || die' >>> debian/pts/4 bash3 ~ 14:57 0$perl -e 'open "gweeblefleep" or die' >>> Died at -e line 1. >>> debian/pts/4 bash3 ~ 14:57 2$ >>> -

Re: PS1 and $-, a footnote; was Re: .profile not being src'd at login on uptodate buster

2022-01-27 Thread Greg Wooledge
On Wed, Jan 26, 2022 at 10:59:28PM -0600, David Wright wrote: > On Mon 12 Apr 2021 at 11:26:49 (-0400), Greg Wooledge wrote: > > On Mon, Apr 12, 2021 at 10:18:19AM -0500, David Wright wrote: > > > I'm not using PS1 to test whether stdout is a terminal, but whether &g

PS1 and $-, a footnote; was Re: .profile not being src'd at login on uptodate buster

2022-01-26 Thread David Wright
On Mon 12 Apr 2021 at 11:26:49 (-0400), Greg Wooledge wrote: > On Mon, Apr 12, 2021 at 10:18:19AM -0500, David Wright wrote: > > I'm not using PS1 to test whether stdout is a terminal, but whether > > the file is running interactively. From man bash: > > > >

Re: Universally Change PS1 For All New Users

2010-08-23 Thread Brian Ryans
Quoting Carlos Mennens on 2010-08-04 11:40:33, in Message-Id Sorry to necro the thread; was reading through my archives and found this message just now :) > How can I force Debian to use a custom colored PS1 I have defined > under /root/.bashrc for all new users I create with '

Re: How does Squeeze initialize PS1 ?

2010-08-23 Thread Brian Ryans
Quoting Paul E Condon on 2010-08-20 17:36:32, in Message-Id <20100820223632.gb2...@big.lan.gnu> > i.e. they are after a statement [ -z "$PS1" ] && return which, I > think, executes return if PS1 is empty. ACK. > The comment just before the above line of code is:

Re: How does Squeeze initialize PS1 ?

2010-08-21 Thread Bob Proulx
Hi Paul! Paul E Condon wrote: > I'm debugging some bash scripts and reading the scripts that come as > part of Squeeze installation. I find several places where there are > statements the set a value from variable PS1, BUT all of them seem > to be in scripts that only get e

Re: How does Squeeze initialize PS1 ?

2010-08-20 Thread Boyd Stephen Smith Jr.
In <84lj80alu2@sauna.l.org>, Timo Juhani Lindfors wrote: >Paul E Condon writes: >> I would >> have thought 'interactive' should be characterized by having a tty >> attached to sysin and sysout for communication to a 'user'. > >That is not true. If I run "bash foo.sh" then I am not running shel

Re: How does Squeeze initialize PS1 ?

2010-08-20 Thread Tom H
On Fri, Aug 20, 2010 at 6:36 PM, Paul E Condon wrote: > I'm debugging some bash scripts and reading the scripts that come as > part of Squeeze installation. I find several places where there are > statements the set a value from variable PS1, BUT all of them seem > to be in scri

Re: How does Squeeze initialize PS1 ?

2010-08-20 Thread Timo Juhani Lindfors
Paul E Condon writes: > I'm debugging some bash scripts and reading the scripts that come as > part of Squeeze installation. I find several places where there are > statements the set a value from variable PS1, BUT all of them seem > to be in scripts that only get executed if P

How does Squeeze initialize PS1 ?

2010-08-20 Thread Paul E Condon
I'm debugging some bash scripts and reading the scripts that come as part of Squeeze installation. I find several places where there are statements the set a value from variable PS1, BUT all of them seem to be in scripts that only get executed if PS1 is already non-empty. i.e. they are af

Re: Universally Change PS1 For All New Users

2010-08-04 Thread Bob Proulx
Carlos Mennens wrote: > How can I force Debian to use a custom colored PS1 I have defined > under /root/.bashrc for all new users I create with 'useradd' or > 'adduser'? Is there somewhere I can modify this like in /etc/profile? > Can someone just let me know what

Universally Change PS1 For All New Users

2010-08-04 Thread Carlos Mennens
How can I force Debian to use a custom colored PS1 I have defined under /root/.bashrc for all new users I create with 'useradd' or 'adduser'? Is there somewhere I can modify this like in /etc/profile? Can someone just let me know what the correct process would be for Debian

realpath in PS1 bash

2008-05-17 Thread Peter Kuma
Hi folks I'm wondering if it'd be a good idea to have PS1 set to '${debian_chroot:+($debian_chroot)[EMAIL PROTECTED]:$(realpath "$(pwd)")\$ ' instead of the default '${debian_chroot:+($debian_chroot)[EMAIL PROTECTED]:\w\$ ' and make it a suggestion

Re: customizing PS1 environment var with colour escape codes breaks readline

2005-05-21 Thread Almut Behrens
On Fri, May 20, 2005 at 10:38:09PM -0500, Kent West wrote: > Jacobo221 wrote: > > >I like customizing my PC. In my console I use the following PS1 var: > > > >PS1='\n\033[34;1m[\w]\033[0;34m\$ ' > >PS1=$PS1'\033[s\033[1;1f\033[37;47;1m\033[K Terminal:

Re: customizing PS1 environment var with colour escape codes breaks readline

2005-05-21 Thread Nate Bargmann
* Kent West <[EMAIL PROTECTED]> [2005 May 20 22:42 -0500]: > I use bash, and also have a colour-coded prompt. I see similar problems > to what you're describing. I've just learned to live with it. I only > mention this so you'll know you're not alone. Sorry I don't have a > solution for you. I us

Re: customizing PS1 environment var with colour escape codes breaks readline

2005-05-20 Thread Kent West
Jacobo221 wrote: >I like customizing my PC. In my console I use the following PS1 var: > >PS1='\n\033[34;1m[\w]\033[0;34m\$ ' >PS1=$PS1'\033[s\033[1;1f\033[37;47;1m\033[K Terminal: >\033[2m\l\033[1m\033[;19fJobs: \033[2m\j\033[1m\033[;29fUser: >\033[2m\u\033[

customizing PS1 environment var with colour escape codes breaks readline

2005-05-20 Thread Jacobo221
I didn't know what package should i file this bug to (cterm, base-utils, ...) so i report it here and hope someone can suggest: I like customizing my PC. In my console I use the following PS1 var: PS1='\n\033[34;1m[\w]\033[0;34m\$ ' PS1=$PS1'\033[s\033[1;1f\033[37;47;1m\0

Re: chaning root prompt PS1 question

2003-12-08 Thread H. S.
Todd Pytel wrote: I suspect that root's prompt is being set somewhere and being read in after /etc/profile, overwriting PS1. Perhaps in /root/.bashrc or /root/.bash_profile? Yes, /root/.bashrc was it. Thanks a ton. ->HS -- (Remove all underscores,_if any_, from my email address to

Re: chaning root prompt PS1 question

2003-12-07 Thread Todd Pytel
On Mon, 08 Dec 2003 00:57:25 -0500 "H. S." <[EMAIL PROTECTED]> wrote: > I have tried to find on the web how to change my root prompt. I tried > setting the PS1 in /etc/profile but it seems that is not read when I > do "su -" to change to root. No, it is

chaning root prompt PS1 question

2003-12-07 Thread H. S.
Hi, I have tried to find on the web how to change my root prompt. I tried setting the PS1 in /etc/profile but it seems that is not read when I do "su -" to change to root. But if I do "source /etc/profile" as root, I get my changes prompt, but then I loose the root environ

Re: PS1 in .bashrc

2003-07-14 Thread Robin Gerard
On Sun, Jul 13, 2003 at 08:21:34PM +0200, Sebastian Kapfer wrote: > On Sun, 13 Jul 2003 19:30:10 +0200, Robin Gerard wrote: Thanks. PS1="${cyan}[$TIME [EMAIL PROTECTED] \[${YELLOW}\#$NC\]] \[\w\$ " did the trick. -- Gerard -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with

Re: PS1 in .bashrc

2003-07-13 Thread Sebastian Kapfer
On Sun, 13 Jul 2003 19:30:10 +0200, Robin Gerard wrote: > with this PS1 I get: > > [18:31 : 0.16] > [EMAIL PROTECTED] 1] ~$ > > but if I write a very long command the cursor remains on the same line and > overlaps the prompt. >From "man bash": > \[

PS1 in .bashrc

2003-07-13 Thread Robin Gerard
7; NC='\e[0m' # No Color ... ... #- # Shell prompt: #- LOAD=$(uptime | cut -c 45-49) TIME=$(date +%H:%M) PS1="${cyan}[\$TIME [EMAIL PROTECTED] ${YELLOW}\#$NC] \w\$ "

Re: PS1: Lost in quotes!!!

2002-06-18 Thread Craig Dickson
andrej hocevar wrote: > I'm losing my temper here -- why did the first prompt work normally > and the second looks fine, yet if I try to type more than one line, > it doesn't start a new one but starts overwriting the very same one > instead!? Weird. It seems as though bash doesn't like having es

PS1: Lost in quotes!!!

2002-06-18 Thread andrej hocevar
#x27; BLUE='\e[1;34m' function jbs() { if [ "$(jobs)" = "" ] then echo " " else echo -e " :: ($(jobs | awk '{print $3}' | tr "\n" ",")\b)" fi } #FIRST, WORKING PROMPT: export PS1="[${BLUE}\h

Re: PS1

2002-03-13 Thread Sean Quinlan
--- Marcelo Leal <[EMAIL PROTECTED]> (2002-03-13 19:30): > why my PS1 variable is [EMAIL PROTECTED]:\w\$ in console (not X). And in X > (eterm) > is \s-\v\$ ??? > i wanna the first way... in the second only bash version appears. The prompt which contains only the shell

Re: PS1

2002-03-13 Thread Jeff
Marcelo Leal, 2002-Mar-13 14:57 +: > hi folks, > why my PS1 variable is [EMAIL PROTECTED]:\w\$ in console (not X). And in X > (eterm) > is \s-\v\$ ??? > i wanna the first way... in the second only bash version appears. > thanks! I control my prompts from my ~/.bas

PS1

2002-03-13 Thread Marcelo Leal
hi folks, why my PS1 variable is [EMAIL PROTECTED]:\w\$ in console (not X). And in X (eterm) is \s-\v\$ ??? i wanna the first way... in the second only bash version appears. thanks!

Re: Bash can't find, PS1 and HISTSIZE

1999-11-20 Thread Shaul Karl
> I have freshly installed Slink and put the following lines in my > ~.bashrc : > > case $TERM in > xterm*) > PS1 ="\[\033]0;[EMAIL PROTECTED]: \w\007\]\w\$ " Isn't the white space character before the = sign cause ba

RE: Bash can't find, PS1 and HISTSIZE

1999-11-19 Thread Pollywog
On 19-Nov-1999 ktb wrote: > I have freshly installed Slink and put the following lines in my > ~.bashrc : > > case $TERM in > xterm*) > PS1 ="\[\033]0;[EMAIL PROTECTED]: \w\007\]\w\$ " > ;; > *) >

Re: Bash can't find, PS1 and HISTSIZE

1999-11-19 Thread Ethan Benson
On 18/11/99 ktb wrote: case $TERM in xterm*) PS1 ="\[\033]0;[EMAIL PROTECTED]: \w\007\]\w\$ " ;; *) PS1 ="\w\$ " ;; esac HISTSIZE =1000 _ I get the following error when I open

Bash can't find, PS1 and HISTSIZE

1999-11-19 Thread ktb
I have freshly installed Slink and put the following lines in my ~.bashrc : case $TERM in xterm*) PS1 ="\[\033]0;[EMAIL PROTECTED]: \w\007\]\w\$ " ;; *) PS1 ="\w\$ " ;; esac HISTSIZE =1000

[stick@richnet.net: Re: ANSI Color Escapes in $PS1.. heh.]

1998-12-08 Thread Marcus Brinkmann
Forwarded on request. This sure has charm ;) Marcus - Forwarded message from [EMAIL PROTECTED] - Delivered-To: [EMAIL PROTECTED] Subject: Re: ANSI Color Escapes in $PS1.. heh. To: [EMAIL PROTECTED] (Marcus Brinkmann) Date: Tue, 8 Dec 1998 00:36:51 -0500 (EST) From: [EMAIL PROTECTED

Re: ANSI Color Escapes in $PS1.. heh.

1998-12-03 Thread Marcus Brinkmann
On Wed, Dec 02, 1998 at 12:41:06PM -0600, Ryan King wrote: > Just how stupid an idea did I have when I did this: > > $PS1="[\e[31m\h\e[m:\e[34m\u\e[m:\e[31m\w\$\e[m]" > > in my /etc/profile? > > It looks really nifty until I try to do commands that wrap around,

Re: ANSI Color Escapes in $PS1.. heh.

1998-12-03 Thread stick
Ryan King said > I don't quite get it... I tried replacing my \e's with ^['s and surrounding > all escapes with /[/] pairs, and it wouldn't work at all (just the > "source" were displayed.. IE the same as typing `echo $PS1`) > I'm sorry. I wasn

Re: ANSI Color Escapes in $PS1.. heh.

1998-12-02 Thread Daniel Martin
[EMAIL PROTECTED] writes: > How would one check to make sure the terminal is capable of ANSI escape > sequences? > > -brad I'd do this by not coding in the escape sequences directly, but by using tput: export PS1="\[`tput setaf [EMAIL PROTECTED] sgr0`\]:\[`tput set

Re: ANSI Color Escapes in $PS1.. heh.

1998-12-02 Thread Ole J. Tetlie
*-"Ryan King" <[EMAIL PROTECTED]> | | Just how stupid an idea did I have when I did this: | | $PS1="[\e[31m\h\e[m:\e[34m\u\e[m:\e[31m\w\$\e[m]" | | in my /etc/profile? Chuck explained what was going on. Your prompt could be: PS1="[\[\e[31m\]\h\[\e[m\]:\[\e[34m\]

Re: ANSI Color Escapes in $PS1.. heh.

1998-12-02 Thread maximill
How would one check to make sure the terminal is capable of ANSI escape sequences? -brad On Wed, 2 Dec 1998 [EMAIL PROTECTED] wrote: > Ryan King said > > Just how stupid an idea did I have when I did this: > > > > $PS1="[\e[31m\h\e[m:\e[34m\u\e[m:\e[31m\w\$\e[m]&qu

Re: ANSI Color Escapes in $PS1.. heh.

1998-12-02 Thread stick
Ryan King said > Just how stupid an idea did I have when I did this: > > $PS1="[\e[31m\h\e[m:\e[34m\u\e[m:\e[31m\w\$\e[m]" > > in my /etc/profile? > Not stupid at all!! > It looks really nifty until I try to do commands that wrap around, in which > case the f

Re: ANSI Color Escapes in $PS1.. heh.

1998-12-02 Thread Mitch Blevins
Ryan King wrote: > Just how stupid an idea did I have when I did this: > > $PS1="[\e[31m\h\e[m:\e[34m\u\e[m:\e[31m\w\$\e[m]" > > in my /etc/profile? > > It looks really nifty until I try to do commands that wrap around, in which > case the first line returns, b

ANSI Color Escapes in $PS1.. heh.

1998-12-02 Thread Ryan King
Just how stupid an idea did I have when I did this: $PS1="[\e[31m\h\e[m:\e[34m\u\e[m:\e[31m\w\$\e[m]" in my /etc/profile? It looks really nifty until I try to do commands that wrap around, in which case the first line returns, but keeps going on the current spot. The real disaste

recent purchase of used IBM ps1/ps2

1997-03-25 Thread KBuras
I am looking for jummpers,pinouts, any available help to get these units going maybe with IBM's dos package. I am doing this as both a challenge and to resell to a needy home, of course, only after I am sure that it's working correctly. Have it to the "F" key screen. Any suggestions or hel