Skip to content

lobes/pretty-path

Repository files navigation

Pretty Path

I wanted a way to display a shorter path in my terminal. So I figured I'd write it in Haskell through a Nix dev shell. The result is a program that you can hook into your shell .*rc file to run each time it renders the prompt. Example outputs:

/some/long/path/when/home/isnt/a/parent/ -> /.../parent/

/home/some/long/path/when/home/is/a/parent/ -> ~/.../parent/

TODO:

  • also display repo root if you're in a repo

Info

Tips

  • Run nix flake update to update all flake inputs.
  • Run just fmt in nix shell to autoformat the project. This uses treefmt.
  • Run just docs to start Hoogle with packages in your cabal file.

About

Shorten path display in terminal

Resources

License

Stars

Watchers

Forks