[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch] feature: 'backupdir' shell expansion
From: |
Benno Schulenberg |
Subject: |
Re: [patch] feature: 'backupdir' shell expansion |
Date: |
Thu, 20 Feb 2020 12:12:01 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
[Please answer only to the list. I'm CC'ing you because I'm not sure
whether you are subscribed.]
Op 20-02-2020 om 00:01 schreef Mert Akengin:
> Attached patch allows user to set 'backupdir' option
> with environment variables
Why? What problem does it solve? Does it make nano easier to configure?
(I would say the opposite: it makes it more complicated: the user might
be unaware that an environment variable is overriding what they have
specified in their .nanorc file. And what's worse: your implementation
would even override a --backupdir command-line option.)
> I am thinking of submitting follow-up patch to either (or all):
>
> a) create directory/directories with `mkdir(3)`
No. Otherwise any typo would just create a new directory. When
specifying a directory, the user must be precise.
> b) just show error message at the bottom instead of failing.
No. When something invalid is specified on the command line, nano
refuses to start, because most likely the user wants to correct
their command.
> ps(2). Also added _XOPEN_SOURCE macro checking for wordexp stuff.
In nano, all other checking of environment variables uses 'getenv'.
Does 'wordexp' have advantages?
> If you guys see anything odd/wrong. Please do not hesistate to
> reply/feedback. Since I am not very familiar with the process :)
Normally environment variables have names in all uppercase.
> RUN apt install -y \
> git clang build-essential \
> automake autoconf autopoint \
> gettext pkg-config texinfo groff \
> libncursesw5-dev libslang2-dev
There is no need for libslang when you have libncurses. Avoid
libslang whenever possible.
Benno
signature.asc
Description: OpenPGP digital signature