<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/generate-version.sh, branch 1.24.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.24.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.24.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2023-05-18T15:50:48Z</updated>
<entry>
<title>slave: unset TERM_PROGRAM{,_VERSION}</title>
<updated>2023-05-18T15:50:48Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-05-12T12:55:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a2f765b72a6612758a034a5b0c24ec08625db1a3'/>
<id>urn:sha1:a2f765b72a6612758a034a5b0c24ec08625db1a3</id>
<content type='text'>
Foot’s policy is to not set environment variables that identifies
it (except the well-known and established `TERM` variable).

We encourage applications to use terminfo to determine capabilities,
or terminal queries, when available. Or, at least use terminal queries
to detect the terminal and its version.

Setting environment variables is a bad idea since they are inherited
by all applications started by the terminal (which is the whole
point). But, this includes other terminal emulators, making it very
possible a terminal emulator gets mis-detected just because it was
started from another terminal.

Since there are a couple of terminal emulators that _do_ set
TERM_PROGRAM and TERM_PROGRAM_VERSION, unset these environment
variables to avoid being misdetected.

Closes #1349
</content>
</entry>
<entry>
<title>slave: set $TERM_PROGRAM and $TERM_PROGRAM_VERSION environment variables</title>
<updated>2023-03-20T14:40:36Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2023-03-20T14:40:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5b2f02d826d8043b6b89860c56802ea5fed0f3bd'/>
<id>urn:sha1:5b2f02d826d8043b6b89860c56802ea5fed0f3bd</id>
<content type='text'>
These are already being set by iTerm2, WezTerm, tmux and likely some
others. Even though using yet more environment variables seems rather
questionable, if we don't set these we run the risk of inheriting them
from other terminals.

See also:

* https://gitlab.com/gnachman/iterm2/-/blob/97a6078df8e822da165e91737a01c0b9e115dd16/sources/PTYSession.m#L2568-2570
* https://github.com/tmux/tmux/blob/1d0f68dee9f71c504e03616fa472a408a6caa49b/environ.c#L263-L264
* https://github.com/search?q=TERM_PROGRAM&amp;type=code
</content>
</entry>
<entry>
<title>generate-version: exit early if argc is not 3</title>
<updated>2022-02-04T13:40:16Z</updated>
<author>
<name>Pranjal Kole</name>
<email>pranjal.kole7@gmail.com</email>
</author>
<published>2022-02-04T13:40:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a9bbbda1c7f54dc5b903443b45ceacec1ddeed38'/>
<id>urn:sha1:a9bbbda1c7f54dc5b903443b45ceacec1ddeed38</id>
<content type='text'>
Print usage information and exit if the number of arguments is not 3.
</content>
</entry>
<entry>
<title>generate-version: handle git repo not having any tags</title>
<updated>2021-10-11T18:11:41Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-10-11T18:11:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7d30bccad86634518045e52c62dab2d512524770'/>
<id>urn:sha1:7d30bccad86634518045e52c62dab2d512524770</id>
<content type='text'>
</content>
</entry>
<entry>
<title>meson: run generate_version.sh in a C locale</title>
<updated>2021-08-25T17:12:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-08-25T17:12:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=88b2808dcd3a01ced02079bf381f204e10b7946b'/>
<id>urn:sha1:88b2808dcd3a01ced02079bf381f204e10b7946b</id>
<content type='text'>
Previously, only the date command inside the script was run with
LC_TIME=C.

But there’s no reason to be that conservative; we absolutely do not
want _anything_ in that script to generate locale dependent output.
</content>
</entry>
<entry>
<title>generate-version: fix regression where a tagged version was parsed wrong</title>
<updated>2021-06-25T06:35:41Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-25T06:33:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=bc6b4d7b8ab8bee7a5c50c2eeba8fd939487042b'/>
<id>urn:sha1:bc6b4d7b8ab8bee7a5c50c2eeba8fd939487042b</id>
<content type='text'>
The regexps didn’t work when the “extra” portion of “git describe” was
missing.
</content>
</entry>
<entry>
<title>generate-version: add a define for “extra” version information</title>
<updated>2021-06-13T15:19:35Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-13T07:46:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=efd023ad327c51bafa5c7df6d6f35796babce4f8'/>
<id>urn:sha1:efd023ad327c51bafa5c7df6d6f35796babce4f8</id>
<content type='text'>
This will be set to “rrr-gNNNNNNN” when building from git, and the
empty string otherwise.
</content>
</entry>
<entry>
<title>csi: secondary DA: do not pretend we're xterm</title>
<updated>2020-07-24T15:47:47Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-24T15:47:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=60984e7a2476e81ffe9d356d6e4cb11e218d812e'/>
<id>urn:sha1:60984e7a2476e81ffe9d356d6e4cb11e218d812e</id>
<content type='text'>
Previously, our secondary DA response indicated a) VT420, b) an XTerm
version number.

Now, we indicate VT220 (which corresponds to the primary DA response),
and we report foot's version number as MMmmpp. I.e major, minor and
patch versions, using two digits.

E.g. 1.4.2 is encoded as 010402
</content>
</entry>
<entry>
<title>generate-version: check for .git directory in *src* dir</title>
<updated>2020-03-06T20:18:31Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-03-06T20:18:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f5ceb958cd51418998100bcd6f69964d95807246'/>
<id>urn:sha1:f5ceb958cd51418998100bcd6f69964d95807246</id>
<content type='text'>
Instead of trying to run `git --rev-parse --is-inside-work-tree`,
check if there's a .git directory under the source directory.

This should fix an issue where we incorrectly decided we where in a
foot git clone when we're just a subdirectory under another
repository.
</content>
</entry>
<entry>
<title>generate-version: redirect *both* stdout and stderr to /dev/null</title>
<updated>2019-11-27T20:19:59Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-11-27T20:19:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5b6c941b0a40a425f24909c389a4e34ee57feb83'/>
<id>urn:sha1:5b6c941b0a40a425f24909c389a4e34ee57feb83</id>
<content type='text'>
</content>
</entry>
<entry>
<title>generate-version: handle builds that aren't git clones</title>
<updated>2019-11-24T12:59:33Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-11-24T12:59:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=34f699657a8456165e2456c3e014dd93c5d5813d'/>
<id>urn:sha1:34f699657a8456165e2456c3e014dd93c5d5813d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>meson: fix version generation from git</title>
<updated>2019-10-19T20:09:52Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-10-19T20:09:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=286db002f8c85fee0d65d05c845fb1878fcd11a6'/>
<id>urn:sha1:286db002f8c85fee0d65d05c845fb1878fcd11a6</id>
<content type='text'>
run_command() was only run at configure time, meaning the generated
version (that was passed on to the sources via -DFUZZEL_VERSION)
became stale.

Fix by implementing a shell script that generates a header file, and
wrap this in a custom target that is run every time (but the generated
file is only updated when the version changes)
</content>
</entry>
</feed>
