From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Newsgroups: gmane.emacs.bugs Subject: bug#52496: syntax highlighting problem on emacs shell-script mode Date: Sun, 19 Dec 2021 16:46:56 +0100 Message-ID: <87pmpsmwb3.fsf@gmail.com> References: <87pmpssqjp.fsf@gnus.org> <87ilvkd8ng.fsf@igel.home> <87czlsra6i.fsf@gnus.org> <87bl1cd7dn.fsf@igel.home> <877dc0vg6p.fsf@gnus.org> <877dc0d53p.fsf@igel.home> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38243"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 52496@debbugs.gnu.org, Lars Ingebrigtsen , Yilkal Argaw To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 19 16:48:29 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1myyQH-0009jo-7t for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 Dec 2021 16:48:29 +0100 Original-Received: from localhost ([::1]:60636 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myyQF-0005lL-8o for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 Dec 2021 10:48:27 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myyPq-0005f0-LX for bug-gnu-emacs@gnu.org; Sun, 19 Dec 2021 10:48:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36218) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1myyPq-0003O6-Cb for bug-gnu-emacs@gnu.org; Sun, 19 Dec 2021 10:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1myyPq-0000MC-Ak for bug-gnu-emacs@gnu.org; Sun, 19 Dec 2021 10:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Dec 2021 15:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52496 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo patch Original-Received: via spool by 52496-submit@debbugs.gnu.org id=B52496.16399288261169 (code B ref 52496); Sun, 19 Dec 2021 15:48:02 +0000 Original-Received: (at 52496) by debbugs.gnu.org; 19 Dec 2021 15:47:06 +0000 Original-Received: from localhost ([127.0.0.1]:47755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myyOv-0000In-VE for submit@debbugs.gnu.org; Sun, 19 Dec 2021 10:47:06 -0500 Original-Received: from mail-wr1-f52.google.com ([209.85.221.52]:46660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myyOt-0000IH-Lw for 52496@debbugs.gnu.org; Sun, 19 Dec 2021 10:47:04 -0500 Original-Received: by mail-wr1-f52.google.com with SMTP id i22so14874412wrb.13 for <52496@debbugs.gnu.org>; Sun, 19 Dec 2021 07:47:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=t8Gv0U2mN09B/dUVdF3tiaWnx8AMOHdJgfxMym1FObs=; b=O2nNJaGPDQk+oT7ZaXswjuMg+KnE/ht0gDYeWMkfJLsEjsOkzrgCDFXaC9yB+KrvfI DihWZd3KUOx0YlK7pbBEBTiZvkX0PcRoTM1aIkDoHe5NzpBTzBAkd5TEGKYM9WcOspVV CYnN6Bb0tOOFJ/r7YUOLjL3ma4m3/MWmFcSMOOdCYqRr2L8fKYHKplOuqP4YwAiw8/9K aFPz7Pp730E2I5Q+5geih+6adfJ4NDwfWYCCHFJsUD4xiGSpEljYbX8Yd/QizA+vorON kUmqBQnMFl8whkwQWNLG+Q1eNcBp2XfIh6zl1NiR2e4qOVXbmjo+penFIrSWHp/j/tke 5lBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=t8Gv0U2mN09B/dUVdF3tiaWnx8AMOHdJgfxMym1FObs=; b=kG757l4Ni/dX7tzbe4JWp42vRqmIEskUq8UXPg2BIhdDNQ2gZaAEH0i1fVc9UjesxW LKPqcZdXNd9DIeEh+IVgU7596w9sbY/NPydO+5AgF5USnU3W75s/K03BlvMmW5lWA/L6 YzLp0g57R08/zryzyRKM8Wh/OjWoFQh2yPvubirN0x+QOsr/xnzWpWLF4Y2Vazq/yYbL 6xir2HNUl6/Ykv/39ejRTLmX6Br6TiBdN78VhoWoVwgBzl850W+uUVp4u7m3cM5+9zFS nqxH7EcHzbWqbJopvF43FQd4BuKku/bp95D8RnQr64cDc9YzbzgtpQODHGmJ4zOA5NWK NA/A== X-Gm-Message-State: AOAM533QhH2FnpgANADCLX+tmjJ8GsnV2kDq0fXo2XuJPal+2qK3yua7 UWrE+g+g70ViLz3webRGT+w= X-Google-Smtp-Source: ABdhPJw0KmK2aosYFfhWQ4eJI7uZMBOBVhTFj88KJE30sOpo7mEzfWMwgfAAao5iiCIzs4Vck0YPoA== X-Received: by 2002:a05:6000:2cc:: with SMTP id o12mr1135412wry.206.1639928817771; Sun, 19 Dec 2021 07:46:57 -0800 (PST) Original-Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id bg34sm17414666wmb.47.2021.12.19.07.46.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Dec 2021 07:46:57 -0800 (PST) In-Reply-To: <877dc0d53p.fsf@igel.home> (Andreas Schwab's message of "Sun, 19 Dec 2021 15:47:06 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:222702 Archived-At: Andreas Schwab writes: > On Dez 19 2021, Lars Ingebrigtsen wrote: > >> Andreas Schwab writes: >> >>> On Dez 19 2021, Lars Ingebrigtsen wrote: >>> >>>> Right. I haven't real the shell documentation -- is "@" a valid heredoc >>>> ... separator? >>> >>> Any word is. >> >> But is @ word constituent? > > A shell word can be almost anything. Relevant part of (bash) Redirections: > The format of here-documents is: > [N]<<[-]WORD > HERE-DOCUMENT > DELIMITER > > No parameter and variable expansion, command substitution, arithmetic > expansion, or filename expansion is performed on WORD. If any part of > WORD is quoted, the DELIMITER is the result of quote removal on WORD, And (bash) Definitions: > 'word' > A sequence of characters treated as a unit by the shell. Words may > not include unquoted 'metacharacters'. Preceded by: > 'metacharacter' > A character that, when unquoted, separates words. A metacharacter > is a 'space', 'tab', 'newline', or one of the following characters: > '|', '&', ';', '(', ')', '<', or '>'. (AFAICT the same goes for POSIX sh[1]) So IIUC for here-documents anything is fair game except (1) {single,double,back} quotes (2) metacharacters (3) backslashes and comment openers (#); all of which can still be used if quoted or escaped *on the opening line only*. [1] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_07_04