<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/shell, branch fix_backslash</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=fix_backslash</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=fix_backslash'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2020-08-13T13:58:01+00:00</updated>
<entry>
<title>win32: use built-in applets for non-existent binaries with Unix-style paths</title>
<updated>2020-08-13T13:58:01+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2020-08-13T13:27:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=41ef232fc522d91f29931ea4ee547432ca8899ee'/>
<id>urn:sha1:41ef232fc522d91f29931ea4ee547432ca8899ee</id>
<content type='text'>
Shell scripts moved from Unix may contain hard-coded paths to
binaries such as /bin/sh.  A recent commit made it possible to
execute such binaries reliably, but that does require them to be
installed.  As an alternative solution:  if a binary with a
standard Unix path prefix can't be found but is available as a
built-in applet, run the applet.

Add the function unix_path() to detect paths starting with /bin,
/usr/bin, /sbin or /usr/sbin.

Use this function in:

- the 'which' applet
- shellexec(), describe_command() and find_command() in ash
- mingw_spawn_1()

See GitHub issue #195.
</content>
</entry>
<entry>
<title>win32: handle Unix-style absolute paths for executables</title>
<updated>2020-08-13T13:58:01+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2020-08-13T12:56:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=6059723900f2af1fbd394c457d1feae342e344f6'/>
<id>urn:sha1:6059723900f2af1fbd394c457d1feae342e344f6</id>
<content type='text'>
As noted in commit 548ec7045 (win32: interpret absolute paths as
relative to %SYSTEMDRIVE%) a path starting with a '/' in the Unix
world is treated as relative to the current drive by Windows.
To avoid ambiguity that commit considered certain such paths to
be relative to %SYSTEMDRIVE%.  Extend this to paths representing
executables.

Add the functions need_system_drive() and auto_add_system_drive()
to detect the need for a system drive prefix and to add it if
necessary.  Use these functions in:

- the 'which' applet
- the find_executable() function
- tab-completion code
- PATH look-up, shellexec(), describe_command() and find_command() in ash
- parse_interpreter() and mingw_spawn_1()

With these changes executable paths starting with a slash are
handled consistently, whatever the current drive.
</content>
</entry>
<entry>
<title>win32: use a static buffer in get_system_drive()</title>
<updated>2020-08-13T13:58:01+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2020-08-13T10:43:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=7d639339e0c46311f8873d560e6f168e71473cd9'/>
<id>urn:sha1:7d639339e0c46311f8873d560e6f168e71473cd9</id>
<content type='text'>
Allocate static storage for the system drive string instead of
making a new allocation on every call.  This is easier to manage.

Adds 16 bytes.
</content>
</entry>
<entry>
<title>win32: code shrink</title>
<updated>2020-08-13T13:58:01+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2020-08-13T10:36:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=258ad6a1d52f1811f9de1d6b976f3797f5b31a2b'/>
<id>urn:sha1:258ad6a1d52f1811f9de1d6b976f3797f5b31a2b</id>
<content type='text'>
Add a new function, has_path(), to detect that an executable name
doesn't require a path look-up.

Also, since is_absolute_path() is now only used in shell/ash.c move
its definition there from include/mingw.h.

Saves 128 bytes.
</content>
</entry>
<entry>
<title>Merge branch 'busybox' into merge</title>
<updated>2020-07-09T12:10:58+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2020-07-09T12:10:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=9c0b2f7020d7c30b21a930ef54be632e092e533b'/>
<id>urn:sha1:9c0b2f7020d7c30b21a930ef54be632e092e533b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ash: tidy code, no functional change</title>
<updated>2020-07-09T08:29:59+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2020-07-09T08:29:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=a8c6e20e332a9e11a9d28cd6770eadb9c9d73cb7'/>
<id>urn:sha1:a8c6e20e332a9e11a9d28cd6770eadb9c9d73cb7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ash: fix shell options</title>
<updated>2020-07-07T16:02:58+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2020-07-07T16:02:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=0ed071907c1a1e7bab8c0e808a053b907b20783c'/>
<id>urn:sha1:0ed071907c1a1e7bab8c0e808a053b907b20783c</id>
<content type='text'>
The Windows-specific shell options winxp, noconsole and nocaseglob
have had the wrong indices in optlist since the merge with upstream
BusyBox in commit 517cf74f6.
</content>
</entry>
<entry>
<title>ash: improve handling of UNC paths</title>
<updated>2020-06-30T14:52:54+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2020-06-30T14:44:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=90b695c255eeeddb2bb90e5cacbd3253663bfa7f'/>
<id>urn:sha1:90b695c255eeeddb2bb90e5cacbd3253663bfa7f</id>
<content type='text'>
Be more strict about identifying UNC paths in unc_root_len().

In updatepwd() in ash:

- Skip duplicate leading slashes unless the directory is a UNC path.
- Rewrite detection and handling of the five possible types of path.

This improves cases like 'cd ///' and 'cd /xyz' when the current
directory is a UNC path.

See GitHub issue #192.
</content>
</entry>
<entry>
<title>ash: avoid duplicated slashes in output of type/command builtins</title>
<updated>2020-06-29T10:46:43+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2020-06-29T10:46:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=9114e110a59a77909132af6d97bccdf5056adfa4'/>
<id>urn:sha1:9114e110a59a77909132af6d97bccdf5056adfa4</id>
<content type='text'>
Microsoft developers have a penchant for adding trailing slashes to
entries in PATH:

   C:/Windows/System32/WindowsPowerShell/v1.0/
   C:/Windows/System32/OpenSSH/

The 'type' and 'command -v' shell builtins return paths with duplicated
slashes for executables in those directories.  See GitHub issue #191.

Bonus fixes:

- handle backslashes as well as slashes in concat_path_file()
- convert backslashes to slashes in the output of 'type', 'command -v'
</content>
</entry>
<entry>
<title>nologin: make it possible to build it as single applet</title>
<updated>2020-06-24T13:05:22+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2020-06-24T11:39:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=67e1529b921416d6c3f33fb43691bc9919e3eacc'/>
<id>urn:sha1:67e1529b921416d6c3f33fb43691bc9919e3eacc</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
</feed>
