diff --git a/features/checkbox.feature b/features/checkbox.feature index 11df143..ddfe490 100644 --- a/features/checkbox.feature +++ b/features/checkbox.feature @@ -7,7 +7,7 @@ Feature: Import and Export Checkbox Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='checkbox-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' checkbox-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/clone.feature b/features/clone.feature index f2d19fd..53a9b97 100644 --- a/features/clone.feature +++ b/features/clone.feature @@ -7,7 +7,7 @@ Feature: Import and Export Clone Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='clone-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' clone-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/color_picker.feature b/features/color_picker.feature index 4404f93..ff75863 100644 --- a/features/color_picker.feature +++ b/features/color_picker.feature @@ -7,7 +7,7 @@ Feature: Import and Export Color Picker Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='color_picker-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' color_picker-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/date_picker.feature b/features/date_picker.feature index 77b63ba..86418f3 100644 --- a/features/date_picker.feature +++ b/features/date_picker.feature @@ -7,7 +7,7 @@ Feature: Import and Export Date Picker Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='date_picker-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' date_picker-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/date_time_picker.feature b/features/date_time_picker.feature index 4e43a80..67d5069 100644 --- a/features/date_time_picker.feature +++ b/features/date_time_picker.feature @@ -7,7 +7,7 @@ Feature: Import and Export Date Time Picker Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='date_time_picker-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' date_time_picker-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/dboverfile.feature b/features/dboverfile.feature index 24e06d5..4b75a0e 100644 --- a/features/dboverfile.feature +++ b/features/dboverfile.feature @@ -3,6 +3,6 @@ Feature: DB is prefered over files Scenario: Export a field group and see if changes to the db over prefered over export files Given a WP install And a "number" feature - When I run the command "acf export --field_group='number-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' number-group" And I remove the fields from "number-group.json" Then the "number-group" should not have been added to the local groups diff --git a/features/email.feature b/features/email.feature index 94a43c1..b492c0a 100644 --- a/features/email.feature +++ b/features/email.feature @@ -7,7 +7,7 @@ Feature: Import and Export Email Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='email-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' email-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/embed.feature b/features/embed.feature index a32b39a..9a7bc16 100644 --- a/features/embed.feature +++ b/features/embed.feature @@ -7,7 +7,7 @@ Feature: Import and Export Embed Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='embed-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' embed-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/file.feature b/features/file.feature index c65a67f..54e7d2c 100644 --- a/features/file.feature +++ b/features/file.feature @@ -7,7 +7,7 @@ Feature: Import and Export File Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='file-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' file-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/flexible.feature b/features/flexible.feature index fb4bf43..8a9524a 100644 --- a/features/flexible.feature +++ b/features/flexible.feature @@ -7,7 +7,7 @@ Feature: Import and Export Flexible Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='flexible-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' flexible-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/gallery.feature b/features/gallery.feature index 770947a..2ae7687 100644 --- a/features/gallery.feature +++ b/features/gallery.feature @@ -7,7 +7,7 @@ Feature: Import and Export Gallery Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='gallery-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' gallery-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/google_maps.feature b/features/google_maps.feature index 6c834f3..f89cfca 100644 --- a/features/google_maps.feature +++ b/features/google_maps.feature @@ -7,7 +7,7 @@ Feature: Import and Export Google Maps Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='google_maps-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' google_maps-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/image.feature b/features/image.feature index fb42e74..f2390d2 100644 --- a/features/image.feature +++ b/features/image.feature @@ -7,7 +7,7 @@ Feature: Import and Export Image Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='image-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' image-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/message.feature b/features/message.feature index 0522c3b..5dba487 100644 --- a/features/message.feature +++ b/features/message.feature @@ -7,7 +7,7 @@ Feature: Import and Export Gallery Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='message-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' message-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/multiple.feature b/features/multiple.feature index 207a640..545e3a6 100644 --- a/features/multiple.feature +++ b/features/multiple.feature @@ -7,7 +7,7 @@ Feature: Import and Export Group With Multiple Fields Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='multiple-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' multiple-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/number.feature b/features/number.feature index fd18092..54336e2 100644 --- a/features/number.feature +++ b/features/number.feature @@ -7,7 +7,7 @@ Feature: Import and Export Number Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='number-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' number-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/page_link.feature b/features/page_link.feature index cca502a..6487708 100644 --- a/features/page_link.feature +++ b/features/page_link.feature @@ -7,7 +7,7 @@ Feature: Import and Export Page Link Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='page_link-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' page_link-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/password.feature b/features/password.feature index 13b7526..df86012 100644 --- a/features/password.feature +++ b/features/password.feature @@ -7,7 +7,7 @@ Feature: Import and Export Password Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='password-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' password-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/post.feature b/features/post.feature index 8011926..1a27d36 100644 --- a/features/post.feature +++ b/features/post.feature @@ -7,7 +7,7 @@ Feature: Import and Export post Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='post-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' post-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/radio.feature b/features/radio.feature index 1c6dedf..75205b3 100644 --- a/features/radio.feature +++ b/features/radio.feature @@ -7,7 +7,7 @@ Feature: Import and Export Radio Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='radio-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' radio-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/relation.feature b/features/relation.feature index 60a8e20..762bbdf 100644 --- a/features/relation.feature +++ b/features/relation.feature @@ -7,7 +7,7 @@ Feature: Import and Export Relation Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='relation-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' relation-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/repeater.feature b/features/repeater.feature index bcb8083..c47738d 100644 --- a/features/repeater.feature +++ b/features/repeater.feature @@ -7,7 +7,7 @@ Feature: Import and Export Repeater Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='repeater-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' repeater-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/select.feature b/features/select.feature index c68442a..2694252 100644 --- a/features/select.feature +++ b/features/select.feature @@ -7,7 +7,7 @@ Feature: Import and Export Select Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='select-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' select-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/tab.feature b/features/tab.feature index 661ebd0..c0a4a55 100644 --- a/features/tab.feature +++ b/features/tab.feature @@ -7,7 +7,7 @@ Feature: Import and Export Tab Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='tab-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' tab-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/taxonomy.feature b/features/taxonomy.feature index ced8244..7ca2c6d 100644 --- a/features/taxonomy.feature +++ b/features/taxonomy.feature @@ -7,7 +7,7 @@ Feature: Import and Export Taxonomy Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='taxonomy-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' taxonomy-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/text.feature b/features/text.feature index 19dc2fc..cbe6345 100644 --- a/features/text.feature +++ b/features/text.feature @@ -7,7 +7,7 @@ Feature: Import and Export Text Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='text-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' text-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/textarea.feature b/features/textarea.feature index 258fb9e..2ea0d25 100644 --- a/features/textarea.feature +++ b/features/textarea.feature @@ -7,7 +7,7 @@ Feature: Import and Export Text Area Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='textarea-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' textarea-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/time_picker.feature b/features/time_picker.feature index 858c82e..f369ca2 100644 --- a/features/time_picker.feature +++ b/features/time_picker.feature @@ -7,7 +7,7 @@ Feature: Import and Export Time Picker Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='time_picker-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' time_picker-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/truefalse.feature b/features/truefalse.feature index 3c2ee5f..987ca48 100644 --- a/features/truefalse.feature +++ b/features/truefalse.feature @@ -7,7 +7,7 @@ Feature: Import and Export TRUE/FALSE Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='truefalse-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' truefalse-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/url.feature b/features/url.feature index 9139f9b..c477001 100644 --- a/features/url.feature +++ b/features/url.feature @@ -7,7 +7,7 @@ Feature: Import and Export URL Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='url-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' url-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/user.feature b/features/user.feature index 05911b5..47a7940 100644 --- a/features/user.feature +++ b/features/user.feature @@ -7,7 +7,7 @@ Feature: Import and Export User Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='user-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' user-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/features/wysiwyg.feature b/features/wysiwyg.feature index f82dddc..c11b81e 100644 --- a/features/wysiwyg.feature +++ b/features/wysiwyg.feature @@ -7,7 +7,7 @@ Feature: Import and Export WYSIWYG Groups Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" - When I run the command "acf export --field_group='wysiwyg-group' --export_path='features/bootstrap/test_exports/'" + When I run the command "acf export --export_path='features/bootstrap/test_exports/' wysiwyg-group" Then the exit code should be 0 And the result should not be empty And the result string should start with "Success:" diff --git a/lib/acfwpcli/cli.php b/lib/acfwpcli/cli.php index e7e449d..2219404 100644 --- a/lib/acfwpcli/cli.php +++ b/lib/acfwpcli/cli.php @@ -40,7 +40,7 @@ static function help() { * * ## OPTIONS * - * [--field_group=] + * [...] * : The field group to export, can be used with "My Field Group" or "my-field-group". * * [--export_path=] @@ -50,10 +50,11 @@ static function help() { * : Export all the fieldgroups. * * @subcommand export - * @synopsis [--field_group=] [--export_path=] [--all] + * @synopsis [--export_path=] [--all] [] */ function export( $args, $assoc_args ) { extract( $assoc_args ); + $field_group = $args[0]; $field_groups = [];