Colors are integral to developers. When your primary mode of interaction with computers is via text, colors make a lot of difference. Modern terminals can display as many as 256-colors and
pls can make use of every one of them!
In most cases,
pls uses the standard color of the language for source code files.
pls does not offer any toggles for colors. Colors are on by default, as developers like it. To remove colors from your life, pipe the output through
cat like so. When
pls detects that it's not writing to a TTY, it turns off all formatting like colors and font styles in the output.
$ pls | cat
pls comes with built-in configuration for a number of languages, tools and file types.
Package managers: Poetry and Pipenv
Code quality tools: Flake8 and pre-commit
Package managers: Bundler
Code quality tools: Rubocop
Package managers: Yarn, npm and pnpm
Code quality tools: ESLint
Docker / Docker Compose
Make / Rake / Just
This enables a highly colorful output where a files colors correspond to the name and type of the file or directory (directories are cyan by default).
dist/ readme_assets/ src/ ﭧ tests/ .flake8 .gitignore ﰌ justfile LICENSE .pls.yml poetry.lock .pre-commit-config.yaml pyproject.toml README.md
Unimportant files (like
poetry.lock here) are dimmed.
data/ enums/ fs/ models/ __init__.py args.py exceptions.py main.py state.py table.py
Python file are colored in blue
api/ dist/ node_modules/ public/ src/ babel.config.js capacitor.config.json .eslintrc.js .gitignore ionic.config.json package-lock.json package.json postcss.config.js README.md tailwind.config.js tsconfig.json vue.config.js
assets/ components/ compositions/ models/ pages/ router/ store/ style/ support/ tokens/ views/ App.vue Dockerfile main.ts registerServiceWorker.ts shims-png.d.ts shims-svg.d.ts shims-vue.d.ts shims-vuex.d.ts
TypeScript and Docker files are also blue (
#2496ed respectively) but these blues are different from each other, and also from Python's blue
colorls/ yaml/ colorls.rb ﲵ tab_complete.sh
Ruby files are red
To add more color schemes, you can do either of the following.
Extend the configuration locally using a local
For the majority of use cases, this is the preferred option. Using
pls's powerful extensibility, you can define color schemes for your projects (among other things).
Make a pull-request to
This only applies if the language is fairly popular and the inclusion of the config adds value for a lot of developers. The
plsOOBE is intentionally minimal.
Colors are set via node specs. Refer to the docs for defining node specs.