Comments (21)
Yes, that makes sense. It would be better to use xdg-open on linux by default.
from yazi.
Hi @linsui, @ManuLinares, @SolitudeSF
A new for
option added, which allows dividing opener rules by system type. Yazi now uses xdg-open
on Linux, open
on macOS by default. #289
from yazi.
When it's stuck at 99%, it usually means there's an error during task execution. You can press w
to view the task list and then press x
to terminate the selected task forcefully.
Considering that you're trying to open a directory, it's possible that your system doesn't have the open
command. You can change open
to xdg-open
or any other command in your yazi.toml
file. This is one of the few configurations in Yazi that users may need to modify themselves.
from yazi.
Is that possible to replace all open with xdg-open?
from yazi.
It depends on your desktop environment, yes, if your system has the xdg-open
command.
You can copy yazi.toml as ~/.config/yazi/yazi.toml
to use your own configuration file.
from yazi.
Thanks!
from yazi.
So this works on my side:
image = [
{ exec = 'xdg-open "$@"', display_name = "Open" },
{ exec = '''exiftool "$1"; echo "Press enter to exit"; read''', block = true, display_name = "Show EXIF" },
]
IMO mentioning the configuration for open
in readme.md would be helpful.
from yazi.
@dreamerlzl Thank you for sharing it here, I have created a new document and already included this issue in the faq
https://yazi-rs.github.io/docs/usage/faq#why-i-cant-open-file--stuck-at-99
from yazi.
Can yazi show the error message instead of stucking on 99%?
from yazi.
You can press <Enter>
on a task to inspect the error message
from yazi.
I'll ask here then:
- What is this "open" command and What distro ships with this command?
- What Desktop Environment assumes this command exists?
- Why wasn't this on the "requirements" at the home page?
Is this a design flaw? If it is, here are my main concerns:
- The "requirement" of open should be explicitly on the home page.
- When this error happens, it should be showed to the user with a flash or an error message. (nothing happening is bad design).
- In the FAQ I see you've added a link, but you could also add the text. "Yazi needs 'open' command to work." so prevents hoping excessively.
from yazi.
im pretty sure open
is macos command. yazi configuration preset defaults to mac.
from yazi.
What is this "open" command and What distro ships with this command?
What Desktop Environment assumes this command exists?
Why wasn't this on the "requirements" at the home page?
open
is a built-in command in Yazi, used for matching and triggering a specific opener rule. In this context, there is an opener that invokes the system open
-- yes, their names happen to be the same, but they are entirely different things. If you are referring to this opener:
Yep, open
is a command on macOS, Linux typically uses xdg-open
(or something else?), and Windows doesn't need open
as it directly runs the file to open (even if it's not a .exe
). I'm aware that Fish shell aliases "xdg-open" as "open", but I'm not sure if other OS/DEs exhibit similar behavior; this requires further investigation.
Currently, I haven't found a good way to unify them, so it needs to be manually changed by the user, and the default opener rules are just an example. I look forward to improving this further and welcome any constructive suggestions.
When this error happens, it should be showed to the user with a flash or an error message. (nothing happening is bad design).
What I need to clarify here is that it's not "nothing happening".
Each opener is scheduled as an independent process by the task system. When a task fails (such as "open"), showing a 99% progress bar at the bottom is the current expected behavior. To my knowledge, other terminal file managers like Ranger exhibit the same behavior when tasks fail.
At this point, the user needs to press w
to see which task has failed and press <Enter>
to view the specific stdout
and stderr
. I'm not sure how to use a "flash" to notify the user and print stdout
and stderr
to the screen when a task fails. What if they are lengthy or contain other escape codes? Or should we just prompt the user to press w
? I think ultimately, the user will have to enter the task manager to check and terminate the failed task, so is this necessary? And when multiple tasks fail, would frequent "flashing" disrupt the user?
The better approach I currently have in mind is to change the progress bar color to red, when a task encounters an error and then keep it at 99%. I believe this should be enough to alert the user that a task has failed, and it's part of the theme system I'm currently working on.
The "requirement" of open should be explicitly on the home page.
In the FAQ I see you've added a link, but you could also add the text. "Yazi needs 'open' command to work." so prevents hoping excessively.
There are many areas in Yazi that need improvement, and this will take time. Right now, I'm dedicating my limited time to improving documentation and the theme system. I've created new documentation for Yazi, and if you have any ideas, feel free to click a "Edit this page" to improve it :)
from yazi.
At this point, the user needs to press w to see which task has failed and press to view the specific stdout and stderr. I'm not sure how to use a "flash" to notify the user and print stdout and stderr to the screen when a task fails. What if they are lengthy or contain other escape codes? Or should we just prompt the user to press w? I think ultimately, the user will have to enter the task manager to check and terminate the failed task, so is this necessary? And when multiple tasks fail, would frequent "flashing" disrupt the user?
I thought it would make sense to display "1 task failed" instead of "99% 1 left".
from yazi.
I thought it would make sense to display "1 task failed" instead of "99% 1 left".
This would result in 10 tasks where even if 1 fails, the progress of the other 9 tasks remains unknown.
from yazi.
How about 100% 1 failed?
from yazi.
What is this "open" command and What distro ships with this command?
open
is a built-in command in Yazi, used for matching and triggering a specific opener rule. In this context, there is an opener that invokes the systemopen
-- yes, their names happen to be the same, but they are entirely different things. If you are referring to this opener:Yep,
open
is a command on macOS, Linux typically usesxdg-open
(or something else?), and Windows doesn't needopen
as it directly runs the file to open (even if it's not a.exe
). I'm aware that Fish shell aliases "xdg-open" as "open", but I'm not sure if other OS/DEs exhibit similar behavior; this requires further investigation.Currently, I haven't found a good way to unify them, so it needs to be manually changed by the user, and the default opener rules are just an example. I look forward to improving this further and welcome any constructive suggestions.
xdg-open comes with the package xdg-utils which is bundled in virtually every distribution, so in Linux is mostly standard to use it.
There are many areas in Yazi that need improvement, and this will take time. Right now, I'm dedicating my limited time to improving documentation and the theme system. I've created new documentation for Yazi, and if you have any ideas, feel free to click a "Edit this page" to improve it :)
Thanks ❤️
from yazi.
xdg-open comes with the package xdg-utils which is bundled in virtually every distribution, so in Linux is mostly standard to use it.
I tested on a headless Debian, open is installed (linked to /usr/bin/run-mailcap) but xdg-open is not.
from yazi.
xdg-open comes with the package xdg-utils which is bundled in virtually every distribution, so in Linux is mostly standard to use it.
I tested on a headless Debian, open is installed (linked to /usr/bin/run-mailcap) but xdg-open is not.
What would you expect to happen when using open in a "headless" session?
There are obviously edge cases, I'd just put xdg-utils as a requirement
from yazi.
Hey @ManuLinares, the new theme system has been completed, and now the progress bar's color will turn red when an error occurs. You can build and experience it from the main branch :)
from yazi.
I'm going to lock this issue because it has been closed for 30 days. ⏳ This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
from yazi.
Related Issues (20)
- Add ability to seek in the main pane HOT 3
- Seek [n] doesn't work as expected when n is below 5 HOT 2
- Shortcut to go back to old directory when using g<Space> HOT 1
- Cut files still appear on dir preview HOT 9
- F1 should open the help page HOT 5
- `ya pub "$YAZI_ID" dds-cd "..."` doesn't work on the main branch HOT 4
- Cursor starts blinking after launching and exiting yazi HOT 21
- merge several "yazi.toml" files HOT 2
- Help is incorrectly rendered when the mapping contains multiline script HOT 2
- Cursor blinking in input field can't be disabled HOT 2
- Piping data from the built-in prompt into a script HOT 4
- Support Emacs' eat HOT 2
- No image previews in Zellij on Wezterm for macOS HOT 12
- Provide controls over whether the terminal title is updated HOT 4
- Paste files to clipboard HOT 1
- Even More VimMode Feature HOT 2
- The fetchers files list includes directories when there are changes in the folder HOT 3
- Manual refresh HOT 2
- Commit df1f094 breaks foot sixel HOT 7
- incorrect fetchers filter causes the self.files arg can't contain folder HOT 9
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 yazi.