-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support YAZI_FILE_ONE
environment variable for file(1)
path
#752
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sxyazi
reviewed
Feb 29, 2024
sxyazi
changed the title
support YAZI_FILE_CMD_PATH environment variable for file(1) path
feat: support Mar 1, 2024
YAZI_FILE_ONE
environment variable for file(1)
path
Thank you for contributing to this feature! The docs here https://github.com/yazi-rs/yazi-rs.github.io/blob/main/docs/installation.md, would you like to raise a PR to add it as well? |
Yes, I'll make a PR there too. |
asim215
pushed a commit
to asim215/yazi
that referenced
this pull request
Mar 5, 2024
asim215
added a commit
to asim215/yazi
that referenced
this pull request
Mar 5, 2024
* ci: add cachix workflow (sxyazi#740) * feat: add hovered as `$0` for shell and opener (sxyazi#738) * feat: flavor (sxyazi#753) * feat: add a new `[notify]` section to the `theme.toml` to configure the `notify` component's style (sxyazi#749) * feat: switch to inline images protocol for VSCode, Tabby, and Hyper * feat: add `prepend_rules` and `append_rules` for `[open]` in `yazi.toml` (sxyazi#754) * feat: support `YAZI_FILE_ONE` environment variable for `file(1)` path (sxyazi#752) * feat: allow both '/' and '\' in folder creation (sxyazi#751) * perf: apply `add_many()`/`remove_many()` to the visual mode items for selection conflict detecting (sxyazi#758) * feat: support `%0` as the hovered file for Windows (sxyazi#761) * feat: `ya.input()` plugin API (sxyazi#762) * fix: remove redundant check to allow operations on the `shell` command with an empty file list * feat: add musl linux build targets (sxyazi#759) * fix: nested conflict detection exception when performing cross-level searches (sxyazi#769) * refactor: add new `run` property (sxyazi#773) * feat: add `Ctrl-[` as an escape key (sxyazi#763) * feat: add `parse` method to `Line` element * feat: `ya.notify()` plugin API (sxyazi#780) --------- Co-authored-by: musjj <72612857+musjj@users.noreply.github.com> Co-authored-by: rrveex <91850165+rrveex@users.noreply.github.com> Co-authored-by: sxyazi <sxyazi@gmail.com> Co-authored-by: little camel <54983536+evpeople@users.noreply.github.com> Co-authored-by: Filipe Paniguel <paniguel.lpnh@gmail.com> Co-authored-by: Nguyễn Đức Toàn <33489972+ndtoan96@users.noreply.github.com> Co-authored-by: Konrad Baran <65494005+uznog@users.noreply.github.com> Co-authored-by: hankertrix <91734413+hankertrix@users.noreply.github.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
mime
plugin shall useYAZI_FILE_CMD_PATH
to check mime type, if that environment variable does not exist, it callfile
directly.This PR benefits mostly Windows users. Currently, Windows users have to add
Git\usr\bin
to PATH. But aside from thefile
command, this also add a lot more commands (ls
,less
,cp
...). Those commands have conflicting names with Powershell or Nushell commands and can cause undesirable behavior.The solution is to give yazi the path of
file
command via some form of configuration. Considering thatmime
is a lua plugin, an environment variable config is easier to implement.Note: If this PR is accepted, we need to update the doc, but I can't find where it is.