Skip to content

Commit

Permalink
Merge branch 'master' into versionsort
Browse files Browse the repository at this point in the history
  • Loading branch information
juansc committed Jul 4, 2023
2 parents c7b0d85 + 71156b8 commit 61a4cef
Show file tree
Hide file tree
Showing 33 changed files with 1,461 additions and 124 deletions.
91 changes: 91 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Bug Report Form
description: Create a report to help us improve, by the new GitHub form
title: "[Bug]: "
labels: ["bug"]
assignees:
- zwpaper
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: checkboxes
id: latest-version
attributes:
label: Version
description: Please make sure you can reproduce in the [latest release](https://github.com/lsd-rs/lsd/releases/latest)
options:
- label: latest
required: true
- type: textarea
id: version
attributes:
label: version
description: "`lsd --version` output"
placeholder: lsd --version
validations:
required: true
- type: dropdown
id: os
attributes:
label: What OS are you seeing the problem on?
multiple: true
options:
- Windows
- Linux
- macOS
- Others
- type: textarea
id: installation
attributes:
label: installation
description: "how do you install lsd?"
placeholder: "how do you install lsd?"
validations:
required: true
- type: textarea
id: term
attributes:
label: term
description: "`echo $TERM` output"
placeholder: echo $TERM
validations:
required: false
- type: textarea
id: ls-colors
attributes:
label: ls-colors
description: "`echo $LS_COLORS` output"
placeholder: echo $LS_COLORS
validations:
required: false
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Tell us what happen?
placeholder: |
If applicable, add the output of the classic ls command (`\ls -la`) in order to show the buggy file/directory.
render: markdown
validations:
required: true
- type: textarea
id: what-expected
attributes:
label: What expected?
description: What did you expect to happen?
placeholder: |
If the application panics run the command with the trace (`RUST_BACKTRACE=1 lsd ...`).
In case of graphical errors, add a screenshot if possible."
render: markdown
validations:
required: true
- type: textarea
id: others
attributes:
label: What else?
description: Is there anything else you want to tell us?
placeholder: "Others"
render: markdown
validations:
required: false
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]
### Added
- Add complete color theming support for Git [k4yt3x](https://github.com/k4yt3x]
- Add [Git integration](https://github.com/Peltoche/lsd/issues/7) from [hpwxf](https://github.com/hpwxf)
- In keeping with the coreutils change, add quotes and escapes for necessary filenames from [merelymyself](https://github.com/merelymyself)
- Add support for icon theme from [zwpaper](https://github.com/zwpaper)
- Add icon for kt and kts from [LeeWeeder](https://github.com/LeeWeeder)
- Add `--system-protected` to include files with the Windows `system` flag set,
on other platform the same as `--all` [#752](https://github.com/Peltoche/lsd/issues/752)
- Add many icons from https://github.com/Peltoche/lsd/issues/764 [@TruncatedDinosour](https://ari-web.xyz/gh)
- Add support for localization from [scarf](https://github.com/scarf005)
- Add icons for cjs, cts and mts from [Han Yeong-woo](https://github.com/nix6839)
- Fix obsolete Nerd Font icons from [Han Yeong-woo](https://github.com/nix6839)

### Fixed
- `profile` and `.profile` now share the same icon from [Aaron Lichtman](https://github.com/alichtman)
- Make tox.ini files use the gear/settings icon ([#859](https://github.com/lsd-rs/lsd/pull/859))
- Do not quote filename when piping into another program from [TeamTamoad](https://github.com/TeamTamoad)
- Respect `hidden` flag on Windows [#752](https://github.com/Peltoche/lsd/issues/752)
- Do not show every file are `executable` (green) on Windows
Expand All @@ -23,6 +29,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[`LS_COLORS`](README.md#Colors) can be used to customize.
- Handle dereference (-L) with broken symlink from [r3dArch](https://github.com/r3dArch)
- Avoid using Clap's deprecated structs and functions [sudame](https://github.com/sudame)
- Icon theme with overrides from config [sudame](https://github.com/sudame)
- Incorrect colorizing with `--size=bytes` [bells307](https://github.com/bells307)

### Changed
- Color theme is now expected to be in `$XDG/lsd/colors.yaml` by default from [peppidesu](https://github.com/peppidesu)
Legacy behaviour (`themes` folder) is marked as deprecated but is still supported.
[#749](https://github.com/lsd-rs/lsd/issues/749)

## [0.23.1] - 2022-09-13

Expand Down
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @meain @Peltoche
* @meain @Peltoche @zwpaper
62 changes: 62 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ clap_complete = "4.1"
version_check = "0.9.*"

[dependencies]
crossterm = { version = "0.24.0", features = ["serde"]}
crossterm = { version = "0.24.0", features = ["serde"] }
dirs = "3.0.*"
libc = "0.2.*"
human-sort = "0.2.2"
Expand All @@ -43,6 +43,10 @@ serde_yaml = "0.8"
url = "2.1.*"
vsort = "0.1.0"

[target."cfg(not(all(windows, target_arch = \"x86\", target_env = \"gnu\")))".dependencies]
# if ssl feature is enabled compilation will fail on arm-unknown-linux-gnueabihf and i686-pc-windows-gnu
git2 = { version = "0.16", optional = true, default-features = false }

[target.'cfg(unix)'.dependencies]
users = "0.11.*"
xattr = "0.2.*"
Expand All @@ -62,7 +66,9 @@ tempfile = "3"
serial_test = "0.5"

[features]
default = ["git2"]
sudo = []
no-git = [] # force disabling git even if available by default

[profile.release]
lto = true
Expand Down
40 changes: 30 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ Install the patched fonts of powerline nerd-font and/or font-awesome. Have a loo
| Windows | `scoop install lsd` |
| Android (via Termux) | `pkg install lsd` |
| Debian sid and bookworm | `apt install lsd` |
| Ubuntu/Debian based distro | **snap discontinued**, use `sudo dpkg -i lsd_0.23.1_amd64.deb` and get `.deb` file from [release page](https://github.com/Peltoche/lsd/releases) |
| Ubuntu 23.04 (Lunar Lobster) | `apt install lsd` |
| Earlier Ubuntu/Debian versions | **snap discontinued**, use `sudo dpkg -i lsd_0.23.1_amd64.deb` and get `.deb` file from [release page](https://github.com/Peltoche/lsd/releases) |
| Solus | `eopkg it lsd` |
| Void Linux | `sudo xbps-install lsd` |
| openSUSE | `sudo zypper install lsd` |
Expand Down Expand Up @@ -102,7 +103,7 @@ classic: false
# == Blocks ==
# This specifies the columns and their order when using the long and the tree
# layout.
# Possible values: permission, user, group, context, size, date, name, inode, links
# Possible values: permission, user, group, context, size, date, name, inode, links, git
blocks:
- permission
- user
Expand All @@ -120,10 +121,8 @@ color:
when: auto
# How to colorize the output.
# When "classic" is set, this is set to "no-color".
# Possible values: default, <theme-file-name>
# when specifying <theme-file-name>, lsd will look up theme file
# XDG Base Directory if relative, e.g. ~/.config/lsd/themes/<theme-file-name>.yaml,
# The file path if absolute
# Possible values: default, custom
# When "custom" is set, lsd will look in the config directory for `colors.yaml`.
theme: default

# == Date ==
Expand Down Expand Up @@ -242,9 +241,13 @@ Color theme can be configured in the [configuration file](#configuration)(color.
The valid theme configurations are:

- `default`: the default color scheme shipped in `lsd`
- theme-file-name(yaml): use the theme file to specify colors(without the `yaml` extension)
- `custom`: use a custom color scheme defined in `colors.yaml`
- *(deprecated) theme_file_name(yaml): use the theme file to specify colors(without the `yaml` extension)*

when configured with the `theme-file-name` which is a `yaml` file,
When set to `custom`, `lsd` will look for `colors.yaml` in the
XDG Base Directory, e.g. ~/.config/lsd/colors.yaml

When configured with the `theme-file-name` which is a `yaml` file,
`lsd` will look up the theme file in the following way:

- relative name: check the XDG Base Directory, e.g. ~/.config/lsd/themes/<theme-file-name>.yaml
Expand Down Expand Up @@ -292,6 +295,17 @@ links:
valid: 13
invalid: 245
tree-edge: 245
git-status:
default: 245
unmodified: 245
ignored: 245
new-in-index: dark_green
new-in-workdir: dark_green
typechange: dark_yellow
deleted: dark_red
renamed: dark_green
modified: dark_yellow
conflicted: dark_red
```

When creating a theme for `lsd`, you can specify any part of the default theme,
Expand Down Expand Up @@ -336,12 +350,12 @@ filetype:
dir: 📂
file: 📄
pipe: 📩
socket:
socket: 󰆨
executable: 
symlink-dir: 
symlink-file: 
device-char: 
device-block:
device-block: 󰜫
special: 
```

Expand Down Expand Up @@ -429,6 +443,12 @@ lsd --icon never --ignore-config

`lsd` will try to display the UTF-8 chars in file name, A `U+FFFD REPLACEMENT CHARACTER`(�) is used to represent the invalid UTF-8 chars.

### Icons are showing up strangely

Nerd Fonts is moving the codepoints of the Material Design Icons in 3.0, so lsd has updated the icons in #830. If your icons look weird, use fonts that have been patched using Nerd Fonts v2.3.0 or later.

See also: <https://github.com/ryanoasis/nerd-fonts/releases/tag/v2.3.3>

## Contributors

Everyone can contribute to this project, improving the code or adding functions. If anyone wants something to be added we will try to do it.
Expand Down
11 changes: 11 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,15 @@ fn main() {
generate_to(Zsh, &mut app, bin_name, &outdir).expect("Failed to generate Zsh completions");
generate_to(PowerShell, &mut app, bin_name, &outdir)
.expect("Failed to generate PowerShell completions");

// Disable git feature for these target where git2 is not well supported
if !std::env::var("CARGO_FEATURE_GIT2")
.map(|flag| flag == "1")
.unwrap_or(false)
|| std::env::var("TARGET")
.map(|target| target == "i686-pc-windows-gnu")
.unwrap_or(false)
{
println!(r#"cargo:rustc-cfg=feature="no-git""#);
}
}
2 changes: 1 addition & 1 deletion ci/before_deploy.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
set -ex

build() {
cargo build --target "$TARGET" --release --verbose
cargo build --target "$TARGET" --features="$FEATURES" --release --verbose
}

pack() {
Expand Down
Loading

0 comments on commit 61a4cef

Please sign in to comment.