Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • L liquidprompt
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 33
    • Issues 33
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Johann Dreo
  • liquidprompt
  • Merge requests
  • !465

WIP - shorten directory relative to repo root

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Johann Dreo requested to merge github/fork/felixSchl/feature/vcs-reldir into master Sep 07, 2016
  • Overview 16
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: felixSchl

demo: https://asciinema.org/a/21be5t92ib26uddrs9ehuaovr

I reported this as a feature request early last year: https://github.com/nojhan/liquidprompt/issues/349. I have since brushed up on my shell skills and feel comfortable delivering the said feature set.

What's left to do?

  • show relative path when in git repo
  • show relative path when in svn repo
  • show relative path when in hg repo
  • show relative path when in bzr repo
  • show relative path when in fossil repo
  • configure colouring of repo name (currently uses $LP_COLOR_PATH_ROOT) - input required
  • toggle feature ON/OFF via option - input required
  • how should this interact with the ordinary directory shortening? - input required

The way it's implemented it should be easy to add support for the supported VCS systems, provided they have a way to get the top-level directory... otherwise we might half to walk the file system, but I hope not.

I'd say supporting submodules as mentioned in the original issue would be a separate PR, but I personally lost interest in that feature.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/felixSchl/feature/vcs-reldir