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 plugin throws syntax error #1774

Closed
6 of 9 tasks
XhstormR opened this issue Dec 1, 2023 · 3 comments
Closed
6 of 9 tasks

Preview-tui plugin throws syntax error #1774

XhstormR opened this issue Dec 1, 2023 · 3 comments

Comments

@XhstormR
Copy link

XhstormR commented Dec 1, 2023

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

  • Operating System: MacOs
  • Desktop Environment:
  • Terminal Emulator: Alacritty
  • Shell: Fishshell
  • Custom desktop opener (if applicable):
  • Program options used: -adexUH -Te -Pp
  • Configuration options set:
  • Plugins are installed: p:preview-tui;o:fzopen;c:fzcd;z:autojump;x:!chmod +x $nnn*;
  • Issue exists on nnn master

Exact steps to reproduce the issue

  1. Download and install latest preview-tui script from https://github.com/jarun/nnn/blob/master/plugins/preview-tui .
  2. Run nnn and enable preview-tui, it will fail.
┏━ user@c02fldw5md6m:~/Documents/IdeaProjects/dotfiles  
┗━━❯ n   
/Users/user/.config/nnn/plugins/preview-tui: line 382: syntax error in conditional expression: unexpected token `('
/Users/user/.config/nnn/plugins/preview-tui: line 382: syntax error near `+(g'
/Users/user/.config/nnn/plugins/preview-tui: line 382: `  elif [ -n "$NNN_PREVIEWVIDEO" ] && [[ "$4" == +(gif|video) ]]; then'
@XhstormR XhstormR added the bug label Dec 1, 2023
@N-R-K
Copy link
Collaborator

N-R-K commented Dec 1, 2023

No syntax error on my end. What's your bash version?

~> bash --version
GNU bash, version 5.2.15(1)-release (x86_64-pc-linux-gnu)

@XhstormR
Copy link
Author

XhstormR commented Dec 1, 2023

It uses the MacOS default bash.

┗━━❯ whence bash       
bash is /bin/bash
┗━━❯ bash --version  
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin22)
Copyright (C) 2007 Free Software Foundation, Inc.

@N-R-K
Copy link
Collaborator

N-R-K commented Dec 1, 2023

All GNU software that comes with macos by default are severely outdated due to licensing reasons. Upgrade your bash version and the problem should go away.

Unless @luukvbaal wants to maintain bash v3 compatibility, I don't think we have any plans to support bash from 2007, so closing this issue.

@N-R-K N-R-K closed this as not planned Won't fix, can't repro, duplicate, stale Dec 1, 2023
@N-R-K N-R-K added environment and removed bug labels Dec 1, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants