Skip to main content

An improved ls for xonsh, inspired by lsd

Project description

xontrib-xlsd

DISCLAIMER: This is really early software, it probably wont work on your system.

An improved ls for xonsh, inspired by lsd asciicast The asciinema demo isn't great as it doesn't seem to account for the emoji's cell width.

Features

  • Emojis
  • Colors
  • A tree-like display when called recursively
  • Customizable
  • Written in python so it doesn't need to run a separate binary

Installation

Install the xontrib-xlsd package

pip install --user xontrib-xlsd

And load it from your .xonshrc

xontrib load xlsd

Customizing

-l mode columns

Changing the columns/the order

In your .xonshrc, define a $XLSD_LIST_COLUMNS environment variable and set it's value to your desires.

The default value (similar to coreutil's ls) is the following:

$XLSD_LIST_COLUMNS = ['mode', 'hardlinks', 'uid', 'gid', 'size', 'mtime', 'name']

All the built-in columns are used in this config.

Writing your own column

A column is a function taking for only argument an os.DirEntry and that outputs a string.

A simple filename column could be registered like this:

@xlsd_register_column('filename', ColumnAlignment.LEFT)
def _xlsd_column_filename(direntry):
    return direntry.name

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xontrib-xlsd-0.0.5.tar.gz (8.4 kB view hashes)

Uploaded Source

Built Distribution

xontrib_xlsd-0.0.5-py3-none-any.whl (20.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page