Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Stephane Chazelas Newsgroups: gnu.bash.bug Subject: Re: x[ Date: Mon, 29 Jul 2019 18:53:38 +0100 Lines: 31 Approved: bug-bash@gnu.org Message-ID: References: <20190729175338.ewjhkqxcmnm3q3km@chaz.gmail.com> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: usenet.stanford.edu 1564422827 22675 209.51.188.17 (29 Jul 2019 17:53:47 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash To: Isabella Bosia Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=hCtbv0ThIA6bpHZedG7gNttT8s025FMoVyVD8oaPFVo=; b=NSULb1qAFdYHvmq026jqS3hZOAN1Is9viPm+YvYPvsIibA2n1EEohk1GoD67H4P7jG gaAthPjdhSLLFRlH9gsA5OQ9bfs29ojr/0Wtt9V/9QC4H10HUaGOIqP4G5LZgEYpylrj XHDNl/d2O8yZiEktgDEDS15sw/qQS2RE3yaWomZHBU+fB9UfF3d1mJt0nFUVA9WDHldH u8eIwTxmfp1PeaAM4xoB/2zfnQvzbySPd7Nhb9dIzr8BClcYG+Jmy/BVjLQ6zS0F4AjB 0ovjiE/pYBhIU073mfFeZdf2cllzeKfu43Cj343U8PiGwrfn3s2UPxXoGjM8m4NKiAho rRsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=hCtbv0ThIA6bpHZedG7gNttT8s025FMoVyVD8oaPFVo=; b=rSxvF5FZJzvgIfow9yYn6mHL0ik40dzn0RjbVUQXMszTCsBj8GhRrMAyT1V4eWc3v8 W8PsbP2BlnrSYYDJYz3TRGLakYrtjP9Dxc4daru9hXG/VMjDdRA2zIptS32bvSAQGIva 7CAdwJol2BL6OfJ+Ryyevwf3oQnxfatA6I0oojNb5ZtQbFpTMOnIiJrDQMeHVkQy8g9N T/8HZWT4DDzFCGhM5nYt8GCEui07XSAjn9Fnr0dqJd7riZ7q9/dopL6Z9Pvhrd7KD9eQ 7XoWaeGDICdOtDesrRgWeHEiTm3LioN7nk9tiaIwrzrlyuCXuVd4NpiM7hg3VIXu0xkn UWVQ== X-Gm-Message-State: APjAAAWkreij3OKHQyZEJ5fQCpCMVIjEN88ZGJPw/DQLJ+p6QEZE8KOU i0hPhrG6PRowTN7ZD1rTWCA= X-Google-Smtp-Source: APXvYqxEdn28jpwYQy+xH+hvyxOs3owwFFl3htztDk6j4essscstgtKZzfMFw+d54qd6M9OjN5xMIg== X-Received: by 2002:a05:6000:1186:: with SMTP id g6mr3887402wrx.17.1564422821039; Mon, 29 Jul 2019 10:53:41 -0700 (PDT) Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::429 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <20190729175338.ewjhkqxcmnm3q3km@chaz.gmail.com> X-Mailman-Original-References: Xref: csiph.com gnu.bash.bug:15264 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