You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
❯ yazi --debug
Yazi
Version: 0.3.0 (7a380c2 2024-08-01)
Debug :false
OS : windows-x86_64 (windows)
Ya
Version: 0.3.0
Emulator
Emulator.via_env: ("xterm-256color", "WezTerm")
Emulator.via_csi: Ok(Unknown([]))
Emulator.detect : WezTerm
Adapter
Adapter.matches: Iterm2
Desktop
XDG_SESSION_TYPE: None
WAYLAND_DISPLAY : None
DISPLAY : None
SSH
shared.in_ssh_connection: false
WSL
/proc/sys/fs/binfmt_misc/WSLInterop: false
Variables
SHELL : None
EDITOR : None
YAZI_FILE_ONE : Some("C:\\Users\\hongyuanjia\\scoop\\apps\\git\\current\\usr\\bin\\file.exe")
YAZI_CONFIG_HOME : None
ZELLIJ_SESSION_NAME: None
Text Opener
default: Some(Opener { run: "nvim \"%@\"", block: true, orphan: false, desc: "neovim", for_: None, spread: false })
block : Some(Opener { run: "nvim \"%@\"", block: true, orphan: false, desc: "neovim", for_: None, spread: false })
tmux
TMUX :false
Version: program not found
Dependencies
file : 5.45
ueberzugpp : program not found
ffmpegthumbnailer: program not found
magick : program not found
fzf : 0.53.0
fd : 10.1.0
rg : 14.1.0
chafa : program not found
zoxide : program not found
7z : 24.06
7zz : program not found
jq : 1.7.1
--------------------------------------------------
When reporting a bug, please also upload the `yazi.log` log file - only upload the most recent content by time.
You can find it in the "C:\\Users\\hongyuanjia\\AppData\\Roaming\\yazi\\state" directory.
Please describe the problem you're trying to solve
In yazi.toml we can have a for field to specify the settings for specific platforms, e.g.:
[opener]
edit = [
{ run = '${EDITOR:=vi} "$@"', block = true, desc = "$EDITOR", for = "unix" },
{ run = 'nvim "%@"', block = true, desc = "neovim", for = "windows" }
]
I wonder if it is possible to do the same in keymap.toml? E.g.:
[[manager]]
prepend_keymap = [
{ on = [ "<C-s>" ], run = 'shell "$SHELL" --block --confirm', desc = "Open shell here", for = "unix" },
{ on = [ "<C-s>" ], run = 'shell "pwsh" --block --confirm', desc = "Open shell here",for = "windows" }
]
Would you be willing to contribute this feature?
Yes, I'll give it a shot
Describe the solution you'd like
[[manager]]
prepend_keymap = [
{ on = [ "<C-s>" ], run = 'shell "$SHELL" --block --confirm', desc = "Open shell here", for = "unix" },
{ on = [ "<C-s>" ], run = 'shell "pwsh" --block --confirm', desc = "Open shell here",for = "windows" }
]
Additional context
No response
Validations
I have searched the existing issues
The latest nightly build of Yazi doesn't already have this feature
The text was updated successfully, but these errors were encountered:
Sorry, this is one of the features I don't want to add because it goes against Yazi's design philosophy. Yazi is meant to have consistent behavior across all platforms, so assigning different functions to the same key on different platforms would clearly violate that.
The reason we introduced for for [opener] was to hide these differences - even if the opener defines different programs, you can still use them consistently within [open]. The same goes for keybindings: if you really want to have platform-specific differences, please hide them in a plugin, here is an example #51 (comment)
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.
yazi --debug
outputPlease describe the problem you're trying to solve
In
yazi.toml
we can have afor
field to specify the settings for specific platforms, e.g.:I wonder if it is possible to do the same in
keymap.toml
? E.g.:Would you be willing to contribute this feature?
Describe the solution you'd like
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: