D12621: Export KONSOLE_VERSION as an environment variable
Ahmad Samir
noreply at phabricator.kde.org
Thu May 3 18:15:50 UTC 2018
ahmadsamir added a comment.
In D12621#257530 <https://phabricator.kde.org/D12621#257530>, @hindenburg wrote:
> Ok I should have explained better; do they want XX.YY.ZZ or something else? I notice xterm and vte just use a # (without .)
They didn't actually ask for this change (the upstream issue I opened to notify upstream of adding support for DECSCUSR was closed as there's no easy way for upstream to test the version of the konsole terminal they're running under).
XTerm doesn't seem to have point releases, so version (patch) numbers don't have dots at all.
As you indicated, VTE exports the version as a numeric string without the . ; this seems reasonable as this makes much easier to use the version env var in an arithmetic expression in the shell (bash's arithmetic operators only support comparing between integers).
Even bash has BASH_VERSINFO which is an array, for example on my setup:
BASH_VERSINFO=([0]="4" [1]="4" [2]="19" [3]="1" [4]="release" [5]="x86_64-redhat-linux-gnu")
So it does make sense to export the konsole version as e.g.:
180770
if you agree I'll update the diff.
REPOSITORY
R319 Konsole
REVISION DETAIL
https://phabricator.kde.org/D12621
To: ahmadsamir, #konsole, hindenburg
Cc: #konsole, herrold, ngraham, hindenburg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20180503/c8abd9bd/attachment.html>
More information about the konsole-devel
mailing list