Skip to content
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

YAML => KDL config update causes error when using backslash "\" as hotkey #1850

Closed
noyez opened this issue Oct 25, 2022 · 1 comment
Closed

Comments

@noyez
Copy link
Contributor

noyez commented Oct 25, 2022

Thank you for taking the time to file this issue! Please follow the instructions and fill in the missing parts below the instructions, if it is meaningful. Try to be brief and concise.

Basic information

zellij --version: zellij 0.32.0
stty size: 60 116
uname -av or ver(Windows): Darwin mbp16.local 21.6.0 Darwin Kernel Version 21.6.0: Sat Jun 18 17:07:22 PDT 2022; root:xnu-8020.140.41~1/RELEASE_ARM64_T6000 arm64

Further information
Reproduction steps, noticeable behavior, related issues, etc

Below is a sample of my yaml config:

keybinds:
    tmux:
        - action: [NewPane: Right, SwitchToMode: Normal,]
          key: [Char: '|',]
        - action: [NewPane: Right, SwitchToMode: Normal,]
          key: [Char: '\',]

This is the translated KDL config:

keybinds { 
    tmux {
        bind "|" { NewPane "Right"; SwitchToMode "normal"; }
        bind "\" { NewPane "Right"; SwitchToMode "normal"; }   // <--- this line causes the panic. 
    }
}

The bind line with a backslash causes a panic. A possible alternative is to use the raw string specifically for any hotkey with a backslack, namely:
bind r"\" { NewPane "Right"; SwitchToMode "normal"; }

@imsnif
Copy link
Member

imsnif commented Nov 2, 2022

Fixed in #1879

@imsnif imsnif closed this as completed Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants