- 27 6月, 2017 3 次提交
-
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
-
- 26 6月, 2017 3 次提交
-
-
由 Benjamin Sago 提交于
If a function returns one of several enum variants, but we’re only interested in one, then just return its contents and have it apply the Mode “wrapper” later.
-
由 Benjamin Sago 提交于
These two fields were originally needed to determine how to recurse when using tree view. However, as there was no distinction between the “options parsed from the command-line” Details and the “values needed to render a table” Details, these had to be threaded through the options parser as a special-case to end up in the right struct. No more! Because there are separate structs for options and rendering, we can just add them in later.
-
由 Benjamin Sago 提交于
Instead of having render methods on the types that are now called Options, create new Render structs (one per view) and execute them. This means that it’s easier to extract methods from them — some of them are pretty long. Also, remove the GridDetails struct, which got consumed by Mode (mostly) By introducing another indirection between the structs that command-line options get parsed into and the structs that get rendered, it should be easier to refactor that horrible function in view.rs.
-
- 25 6月, 2017 7 次提交
-
-
由 Benjamin Sago 提交于
Now that colours don’t depend on a previously-calculated “should we be using colours” boolean anymore, their entire deduce function can be done separately to the mode’s one.
-
由 Benjamin Sago 提交于
exa assumed that the COLUMNS environment variable being present always meant that the output was to a terminal, so it should use colours. But because this variable can be overridden, colours were being incorrectly set! The ‘fix’ is to stop trying to be clever while only calculating the terminal width once, and instead just stick it in a lazy_static so it’s usable everywhere.
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
This makes the code messier, but it’s just a stepping-stone until colours gets separated too.
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
All four view types — lines, grid, details, and grid-details — held their own colours and classify flags. This didn’t make any sense for the grid-details view, which had to pick which one to use: the values were in there twice. It also gave the Table in the details view access to more information than it really should have had. Now, those two flags are returned separately from the view “mode”, which is the new term for one of those four things.
-
- 24 6月, 2017 11 次提交
-
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
-
- 16 6月, 2017 1 次提交
-
-
由 Benjamin Sago 提交于
Update dependencies
-
- 11 6月, 2017 1 次提交
-
-
由 Alexandre Bury 提交于
-
- 30 5月, 2017 5 次提交
-
-
由 Benjamin Sago 提交于
This adds support for the setuid, setgid, and sticky bits like how ls does it: by replacing the user/group/execute bits with different flags depending on their presence. At least we do it with flair, and by flair, I mean purple. Fixes #142
-
由 Benjamin Sago 提交于
Finally, re-do the permissions extended tests to include the setuid, setgid, and sticky bits, and rename the last two existing ones to match the others (files with the same names as their permissions).
-
由 Benjamin Sago 提交于
Unlike the others, setuid/setgid/sticky get merged with user/group/other execute in the rendered Permissions cell. So there had to be a bit of code change done to make sure that none of the bits clashed.
-
由 Benjamin Sago 提交于
The problem here was that we were using `metadata.permissions().mode()`, which is capped at 0o777, rather than `metadata.mode()`, which exposes every bit. With this change, we can access the higher-order permission bits, and put them in the Permissions struct.
-
由 Benjamin Sago 提交于
-
- 22 5月, 2017 5 次提交
-
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
-
- 21 5月, 2017 4 次提交
-
-
由 Benjamin Sago 提交于
…for its own module.
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
On the plus side, this removes some imports from details, and makes the file shorter. On the minus side, the ‘render timestamp’ function has a hell of a signature.
-