Comments (6)
My idea would be to add a boolean parameter to the colorize function to control whether the background is highlighted or not. Is this acceptable, in your opinion?
from lsd.
I'm not a big fan of this kind of argument... What do you think of creating an Elem::SetuidFile
and a FileType::SetuidFile
like the Filetype::ExecutableFile
and Elem::ExecutableFile
. This will allows us to create a custom colors with a background.
What do you think of it?
from lsd.
That actually makes much more sense. I initially misunderstood how the Elem
enum works.
from lsd.
Another way to do it would be to make the File
variants of the Elem
and FileType
enums parametric:
enum Elem {
[…]
File {
uid: bool,
exec: bool
},
[…]
}
By adding SetuidFile
variants, we can replicate the behaviour of gnu ls, i.e. background red if suid, otherwise foreground green if executable, otherwise foreground white. But we cannot do a combination of foreground and background color because the file can only be a SetuidFile
or an ExecutableFile
.
from lsd.
Seems a great idea indeed. I think you can do the same thing with the directories.
from lsd.
Ok, then I’ll do it this way :)
from lsd.
Related Issues (20)
- Add support for sorting with the file metadata change time (ctime) HOT 1
- [Bug]: lsd -la takes a long time HOT 1
- Hardlink count not working on Windows 11
- Icons disappear in Tmux in Putty HOT 3
- How to dynamically configure color scheme? HOT 2
- color of symbolic link and color + icon of link target HOT 1
- Documentation is inaccurate HOT 1
- [Bug]: lsd-v1.1.0-aarch64-unknown-linux-musl reports 1.0.0 as version HOT 3
- File list is totally vertical if the list doesn't fit into one line unless run with `-a` HOT 10
- trucate user / group name before '\'
- new versions not available with cargo HOT 2
- should we hide the user/group block when permission set to attribute in windows HOT 3
- alacritty no show icon HOT 1
- fails to build with `--locked` HOT 3
- [Bug]: error: The argument '--xxx' was provided more than once, but cannot be used multiple times
- New permission option: `both` HOT 1
- Track: Create a versioned site for lsd for both docs and theme
- mklink issue on windows HOT 1
- Help on how to generate completions!! Documentation insufficient HOT 1
- [Feature]: Ability to negate boolean options on the command-line
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lsd.