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

$HOME is expanded differently depending on command #3417

Open
cschmatzler opened this issue Jun 13, 2024 · 0 comments
Open

$HOME is expanded differently depending on command #3417

cschmatzler opened this issue Jun 13, 2024 · 0 comments

Comments

@cschmatzler
Copy link

Initially reported as dj95/zjstatus#65

2. Issues with the Zellij UI / behavior / crash

Issue description

When adding a plugin with file:$HOME/..., the $HOME variable is correctly expanded when opening Zellij, but fails when running actions such as zellij action new-tab -l zjstatus -c ~/Development.

Minimal reproduction

layouts/zjstatus.kdl:

layout {
    pane split_direction="vertical" {
        children
    }
    pane size=1 borderless=true {
        plugin location="file:$HOME/.config/zellij/plugins/zjstatus.wasm" {
            format_left   "{mode} #[fg=#1e66f5,bold]{session}"
            format_center "{tabs}"
            format_right  "{datetime}"
            format_space  ""

            border_enabled  "false"
            border_char     "─"
            border_format   "#[fg=#6C7086]{char}"
            border_position "top"

            hide_frame_for_single_pane "true"

            mode_locked "#[fg=#dce0e8,bg=#e64553,bold] LOCKED "
            mode_normal "#[fg=#dce0e8,bg=#1e66f5,bold] NORMAL "
            mode_resize "#[fg=#dce0e8,bg=#179299,bold] RESIZE "
            mode_pane   "#[fg=#dce0e8,bg=#ea76cb,bold] PANE "
            mode_tab    "#[fg=#dce0e8,bg=#8839ef,bold] TAB "

            tab_normal   "#[fg=#1e66f5] {name} "
            tab_active   "#[fg=#8839ef,bold] {name} "

            datetime        "#[fg=#6C7086,bold] {format} "
            datetime_format "%A, %d %b %Y %H:%M"
            datetime_timezone "Europe/Berlin"
        }
    }
}

This works when opening a new zellij session, but results in the following when running it as zellij action new-tab -l zjstatus -c ~/Development:
image
image
(thanks @dj95 for investigating and the second screenshot! ❤️ )

Other relevant information

This gets resolved by replacing $HOME with ~ or an absolute path, but I'd still consider it a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant