Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15260 > unrolled thread
| Started by | Isabella Bosia <izaberina@gmail.com> |
|---|---|
| First post | 2019-07-29 17:55 +0100 |
| Last post | 2019-07-29 18:53 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to gnu.bash.bug
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
x[ Isabella Bosia <izaberina@gmail.com> - 2019-07-29 17:55 +0100
Re: x[ Stephane Chazelas <stephane.chazelas@gmail.com> - 2019-07-29 18:53 +0100
| From | Isabella Bosia <izaberina@gmail.com> |
|---|---|
| Date | 2019-07-29 17:55 +0100 |
| Subject | x[ |
| Message-ID | <mailman.158.1564419372.1985.bug-bash@gnu.org> |
haven't really looked into why this happens but x[ seems to trigger some funny parser behavior x[ newline should not prompt with PS2 it can't be defined as a normal sh function, but it can be defined with the function keyword it can't be called like a normal function, but things like "x[" or \x[ work this bug seems old
[toc] | [next] | [standalone]
| From | Stephane Chazelas <stephane.chazelas@gmail.com> |
|---|---|
| Date | 2019-07-29 18:53 +0100 |
| Message-ID | <mailman.173.1564422827.1985.bug-bash@gnu.org> |
| In reply to | #15260 |
2019-07-29 17:55:58 +0100, Isabella Bosia: > haven't really looked into why this happens but x[ seems to trigger some > funny parser behavior > > x[ newline should not prompt with PS2 > > it can't be defined as a normal sh function, but it can be defined with the > function keyword [...] x[ is the start of an array element assignment. newline is valid (just a token separator like space) inside an arithmetic expression. $ x[ > 1 > + > 1 > ]=3 $ typeset -p x declare -a x=([2]="3") You'll notice: $ +[ +[: command not found $ 'x'[ x[: command not found -- Stephane
[toc] | [prev] | [standalone]
Back to top | Article view | gnu.bash.bug
csiph-web