Path: csiph.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Matthew Persico Newsgroups: gnu.bash.bug Subject: Dashes in function names: Undocumented? Date: Wed, 12 Aug 2020 10:51:58 -0400 Lines: 32 Approved: bug-bash@gnu.org Message-ID: References: NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: usenet.stanford.edu 1597243937 4733 209.51.188.17 (12 Aug 2020 14:52:17 GMT) X-Complaints-To: action@cs.stanford.edu To: bug-bash@gnu.org Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=hdlohBiHtIf4lwcGmDekr1HT/67FbCM+Z4KjdOZcBl8=; b=Z4gNm9PwvT1xEmUaxK4PA1Lx4FRsrnSTef7lytR7fr2YnXnXwsQr07Y/+z0gEjPwRB aTLdaV+RF/8mh0oMrXLaHjISBUx3vSvW1bXrWBLPhzpiW9RdImnMGWRMllmDOphHFQSO 3/qUfIek7nFLBBruYU7MxFqyoPSA/qUIIi9ERKLhP6CNurZGcmhVEISptrzlI1PfI966 /vohwB5sEOSclwbI1Zrw8qcQ+9Foct78cEffp6pPsgDsOmG1rEBguM8qW5kjFcsBN3hQ 3q7IH/12v7T7iTvk6Wb/5wJaPtY521RagCsujXaFoC/eHDp+k4rQWAUpHea/S8Rl1QUZ xwog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=hdlohBiHtIf4lwcGmDekr1HT/67FbCM+Z4KjdOZcBl8=; b=DhUOr4/+WI0g9CMe0aFbPhuTaKZG/nhmMqNxYmk/LB4xQZqln7Q4KUPqUftpddKiLK 1STqx2uIoehJ9hN0KA/rrZ3PoL5Hov86B6ojNbkErxSloJMpAg6BTLxMxc7WyUyXQ0nH 5vL9rpU4neRU2RUzV0MJs9jzxhqYctMgMLoA2vnBjs0oMhNEmCzAs1RptDsZqwzKBmn7 qEWJwgrzkCUnUiy64KGbNCC+vDes7SOGES2sS86gFhrANxs3CpvuG9h7v/rfsNA4YWQ9 tVzEghFqZwrwUAFw0tnP+K8KyIgELKa6NN088yS6dxs8AHeh8ZhMZ4HFmLs9Pjhrxf5p e8fA== X-Gm-Message-State: AOAM530C/drsgXrJpSyTWfJgIpaFn3pU9hdP099Pzk0K8auEk75AEXGL WFMgwcUZKhxNQk2ctwz6xSp4yVF34reA4itzUtt3XGMSgww= X-Google-Smtp-Source: ABdhPJx1Xbn3dF4aM/SpNu7kD/HIoBbAzBMkge7OwhmSSThOCMm/+XiL+N6TmJuYtc3Sbl+oT3ze9ANw2s0jTkEH/1w= X-Received: by 2002:a67:fd5b:: with SMTP id g27mr397650vsr.230.1597243931578; Wed, 12 Aug 2020 07:52:11 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::e43; envelope-from=matthew.persico@gmail.com; helo=mail-vs1-xe43.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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: Xref: csiph.com gnu.bash.bug:16744 I put a bug report into an emacs group because the bash syntax highlighter failed to recognize functions whose names have dashes in them. The maintainer came back with this: I can reproduce this behaviour, but is it really a bug? Aren't the names with '-' invalid? The Bash Reference Manual says: name A word consisting solely of letters, numbers, and underscores, and beginning with a letter or underscore. Names are used as shell variable and function names. Also referred to as an identifier. https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html I looked at the manual and I didn't see positive or negative acknowledgement that dashes can be used in function names. But it does work. Update to manual? name A word consisting solely of letters, numbers, and underscores, and beginning with a letter or underscore. Names are used as shell variables. Also referred to as an identifier. function name A word consisting solely of letters, numbers, underscores, dashes, and beginning with a letter or underscore. Function names are used to label shell functions. -- Matthew O. Persico