Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8328835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:34:13+00:00 2026-06-09T01:34:13+00:00

Currently it is displayed as follows export PS1=’${white}[\t] ${blue}\W:${red}$(__git_ps1)${white} \$ ‘ I’d like to

  • 0

Currently it is displayed as follows

export PS1='${white}[\t] ${blue}\W:${red}$(__git_ps1)${white} \$ '

enter image description here

I’d like to experiment with the same set up, but time displayed in the right most corner.

How can i modify my PS1 export for this to happen please?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T01:34:14+00:00Added an answer on June 9, 2026 at 1:34 am

    Don’t think there’s any way to right justify items on the prompt using PS1 in bash (pretty sure there’s easy ways to do this in zsh though). You can try writing a function for the PROMPT_COMMAND environment variable and have it print the time with right justify, something along the lines of:

    print_pre_prompt ()
    {
        TIME=`date +%H:%M`
        printf "\e[1;37m%$(($COLUMNS))s" "${TIME}"
    }
    PROMPT_COMMAND=print_pre_prompt
    

    Here, the \e[1;37m is the “white” color.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table which is currently displayed like this: Question OptionType What is
Currently, I have a CSV file set out like this: Element,Weight Hydrogen,1 Oxygen,16 Eventually
I have a cell containing a date ex. 05/11/09 It is currently displayed as
I am currently doing this as follows: // _Container is the panel that the
I have developed a Timer component. Currently the time is being display as follows:
I'm currently sending my callback as follows var submitCommunicateCard = function () { //display
Currently, I have some code as follows: protected override void OnLoad(EventArgs e) { if(IsAuthorized(param1,
An application our company is working on currently displays many rectangle shapes with gradients
I am using the SiteMapPath for my breadcrumb. Currently it displays the path I
i have total 70,000 records in database. currently i displays all the records in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.