<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dwarvish.git/src/poem, branch compose</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>Don't interpret environment variables in single quoted strings</title>
<updated>2024-03-31T06:14:46+00:00</updated>
<author>
<name>Rory Dudley</name>
</author>
<published>2024-03-31T06:14:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dwarvish.org/dwarvish.git/commit/?id=f03f4e0fcf62c9b3267bc5d8b62068d89ec593cd'/>
<id>f03f4e0fcf62c9b3267bc5d8b62068d89ec593cd</id>
<content type='text'>
Previously, if an environment variable was given in a string, such as:
'$PATH' or "$PATH", both would be replaced with the value of $PATH from
the environment. However, for single quotes strings, any values inside
should be taken at face value. In other words, echo '$PATH' should
simply write out: $PATH, and not whatever environment value $PATH
happens to be. This patch replaced '$' in single quoted strings with
the ASCII shift out (x0e) character. Any ASCII SO placeholder is
replaced with a '$' in recite(), after the environment variables have
been accounted for.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, if an environment variable was given in a string, such as:
'$PATH' or "$PATH", both would be replaced with the value of $PATH from
the environment. However, for single quotes strings, any values inside
should be taken at face value. In other words, echo '$PATH' should
simply write out: $PATH, and not whatever environment value $PATH
happens to be. This patch replaced '$' in single quoted strings with
the ASCII shift out (x0e) character. Any ASCII SO placeholder is
replaced with a '$' in recite(), after the environment variables have
been accounted for.
</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>Better comments in recite()</title>
<updated>2024-03-31T05:06:41+00:00</updated>
<author>
<name>Rory Dudley</name>
</author>
<published>2024-03-31T05:06:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dwarvish.org/dwarvish.git/commit/?id=90b4e0226d49f4f61300f91b6a9b1e7978bd2f9b'/>
<id>90b4e0226d49f4f61300f91b6a9b1e7978bd2f9b</id>
<content type='text'>
Add some better comments/move around existing comments to make some of
the actions in recite() more clear.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add some better comments/move around existing comments to make some of
the actions in recite() more clear.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a subtle bug when running interal poems</title>
<updated>2024-03-31T04:34:38+00:00</updated>
<author>
<name>Rory Dudley</name>
</author>
<published>2024-03-31T04:34:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dwarvish.org/dwarvish.git/commit/?id=75872c78614abbdfec6b5fdd5ada1292d76fd5d8'/>
<id>75872c78614abbdfec6b5fdd5ada1292d76fd5d8</id>
<content type='text'>
This patch fixes a bug for internal poems, where the output would always
get split on newlines, regardless of the verse's verb. This breaks
things like 'export DIR=`ls`', since output from `ls` might have
newlines, meaning that $DIR will only contains the first item from the
`ls` command. This will only perform the newline split when sending the
output to a non-builtin command.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes a bug for internal poems, where the output would always
get split on newlines, regardless of the verse's verb. This breaks
things like 'export DIR=`ls`', since output from `ls` might have
newlines, meaning that $DIR will only contains the first item from the
`ls` command. This will only perform the newline split when sending the
output to a non-builtin command.
</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>Fix the build</title>
<updated>2024-03-31T01:07:45+00:00</updated>
<author>
<name>Rory Dudley</name>
</author>
<published>2024-03-31T01:07:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dwarvish.org/dwarvish.git/commit/?id=bc64d1917829623cea447871c548950460559232'/>
<id>bc64d1917829623cea447871c548950460559232</id>
<content type='text'>
Need to include line to import compose::Environment.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Need to include line to import compose::Environment.
</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>
<entry>
<title>The anthology module</title>
<updated>2024-03-29T03:05:00+00:00</updated>
<author>
<name>Rory Dudley</name>
</author>
<published>2024-03-29T03:05:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dwarvish.org/dwarvish.git/commit/?id=14a74aea0f02da53e0f61c572da2c5244ed80551'/>
<id>14a74aea0f02da53e0f61c572da2c5244ed80551</id>
<content type='text'>
The anthology module was added to run built-in commands. The 'cd' and
'exit' built-ins were moved from the main recite() loop to this module.
Additionally, the 'export' and 'source' built-ins were added.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The anthology module was added to run built-in commands. The 'cd' and
'exit' built-ins were moved from the main recite() loop to this module.
Additionally, the 'export' and 'source' built-ins were added.
</pre>
</div>
</content>
</entry>
</feed>
