Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] _units: Correct the path to the units data file on Debian with units 2.00 and newer.
- X-seq: zsh-workers 46044
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] _units: Correct the path to the units data file on Debian with units 2.00 and newer.
- Date: Fri, 12 Jun 2020 09:04:18 +0000
- In-reply-to: <20200606060645.10772-1-danielsh@tarpaulin.shahaf.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20200606060645.10772-1-danielsh@tarpaulin.shahaf.local2>
Daniel Shahaf wrote on Sat, 06 Jun 2020 06:06 +0000:
> ---
> units.dat was renamed definitions.units in 2013 or earlier. I've fixed
> the path for Debian, but don't know whether any of the other paths
> should be fixed too.
I've had a chance to verify the FreeBSD path has changed too. While
there, I've rearranged the patch so the new paths come first.
diff --git a/Completion/Unix/Command/_units b/Completion/Unix/Command/_units
index bea77ae67..78abf4191 100644
--- a/Completion/Unix/Command/_units
+++ b/Completion/Unix/Command/_units
@@ -40,10 +40,13 @@ local -a testfiles
testfiles=(
/usr/share/units.dat # GNU on Fedora
/usr/share/units/units.dat # on gentoo
- /usr/share/misc/units.dat # on Debian
+ /usr/share/units/definitions.units # on Debian, units 2.00 and newer
/usr/local/share/units.dat # GNU DIY install
/usr/share/lib/unittab # Solaris
- /usr/share/misc/units.lib # BSD
+ /usr/share/misc/definitions.units # BSD (e.g., FreeBSD 12.1)
+
+ /usr/share/misc/units.dat # on Debian, units 1.88 and older
+ /usr/share/misc/units.lib # BSD (e.g., FreeBSD 9.1)
)
datfile=${opt_args[-f]:-${opt_args[--file]}}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author