spwd
is a command-line tool designed to display the current working directory in a formatted and customizable way. It allows users to abbreviate directory names, use custom colors, and format paths according to their preferences.
- Abbreviates directory names for a cleaner display.
- Customizable colors for directory and separator displays.
- Supports home directory abbreviation with
~
. - Configurable through a JSON file located at
~/.config/spwd/config.json
. - Special formatting options for output.
You can install spwd
globally using npm:
$ npm install -g spwd
Alternatively, you can clone the repository and install it manually:
-
Clone the repository:
$ git clone https://github.com/Sennoma-Nn/spwd.git $ cd spwd
-
Install the package globally:
$ npm install -g
Simply run the spwd
command in your terminal:
$ spwd
This will output the formatted current working directory based on the configuration.
- The configuration file is located at
~/.config/spwd/config.json
. - You can customize colors, abbreviations, and other formatting options by editing this file.
{
"color": {
"fileOrDir": "\x1b[31m",
"split": "\x1b[32m",
"abbr": "\x1b[31m\x1b[3m"
},
"splitChar": {
"input": "/",
"output": " > "
},
"rootDirFlag": {
"enable": "yes",
"flag": "/"
},
"abbr": {
"homeDir": {
"enable": "yes",
"path": "$HOME",
"flag": "~"
},
"dir": {
"enable": "yes",
"length": 1,
"fullDirs": 2
}
},
"specialFormat": {
"enable": "no",
"start": "",
"end": ""
}
}
This project is licensed under the MIT License.