From 76d90db627114fbc1354a2bd80483a332c92daea Mon Sep 17 00:00:00 2001 From: Tim Byrne Date: Wed, 25 Jan 2017 17:28:55 -0600 Subject: [PATCH] Replace "TODO text" for `yadm config` (#46) --- test/106_accept_config.bats | 8 ++++++-- yadm | 20 +++++++++++++++++++- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/test/106_accept_config.bats b/test/106_accept_config.bats index 8688211..3d4a34a 100644 --- a/test/106_accept_config.bats +++ b/test/106_accept_config.bats @@ -13,14 +13,18 @@ setup() { } @test "Command 'config' (no parameters)" { - skip echo " When 'config' command is provided alone, Produce instructions about supported configuration options Exit with 1 " - #; TODO: This has not been implemented + #; run config + run "${T_YADM_Y[@]}" config + + #; validate status and output + [ $status -eq 0 ] + [[ "$output" =~ Please\ read\ the\ CONFIGURATION\ section ]] } @test "Command 'config' (read missing)" { diff --git a/yadm b/yadm index a369f50..1b2ce85 100755 --- a/yadm +++ b/yadm @@ -277,7 +277,25 @@ function config() { if [ -z "$*" ] ; then #; with no parameters, provide some helpful documentation - echo TODO: Print help about available yadm configurations + cat << EOF +yadm supports the following configurations: + + alt.class + alt.host + alt.os + alt.user + yadm.auto-alt + yadm.auto-perms + yadm.git-program + yadm.gpg-perms + yadm.gpg-program + yadm.gpg-recipient + yadm.ssh-perms + +Please read the CONFIGURATION section in the man +page for more details about configurations, and +how to adjust them. +EOF else #; operate on the yadm configuration file git config --file="$(mixed_path "$YADM_CONFIG")" "$@"