<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qcd, branch master</title>
<subtitle>Define shortcuts to directories for quick `cd`s</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/qcd/'/>
<entry>
<title>qcd: Update comment about slash escaping</title>
<updated>2017-10-04T21:28:26+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-10-04T21:28:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/qcd/commit/?id=26fc1251a1abc506ec7fe0aa4ae4c6fbe937c899'/>
<id>26fc1251a1abc506ec7fe0aa4ae4c6fbe937c899</id>
<content type='text'>
I had forgotten to update the comment when I wrote
357eb2484bf58ed202b072b94fff54d81fe0fb49.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I had forgotten to update the comment when I wrote
357eb2484bf58ed202b072b94fff54d81fe0fb49.
</pre>
</div>
</content>
</entry>
<entry>
<title>Homebrew/qcd.rb: Update to v0.2.1</title>
<updated>2017-10-04T21:17:25+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-10-04T21:17:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/qcd/commit/?id=080a4b87f408e8c7c110c42d623a584c74962ac9'/>
<id>080a4b87f408e8c7c110c42d623a584c74962ac9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>CHANGELOG: Describe changes for v0.2.1</title>
<updated>2017-10-04T21:13:33+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-10-04T21:13:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/qcd/commit/?id=205905dcf42329b85dcf7799e3c8b41fed9fde6d'/>
<id>205905dcf42329b85dcf7799e3c8b41fed9fde6d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'allow-database-file-to-be-symlinked'</title>
<updated>2017-10-04T21:10:05+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-10-04T21:10:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/qcd/commit/?id=38351c372bf3331986e5392311e4ec377d3c9fe4'/>
<id>38351c372bf3331986e5392311e4ec377d3c9fe4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>qcd: Allow database file to be symlinked</title>
<updated>2017-10-04T21:04:55+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-10-04T21:04:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/qcd/commit/?id=607b3d30cbeb6b046b54c3d266b32331212392e8'/>
<id>607b3d30cbeb6b046b54c3d266b32331212392e8</id>
<content type='text'>
The `sed -i` calls in the "change" and "remove" commands will overwrite
a symlinked database file with a real file, destroying the symlink.

To prevent this and allow the database file to be symlinked (to, say,
allow it to be tracked in a dotfiles repo), use a redirection technique
as described here:
https://www.cyberciti.biz/faq/howto-prevent-sed-i-from-destroying-symlinks-on-linux-unix/

Using this alternate method, we preserve symlinks, and even create a
backup file as before.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The `sed -i` calls in the "change" and "remove" commands will overwrite
a symlinked database file with a real file, destroying the symlink.

To prevent this and allow the database file to be symlinked (to, say,
allow it to be tracked in a dotfiles repo), use a redirection technique
as described here:
https://www.cyberciti.biz/faq/howto-prevent-sed-i-from-destroying-symlinks-on-linux-unix/

Using this alternate method, we preserve symlinks, and even create a
backup file as before.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'fix-change-command-sed-substitution-escaping-for-bash-4'</title>
<updated>2017-10-04T21:01:31+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-10-04T21:01:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/qcd/commit/?id=c66735aced2373be9902d35c7f45267c8257ba21'/>
<id>c66735aced2373be9902d35c7f45267c8257ba21</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>qcd: Update slash-escapes in change command for Bash 4</title>
<updated>2017-10-04T20:55:55+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-10-04T20:55:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/qcd/commit/?id=357eb2484bf58ed202b072b94fff54d81fe0fb49'/>
<id>357eb2484bf58ed202b072b94fff54d81fe0fb49</id>
<content type='text'>
I was getting this error when running `qcd`'s change command on a
machine using Bash 4.4.12:

    $ sed -E "s/^shortcut       .+$/shortcut    ${p//\//\/}/" .config/qcd/database
    sed: 1: "s/^shortcut	.+$/shortcut ...": bad flag in substitute command: 'U'

The solution, as described here:
https://stackoverflow.com/questions/27787536/how-to-pass-a-variable-containing-slashes-to-sed/27788661#27788661
is to add an extra backslash to the parameter expansion. This appears to
work on both Bash 3 and 4 in my local manual tests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I was getting this error when running `qcd`'s change command on a
machine using Bash 4.4.12:

    $ sed -E "s/^shortcut       .+$/shortcut    ${p//\//\/}/" .config/qcd/database
    sed: 1: "s/^shortcut	.+$/shortcut ...": bad flag in substitute command: 'U'

The solution, as described here:
https://stackoverflow.com/questions/27787536/how-to-pass-a-variable-containing-slashes-to-sed/27788661#27788661
is to add an extra backslash to the parameter expansion. This appears to
work on both Bash 3 and 4 in my local manual tests.
</pre>
</div>
</content>
</entry>
<entry>
<title>Homebrew/qcd.rb: Update to v0.2.0</title>
<updated>2016-12-04T00:42:24+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2016-12-04T00:42:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/qcd/commit/?id=d72c0c18af130dac31329bdafb08a8ea48b0a669'/>
<id>d72c0c18af130dac31329bdafb08a8ea48b0a669</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>CHANGELOG: Describe changes for v0.2.0</title>
<updated>2016-12-04T00:37:31+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2016-12-04T00:37:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/qcd/commit/?id=759aadf74a8b742cee19f0f4ef0c9041388fb6ae'/>
<id>759aadf74a8b742cee19f0f4ef0c9041388fb6ae</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>qcd: Add option to list shortcuts</title>
<updated>2016-12-04T00:34:31+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2016-12-04T00:34:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/qcd/commit/?id=34fa3b6057ac0d31da4fa3f03d5c1b3746a2339e'/>
<id>34fa3b6057ac0d31da4fa3f03d5c1b3746a2339e</id>
<content type='text'>
Sometimes it's helpful to list the shortcuts you've added to help you
remember what they were. I had been doing `cat ~/.config/qcd/database`
for this, but it's nice to have it as part of the `qcd` command and also
to not have to type all that.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sometimes it's helpful to list the shortcuts you've added to help you
remember what they were. I had been doing `cat ~/.config/qcd/database`
for this, but it's nice to have it as part of the `qcd` command and also
to not have to type all that.
</pre>
</div>
</content>
</entry>
</feed>
