Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for fossil-scm in prompt #9500

Merged
merged 2 commits into from Jan 29, 2023

Conversation

nat-418
Copy link
Contributor

@nat-418 nat-418 commented Jan 20, 2023

Description

Add fish prompt function and include it in the vcs prompt function.

Fixes issue #9497

TODOs:

  • Changes to fish usage are reflected in user documentation/manpages.
  • Tests have been added for regressions fixed
  • User-visible changes noted in CHANGELOG.rst

Copy link
Member

@faho faho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. The in-repository will fail in subdirectories
  2. Some style nits

share/functions/fish_fossil_prompt.fish Outdated Show resolved Hide resolved
share/functions/fish_fossil_prompt.fish Outdated Show resolved Hide resolved
@faho
Copy link
Member

faho commented Jan 20, 2023

As a general question: How long does this take inside of a repo with fossil installed?

You can check with time fish_fossil_prompt.

@nat-418
Copy link
Contributor Author

nat-418 commented Jan 20, 2023

As a general question: How long does this take inside of a repo with fossil installed?

You can check with time fish_fossil_prompt.

$ time fish_fossil_prompt
Executed in   84.28 millis    fish           external
   usr time   13.72 millis    3.16 millis   10.56 millis
   sys time    9.85 millis    0.01 millis    9.84 millis

@nat-418 nat-418 marked this pull request as draft January 20, 2023 15:10
@nat-418
Copy link
Contributor Author

nat-418 commented Jan 20, 2023

  1. The in-repository will fail in subdirectories

    1. Some style nits

Thanks for the quick and helpful feedback. I apologize for forgetting to mark this PR as a draft when I opened it.

@nat-418 nat-418 marked this pull request as ready for review January 26, 2023 04:49
@nat-418 nat-418 requested a review from faho January 26, 2023 11:31
@faho faho modified the milestones: fish 3.6.1, fish 3.7.0 Jan 29, 2023
@faho faho merged commit cf67709 into fish-shell:master Jan 29, 2023
@faho
Copy link
Member

faho commented Jan 29, 2023

Merged, thanks!

For the record fossil ls outside of a fossil repo takes ~3-4ms, so it's about as fast as git. We could use builtins here like hg, but it's a much different trade-off (hg status is 150ms outside of a repo, hot cache).

@nat-418
Copy link
Contributor Author

nat-418 commented Jan 30, 2023

Thank you! I love fish!

@rymrg rymrg mentioned this pull request Feb 2, 2023
3 tasks
@zanchey zanchey modified the milestones: fish next-3.x, fish 3.7.0 Aug 4, 2023
faho pushed a commit that referenced this pull request Sep 8, 2023
* feat: add support for fossil-scm in prompt

* fix: change directory testing and string matching

(cherry picked from commit cf67709)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants