Git Product home page Git Product logo

Comments (6)

Jaykul avatar Jaykul commented on June 12, 2024

Yeah, can you prototype something to do that @rkeithhill?

I once thought about using "~" and any defined PSDrives ... and testing to see if $pwd starts with their root paths, and then replacing the string with that. Obviously as you've seen, I just settled for one folder name (because I use ZLocation, the folder name is the important thing), and putting the whole path in my title (or in my status bar, thank you conemu).

from powerline.

rkeithhill avatar rkeithhill commented on June 12, 2024

In fact, I do have a prototype. Let me submit it as a PR tonight. It "might" be a good starting point so I won't hold it against you if you reject the PR. But it's a start. :-)

from powerline.

gravejester avatar gravejester commented on June 12, 2024

Did anything come of this @rkeithhill ? If not, I think I have a path-shortener function that could be used for this.

from powerline.

rkeithhill avatar rkeithhill commented on June 12, 2024

Yes, see #7

from powerline.

gravejester avatar gravejester commented on June 12, 2024

Ah, I didn't look good enough then. Thanks. Oh well, I at least got inspired to add some more functionality to my function :)

from powerline.

Jaykul avatar Jaykul commented on June 12, 2024

There are two versions of this in the 2.3 release.

  • Get-SegmentedPath (breaks each folder into a powerline segment, using the powerline separator, and has an option to limit the number of segments)
  • Get-ShortenedPath (limits the total length of the path, and has an option to render each folder (except the last) as a single character instead of the real name)

from powerline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.