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

Hangs on inaccessible network file systems #892

Open
VorpalBlade opened this issue Aug 17, 2022 · 3 comments
Open

Hangs on inaccessible network file systems #892

VorpalBlade opened this issue Aug 17, 2022 · 3 comments

Comments

@VorpalBlade
Copy link

VorpalBlade commented Aug 17, 2022

If a network file system (smb, cifs, fuse.sshfs, indirect ones via KDE kio/Gnome gvfs fuse backends, etc) becomes inaccessible for whatever reason, accesses to those paths will hang. This is relevant to zsh-syntax-highlighting as when I try to unmount the file system in question, the path highlighter (that causes underlining of the path if it is valid) causes zsh to hang.

It would be good if this check could be done in a way that doesn't block the main zsh process (an async subprocess that is talked to via pipes perhaps?), or perhaps have a (very short) timeout, to allow recovery from situations like that.

EDIT: While ZSH_HIGHLIGHT_DIRS_BLACKLIST is a thing, these shares are normally fast enough. The problem is only when they become inaccessible. Thus I believe ZSH_HIGHLIGHT_DIRS_BLACKLIST is sub-optimal and using some sort of background or helper thread would be a better option.

@phy1729
Copy link
Member

phy1729 commented Aug 17, 2022

Seems to be a duplicate of #885 .

@VorpalBlade
Copy link
Author

VorpalBlade commented Aug 17, 2022

Seems to be a duplicate of #885 .

Almost, it appears that they are talking about slow network file systems in general, while I'm talking about ones that time out/hang due to loosing connection. But I believe the solution would likely be the same in both cases.

@danielshahaf
Copy link
Member

when I try to unmount the file system in question, the path highlighter (that causes underlining of the path if it is valid) causes zsh to hang.

FWIW, if anyone runs into this, there's a number of workarounds, including zsh -c 'unmount /some/argument' and —

zsh% sh
sh$ unmount /some/argument
sh$ exit
zsh% 

. Or literally run ZSH_HIGHLIGHT_HIGHLIGHTERS=() at the prompt and restore that variable's value afterwards (default value is =( main )).

Anyway, let's resume discussions of the issue(s) and solutions to them :)

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

3 participants