Просмотр исходного кода

Merge branch 'ogham:master' into master

alpn 3 лет назад
Родитель
Сommit
33cef20c3e
8 измененных файлов с 24 добавлено и 10 удалено
  1. 1 0
      Cargo.toml
  2. 2 2
      README.md
  3. 2 2
      src/fs/feature/xattr.rs
  4. 1 1
      src/fs/fields.rs
  5. 2 2
      src/fs/filter.rs
  6. 3 2
      src/info/filetype.rs
  7. 1 1
      src/options/vars.rs
  8. 12 0
      src/output/icons.rs

+ 1 - 0
Cargo.toml

@@ -4,6 +4,7 @@ description = "A modern replacement for ls"
 authors = ["Benjamin Sago <ogham@bsago.me>"]
 categories = ["command-line-utilities"]
 edition = "2018"
+rust-version = "1.56.1"
 exclude = ["/devtools/*", "/Justfile", "/Vagrantfile", "/screenshots.png"]
 readme = "README.md"
 homepage = "https://the.exa.website/"

+ 2 - 2
README.md

@@ -163,7 +163,7 @@ On openSUSE, install the [`exa`](https://software.opensuse.org/package/exa) pack
 
 ### 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/jammy/exa) package.
 
     sudo apt install exa
 
@@ -215,7 +215,7 @@ Once Rust is installed, you can compile exa with Cargo:
     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`.
-Run `just --tasks` to get an overview of what’s available.
+Run `just --list` to get an overview of what’s available.
 
 - If you are compiling a copy for yourself, be sure to run `cargo build --release` or `just build-release` to benefit from release-mode optimisations.
 Copy the resulting binary, which will be in the `target/release` directory, into a folder in your `$PATH`.

+ 2 - 2
src/fs/feature/xattr.rs

@@ -262,7 +262,7 @@ mod lister {
             unsafe {
                 listxattr(
                     c_path.as_ptr().cast(),
-                    buf.as_mut_ptr().cast::<i8>(),
+                    buf.as_mut_ptr().cast(),
                     bufsize as size_t,
                 )
             }
@@ -277,7 +277,7 @@ mod lister {
             unsafe {
                 getxattr(
                     c_path.as_ptr().cast(),
-                    buf.as_ptr().cast::<i8>(),
+                    buf.as_ptr().cast(),
                     ptr::null_mut(),
                     0,
                 )

+ 1 - 1
src/fs/fields.rs

@@ -162,7 +162,7 @@ pub enum Size {
     /// data is rarely useful — I can’t think of a time when I’ve seen it and
     /// learnt something. So we discard it and just output “-” instead.
     ///
-    /// See this answer for more: http://unix.stackexchange.com/a/68266
+    /// See this answer for more: <https://unix.stackexchange.com/a/68266>
     None,
 
     /// This file is a block or character device, so instead of a size, print

+ 2 - 2
src/fs/filter.rs

@@ -146,7 +146,7 @@ pub enum SortField {
     /// slows the whole operation down, so many systems will only update the
     /// timestamp in certain circumstances. This has become common enough that
     /// it’s now expected behaviour!
-    /// http://unix.stackexchange.com/a/8842
+    /// <https://unix.stackexchange.com/a/8842>
     AccessedDate,
 
     /// The time the file was changed (the “ctime”).
@@ -155,7 +155,7 @@ pub enum SortField {
     /// changed — its permissions, owners, or link count.
     ///
     /// In original Unix, this was, however, meant as creation time.
-    /// https://www.bell-labs.com/usr/dmr/www/cacm.html
+    /// <https://www.bell-labs.com/usr/dmr/www/cacm.html>
     ChangedDate,
 
     /// The time the file was created (the “btime” or “birthtime”).

+ 3 - 2
src/info/filetype.rs

@@ -38,7 +38,8 @@ impl FileExtensions {
             "png", "jfi", "jfif", "jif", "jpe", "jpeg", "jpg", "gif", "bmp",
             "tiff", "tif", "ppm", "pgm", "pbm", "pnm", "webp", "raw", "arw",
             "svg", "stl", "eps", "dvi", "ps", "cbr", "jpf", "cbz", "xpm",
-            "ico", "cr2", "orf", "nef", "heif", "avif", "jxl",
+            "ico", "cr2", "orf", "nef", "heif", "avif", "jxl", "j2k", "jp2",
+            "j2c", "jpx",
         ])
     }
 
@@ -80,7 +81,7 @@ impl FileExtensions {
         file.extension_is_one_of( &[
             "zip", "tar", "Z", "z", "gz", "bz2", "a", "ar", "7z",
             "iso", "dmg", "tc", "rar", "par", "tgz", "xz", "txz",
-            "lz", "tlz", "lzma", "deb", "rpm", "zst", "lz4",
+            "lz", "tlz", "lzma", "deb", "rpm", "zst", "lz4", "cpio",
         ])
     }
 

+ 1 - 1
src/options/vars.rs

@@ -16,7 +16,7 @@ pub static COLUMNS: &str = "COLUMNS";
 pub static TIME_STYLE: &str = "TIME_STYLE";
 
 /// Environment variable used to disable colors.
-/// See: https://no-color.org/
+/// See: <https://no-color.org/>
 pub static NO_COLOR: &str = "NO_COLOR";
 
 // exa-specific variables

+ 12 - 0
src/output/icons.rs

@@ -69,6 +69,8 @@ lazy_static! {
         m.insert("Dockerfile", '\u{f308}'); // 
         m.insert("ds_store", '\u{f179}'); // 
         m.insert("gitignore_global", '\u{f1d3}'); // 
+        m.insert("go.mod", '\u{e626}'); // 
+        m.insert("go.sum", '\u{e626}'); // 
         m.insert("gradle", '\u{e256}'); // 
         m.insert("gruntfile.coffee", '\u{e611}'); // 
         m.insert("gruntfile.js", '\u{e611}'); // 
@@ -136,6 +138,7 @@ pub fn icon_for_file(file: &File<'_>) -> char {
             "coffee"        => '\u{f0f4}', // 
             "conf"          => '\u{e615}', // 
             "cp"            => '\u{e61d}', // 
+            "cpio"          => '\u{f410}', // 
             "cpp"           => '\u{e61d}', // 
             "cs"            => '\u{f81a}', // 
             "csh"           => '\u{f489}', // 
@@ -203,10 +206,13 @@ pub fn icon_for_file(file: &File<'_>) -> char {
             "hxx"           => '\u{f0fd}', // 
             "ico"           => '\u{f1c5}', // 
             "image"         => '\u{f1c5}', // 
+            "img"           => '\u{e271}', // 
             "iml"           => '\u{e7b5}', // 
             "ini"           => '\u{f17a}', // 
             "ipynb"         => '\u{e606}', // 
             "iso"           => '\u{e271}', // 
+            "j2c"           => '\u{f1c5}', // 
+            "j2k"           => '\u{f1c5}', // 
             "jad"           => '\u{e256}', // 
             "jar"           => '\u{e256}', // 
             "java"          => '\u{e256}', // 
@@ -215,9 +221,11 @@ pub fn icon_for_file(file: &File<'_>) -> char {
             "jif"           => '\u{f1c5}', // 
             "jl"            => '\u{e624}', // 
             "jmd"           => '\u{f48a}', // 
+            "jp2"           => '\u{f1c5}', // 
             "jpe"           => '\u{f1c5}', // 
             "jpeg"          => '\u{f1c5}', // 
             "jpg"           => '\u{f1c5}', // 
+            "jpx"           => '\u{f1c5}', // 
             "js"            => '\u{e74e}', // 
             "json"          => '\u{e60b}', // 
             "jsx"           => '\u{e7ba}', // 
@@ -265,7 +273,10 @@ pub fn icon_for_file(file: &File<'_>) -> char {
             "pdf"           => '\u{f1c1}', // 
             "php"           => '\u{e73d}', // 
             "pl"            => '\u{e769}', // 
+            "plx"           => '\u{e769}', // 
+            "pm"            => '\u{e769}', // 
             "png"           => '\u{f1c5}', // 
+            "pod"           => '\u{e769}', // 
             "ppt"           => '\u{f1c4}', // 
             "pptx"          => '\u{f1c4}', // 
             "procfile"      => '\u{e21e}', // 
@@ -311,6 +322,7 @@ pub fn icon_for_file(file: &File<'_>) -> char {
             "stylus"        => '\u{e600}', // 
             "svg"           => '\u{f1c5}', // 
             "swift"         => '\u{e755}', // 
+            "t"             => '\u{e769}', // 
             "tar"           => '\u{f410}', // 
             "taz"           => '\u{f410}', // 
             "tbz"           => '\u{f410}', // 