Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 40 |
Nodes: | 6 (0 / 6) |
Uptime: | 22:02:44 |
Calls: | 291 |
Files: | 910 |
Messages: | 76,668 |
Posted today: | 1 |
try export PS1='\[\e[1;35m\]\u@\h -\d- ${text} \W\[\e[00m\]\$ '
sh (and its clones)--which don't support an rc file--are, of course, the exception to this rule.
Brian Patrie wrote:
sh (and its clones)--which don't support an rc file--are,
of course, the exception to this rule.
You don't count a file specified in ENV as an "rc file" ?
Wanting to personalize my bash prompt I wrote in my .bashrc file (with
the help of "Learning the BASH shell"):
export PS1='\[\e[1;35m\]\u@\h -\d- ${text} \W\[\e[m]\]\$ '
Geoff Clare wrote:
Brian Patrie wrote:
sh (and its clones)--which don't support an rc file--are,
of course, the exception to this rule.
You don't count a file specified in ENV as an "rc file" ?
Not all shells support ENV. dash doesn't seem to.
Even if they did, it would still be a bad idea to export the prompt
strings in other shells.
* François Patte <francois.patte@mi.parisdescartes.fr> in comp.unix.shell:
Wanting to personalize my bash prompt I wrote in my .bashrc file (with
the help of "Learning the BASH shell"):
export PS1='\[\e[1;35m\]\u@\h -\d- ${text} \W\[\e[m]\]\$ '
While it is useful to play with PS1 for learning purposes, to be able to customize
your prompt easily and in a powerful way, I advise the use of a framework prompt.
There are many of them, one I really like is Starship:
https://starship.rs/
https://github.com/starship/starship
* François Patte <francois.patte@mi.parisdescartes.fr> in comp.unix.shell:
Wanting to personalize my bash prompt I wrote in my .bashrc file (with
the help of "Learning the BASH shell"):
export PS1='\[\e[1;35m\]\u@\h -\d- ${text} \W\[\e[m]\]\$ '
While it is useful to play with PS1 for learning purposes, to be able to customize
your prompt easily and in a powerful way, I advise the use of a framework prompt.
There are many of them, one I really like is Starship:
https://starship.rs/
https://github.com/starship/starship
This is fucking retarded. It consists of dozens of Rust source files,
not to mention .json, .yaml and other cruft.
... for customizing shell prompts?
Please tell me it's an April Fool's joke!
You must not be old enough to remember simple computing with low >dependencies, and are probably grateful that you don't need a cloud
account and API key to use this. Or, wait, don't tell me ...
You must not be old enough to remember simple computing with low
dependencies
Bonjour,
Wanting to personalize my bash prompt I wrote in my .bashrc file (with
the help of "Learning the BASH shell"):
export PS1='\[\e[1;35m\]\u@\h -\d- ${text} \W\[\e[m]\]\$ '
What I wanted by this :
specific color
user@host
the date
wether I am on a local machine: nothing or on a remote one: ssh
and the directory
It works but not very well: if I use the up/down arrows to call back a previous command, the behaviour changes, sometimes as if I used the keys "Inser" or "Suppr" and at the end the usage becomes awfull.
What did I do wrong?
I hope to be understable in English language....
Thank you for helping.
François Patte
On 19/09/2024 at 11:34, François Patte wrote:
Bonjour,
Wanting to personalize my bash prompt I wrote in my .bashrc file (with
the help of "Learning the BASH shell"):
export PS1='\[\e[1;35m\]\u@\h -\d- ${text} \W\[\e[m]\]\$ '
try export PS1='\[\e[1;35m\]\u@\h -\d- ${text} \W\[\e[00m\]\$ '
where do you set $text?
Wanting to personalize my bash prompt I wrote in my .bashrc file (with
the help of "Learning the BASH shell"):