Browse Source

Merge branch 'ogham:master' into master

alpn 3 years ago
parent
commit
2f1f30e986
4 changed files with 34 additions and 25 deletions
  1. 16 17
      README.md
  2. 0 1
      src/main.rs
  3. 5 1
      src/output/details.rs
  4. 13 6
      src/output/icons.rs

+ 16 - 17
README.md

@@ -105,74 +105,73 @@ More information on how to install exa is available on [the Installation page](h
 
 
 On Alpine Linux, [enable community repository](https://wiki.alpinelinux.org/wiki/Enable_Community_Repository) and install the [`exa`](https://pkgs.alpinelinux.org/package/edge/community/x86_64/exa) package.
 On Alpine Linux, [enable community repository](https://wiki.alpinelinux.org/wiki/Enable_Community_Repository) and install the [`exa`](https://pkgs.alpinelinux.org/package/edge/community/x86_64/exa) package.
 
 
-    $ apk add exa
+    apk add exa
 
 
 ### Arch Linux
 ### Arch Linux
 
 
 On Arch, install the [`exa`](https://www.archlinux.org/packages/community/x86_64/exa/) package.
 On Arch, install the [`exa`](https://www.archlinux.org/packages/community/x86_64/exa/) package.
 
 
-    $ pacman -S exa
+    pacman -S exa
 
 
 ### Android / Termux
 ### Android / Termux
 
 
 On Android / Termux, install the [`exa`](https://github.com/termux/termux-packages/tree/master/packages/exa) package.
 On Android / Termux, install the [`exa`](https://github.com/termux/termux-packages/tree/master/packages/exa) package.
 
 
-    $ pkg install exa
+    pkg install exa
 
 
 ### Debian
 ### Debian
 
 
-On Debian, install the [`exa`](https://packages.debian.org/unstable/exa) package.
-For now, exa is in the _unstable_ repository.
+On Debian, install the [`exa`](https://packages.debian.org/stable/exa) package.
 
 
-    $ apt install exa
+    apt install exa
 
 
 ### Fedora
 ### Fedora
 
 
 On Fedora, install the [`exa`](https://src.fedoraproject.org/modules/exa) package.
 On Fedora, install the [`exa`](https://src.fedoraproject.org/modules/exa) package.
 
 
-    $ dnf install exa
+    dnf install exa
 
 
 ### Gentoo
 ### Gentoo
 
 
 On Gentoo, install the [`sys-apps/exa`](https://packages.gentoo.org/packages/sys-apps/exa) package.
 On Gentoo, install the [`sys-apps/exa`](https://packages.gentoo.org/packages/sys-apps/exa) package.
 
 
-    $ emerge sys-apps/exa
+    emerge sys-apps/exa
 
 
 ### Homebrew
 ### Homebrew
 
 
 If you’re using [Homebrew](https://brew.sh/) on macOS, install the [`exa`](http://formulae.brew.sh/formula/exa) formula.
 If you’re using [Homebrew](https://brew.sh/) on macOS, install the [`exa`](http://formulae.brew.sh/formula/exa) formula.
 
 
-    $ brew install exa
+    brew install exa
 
 
 ### MacPorts
 ### MacPorts
 
 
 If you're using [MacPorts](https://www.macports.org/) on macOS, install the [`exa`](https://ports.macports.org/port/exa/summary) port.
 If you're using [MacPorts](https://www.macports.org/) on macOS, install the [`exa`](https://ports.macports.org/port/exa/summary) port.
 
 
-    $ port install exa
+    port install exa
 
 
 ### Nix
 ### Nix
 
 
 On nixOS, install the [`exa`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/exa/default.nix) package.
 On nixOS, install the [`exa`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/exa/default.nix) package.
 
 
-    $ nix-env -i exa
+    nix-env -i exa
 
 
 ### openSUSE
 ### openSUSE
 
 
 On openSUSE, install the [`exa`](https://software.opensuse.org/package/exa) package.
 On openSUSE, install the [`exa`](https://software.opensuse.org/package/exa) package.
 
 
-    $ zypper install exa
+    zypper install exa
 
 
 ### Ubuntu
 ### Ubuntu
 
 
 On Ubuntu 20.10 (Groovy Gorilla) and later, install the [`exa`](https://packages.ubuntu.com/groovy/exa) package.
 On Ubuntu 20.10 (Groovy Gorilla) and later, install the [`exa`](https://packages.ubuntu.com/groovy/exa) package.
 
 
-    $ sudo apt install exa
+    sudo apt install exa
 
 
 ### Void Linux
 ### Void Linux
 
 
 On Void Linux, install the [`exa`](https://github.com/void-linux/void-packages/blob/master/srcpkgs/exa/template) package.
 On Void Linux, install the [`exa`](https://github.com/void-linux/void-packages/blob/master/srcpkgs/exa/template) package.
 
 
-    $ xbps-install -S exa
+    xbps-install -S exa
 
 
 ### Manual installation from GitHub
 ### Manual installation from GitHub
 
 
@@ -185,7 +184,7 @@ For more information, see the [Manual Installation page](https://the.exa.website
 
 
 If you already have a Rust environment set up, you can use the `cargo install` command:
 If you already have a Rust environment set up, you can use the `cargo install` command:
 
 
-    $ cargo install exa
+    cargo install exa
 
 
 Cargo will build the `exa` binary and place it in `$HOME/.cargo`.
 Cargo will build the `exa` binary and place it in `$HOME/.cargo`.
 
 
@@ -212,8 +211,8 @@ The recommended way to install Rust for development is from the [official downlo
 
 
 Once Rust is installed, you can compile exa with Cargo:
 Once Rust is installed, you can compile exa with Cargo:
 
 
-    $ cargo build
-    $ cargo test
+    cargo build
+    cargo test
 
 
 - The [just](https://github.com/casey/just) command runner can be used to run some helpful development commands, in a manner similar to `make`.
 - The [just](https://github.com/casey/just) command runner can be used to run some helpful development commands, in a manner similar to `make`.
 Run `just --tasks` to get an overview of what’s available.
 Run `just --tasks` to get an overview of what’s available.

+ 0 - 1
src/main.rs

@@ -18,7 +18,6 @@
 #![allow(clippy::non_ascii_literal)]
 #![allow(clippy::non_ascii_literal)]
 #![allow(clippy::option_if_let_else)]
 #![allow(clippy::option_if_let_else)]
 #![allow(clippy::too_many_lines)]
 #![allow(clippy::too_many_lines)]
-#![allow(clippy::unnested_or_patterns)] // TODO: remove this when we support Rust 1.53.0
 #![allow(clippy::unused_self)]
 #![allow(clippy::unused_self)]
 #![allow(clippy::upper_case_acronyms)]
 #![allow(clippy::upper_case_acronyms)]
 #![allow(clippy::wildcard_imports)]
 #![allow(clippy::wildcard_imports)]

+ 5 - 1
src/output/details.rs

@@ -147,7 +147,11 @@ impl<'a> AsRef<File<'a>> for Egg<'a> {
 
 
 impl<'a> Render<'a> {
 impl<'a> Render<'a> {
     pub fn render<W: Write>(mut self, w: &mut W) -> io::Result<()> {
     pub fn render<W: Write>(mut self, w: &mut W) -> io::Result<()> {
-        let mut pool = Pool::new(num_cpus::get() as u32);
+        let n_cpus = match num_cpus::get() as u32 {
+            0 => 1,
+            n => n,
+        };
+        let mut pool = Pool::new(n_cpus);
         let mut rows = Vec::new();
         let mut rows = Vec::new();
 
 
         if let Some(ref table) = self.opts.table {
         if let Some(ref table) = self.opts.table {

+ 13 - 6
src/output/icons.rs

@@ -69,7 +69,7 @@ lazy_static! {
         m.insert("Dockerfile", '\u{f308}'); // 
         m.insert("Dockerfile", '\u{f308}'); // 
         m.insert("ds_store", '\u{f179}'); // 
         m.insert("ds_store", '\u{f179}'); // 
         m.insert("gitignore_global", '\u{f1d3}'); // 
         m.insert("gitignore_global", '\u{f1d3}'); // 
-        m.insert("gradle", '\u{e70e}'); // 
+        m.insert("gradle", '\u{e256}'); // 
         m.insert("gruntfile.coffee", '\u{e611}'); // 
         m.insert("gruntfile.coffee", '\u{e611}'); // 
         m.insert("gruntfile.js", '\u{e611}'); // 
         m.insert("gruntfile.js", '\u{e611}'); // 
         m.insert("gruntfile.ls", '\u{e611}'); // 
         m.insert("gruntfile.ls", '\u{e611}'); // 
@@ -83,6 +83,7 @@ lazy_static! {
         m.insert("Makefile", '\u{f489}'); // 
         m.insert("Makefile", '\u{f489}'); // 
         m.insert("node_modules", '\u{e718}'); // 
         m.insert("node_modules", '\u{e718}'); // 
         m.insert("npmignore", '\u{e71e}'); // 
         m.insert("npmignore", '\u{e71e}'); // 
+        m.insert("PKGBUILD", '\u{f303}'); // 
         m.insert("rubydoc", '\u{e73b}'); // 
         m.insert("rubydoc", '\u{e73b}'); // 
         m.insert("yarn.lock", '\u{e718}'); // 
         m.insert("yarn.lock", '\u{e718}'); // 
 
 
@@ -118,6 +119,7 @@ pub fn icon_for_file(file: &File<'_>) -> char {
             "bash_profile"  => '\u{f489}', // 
             "bash_profile"  => '\u{f489}', // 
             "bashrc"        => '\u{f489}', // 
             "bashrc"        => '\u{f489}', // 
             "bat"           => '\u{f17a}', // 
             "bat"           => '\u{f17a}', // 
+            "bats"          => '\u{f489}', // 
             "bmp"           => '\u{f1c5}', // 
             "bmp"           => '\u{f1c5}', // 
             "bz"            => '\u{f410}', // 
             "bz"            => '\u{f410}', // 
             "bz2"           => '\u{f410}', // 
             "bz2"           => '\u{f410}', // 
@@ -156,6 +158,7 @@ pub fn icon_for_file(file: &File<'_>) -> char {
             "DS_store"      => '\u{f179}', // 
             "DS_store"      => '\u{f179}', // 
             "dump"          => '\u{f1c0}', // 
             "dump"          => '\u{f1c0}', // 
             "ebook"         => '\u{e28b}', // 
             "ebook"         => '\u{e28b}', // 
+            "ebuild"        => '\u{f30d}', // 
             "editorconfig"  => '\u{e615}', // 
             "editorconfig"  => '\u{e615}', // 
             "ejs"           => '\u{e618}', // 
             "ejs"           => '\u{e618}', // 
             "elm"           => '\u{e62c}', // 
             "elm"           => '\u{e62c}', // 
@@ -185,7 +188,7 @@ pub fn icon_for_file(file: &File<'_>) -> char {
             "gitignore"     => '\u{f1d3}', // 
             "gitignore"     => '\u{f1d3}', // 
             "gitmodules"    => '\u{f1d3}', // 
             "gitmodules"    => '\u{f1d3}', // 
             "go"            => '\u{e626}', // 
             "go"            => '\u{e626}', // 
-            "gradle"        => '\u{e70e}', // 
+            "gradle"        => '\u{e256}', // 
             "groovy"        => '\u{e775}', // 
             "groovy"        => '\u{e775}', // 
             "gsheet"        => '\u{f1c3}', // 
             "gsheet"        => '\u{f1c3}', // 
             "gslides"       => '\u{f1c4}', // 
             "gslides"       => '\u{f1c4}', // 
@@ -205,12 +208,13 @@ pub fn icon_for_file(file: &File<'_>) -> char {
             "ipynb"         => '\u{e606}', // 
             "ipynb"         => '\u{e606}', // 
             "iso"           => '\u{e271}', // 
             "iso"           => '\u{e271}', // 
             "jad"           => '\u{e256}', // 
             "jad"           => '\u{e256}', // 
-            "jar"           => '\u{e204}', // 
-            "java"          => '\u{e204}', // 
+            "jar"           => '\u{e256}', // 
+            "java"          => '\u{e256}', // 
             "jfi"           => '\u{f1c5}', // 
             "jfi"           => '\u{f1c5}', // 
             "jfif"          => '\u{f1c5}', // 
             "jfif"          => '\u{f1c5}', // 
             "jif"           => '\u{f1c5}', // 
             "jif"           => '\u{f1c5}', // 
             "jl"            => '\u{e624}', // 
             "jl"            => '\u{e624}', // 
+            "jmd"           => '\u{f48a}', // 
             "jpe"           => '\u{f1c5}', // 
             "jpe"           => '\u{f1c5}', // 
             "jpeg"          => '\u{f1c5}', // 
             "jpeg"          => '\u{f1c5}', // 
             "jpg"           => '\u{f1c5}', // 
             "jpg"           => '\u{f1c5}', // 
@@ -256,6 +260,7 @@ pub fn icon_for_file(file: &File<'_>) -> char {
             "ogg"           => '\u{f001}', // 
             "ogg"           => '\u{f001}', // 
             "ogv"           => '\u{f03d}', // 
             "ogv"           => '\u{f03d}', // 
             "otf"           => '\u{f031}', // 
             "otf"           => '\u{f031}', // 
+            "part"          => '\u{f43a}', // 
             "patch"         => '\u{f440}', // 
             "patch"         => '\u{f440}', // 
             "pdf"           => '\u{f1c1}', // 
             "pdf"           => '\u{f1c1}', // 
             "php"           => '\u{e73d}', // 
             "php"           => '\u{e73d}', // 
@@ -315,6 +320,7 @@ pub fn icon_for_file(file: &File<'_>) -> char {
             "tiff"          => '\u{f1c5}', // 
             "tiff"          => '\u{f1c5}', // 
             "tlz"           => '\u{f410}', // 
             "tlz"           => '\u{f410}', // 
             "toml"          => '\u{e615}', // 
             "toml"          => '\u{e615}', // 
+            "torrent"       => '\u{e275}', // 
             "ts"            => '\u{e628}', // 
             "ts"            => '\u{e628}', // 
             "tsv"           => '\u{f1c3}', // 
             "tsv"           => '\u{f1c3}', // 
             "tsx"           => '\u{e7ba}', // 
             "tsx"           => '\u{e7ba}', // 
@@ -337,8 +343,8 @@ pub fn icon_for_file(file: &File<'_>) -> char {
             "xhtml"         => '\u{f13b}', // 
             "xhtml"         => '\u{f13b}', // 
             "xls"           => '\u{f1c3}', // 
             "xls"           => '\u{f1c3}', // 
             "xlsx"          => '\u{f1c3}', // 
             "xlsx"          => '\u{f1c3}', // 
-            "xml"           => '\u{fabf}', // 謹
-            "xul"           => '\u{fabf}', // 謹
+            "xml"           => '\u{f121}', // 
+            "xul"           => '\u{f121}', // 
             "xz"            => '\u{f410}', // 
             "xz"            => '\u{f410}', // 
             "yaml"          => '\u{f481}', // 
             "yaml"          => '\u{f481}', // 
             "yml"           => '\u{f481}', // 
             "yml"           => '\u{f481}', // 
@@ -346,6 +352,7 @@ pub fn icon_for_file(file: &File<'_>) -> char {
             "zsh"           => '\u{f489}', // 
             "zsh"           => '\u{f489}', // 
             "zsh-theme"     => '\u{f489}', // 
             "zsh-theme"     => '\u{f489}', // 
             "zshrc"         => '\u{f489}', // 
             "zshrc"         => '\u{f489}', // 
+            "zst"           => '\u{f410}', // 
             _               => '\u{f15b}'  // 
             _               => '\u{f15b}'  // 
         }
         }
     }
     }