Skip to content
Intelligent path truncation
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.demo
src
.ghci
.gitignore
ChangeLog.md
LICENSE
README.md
Setup.hs
ghcid.sh
package.original.yaml
package.static.yaml
package.yaml
sodiumSierraStrawberry.cabal
stack.yaml

README.md

SodiumSierraStrawberry

Fighting path reading fatigue one path at a time! The revolution starts now!

example

What problem does this solve?

It makes it easier to read a long path. It'll save you approximately 6ms* each time you try to read a path with your eyes, and comprehend it with your brain.

It does this by applying two types of transformations:

  • search and replace (these are set in $XDG_CONFIG_HOME/sodiumSierraStrawberry/config.json - aka ~/.config/sodiumSierraStrawberry)
  • intelligent(?) directory truncation (this can be adjusted with the --limit parameter)

Examples:

From: /home/sodium/Projects/Personal/Sierra

To: »Projects/Sierra


From: /home/sodium/Projects/Personal/Sierra/Super/Long/Path/HolyAvacado

To: »Projects/Sie…/Sup…/Lon…/Pat…/HolyAvacado/

What are the limitations?

You need to use the » char to 'prevent' that path segment from being truncated. It's hardcoded!

How do I execute it?

sodiumSierraStrawberry /your/path/goes/here/example --limit 20

The above should output:

/you…/pat…/goe…/her…/example/

Installation

Configuration

Add such a file at $XDG_CONFIG_HOME/sodiumSierraStrawberry/config.json

[
  [
    "/home/chris"
  , "~"
  ],
  [
    "/home/chris/Projects"
  , "»Projects"
  ]
]

Copy the static binary (if you trust me!):

wget https://github.com/chrissound/SodiumSierraStrawberry/releases/download/v1/sodiumSierraStrawberry
mv sodiumSierraStrawberry ~/.local/bin/

Wtf no, I'll compile it myself.

You'll need to know how to compile Haskell projects:

stack install

*Terms and conditions apply

You can’t perform that action at this time.