preview_tui needs extglob enabled
Closed this issue · 3 comments
regisverdin commented
- Operating System:
macOS - Terminal Emulator:
kitty - Shell:
fish (bash for this script - Issue exists on
nnnmaster
Exact steps to reproduce the issue
Run preview_tui on mac and it crashes with
bash-3.2$ ~/.config/nnn/plugins/preview-tui
/.../.config/nnn/plugins/preview-tui: line 396: syntax error in conditional expression: unexpected token `('
/.../.config/nnn/plugins/preview-tui: line 396: syntax error near `+(g'
/.../.config/nnn/plugins/preview-tui: line 396: ` elif [ -n "$NNN_PREVIEWVIDEO" ] && [[ "$4" == +(gif|video) ]]; then`
I added shopt -s extglob; to the top of my script to fix it. Extglob is disabled by default.
N-R-K commented
You're running a seriously outdated bash version (v3.2 from 2006). Upgrade to a newer version and report back if issue still persists.
regisverdin commented
3.2 is the version MacOS ships with, FYI. But yeah good to know.