All posts tagged CLI

The simple way to reproduce this is:

\mkdir  source
\cp     source  target

It's a pretty simple request. I want to copy a directory. I want to copy and not create the directory. I don't want any of the contents (cp -r), I just want the container itself, without using mkdir. I don't want to diddle around with the contents of the directory (moving them around) and then do cp -r. I want to copy the container because I want to match the permissions. I don't want to separately use other commands to sync permissions:

\chmod  --reference=source  target
\chown  --reference=source  target

Why can't cp do this? Oh right, it's GNU .. so it sucks.

2015-05-10 update - I've been using some more complex stuff, which can be found around my shell-random/zsh github repository. See and

I'm pleased to announce that I'm the very first user to have ANSI colour in a zsh prompt.  Yep, the very first.  I must be, since there is no example to be found anywhere.  After a serious amount of searching and fist-shaking at vague documentation, I was able to hack it out myself.

My solution is still incomplete though.  Let's walk through this nonsense..

Continue Reading