• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.github/H07-Mar-2021-353334

cargo-crates/H03-May-2022-697,965562,007

ci/H07-Mar-2021-159108

doc/H07-Mar-2021-14393

src/H07-Mar-2021-8,4126,675

tests/H07-Mar-2021-539476

.gitignoreH A D07-Mar-202126 43

.release.tomlH A D07-Mar-2021393 1110

.travis.ymlH A D07-Mar-20213.7 KiB119104

CHANGELOG.mdH A D07-Mar-202113.4 KiB338262

CODEOWNERSH A D07-Mar-202125 21

Cargo.lockH A D07-Mar-202122.2 KiB891793

Cargo.tomlH A D07-Mar-20211.2 KiB5950

LICENSEH A D07-Mar-202111.1 KiB204169

README.mdH A D07-Mar-202110 KiB355262

build.rsH A D07-Mar-20211.3 KiB4328

README.md

1# LSD (LSDeluxe)
2
3[![license](http://img.shields.io/badge/license-Apache%20v2-blue.svg)](https://raw.githubusercontent.com/Peltoche/lsd/master/LICENSE)
4[![Latest version](https://img.shields.io/crates/v/lsd.svg)](https://crates.io/crates/lsd)
5[![build](https://github.com/Peltoche/lsd/workflows/CICD/badge.svg)](https://github.com/Peltoche/lsd/actions)
6[![codecov](https://codecov.io/gh/Peltoche/lsd/branch/master/graph/badge.svg)](https://codecov.io/gh/Peltoche/lsd)
7[![versions](https://img.shields.io/repology/repositories/lsd)](https://repology.org/project/lsd/versions)
8
9# Table of Contents
10
11- [Description](#description)
12- [Screenshot](#screenshot)
13- [Installation](#installation)
14- [Configuration](#configuration)
15- [External Configurations](#external-configurations)
16  * [Required](#required)
17  * [Optional](#optional)
18- [F.A.Q.](#faq)
19- [Contributors](#contributors)
20- [Credits](#credits)
21
22## Description
23
24This project is heavily inspired by the super [colorls](https://github.com/athityakumar/colorls)
25project but with some little differences.  For example it is written in rust and not in ruby which makes it much faster.
26
27## Screenshot
28
29![image](https://raw.githubusercontent.com/Peltoche/lsd/assets/screen_lsd.png)
30
31## Installation
32
33### Prerequisites
34
35Install the patched fonts of powerline nerd-font and/or font-awesome. Have a look at the [Nerd Font README](https://github.com/ryanoasis/nerd-fonts/blob/master/readme.md) for more installation instructions. Don't forget to setup your terminal in order to use the correct font.
36
37See [this issue comment](https://github.com/Peltoche/lsd/issues/199#issuecomment-494218334) for detailed instructions on how to configure iTerm2 font settings correctly.
38
39### On Archlinux
40
41```sh
42pacman -S lsd
43```
44
45### On Fedora
46
47```sh
48dnf install lsd
49```
50
51### On Ubuntu
52
53_... and other Debian-based Linux distributions_
54
55Download the latest .deb package from the [release page](https://github.com/Peltoche/lsd/releases) and install it via:
56
57```sh
58sudo dpkg -i lsd_0.20.1_amd64.deb # adapt version number and architecture
59```
60
61### On Gentoo
62
63```sh
64sudo emerge sys-apps/lsd
65```
66(Ebuild maintained by Georgy Yakovlev)
67
68
69### On macOS
70
71via [Homebrew](https://brew.sh/):
72
73```sh
74brew install lsd
75```
76
77or [MacPorts](https://www.macports.org/):
78
79```sh
80sudo port install lsd
81```
82
83### On NixOS/From nix
84
85```sh
86nix-env -iA nixos.lsd
87```
88
89Or add `lsd` to your `configuration.nix` like so:
90
91```nix
92# ...
93environment.systemPackages = with pkgs; [
94  # other packages ...
95  lsd
96];
97# ...
98```
99
100### On FreeBSD
101
102```sh
103pkg install lsd
104```
105
106### On NetBSD
107
108_... and other platforms using `pkgsrc`_
109
110Using the package manager:
111
112``` sh
113pkgin install lsd
114```
115Building from source:
116
117``` sh
118cd /usr/pkgsrc/sysutils/lsd
119make install
120```
121
122### On Windows
123
124Install with [Scoop](https://scoop.sh):
125```powershell
126scoop install lsd
127```
128### On Android (via Termux)
129```sh
130pkg install lsd
131```
132[Setup Nerd Fonts in Termux](https://github.com/Peltoche/lsd/issues/423)
133### From Sources
134
135With Rust's package manager cargo, you can install lsd via:
136
137```sh
138cargo install lsd
139```
140
141If you want to install the latest master branch commit:
142```sh
143cargo install --git https://github.com/Peltoche/lsd.git --branch master
144```
145
146### From Binaries
147
148The [release page](https://github.com/Peltoche/lsd/releases) includes precompiled binaries for Linux and macOS.
149
150## Configuration
151
152`lsd` can be configured with a configuration file to set the default options.
153Check [Config file content](#config-file-content) for details.
154
155### Config file location
156
157#### Non-Windows
158
159On non-Windows systems `lsd` follows the
160[XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html)
161convention for the location of the configuration file. The configuration dir
162`lsd` uses is itself named `lsd`. In that directory it looks first for a file
163called `config.yaml`.
164For most people it should be enough to put their config file at
165`~/.config/lsd/config.yaml`.
166
167#### Windows
168
169On Windows systems `lsd` only looks for the `config.yaml` files in one location:
170`%APPDATA%\lsd\`
171
172### Config file content
173
174This is an example config file with the default values and some additional
175remarks.
176
177```yaml
178# == Classic ==
179# This is a shorthand to override some of the options to be backwards compatible
180# with `ls`. It affects the "color"->"when", "sorting"->"dir-grouping", "date"
181# and "icons"->"when" options.
182# Possible values: false, true
183classic: false
184
185# == Blocks ==
186# This specifies the columns and their order when using the long and the tree
187# layout.
188# Possible values: permission, user, group, size, size_value, date, name, inode
189blocks:
190  - permission
191  - user
192  - group
193  - size
194  - date
195  - name
196
197# == Color ==
198# This has various color options. (Will be expanded in the future.)
199color:
200  # When to colorize the output.
201  # When "classic" is set, this is set to "never".
202  # Possible values: never, auto, always
203  when: auto
204
205# == Date ==
206# This specifies the date format for the date column. The freeform format
207# accepts an strftime like string.
208# When "classic" is set, this is set to "date".
209# Possible values: date, relative, +<date_format>
210date: date
211
212# == Dereference ==
213# Whether to dereference symbolic links.
214# Possible values: false, true
215dereference: false
216
217# == Display ==
218# What items to display. Do not specify this for the default behavior.
219# Possible values: all, almost-all, directory-only
220# display: all
221
222# == Icons ==
223icons:
224  # When to use icons.
225  # When "classic" is set, this is set to "never".
226  # Possible values: always, auto, never
227  when: auto
228  # Which icon theme to use.
229  # Possible values: fancy, unicode
230  theme: fancy
231
232# == Ignore Globs ==
233# A list of globs to ignore when listing.
234# ignore-globs:
235#   - .git
236
237# == Indicators ==
238# Whether to add indicator characters to certain listed files.
239# Possible values: false, true
240indicators: false
241
242# == Layout ==
243# Which layout to use. "oneline" might be a bit confusing here and should be
244# called "one-per-line". It might be changed in the future.
245# Possible values: grid, tree, oneline
246layout: grid
247
248# == Recursion ==
249recursion:
250  # Whether to enable recursion.
251  # Possible values: false, true
252  enabled: false
253  # How deep the recursion should go. This has to be a positive integer. Leave
254  # it unspecified for (virtually) infinite.
255  # depth: 3
256
257# == Size ==
258# Specifies the format of the size column.
259# Possible values: default, short, bytes
260size: default
261
262# == Sorting ==
263sorting:
264  # Specify what to sort by.
265  # Possible values: extension, name, time, size, version
266  column: name
267  # Whether to reverse the sorting.
268  # Possible values: false, true
269  reverse: false
270  # Whether to group directories together and where.
271  # When "classic" is set, this is set to "none".
272  # Possible values: first, last, none
273  dir-grouping: none
274
275# == No Symlink ==
276# Whether to omit showing symlink targets
277# Possible values: false, true
278no-symlink: false
279
280# == Total size ==
281# Whether to display the total size of directories.
282# Possible values: false, true
283total-size: false
284
285# == Symlink arrow ==
286# Specifies how the symlink arrow display, chars in both ascii and utf8
287symlink-arrow: ⇒
288```
289
290## External Configurations
291
292### Required
293
294Enable nerd fonts for your terminal, URxvt for example:
295
296.Xresources
297```
298URxvt*font:    xft:Hack Nerd Font:style=Regular:size=11
299```
300
301### Optional
302
303
304In order to use lsd when entering the `ls` command, you need to add this to your shell
305configuration file  (~/.bashrc, ~/.zshrc, etc.):
306
307  ```sh
308  alias ls='lsd'
309  ```
310
311Some further examples of useful aliases:
312
313  ```sh
314  alias l='ls -l'
315  alias la='ls -a'
316  alias lla='ls -la'
317  alias lt='ls --tree'
318  ```
319
320## F.A.Q.
321
322### Default Colors
323
324In the future the possibility to customize the colors might be implemented.
325For now, the default colors are:
326
327| User/Group | Permissions | File Types | Last time Modified | File Size |
328|:---|:---|:---|:---|:---|
329|![#ffffd7](https://placehold.it/17/ffffd7/000000?text=+) User|![#00d700](https://placehold.it/17/00d700/000000?text=+) Read |![#0087ff](https://placehold.it/17/0087ff/000000?text=+) Directory|![#00d700](https://placehold.it/17/00d700/000000?text=+) within the last hour|![#ffffaf](https://placehold.it/17/ffffaf/000000?text=+) Small File|
330|![#d7d7af](https://placehold.it/17/d7d7af/000000?text=+) Group|![#d7ff87](https://placehold.it/17/d7ff87/000000?text=+) Write|![#00d700](https://placehold.it/17/00d700/000000?text=+) Executable File|![#00d787](https://placehold.it/17/00d787/000000?text=+) within the last day|![#ffaf87](https://placehold.it/17/ffaf87/000000?text=+) Medium File|
331||![#af0000](https://placehold.it/17/af0000/000000?text=+) Execute|![#d7d700](https://placehold.it/17/d7d700/000000?text=+) Non-Executable File|![#00af87](https://placehold.it/17/00af87/000000?text=+) older|![#d78700](https://placehold.it/17/d78700/000000?text=+) Large File|
332||![#ff00ff](https://placehold.it/17/ff00ff/000000?text=+) Execute with Stickybit|![#af0000](https://placehold.it/17/af0000/000000?text=+) Broken Symlink||![#ffffff](https://placehold.it/17/ffffff/000000?text=+) Non File|
333||![#d75f87](https://placehold.it/17/d75f87/000000?text=+) No Access|![#00d7d7](https://placehold.it/17/00d7d7/000000?text=+) Pipe/Symlink/Blockdevice/Socket/Special|||
334|||![#d78700](https://placehold.it/17/d78700/000000?text=+) CharDevice|||
335
336### UTF-8 Chars
337
338`lsd` will try to display the UTF-8 chars in file name, A `U+FFFD REPLACEMENT CHARACTER`(�) is used to represent the invalid UTF-8 chars.
339
340## Contributors
341
342Everyone can contribute to this project, improving the code or adding functions. If anyone wants something to be added we will try to do it.
343
344As this is being updated regularly, don't forget to rebase your fork before creating a pull-request.
345
346## Credits
347
348Special thanks to:
349
350- [meain](https://github.com/meain) for all his contributions and reviews
351- [danieldulaney](https://github.com/danieldulaney) for the Windows integration
352- [sharkdp](https://github.com/sharkdp) and his superb [fd](https://github.com/sharkdp/fd) from which I have stolen a lot of CI stuff.
353- [athityakumar](https://github.com/athityakumar) for the project [colorls](https://github.com/athityakumar/colorls)
354- All the other contributors
355