skywind3000 / skywind3000/z.lua

syntax error when init bash

Open
#117 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
3.1k
Forks
148
PR merge metrics
No merged PRs in 30d

Description

[root@localhost ~]# bash --version
GNU bash, version 4.2.46(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
[root@localhost ~]# bash
bash: /root/.bashrc: line 71: syntax error near unexpected token `('
bash: /root/.bashrc: line 71: ` *) PROMPT_COMMAND="(_zlua --add \"\$(command pwd 2>/dev/null)\" &)${PROMPT_COMMAND:+;$PROMPT_COMMAND}" ;;'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the problem with Bash 4.2.46 and inspect /root/.bashrc at line 71, where the reported syntax error occurs during shell startup. Trace which z.lua initialization output creates that line and compare it with the shell version's syntax requirements. Done means Bash starts without the syntax error while the z.lua initialization still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, lua
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.