<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/shell, branch tilde</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=tilde</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=tilde'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2022-03-24T12:26:01+00:00</updated>
<entry>
<title>ash,hush: use HOME for tab completion and prompts</title>
<updated>2022-03-24T12:26:01+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2022-03-24T11:43:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=3e385d22cc57aacddafe38a1b6bcd55aa71d3c80'/>
<id>urn:sha1:3e385d22cc57aacddafe38a1b6bcd55aa71d3c80</id>
<content type='text'>
ash and hush correctly use the value of HOME for tilde expansion.
However the line editing code in libbb obtains the user's home
directory by calling getpwuid().  Thus tildes in tab completion
and prompts may be interpreted differently than in tilde expansion.

When the line editing code is invoked from a shell make it use the
shell's interpretation of tilde.  This is similar to how GNU readline
and bash collaborate.

function                                             old     new   delta
get_homedir_or_NULL                                   29      72     +43
optschanged                                          119     126      +7
hush_main                                           1204    1211      +7
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 57/0)               Total: 57 bytes

v2: Always check for HOME before trying the password database:  this
    is what GNU readline does.

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
</content>
</entry>
<entry>
<title>ash: let $HOME set home directory of login shell</title>
<updated>2022-03-22T08:12:07+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2022-03-22T08:12:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=af41de68901d48753eb73491d54931a99d1a13b5'/>
<id>urn:sha1:af41de68901d48753eb73491d54931a99d1a13b5</id>
<content type='text'>
In busybox-w32 the shell option '-l' sets HOME to the user's
home directory, as determined by a call to GetUserProfileDirectory().
This is differs from how shells work on Unix, where HOME is usually
set by login(1).

Allow the user to override this behaviour by setting HOME before
starting the shell.  If HOME isn't set or contains an empty string
the previous behaviour applies.  If HOME is set to a non-empty string
the user should ensure that it represents a valid absolute path.

(GitHub issue #244)
</content>
</entry>
<entry>
<title>ash: try harder to avoid ctrl-c issue</title>
<updated>2022-02-27T12:56:21+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2022-02-27T12:56:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=96c104a61c9a75c478eb6e830653a830d72fe8fb'/>
<id>urn:sha1:96c104a61c9a75c478eb6e830653a830d72fe8fb</id>
<content type='text'>
Commit 96a647690 (ash: prevent issue with ctrl-c and echo in loop)
attempted to fix the problem that interrupting a loop like:

   while true; do echo hello; done

caused the shell to exit.  However, it wasn't completely effective
and it only applied to echo and printf, not other builtins.

Revert 96a647690 and instead don't call raise_interrupt() from
crtl_handler() for the foreground interactive shell.
</content>
</entry>
<entry>
<title>ash: workaround for UCRT bug</title>
<updated>2022-02-12T12:59:04+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2022-02-12T12:59:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=c5270ab0c1bfe1f79bc57650da1091cd7358c689'/>
<id>urn:sha1:c5270ab0c1bfe1f79bc57650da1091cd7358c689</id>
<content type='text'>
There seems to be a bug in UCRT such that if a process has been
started by passing a non-NULL environment block to CreateProcess()
any subsequent call to spawnve() with a non-NULL environment pointer
results in a crash.

Commit 5b48ca53b (win32: pass NULL to spawnve, not environ) fixed
the problem in busybox-w32 for those cases where a NULL environment
pointer was sufficient.  It didn't handle the case where the shell
passes a modified environment to its child.

All calls to spawnve() in the shell occur in a process which will
terminate whether or not the call succeeds.  It therefore doesn't
matter if we mess with the environment of this process to allow
spawnve() to be passed a NULL environment pointer.  Do this for
UCRT builds only.

(GitHub issue #234)
</content>
</entry>
<entry>
<title>Merge busybox into merge</title>
<updated>2022-02-09T09:05:39+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2022-02-09T09:03:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=492d0a7492a57fe8f02c766e25960b0ce0d88759'/>
<id>urn:sha1:492d0a7492a57fe8f02c766e25960b0ce0d88759</id>
<content type='text'>
Fix conflicts in reset and ash.

Redefine the new safe_read_key() as a reference to read_key().

Disable SHA256_HWACCEL.
</content>
</entry>
<entry>
<title>*: slap on a few ALIGN_PTR where appropriate</title>
<updated>2022-02-06T19:07:12+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2022-02-06T19:07:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=987be932ed3cbea56b68bbe85649191c13b66015'/>
<id>urn:sha1:987be932ed3cbea56b68bbe85649191c13b66015</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>*: slap on a few ALIGN* where appropriate</title>
<updated>2022-02-06T18:53:10+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2022-02-06T18:53:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=ca466f385ac985a8b3491daa9f326dc480cdee70'/>
<id>urn:sha1:ca466f385ac985a8b3491daa9f326dc480cdee70</id>
<content type='text'>
The result of looking at "grep -F -B2 '*fill*' busybox_unstripped.map"

function                                             old     new   delta
.rodata                                           108586  108460    -126
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-126)           Total: -126 bytes
   text	   data	    bss	    dec	    hex	filename
 970412	   4219	   1848	 976479	  ee65f	busybox_old
 970286	   4219	   1848	 976353	  ee5e1	busybox_unstripped

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash,hush: fix handling of SIGINT while waiting for interactive input</title>
<updated>2022-01-17T10:46:23+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2022-01-17T02:02:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=12566e7f9b5e5c5d445bc4d36991d134b431dc6c'/>
<id>urn:sha1:12566e7f9b5e5c5d445bc4d36991d134b431dc6c</id>
<content type='text'>
function                                             old     new   delta
lineedit_read_key                                    160     237     +77
__pgetc                                              522     589     +67
fgetc_interactive                                    244     309     +65
safe_read_key                                          -      39     +39
read_key                                             588     607     +19
record_pending_signo                                  23      32      +9
signal_handler                                        75      81      +6
.rodata                                           104312  104309      -3
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 6/1 up/down: 282/-3)            Total: 279 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>shell: add comments about SIGINT-related problems</title>
<updated>2022-01-16T22:54:46+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2022-01-16T22:54:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=a277506a64404e6c4472ff89c944c4f353db1c33'/>
<id>urn:sha1:a277506a64404e6c4472ff89c944c4f353db1c33</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>libbb: invert the meaning of SETUP_ENV_NO_CHDIR -&gt; SETUP_ENV_CHDIR</title>
<updated>2022-01-13T11:50:48+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2022-01-13T11:50:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=931c55f9e2b41473132683488820c6fb7c47506b'/>
<id>urn:sha1:931c55f9e2b41473132683488820c6fb7c47506b</id>
<content type='text'>
Double negatives are hard to grok.

function                                             old     new   delta
login_main                                           986     988      +2
su_main                                              474     470      -4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 2/-4)               Total: -2 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
</feed>
