zellij-org / zellij

A terminal workspace with batteries included
https://zellij.dev
MIT License
20.47k stars 637 forks source link

Unable to open directory from strider - filepicker #3267

Closed matiux closed 4 months ago

matiux commented 4 months ago

stty size: 57 202 zellij: 0.40.0 uname -av: Linux iuxhome 6.8.5-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 11 Apr 2024 01:47:33 +0000 x86_64 GNU/Linux zsh --version: 5.9 (x86_64-pc-linux-gnu) ohmyzsh powerlevel10k

Step to reproduce:

Add key binding

bind "Alt f" {
   LaunchPlugin "filepicker" {
      close_on_selection true
   };
}

Press Alt + f to open the filepicker, than,navigate to desired folder:

Screenshot_20240416_152742

Press TAB to select desired folder, in my example zellij:

Screenshot_20240416_153034

Press enter to open folder in the right panel, but nothing happens. The position in the right panel doesn't change. Is this behavior correct?

P.s. However, if I select a file, it opens without problems

cyayon commented 4 months ago

hi, same issue here

rishikanthc commented 4 months ago

just updated zellij and I'm having this issue too

quanhua92 commented 4 months ago

I am using Ubuntu 22.04 and having this issue as well. I install Zellij from the main branch

imsnif commented 4 months ago

To those experiencing this issue: if you set the default_shell in the config to something (eg. bash) and then start a new session, does it work?

quanhua92 commented 4 months ago

@imsnif Setting default_shell fixes the bug for me. My $SHELL is /bin/bash, I set the default_shell to bash

imsnif commented 4 months ago

Thanks @quanhua92, I'll fix this in a patch soon. For now, at least we have a temporary workaround.

matiux commented 4 months ago

@imsnif, tryed with default_shell "zsh" and default_shell "/usr/bin/zsh" but it stil doesn't work form me.

echo $SHELL
/usr/bin/zsh
matiux commented 4 months ago

maybe problems with zsh / oh-my-zsh / powerlevel10k ?

matiux commented 4 months ago

I've just discovered that even though I'm using zsh, setting default_shell "bash" solves my problem... Is it correct?

matiux commented 4 months ago

@imsnif seems to be some problems with zsh. At the top of my zsh config file I have this, I don't know if it could matter:

if [[ ! -v ZELLIJ || ( -v ZELLIJ && $ZELLIJ -eq 1 ) ]]; then
    zellij attach --create default-session
fi

to attach zellij to a specific existing session.

setting default_shell "bash" obviously makes me lose zsh when I open panels. On the other hand setting default_shell "zsh" introduces a strange behavior. Please, see attached video. As you can see, pressing enter to open a folder, closes the filepicker and breaks the layout. (with default_shell "zsh")

Screencast_20240417_192108.webm

rockboynton commented 4 months ago

default_shell "fish" works as a workaround for me

matiux commented 4 months ago

@rockboynton are you using zsh?

According to the documentation, fish should be the default shell. Even when commented out, the behavior should remain the same.

rockboynton commented 4 months ago

@matiux no, I have my $SHELL set as fish and the filepicker (strider) worked before v0.40 without setting this config, but now I have to explicitly set it for it to work

matiux commented 4 months ago

@rockboynton the problem seems to be related to zsh. I would like to have more feedback with zsh besides my own

matiux commented 4 months ago

Hi @imsnif, any news or suggestion ?

imsnif commented 4 months ago

Hi @matiux - I appreciate that you really want this problem fixed, but please don't tag me. This is a large project and I unfortunately do not have the capacity to provide user support to all who need it. I am just one person.

Please see my previous comment about this issue, your problem (given that it happens only in one shell) almost certainly has to do with your environment and the way you launch Zellij.

If you'd like help getting to the bottom of it, please go to one of our dedicated support platforms (Discord and to a lesser extend Matrix).

matiux commented 4 months ago

My apologies for tagging you. I just thought you might have a better understanding of the project. By the way, to lunch zellij, I simply put this at the beginning of the ~/.zshrc file

if [[ ! -v ZELLIJ || ( -v ZELLIJ && $ZELLIJ -eq 1 ) ]]; then
        zellij attach --create default-session
fi

is it a wrong approach?

imsnif commented 4 months ago

Fixed in https://github.com/zellij-org/zellij/issues/3267 - will release a patch version with this and other fixes in the near future.

matiux commented 4 months ago

Thanks. Hope this patch will fix also for zsh