Skip to content

Commit 2382be7

Browse files
authored
Merge branch 'master' into add-missing-flags-in-docs
2 parents 18aeb4a + 0a3f730 commit 2382be7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+705
-437
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,9 @@ ubuntu-xenial-16.04-cloudimg-console.log
1313
/exa-macos-x86_64-*.zip
1414
/MD5SUMS
1515
/SHA1SUMS
16+
17+
# Snap stuff
18+
parts
19+
prime
20+
stage
21+
*.snap

Cargo.lock

Lines changed: 80 additions & 98 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name = "exa"
33
version = "0.9.0"
44
authors = [ "Benjamin Sago <ogham@bsago.me>" ]
55
build = "build.rs"
6+
edition = "2018"
67

78
description = "A modern replacement for ls"
89
homepage = "https://the.exa.website/"
@@ -63,3 +64,18 @@ opt-level = 3
6364
debug = false
6465
lto = true
6566
panic = "abort"
67+
68+
69+
[package.metadata.deb]
70+
license-file = [ "LICENCE" ]
71+
depends = "$auto"
72+
extended-description = """
73+
exa is a replacement for ls written in Rust.
74+
"""
75+
section = "utils"
76+
priority = "optional"
77+
assets = [
78+
[ "target/release/exa", "/usr/bin/exa", "0755" ],
79+
[ "contrib/man/exa.1", "/usr/share/man/man1/exa.1", "0644" ],
80+
[ "contrib/completions.bash", "/etc/bash_completion.d/exa", "0644" ],
81+
]

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
## Rationale
66

7-
**exa** is a modern replacement for the command-line program ls that ships with Unix and Linux operating systems, with more features and better defaults. It uses colours to distinguish file types and metadata. It knows about symlinks, extended attributes, and Git. And it’s **small**, **fast**, and just one **single binary**.
7+
**exa** is a modern replacement for the command-line program `ls` that ships with Unix and Linux operating systems, with more features and better defaults. It uses colours to distinguish file types and metadata. It knows about symlinks, extended attributes, and Git. And it’s **small**, **fast**, and just one **single binary**.
88

9-
By deliberately making some decisions differently, exa attempts to be a more featureful, more user-friendly version of ls.
9+
By deliberately making some decisions differently, exa attempts to be a more featureful, more user-friendly version of `ls`.
1010

1111
## Screenshots
1212

@@ -63,6 +63,10 @@ These options are available when running with --long (`-l`):
6363
- **--changed**: use the changed timestamp field
6464
- **--git**: list each file's Git status, if tracked or ignored
6565
- **--time-style**: how to format timestamps
66+
- **--no-permissions**: suppress the permissions field
67+
- **--no-filesize**: suppress the filesize field
68+
- **--no-user**: suppress the user field
69+
- **--no-time**: suppress the time field
6670

6771
- Valid **--color** options are **always**, **automatic**, and **never**.
6872
- Valid sort fields are **accessed**, **changed**, **created**, **extension**, **Extension**, **inode**, **modified**, **name**, **Name**, **size**, **type**, and **none**. Fields starting with a capital letter sort uppercase before lowercase. The modified field has the aliases **date**, **time**, and **newest**, while its reverse has the aliases **age** and **oldest**.
@@ -72,7 +76,7 @@ These options are available when running with --long (`-l`):
7276

7377
## Installation
7478

