alias name in .bashrc ending with dash '-' causes error
Describe the bug If an alias is declared in the .bashrc where the name ends in a dash, the shell cannot be initialized.
error: error reinitializing remote: error initializing shell: cannot parse bash declare output: bash-declare-output:7:73: - must be followed by an expression
To Reproduce Steps to reproduce the behavior:
- Add
alias p-='popd'to your .bashrc - Start a new local session tab (bash) or
/reseta current one
Expected behavior Local bash session starts without error.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Linux, x64
- Version: Client Version 0.7.5 (20240502-224742)
Additional context
This alias causes no issues in other terminal environments. The dash character is certainly acceptable as an interior character in an alias e.g. alias my-alias='echo'. Bash alias naming question on SO: Which characters are allowed in a bash alias. Bash alias naming in Bash Reference Manual - 6.6 Aliases
As well, you cannot use such an alias defined in a running session. The alias command is successful with a return code of 0, but the alias does not apply.
p-: command not found
To Reproduce:
- Open a session
- Run the command
alias p-='echo popd' - Run the command
p-