rcm icon indicating copy to clipboard operation
rcm copied to clipboard

Documentation regarding [files ..] rcup option unclear

Open taylorthurlow opened this issue 5 years ago • 2 comments

I wanted to use rcup to link a specific dotfile from my dotfiles directory. The rcup -h help text doesn't seem to suggest that this is supported:

Usage: rcup [-CfhiKkqVv] [-B HOSTNAME] [-d DOT_DIR] [-I EXCL_PAT] [-S EXCL_PAT] [-s EXCL_PAT] [-t TAG] [-U EXCL_PAT] [-u EXCL_PAT] [-x EXCL_PAT]

However, the manpage says it is:

SYNOPSIS
     rcup [-CfhiKkqVv] [-B hostname] [-d dir] [-g] [-I excl_pat] [-S excl_pat] [-s excl_pat] [-t tag]
          [-U excl_pat] [-u excl_pat] [-x excl_pat] [files ...]

The [files ...] option being the thing I'm interested in. The manpage has this to say about that option:

files        only install the specified file(s)

This seems to be what I want, but my first instinct was to call it like this:

rcup -v ~/.dotfiles/gitconfig

This ends up creating $HOME/home/username/.dotfiles/gitconfig which is clearly not what I wanted. What it actually wanted was a path relative to my dotfiles directory:

rcup -v gitconfig

Some extra help text could go a long way. I'm a little disappointed in myself that I didn't figure it out a little quicker, though.

taylorthurlow avatar Jun 21 '20 18:06 taylorthurlow

Yes, agreed, we need to make all of those documentation points much more clear (Mike of the future: this is the bug label). Thank you for enumerating them so clearly, too:

  • rcup -h
  • rcup(1)

Additionally, maybe we should detect that this is happening somehow. Like if any $DOTFILES_DIRS appear in the file names, abort. (Mike of the future: enchancement.)

mike-burns avatar Aug 28 '20 19:08 mike-burns

BTW, the original issue (overwriting a symlink) was fixed with #252

mat-m avatar Jun 30 '21 22:06 mat-m