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

Error: "-bash: declare: -g: invalid option" on Centos #474

Closed
jpwgarrison opened this issue Sep 28, 2016 · 2 comments
Closed

Error: "-bash: declare: -g: invalid option" on Centos #474

jpwgarrison opened this issue Sep 28, 2016 · 2 comments
Labels
bash Related to Bash specific implemetation

Comments

@jpwgarrison
Copy link

Shell: bash
Operating system: Centos 6.5
Liquid Prompt version (tag, commit): master

Apparently declare does not have the "-g" option in centos? I thought it was the bash version (4.1.2) so I upgraded to 4.4 and get the same option.

man declareshows -aAfFilrtux as the only options.

I commented out the following line (1912) and the error goes away, FWIW:
declare -g +x PROMPT_COMMAND

@dolmen dolmen added the bash Related to Bash specific implemetation label Sep 28, 2016
@dolmen
Copy link
Collaborator

dolmen commented Sep 28, 2016

This line has been added recently to workaround broken bashrc (#450, #463).

According to bash release notes, -g was added in bash 4.2. I will disable the line on olders bash.

@dolmen
Copy link
Collaborator

dolmen commented Sep 28, 2016

Fixed by 18fd3fb

@dolmen dolmen closed this as completed Sep 28, 2016
@dolmen dolmen added the fixed! label Sep 28, 2016
Gerschtli added a commit to Gerschtli/liquidprompt that referenced this issue Oct 27, 2016
…ed' into feature/calc-cksum-only-if-enabled

* origin/feature/calc-cksum-only-if-enabled:
  Only calculate hash for ssh host color if option is enabled
  CHANGES: Credit @Rycieos for liquidprompt#461
  LP_COLOR_HOST_HASH: simplify
  Fix computing hostname hash on SunOS
  don't try to unexport PROMPT_COMMAND on bash < 4.2 (GH liquidprompt#474)
  Fix LP_ENABLE_FQDN regression: s/_LP_HOST_SYMBOL/LP_HOST_SYMBOL/ GH liquidprompt#472
  unexport PROMPT_COMMAND (GH liquidprompt#450, liquidprompt#463)
  Fix up awk script and make readable
  CHANGES: release 1.11
  ISSUE_TEMPLATE: request shell name
Gerschtli added a commit to Gerschtli/liquidprompt that referenced this issue Oct 27, 2016
…only-if-enabled

* origin/master:
  CHANGES: Credit @Rycieos for liquidprompt#461
  LP_COLOR_HOST_HASH: simplify
  Fix computing hostname hash on SunOS
  don't try to unexport PROMPT_COMMAND on bash < 4.2 (GH liquidprompt#474)
  Fix LP_ENABLE_FQDN regression: s/_LP_HOST_SYMBOL/LP_HOST_SYMBOL/ GH liquidprompt#472
  unexport PROMPT_COMMAND (GH liquidprompt#450, liquidprompt#463)
  Fix up awk script and make readable
  CHANGES: release 1.11
  ISSUE_TEMPLATE: request shell name

Conflicts:
	liquidprompt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bash Related to Bash specific implemetation
Projects
None yet
Development

No branches or pull requests

2 participants