<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dwarvish.git/src/poem/anthology, branch docs</title>
<subtitle>a (mostly) posix compliant shell and tiny functional programming language
</subtitle>
<link rel='alternate' type='text/html' href='https://git.dwarvish.org/dwarvish.git/'/>
<entry>
<title>Sort output of 'export' and 'alias'</title>
<updated>2024-04-12T03:49:51+00:00</updated>
<author>
<name>Rory Dudley</name>
</author>
<published>2024-04-12T03:49:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dwarvish.org/dwarvish.git/commit/?id=87e4a3da43e7d203d3405f977ce8e93298dd55c3'/>
<id>87e4a3da43e7d203d3405f977ce8e93298dd55c3</id>
<content type='text'>
Sort the output of the built-in 'export' and 'alias' commands, in cases
where all environment variables/aliases are printed out.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sort the output of the built-in 'export' and 'alias' commands, in cases
where all environment variables/aliases are printed out.
</pre>
</div>
</content>
</entry>
<entry>
<title>Capture STDOUT as bytes, and convert to string when necessary</title>
<updated>2024-04-07T05:32:30+00:00</updated>
<author>
<name>Rory Dudley</name>
</author>
<published>2024-04-07T05:32:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dwarvish.org/dwarvish.git/commit/?id=f5db8d64828db756b80b6022322265a2b4f1c11b'/>
<id>f5db8d64828db756b80b6022322265a2b4f1c11b</id>
<content type='text'>
Previously, the recite() function created the 'out' variable, which was
a String, that got passed to the various incant functions, in order to
capture STDOUT in certain situations. In cases where STDOUT was
captured, it was first converted to a String, and then appended to the
'out' variable, by means of String::from_utf8_lossy(). This works for
basic text, however, does NOT work for binary data. This becomes
problematic, when for example, downling a tar file with curl/wget, that
is then piped ('|') to the tar program. Using from_utf8_lossy() in this
case can corrupt the tar file. This patch makes it so that out is stored
as bytes by default, and only converted to a String when necessary.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, the recite() function created the 'out' variable, which was
a String, that got passed to the various incant functions, in order to
capture STDOUT in certain situations. In cases where STDOUT was
captured, it was first converted to a String, and then appended to the
'out' variable, by means of String::from_utf8_lossy(). This works for
basic text, however, does NOT work for binary data. This becomes
problematic, when for example, downling a tar file with curl/wget, that
is then piped ('|') to the tar program. Using from_utf8_lossy() in this
case can corrupt the tar file. This patch makes it so that out is stored
as bytes by default, and only converted to a String when necessary.
</pre>
</div>
</content>
</entry>
<entry>
<title>Handle aliases in read()</title>
<updated>2024-04-05T04:12:14+00:00</updated>
<author>
<name>Rory Dudley</name>
</author>
<published>2024-04-05T04:12:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dwarvish.org/dwarvish.git/commit/?id=1415c8f9b89699000ef8d864ff8f0e1bebca4a5f'/>
<id>1415c8f9b89699000ef8d864ff8f0e1bebca4a5f</id>
<content type='text'>
Instead of handling aliases in the recite() function, which requires two
loops to handle properly with the current implementation, offload
checking for aliases to the read() function.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of handling aliases in the recite() function, which requires two
loops to handle properly with the current implementation, offload
checking for aliases to the read() function.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add better support for aliases</title>
<updated>2024-04-04T06:47:24+00:00</updated>
<author>
<name>Rory Dudley</name>
</author>
<published>2024-04-04T06:47:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dwarvish.org/dwarvish.git/commit/?id=9b3e4dd71ec1491e3580e079e9be1b42117a74c9'/>
<id>9b3e4dd71ec1491e3580e079e9be1b42117a74c9</id>
<content type='text'>
Make sure to interpret alias values as their own poems, since aliases
can be fairly complex.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make sure to interpret alias values as their own poems, since aliases
can be fairly complex.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add docstring comments to all the anthology functions</title>
<updated>2024-03-31T06:50:03+00:00</updated>
<author>
<name>Rory Dudley</name>
</author>
<published>2024-03-31T06:50:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dwarvish.org/dwarvish.git/commit/?id=791b61f97e3ee12dfd765f5e23edd5df527eb803'/>
<id>791b61f97e3ee12dfd765f5e23edd5df527eb803</id>
<content type='text'>
Add docstring comments for all the incant function throughout the
anthology, documenting what each function does, and an example of it's
shell command.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add docstring comments for all the incant function throughout the
anthology, documenting what each function does, and an example of it's
shell command.
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace env!("HOME") with env::var("HOME")</title>
<updated>2024-03-31T05:20:03+00:00</updated>
<author>
<name>Rory Dudley</name>
</author>
<published>2024-03-31T05:20:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dwarvish.org/dwarvish.git/commit/?id=2534e480bf4de2101f390beded67493565913238'/>
<id>2534e480bf4de2101f390beded67493565913238</id>
<content type='text'>
Replaced all (non-test) instances of env!("HOME") with env::var("HOME").
The env! macro should only be used in instances where the environment
variable should be resolved during compile time.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replaced all (non-test) instances of env!("HOME") with env::var("HOME").
The env! macro should only be used in instances where the environment
variable should be resolved during compile time.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add the 'unset' built-in command</title>
<updated>2024-03-31T02:22:47+00:00</updated>
<author>
<name>Rory Dudley</name>
</author>
<published>2024-03-31T02:22:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dwarvish.org/dwarvish.git/commit/?id=b02576d3a00f182394be4bc41a26de50e4b64078'/>
<id>b02576d3a00f182394be4bc41a26de50e4b64078</id>
<content type='text'>
Add the 'unset' command to remove global environment variable
definitions from the shell.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the 'unset' command to remove global environment variable
definitions from the shell.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add the 'alias' built-in command</title>
<updated>2024-03-31T02:15:12+00:00</updated>
<author>
<name>Rory Dudley</name>
</author>
<published>2024-03-31T02:15:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dwarvish.org/dwarvish.git/commit/?id=2439f63a1c0859fd454d4a67dc36b61ad6ab5eb8'/>
<id>2439f63a1c0859fd454d4a67dc36b61ad6ab5eb8</id>
<content type='text'>
The shell now has support for aliases (via alias foo=bar). The 'unalias'
command is also available to remove aliases. Finally,
Environment::aliases was changed to be a HashMap&lt;String, String&gt;,
instead of a Vec&lt;String&gt;.