75-
exa is written in [Rust](http://www.rust-lang.org). You will need rustc version 1.17.0 or higher. The recommended way to install Rust is from the official download page.
79+
exa is written in [Rust](http://www.rust-lang.org). You will need rustc version 1.35.0 or higher. The recommended way to install Rust is from the official download page.
7680
Once you have it set up, a simple `make install` will compile exa and install it into `/usr/local/bin`.
7781

7882
exa depends on [libgit2](https://github.com/alexcrichton/git2-rs) for certain features.
@@ -104,6 +108,12 @@ or:
104108

105109
[Formulae](https://github.com/Homebrew/homebrew-core/blob/master/Formula/exa.rb)
106110

111+
### Fedora
112+
113+
You can install the `exa` package from the official Fedora repositories by running:
114+
115+
dnf install exa
116+
107117
### Nix
108118

109119
`exa` is also installable through [the derivation](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/exa/default.nix) using the [nix package manager](https://nixos.org/nix/) by running:

Vagrantfile

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,19 @@ Vagrant.configure(2) do |config|
44

55
# We use Ubuntu instead of Debian because the image comes with two-way
66
# shared folder support by default.
7-
UBUNTU = 'ubuntu/xenial64'
7+
UBUNTU = 'bento/ubuntu-16.04'
88

99
# The main VM is the one used for development and testing.
1010
config.vm.define(:exa, primary: true) do |config|
1111
config.vm.provider :virtualbox do |v|
1212
v.name = 'exa'
13-
v.memory = 1024
14-
v.cpus = 1
13+
v.memory = 2048
14+
v.cpus = 2
15+
end
16+
17+
config.vm.provider :vmware_desktop do |v|
18+
v.vmx['memsize'] = '2048'
19+
v.vmx['numvcpus'] = '2'
1520
end
1621

1722
config.vm.box = UBUNTU
@@ -484,6 +489,21 @@ Vagrant.configure(2) do |config|
484489
sudo chown #{user}:#{user} -R "#{test_dir}/git2"
485490
EOF
486491

492+
# A third Git repository
493+
# Regression test for https://github.com/ogham/exa/issues/526
494+
config.vm.provision :shell, privileged: false, inline: <<-EOF
495+
set -xe
496+
mkdir -p "#{test_dir}/git3"
497+
cd "#{test_dir}/git3"
498+
git init
499+
500+
# Create a symbolic link pointing to a non-existing file
501+
ln -s aaa/aaa/a b
502+
503+
find "#{test_dir}/git3" -exec touch {} -t #{some_date} \\;
504+
sudo chown #{user}:#{user} -R "#{test_dir}/git3"
505+
EOF
506+
487507
# Hidden and dot file testcases.
488508
# We need to set the permissions of `.` and `..` because they actually
489509
# get displayed in the output here, so this has to come last.

contrib/completions.fish

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/bin/sh
21
# Meta-stuff
32
complete -c exa -s 'v' -l 'version' -d "Show version of exa"
43
complete -c exa -s '?' -l 'help' -d "Show list of command-line options"
@@ -75,6 +74,10 @@ complete -c exa -l 'time-style' -x -d "How to format timestamps" -a "
7574
long-iso\t'Display longer ISO timestaps, up to the minute'
7675
full-iso\t'Display full ISO timestamps, up to the nanosecond'
7776
"
77+
complete -c exa -l 'no-permissions' -d "Suppress the permissions field"
78+
complete -c exa -l 'no-filesize' -d "Suppress the filesize field"
79+
complete -c exa -l 'no-user' -d "Suppress the user field"
80+
complete -c exa -l 'no-time' -d "Suppress the time field"
7881

7982
# Optional extras
8083
complete -c exa -s 'g' -l 'git' -d "List each file's Git status, if tracked"

contrib/completions.zsh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ __exa() {
4242
{-S,--blocks}"[List each file's number of filesystem blocks]" \
4343
{-t,--time}="[Which time field to show]:(time field):(accessed changed created modified)" \
4444
--time-style="[How to format timestamps]:(time style):(default iso long-iso full-iso)" \
45+
--no-permissions"[Suppress the permissions field]" \
46+
--no-filesize"[Suppress the filesize field]" \
47+
--no-user"[Suppress the user field]" \
48+
--no-time"[Suppress the time field]" \
4549
{-u,--accessed}"[Use the accessed timestamp field]" \
4650
{-U,--created}"[Use the created timestamp field]" \
4751
--git"[List each file's Git status, if tracked]" \

contrib/man/exa.1

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,26 @@ use the created timestamp field
187187
.RS
188188
.RE
189189
.TP
190+
.B \-\-no\-permissions
191+
suppress the permissions field
192+
.RS
193+
.RE
194+
.TP
195+
.B \-\-no\-filesize
196+
suppress the filesize field
197+
.RS
198+
.RE
199+
.TP
200+
.B \-\-no\-user
201+
suppress the user field
202+
.RS
203+
.RE
204+
.TP
205+
.B \-\-no\-time
206+
suppress the time field
207+
.RS
208+
.RE
209+
.TP
190210
.B \-\@, \-\-extended
191211
list each file\[aq]s extended attributes and sizes
192212
.RS

snap/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.snapcraft

snap/snapcraft.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: exa
2+
version: 'latest'
3+
summary: Replacement for 'ls' written in Rust
4+
description: |
5+
It uses colours for information by default, helping you distinguish between
6+
many types of files, such as whether you are the owner, or in the owning
7+
group. It also has extra features not present in the original ls, such as
8+
viewing the Git status for a directory, or recursing into directories with a
9+
tree view. exa is written in Rust, so it’s small, fast, and portable.
10+
11+
grade: stable
12+
confinement: classic
13+
14+
apps:
15+
exa:
16+
command: exa
17+
18+
parts:
19+
exa:
20+
plugin: rust
21+
source: .
22+
stage-packages:
23+
- libgit2-24
24+
- cmake
25+
- libz-dev

0 commit comments

Comments
 (0)