ogham / exa Goto Github PK
View Code? Open in Web Editor NEWA modern replacement for ‘ls’.
Home Page: https://the.exa.website/
License: MIT License
A modern replacement for ‘ls’.
Home Page: https://the.exa.website/
License: MIT License
See rust-ansi-term#1.
This is just for the record in case someone wants to try out exa and experiences the problem.
Hi,
if I try to compile exa with Rust 1.0, I get :
Compiling users v0.4.1
/Users/francois/.cargo/registry/src/github.com-1ecc6299db9ec823/users-0.4.1/src/lib.rs:4:1: 4:31 error: unstable feature
/Users/francois/.cargo/registry/src/github.com-1ecc6299db9ec823/users-0.4.1/src/lib.rs:4 #![feature(collections, core)]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: this feature may not be used in the stable release channel
error: aborting due to previous error
Build failed, waiting for other jobs to finish...
/Users/francois/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-0.1.30/src/lib.rs:370:34: 370:48 error: unstable feature
/Users/francois/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-0.1.30/src/lib.rs:370 #![cfg_attr(feature = "pattern", feature(core))]
^~~~~~~~~~~~~~
note: this feature may not be used in the stable release channel
error: aborting due to previous error
Could not compile users
.
Is a migration to Rust 1.0 planned ? Having to use Rust nightly to compile exa is unwieldy.
Hi, I just wanted to try out exa on my mac and compile it with cargo build
. The following compiler error happened when I tried to build it with the new alpha2 Version of Rust.
Compiling datetime v0.1.4
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'index out of bounds: the len is 60 but the index is 119', /private/tmp/rust-HZIS8e/rustc-1.0.0-alpha.2/src/libsyntax/lib.rs:1
stack backtrace:
1: 0x113284ff3 - sys::backtrace::write::h3ca5feae500ed52e0nC
2: 0x1132b2ff5 - panicking::on_panic::h427a0dd57708cc90HOL
3: 0x1131dc828 - rt::unwind::begin_unwind_inner::h95bef2ce64a9b09aUvL
4: 0x1131dd03e - rt::unwind::begin_unwind_fmt::h3276585806f96047quL
5: 0x1132b2ace - rust_begin_unwind
6: 0x1133015e7 - panicking::panic_fmt::h0e692e913294740dcSv
7: 0x1133119f9 - panicking::panic_bounds_check::hfb942dba77525658dRv
8: 0x11c205c5b - util::interner::StrInterner::get::hd6e80b1f6f9b9d1e8qa
9: 0x11c2181e8 - ast::Name::as_str::h4d89084de0febb56W1b
10: 0x11c306ec9 - parse::parser::Parser<'a>::lit_from_token::h8b005b8ea5da4967B9J
11: 0x11c30b0ef - parse::parser::Parser<'a>::parse_lit::h75243d3e2e75ebdatdK
12: 0x11c3108f9 - parse::parser::Parser<'a>::parse_bottom_expr::hf640a10b850ae677KwK
13: 0x11c3143a3 - parse::parser::Parser<'a>::parse_dot_or_call_expr::h5aef511176efc152LPK
14: 0x11c317619 - parse::parser::Parser<'a>::parse_prefix_expr::h855a3313e26cd8b6pcL
15: 0x11c317a83 - parse::parser::Parser<'a>::parse_binops::h3cce6c27626ef4a7shL
16: 0x11c31810a - parse::parser::Parser<'a>::parse_assign_expr::h566f3f6fe8423149imL
17: 0x11c209252 - parse::parser::Parser<'a>::parse_expr::he9439e4594ad5603sBL
18: 0x114de08ba - parse::h3aa20a3e0271c9e6EVe
19: 0x114de01ef - native::h5033905dceb46b1a2aa
20: 0x11a25d9d0 - ext::base::F.TTMacroExpander::expand::h9885284188111709147
21: 0x112a276fe - ext::expand::expand_expr::closure.58777
22: 0x112a25342 - ext::expand::expand_expr::h708cdb6fc2947796wBd
23: 0x1129d5767 - ext::expand::MacroExpander<'a, 'b>.Folder::fold_expr::h14d6d66838c87b4bzRe
24: 0x112a31094 - fold::noop_fold_expr::closure.58828
25: 0x112a2ccce - fold::noop_fold_expr::h18245734235397678008
26: 0x112a25991 - ext::expand::expand_expr::closure.58777
27: 0x112a25342 - ext::expand::expand_expr::h708cdb6fc2947796wBd
28: 0x1129d5767 - ext::expand::MacroExpander<'a, 'b>.Folder::fold_expr::h14d6d66838c87b4bzRe
29: 0x112a2d5ce - fold::noop_fold_expr::h18245734235397678008
30: 0x112a25991 - ext::expand::expand_expr::closure.58777
31: 0x112a25342 - ext::expand::expand_expr::h708cdb6fc2947796wBd
32: 0x1129d5767 - ext::expand::MacroExpander<'a, 'b>.Folder::fold_expr::h14d6d66838c87b4bzRe
33: 0x112a7b541 - ext::expand::expand_block_elts::closure.59367
34: 0x112a79a4a - ext::expand::expand_block_elts::closure.59352
35: 0x112a32082 - ext::expand::expand_block_elts::h33bffd6be93b97bd9oe
36: 0x112a79328 - ext::expand::expand_block::h24c32e0ca13ff930poe
37: 0x112a310d7 - ext::expand::MacroExpander<'a, 'b>.Folder::fold_block::h2c7c4aa9a7fb74e1UTe
38: 0x112a31b16 - ext::expand::expand_and_rename_fn_decl_and_block::h2d2017cf005657e2nPe
39: 0x112a3c1d9 - ext::expand::expand_item_underscore::h419ef4801d85af5902d
40: 0x112aa5552 - fold::Folder::fold_item_simple::h2731701263018137823
41: 0x112aa4cd3 - ptr::P<T>::map::h8554705141726776696
42: 0x112a37610 - ext::expand::expand_annotatable::h88dc023da922b69a0ze
43: 0x112a32230 - ext::expand::expand_item::h73c6777954f55dabaZd
44: 0x112a417a2 - ext::expand::MacroExpander<'a, 'b>.Folder::fold_item::h2ceb4431e9e9d273dSe
45: 0x112a41578 - fold::noop_fold_mod::closure.58932
46: 0x112a41316 - iter::FlatMap<I, U, F>.Iterator::next::h5161533231077670287
47: 0x112a40f60 - vec::Vec<T>.FromIterator<T>::from_iter::h8312589321558787086
48: 0x112a40b9f - fold::noop_fold_mod::h4371177142799704305
49: 0x112a3ca7c - ext::expand::expand_item_underscore::h419ef4801d85af5902d
50: 0x112aa5552 - fold::Folder::fold_item_simple::h2731701263018137823
51: 0x112aa4cd3 - ptr::P<T>::map::h8554705141726776696
52: 0x112a37b95 - ext::expand::expand_annotatable::h88dc023da922b69a0ze
53: 0x112a32230 - ext::expand::expand_item::h73c6777954f55dabaZd
54: 0x112a417a2 - ext::expand::MacroExpander<'a, 'b>.Folder::fold_item::h2ceb4431e9e9d273dSe
55: 0x112a41578 - fold::noop_fold_mod::closure.58932
56: 0x112a41316 - iter::FlatMap<I, U, F>.Iterator::next::h5161533231077670287
57: 0x112a40f60 - vec::Vec<T>.FromIterator<T>::from_iter::h8312589321558787086
58: 0x112a40b9f - fold::noop_fold_mod::h4371177142799704305
59: 0x112a3ca7c - ext::expand::expand_item_underscore::h419ef4801d85af5902d
60: 0x112aa5552 - fold::Folder::fold_item_simple::h2731701263018137823
61: 0x112aa4cd3 - ptr::P<T>::map::h8554705141726776696
62: 0x112a37b95 - ext::expand::expand_annotatable::h88dc023da922b69a0ze
63: 0x112a32230 - ext::expand::expand_item::h73c6777954f55dabaZd
64: 0x112a417a2 - ext::expand::MacroExpander<'a, 'b>.Folder::fold_item::h2ceb4431e9e9d273dSe
65: 0x112ab1e94 - ext::expand::expand_crate::h8939ba68ce216344IYe
66: 0x10f9150d4 - driver::phase_2_configure_and_expand::closure.20378
67: 0x10f8c890b - driver::phase_2_configure_and_expand::hab0050cde8421a2f3ta
68: 0x10f8b8436 - driver::compile_input::h3209bb30175edce5Gba
69: 0x10f991bf7 - run_compiler::h4f9c8b8dc9afd5bcZbc
70: 0x10f98f071 - thunk::F.Invoke<A, R>::invoke::h14876380274845848394
71: 0x10f98dcd0 - rt::unwind::try::try_fn::h15300130168675296220
72: 0x11332be09 - rust_try_inner
73: 0x11332bdf6 - rust_try
74: 0x10f98e435 - thunk::F.Invoke<A, R>::invoke::h14996245602772505822
75: 0x11329bed3 - sys::thread::thread_start::h8693132672f20887e4G
76: 0x7fff8f547268 - _pthread_body
77: 0x7fff8f5471e5 - _pthread_body
Could not compile `datetime`.
looks like the datetime dependency does not work. Is this a bug with the rust compiler or is it something you can fix? I am completely new to rust and have no idea :)
For example, if I execute a command
exa -l > output.txt
I don't want the file to contain the codes. It's even semantically improper: the codes should send control commands to the terminal, and if there is no terminal on the other end, there is nothing to control.
Parsing ls
is an ages-old problem that exa
could help solve by providing an option for producing structured key-value output. By "structured key-value output" I mean one or more of JSON (pretty much the default nowadays), YAML, XML (boo!), TOML (yay!) or Tcl dictionaries (sample).
Hello,
exa -l crashes when listing /proc/PID entries. I'm not sure if it's a rust issue or a exa bug.
$ exa /proc/1333/
attr cgroup comm cwd fd limits mem mountstats numa_maps oom_score_adj root sessionid stat syscall
autogroup clear_refs coredump_filter environ fdinfo loginuid mountinfo net oom_adj pagemap sched smaps statm task
auxv cmdline cpuset exe io maps mounts ns oom_score personality schedstat stack status wchan
$ exa -l /proc/1333/
thread '<main>' panicked at 'called `Option::unwrap()` on a `None` value', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcore/option.rs:362
I pulled exa, installed rust, cmake, and libgit2 (the last two from MacPorts). But the "cargo build" failed with the following errors:
Compiling libssh2-sys v0.1.8
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libgit2-sys-0.1.14/build.rs:109:36: 109:64 error: type mismatch resolving `<core::option::IntoIter<std::old_path::posix::Path> as core::iter::Iterator>::Item == std::path::PathBuf`:
expected struct `std::old_path::posix::Path`,
found struct `std::path::PathBuf` [E0271]
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libgit2-sys-0.1.14/build.rs:109 .chain(Some(val).into_iter())).unwrap();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libgit2-sys-0.1.14/build.rs:108:15: 108:30 error: type mismatch resolving `<core::option::IntoIter<std::old_path::posix::Path> as core::iter::Iterator>::Item == std::path::PathBuf`:
expected struct `std::old_path::posix::Path`,
found struct `std::path::PathBuf` [E0271]
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libgit2-sys-0.1.14/build.rs:108 let val = env::join_paths(env::split_paths(&prefix)
^~~~~~~~~~~~~~~
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libgit2-sys-0.1.14/build.rs:108:15: 108:30 note: required by `std::env::join_paths`
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libgit2-sys-0.1.14/build.rs:108 let val = env::join_paths(env::split_paths(&prefix)
^~~~~~~~~~~~~~~
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libgit2-sys-0.1.14/build.rs:108:15: 108:30 error: type mismatch resolving `<core::option::IntoIter<std::old_path::posix::Path> as core::iter::Iterator>::Item == std::path::PathBuf`:
expected struct `std::old_path::posix::Path`,
found struct `std::path::PathBuf` [E0271]
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libgit2-sys-0.1.14/build.rs:108 let val = env::join_paths(env::split_paths(&prefix)
^~~~~~~~~~~~~~~
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libgit2-sys-0.1.14/build.rs:108:15: 108:30 note: required by `std::env::join_paths`
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libgit2-sys-0.1.14/build.rs:108 let val = env::join_paths(env::split_paths(&prefix)
^~~~~~~~~~~~~~~
error: aborting due to 3 previous errors
Build failed, waiting for other jobs to finish...
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libssh2-sys-0.1.8/build.rs:130:19: 130:27 error: type `&std::path::PathBuf` does not implement any method in scope named `exists`
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libssh2-sys-0.1.8/build.rs:130 }).find(|p| p.exists())
^~~~~~~~
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libssh2-sys-0.1.8/build.rs:130:27: 130:27 help: methods from traits can only be called if the trait is in scope; the following trait is implemented but not in scope, perhaps add a `use` for it:
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libssh2-sys-0.1.8/build.rs:130:27: 130:27 help: candidate #1: use `std::fs::PathExt`
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libssh2-sys-0.1.8/build.rs:128:5: 130:28 error: mismatched types:
expected `core::option::Option<std::old_path::posix::Path>`,
found `core::option::Option<std::path::PathBuf>`
(expected struct `std::old_path::posix::Path`,
found struct `std::path::PathBuf`) [E0308]
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libssh2-sys-0.1.8/build.rs:128 env::split_paths(&env::var("PATH").unwrap()).map(|p| {
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libssh2-sys-0.1.8/build.rs:129 p.join(&cmd)
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libssh2-sys-0.1.8/build.rs:130 }).find(|p| p.exists())
error: aborting due to 2 previous errors
Playing with the (amazing) tree view, I've noticed a couple of places for improvement:
Option --tree is useless without option --recurse
. I think we could imply --recurse
then.-T
limiting the nesting level, similarly to tree -L 2
.I think this may not be an issue. But I did not find any other place to seek for help. So I have to report it as an issue. Sorry for the possible abuse of the issue list.
I compiled the code using cargo build
but received the following error:
/home/monnand/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.2.1/src/lib.rs:61:25: 61:29 error: type `core::option::Option<std::ffi::os_str::OsString>` does not implement any method in scope named `ok`
/home/monnand/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.2.1/src/lib.rs:61 let r = env::var(v).ok();
^~~~
error: aborting due to previous error
Here are the versions of rustc and cargo:
$ cargo version
cargo 0.0.1-pre-nightly (9404539 2015-02-09 20:54:26 +0000)
$ rustc -V
rustc 1.0.0-nightly (134e00be7 2015-02-09 19:01:37 +0000)
$ touch testfile
$ ls -l
total 0
-rw-r--r-- 1 jon users 0 Mar 22 17:40 testfile
$ exa -l
.rw-r--r-- 0 jon 22 Mar 21:40 testfile
Since I'm currently at UTC-4, my guess is that the modification time is printed as UTC time, not local time.
I realize that cross-compilation is difficult at this stage of the game, but it would be nice if compiled binaries were provided for whatever platforms are feasible for the author/contributors. Since there are 24 crate dependencies (when transitives are counted), it is likely that one or more crates will not compile at any given point in time. (In particular, at the time of this writing, libssh2-sys
is not compiling.)
GNU ls has an option called --group-directories-first which groups directories before files and then applies other sorting options. This is currently not possible unless I'm missing something.
I personally use that option on all my machines because I prefer to have directories and files listed separate from eachother.
If this feature is wanted I'll implement it and open a pull request. Unless you would prefer to do it yourself of course.
Hello,
When file UID is > 2^31, the displayed UID wraps around and is displayed as negative. This issue probably also happens with big BIG.
#Mon Feb 23 11:26:44 $ ls -la a b c
-rw-r--r-- 1 2147483647 xxx 0 Feb 23 11:26 a
-rw-r--r-- 1 2147483648 xxx 0 Feb 23 11:26 b
-rw-r--r-- 1 2147483649 xxx 0 Feb 23 11:26 c
#Mon Feb 23 11:26:48 $ exa -la a b c
.rw-r--r-- 0 2147483647 23 Feb 10:26 a
.rw-r--r-- 0 -2147483648 23 Feb 10:26 b
.rw-r--r-- 0 -2147483647 23 Feb 10:26 c
A few months ago I made pull request #45 to stat the files in parallel. Back then the ThreadPool
in std
was in the process of being deprecated, so I used a less efficient approach of spawning a thread for each stat task and using a sync_channel
to keep track of the thread capacity. Now that ThreadPool
is moved to a separate crate, I tried going back to replacing the (thread_capacity_tx, thread_capacity_rx)
hack with a ThreadPool
. However, I ran into some lifetime issues that I wasn't able to get around. If anyone can get it working that's be great.
$ exa --across --long
Option --across is useless given option --long.
exa
doesn't seem to parse --across
correctly. This is using v0.2.0 compiled with rustc 1.0.0-nightly (b4c965ee8 2015-03-02) (built 2015-03-03)
.
Downloading natord v1.0.7
Downloading regex v0.1.15
Downloading git2 v0.1.20
Downloading pkg-config v0.1.7
Downloading libssh2-sys v0.1.8
Downloading matches v0.1.2
Downloading openssl-sys v0.4.3
Downloading datetime v0.1.4
Downloading pkg-config v0.2.2
Downloading getopts v0.2.4
Downloading libgit2-sys v0.1.14
Downloading number_prefix v0.2.3
Downloading ansi_term v0.5.0
Downloading pad v0.1.2
Downloading regex_macros v0.1.8
Downloading log v0.2.4
Downloading locale v0.1.3
Downloading users v0.2.3
Downloading rustc-serialize v0.2.15
Downloading gcc v0.2.1
Downloading libz-sys v0.1.0
Compiling pad v0.1.2
Compiling log v0.2.4
Compiling bitflags v0.1.1
Compiling ansi_term v0.5.0
Compiling natord v1.0.7
Compiling number_prefix v0.2.3
Compiling pkg-config v0.1.7
Compiling rustc-serialize v0.2.15
Compiling regex v0.1.15
/Users/yo1/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-0.1.15/src/re.rs:582:58: 582:70 error: wrong number of type arguments: expected 2, found 1 [E0243]
/Users/yo1/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-0.1.15/src/re.rs:582 fn reg_replace<'a>(&'a mut self, caps: &Captures) -> Cow<'a, str>;
^~~~~~~~~~~~
Compiling libc v0.1.2
Compiling pkg-config v0.2.2
/Users/yo1/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.2.15/src/collection_impls.rs:17:24: 17:34 error: unresolved import `std::collections::LinkedList`. There is no `LinkedList` in `std::collections`
/Users/yo1/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.2.15/src/collection_impls.rs:17 use std::collections::{LinkedList, VecDeque, BTreeMap, BTreeSet, HashMap, HashSet, VecMap};
^~~~~~~~~~
/Users/yo1/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.2.15/src/collection_impls.rs:17:36: 17:44 error: unresolved import `std::collections::VecDeque`. There is no `VecDeque` in `std::collections`
/Users/yo1/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.2.15/src/collection_impls.rs:17 use std::collections::{LinkedList, VecDeque, BTreeMap, BTreeSet, HashMap, HashSet, VecMap};
^~~~~~~~
error: aborting due to 2 previous errors
Compiling matches v0.1.2
Compiling gcc v0.2.1
Compiling locale v0.1.3
Compiling getopts v0.2.4
Build failed, waiting for other jobs to finish...
Could not compile `regex`.
To learn more, run the command again with --verbose.
(air)exa(master)$ cargo build --no-default-features
Compiling regex v0.1.15
Compiling users v0.2.3
/Users/yo1/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-0.1.15/src/re.rs:582:58: 582:70 error: wrong number of type arguments: expected 2, found 1 [E0243]
/Users/yo1/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-0.1.15/src/re.rs:582 fn reg_replace<'a>(&'a mut self, caps: &Captures) -> Cow<'a, str>;
^~~~~~~~~~~~
Build failed, waiting for other jobs to finish...
Could not compile `regex`.
To learn more, run the command again with --verbose.
(air)exa(master)$ v .
I downloaded the latest nightly and fresh clone of exa. Also removed my .cargo folder to start fresh with new downloaded dependencies.
make install
yields:
Compiling openssl-sys v0.6.0
Build failed, waiting for other jobs to finish...
failed to run custom build command for `openssl-sys v0.6.0`
Process didn't exit successfully: `/home/mackenza/exa/target/release/build/openssl-sys-d9a1dd4f363aedb0/build-script-build` (exit code: 101)
--- stdout
cargo:rustc-flags=-l dylib=crypto -l dylib=ssl
TARGET = Some("x86_64-unknown-linux-gnu")
CARGO_MANIFEST_DIR = Some("/home/mackenza/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.6.0")
OUT_DIR = Some("/home/mackenza/exa/target/release/build/openssl-sys-d9a1dd4f363aedb0/out")
TARGET = Some("x86_64-unknown-linux-gnu")
OPT_LEVEL = Some("3")
PROFILE = Some("release")
release 3
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-unknown-linux-gnu = None
CC_x86_64_unknown_linux_gnu = None
HOST_CC = None
CC = None
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CFLAGS_x86_64-unknown-linux-gnu = None
CFLAGS_x86_64_unknown_linux_gnu = None
HOST_CFLAGS = None
CFLAGS = None
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-unknown-linux-gnu = None
CC_x86_64_unknown_linux_gnu = None
HOST_CC = None
CC = None
running: "cc" "-O3" "-c" "-ffunction-sections" "-fdata-sections" "-m64" "-fPIC" "/home/mackenza/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.6.0/src/old_openssl_shim.c" "-o" "/home/mackenza/exa/target/release/build/openssl-sys-d9a1dd4f363aedb0/out/src/old_openssl_shim.o"
command did not execute successfully, got: exit code: 1
cargo 0.0.1-pre-nightly (72c2e3d 2015-04-10) (built 2015-04-12)
rustc 1.0.0-nightly (47def3ef2 2015-04-13) (built 2015-04-13)
The -A option (which doesn't list .
or ..
) is missing.
► exa -l
.rw-r--r-- 7.9k one 17 Jan 1970 Cargo.lock
.rw-r--r-- 503 one 17 Jan 1970 Cargo.toml
.rw-r--r-- 1.1k one 17 Jan 1970 LICENCE
.rw-r--r-- 412 one 17 Jan 1970 Makefile
.rw-r--r-- 2.3k one 17 Jan 1970 README.md
drwxr-xr-x - one 17 Jan 1970 contrib
drwxr-xr-x - one 17 Jan 1970 man
.rw-r--r-- 195k one 17 Jan 1970 screenshot.png
drwxr-xr-x - one 17 Jan 1970 src
drwx------ - one 17 Jan 1970 target
type exa | echo
and you get:
thread '<main>' panicked at 'failed printing to stdout: IoError { kind: BrokenPipe, desc: "broken pipe", detail: Some("Broken pipe") }', /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/libstd/old_io/stdio.rs:355
Would love to have Mac support for this, using Brew most likely.
I used exa to list my home directory, and noticed that some of the filenames are missing at least one /
character.
Specifically, when a symlink should be printed like the following:
symlink => dirA/dirB/dirC/file
It is actually printed as:
symlink => dirAdirBdirC/file
Trying to build git head on Fedora 20 x86_64. I have installed dependencies (as mentioned at: http://bsago.me/exa/) with:
# yum install -y libgit2 libgit2-devel cmake
Running either cargo build --verbose
or cargo build --no-default-features --verbose
gives me:
Process didn't exit successfully: `rustc - --crate-name - --crate-type dylib --crate-type bin --print=file-names` (status=101)
--- stderr
error: crate name cannot start with a hyphen: -
error: aborting due to previous error
It seems running make
just invokes cargo build --release
too. I'm not that familiar with cargo
. Any pointers?
With rust 1.0-beta:
RUST_BACKTRACE=1 target/release/exa -l target/release/build/libgit2-sys-cf0baff159b3f839/out/build/CMakeFiles/git2.dir/src/reflog.c.o
thread '<main>' panicked at 'arithmetic operation overflowed', /builddir/rustc-1.0.0-beta/src/libcore/fmt/float.rs:245
stack backtrace:
1: 0x7f2d7b9eb649 - sys::backtrace::write::hba7d6759bcba33a1IJC
2: 0x7f2d7b9ec5d8 - panicking::on_panic::h5c30e0a30da1bbccsXI
3: 0x7f2d7b9e3833 - rt::unwind::begin_unwind_inner::h3ee58867f98d76ceACI
4: 0x7f2d7b9e3bf9 - rt::unwind::begin_unwind_fmt::hb118546716319a33bBI
5: 0x7f2d7b9f6aff - panicking::panic_fmt::h0b6928b02fe860175jC
6: 0x7f2d7b9f6884 - panicking::panic::hcff80b8fe19a4407CiC
7: 0x7f2d7b9fb3ce - fmt::f64.Display::fmt::h055ca1cab9e7fa0bOzN
8: 0x7f2d7b9fa471 - fmt::write::h7095d9ace3624b5eAWM
9: 0x7f2d7b9fb671 - fmt::Arguments<'a>.Display::fmt::hfaeb846858fe0793uUM
10: 0x7f2d7b9fa510 - fmt::write::h7095d9ace3624b5eAWM
11: 0x7f2d7b9f47a5 - fmt::format::hb3d9f7425f11fae2X9e
12: 0x7f2d7b98fe69 - file::File<'a>::file_size::h23912b301d6663a3lUa
13: 0x7f2d7b9a1012 - iter::Map<I, F>.Iterator::next::h2014501278531909608
14: 0x7f2d7b9a0134 - output::details::Details::add_files_to_table::h51b69916fb6c882eKXc
15: 0x7f2d7b9c30ca - Exa<'a>::print::h407cb662e8aac3bbrqd
16: 0x7f2d7b9c622d - main::h28f6ef0cdd27ca444qd
17: 0x7f2d7ba3bc68 - rust_try_inner
18: 0x7f2d7ba3bc55 - rust_try
19: 0x7f2d7b9c82d5 - main
20: 0x7f2d7a96c7ff - __libc_start_main
21: 0x7f2d7b984b68 - _start
at ../sysdeps/x86_64/start.S:108
22: 0x0 - <unknown>
% ls -l target/release/build/libgit2-sys-cf0baff159b3f839/out/build/CMakeFiles/git2.dir/src/reflog.c.o
-rw-rw-r-- 1 chris chris 9992 Apr 5 23:11 target/release/build/libgit2-sys-cf0baff159b3f839/out/build/CMakeFiles/git2.dir/src/reflog.c.o
-lb
and -lB
work fine.
I'm getting the following errors when I try to compile on OS X Yosemite (rustc 1.1.0-nightly (da623844a 2015-04-25) (built 2015-04-25)
):
cargo build --release --verbose
Updating registry `https://github.com/rust-lang/crates.io-index`
Downloading locale v0.1.7
Downloading natord v1.0.8
Downloading regex_macros v0.1.15
Downloading bitflags v0.1.1
Downloading time v0.1.25
Downloading libc v0.1.6
Downloading libssh2-sys v0.1.18
Downloading gcc v0.3.4
Downloading users v0.3.2
Downloading pkg-config v0.3.3
Downloading regex v0.1.27
Downloading getopts v0.2.9
Downloading pad v0.1.3
Downloading num_cpus v0.1.0
Downloading rustc-serialize v0.3.12
Downloading matches v0.1.2
Downloading log v0.3.1
Downloading openssl-sys v0.6.0
Compiling regex v0.1.27
Running `rustc /Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-0.1.27/src/lib.rs --crate-name regex --crate-type lib -C opt-level=3 --cfg feature="pattern" -C metadata=792c67aed9f650b7 -C extra-filename=-792c67aed9f650b7 --out-dir /Users/jason.oconal/code/exa/target/release/deps --emit=dep-info,link -L dependency=/Users/jason.oconal/code/exa/target/release/deps -L dependency=/Users/jason.oconal/code/exa/target/release/deps -Awarnings`
Compiling matches v0.1.2
Running `rustc /Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/matches-0.1.2/lib.rs --crate-name matches --crate-type lib -C opt-level=3 -C metadata=68db25b520030534 -C extra-filename=-68db25b520030534 --out-dir /Users/jason.oconal/code/exa/target/release/deps --emit=dep-info,link -L dependency=/Users/jason.oconal/code/exa/target/release/deps -L dependency=/Users/jason.oconal/code/exa/target/release/deps -Awarnings`
Compiling rustc-serialize v0.3.12
Running `rustc /Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.12/src/lib.rs --crate-name rustc_serialize --crate-type lib -C opt-level=3 -C metadata=70d93d5334da1e4e -C extra-filename=-70d93d5334da1e4e --out-dir /Users/jason.oconal/code/exa/target/release/deps --emit=dep-info,link -L dependency=/Users/jason.oconal/code/exa/target/release/deps -L dependency=/Users/jason.oconal/code/exa/target/release/deps -Awarnings`
Compiling pad v0.1.3
Running `rustc /Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/pad-0.1.3/src/lib.rs --crate-name pad --crate-type lib -C opt-level=3 -C metadata=548f040d9866039b -C extra-filename=-548f040d9866039b --out-dir /Users/jason.oconal/code/exa/target/release/deps --emit=dep-info,link -L dependency=/Users/jason.oconal/code/exa/target/release/deps -L dependency=/Users/jason.oconal/code/exa/target/release/deps -Awarnings`
Compiling libc v0.1.6
Running `rustc /Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.1.6/rust/src/liblibc/lib.rs --crate-name libc --crate-type lib -C opt-level=3 --cfg feature="default" --cfg feature="cargo-build" -C metadata=9b7976990ae0dbd4 -C extra-filename=-9b7976990ae0dbd4 --out-dir /Users/jason.oconal/code/exa/target/release/deps --emit=dep-info,link -L dependency=/Users/jason.oconal/code/exa/target/release/deps -L dependency=/Users/jason.oconal/code/exa/target/release/deps -Awarnings`
Compiling natord v1.0.8
Running `rustc /Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/natord-1.0.8/lib.rs --crate-name natord --crate-type lib -C opt-level=3 -C metadata=03a0e75cb3de3267 -C extra-filename=-03a0e75cb3de3267 --out-dir /Users/jason.oconal/code/exa/target/release/deps --emit=dep-info,link -L dependency=/Users/jason.oconal/code/exa/target/release/deps -L dependency=/Users/jason.oconal/code/exa/target/release/deps -Awarnings`
Compiling bitflags v0.1.1
Running `rustc /Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/bitflags-0.1.1/src/lib.rs --crate-name bitflags --crate-type lib -C opt-level=3 -C metadata=518ea12e21428edd -C extra-filename=-518ea12e21428edd --out-dir /Users/jason.oconal/code/exa/target/release/deps --emit=dep-info,link -L dependency=/Users/jason.oconal/code/exa/target/release/deps -L dependency=/Users/jason.oconal/code/exa/target/release/deps -Awarnings`
Compiling number_prefix v0.2.3
Running `rustc /Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/number_prefix-0.2.3/src/lib.rs --crate-name number_prefix --crate-type lib -C opt-level=3 -C metadata=48981b1280686d7e -C extra-filename=-48981b1280686d7e --out-dir /Users/jason.oconal/code/exa/target/release/deps --emit=dep-info,link -L dependency=/Users/jason.oconal/code/exa/target/release/deps -L dependency=/Users/jason.oconal/code/exa/target/release/deps -Awarnings`
/Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/number_prefix-0.2.3/src/lib.rs:92:5: 92:20 error: unresolved import `std::num::Float`. There is no `Float` in `std::num`
/Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/number_prefix-0.2.3/src/lib.rs:92 use std::num::Float;
^~~~~~~~~~~~~~~
error: aborting due to previous error
/Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/natord-1.0.8/lib.rs:88:34: 97:26 note: shadowed label `'digits` declared here
/Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/natord-1.0.8/lib.rs:88 'digits: loop {
/Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/natord-1.0.8/lib.rs:89 read_left!();
/Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/natord-1.0.8/lib.rs:90 read_right!();
/Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/natord-1.0.8/lib.rs:91 match (ll, rr) {
/Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/natord-1.0.8/lib.rs:92 (Some(ll_), Some(rr_)) => return_unless_equal!(ll_.cmp(&rr_)),
/Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/natord-1.0.8/lib.rs:93 (Some(_), None) => return Greater,
...
Compiling gcc v0.3.4
Running `rustc /Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.4/src/lib.rs --crate-name gcc --crate-type lib -C opt-level=3 -C metadata=dcfc3982b26642f7 -C extra-filename=-dcfc3982b26642f7 --out-dir /Users/jason.oconal/code/exa/target/release/deps --emit=dep-info,link -L dependency=/Users/jason.oconal/code/exa/target/release/deps -L dependency=/Users/jason.oconal/code/exa/target/release/deps -Awarnings`
/Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.12/src/json.rs:244:16: 244:21 error: unresolved import `std::num::Float`. There is no `Float` in `std::num`
/Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.12/src/json.rs:244 use std::num::{Float, Int};
^~~~~
/Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.12/src/json.rs:244:23: 244:26 error: unresolved import `std::num::Int`. There is no `Int` in `std::num`
/Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.12/src/json.rs:244 use std::num::{Float, Int};
^~~
/Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.12/src/serialize.rs:18:16: 18:23 error: unresolved import `std::ffi::AsOsStr`. There is no `AsOsStr` in `std::ffi`
/Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.12/src/serialize.rs:18 use std::ffi::{AsOsStr, OsString};
^~~~~~~
error: aborting due to 3 previous errors
Compiling ansi_term v0.5.1
Running `rustc /Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/ansi_term-0.5.1/src/ansi_term.rs --crate-name ansi_term --crate-type lib -C opt-level=3 -C metadata=2362f75d20657324 -C extra-filename=-2362f75d20657324 --out-dir /Users/jason.oconal/code/exa/target/release/deps --emit=dep-info,link -L dependency=/Users/jason.oconal/code/exa/target/release/deps -L dependency=/Users/jason.oconal/code/exa/target/release/deps -Awarnings`
/Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/pad-0.1.3/src/lib.rs:5:4: 5:12 error: stability attributes may not be used outside of the standard library
/Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/pad-0.1.3/src/lib.rs:5 #![unstable]
^~~~~~~~
error: aborting due to previous error
Compiling pkg-config v0.3.3
Running `rustc /Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/pkg-config-0.3.3/src/lib.rs --crate-name pkg_config --crate-type lib -C opt-level=3 -C metadata=c0e9294bfeefddd9 -C extra-filename=-c0e9294bfeefddd9 --out-dir /Users/jason.oconal/code/exa/target/release/deps --emit=dep-info,link -L dependency=/Users/jason.oconal/code/exa/target/release/deps -L dependency=/Users/jason.oconal/code/exa/target/release/deps -Awarnings`
Compiling locale v0.1.7
Running `rustc /Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/locale-0.1.7/src/lib.rs --crate-name locale --crate-type lib -C opt-level=3 -C metadata=d77ca3fc1f74437e -C extra-filename=-d77ca3fc1f74437e --out-dir /Users/jason.oconal/code/exa/target/release/deps --emit=dep-info,link -L dependency=/Users/jason.oconal/code/exa/target/release/deps -L dependency=/Users/jason.oconal/code/exa/target/release/deps -Awarnings`
Build failed, waiting for other jobs to finish...
/Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/locale-0.1.7/src/lib.rs:22:16: 22:19 error: unresolved import `std::num::Int`. There is no `Int` in `std::num`
/Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/locale-0.1.7/src/lib.rs:22 use std::num::{Int, Float};
^~~
/Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/locale-0.1.7/src/lib.rs:22:21: 22:26 error: unresolved import `std::num::Float`. There is no `Float` in `std::num`
/Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/locale-0.1.7/src/lib.rs:22 use std::num::{Int, Float};
^~~~~
error: aborting due to 2 previous errors
Could not compile `number_prefix`.
Caused by:
Process didn't exit successfully: `rustc /Users/jason.oconal/.cargo/registry/src/github.com-1ecc6299db9ec823/number_prefix-0.2.3/src/lib.rs --crate-name number_prefix --crate-type lib -C opt-level=3 -C metadata=48981b1280686d7e -C extra-filename=-48981b1280686d7e --out-dir /Users/jason.oconal/code/exa/target/release/deps --emit=dep-info,link -L dependency=/Users/jason.oconal/code/exa/target/release/deps -L dependency=/Users/jason.oconal/code/exa/target/release/deps -Awarnings` (exit code: 101)
make: *** [target/release/exa] Error 101
Hi! Exa is great. Thanks for sharing it with us.
Have you considered splitting off your grid formatting logic into a library? It seems to work really well and could be of use to other projects!
See this pull request to k
for an example: supercrabtree/k#35
This seems to enhance usability; it's easy to spot the largest or most recent files at a glance, for example. Should also be easy to implement.
When building exa with --no-default-features
and running exa with --long
it panics.
rustc 1.0.0-nightly (123a754cb 2015-03-24) (built 2015-03-25)
$ exa --long
thread '<main>' panicked at 'No option 'git' defined', <somepath>/getopts-0.2.5/src/lib.rs:700
$ rustc --version
rustc 1.3.0-nightly (16f64c388 2015-07-09)
$ git clone https://github.com/ogham/exa.git
$ cd exa
$ sudo make --install
cargo build --release
Compiling exa v0.3.0 (file:///home/alanb/src/git/hub/exa)
src/feature/xattr_linux.rs:4:5: 4:22 warning: unused import, #[warn(unused_imports)] on by default
src/feature/xattr_linux.rs:4 use std::ffi::CString;
^~~~~~~~~~~~~~~~~
error: linking with `cc` failed: exit code: 1
note: "cc" "-Wl,--as-needed" "-m64" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/alanb/src/git/hub/exa/target/release/exa.0.o" "-o" "/home/alanb/src/git/hub/exa/target/release/exa" "-Wl,--whole-archive" "-l" "morestack" "-Wl,--no-whole-archive" "-Wl,--gc-sections" "-pie" "-Wl,-O1" "-nodefaultlibs" "-Wl,--whole-archive" "/tmp/rustc.O8V1ruSOlYpv/liblibgit2_sys-ee62f8ed694e2d9b.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.O8V1ruSOlYpv/liblibssh2_sys-197403f26ef746c2.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.O8V1ruSOlYpv/libopenssl_sys-f1940735b7e345d7.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.O8V1ruSOlYpv/libstd-74fa456f.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustc.O8V1ruSOlYpv/liballoc-74fa456f.rlib" "-Wl,--no-whole-archive" "-L" "/home/alanb/src/git/hub/exa/target/release" "-L" "/home/alanb/src/git/hub/exa/target/release/deps" "-L" "/home/alanb/src/git/hub/exa/target/release/build/libgit2-sys-ee62f8ed694e2d9b/out/lib" "-L" "/home/alanb/src/git/hub/exa/target/release/build/libssh2-sys-197403f26ef746c2/out/lib" "-L" "/usr/lib/x86_64-linux-gnu" "-L" "/home/alanb/src/git/hub/exa/target/release/build/libssh2-sys-197403f26ef746c2/out/lib" "-L" "/usr/lib/x86_64-linux-gnu" "-L" "/usr/lib/x86_64-linux-gnu" "-L" "/home/alanb/src/git/hub/exa/target/release/build/openssl-sys-f1940735b7e345d7/out" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "/home/alanb/src/git/hub/exa/.rust/lib/x86_64-unknown-linux-gnu" "-L" "/home/alanb/src/git/hub/exa/lib/x86_64-unknown-linux-gnu" "-Wl,-Bstatic" "-Wl,-Bdynamic" "-l" "rt" "-l" "ssl" "-l" "crypto" "-l" "dl" "-l" "z" "-l" "z" "-l" "ssl" "-l" "crypto" "-l" "c" "-l" "m" "-l" "dl" "-l" "pthread" "-l" "rt" "-l" "gcc_s" "-l" "pthread" "-l" "c" "-l" "m" "-l" "compiler-rt"
note: /tmp/rustc.O8V1ruSOlYpv/liblibssh2_sys-197403f26ef746c2.rlib(lldb-fix-r-ssh2-channel.o): In function `_libssh2_channel_nextid':
channel.c:(.text._libssh2_channel_nextid+0x0): multiple definition of `_libssh2_channel_nextid'
#
# many more warnings of multiple definitions
#
error: aborting due to previous error
Could not compile `exa`.
To learn more, run the command again with --verbose.
make: *** [target/release/exa] Error 101
$ sudo make install --verbose
make: unrecognized option '--verbose'
Usage: make [options] [target] ...
ruipacheco @ traitor in ~/Projects/Assorted/exa
$ target/release/exa -lhart ~/Projects/xxx/yyy/
Unrecognized option: '--time /Users/ruipacheco/Projects/xxx/yyy/'.
command failed with status: 3
I'm using the fish shell, if that matters.
ls
has the --group-directories-first
option which prints the directories first (sorted by name) and files after:
$ ls -1 --group-directories-first
src
target
Cargo.lock
Cargo.toml
LICENCE
README.md
screenshot.png
vs.
$ exa -1
Cargo.lock
Cargo.toml
LICENCE
README.md
screenshot.png
src
target
Could something like this be added to exa
? It would probably have to be a separate switch (since you can only have a single sort, but putting directories first is orthogonal to e.g. sorting by an extension).
For me, exa takes ~3 seconds to run on the rust repository and most of this time is spent in libgit2's git_status_list_new function (specifically, it appears that most of this time is spent calculating SHA1 hashes). However, git status --porcelain
runs in about .1 seconds. The correct fix would be to fix libgit2 however, in the meantime, you might consider using git
directly.
Note git2::Repository::statuses(opts)
is a wrapper for libgit2's git_status_list_new
function.
Currently, for example, set_a_foreground
is always an ASCI sequence appropriate for xterm-color
, even if my terminfo entry has a different one.
To verify:
# Create a terminal info copy.
infocmp -L xterm-256color > my-term.ti
# Change its name and color attribute.
sed -i.bak 's/xterm-256color|xterm with 256 colors/my-term|My Terminal/' my-term.ti
sed -i.bak -E 's/([[:space:]]+set_a_foreground=).*/\1smth/' my-term.ti
# Compile it
tic my-term.ti
# Set the current terminal emulator to use the newly compiled terminfo.
export TERM=my-term
exa
It must print smth
instead of colors. If you replace exa
in the last command with, say, vim
, you'll see the difference. I'd recommend you to take a look at the tput
command.
thread '<main>' panicked at 'called
Option::unwrap()on a
Nonevalue', /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/libcore/option.rs:362
Using version 0.3.0 (from AUR), calling exa on something that is no longer there (such as an external harddrive that has lost power), results in
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os(5) }', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcore/result.rs:731
whereas ls gives the error
ls: reading directory /storage: Input/output error
I wrote an Arch Linux PKGBUILD for exa. Is that something you're interested in having somewhere in the source repository? I can upload it to the AUR when it's tested a bit more.
I am unable to install:
Fresh pkg-config v0.3.4
Fresh unicode-width v0.1.1
Fresh rustc-serialize v0.3.14
Fresh matches v0.1.2
Fresh bitflags v0.1.1
Fresh gcc v0.3.6
Fresh regex-syntax v0.1.2
Fresh libc v0.1.8
Fresh ansi_term v0.5.2
Fresh natord v1.0.8
Fresh pad v0.1.4
Fresh url v0.2.35
Fresh regex v0.1.33
Fresh log v0.3.1
Fresh users v0.4.1
Fresh rand v0.3.8
Fresh num_cpus v0.2.6
Fresh regex_macros v0.1.19
Fresh getopts v0.2.11
Fresh num v0.1.25
Fresh libz-sys v0.1.3
Fresh openssl-sys v0.6.2
Fresh locale v0.1.8
Fresh number_prefix v0.2.4
Fresh libssh2-sys v0.1.25
Fresh datetime v0.1.7
Fresh libgit2-sys v0.2.14 (https://github.com/alexcrichton/git2-rs.git#f63542fb)
Compiling exa v0.2.0 (file:///Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa)
Running `rustc src/main.rs --crate-name exa --crate-type bin -g --cfg feature="default" --cfg feature="git2" --cfg feature="git" --out-dir /Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug --emit=dep-info,link -L dependency=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug -L dependency=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps --extern bitflags=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libbitflags-518ea12e21428edd.rlib --extern pad=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libpad-f7ff424b0c22c000.rlib --extern ansi_term=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libansi_term-2be4de112eba155d.rlib --extern users=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libusers-0d78404a03744620.rlib --extern number_prefix=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libnumber_prefix-a016a95baeb20bf4.rlib --extern locale=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/liblocale-45cfe4875a9cd89b.rlib --extern datetime=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libdatetime-82fac66cae2e6577.rlib --extern num_cpus=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libnum_cpus-d64cdaf0c78cf4e8.rlib --extern natord=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libnatord-03a0e75cb3de3267.rlib --extern libc=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/liblibc-2eda841eb12a3090.rlib --extern git2=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libgit2-72109471fa78f4ae.rlib --extern unicode_width=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libunicode_width-468c348f27a79727.rlib --extern getopts=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libgetopts-d6ecf60df5ea72e6.rlib -L native=/Library/Frameworks -L native=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/build/libgit2-sys-d4081217cfcd5e19/out/lib -L native=/usr/local/Cellar/libssh2/1.5.0/lib -L native=/usr/lib -L native=/usr/local/Cellar/libssh2/1.5.0/lib -L native=/usr/lib -L native=/usr/lib -L native=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/build/openssl-sys-5040130ff99796a0/out`
Fresh git2 v0.2.11 (https://github.com/alexcrichton/git2-rs.git#f63542fb)
error: linking with `cc` failed: exit code: 1
note: "cc" "-m64" "-L" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/exa.o" "-o" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/exa" "-Wl,-force_load,/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libmorestack.a" "-Wl,-dead_strip" "-nodefaultlibs" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libansi_term-2be4de112eba155d.rlib" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libnum_cpus-d64cdaf0c78cf4e8.rlib" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libdatetime-82fac66cae2e6577.rlib" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libregex-bee3bd02b59b955b.rlib" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libregex_syntax-8db057a1d27b1529.rlib" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libnumber_prefix-a016a95baeb20bf4.rlib" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/liblocale-45cfe4875a9cd89b.rlib" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libnum-f51f78acffae6108.rlib" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/librand-b924d9fc5b3eb5b8.rlib" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libgetopts-d6ecf60df5ea72e6.rlib" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libusers-0d78404a03744620.rlib" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libgit2-72109471fa78f4ae.rlib" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/liburl-a4f53e129e04fc84.rlib" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libbitflags-518ea12e21428edd.rlib" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/librustc_serialize-9ef26f158d5284e0.rlib" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libmatches-68db25b520030534.rlib" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libpad-f7ff424b0c22c000.rlib" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/liblibgit2_sys-d4081217cfcd5e19.rlib" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/liblibssh2_sys-4edc1b7b6d8a6bc4.rlib" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libopenssl_sys-5040130ff99796a0.rlib" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/liblibz_sys-c145b8b5c75fd5a3.rlib" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/liblibc-2eda841eb12a3090.rlib" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libunicode_width-468c348f27a79727.rlib" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libnatord-03a0e75cb3de3267.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libstd-11582ce5.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libcollections-11582ce5.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/librustc_unicode-11582ce5.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/librand-11582ce5.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liballoc-11582ce5.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liblibc-11582ce5.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libcore-11582ce5.rlib" "-L" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug" "-L" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps" "-L" "/Library/Frameworks" "-L" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/build/libgit2-sys-d4081217cfcd5e19/out/lib" "-L" "/usr/local/Cellar/libssh2/1.5.0/lib" "-L" "/usr/lib" "-L" "/usr/local/Cellar/libssh2/1.5.0/lib" "-L" "/usr/lib" "-L" "/usr/lib" "-L" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/build/openssl-sys-5040130ff99796a0/out" "-L" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib" "-L" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/.rust/lib/x86_64-apple-darwin" "-L" "/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/lib/x86_64-apple-darwin" "-l" "z" "-l" "iconv" "-l" "ssh2" "-l" "ssl" "-l" "crypto" "-l" "z" "-l" "crypto" "-l" "z" "-l" "ssh2" "-l" "ssl" "-l" "crypto" "-l" "z" "-l" "z" "-l" "c" "-l" "m" "-l" "System" "-l" "pthread" "-l" "c" "-l" "m" "-l" "compiler-rt"
note: ld: warning: directory not found for option '-L/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/.rust/lib/x86_64-apple-darwin'
ld: warning: directory not found for option '-L/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/lib/x86_64-apple-darwin'
Undefined symbols for architecture x86_64:
"_libiconv", referenced from:
_git_path_iconv in liblibgit2_sys-d4081217cfcd5e19.rlib(r-git2-path.c.o)
"_libiconv_close", referenced from:
_git_path_iconv_clear in liblibgit2_sys-d4081217cfcd5e19.rlib(r-git2-path.c.o)
"_libiconv_open", referenced from:
_git_path_iconv_init_precompose in liblibgit2_sys-d4081217cfcd5e19.rlib(r-git2-path.c.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: aborting due to previous error
Could not compile `exa`.
Caused by:
Process didn't exit successfully: `rustc src/main.rs --crate-name exa --crate-type bin -g --cfg feature="default" --cfg feature="git2" --cfg feature="git" --out-dir /Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug --emit=dep-info,link -L dependency=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug -L dependency=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps --extern bitflags=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libbitflags-518ea12e21428edd.rlib --extern pad=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libpad-f7ff424b0c22c000.rlib --extern ansi_term=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libansi_term-2be4de112eba155d.rlib --extern users=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libusers-0d78404a03744620.rlib --extern number_prefix=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libnumber_prefix-a016a95baeb20bf4.rlib --extern locale=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/liblocale-45cfe4875a9cd89b.rlib --extern datetime=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libdatetime-82fac66cae2e6577.rlib --extern num_cpus=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libnum_cpus-d64cdaf0c78cf4e8.rlib --extern natord=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libnatord-03a0e75cb3de3267.rlib --extern libc=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/liblibc-2eda841eb12a3090.rlib --extern git2=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libgit2-72109471fa78f4ae.rlib --extern unicode_width=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libunicode_width-468c348f27a79727.rlib --extern getopts=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/deps/libgetopts-d6ecf60df5ea72e6.rlib -L native=/Library/Frameworks -L native=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/build/libgit2-sys-d4081217cfcd5e19/out/lib -L native=/usr/local/Cellar/libssh2/1.5.0/lib -L native=/usr/lib -L native=/usr/local/Cellar/libssh2/1.5.0/lib -L native=/usr/lib -L native=/usr/lib -L native=/Users/jpscharf/Dropbox/Documents/iNtergrated/Active/exa/target/debug/build/openssl-sys-5040130ff99796a0/out` (exit code: 101)
I can't speak to exactly why, as I'm not familiar with zsh internals, but -?
doesn't work as you get a
$ exa -?
zsh: no matches found: -?
Yet things such as -@
seem to work just fine. This isn't a huge issue, as --help
works just fine, but just FYI since I'm sure there are some other zsh users out there.
As mentioned in #28, exa ist rather slow in larger git repositories. I know there is the possibility to use Cargo's features
to compile without git support, but that is not what I want.
When using --long
, the Git columns is shown automatically. I think only enabling it with a --git
flag might be better.
Alternatively, I'd like to see an option to disable this column.
Perhaps even a brew formula?
If we have a modified file in a subdirectory (related to git root folder), the subdirectory is marked as modified, but the file is not. Please see the screenshot
https://www.dropbox.com/s/n2zmyacreuowb78/Screenshot%202015-02-22%2015.40.41.png?dl=0
You mentioned you don't have a Windows machine, I do, I tried to compile exa (without git, for now) and it looks as if a couple of types are not in std. or maybe they are, but the error message is hard to understand...
C:\Users\andy.cargo\registry\src\github.com-1ecc6299db9ec823\users-0.2.3\src\lib.rs:117:27: 117:32 error: unresolved import libc::uid_t
. There is no uid_t
in libc
C:\Users\andy.cargo\registry\src\github.com-1ecc6299db9ec823\users-0.2.3\src\lib.rs:117 use libc::{c_char, c_int, uid_t, gid_t, time_t};
^~~~~
C:\Users\andy.cargo\registry\src\github.com-1ecc6299db9ec823\users-0.2.3\src\lib.rs:117:34: 117:39 error: unresolved import libc::gid_t
. There is no gid_t
in libc
C:\Users\andy.cargo\registry\src\github.com-1ecc6299db9ec823\users-0.2.3\src\lib.rs:117 use libc::{c_char, c_int, uid_t, gid_t, time_t};
Moderator edit: Windows support is being worked on in #820
I've installed the prereq's with fink plus the nightly of rust but exa does not build for me:
--> cargo build --no-default-features
Compiling exa v0.1.0 (file:///Volumes/DroboM1/Projects/exa)
src/file.rs:454:62: 454:76 error: mismatched types:
expected `std::path::PathBuf`,
found `std::old_path::posix::Path`
(expected struct `std::path::PathBuf`,
found struct `std::old_path::posix::Path`) [E0308]
src/file.rs:454 Some(d) => d.git_status(¤t_dir().unwrap_or(Path::new(".")).join(&self.path),
^~~~~~~~~~~~~~
src/file.rs:454:37: 454:94 error: mismatched types:
expected `&std::old_path::posix::Path`,
found `&std::path::PathBuf`
(expected struct `std::old_path::posix::Path`,
found struct `std::path::PathBuf`) [E0308]
src/file.rs:454 Some(d) => d.git_status(¤t_dir().unwrap_or(Path::new(".")).join(&self.path),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to 2 previous errors
Could not compile `exa`.
To learn more, run the command again with --verbose.
exa is much nicer than ls and even ls++, but the use of "=>" confuses me on first sight. ls uses "->" to denote the destination of a symlink. So does rsync. And "=>" is used by rsync to denote hard links. So why doesn't exa take this convention?
You've been asking about how to calculate the columns.
First you'll have to calculate the the widths of strings which isn't easy when you have unicode file names: here
Then you'll have to get the width of the terminal: here (tested only on linux)
Then you'll have to calculate the actual widths of the columns the way GNU ls does it: here (this is very similar to the way GNU ls does it)
This code is from my own ls implementation which I'm too lazy to continue. If you want you can use it under the MIT license.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.