- 02 5月, 2017 1 次提交
-
-
由 Benjamin Sago 提交于
Doing this meant that the escaping functionality got used in three places, so it was extracted into a generalised function in its own module. This is slighly slower for the case where escaped characters are displayed in the same colour as the displayable characters, which happens when listing a directory’s name when recursing. Optimise this, yeah?
-
- 01 4月, 2017 2 次提交
-
-
由 Laurent Arnoud 提交于
With `ls` from Debian coreutils 8.26-2 ``` ls /bad/path echo $? # => 2 ``` Reproduced same behaviour with exa Fix https://github.com/ogham/exa/issues/135
-
由 Daniel Lockyer 提交于
-
- 27 3月, 2017 1 次提交
-
-
由 Benjamin Sago 提交于
-
- 30 10月, 2016 4 次提交
-
-
由 Ben S 提交于
See #97 and recently #130 too. This allows the user to pass in options such as "--ignore '*.pyc'" to not list any files ending in '.pyc' in the output. It uses the Rust glob crate and currently does a simple split on pipe, without any escaping, so it’s not really *complete*, but is at least something.
-
由 Ben S 提交于
This has to be done for when ignore patterns get introduced and have to be stored in a Vec.
-
由 Ben S 提交于
-
由 Ben S 提交于
This changes the way that views are used to display the actual lists of files. It used to pass empty vectors to the view methods, which most of the time would not print anything because there are no files to list — except when there’s a header row which gets printed for no files. By not calling the view method at all when there’s nothing to print, exa won’t ever print extra things in the view unless it needs to for a file. This fixes #106 “Don’t print the header if the result set is empty”
-
- 31 7月, 2016 1 次提交
-
-
由 Gemmarx 提交于
-
- 19 4月, 2016 2 次提交
-
-
由 Benjamin Sago 提交于
This commit removes the 'main' function present in main.rs, renames it to exa.rs, and puts the 'main' function in its own binary. This, I think, makes it more clear how the program works and where the main entry point is. Librarification also means that we can start testing as a whole. Two tests have been added that test everything, passing in raw command-line arguments then comparing against the binary coloured text that gets produced. Casualties include having to specifically mark some code blocks in documentation as 'tests', as rustdoc kept on trying to execute my ANSI art.
-
由 Benjamin Sago 提交于
This will mean that we can test exa's output as a whole, without having to rely on process or IO or anything like that.
-
- 17 4月, 2016 2 次提交
-
-
由 Benjamin Sago 提交于
Currently these routines number two: file type checking based on a file's name, and source file checking, also based on the file's name.
-
由 Benjamin Sago 提交于
This commit moves file, dir, and the feature modules into one parent 'fs' module. Now there are three main 'areas' of the code: main and options, the filesystem-touching code, and the output-displaying code. It should be the case that nothing in 'output' touches 'std::fs'.
-
- 11 4月, 2016 1 次提交
-
-
由 Benjamin Sago 提交于
-
- 01 4月, 2016 1 次提交
-
-
由 Ben S 提交于
Thinking about it, it doesn't make sense to use an *external* time zone source when the program we want to compare it to, ls, uses the system one. So just use the system one. Also, handle the case where the time zone data file can't be loaded by showing the files in UTC rather than falling over and quitting.
-
- 11 2月, 2016 1 次提交
-
-
由 Ben S 提交于
-
- 10 2月, 2016 1 次提交
-
-
由 Ben S 提交于
- Users v0.5.1, which renames OSUsers to UsersCache - Locale v0.2, which returns to libc v0.1 - Datetime v0.4.2, which mimics the locale update, and puts timezone definitions in: - Zoneinfo-data, which is needed to obtain the current timezone
-
- 20 12月, 2015 1 次提交
-
-
由 Benjamin Sago 提交于
This commit moves the colours module to be a sub-module of the output one. This makes sense because finding which colour a certain file should be is only done during output, and (I think) the only places that the `Colours` struct's fields are ever queried is from the output module. The only casualty was that the `file_colour` from the filetype module had to be moved, as determining colours is no longer part of that module - only determining filetype is. So it now reflects its name!
-
- 17 12月, 2015 1 次提交
-
-
由 Benjamin Sago 提交于
A recent change to ansi-term [1] means that `ANSIString`s can now hold either owned *or* borrowed data (Rust calls this the Cow type). This means that we can delay formatting ANSIStrings into ANSI-control-code-formatted strings until it's absolutely necessary. The process for doing this was: 1. Replace the `Cell` type with a `TextCell` type that holds a vector of `ANSIString` values instead of a formatted string. It still does the width tracking. 2. Rework the details module's `render` functions to emit values of this type. 3. Similarly, rework the functions that produce cells containing filenames to use a `File` value's `name` field, which is an owned `String` that can now be re-used. 4. Update the printing, formatting, and width-calculating code in the details and grid-details views to produce a table by adding vectors together instead of adding strings together, delaying the formatting as long as it can. This results in fewer allocations (as fewer `String` values are produced), and makes the API tidier (as fewer `String` values are being passed around without having their contents specified). This also paves the way to Windows support, or at least support for non-ANSI terminals: by delaying the time until strings are formatted, it'll now be easier to change *how* they are formatted. Casualties include: - Bump to ansi_term v0.7.1, which impls `PartialEq` and `Debug` on `ANSIString`. - The grid_details and lines views now need to take a vector of files, rather than a borrowed slice, so the filename cells produced now own the filename strings that get taken from files. - Fixed the signature of `File#link_target` to specify that the file produced refers to the same directory, rather than some phantom directory with the same lifetime as the file. (This was wrong from the start, but it broke nothing until now) References: [1]: ansi-term@f6a6579ba8174de1cae64d181ec04af32ba2a4f0
-
- 16 11月, 2015 1 次提交
-
-
由 Ben S 提交于
One of those two date formats was re-compiled before any date was displayed. Now they are compiled only the first time they're used, and cached versions are used thereafter, resulting in a speedup.
-
- 15 11月, 2015 2 次提交
-
-
由 Ben S 提交于
By taking the file names as a mutable vector, we can avoid having to allocate a new one when it’s empty. The recent changes to Options::getopts have made it more obvious that we could move the same vector out of getopts’s matches, instead of cloning it there.
-
由 Ben S 提交于
This cleans up the options module, moving the structs that were *only* in use for the columns view out of it. The new OptionSet trait is used to add the ‘deduce’ methods that used to be present on the values.
-
- 04 11月, 2015 3 次提交
-
-
由 Florian Gilcher 提交于
-
由 Florian Gilcher 提交于
-
由 Florian Gilcher 提交于
-
- 03 11月, 2015 1 次提交
-
-
由 Ben S 提交于
As of rustc 1.6.0-nightly (1a2eaffb6 2015-10-31), anyway.
-
- 06 9月, 2015 1 次提交
-
-
由 Benjamin Sago 提交于
This fixes a bug where an extra header line was printed when in --long --grid mode.
-
- 04 9月, 2015 3 次提交
- 03 9月, 2015 2 次提交
-
-
由 Ben S 提交于
-
由 Ben S 提交于
This commit removes the threadpool in `main.rs` that stats each command-line argument separately, and replaces it with a *scoped* threadpool in `options/details.rs` that builds the table in parallel! Running this on my machine halves the execution time when tree-ing my entire home directory (which isn't exactly a common occurrence, but it's the only way to give exa a large running time) The statting will be added back in parallel at a later stage. This was facilitated by the previous changes to recursion that made it easier to deal with. There's a lot of large sweeping architectural changes. Here's a smattering of them: - In `main.rs`, the files are now passed around as vectors of files rather than array slices of files. This is because `File`s aren't `Clone`, and the `Vec` is necessary to give away ownership of the files at the appropriate point. - In the details view, files are now sorted *all* the time, rather than obeying the command-line order. As they're run in parallel, they have no guaranteed order anyway, so we *have* to sort them again. (I'm not sure if this should be the intended behaviour or not!) This means that the `Details` struct has to have the filter *all* the time, not only while recursing, so it's been moved out of the `recurse` field. - We use `scoped_threadpool` over `threadpool`, a recent addition. It's only safely used on Nightly, which we're using anyway, so that's OK! - Removed a bunch of out-of-date comments. This also fixes #77, mainly by accident :)
-
- 26 8月, 2015 1 次提交
-
-
由 Ben S 提交于
This does a similar thing that we did with the xattrs, except with the nested files: it removes the 'this' field on File, and replaces it with a method (to_dir) that has the same effect. This means we get to remove a bunch of 'recurse' fields and parameters that really had no business being there! Now the table doesn't need to know whether it's going to need to list files recursively or not.
-
- 25 8月, 2015 2 次提交
-
-
由 Ben S 提交于
When tree mode is active, this will print out errors as another form of child node in the tree, instead of in one big block before any output. The 'this' field now holds the io::Result of the readdir call, rather than only a *successful* result.
-
由 Ben S 提交于
This is part of work to make the flow of files more iterator-able, rather than going in and out of vectors. Here, a Dir returns an iterator of files, rather than a pre-filled vector. For now, this removes the ability for error messages to be displayed. Will be added in later though!
-
- 04 8月, 2015 1 次提交
-
-
由 Ben S 提交于
This is very slow (see #28) at the moment, so there's an option to switch off repo discovery. However, they were still always being queried. Now, if there's no Git option in the flags, it won't try to discover a repo.
-
- 02 8月, 2015 1 次提交
-
-
由 Ben S 提交于
These replace `init()` and `tail()` which are deprecated in favour of these. In fact, it's a good thing they're deprecated, because part of the path_prefix code involved working around a call to init() that would panic otherwise - doing the same check with an `Option` is much more ergonomic.
-
- 28 6月, 2015 1 次提交
-
-
由 Ben S 提交于
This commit adds --grid, which, when used with --long, will split the details into multiple columns. Currently this is just 2 columns, but in the future it will be based on the width of the terminal. In order to do this, I had to do two things: 1. Add a `links` parameter to the filename function, which disables the printing of the arrow and link target in the details view. When this is active, the columns get way too large, and it becomes not worth it. 2. Change the `print_table` function from actually printing the table to stdout to returning a list of `Cells` based on the table. This list then gets its width measured to calculate the width of the resulting table.
-
- 23 6月, 2015 1 次提交
-
-
由 Ben S 提交于
Fixes #39!
-
- 21 6月, 2015 1 次提交
-
-
由 Ben S 提交于
-