Commit Graph

25 Commits

Author SHA1 Message Date
Alexandru Macovei
64e6ea9fe9 [2018 edition] run cargo fix edition and edition-idioms 2019-01-07 12:52:30 +01:00
sharkdp
4b5efa3438 Use lscolors crate
Use my new [lscolors](https://github.com/sharkdp/lscolors) crate instead
of the internal `lscolors` module

- Speeds up `LS_COLORS` querying, leading to a nice 25% performance
  improvement when
- Adds support for 24-bit colors and background colors

closes #368
closes #363
2018-12-14 23:20:18 +01:00
Josh Leeb-du Toit
8543ca645d Split internals.rs into module and multiple files
This PR splits `internals.rs` into the `internal` module with multiple
files, and moves `FdOptions` into `opts.rs`.

The main motivation behind this is to move logic for constructing
`FdOptions` out of the main function and more readable and easier to
understand in the `opts` module. The goal will eventually to be able
to write `FdOptions::from(matches)` and have the options constructed.
2018-10-12 19:14:19 +02:00
Josh Leeb-du Toit
cb1cfa108b ErrorCode enum variants to be more descriptive 2018-10-03 16:06:18 +02:00
Josh Leeb-du Toit
8bdd8f8e8f Move exit code consts into enum
Previously, the constants defined in `src/exit_codes` weren't being
used, and the constants for exit codes were being redefined in the
`internals` module.

This PR removes the exit code consts and instead uses an enum defined in
`src/exit_codes`. This centralizes the definitions of exit codes making
them easier to modify and keep track of.
2018-10-03 16:06:18 +02:00
sharkdp
c1ef68662c Update for new rustfmt 2018-05-14 21:00:00 +02:00
sharkdp
6a9f16e159 Run latest version of rustfmt 2018-04-13 23:13:22 +02:00
sharkdp
f9a32583a5 Move is_executable to fshelper module 2018-03-25 19:48:09 +02:00
sharkdp
2cf8e7b8a5 Move is_executable to internal module 2018-03-25 18:37:50 +02:00
Pramod Bisht
b1e48efc4a Addresses #246
Some implementation to search by filetype `executables`
2018-03-25 16:53:12 +02:00
sharkdp
e5ee5eb7b3 Minor speedup for strip_prefix 2018-02-25 10:25:59 +01:00
sharkdp
39fb41f05a Move exit codes to 'internal' module 2018-01-03 10:00:22 +01:00
Dock
26ad7da347 Using wants_to_quit to exit the sender as well as the reciever (#211)
Closes #210
2018-01-03 09:26:11 +01:00
sharkdp
a5f5ad6254 Re-enable code style check 2018-01-01 16:00:32 +01:00
Dock
4d66c84109 Correct exit codes (#202)
* Changed exit code on ctrl-c to 130 to match specification
* Changed exit code when stdout errors. 1 for general error.
2017-12-18 06:53:34 -08:00
Dock
c0bfc65d88 Handle terminal signals (#128)
fixes #87
2017-11-22 23:05:09 +01:00
Antti Keränen
701b8f209b Relicense under MIT/Apache-2.0 2017-10-22 10:36:42 +02:00
Jose Narvaez
715b07599b RedoxOS support. 2017-10-20 12:59:36 +02:00
J.W
8d85debc12 Refactor path handling (fixes #113)
* Fix path check
* Fix full path matching
* Allow more simple driver names in Windows tests
* Factor out special is_dir() check for "." and ".."
2017-10-18 20:04:34 +02:00
J.W
e649c8fa79 Use a uniform output format for searching ../
closes #107, fixes #82 by the way
2017-10-15 15:01:24 +02:00
Matthias Reitinger
7150c9a3a9 Refactor output.rs 2017-10-14 11:11:06 +02:00
Matthias Reitinger
0b04f39398 Split up print_entry in colorized and uncolorized helper functions. 2017-10-14 11:11:06 +02:00
Matthias Reitinger
0677e6331d Fix too many path separators on Windows (#93). 2017-10-14 11:11:06 +02:00
Antti Keränen
049b9ec06b Format the source code using rustfmt 2017-10-12 19:33:14 +02:00
Garrett Squire
ccb899a511 break main into separate modules 2017-10-11 08:21:09 +02:00