Since the verse's verb might change (for instance, it is an environment
variable, or an alias), add another check in Poem::recite, which simply
continues, instead of running the spellchecker, if the verb is empty.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The shell now has support for aliases (via alias foo=bar). The 'unalias'
command is also available to remove aliases. Finally,
Environment::aliases was changed to be a HashMap&lt;String, String&gt;,
instead of a Vec&lt;String&gt;.

Since the verse's verb might change (for instance, it is an environment
variable, or an alias), add another check in Poem::recite, which simply
continues, instead of running the spellchecker, if the verb is empty.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add wrapper for global shell environment</title>
<updated>2024-03-31T01:05:23+00:00</updated>
<author>
<name>Rory Dudley</name>
</author>
<published>2024-03-31T01:05:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dwarvish.org/dwarvish.git/commit/?id=d408624afeb0035217d3d327e21b24a62b803f28'/>
<id>d408624afeb0035217d3d327e21b24a62b803f28</id>
<content type='text'>
Instead of having to pass around a bunch of different data structures
for various shell functions, create the wrapper compose::Environment,
which serves as a global shell state. It is configured via
login/profile/rc scripts initially, but can of course be modified
throughout the lifetime of the shell.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of having to pass around a bunch of different data structures
for various shell functions, create the wrapper compose::Environment,
which serves as a global shell state. It is configured via
login/profile/rc scripts initially, but can of course be modified
throughout the lifetime of the shell.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove hard-coded PATH</title>
<updated>2024-03-29T05:26:02+00:00</updated>
<author>
<name>Rory Dudley</name>
</author>
<published>2024-03-29T05:26:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dwarvish.org/dwarvish.git/commit/?id=491d3fbff384d4b04483b54e5bb78d23bb1181c5'/>
<id>491d3fbff384d4b04483b54e5bb78d23bb1181c5</id>
<content type='text'>
Use $PATH, instead of a hard-coded PATH from main(). This means that
there is no longer a need to pass around PATH to
repl()/recite()/path::refresh(), since path::refresh() can call env::var
directly.

Since the hard-coded paths were removed, there needs to be some way to
define $PATH. When running the debug build, dwvsh will look in
'dist/etc/dwvshrc' for the initial environment setup. For the release
target, dwvsh will look in '/etc/dwvshrc'. After the global rc file is
sourced, dwvsh will try to source ~/.dwvshrc if it exists, so users can
extend their environment without root access (assuming a release install).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use $PATH, instead of a hard-coded PATH from main(). This means that
there is no longer a need to pass around PATH to
repl()/recite()/path::refresh(), since path::refresh() can call env::var
directly.

Since the hard-coded paths were removed, there needs to be some way to
define $PATH. When running the debug build, dwvsh will look in
'dist/etc/dwvshrc' for the initial environment setup. For the release
target, dwvsh will look in '/etc/dwvshrc'. After the global rc file is
sourced, dwvsh will try to source ~/.dwvshrc if it exists, so users can
extend their environment without root access (assuming a release install).
</pre>
</div>
</content>
</entry>
</feed>
