info-mono / pathshortener

✂️ File system's path shortener

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

…/P/A/T/H/shortener

File system's path shortener

License: GPL-3.0 Development completed

💡 About

pathshortener is a file system's path shortener written in portable sh inspired by Fish's prompt_pwd command and Starship's Directory module.

🚀 Setup

🧾 Dependencies

📥 Installation

🔧 Manually

Option 1: using curl

curl https://raw.githubusercontent.com/info-mono/pathshortener/main/bin/pathshortener > ~/.local/bin/pathshortener
chmod +x ~/.local/bin/pathshortener

Option 2: using git

git clone https://github.com/info-mono/pathshortener.git ~/.local/share/pathshortener
ln -s ~/.local/share/pathshortener/bin/pathshortener ~/.local/bin/pathshortener

📦 Package manager

For Bpkg user:

bpkg install info-mono/pathshortener

For Basher user:

basher install info-mono/pathshortener

If you can and want to port Pathshortener to other package managers, feel free to do so.

⌨️ Usage

Run 'pathshortener' in the terminal:

pathshortener PATHS

⚙️ Configuration

Pathshortener is configured through environment variables: export PATHSHORTENER_<SETTING>="<value>"

Value Valid Default Description
PATHSHORTENER_TRUNCATION_LENGTH <integer> 3 The number of parent folders that the current directory should be truncated to (set to 0 to disable)
PATHSHORTENER_SHORT_LENGTH <integer> 0 The number of characters to display in truncated paths
PATHSHORTENER_TRUNCATION_SYMBOL <string> …/ The symbol to prefix to truncated paths
PATHSHORTENER_HOME_SYMBOL <string> ~ The symbol indicating home directory

💌 Credits

Special thanks to:






Made with ❤️ by @info-mono

Buy Me a Coffee

About

✂️ File system's path shortener

License:GNU General Public License v3.0


Languages

Language:Shell 89.4%Language:Makefile 10.6%