Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gnFmZ-0004p6-I0 for pgsql-bugs@arkaria.postgresql.org; Sat, 26 Jan 2019 04:41:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gnFmY-00013t-5H for pgsql-bugs@arkaria.postgresql.org; Sat, 26 Jan 2019 04:41:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gnFmX-00013m-VH for pgsql-bugs@lists.postgresql.org; Sat, 26 Jan 2019 04:41:26 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gnFmV-0002Zu-QS for pgsql-bugs@postgresql.org; Sat, 26 Jan 2019 04:41:25 +0000 Received: from [192.168.127.1] (port=54359 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.88 (FreeBSD)) (envelope-from ) id 1gnFmR-000NfQ-Ho; Sat, 26 Jan 2019 04:41:19 +0000 Received: from [127.0.0.1] (port=37027 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1gnFmQ-000OYz-TL; Sat, 26 Jan 2019 04:41:19 +0000 From: Andrew Gierth To: Bruce Momjian Cc: Peter Eisentraut , Alvaro Herrera , =?utf-8?B?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0Lc=?= =?utf-8?B?0L7Qsg==?= , Tom Lane , pgsql-bugs@postgresql.org Subject: Re: psql and readline comments In-Reply-To: <20190126001801.GL13803@momjian.us> (Bruce Momjian's message of "Fri, 25 Jan 2019 19:18:01 -0500") Message-ID: <87womsjbpq.fsf@news-spur.riddles.org.uk> References: <201901141559.ne4yhv2nwsl5@alvherre.pgsql> <82eab8ea-5d9d-efab-dcc8-d7713d2b0645@2ndquadrant.com> <20190126001801.GL13803@momjian.us> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Date: Sat, 26 Jan 2019 04:41:17 +0000 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "Bruce" == Bruce Momjian writes: Bruce> Agreed. I am not sure how someone would conditionally bind M-# Bruce> to -- _only_ in psql, By doing this in .inputrc: $if psql set comment-begin "--" $endif (observe that we set rl_readline_name in order to allow this) But that shouldn't necessarily stop us doing the setting in psql by default - it just needs to be verified that it does compile against the libedit versions people are actually using, and not break anything. (On the libedit on my system, rl_variable_bind ends up trying to bind the variable as a _key_, and I have no idea what effect that would have if any. Note that libedit does not seem to bind M-# by default.) -- Andrew (irc:RhodiumToad)