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 3840486
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T15:32:07+00:00 2026-05-19T15:32:07+00:00

I saw a pretty neat command line prompt the other day. A guy was

  • 0

I saw a pretty neat command line prompt the other day. A guy was using ZSH and customized his prompt to display how long it had been since his last commit. I think this is pretty awesome and would like to do something similar.

The catch is that he was using git, and I prefer Mercurial.

Getting how long it’s been since the last commit is easy enough, but misleading. If I commit changes, do something else for an hour, then come back to my codebase, it will say it’s been an hour since my last commit. So I’m looking for the time it’s been since the changes were started. Is this even possible through the shell or would it have to be a plugin?

  • 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-05-19T15:32:08+00:00Added an answer on May 19, 2026 at 3:32 pm

    You could get a list of files that have uncommitted changes, and get the earliest modified date. However, if you changed a file one minute since your last commit, but then changed that same file five minutes ago, only the most recent change would count.

    I have a prompt hook that shows me the number of modified files, the current revision number, branch and tag name, but it takes a noticeable amount of time to execute each time the shell prompt is shown. Can’t provide any details about it right now though.

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

Sidebar

Related Questions

I was pretty surprised when i saw http://www.vorbis.com/music/Hydrate-Kenny_Beltrey.ogg link not give me a download
I'm pretty sure I saw somewhere in a popular Git project the branches had
I'm pretty sure I saw on a Rails related site something along the lines
As titled, does it? I am pretty sure I saw it in Visual Studio
I am pretty new to Wicket and i have some difficulties with using resource
My JavaScript is pretty nominal, so when I saw this construction, I was kind
Reviewing a changes of old piece of code, I saw a pretty interesting change.
i am pretty sure i saw nice thing some time ago (maybe in Enterprise
Ok, the title is pretty direct ..how do i do it? I saw something
I saw an article detailing how to do this using attached behaviors which I

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.