<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dw="https://www.dreamwidth.org">
  <id>tag:dreamwidth.org,2012-03-19:1579314</id>
  <title>The Disparate Musings of Pixie</title>
  <subtitle>pinterface</subtitle>
  <author>
    <name>pinterface</name>
  </author>
  <link rel="alternate" type="text/html" href="https://pinterface.dreamwidth.org/"/>
  <link rel="self" type="text/xml" href="https://pinterface.dreamwidth.org/data/atom"/>
  <updated>2013-04-22T04:09:30Z</updated>
  <dw:journal username="pinterface" type="personal"/>
  <entry>
    <id>tag:dreamwidth.org,2012-03-19:1579314:783</id>
    <link rel="alternate" type="text/html" href="https://pinterface.dreamwidth.org/783.html"/>
    <link rel="self" type="text/xml" href="https://pinterface.dreamwidth.org/data/atom/?itemid=783"/>
    <title>A Public Service Announcement About rm and tildes</title>
    <published>2013-04-22T04:09:30Z</published>
    <updated>2013-04-22T04:09:30Z</updated>
    <category term="emacs"/>
    <category term="backups"/>
    <category term="oops"/>
    <category term="rm"/>
    <category term="linux"/>
    <category term="public service announcement"/>
    <dw:mood>embarrassed</dw:mood>
    <dw:security>public</dw:security>
    <dw:reply-count>0</dw:reply-count>
    <content type="html">&lt;p&gt;If you happen to be lax in upgrading software, you might have an older version of magit where if M-x magit-status is allowed to initialize a git repository where none was before, it has a tendency to create said repository in the directory '$HOME/repo/~/repo'[1].&lt;/p&gt;

&lt;p&gt;If this happens, and one wishes to remove that annoying and non-useful '~' directory, do not, I repeat, do not run the command:&lt;/p&gt;
&lt;blockquote&gt;rm -r ~&lt;/blockquote&gt;

&lt;p&gt;That is bad.  Remember shell expansion!  You need to quote the tilde:&lt;/p&gt;
&lt;blockquote&gt;rm -r '~'&lt;/blockquote&gt;

&lt;p&gt;But also note that even the latter should not be done within eshell, as it seems to be intent on expanding the tilde anyway.  Use a real shell.&lt;/p&gt;

&lt;p&gt;Also, &lt;em&gt;always&lt;/em&gt; do &lt;tt&gt;`ls $dir`&lt;/tt&gt; before you do &lt;tt&gt;`rm $dir`&lt;/tt&gt;, just to double-check what you're deleting.  Even if you're sure, check anyway.&lt;/p&gt;

&lt;p&gt;Because otherwise, you might accidentally delete your home directory.&lt;/p&gt;

&lt;p style="margin-top: 4em;"&gt;On the bright side, I can now confirm my backups work.&lt;/p&gt;

&lt;p&gt;[1] see &lt;a href="https://github.com/magit/magit/issues/383"&gt;bug 383&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=pinterface&amp;ditemid=783" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
</feed>
