Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16667

Re: bashbug's default editor

Path csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Ángel <angel@16bits.net>
Newsgroups gnu.bash.bug
Subject Re: bashbug's default editor
Date Sat, 01 Aug 2020 01:15:28 +0200
Lines 62
Approved bug-bash@gnu.org
Message-ID <mailman.411.1596237339.2739.bug-bash@gnu.org> (permalink)
References <20200731101458.2102eada@delli.fritz.box> <4381b377-bb75-acbf-cad0-3f18f84cea11@case.edu> <b3111b6a-73da-31db-104d-0ac59ec03e2e@archlinux.org> <63cea231-0134-0c79-fa10-ec2b49a395e5@case.edu> <116daa3b-4100-4682-542b-ea18503e448e@archlinux.org> <1596237328.1058.26.camel@16bits.net>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset="ISO-8859-15"
Content-Transfer-Encoding quoted-printable
X-Trace usenet.stanford.edu 1596237340 30899 209.51.188.17 (31 Jul 2020 23:15:40 GMT)
X-Complaints-To action@cs.stanford.edu
To bug-bash@gnu.org
Envelope-to bug-bash@gnu.org
In-Reply-To <116daa3b-4100-4682-542b-ea18503e448e@archlinux.org>
Received-SPF pass client-ip=199.195.249.9; envelope-from=angel@16bits.net; helo=mailer.hiddenmail.net
X-detected-operating-system by eggs.gnu.org: First seen = 2020/07/31 19:15:34
X-ACL-Warn Detected OS = Linux 3.11 and newer [fuzzy]
X-Spam_score_int -18
X-Spam_score -1.9
X-Spam_bar -
X-Spam_report (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action no action
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <1596237328.1058.26.camel@16bits.net>
X-Mailman-Original-References <20200731101458.2102eada@delli.fritz.box> <4381b377-bb75-acbf-cad0-3f18f84cea11@case.edu> <b3111b6a-73da-31db-104d-0ac59ec03e2e@archlinux.org> <63cea231-0134-0c79-fa10-ec2b49a395e5@case.edu> <116daa3b-4100-4682-542b-ea18503e448e@archlinux.org>
Xref csiph.com gnu.bash.bug:16667

Show key headers only | View raw


On 2020-07-31 at 11:26 -0400, Eli Schwartz wrote:
> In the sentence in the bashbug manpage, does the word "default" refer to
> the probing or what happens when probing fails?
> 
> My belief is that people reading the manpage will understand it to mean
> the former (more natural reading).
> 
> Your belief seems to be that people will understand it to mean the
> latter (I don't feel the sentence conveys this).
> 
> ...
> 
> The OP here seems to have interpreted it the way I did. So clearly it's
> confusing to at least 2 people out of millions.


I agree with the OP and Eli.
This is not a bug against the code, but against the documentation, and I
do think there is an issue here.


We are in the context of a software program and its configuration. A
phrase following the pattern
> If <configuration option> is not set (...) defaults to <valid value>.

is commonly used to mean that the program will act as if <configuration
option> was set to <valid value>

Here it gets a bit odd, since the part about "bashbug attempting to
locate a number of alternative editors, including emacs" adds no value.
In fact, the whole thing about emacs and vi there seems of little use
(maybe it was added to please members of both cults?), unless you
document the actual algorithm the user just knows that it will open a
random editor.

I suggest the following wording:
> EDITOR Specifies the preferred editor. If EDITOR is not set, bashbug
> will attempt to locate some common editors on the system and choose
> one for you.

It's still a black box, but at least doesn't distract about emacs or vi.
If you don't like what bashbug choose, you should have picked one
yourself. :)


While poking at $EDITOR defaults, vim should probably be added to the
list, somewhere.

For those interested, here is the actual guessing code:
https://git.savannah.gnu.org/cgit/bash.git/tree/support/bashbug.sh#n122

I'm a bit surprised by the hardcoded paths, actually. I understand it
may not want to use something like Debian's which may not be generally
available, but I was expecting a loop trying to exec alternatives would
work, even in the sh mode. I wasn't expecting exec to finish the parent
script rather than a function. :/

Best regards



Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: bashbug's default editor Ángel <angel@16bits.net> - 2020-08-01 01:15 +0200

csiph-web