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

preview-tui: 1: eval: Syntax error: "(" unexpected #1895

Closed
8 of 9 tasks
FunctionDJ opened this issue Jun 12, 2024 · 6 comments · Fixed by #1630
Closed
8 of 9 tasks

preview-tui: 1: eval: Syntax error: "(" unexpected #1895

FunctionDJ opened this issue Jun 12, 2024 · 6 comments · Fixed by #1630
Labels

Comments

@FunctionDJ
Copy link

FunctionDJ commented Jun 12, 2024

When i try to use the preview-tui plugin while hovering on a folder that's named something like this Foo (Bar) [Bat], the plugin doesn't work and preview-tui: 1: eval: Syntax error: "(" unexpected is logged which is visible when exiting nnn afterwards.

I'm running nnn on a remote machine with tmux for the tiling.

I've looked at probably related issues and PRs like #1617 and #1614 but couldn't figure out if there is a fix for this.

Environment details (Put x in the checkbox along with the information)

  • Operating System: Kubuntu 24.04 LTS (local machine), Ubuntu 23.10 (remote server)
  • Desktop Environment: Plasma 5.27.11 (local), none (remote)
  • Terminal Emulator: KDE Konsole (local)
  • Shell: GNU bash, version 5.2.15 (remote)
  • Custom desktop opener (if applicable): none
  • Program options used: none
  • Configuration options set: NNN_PLUG='p:preview-tui' NNN_FIFO="/tmp/nnn.fifo" NNN_OPTS='H'
  • Plugins are installed
  • Issue exists on nnn master

Exact steps to reproduce the issue

  • install plugins
  • add preview-tui to NNN_PLUG
  • tmux
  • touch 'foo (bar)'
  • nnn
  • highlight foo (bar) file
  • trigger preview-tui plugin
  • plugin won't launch and upon exiting nnn, a line containing "syntax error" will be shown before the prompt
@FunctionDJ FunctionDJ added the bug label Jun 12, 2024
@N-R-K
Copy link
Collaborator

N-R-K commented Jun 13, 2024

The issue template asks for some environment details. Please provide them, especially your bash version and preview-tui version.

@FunctionDJ
Copy link
Author

FunctionDJ commented Jun 13, 2024

@N-R-K pardon, i didn't look at the bug template correctly and deleted everything instead of what i should. i have edited the issue above.

regarding the preview-tui version, i don't know where i can find it. i've read the plugin file at ~/.config/nnn/plugins/preview-tui and no version is mentioned there. i'm running nnn v4.8-1 though, according to apt policy nnn (nnn -V doesn't appear to list the -1).

regarding "Issue exists on nnn master", i don't really know how to build binaries and i was hoping that it's okay to open issues without being able to compile nnn.

@N-R-K
Copy link
Collaborator

N-R-K commented Jun 13, 2024

regarding the preview-tui version, i don't know where i can find it.

It doesn't have an explicit version. I'm going to assume that it's the one that came with your nnn version.

i'm running nnn v4.8-1

There were some fixes made to preview tui since 4.8. Try downloading the latest one from master and see if that fixes your issue.

nnn -V doesn't appear to list the -1

That -1 part is probably ubuntu's package revision number.

@N-R-K
Copy link
Collaborator

N-R-K commented Jun 13, 2024

the plugin doesn't work and preview-tui: 1: eval: Syntax error: "(" unexpected is logged which is visible when exiting nnn afterwards

I tried this on master and cannot reproduce. Also, the current preview-tui script doesn't have any eval since commit 432b075.

I'm closing this off as fixed by 432b075. Upgrading to v4.9 or above should fix your issue.

@FunctionDJ
Copy link
Author

FunctionDJ commented Jun 28, 2024

@N-R-K i was finally in a situation where i could upgrade to Ubuntu 24 LTS, shipping nnn 4.9 in their repo.

Unfortunately despite removing and reinstalling the plugins, the preview-tui plugin seems to be fully broken for me now. When i trigger the plugin (regardless of where, even in an empty directory), it prints size missing right into nnn on top of the first entry, without creating a tmux split.

@thezacharytaylor
Copy link

I have this issue on Mac 14.6.1 Sonoma. I've replaced the preview-tui code after it didn't work redownloading it, but it persists.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants