From 8d6bc1fc7b14d26589a4789dc9da291ef404bd61 Mon Sep 17 00:00:00 2001 From: Christopher Koch Date: Wed, 23 Jul 2014 00:03:27 +0200 Subject: Support rc files without leading dots This adds the `-U` option to lsrc(1), rcup(1), and rcdn(1) commands; its argument is an exclusion pattern. Any file matching this pattern is symlinked without the leading dot. There is also a `-u` option to undo a `-U`. The `UNDOTTED` setting in rcrc(5) can be used to set it permanently. The mkrc(1) command has `-U` and `-u` flags. They take no argument. --- bin/lsrc.in | 42 ++++++++++++++++++++++++++++++++++++------ bin/mkrc.in | 20 ++++++++++++++++++-- bin/rcdn.in | 15 +++++++++++++-- bin/rcup.in | 15 +++++++++++++-- man/lsrc.1 | 21 +++++++++++++++++++++ man/mkrc.1 | 9 ++++++++- man/rcdn.1 | 25 +++++++++++++++++++++++++ man/rcm.7.mustache | 15 +++++++++++++++ man/rcrc.5 | 13 ++++++++++++- man/rcup.1 | 21 +++++++++++++++++++++ test/Makefile.am | 2 ++ test/lsrc-undotted.t | 11 +++++++++++ test/lsrc-usage.t | 4 ++-- test/mkrc-undotted.t | 8 ++++++++ test/mkrc-usage.t | 6 +++--- test/rcup-usage.t | 4 ++-- 16 files changed, 210 insertions(+), 21 deletions(-) create mode 100644 test/lsrc-undotted.t create mode 100644 test/mkrc-undotted.t diff --git a/bin/lsrc.in b/bin/lsrc.in index ad40b5e..ada436b 100755 --- a/bin/lsrc.in +++ b/bin/lsrc.in @@ -214,7 +214,7 @@ is_excluded() { show_help() { local exit_code=${1:-0} - $PRINT "Usage: lsrc [-FhqVv] [-B HOSTNAME] [-d DOT_DIR] [-I EXCL_PAT] [-S EXCL_PAT ] [-s EXCL_PAT] [-t TAG] [-x EXCL_PAT]" + $PRINT "Usage: lsrc [-FhqVv] [-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]" $PRINT "see lsrc(1) and rcm(7) for more details" exit $exit_code @@ -231,8 +231,10 @@ handle_command_line() { local symlink_dirs= local never_symlink_dirs= local hostname= + local undotted= + local never_undotted= - while getopts :FVqvhI:x:B:S:s:t:d: opt; do + while getopts :FVqvhI:x:B:S:s:U:u:t:d: opt; do case "$opt" in F) show_sigils=1;; h) show_help ;; @@ -245,6 +247,8 @@ handle_command_line() { x) excludes="$excludes $OPTARG";; S) symlink_dirs="$symlink_dirs $OPTARG";; s) never_symlink_dirs="$never_symlink_dirs $OPTARG";; + U) undotted="$undotted $OPTARG";; + u) never_undotted="$never_undotted $OPTARG";; B) hostname="$OPTARG";; ?) show_help 64 ;; esac @@ -260,6 +264,8 @@ handle_command_line() { INCLUDES="${includes:-$INCLUDES}" SYMLINK_DIRS="${symlink_dirs:-$SYMLINK_DIRS}" MK_DIRS="${never_symlink_dirs:-$MK_DIRS}" + UNDOTTED="${undotted:-$UNDOTTED}" + NEVER_UNDOTTED="${never_undotted:-$NEVER_UNDOTTED}" FILES="$@" $DEBUG "TAGS: $TAGS" @@ -282,6 +288,12 @@ $DEBUG "SYMLINK_DIRS: $SYMLINK_DIRS" : ${MK_DIRS:=""} $DEBUG "MK_DIRS: $MK_DIRS" +: ${UNDOTTED:=""} +$DEBUG "UNDOTTED: $UNDOTTED" + +: ${NEVER_UNDOTTED:=""} +$DEBUG "NEVER_UNDOTTED: $NEVER_UNDOTTED" + relative_root_dir="$PWD" for DOTFILES_DIR in $DOTFILES_DIRS; do @@ -301,18 +313,27 @@ for DOTFILES_DIR in $DOTFILES_DIRS; do include_file_globs="$(dotfiles_dir_excludes "$DOTFILES_DIR" "$INCLUDES")" symlink_dirs_file_globs="$(dotfiles_dir_excludes "$DOTFILES_DIR" "$SYMLINK_DIRS")" $DEBUG "symlink_dirs_file_globs: $symlink_dirs_file_globs" - mk_dirs_file_globs=$(dotfiles_dir_excludes "$DOTFILES_DIR" "$MK_DIRS") + mk_dirs_file_globs="$(dotfiles_dir_excludes "$DOTFILES_DIR" "$MK_DIRS")" $DEBUG "mk_dirs_file_globs: $mk_dirs_file_globs" + undotted_file_globs="$(dotfiles_dir_excludes "$DOTFILES_DIR" "$UNDOTTED")" + $DEBUG "undotted_file_globs: $undotted_file_globs" + never_undotted_file_globs="$(dotfiles_dir_excludes "$DOTFILES_DIR" "$NEVER_UNDOTTED")" + $DEBUG "never_undotted_file_globs: $never_undotted_file_globs" cd "$DOTFILES_DIR" DIR_STACK=":$DOTFILES_DIR" for file in ${FILES:-*}; do + dotted=0 if is_metafile "$file"; then continue fi - handle_file "$file" "$DEST_DIR" "$DOTFILES_DIR" . 0 "$exclude_file_globs" "$include_file_globs" "$symlink_dirs_file_globs" "$mk_dirs_file_globs" + if is_excluded "$file" "$undotted_file_globs" "$never_undotted_file_globs"; then + dotted=1 + fi + + handle_file "$file" "$DEST_DIR" "$DOTFILES_DIR" . "$dotted" "$exclude_file_globs" "$include_file_globs" "$symlink_dirs_file_globs" "$mk_dirs_file_globs" done cd "$DOTFILES_DIR" @@ -321,7 +342,12 @@ for DOTFILES_DIR in $DOTFILES_DIRS; do if [ -d "$host_files" ]; then pushdir "$(basename "$host_files")" for file in ${FILES:-*}; do - handle_file "$file" "$DEST_DIR" "$host_files" . 0 "$exclude_file_globs" "$include_file_globs" "$symlink_dirs_file_globs" "$mk_dirs_file_globs" + dotted=0 + if is_excluded "$file" "$undotted_file_globs" "$never_undotted_file_globs"; then + dotted=1 + fi + + handle_file "$file" "$DEST_DIR" "$host_files" . "$dotted" "$exclude_file_globs" "$include_file_globs" "$symlink_dirs_file_globs" "$mk_dirs_file_globs" done popdir fi @@ -333,7 +359,11 @@ for DOTFILES_DIR in $DOTFILES_DIRS; do pushdir "$(basename "tag-$tag")" for file in ${FILES:-*}; do $DEBUG "TAG: $tag, exclude_file_globs: $exclude_file_globs" - handle_file "$file" "$DEST_DIR" "$DOTFILES_DIR/tag-$tag" . 0 "$exclude_file_globs" "$include_file_globs" "$symlink_dirs_file_globs" "$mk_dirs_file_globs" + dotted=0 + if is_excluded "$file" "$undotted_file_globs" "$never_undotted_file_globs"; then + dotted=1 + fi + handle_file "$file" "$DEST_DIR" "$DOTFILES_DIR/tag-$tag" . "$dotted" "$exclude_file_globs" "$include_file_globs" "$symlink_dirs_file_globs" "$mk_dirs_file_globs" done popdir fi diff --git a/bin/mkrc.in b/bin/mkrc.in index 8932926..da22a63 100755 --- a/bin/mkrc.in +++ b/bin/mkrc.in @@ -23,7 +23,7 @@ destination() { show_help() { local exit_code=${1:-0} - $PRINT "Usage: mkrc [-ChSsVvqo] [-t TAG] [-d DIR] [-B HOSTNAME] FILES ..." + $PRINT "Usage: mkrc [-ChSsUuVvqo] [-t TAG] [-d DIR] [-B HOSTNAME] FILES ..." $PRINT "see mkrc(1) and rcm(7) for more details" exit $exit_code @@ -44,9 +44,10 @@ in_host=0 version=0 always_copy=0 force_symlink=50 +undotted=50 install_args= -while getopts :ChSsVvqot:d:B: opt; do +while getopts :ChSsUuVvqot:d:B: opt; do case "$opt" in C) always_copy=1 ;; h) show_help ;; @@ -58,6 +59,8 @@ while getopts :ChSsVvqot:d:B: opt; do V) version=1 ;; S) force_symlink=1 ;; s) force_symlink=0 ;; + U) undotted=1 ;; + u) undotted=0 ;; B) in_host=1 hostname="$OPTARG" @@ -93,11 +96,24 @@ elif [ $force_symlink -eq 0 ]; then done fi +if [ $undotted -eq 1 ]; then + for file in $files; do + dedotted="$(de_dot "$file")" + INSTALL="$INSTALL -U $dedotted" + done +elif [ $undotted -eq 0 ]; then + for file in $files; do + dedotted="$(de_dot "$file")" + INSTALL="$INSTALL -u $dedotted" + done +fi + for file in $files; do case "$file" in /*) : ;; *) [ -e "$PWD/$file" ] && file="$PWD/$file" ;; esac + dotless="$(de_dot "$file")" dest="$(destination "$DOTFILES_DIR" "$dotless" $in_host "$tag")" mkdir -p "$dest/$(dirname "$dotless")" diff --git a/bin/rcdn.in b/bin/rcdn.in index 91223fa..90cfcd6 100755 --- a/bin/rcdn.in +++ b/bin/rcdn.in @@ -21,7 +21,7 @@ remove_link() { show_help() { local exit_code=${1:-0} - $PRINT "Usage: rcdn [-hKkqVv] [-B HOSTNAME] [-d DOT_DIR] [-I EXCL_PAT] [-S EXCL_PAT] [-s EXCL_PAT] [-t TAG] [-x EXCL_PAT]" + $PRINT "Usage: rcdn [-hqVv] [-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]" $PRINT "see rcdn(1) and rcm(7) for more details" exit $exit_code @@ -38,9 +38,11 @@ handle_command_line() { local includes= local symlink_dirs= local never_symlink_dirs= + local undotted= + local never_undotted= local hostname= - while getopts :VqvhKkI:x:S:s:t:d:B: opt; do + while getopts :VqvhIKk:x:S:s:U:u:t:d:B: opt; do case "$opt" in h) show_help ;; B) hostname="$OPTARG" ;; @@ -50,6 +52,8 @@ handle_command_line() { t) arg_tags="$arg_tags $OPTARG" ;; S) symlink_dirs="$symlink_dirs $OPTARG";; s) never_symlink_dirs="$never_symlink_dirs $OPTARG";; + U) undotted="$undotted $OPTARG";; + u) never_undotted="$never_undotted $OPTARG";; v) verbosity=$(($verbosity + 1));; q) verbosity=$(($verbosity - 1));; d) dotfiles_dirs="$dotfiles_dirs $OPTARG" ;; @@ -86,6 +90,13 @@ handle_command_line() { for never_symlink_dir in $symlink_dirs; do LS_ARGS="$LS_ARGS -s $never_symlink_dir" done + for undot in $undotted; do + LS_ARGS="$LS_ARGS -U $undot" + done + for never_undot in $never_undotted; do + LS_ARGS="$LS_ARGS -u $never_undot" + done + LS_ARGS="$LS_ARGS -B $hostname $files" $DEBUG "LS_ARGS: $LS_ARGS" diff --git a/bin/rcup.in b/bin/rcup.in index c990ac7..e5c5cdb 100755 --- a/bin/rcup.in +++ b/bin/rcup.in @@ -171,7 +171,7 @@ handle_file() { show_help() { local exit_code=${1:-0} - $PRINT "Usage: rcup [-CfghiKkqVv] [-B HOSTNAME] [-d DOT_DIR] [-I EXCL_PAT] [-S EXCL_PAT] [-s EXCL_PAT] [-t TAG] [-x EXCL_PAT]" + $PRINT "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]" $PRINT "see rcup(1) and rcm(7) for more details" exit $exit_code @@ -192,10 +192,12 @@ handle_command_line() { local hostname= local generate=0 local args=$* + local undotted= + local never_undotted= REPLACE_ALL=0 GENERATE= - while getopts :CVqvfghikKI:x:S:s:t:d:B: opt; do + while getopts :CVqvfghikKI:x:S:s:U:u:t:d:B: opt; do case "$opt" in B) hostname="$OPTARG" ;; C) always_copy=1 ;; @@ -211,6 +213,8 @@ handle_command_line() { t) arg_tags="$arg_tags $OPTARG" ;; S) symlink_dirs="$symlink_dirs $OPTARG";; s) never_symlink_dirs="$never_symlink_dirs $OPTARG";; + U) undotted="$undotted $OPTARG";; + u) never_undotted="$never_undotted $OPTARG";; v) verbosity=$(($verbosity + 1)) ;; V) version=1 ;; x) excludes="$excludes $OPTARG" ;; @@ -259,6 +263,13 @@ handle_command_line() { for never_symlink_dir in $never_symlink_dirs; do LS_ARGS="$LS_ARGS -s $never_symlink_dir" done + for undot in $undotted; do + LS_ARGS="$LS_ARGS -U $undot" + done + for never_undot in $never_undotted; do + LS_ARGS="$LS_ARGS -u $never_undot" + done + LS_ARGS="$LS_ARGS -B $hostname $files" $DEBUG "LS_ARGS: $LS_ARGS" diff --git a/man/lsrc.1 b/man/lsrc.1 index a05dfe8..b63b8a7 100644 --- a/man/lsrc.1 +++ b/man/lsrc.1 @@ -13,6 +13,8 @@ .Op Fl S Ar excl_pat .Op Fl s Ar excl_pat .Op Fl t Ar tag +.Op Fl U Ar excl_pat +.Op Fl u Ar excl_pat .Op Fl x Ar excl_pat .Op files ... .Sh DESCRIPTION @@ -89,6 +91,25 @@ protect it from your shell. .It Fl t Ar TAG list dotfiles according to TAG . +.It Fl U Ar excl_pat +the rc files or directories matching this pattern will not be symlinked or +created with a leading dot. See +.Sx EXCLUDE PATTERN +for more details. This option can be repeated. You may need to quote the +pattern to prevent the shell from swallowing the glob. +. +.It Fl u Ar excl_pat +if an rc file or directory matches the given pattern, it must be dotted. See +.Sx EXCLUDE PATTERN +for more details. This is the opposite of the +.Fl U +option, and can be used to undo it or the +.Va UNDOTTED +setting in your +.Xr rcrc 5 +configuration. This option can be repeated. You may need to quote the +pattern to prevent the shell from swallowing the glob. +. .It Fl V show the version number. . diff --git a/man/mkrc.1 b/man/mkrc.1 index 687c894..9ac11a7 100644 --- a/man/mkrc.1 +++ b/man/mkrc.1 @@ -6,7 +6,7 @@ .Nd bless files into a dotfile managed by rcm .Sh SYNOPSIS .Nm mkrc -.Op Fl ChoqSsVv +.Op Fl ChoqSsVvUu .Op Fl t Ar tag .Op Fl d Ar dir .Op Fl B Ar hostname @@ -46,6 +46,12 @@ in the section This is the default. .It Fl t Ar TAG install dotfiles according to tag +.It Fl U +the specified files or directories are to be installed without a leading +dot. +.It Fl u +the specified files or directories are to be installed with a leading dot. This +is the default. .It Fl v increase verbosity. This can be repeated for extra verbosity. .It Fl V @@ -66,6 +72,7 @@ User configuration file. Defaults to .Dl mkrc -o ~/.rcrc .Dl mkrc -C .ssh .Dl mkrc -S .zpretzo +.Dl mkrc -U bin .Sh SEE ALSO .Xr lsrc 1 , .Xr rcdn 1 , diff --git a/man/rcdn.1 b/man/rcdn.1 index 21261fd..10543e9 100644 --- a/man/rcdn.1 +++ b/man/rcdn.1 @@ -13,6 +13,8 @@ .Op Fl S Ar excl_pat .Op Fl s Ar excl_pat .Op Fl t Ar tag +.Op Fl U Ar excl_pat +.Op Fl u Ar excl_pat .Op Fl x Ar excl_pat .Op Ar files ... .Sh DESCRIPTION @@ -87,6 +89,29 @@ This can be repeated. .It Fl t Ar TAG remove dotfiles according to .Ar TAG +.It Fl U Ar EXCL_PAT +any rc file or directory that matches +.Ar EXCL_PAT +is considered to have been installed without a leading dot when removing them. +Must be specified for rc files or directories that were indeed installed +without a leading dot. This can be repeated. See the +documentation of the +.Fl U +option in +.Xr lsrc 1 +for more information. +.It Fl u Ar EXCL_PAT +any rc file or directory that matches +.Ar EXCL_PAT +is considered to have been installed with a leading dot when removing them. +This is the default, and is the opposite of +.Fl U . +This can be repeated. See the +documentation of the +.Fl u +option in +.Xr lsrc 1 +for more information. .It Fl v increase verbosity. This can be repeated for extra verbosity. .It Fl V diff --git a/man/rcm.7.mustache b/man/rcm.7.mustache index bea7aea..52b2187 100644 --- a/man/rcm.7.mustache +++ b/man/rcm.7.mustache @@ -115,6 +115,21 @@ in .Pp .Dl rcup -d configs -v . +.Ss COMMON PROBLEM: CONFIGURATION FILES/DIRECTORIES WITHOUT DOTS +By default, the rcm suite will prefix every file and directory it manages +with a dot. If that is not desired, for example in the case of +.Pa ~/bin +or +.Pa ~/texmf , +you can add that file or directory to +.Ev UNDOTTED +in +.Xr rcrc 5 +or use the +.Fl U +option. For example: +.Dl mkrc -U bin +. .Sh QUICK START FOR EMPTY DOTFILES DIRECTORIES This section is for those who do not have an existing dotfiles directory and whose dotfiles are standard. diff --git a/man/rcrc.5 b/man/rcrc.5 index bc72329..78451f4 100644 --- a/man/rcrc.5 +++ b/man/rcrc.5 @@ -60,6 +60,16 @@ symlinked instead of descended. Patterns are explained in detail in under the section .Sx EXCLUDE PATTERN . . +.It Va UNDOTTED +a space separated list of patterns. Files matching this pattern +will be symlinked without a leading dot. If a file is also in +.Va SYMLINK_DIRS , +then the directory will be symlinked without a leading dot. +Patterns are explained in detail in +.Xr lsrc 1 +under the section +.Sx EXCLUDE PATTERN . +. .El .Sh FILES .Pa ~/.rcrc @@ -70,7 +80,8 @@ under the section .Dl EXCLUDES="irbrc *:*emacs* dotfiles:python*" .Dl HOSTNAME="eggplant" .Dl TAGS="freebsd development email git laptop gmail notmuch" -.Dl SYMLINK_DIRS="zprezto" +.Dl SYMLINK_DIRS="zprezto texmf" +.Dl UNDOTTED="texmf" .Sh SEE ALSO .Xr lsrc 1 , .Xr mkrc 1 , diff --git a/man/rcup.1 b/man/rcup.1 index 130ae4a..82c0293 100644 --- a/man/rcup.1 +++ b/man/rcup.1 @@ -14,6 +14,8 @@ .Op Fl S Ar excl_pat .Op Fl s Ar excl_pat .Op Fl t Ar tag +.Op Fl U Ar excl_pat +.Op Fl u Ar excl_pat .Op Fl x Ar excl_pat .Op Ar files ... .Sh DESCRIPTION @@ -91,6 +93,25 @@ This option can be repeated. .It Fl t Ar TAG install dotfiles according to .Ar TAG +.It Fl U Ar EXCL_PAT +any rc file that matches +.Ar EXCL_PAT +is installed without a leading dot. This option can be repeated. See the +documentation of the +.Fl U +option in +.Xr lsrc 1 +for more information. +.It Fl u Ar EXCL_PAT +any rc file that matches +.Ar EXCL_PAT +is installed with a leading dot. This is the opposite of +.Fl U . +This option can be repeated. This is the default. See the documentation of the +.Fl u +option in +.Xr lsrc 1 +for more information. .It Fl q decrease verbosity .It Fl V diff --git a/test/Makefile.am b/test/Makefile.am index aafa5ca..e4d4a39 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -7,6 +7,7 @@ TESTS = \ lsrc-symlink-dirs.t \ lsrc-tags.t \ lsrc-usage.t \ + lsrc-undotted.t \ mkrc-alternate-dotfiles-dir.t \ mkrc-copy-file.t \ mkrc-host-file.t \ @@ -15,6 +16,7 @@ TESTS = \ mkrc-symlink-dirs.t \ mkrc-tagged-file.t \ mkrc-usage.t \ + mkrc-undotted.t \ rcrc-custom.t \ rcrc-hostname.t \ rcrc.t \ diff --git a/test/lsrc-undotted.t b/test/lsrc-undotted.t new file mode 100644 index 0000000..9b8737f --- /dev/null +++ b/test/lsrc-undotted.t @@ -0,0 +1,11 @@ + $ . "$TESTDIR/helper.sh" + +Should undot files with -U + + $ touch .dotfiles/example + > touch .dotfiles/undotted + + $ lsrc -U undotted + /*/.example:/*/.dotfiles/example (glob) + /*/undotted:/*/.dotfiles/undotted (glob) + diff --git a/test/lsrc-usage.t b/test/lsrc-usage.t index 7d54be8..409a9bd 100644 --- a/test/lsrc-usage.t +++ b/test/lsrc-usage.t @@ -3,12 +3,12 @@ -h should output usage information and exit 0 $ lsrc -h - Usage: lsrc [-FhqVv] [-B HOSTNAME] [-d DOT_DIR] [-I EXCL_PAT] [-S EXCL_PAT ] [-s EXCL_PAT] [-t TAG] [-x EXCL_PAT] + Usage: lsrc [-FhqVv] [-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] see lsrc(1) and rcm(7) for more details Unsupported options should output usage information and exit EX_USAGE $ lsrc --version - Usage: lsrc [-FhqVv] [-B HOSTNAME] [-d DOT_DIR] [-I EXCL_PAT] [-S EXCL_PAT ] [-s EXCL_PAT] [-t TAG] [-x EXCL_PAT] + Usage: lsrc [-FhqVv] [-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] see lsrc(1) and rcm(7) for more details [64] diff --git a/test/mkrc-undotted.t b/test/mkrc-undotted.t new file mode 100644 index 0000000..95dff18 --- /dev/null +++ b/test/mkrc-undotted.t @@ -0,0 +1,8 @@ + $ . "$TESTDIR/helper.sh" + > touch random-dotfile + +Passing -U should make a file be undotted + + $ mkrc -U random-dotfile >/dev/null + + $ assert_linked "$HOME/random-dotfile" "$HOME/.dotfiles/random-dotfile" diff --git a/test/mkrc-usage.t b/test/mkrc-usage.t index 4649152..b6715e9 100644 --- a/test/mkrc-usage.t +++ b/test/mkrc-usage.t @@ -3,19 +3,19 @@ no arguments should output usage information and exit EX_USAGE $ mkrc - Usage: mkrc [-ChSsVvqo] [-t TAG] [-d DIR] [-B HOSTNAME] FILES ... + Usage: mkrc [-ChSsUuVvqo] [-t TAG] [-d DIR] [-B HOSTNAME] FILES ... see mkrc(1) and rcm(7) for more details [64] -h should output usage information and exit 0 $ mkrc -h - Usage: mkrc [-ChSsVvqo] [-t TAG] [-d DIR] [-B HOSTNAME] FILES ... + Usage: mkrc [-ChSsUuVvqo] [-t TAG] [-d DIR] [-B HOSTNAME] FILES ... see mkrc(1) and rcm(7) for more details Unsupported options should output usage information and exit EX_USAGE $ mkrc --version - Usage: mkrc [-ChSsVvqo] [-t TAG] [-d DIR] [-B HOSTNAME] FILES ... + Usage: mkrc [-ChSsUuVvqo] [-t TAG] [-d DIR] [-B HOSTNAME] FILES ... see mkrc(1) and rcm(7) for more details [64] diff --git a/test/rcup-usage.t b/test/rcup-usage.t index fb0b78f..c15764a 100644 --- a/test/rcup-usage.t +++ b/test/rcup-usage.t @@ -3,12 +3,12 @@ -h should output usage information and exit 0 $ rcup -h - Usage: rcup [-CfghiKkqVv] [-B HOSTNAME] [-d DOT_DIR] [-I EXCL_PAT] [-S EXCL_PAT] [-s EXCL_PAT] [-t TAG] [-x EXCL_PAT] + 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] see rcup(1) and rcm(7) for more details Unsupported options should output usage information and exit EX_USAGE $ rcup --version - Usage: rcup [-CfghiKkqVv] [-B HOSTNAME] [-d DOT_DIR] [-I EXCL_PAT] [-S EXCL_PAT] [-s EXCL_PAT] [-t TAG] [-x EXCL_PAT] + 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] see rcup(1) and rcm(7) for more details [64] -- cgit v1.2.3