Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
1 answer
571 views

Unable to customize command prompt after installing oh-my-posh Theme on Linux CentOS

I'm using oh-my-posh theme to customize my terminal. I want to configure my command prompt adding more details but it doesn't work after installing the theme. Screenshot: Changing the command prompt ...
diogenes31's user avatar
0 votes
1 answer
1k views

Bash PS1 and single vs. double quotes

I'm a linux and Bash newbie and would like to ask help understanding the role of single and double quotes when assigning the PS1 env var. I wanted to set the terminal to always show the current ...
StoneThrow's user avatar
  • 1,207
2 votes
2 answers
3k views

How to insert bash scripts inside the PS1 variable

I made a custom PS1 variable, which is a tremendously confusing. Here is the one that is closest to being fully working: PS1="\n[\e[1;31m]\u@\H[\e[35m] \@ [\e[32m] PWD: \w [\e[1;34m]This folder has ...
SOMN's user avatar
  • 1,121
0 votes
2 answers
177 views

Sending special bash characters to a custom function

I read this great article on customizing the bash prompt: http://blog.superuser.com/2011/09/21/customizing-your-bash-command-prompt/ I also read about using 256 colors in bash: http://www.logilab....
Big McLargeHuge's user avatar
1 vote
3 answers
365 views

Is it possible to have environment variables in the path of the working directory : PS1?

I am on Lubuntu and I am using bash. My PS1 (in .bashrc) is : PS1="\w> " I like it because I need to paste the working directory all the time. The problem is that the path is always very long and ...
mthpvg's user avatar
  • 113
2 votes
1 answer
944 views

How can I set `less` or `more` max lines (scrollable height) limit/boundary in linux?

(Sorry for the title. Any suggestions?) I've set my commandline PS1 to cover 3 lines: white space user, server and pwd $ or # to input I think less (or more?) is configured to break after window's ...
Rudie's user avatar
  • 759
1 vote
1 answer
177 views

Formatting my $PS1 to x amount of character

I'm looking for a way to force my PS1 variable to a certain number of chars. It currently looks like: $PS1="\W $" and I'm trying to keep the same number of characters regardless of the length of ...
cmwright's user avatar
  • 123