rbcli 0.2.8 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rakeTasks +7 -0
- data/.rbenv-gemsets +1 -0
- data/CHANGELOG.md +37 -0
- data/Gemfile.lock +46 -46
- data/README.md +2 -2
- data/docs-src/archetypes/default.md +6 -0
- data/docs-src/config.toml +37 -0
- data/docs-src/{docs/index.md → content/_index.md} +4 -4
- data/docs-src/content/advanced/_index.md +11 -0
- data/docs-src/{docs → content}/advanced/automatic_updates.md +6 -2
- data/docs-src/{docs → content}/advanced/command_types.md +8 -4
- data/docs-src/{docs → content}/advanced/distributed_state_locking.md +6 -2
- data/docs-src/{docs → content}/advanced/hooks.md +6 -2
- data/docs-src/{docs → content}/advanced/interactive_commands.md +5 -1
- data/docs-src/{docs → content}/advanced/logging.md +6 -2
- data/docs-src/{docs → content}/advanced/remote_execution.md +5 -1
- data/docs-src/{docs → content}/advanced/state_storage.md +6 -3
- data/docs-src/{docs → content}/advanced/user_config_files.md +5 -1
- data/docs-src/content/development/_index.md +11 -0
- data/docs-src/{docs/imported → content/development}/changelog.md +73 -6
- data/docs-src/{docs → content}/development/code_of_conduct.md +8 -1
- data/docs-src/{docs → content}/development/contributing.md +16 -1
- data/docs-src/{docs → content}/development/license.md +9 -2
- data/docs-src/{docs/imported/quick_reference.md → content/quick_reference/_index.md} +8 -1
- data/docs-src/{docs → content}/tutorial/10-getting_started.md +7 -1
- data/docs-src/{docs → content}/tutorial/20-project_layout.md +10 -2
- data/docs-src/{docs → content}/tutorial/30-your_first_command.md +10 -4
- data/docs-src/{docs → content}/tutorial/40-options_parameters_and_arguments.md +9 -3
- data/docs-src/{docs → content}/tutorial/50-publishing.md +9 -3
- data/docs-src/content/tutorial/_index.md +11 -0
- data/docs-src/{docs/whoami.md → content/whoami/_index.md} +11 -5
- data/docs-src/layouts/partials/logo.html +3 -0
- data/docs-src/makesite.sh +33 -7
- data/docs-src/mkdocs-archived.tar.gz +0 -0
- data/docs-src/runsite.sh +6 -1
- data/docs-src/themes/hugo-theme-learn/.editorconfig +16 -0
- data/docs-src/themes/hugo-theme-learn/.gitignore +3 -0
- data/docs-src/themes/hugo-theme-learn/.grenrc.yml +25 -0
- data/docs-src/themes/hugo-theme-learn/CHANGELOG.md +226 -0
- data/docs-src/themes/hugo-theme-learn/LICENSE.md +22 -0
- data/docs-src/themes/hugo-theme-learn/README.md +97 -0
- data/docs-src/themes/hugo-theme-learn/archetypes/chapter.md +13 -0
- data/docs-src/themes/hugo-theme-learn/archetypes/default.md +7 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/LICENSE.md +20 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/config.toml +102 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/_index.en.md +41 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/_index.fr.md +43 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/basics/_index.en.md +12 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/basics/_index.fr.md +12 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/basics/_index.zh.md +12 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/basics/configuration/_index.en.md +60 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/basics/configuration/_index.fr.md +56 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/basics/installation/_index.en.md +102 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/basics/installation/_index.fr.md +100 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/basics/installation/images/chapter.png +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/basics/requirements/_index.en.md +11 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/basics/requirements/_index.fr.md +11 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/basics/requirements/images/magic.gif +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/_index.en.md +194 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/_index.fr.md +194 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/images/blue-variant.png +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/images/green-variant.png +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/images/red-variant.png +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/cont/_index.en.md +12 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/cont/_index.fr.md +12 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/cont/archetypes.en.md +57 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/cont/archetypes.fr.md +57 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/cont/i18n/_index.en.md +78 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/cont/i18n/_index.fr.md +78 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/cont/i18n/images/i18n-menu.gif +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/cont/icons.en.md +41 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/cont/markdown.en.md +692 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/cont/markdown.fr.md +666 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/cont/menushortcuts.en.md +109 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/cont/menushortcuts.fr.md +109 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/cont/pages/_index.en.md +166 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/cont/pages/_index.fr.md +146 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/cont/pages/images/frontmatter-icon.png +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/cont/pages/images/pages-chapter.png +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/cont/pages/images/pages-default.png +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/cont/syntaxhighlight.en.md +89 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/cont/tags.en.md +39 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/cont/tags.fr.md +40 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/credits.en.md +28 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/credits.fr.md +28 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/_index.en.md +16 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/_index.fr.md +16 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/BachGavotteShort.mp3 +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/Carroll_AliceAuPaysDesMerveilles.pdf +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/adivorciarsetoca00cape.pdf +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/hugo.png +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/movieselectricsheep-flock-244-32500-2.mp4 +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.md +85 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/BachGavotteShort.mp3 +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/Carroll_AliceAuPaysDesMerveilles.pdf +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/adivorciarsetoca00cape.pdf +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/hugo.png +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/movieselectricsheep-flock-244-32500-2.mp4 +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.md +85 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/button.en.md +16 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/button.fr.md +16 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/_index.en.md +45 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/_index.fr.md +45 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/_index.en.md +6 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/_index.fr.md +6 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/_index.en.md +6 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/_index.fr.md +6 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.en.md +6 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.fr.md +6 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.en.md +6 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.fr.md +6 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.en.md +6 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.fr.md +6 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-2/_index.en.md +11 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-2/_index.fr.md +11 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-2/test3.en.md +6 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-2/test3.fr.md +6 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-3/_index.en.md +6 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-3/_index.fr.md +6 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-4/_index.en.md +7 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-4/_index.fr.md +7 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/test.en.md +6 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/test.fr.md +6 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/expand.en.md +45 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/expand.fr.md +45 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/mermaid.en.md +283 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/mermaid.fr.md +283 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/notice.en.md +62 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/notice.fr.md +62 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/siteparam.en.md +23 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/siteparam.fr.md +23 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/showcase.en.md +13 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/showcase.fr.md +14 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/layouts/partials/custom-footer.html +10 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/layouts/partials/logo.html +39 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/layouts/partials/menu-footer.html +14 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/layouts/shortcodes/ghcontributors.html +31 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/static/css/theme-mine.css +104 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.eot +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.svg +1 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.ttf +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.woff +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.woff2 +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/static/images/showcase/inteliver_docs.png +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/static/images/showcase/tat.png +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/static/images/showcase/tshark_dev.png +0 -0
- data/docs-src/themes/hugo-theme-learn/i18n/ar.toml +26 -0
- data/docs-src/themes/hugo-theme-learn/i18n/de.toml +26 -0
- data/docs-src/themes/hugo-theme-learn/i18n/en.toml +26 -0
- data/docs-src/themes/hugo-theme-learn/i18n/es.toml +26 -0
- data/docs-src/themes/hugo-theme-learn/i18n/fr.toml +26 -0
- data/docs-src/themes/hugo-theme-learn/i18n/hi.toml +26 -0
- data/docs-src/themes/hugo-theme-learn/i18n/id.toml +26 -0
- data/docs-src/themes/hugo-theme-learn/i18n/ja.toml +26 -0
- data/docs-src/themes/hugo-theme-learn/i18n/nl.toml +26 -0
- data/docs-src/themes/hugo-theme-learn/i18n/pt.toml +26 -0
- data/docs-src/themes/hugo-theme-learn/i18n/ru.toml +26 -0
- data/docs-src/themes/hugo-theme-learn/i18n/tr.toml +26 -0
- data/docs-src/themes/hugo-theme-learn/i18n/zh-cn.toml +26 -0
- data/docs-src/themes/hugo-theme-learn/images/screenshot.png +0 -0
- data/docs-src/themes/hugo-theme-learn/images/tn.png +0 -0
- data/docs-src/themes/hugo-theme-learn/layouts/404.html +56 -0
- data/docs-src/themes/hugo-theme-learn/layouts/_default/list.html +22 -0
- data/docs-src/themes/hugo-theme-learn/layouts/_default/single.html +12 -0
- data/docs-src/themes/hugo-theme-learn/layouts/index.html +31 -0
- data/docs-src/themes/hugo-theme-learn/layouts/index.json +12 -0
- data/docs-src/themes/hugo-theme-learn/layouts/partials/custom-comments.html +3 -0
- data/docs-src/themes/hugo-theme-learn/layouts/partials/custom-footer.html +5 -0
- data/docs-src/themes/hugo-theme-learn/layouts/partials/custom-header.html +5 -0
- data/docs-src/themes/hugo-theme-learn/layouts/partials/favicon.html +1 -0
- data/docs-src/themes/hugo-theme-learn/layouts/partials/footer.html +77 -0
- data/docs-src/themes/hugo-theme-learn/layouts/partials/header.html +111 -0
- data/docs-src/themes/hugo-theme-learn/layouts/partials/logo.html +19 -0
- data/docs-src/themes/hugo-theme-learn/layouts/partials/menu-footer.html +1 -0
- data/docs-src/themes/hugo-theme-learn/layouts/partials/menu.html +151 -0
- data/docs-src/themes/hugo-theme-learn/layouts/partials/meta.html +2 -0
- data/docs-src/themes/hugo-theme-learn/layouts/partials/search.html +16 -0
- data/docs-src/themes/hugo-theme-learn/layouts/partials/tags.html +7 -0
- data/docs-src/themes/hugo-theme-learn/layouts/partials/toc.html +5 -0
- data/docs-src/themes/hugo-theme-learn/layouts/shortcodes/attachments.html +36 -0
- data/docs-src/themes/hugo-theme-learn/layouts/shortcodes/button.html +14 -0
- data/docs-src/themes/hugo-theme-learn/layouts/shortcodes/children.html +101 -0
- data/docs-src/themes/hugo-theme-learn/layouts/shortcodes/expand.html +17 -0
- data/docs-src/themes/hugo-theme-learn/layouts/shortcodes/mermaid.html +2 -0
- data/docs-src/themes/hugo-theme-learn/layouts/shortcodes/notice.html +2 -0
- data/docs-src/themes/hugo-theme-learn/layouts/shortcodes/ref.html +14 -0
- data/docs-src/themes/hugo-theme-learn/layouts/shortcodes/relref.html +14 -0
- data/docs-src/themes/hugo-theme-learn/layouts/shortcodes/siteparam.html +7 -0
- data/docs-src/themes/hugo-theme-learn/netlify.toml +23 -0
- data/docs-src/themes/hugo-theme-learn/static/css/atom-one-dark-reasonable.css +77 -0
- data/docs-src/themes/hugo-theme-learn/static/css/auto-complete.css +47 -0
- data/docs-src/themes/hugo-theme-learn/static/css/featherlight.min.css +8 -0
- data/docs-src/themes/hugo-theme-learn/static/css/fontawesome-all.min.css +1 -0
- data/docs-src/themes/hugo-theme-learn/static/css/hugo-theme.css +254 -0
- data/docs-src/themes/hugo-theme-learn/static/css/hybrid.css +102 -0
- data/docs-src/themes/hugo-theme-learn/static/css/nucleus.css +615 -0
- data/docs-src/themes/hugo-theme-learn/static/css/perfect-scrollbar.min.css +2 -0
- data/docs-src/themes/hugo-theme-learn/static/css/tags.css +49 -0
- data/docs-src/themes/hugo-theme-learn/static/css/theme-blue.css +111 -0
- data/docs-src/themes/hugo-theme-learn/static/css/theme-green.css +111 -0
- data/docs-src/themes/hugo-theme-learn/static/css/theme-red.css +111 -0
- data/docs-src/themes/hugo-theme-learn/static/css/theme.css +1136 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Inconsolata.eot +0 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Inconsolata.svg +1 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Inconsolata.ttf +0 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Inconsolata.woff +0 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.eot +0 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.svg +1 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.ttf +0 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.woff +0 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.woff2 +0 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.eot +0 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.svg +1 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.ttf +0 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.woff +0 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.woff2 +0 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Work_Sans_200.eot +0 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Work_Sans_200.svg +1 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Work_Sans_200.ttf +0 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Work_Sans_200.woff +0 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Work_Sans_200.woff2 +0 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Work_Sans_300.eot +0 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Work_Sans_300.svg +1 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Work_Sans_300.ttf +0 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Work_Sans_300.woff +0 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Work_Sans_300.woff2 +0 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Work_Sans_500.eot +0 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Work_Sans_500.svg +1 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Work_Sans_500.ttf +0 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Work_Sans_500.woff +0 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Work_Sans_500.woff2 +0 -0
- data/docs-src/themes/hugo-theme-learn/static/images/clippy.svg +1 -0
- data/docs-src/themes/hugo-theme-learn/static/images/favicon.png +0 -0
- data/docs-src/themes/hugo-theme-learn/static/images/gopher-404.jpg +0 -0
- data/docs-src/themes/hugo-theme-learn/static/js/auto-complete.js +3 -0
- data/docs-src/themes/hugo-theme-learn/static/js/clipboard.min.js +7 -0
- data/docs-src/themes/hugo-theme-learn/static/js/featherlight.min.js +9 -0
- data/docs-src/themes/hugo-theme-learn/static/js/highlight.pack.js +6 -0
- data/docs-src/themes/hugo-theme-learn/static/js/hugo-learn.js +94 -0
- data/docs-src/themes/hugo-theme-learn/static/js/jquery-3.3.1.min.js +2 -0
- data/docs-src/themes/hugo-theme-learn/static/js/jquery.sticky.js +288 -0
- data/docs-src/themes/hugo-theme-learn/static/js/learn.js +459 -0
- data/docs-src/themes/hugo-theme-learn/static/js/lunr.min.js +6 -0
- data/docs-src/themes/hugo-theme-learn/static/js/modernizr.custom-3.6.0.js +3 -0
- data/docs-src/themes/hugo-theme-learn/static/js/perfect-scrollbar.jquery.min.js +2 -0
- data/docs-src/themes/hugo-theme-learn/static/js/perfect-scrollbar.min.js +2 -0
- data/docs-src/themes/hugo-theme-learn/static/js/search.js +93 -0
- data/docs-src/themes/hugo-theme-learn/static/mermaid/mermaid.css +277 -0
- data/docs-src/themes/hugo-theme-learn/static/mermaid/mermaid.dark.css +278 -0
- data/docs-src/themes/hugo-theme-learn/static/mermaid/mermaid.forest.css +356 -0
- data/docs-src/themes/hugo-theme-learn/static/mermaid/mermaid.js +8 -0
- data/docs-src/themes/hugo-theme-learn/static/webfonts/fa-brands-400.eot +0 -0
- data/docs-src/themes/hugo-theme-learn/static/webfonts/fa-brands-400.svg +1 -0
- data/docs-src/themes/hugo-theme-learn/static/webfonts/fa-brands-400.ttf +0 -0
- data/docs-src/themes/hugo-theme-learn/static/webfonts/fa-brands-400.woff +0 -0
- data/docs-src/themes/hugo-theme-learn/static/webfonts/fa-brands-400.woff2 +0 -0
- data/docs-src/themes/hugo-theme-learn/static/webfonts/fa-regular-400.eot +0 -0
- data/docs-src/themes/hugo-theme-learn/static/webfonts/fa-regular-400.svg +1 -0
- data/docs-src/themes/hugo-theme-learn/static/webfonts/fa-regular-400.ttf +0 -0
- data/docs-src/themes/hugo-theme-learn/static/webfonts/fa-regular-400.woff +0 -0
- data/docs-src/themes/hugo-theme-learn/static/webfonts/fa-regular-400.woff2 +0 -0
- data/docs-src/themes/hugo-theme-learn/static/webfonts/fa-solid-900.eot +0 -0
- data/docs-src/themes/hugo-theme-learn/static/webfonts/fa-solid-900.svg +1 -0
- data/docs-src/themes/hugo-theme-learn/static/webfonts/fa-solid-900.ttf +0 -0
- data/docs-src/themes/hugo-theme-learn/static/webfonts/fa-solid-900.woff +0 -0
- data/docs-src/themes/hugo-theme-learn/static/webfonts/fa-solid-900.woff2 +0 -0
- data/docs-src/themes/hugo-theme-learn/theme.toml +21 -0
- data/docs-src/themes/hugo-theme-learn/wercker.yml +16 -0
- data/docs/404.html +54 -670
- data/docs/advanced/automatic_updates/index.html +998 -651
- data/docs/advanced/command_types/index.html +1022 -742
- data/docs/advanced/distributed_state_locking/index.html +998 -635
- data/docs/advanced/hooks/index.html +1011 -691
- data/docs/advanced/index.html +1140 -0
- data/docs/advanced/index.xml +117 -0
- data/docs/advanced/interactive_commands/index.html +1000 -652
- data/docs/advanced/logging/index.html +1006 -655
- data/docs/advanced/remote_execution/index.html +1010 -666
- data/docs/advanced/state_storage/index.html +1009 -721
- data/docs/advanced/user_config_files/index.html +981 -626
- data/docs/categories/index.html +1146 -0
- data/docs/categories/index.xml +14 -0
- data/docs/css/atom-one-dark-reasonable.css +77 -0
- data/docs/css/auto-complete.css +47 -0
- data/docs/css/featherlight.min.css +8 -0
- data/docs/css/fontawesome-all.min.css +1 -0
- data/docs/css/hugo-theme.css +254 -0
- data/docs/css/hybrid.css +102 -0
- data/docs/css/nucleus.css +615 -0
- data/docs/css/perfect-scrollbar.min.css +2 -0
- data/docs/css/tags.css +49 -0
- data/docs/css/theme-blue.css +111 -0
- data/docs/css/theme-green.css +111 -0
- data/docs/css/theme-red.css +111 -0
- data/docs/css/theme.css +1136 -0
- data/docs/development/changelog/index.html +1376 -0
- data/docs/development/code_of_conduct/index.html +974 -671
- data/docs/development/contributing/index.html +989 -583
- data/docs/development/index.html +1140 -0
- data/docs/development/index.xml +54 -0
- data/docs/development/license/index.html +973 -559
- data/docs/fonts/Inconsolata.eot +0 -0
- data/docs/fonts/Inconsolata.svg +1 -0
- data/docs/fonts/Inconsolata.ttf +0 -0
- data/docs/fonts/Inconsolata.woff +0 -0
- data/docs/fonts/Novecentosanswide-Normal-webfont.eot +0 -0
- data/docs/fonts/Novecentosanswide-Normal-webfont.svg +1 -0
- data/docs/fonts/Novecentosanswide-Normal-webfont.ttf +0 -0
- data/docs/fonts/Novecentosanswide-Normal-webfont.woff +0 -0
- data/docs/fonts/Novecentosanswide-Normal-webfont.woff2 +0 -0
- data/docs/fonts/Novecentosanswide-UltraLight-webfont.eot +0 -0
- data/docs/fonts/Novecentosanswide-UltraLight-webfont.svg +1 -0
- data/docs/fonts/Novecentosanswide-UltraLight-webfont.ttf +0 -0
- data/docs/fonts/Novecentosanswide-UltraLight-webfont.woff +0 -0
- data/docs/fonts/Novecentosanswide-UltraLight-webfont.woff2 +0 -0
- data/docs/fonts/Work_Sans_200.eot +0 -0
- data/docs/fonts/Work_Sans_200.svg +1 -0
- data/docs/fonts/Work_Sans_200.ttf +0 -0
- data/docs/fonts/Work_Sans_200.woff +0 -0
- data/docs/fonts/Work_Sans_200.woff2 +0 -0
- data/docs/fonts/Work_Sans_300.eot +0 -0
- data/docs/fonts/Work_Sans_300.svg +1 -0
- data/docs/fonts/Work_Sans_300.ttf +0 -0
- data/docs/fonts/Work_Sans_300.woff +0 -0
- data/docs/fonts/Work_Sans_300.woff2 +0 -0
- data/docs/fonts/Work_Sans_500.eot +0 -0
- data/docs/fonts/Work_Sans_500.svg +1 -0
- data/docs/fonts/Work_Sans_500.ttf +0 -0
- data/docs/fonts/Work_Sans_500.woff +0 -0
- data/docs/fonts/Work_Sans_500.woff2 +0 -0
- data/docs/images/clippy.svg +1 -0
- data/docs/images/favicon.png +0 -0
- data/docs/images/gopher-404.jpg +0 -0
- data/docs/imported/changelog/index.html +1208 -1020
- data/docs/imported/index.html +1191 -0
- data/docs/imported/index.xml +23 -0
- data/docs/index.html +925 -558
- data/docs/index.json +183 -0
- data/docs/index.xml +212 -0
- data/docs/js/auto-complete.js +3 -0
- data/docs/js/clipboard.min.js +7 -0
- data/docs/js/featherlight.min.js +9 -0
- data/docs/js/highlight.pack.js +6 -0
- data/docs/js/html5shiv-printshiv.min.js +4 -0
- data/docs/js/hugo-learn.js +94 -0
- data/docs/js/jquery-3.3.1.min.js +2 -0
- data/docs/js/jquery.sticky.js +288 -0
- data/docs/js/learn.js +459 -0
- data/docs/js/lunr.min.js +6 -0
- data/docs/js/modernizr.custom-3.6.0.js +3 -0
- data/docs/js/perfect-scrollbar.jquery.min.js +2 -0
- data/docs/js/perfect-scrollbar.min.js +2 -0
- data/docs/js/search.js +93 -0
- data/docs/mermaid/mermaid.css +277 -0
- data/docs/mermaid/mermaid.dark.css +278 -0
- data/docs/mermaid/mermaid.forest.css +356 -0
- data/docs/mermaid/mermaid.js +8 -0
- data/docs/quick_reference/index.html +1246 -0
- data/docs/quick_reference/index.xml +15 -0
- data/docs/sitemap.xml +133 -107
- data/docs/tags/index.html +1146 -0
- data/docs/tags/index.xml +14 -0
- data/docs/tutorial/10-getting_started/index.html +994 -662
- data/docs/tutorial/20-project_layout/index.html +1013 -722
- data/docs/tutorial/30-your_first_command/index.html +1055 -734
- data/docs/tutorial/40-options_parameters_and_arguments/index.html +1136 -878
- data/docs/tutorial/50-publishing/index.html +984 -671
- data/docs/tutorial/index.html +1140 -0
- data/docs/tutorial/index.xml +71 -0
- data/docs/webfonts/fa-brands-400.eot +0 -0
- data/docs/webfonts/fa-brands-400.svg +1 -0
- data/docs/webfonts/fa-brands-400.ttf +0 -0
- data/docs/webfonts/fa-brands-400.woff +0 -0
- data/docs/webfonts/fa-brands-400.woff2 +0 -0
- data/docs/webfonts/fa-regular-400.eot +0 -0
- data/docs/webfonts/fa-regular-400.svg +1 -0
- data/docs/webfonts/fa-regular-400.ttf +0 -0
- data/docs/webfonts/fa-regular-400.woff +0 -0
- data/docs/webfonts/fa-regular-400.woff2 +0 -0
- data/docs/webfonts/fa-solid-900.eot +0 -0
- data/docs/webfonts/fa-solid-900.svg +1 -0
- data/docs/webfonts/fa-solid-900.ttf +0 -0
- data/docs/webfonts/fa-solid-900.woff +0 -0
- data/docs/webfonts/fa-solid-900.woff2 +0 -0
- data/docs/whoami/index.html +965 -555
- data/docs/whoami/index.xml +15 -0
- data/exe/rbcli +1 -0
- data/lib/rbcli-tool/project.rb +6 -2
- data/lib/rbcli/configuration/configurate_blocks/me.rb +5 -5
- data/lib/rbcli/engine/command.rb +1 -1
- data/lib/rbcli/util/deprecation_warning.rb +21 -4
- data/lib/rbcli/util/msg.rb +2 -2
- data/lib/rbcli/version.rb +1 -1
- data/rbcli.gemspec +12 -13
- data/skeletons/project/.rakeTasks +7 -0
- data/skeletons/project/Gemfile +1 -1
- data/skeletons/project/config/general.rb +1 -1
- data/skeletons/project/exe/executable +1 -3
- data/skeletons/project/lib/lib.erb +9 -0
- data/skeletons/project/spec/spec_helper.rb +7 -7
- data/skeletons/project/spec/untitled_spec.rb +6 -6
- data/skeletons/project/untitled.gemspec +30 -30
- metadata +381 -95
- data/docs-src/mkdocs.yml +0 -79
- data/docs/assets/fonts/font-awesome.css +0 -4
- data/docs/assets/fonts/material-icons.css +0 -13
- data/docs/assets/fonts/specimen/FontAwesome.ttf +0 -0
- data/docs/assets/fonts/specimen/FontAwesome.woff +0 -0
- data/docs/assets/fonts/specimen/FontAwesome.woff2 +0 -0
- data/docs/assets/fonts/specimen/MaterialIcons-Regular.ttf +0 -0
- data/docs/assets/fonts/specimen/MaterialIcons-Regular.woff +0 -0
- data/docs/assets/fonts/specimen/MaterialIcons-Regular.woff2 +0 -0
- data/docs/assets/images/favicon.png +0 -0
- data/docs/assets/images/icons/bitbucket.1b09e088.svg +0 -20
- data/docs/assets/images/icons/github.f0b8504a.svg +0 -18
- data/docs/assets/images/icons/gitlab.6dd19c00.svg +0 -38
- data/docs/assets/javascripts/application.583bbe55.js +0 -1
- data/docs/assets/javascripts/lunr/lunr.da.js +0 -1
- data/docs/assets/javascripts/lunr/lunr.de.js +0 -1
- data/docs/assets/javascripts/lunr/lunr.du.js +0 -1
- data/docs/assets/javascripts/lunr/lunr.es.js +0 -1
- data/docs/assets/javascripts/lunr/lunr.fi.js +0 -1
- data/docs/assets/javascripts/lunr/lunr.fr.js +0 -1
- data/docs/assets/javascripts/lunr/lunr.hu.js +0 -1
- data/docs/assets/javascripts/lunr/lunr.it.js +0 -1
- data/docs/assets/javascripts/lunr/lunr.jp.js +0 -1
- data/docs/assets/javascripts/lunr/lunr.multi.js +0 -1
- data/docs/assets/javascripts/lunr/lunr.no.js +0 -1
- data/docs/assets/javascripts/lunr/lunr.pt.js +0 -1
- data/docs/assets/javascripts/lunr/lunr.ro.js +0 -1
- data/docs/assets/javascripts/lunr/lunr.ru.js +0 -1
- data/docs/assets/javascripts/lunr/lunr.stemmer.support.js +0 -1
- data/docs/assets/javascripts/lunr/lunr.sv.js +0 -1
- data/docs/assets/javascripts/lunr/lunr.tr.js +0 -1
- data/docs/assets/javascripts/lunr/tinyseg.js +0 -1
- data/docs/assets/javascripts/modernizr.1aa3b519.js +0 -1
- data/docs/assets/stylesheets/application-palette.22915126.css +0 -1176
- data/docs/assets/stylesheets/application.451f80e5.css +0 -2552
- data/docs/imported/quick_reference/index.html +0 -1120
- data/docs/search/search_index.json +0 -1
- data/docs/sitemap.xml.gz +0 -0
- data/skeletons/project/lib/.keep +0 -0
@@ -0,0 +1,117 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
2
|
+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
3
|
+
<channel>
|
4
|
+
<title>Advanced on RBCli Documentation</title>
|
5
|
+
<link>https://akhoury6.github.io/rbcli/advanced/</link>
|
6
|
+
<description>Recent content in Advanced on RBCli Documentation</description>
|
7
|
+
<generator>Hugo -- gohugo.io</generator>
|
8
|
+
<language>en-us</language>
|
9
|
+
<lastBuildDate>Thu, 20 Jun 2019 15:08:08 -0400</lastBuildDate>
|
10
|
+
|
11
|
+
<atom:link href="https://akhoury6.github.io/rbcli/advanced/index.xml" rel="self" type="application/rss+xml" />
|
12
|
+
|
13
|
+
|
14
|
+
<item>
|
15
|
+
<title>Automatic Updates</title>
|
16
|
+
<link>https://akhoury6.github.io/rbcli/advanced/automatic_updates/</link>
|
17
|
+
<pubDate>Thu, 20 Jun 2019 15:07:21 -0400</pubDate>
|
18
|
+
|
19
|
+
<guid>https://akhoury6.github.io/rbcli/advanced/automatic_updates/</guid>
|
20
|
+
<description>RBCli can automatically notify users when an update is available. If force_update is set (see below), RBCli can halt execution until the user updates their application.
|
21
|
+
Two sources are currently supported: Github (including Enterprise) and RubyGems.
|
22
|
+
GitHub Update Check The GitHub update check works best when paired with GitHub&rsquo;s best practices on releases, where new releases are tagged on master with the format vX.X.X. See Github&rsquo;s release documentation to learn more.</description>
|
23
|
+
</item>
|
24
|
+
|
25
|
+
<item>
|
26
|
+
<title>Command Types</title>
|
27
|
+
<link>https://akhoury6.github.io/rbcli/advanced/command_types/</link>
|
28
|
+
<pubDate>Thu, 20 Jun 2019 15:07:21 -0400</pubDate>
|
29
|
+
|
30
|
+
<guid>https://akhoury6.github.io/rbcli/advanced/command_types/</guid>
|
31
|
+
<description>RBCli has three different command types:
|
32
|
+
Standard Commands (Ruby-based) Scripted Commands (Ruby+Bash based) External Commands (Wrapping a 3rd party application) This document is provided to be a reference. If you would like an in-depth tutorial, please see Your First Command.
|
33
|
+
General Command Structure Commands in RBCli are created by subclassing Rbcli::Command. All commands share a certain common structure:
|
34
|
+
class List &lt; Rbcli::Command # Declare a new command by subclassing Rbcli::Command description &#39;TODO: Description goes here&#39; # (Required) Short description for the global help usage &lt;&lt;-EOF TODO: Usage text goes here EOF # (Required) Long description for the command-specific help parameter :force, &#39;Force testing&#39;, type: :boolean, default: false, required: false # (Optional, Multiple) Add a command-specific CLI parameter.</description>
|
35
|
+
</item>
|
36
|
+
|
37
|
+
<item>
|
38
|
+
<title>Distributed State and Locking</title>
|
39
|
+
<link>https://akhoury6.github.io/rbcli/advanced/distributed_state_locking/</link>
|
40
|
+
<pubDate>Thu, 20 Jun 2019 15:07:21 -0400</pubDate>
|
41
|
+
|
42
|
+
<guid>https://akhoury6.github.io/rbcli/advanced/distributed_state_locking/</guid>
|
43
|
+
<description>Distributed Locking allows a Remote State to be shared among multiple users of the application to make writes appear atomic between sessions. To use it, simply set the locking: parameter to true when enabling remote state.
|
44
|
+
This is how locking works:
|
45
|
+
The application attempts to acquire a lock on the remote state when you first access it If the backend is locked by a different application, wait and try again If it succeeds, the lock is held and refreshed periodically When the application exits, the lock is released If the application does not refresh its lock, or fails to release it when it exits, the lock will automatically expire within 60 seconds If another application steals the lock (unlikely but possible), and the application tries to save data, a StandardError will be thrown You can manually attempt to lock/unlock by calling Rbcli.</description>
|
46
|
+
</item>
|
47
|
+
|
48
|
+
<item>
|
49
|
+
<title>Execution Hooks</title>
|
50
|
+
<link>https://akhoury6.github.io/rbcli/advanced/hooks/</link>
|
51
|
+
<pubDate>Thu, 20 Jun 2019 15:07:21 -0400</pubDate>
|
52
|
+
|
53
|
+
<guid>https://akhoury6.github.io/rbcli/advanced/hooks/</guid>
|
54
|
+
<description>RBCli provides you with hooks that can be used to have code execute at certain places in the execution chain. These hooks are optional, and do not have to be defined for your application to run.
|
55
|
+
All hooks will be created in the hooks/ folder in your project.
|
56
|
+
The Defailt Action Hook The Default hook is called when a user calls your application without providing a command. If the hook is not provided, the application will automatically display the help text (the same as running it with -h).</description>
|
57
|
+
</item>
|
58
|
+
|
59
|
+
<item>
|
60
|
+
<title>Interactive Commands</title>
|
61
|
+
<link>https://akhoury6.github.io/rbcli/advanced/interactive_commands/</link>
|
62
|
+
<pubDate>Thu, 20 Jun 2019 15:07:21 -0400</pubDate>
|
63
|
+
|
64
|
+
<guid>https://akhoury6.github.io/rbcli/advanced/interactive_commands/</guid>
|
65
|
+
<description>Why interactive commands? When catering to an audience of users who are not accustomed to scripting, you may want to prompt them for the information directly (the typical CS-101 &lsquo;puts&rsquo; and &lsquo;gets&rsquo; pattern). This can be a lot more straightforward than having to read the help texts of your tool, and trying multiple times to enter all of the required data.
|
66
|
+
Of course, we want to make sure that scripting with the tool still works well (headless interaction).</description>
|
67
|
+
</item>
|
68
|
+
|
69
|
+
<item>
|
70
|
+
<title>Logging</title>
|
71
|
+
<link>https://akhoury6.github.io/rbcli/advanced/logging/</link>
|
72
|
+
<pubDate>Thu, 20 Jun 2019 15:07:21 -0400</pubDate>
|
73
|
+
|
74
|
+
<guid>https://akhoury6.github.io/rbcli/advanced/logging/</guid>
|
75
|
+
<description>Logging with RBCli is straightforward - it looks at the config file for logging settings, and instantiates a single, globally accessible Logger object. You can access it within a standard command like this:
|
76
|
+
Rbcli::log.info { &#39;These logs can go to STDERR, STDOUT, or a file&#39; } Enabling Logging To enable logging, simply set the default values in the config/logging.rb file:
|
77
|
+
log_level :info log_target &#39;stderr&#39; log_level You can set the default log level using either numeric or standard Ruby logger levels: 0-5, or DEBUG &lt; INFO &lt; WARN &lt; ERROR &lt; FATAL &lt; UNKNOWN log_target This specifies where the logs will be placed.</description>
|
78
|
+
</item>
|
79
|
+
|
80
|
+
<item>
|
81
|
+
<title>Remote Execution</title>
|
82
|
+
<link>https://akhoury6.github.io/rbcli/advanced/remote_execution/</link>
|
83
|
+
<pubDate>Thu, 20 Jun 2019 15:07:21 -0400</pubDate>
|
84
|
+
|
85
|
+
<guid>https://akhoury6.github.io/rbcli/advanced/remote_execution/</guid>
|
86
|
+
<description>RBCli can be configured to execute commands on a remote machine via SSH instead of locally.
|
87
|
+
Currently, only script and extern commands are supported.
|
88
|
+
Configuration To allow remote execution, go to config/general.rb and change the following line to true:
|
89
|
+
remote_execution permitted: false Then, for each command that you would like to enable remote execution for, add the following directive to the command class declaration:
|
90
|
+
remote_permitted Usage Your end users can now execute a command remotely by specifying the connection string and credentials on the command line as follows:</description>
|
91
|
+
</item>
|
92
|
+
|
93
|
+
<item>
|
94
|
+
<title>State Storage</title>
|
95
|
+
<link>https://akhoury6.github.io/rbcli/advanced/state_storage/</link>
|
96
|
+
<pubDate>Thu, 20 Jun 2019 15:07:21 -0400</pubDate>
|
97
|
+
|
98
|
+
<guid>https://akhoury6.github.io/rbcli/advanced/state_storage/</guid>
|
99
|
+
<description>RBCli supports both local and remote state storage. This is done by synchronizing a Hash with either the local disk or a remote database.
|
100
|
+
Local State RBCli&rsquo;s local state storage gives you access to a hash that is automatically persisted to disk when changes are made.
|
101
|
+
Configuration You can configure it in config/storage.rb.
|
102
|
+
local_state &#39;/var/mytool/localstate&#39;, force_creation: true, halt_on_error: true There are three parameters to configure it with:
|
103
|
+
The path as a string (self-explanatory) force_creation This will attempt to create the path and file if it does not exist (equivalent to an mkdir -p and touch in linux) halt_on_error RBCli&rsquo;s default behavior is to raise an exception if the file can not be created, read, or updated at any point in time If this is set to false, RBCli will silence any errors pertaining to file access and will fall back to whatever data is available.</description>
|
104
|
+
</item>
|
105
|
+
|
106
|
+
<item>
|
107
|
+
<title>User Configuration Files</title>
|
108
|
+
<link>https://akhoury6.github.io/rbcli/advanced/user_config_files/</link>
|
109
|
+
<pubDate>Thu, 20 Jun 2019 15:07:21 -0400</pubDate>
|
110
|
+
|
111
|
+
<guid>https://akhoury6.github.io/rbcli/advanced/user_config_files/</guid>
|
112
|
+
<description>RBCli provides built-in support for creating and managing userspace configuration files. It does this through two chains: the defaults chain and the user chain.
|
113
|
+
Defaults chain The defaults chain allows you to specify sane defaults for your CLI tool throughout your code. This gives you the ability to declare configuration alongside the code, and allows RBCli to generate a user config automatically given your defaults. There are two ways to set them:</description>
|
114
|
+
</item>
|
115
|
+
|
116
|
+
</channel>
|
117
|
+
</rss>
|
@@ -1,829 +1,1177 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en" class="js csstransforms3d">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<meta name="generator" content="Hugo 0.74.3" />
|
7
|
+
<meta name="description" content="">
|
1
8
|
|
2
9
|
|
10
|
+
<link rel="icon" href="/rbcli/images/favicon.png" type="image/png">
|
3
11
|
|
12
|
+
<title>Interactive Commands :: RBCli Documentation</title>
|
4
13
|
|
5
|
-
<!DOCTYPE html>
|
6
|
-
<html lang="en" class="no-js">
|
7
|
-
<head>
|
8
|
-
|
9
|
-
<meta charset="utf-8">
|
10
|
-
<meta name="viewport" content="width=device-width,initial-scale=1">
|
11
|
-
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
12
|
-
|
13
|
-
<meta name="description" content="Description">
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
<meta name="author" content="Andrew Khoury">
|
18
|
-
|
19
|
-
|
20
|
-
<meta name="lang:clipboard.copy" content="Copy to clipboard">
|
21
|
-
|
22
|
-
<meta name="lang:clipboard.copied" content="Copied to clipboard">
|
23
|
-
|
24
|
-
<meta name="lang:search.language" content="en">
|
25
|
-
|
26
|
-
<meta name="lang:search.pipeline.stopwords" content="True">
|
27
|
-
|
28
|
-
<meta name="lang:search.pipeline.trimmer" content="True">
|
29
|
-
|
30
|
-
<meta name="lang:search.result.none" content="No matching documents">
|
31
|
-
|
32
|
-
<meta name="lang:search.result.one" content="1 matching document">
|
33
|
-
|
34
|
-
<meta name="lang:search.result.other" content="# matching documents">
|
35
|
-
|
36
|
-
<meta name="lang:search.tokenizer" content="[\s\-]+">
|
37
|
-
|
38
|
-
<link rel="shortcut icon" href="../../assets/images/favicon.png">
|
39
|
-
<meta name="generator" content="mkdocs-1.0.3, mkdocs-material-3.0.4">
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
<title>Interactive Commands - RBCli Documentation</title>
|
44
|
-
|
45
14
|
|
15
|
+
<link href="/rbcli/css/nucleus.css?1596148729" rel="stylesheet">
|
16
|
+
<link href="/rbcli/css/fontawesome-all.min.css?1596148729" rel="stylesheet">
|
17
|
+
<link href="/rbcli/css/hybrid.css?1596148729" rel="stylesheet">
|
18
|
+
<link href="/rbcli/css/featherlight.min.css?1596148729" rel="stylesheet">
|
19
|
+
<link href="/rbcli/css/perfect-scrollbar.min.css?1596148729" rel="stylesheet">
|
20
|
+
<link href="/rbcli/css/auto-complete.css?1596148729" rel="stylesheet">
|
21
|
+
<link href="/rbcli/css/atom-one-dark-reasonable.css?1596148729" rel="stylesheet">
|
22
|
+
<link href="/rbcli/css/theme.css?1596148729" rel="stylesheet">
|
23
|
+
<link href="/rbcli/css/hugo-theme.css?1596148729" rel="stylesheet">
|
46
24
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
<script src="../../assets/javascripts/modernizr.1aa3b519.js"></script>
|
25
|
+
<link href="/rbcli/css/theme-blue.css?1596148729" rel="stylesheet">
|
53
26
|
|
54
27
|
|
28
|
+
|
29
|
+
<script src="/rbcli/js/jquery-3.3.1.min.js?1596148729"></script>
|
30
|
+
|
31
|
+
<style>
|
32
|
+
:root #header + #content > #left > #rlblock_left{
|
33
|
+
display:none !important;
|
34
|
+
}
|
55
35
|
|
56
|
-
|
57
|
-
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700|Roboto+Mono">
|
58
|
-
<style>body,input{font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}</style>
|
59
|
-
|
60
|
-
|
61
|
-
<link rel="stylesheet" href="../../assets/fonts/material-icons.css">
|
62
|
-
|
36
|
+
</style>
|
63
37
|
|
64
38
|
</head>
|
65
|
-
|
66
|
-
<
|
67
|
-
|
68
|
-
<svg class="md-svg">
|
69
|
-
<defs>
|
70
|
-
|
71
|
-
|
72
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448"
|
73
|
-
viewBox="0 0 416 448" id="__github">
|
74
|
-
<path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19-18.125
|
75
|
-
8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19 18.125-8.5
|
76
|
-
18.125 8.5 10.75 19 3.125 20.5zM320 304q0 10-3.125 20.5t-10.75
|
77
|
-
19-18.125 8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19
|
78
|
-
18.125-8.5 18.125 8.5 10.75 19 3.125 20.5zM360
|
79
|
-
304q0-30-17.25-51t-46.75-21q-10.25 0-48.75 5.25-17.75 2.75-39.25
|
80
|
-
2.75t-39.25-2.75q-38-5.25-48.75-5.25-29.5 0-46.75 21t-17.25 51q0 22 8
|
81
|
-
38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0
|
82
|
-
37.25-1.75t35-7.375 30.5-15 20.25-25.75 8-38.375zM416 260q0 51.75-15.25
|
83
|
-
82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5-41.75
|
84
|
-
1.125q-19.5 0-35.5-0.75t-36.875-3.125-38.125-7.5-34.25-12.875-30.25-20.25-21.5-28.75q-15.5-30.75-15.5-82.75
|
85
|
-
0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25
|
86
|
-
30.875q36.75-8.75 77.25-8.75 37 0 70 8 26.25-20.5
|
87
|
-
46.75-30.25t47.25-9.75q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34
|
88
|
-
99.5z" />
|
89
|
-
</svg>
|
90
|
-
|
91
|
-
</defs>
|
92
|
-
</svg>
|
93
|
-
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
|
94
|
-
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
|
95
|
-
<label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
|
96
|
-
|
97
|
-
<a href="../../#interactive-commands" tabindex="1" class="md-skip">
|
98
|
-
Skip to content
|
99
|
-
</a>
|
100
|
-
|
101
|
-
|
102
|
-
<header class="md-header" data-md-component="header">
|
103
|
-
<nav class="md-header-nav md-grid">
|
104
|
-
<div class="md-flex">
|
105
|
-
<div class="md-flex__cell md-flex__cell--shrink">
|
106
|
-
<a href="../.." title="RBCli Documentation" class="md-header-nav__button md-logo">
|
107
|
-
|
108
|
-
<i class="md-icon">devices</i>
|
109
|
-
|
110
|
-
</a>
|
111
|
-
</div>
|
112
|
-
<div class="md-flex__cell md-flex__cell--shrink">
|
113
|
-
<label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
|
114
|
-
</div>
|
115
|
-
<div class="md-flex__cell md-flex__cell--stretch">
|
116
|
-
<div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
|
117
|
-
|
118
|
-
|
119
|
-
<span class="md-header-nav__topic">
|
120
|
-
RBCli Documentation
|
121
|
-
</span>
|
122
|
-
<span class="md-header-nav__topic">
|
123
|
-
Interactive Commands
|
124
|
-
</span>
|
125
|
-
|
126
|
-
|
127
|
-
</div>
|
128
|
-
</div>
|
129
|
-
<div class="md-flex__cell md-flex__cell--shrink">
|
130
|
-
|
131
|
-
|
132
|
-
<label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
|
133
|
-
|
134
|
-
<div class="md-search" data-md-component="search" role="dialog">
|
135
|
-
<label class="md-search__overlay" for="__search"></label>
|
136
|
-
<div class="md-search__inner" role="search">
|
137
|
-
<form class="md-search__form" name="search">
|
138
|
-
<input type="text" class="md-search__input" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
|
139
|
-
<label class="md-icon md-search__icon" for="__search"></label>
|
140
|
-
<button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
|
141
|
-

|
142
|
-
</button>
|
143
|
-
</form>
|
144
|
-
<div class="md-search__output">
|
145
|
-
<div class="md-search__scrollwrap" data-md-scrollfix>
|
146
|
-
<div class="md-search-result" data-md-component="result">
|
147
|
-
<div class="md-search-result__meta">
|
148
|
-
Type to start searching
|
149
|
-
</div>
|
150
|
-
<ol class="md-search-result__list"></ol>
|
151
|
-
</div>
|
152
|
-
</div>
|
153
|
-
</div>
|
154
|
-
</div>
|
155
|
-
</div>
|
156
|
-
|
157
|
-
|
158
|
-
</div>
|
159
|
-
|
160
|
-
<div class="md-flex__cell md-flex__cell--shrink">
|
161
|
-
<div class="md-header-nav__source">
|
162
|
-
|
39
|
+
<body class="" data-url="/rbcli/advanced/interactive_commands/">
|
40
|
+
<nav id="sidebar" class="">
|
163
41
|
|
164
42
|
|
165
|
-
|
166
43
|
|
44
|
+
<div id="header-wrapper">
|
45
|
+
<div id="header">
|
46
|
+
<a id="logo" href="https://akhoury6.github.io/rbcli/" style="font-size: 40px">
|
47
|
+
<span class="fas fa-terminal"></span> 𝚁𝙱𝙲𝚕𝚒
|
48
|
+
</a>
|
167
49
|
|
168
|
-
|
50
|
+
</div>
|
169
51
|
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
52
|
+
<div class="searchbox">
|
53
|
+
<label for="search-by"><i class="fas fa-search"></i></label>
|
54
|
+
<input data-search-input id="search-by" type="search" placeholder="Search...">
|
55
|
+
<span data-search-clear=""><i class="fas fa-times"></i></span>
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<script type="text/javascript" src="/rbcli/js/lunr.min.js?1596148729"></script>
|
59
|
+
<script type="text/javascript" src="/rbcli/js/auto-complete.js?1596148729"></script>
|
60
|
+
<script type="text/javascript">
|
175
61
|
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
62
|
+
var baseurl = "https:\/\/akhoury6.github.io\/rbcli\/";
|
63
|
+
|
64
|
+
</script>
|
65
|
+
<script type="text/javascript" src="/rbcli/js/search.js?1596148729"></script>
|
180
66
|
|
181
|
-
</div>
|
182
|
-
</div>
|
183
|
-
|
184
|
-
</div>
|
185
|
-
</nav>
|
186
|
-
</header>
|
187
67
|
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
68
|
+
</div>
|
194
69
|
|
195
|
-
|
70
|
+
<div class="highlightable">
|
71
|
+
<ul class="topics">
|
196
72
|
|
197
|
-
<nav class="md-tabs md-tabs--active" data-md-component="tabs">
|
198
|
-
<div class="md-tabs__inner md-grid">
|
199
|
-
<ul class="md-tabs__list">
|
200
|
-
|
201
73
|
|
202
|
-
|
203
|
-
|
204
|
-
<a href="../.." title="Home" class="md-tabs__link">
|
205
|
-
Home
|
206
|
-
</a>
|
207
|
-
|
208
|
-
</li>
|
74
|
+
|
75
|
+
|
209
76
|
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
<li class="md-tabs__item">
|
217
|
-
|
218
|
-
<a href="../../tutorial/10-getting_started/" title="Tutorial" class="md-tabs__link">
|
219
|
-
Tutorial
|
220
|
-
</a>
|
221
|
-
|
222
|
-
</li>
|
223
|
-
|
224
77
|
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
<li class="md-tabs__item">
|
230
|
-
|
231
|
-
<a href="../command_types/" title="Advanced Features" class="md-tabs__link md-tabs__link--active">
|
232
|
-
Advanced Features
|
233
|
-
</a>
|
234
|
-
|
235
|
-
</li>
|
236
|
-
|
237
78
|
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
<li class="md-tabs__item">
|
243
|
-
|
244
|
-
<a href="../../development/contributing/" title="Development" class="md-tabs__link">
|
245
|
-
Development
|
246
|
-
</a>
|
247
|
-
|
248
|
-
</li>
|
249
|
-
|
250
79
|
|
251
|
-
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
<li data-nav-id="/rbcli/quick_reference/" title="Quick Reference" class="dd-item
|
252
84
|
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
<main class="md-main">
|
259
|
-
<div class="md-main__inner md-grid" data-md-component="container">
|
85
|
+
|
86
|
+
|
87
|
+
">
|
88
|
+
<a href="/rbcli/quick_reference/">
|
89
|
+
Quick Reference
|
260
90
|
|
261
|
-
|
262
|
-
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
|
263
|
-
<div class="md-sidebar__scrollwrap">
|
264
|
-
<div class="md-sidebar__inner">
|
265
|
-
<nav class="md-nav md-nav--primary" data-md-level="0">
|
266
|
-
<label class="md-nav__title md-nav__title--site" for="__drawer">
|
267
|
-
<a href="../.." title="RBCli Documentation" class="md-nav__button md-logo">
|
268
|
-
|
269
|
-
<i class="md-icon">devices</i>
|
91
|
+
</a>
|
270
92
|
|
271
|
-
|
272
|
-
|
273
|
-
</label>
|
93
|
+
|
94
|
+
</li>
|
274
95
|
|
275
|
-
|
276
|
-
|
96
|
+
|
277
97
|
|
98
|
+
|
99
|
+
|
278
100
|
|
279
|
-
|
280
101
|
|
281
102
|
|
282
|
-
<a href="https://github.com/akhoury6/rbcli/" title="Go to repository" class="md-source" data-md-source="github">
|
283
|
-
|
284
|
-
<div class="md-source__icon">
|
285
|
-
<svg viewBox="0 0 24 24" width="24" height="24">
|
286
|
-
<use xlink:href="#__github" width="24" height="24"></use>
|
287
|
-
</svg>
|
288
|
-
</div>
|
289
|
-
|
290
|
-
<div class="md-source__repository">
|
291
|
-
GitHub
|
292
|
-
</div>
|
293
|
-
</a>
|
294
103
|
|
295
|
-
|
104
|
+
|
296
105
|
|
297
|
-
<ul class="md-nav__list" data-md-scrollfix>
|
298
106
|
|
107
|
+
<li data-nav-id="/rbcli/tutorial/" title="Tutorial" class="dd-item
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
">
|
112
|
+
<a href="/rbcli/tutorial/">
|
113
|
+
Tutorial
|
114
|
+
|
115
|
+
</a>
|
299
116
|
|
300
117
|
|
301
|
-
|
118
|
+
<ul>
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
302
128
|
|
303
129
|
|
304
|
-
<li class="md-nav__item">
|
305
|
-
<a href="../.." title="Home" class="md-nav__link">
|
306
|
-
Home
|
307
|
-
</a>
|
308
|
-
</li>
|
309
130
|
|
131
|
+
|
132
|
+
|
310
133
|
|
311
|
-
|
312
|
-
|
313
|
-
|
134
|
+
<li data-nav-id="/rbcli/tutorial/10-getting_started/" title="Getting Started" class="dd-item ">
|
135
|
+
<a href="/rbcli/tutorial/10-getting_started/">
|
136
|
+
<b>1. </b>Getting Started
|
137
|
+
|
138
|
+
</a>
|
139
|
+
</li>
|
140
|
+
|
141
|
+
|
142
|
+
|
314
143
|
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
315
148
|
|
316
|
-
<li class="md-nav__item">
|
317
|
-
<a href="../../imported/quick_reference/" title="Quick Reference" class="md-nav__link">
|
318
|
-
Quick Reference
|
319
|
-
</a>
|
320
|
-
</li>
|
321
149
|
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
150
|
|
327
151
|
|
328
|
-
|
329
|
-
|
330
|
-
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-3" type="checkbox" id="nav-3">
|
152
|
+
|
153
|
+
|
331
154
|
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
|
336
|
-
<label class="md-nav__title" for="nav-3">
|
337
|
-
Tutorial
|
338
|
-
</label>
|
339
|
-
<ul class="md-nav__list" data-md-scrollfix>
|
155
|
+
<li data-nav-id="/rbcli/tutorial/20-project_layout/" title="The Project Layout" class="dd-item ">
|
156
|
+
<a href="/rbcli/tutorial/20-project_layout/">
|
157
|
+
<b>2. </b>The Project Layout
|
340
158
|
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
<li class="md-nav__item">
|
348
|
-
<a href="../../tutorial/10-getting_started/" title="Getting Started" class="md-nav__link">
|
349
|
-
Getting Started
|
350
|
-
</a>
|
351
|
-
</li>
|
159
|
+
</a>
|
160
|
+
</li>
|
161
|
+
|
162
|
+
|
163
|
+
|
352
164
|
|
353
|
-
|
354
|
-
|
355
|
-
|
165
|
+
|
356
166
|
|
167
|
+
|
168
|
+
|
169
|
+
|
357
170
|
|
358
171
|
|
359
|
-
<li class="md-nav__item">
|
360
|
-
<a href="../../tutorial/20-project_layout/" title="The Project Layout" class="md-nav__link">
|
361
|
-
The Project Layout
|
362
|
-
</a>
|
363
|
-
</li>
|
364
172
|
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
<li data-nav-id="/rbcli/tutorial/30-your_first_command/" title="Your First Command" class="dd-item ">
|
177
|
+
<a href="/rbcli/tutorial/30-your_first_command/">
|
178
|
+
<b>3. </b>Your First Command
|
365
179
|
|
180
|
+
</a>
|
181
|
+
</li>
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
366
187
|
|
367
|
-
|
368
|
-
|
188
|
+
|
189
|
+
|
190
|
+
|
369
191
|
|
370
192
|
|
371
|
-
<li class="md-nav__item">
|
372
|
-
<a href="../../tutorial/30-your_first_command/" title="Your First Command" class="md-nav__link">
|
373
|
-
Your First Command
|
374
|
-
</a>
|
375
|
-
</li>
|
376
193
|
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
<li data-nav-id="/rbcli/tutorial/40-options_parameters_and_arguments/" title="Options, Parameters, and Arguments" class="dd-item ">
|
198
|
+
<a href="/rbcli/tutorial/40-options_parameters_and_arguments/">
|
199
|
+
<b>4. </b>Options, Parameters, and Arguments
|
377
200
|
|
201
|
+
</a>
|
202
|
+
</li>
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
378
208
|
|
379
|
-
|
380
|
-
|
209
|
+
|
210
|
+
|
211
|
+
|
381
212
|
|
382
213
|
|
383
|
-
<li class="md-nav__item">
|
384
|
-
<a href="../../tutorial/40-options_parameters_and_arguments/" title="Options, Parameters, and Arguments" class="md-nav__link">
|
385
|
-
Options, Parameters, and Arguments
|
386
|
-
</a>
|
387
|
-
</li>
|
388
214
|
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
<li data-nav-id="/rbcli/tutorial/50-publishing/" title="Publishing Your Application" class="dd-item ">
|
219
|
+
<a href="/rbcli/tutorial/50-publishing/">
|
220
|
+
<b>5. </b>Publishing Your Application
|
389
221
|
|
222
|
+
</a>
|
223
|
+
</li>
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
390
229
|
|
230
|
+
|
231
|
+
</ul>
|
232
|
+
|
233
|
+
</li>
|
234
|
+
|
235
|
+
|
236
|
+
|
391
237
|
|
392
238
|
|
393
239
|
|
394
240
|
|
395
|
-
<li class="md-nav__item">
|
396
|
-
<a href="../../tutorial/50-publishing/" title="Publishing and Distribution" class="md-nav__link">
|
397
|
-
Publishing and Distribution
|
398
|
-
</a>
|
399
|
-
</li>
|
400
|
-
|
401
|
-
|
402
|
-
</ul>
|
403
|
-
</nav>
|
404
|
-
</li>
|
405
241
|
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
242
|
|
243
|
+
|
411
244
|
|
412
|
-
|
413
|
-
|
414
|
-
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
|
415
245
|
|
416
|
-
|
417
|
-
|
418
|
-
<label class="md-nav__link" for="nav-4">
|
419
|
-
Advanced Features
|
420
|
-
</label>
|
421
|
-
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
|
422
|
-
<label class="md-nav__title" for="nav-4">
|
423
|
-
Advanced Features
|
424
|
-
</label>
|
425
|
-
<ul class="md-nav__list" data-md-scrollfix>
|
246
|
+
<li data-nav-id="/rbcli/advanced/" title="Advanced" class="dd-item
|
247
|
+
parent
|
426
248
|
|
427
249
|
|
250
|
+
">
|
251
|
+
<a href="/rbcli/advanced/">
|
252
|
+
Advanced
|
428
253
|
|
254
|
+
</a>
|
255
|
+
|
256
|
+
|
257
|
+
<ul>
|
429
258
|
|
430
259
|
|
431
|
-
|
432
|
-
|
433
|
-
<li class="md-nav__item">
|
434
|
-
<a href="../command_types/" title="Command Types" class="md-nav__link">
|
435
|
-
Command Types
|
436
|
-
</a>
|
437
|
-
</li>
|
438
|
-
|
439
|
-
|
440
260
|
|
441
261
|
|
262
|
+
|
442
263
|
|
264
|
+
|
265
|
+
|
266
|
+
|
443
267
|
|
444
268
|
|
445
|
-
<li class="md-nav__item">
|
446
|
-
<a href="../user_config_files/" title="User Config Files" class="md-nav__link">
|
447
|
-
User Config Files
|
448
|
-
</a>
|
449
|
-
</li>
|
450
269
|
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
<li data-nav-id="/rbcli/advanced/automatic_updates/" title="Automatic Updates" class="dd-item ">
|
274
|
+
<a href="/rbcli/advanced/automatic_updates/">
|
275
|
+
Automatic Updates
|
451
276
|
|
277
|
+
</a>
|
278
|
+
</li>
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
452
284
|
|
453
|
-
|
454
|
-
|
285
|
+
|
286
|
+
|
287
|
+
|
455
288
|
|
456
289
|
|
457
|
-
<li class="md-nav__item">
|
458
|
-
<a href="../hooks/" title="Hooks" class="md-nav__link">
|
459
|
-
Hooks
|
460
|
-
</a>
|
461
|
-
</li>
|
462
290
|
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
<li data-nav-id="/rbcli/advanced/command_types/" title="Command Types" class="dd-item ">
|
295
|
+
<a href="/rbcli/advanced/command_types/">
|
296
|
+
Command Types
|
463
297
|
|
298
|
+
</a>
|
299
|
+
</li>
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
464
305
|
|
465
|
-
|
466
|
-
|
306
|
+
|
307
|
+
|
308
|
+
|
467
309
|
|
468
310
|
|
469
|
-
<li class="md-nav__item">
|
470
|
-
<a href="../logging/" title="Logging" class="md-nav__link">
|
471
|
-
Logging
|
472
|
-
</a>
|
473
|
-
</li>
|
474
311
|
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
<li data-nav-id="/rbcli/advanced/distributed_state_locking/" title="Distributed State and Locking" class="dd-item ">
|
316
|
+
<a href="/rbcli/advanced/distributed_state_locking/">
|
317
|
+
Distributed State and Locking
|
475
318
|
|
319
|
+
</a>
|
320
|
+
</li>
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
|
476
326
|
|
477
|
-
|
478
|
-
|
327
|
+
|
328
|
+
|
329
|
+
|
479
330
|
|
480
331
|
|
481
|
-
<li class="md-nav__item">
|
482
|
-
<a href="../automatic_updates/" title="Automatic Updates" class="md-nav__link">
|
483
|
-
Automatic Updates
|
484
|
-
</a>
|
485
|
-
</li>
|
486
332
|
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
<li data-nav-id="/rbcli/advanced/hooks/" title="Execution Hooks" class="dd-item ">
|
337
|
+
<a href="/rbcli/advanced/hooks/">
|
338
|
+
Execution Hooks
|
487
339
|
|
340
|
+
</a>
|
341
|
+
</li>
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
|
488
347
|
|
489
|
-
|
490
|
-
|
348
|
+
|
349
|
+
|
350
|
+
|
491
351
|
|
492
352
|
|
493
|
-
<li class="md-nav__item">
|
494
|
-
<a href="../state_storage/" title="State Storage" class="md-nav__link">
|
495
|
-
State Storage
|
496
|
-
</a>
|
497
|
-
</li>
|
498
353
|
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
<li data-nav-id="/rbcli/advanced/interactive_commands/" title="Interactive Commands" class="dd-item active">
|
358
|
+
<a href="/rbcli/advanced/interactive_commands/">
|
359
|
+
Interactive Commands
|
499
360
|
|
361
|
+
</a>
|
362
|
+
</li>
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
|
500
368
|
|
501
|
-
|
502
|
-
|
369
|
+
|
370
|
+
|
503
371
|
|
504
372
|
|
505
|
-
<li class="md-nav__item">
|
506
|
-
<a href="../distributed_state_locking/" title="Distributed State Locking" class="md-nav__link">
|
507
|
-
Distributed State Locking
|
508
|
-
</a>
|
509
|
-
</li>
|
510
373
|
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
|
378
|
+
<li data-nav-id="/rbcli/advanced/logging/" title="Logging" class="dd-item ">
|
379
|
+
<a href="/rbcli/advanced/logging/">
|
380
|
+
Logging
|
511
381
|
|
382
|
+
</a>
|
383
|
+
</li>
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
|
512
389
|
|
513
|
-
|
514
|
-
|
390
|
+
|
391
|
+
|
515
392
|
|
516
393
|
|
517
|
-
<li class="md-nav__item">
|
518
|
-
<a href="../remote_execution/" title="Remote Execution" class="md-nav__link">
|
519
|
-
Remote Execution
|
520
|
-
</a>
|
521
|
-
</li>
|
522
394
|
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
<li data-nav-id="/rbcli/advanced/remote_execution/" title="Remote Execution" class="dd-item ">
|
400
|
+
<a href="/rbcli/advanced/remote_execution/">
|
401
|
+
Remote Execution
|
523
402
|
|
403
|
+
</a>
|
404
|
+
</li>
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
|
524
410
|
|
525
|
-
|
526
|
-
|
411
|
+
|
412
|
+
|
527
413
|
|
528
|
-
|
529
414
|
|
530
415
|
|
531
|
-
|
532
|
-
|
533
|
-
<input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="__toc">
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
<label class="md-nav__link md-nav__link--active" for="__toc">
|
539
|
-
Interactive Commands
|
540
|
-
</label>
|
541
|
-
|
542
|
-
<a href="./" title="Interactive Commands" class="md-nav__link md-nav__link--active">
|
543
|
-
Interactive Commands
|
544
|
-
</a>
|
545
|
-
|
546
|
-
|
547
|
-
<nav class="md-nav md-nav--secondary">
|
548
|
-
|
416
|
+
|
417
|
+
|
549
418
|
|
550
419
|
|
420
|
+
<li data-nav-id="/rbcli/advanced/state_storage/" title="State Storage" class="dd-item ">
|
421
|
+
<a href="/rbcli/advanced/state_storage/">
|
422
|
+
State Storage
|
423
|
+
|
424
|
+
</a>
|
425
|
+
</li>
|
426
|
+
|
551
427
|
|
552
|
-
|
553
|
-
<label class="md-nav__title" for="__toc">Table of contents</label>
|
554
|
-
<ul class="md-nav__list" data-md-scrollfix>
|
555
|
-
|
556
|
-
<li class="md-nav__item">
|
557
|
-
<a href="#why-interactive-commands" title="Why interactive commands?" class="md-nav__link">
|
558
|
-
Why interactive commands?
|
559
|
-
</a>
|
560
|
-
|
561
|
-
</li>
|
562
|
-
|
563
|
-
<li class="md-nav__item">
|
564
|
-
<a href="#how-to-do-it-with-rbcli" title="How to do it with Rbcli" class="md-nav__link">
|
565
|
-
How to do it with Rbcli
|
566
|
-
</a>
|
567
|
-
|
568
|
-
</li>
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
</ul>
|
575
|
-
|
576
|
-
</nav>
|
577
|
-
|
578
|
-
</li>
|
428
|
+
|
579
429
|
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
|
584
434
|
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
435
|
|
590
436
|
|
591
|
-
|
592
|
-
|
593
|
-
|
437
|
+
|
438
|
+
|
439
|
+
|
594
440
|
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
|
599
|
-
<label class="md-nav__title" for="nav-5">
|
600
|
-
Development
|
601
|
-
</label>
|
602
|
-
<ul class="md-nav__list" data-md-scrollfix>
|
603
|
-
|
441
|
+
<li data-nav-id="/rbcli/advanced/user_config_files/" title="User Configuration Files" class="dd-item ">
|
442
|
+
<a href="/rbcli/advanced/user_config_files/">
|
443
|
+
User Configuration Files
|
604
444
|
|
445
|
+
</a>
|
446
|
+
</li>
|
447
|
+
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
|
605
452
|
|
453
|
+
|
454
|
+
</ul>
|
455
|
+
|
456
|
+
</li>
|
457
|
+
|
458
|
+
|
459
|
+
|
606
460
|
|
607
461
|
|
608
462
|
|
609
463
|
|
610
|
-
<li class="md-nav__item">
|
611
|
-
<a href="../../development/contributing/" title="Contribution Guide" class="md-nav__link">
|
612
|
-
Contribution Guide
|
613
|
-
</a>
|
614
|
-
</li>
|
615
464
|
|
465
|
+
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
<li data-nav-id="/rbcli/development/" title="Development" class="dd-item
|
470
|
+
|
616
471
|
|
472
|
+
|
473
|
+
">
|
474
|
+
<a href="/rbcli/development/">
|
475
|
+
Development
|
617
476
|
|
477
|
+
</a>
|
478
|
+
|
479
|
+
|
480
|
+
<ul>
|
618
481
|
|
619
482
|
|
620
|
-
|
621
|
-
|
622
|
-
<li class="md-nav__item">
|
623
|
-
<a href="../../development/license/" title="License Info" class="md-nav__link">
|
624
|
-
License Info
|
625
|
-
</a>
|
626
|
-
</li>
|
627
|
-
|
628
|
-
|
629
483
|
|
630
484
|
|
485
|
+
|
631
486
|
|
487
|
+
|
488
|
+
|
632
489
|
|
633
490
|
|
634
|
-
<li class="md-nav__item">
|
635
|
-
<a href="../../development/code_of_conduct/" title="Code of Conduct" class="md-nav__link">
|
636
|
-
Code of Conduct
|
637
|
-
</a>
|
638
|
-
</li>
|
639
491
|
|
492
|
+
|
493
|
+
|
494
|
+
|
495
|
+
|
496
|
+
<li data-nav-id="/rbcli/development/contributing/" title="Contribution Guide" class="dd-item ">
|
497
|
+
<a href="/rbcli/development/contributing/">
|
498
|
+
Contribution Guide
|
640
499
|
|
500
|
+
</a>
|
501
|
+
</li>
|
502
|
+
|
503
|
+
|
504
|
+
|
505
|
+
|
506
|
+
|
641
507
|
|
642
|
-
|
643
|
-
|
508
|
+
|
509
|
+
|
644
510
|
|
645
511
|
|
646
|
-
<li class="md-nav__item">
|
647
|
-
<a href="../../imported/changelog/" title="Changelog" class="md-nav__link">
|
648
|
-
Changelog
|
649
|
-
</a>
|
650
|
-
</li>
|
651
512
|
|
652
|
-
|
653
|
-
</ul>
|
654
|
-
</nav>
|
655
|
-
</li>
|
656
513
|
|
514
|
+
|
515
|
+
|
657
516
|
|
658
|
-
|
659
|
-
|
660
|
-
|
517
|
+
<li data-nav-id="/rbcli/development/license/" title="License Info" class="dd-item ">
|
518
|
+
<a href="/rbcli/development/license/">
|
519
|
+
License Info
|
520
|
+
|
521
|
+
</a>
|
522
|
+
</li>
|
523
|
+
|
524
|
+
|
525
|
+
|
526
|
+
|
527
|
+
|
528
|
+
|
529
|
+
|
530
|
+
|
661
531
|
|
662
532
|
|
663
|
-
<li class="md-nav__item">
|
664
|
-
<a href="../../whoami/" title="whoami" class="md-nav__link">
|
665
|
-
whoami
|
666
|
-
</a>
|
667
|
-
</li>
|
668
533
|
|
534
|
+
|
535
|
+
|
536
|
+
|
669
537
|
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
538
|
+
<li data-nav-id="/rbcli/development/code_of_conduct/" title="Code of Conduct" class="dd-item ">
|
539
|
+
<a href="/rbcli/development/code_of_conduct/">
|
540
|
+
Code of Conduct
|
541
|
+
|
542
|
+
</a>
|
543
|
+
</li>
|
544
|
+
|
545
|
+
|
546
|
+
|
547
|
+
|
548
|
+
|
549
|
+
|
675
550
|
|
676
551
|
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
|
556
|
+
|
683
557
|
|
684
558
|
|
559
|
+
<li data-nav-id="/rbcli/development/changelog/" title="Changelog" class="dd-item ">
|
560
|
+
<a href="/rbcli/development/changelog/">
|
561
|
+
Changelog
|
562
|
+
|
563
|
+
</a>
|
564
|
+
</li>
|
565
|
+
|
685
566
|
|
686
|
-
|
687
|
-
|
688
|
-
<ul class="md-nav__list" data-md-scrollfix>
|
689
|
-
|
690
|
-
<li class="md-nav__item">
|
691
|
-
<a href="#why-interactive-commands" title="Why interactive commands?" class="md-nav__link">
|
692
|
-
Why interactive commands?
|
693
|
-
</a>
|
694
|
-
|
695
|
-
</li>
|
696
|
-
|
697
|
-
<li class="md-nav__item">
|
698
|
-
<a href="#how-to-do-it-with-rbcli" title="How to do it with Rbcli" class="md-nav__link">
|
699
|
-
How to do it with Rbcli
|
700
|
-
</a>
|
701
|
-
|
702
|
-
</li>
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
</ul>
|
709
|
-
|
710
|
-
</nav>
|
711
|
-
</div>
|
712
|
-
</div>
|
713
|
-
</div>
|
567
|
+
|
568
|
+
|
714
569
|
|
715
570
|
|
716
|
-
|
717
|
-
|
571
|
+
|
572
|
+
</ul>
|
718
573
|
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
<h2 id="why-interactive-commands">Why interactive commands?</h2>
|
723
|
-
<p>When catering to an audience of users who are not accustomed to scripting, you may want to prompt them for the information directly (the typical CS-101 'puts' and 'gets' pattern). This can be a lot more straightforward than having to read the help texts of your tool, and trying multiple times to enter all of the required data.</p>
|
724
|
-
<p>Of course, we want to make sure that scripting with the tool still works well (headless interaction). We accomplish this by extending our parameters with a <code>prompt</code> option; RBCli will continue to accept the parameter as usual, but if the parameter is omitted then it will prompt the user with the given text.</p>
|
725
|
-
<h2 id="how-to-do-it-with-rbcli">How to do it with Rbcli</h2>
|
726
|
-
<p>There is an option when declaring a command's parameters to prompt the user for a value if not entered on the command line. This can be done with the <code>prompt:</code> keyword. For example:</p>
|
727
|
-
<pre><code class="ruby">class Mycmd < Rbcli::Command
|
728
|
-
parameter :sort, 'Sort output alphabetically', type: :boolean, default: false, prompt: "Sort output alphabetically?"
|
729
|
-
action do |params, args, global_opts, config|
|
730
|
-
puts params[:sort]
|
731
|
-
end
|
732
|
-
end
|
733
|
-
</code></pre>
|
734
|
-
|
735
|
-
<p>Now, if we run the command while omitting the <code>--sort</code> parameter, as such:</p>
|
736
|
-
<pre><code class="bash">mytool mycmd
|
737
|
-
</code></pre>
|
738
|
-
|
739
|
-
<p>That should give you the prompt:</p>
|
740
|
-
<pre><code>Sort output alphabetically? (y/N):
|
741
|
-
</code></pre>
|
574
|
+
</li>
|
575
|
+
|
576
|
+
|
742
577
|
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
578
|
+
|
579
|
+
|
751
580
|
|
752
581
|
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
</div>
|
757
|
-
</main>
|
758
|
-
|
759
|
-
|
760
|
-
<footer class="md-footer">
|
761
|
-
|
762
|
-
<div class="md-footer-nav">
|
763
|
-
<nav class="md-footer-nav__inner md-grid">
|
764
|
-
|
765
|
-
<a href="../remote_execution/" title="Remote Execution" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
|
766
|
-
<div class="md-flex__cell md-flex__cell--shrink">
|
767
|
-
<i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
|
768
|
-
</div>
|
769
|
-
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
|
770
|
-
<span class="md-flex__ellipsis">
|
771
|
-
<span class="md-footer-nav__direction">
|
772
|
-
Previous
|
773
|
-
</span>
|
774
|
-
Remote Execution
|
775
|
-
</span>
|
776
|
-
</div>
|
777
|
-
</a>
|
778
|
-
|
779
|
-
|
780
|
-
<a href="../../development/contributing/" title="Contribution Guide" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
|
781
|
-
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
|
782
|
-
<span class="md-flex__ellipsis">
|
783
|
-
<span class="md-footer-nav__direction">
|
784
|
-
Next
|
785
|
-
</span>
|
786
|
-
Contribution Guide
|
787
|
-
</span>
|
788
|
-
</div>
|
789
|
-
<div class="md-flex__cell md-flex__cell--shrink">
|
790
|
-
<i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i>
|
791
|
-
</div>
|
792
|
-
</a>
|
793
|
-
|
794
|
-
</nav>
|
795
|
-
</div>
|
582
|
+
|
583
|
+
|
584
|
+
|
796
585
|
|
797
|
-
|
798
|
-
<
|
799
|
-
<div class="md-footer-copyright">
|
586
|
+
|
587
|
+
<li data-nav-id="/rbcli/whoami/" title="My Letter To You" class="dd-item
|
800
588
|
|
801
|
-
<div class="md-footer-copyright__highlight">
|
802
|
-
Copyright © 2018 Andrew Khoury
|
803
|
-
</div>
|
804
589
|
|
805
|
-
powered by
|
806
|
-
<a href="https://www.mkdocs.org">MkDocs</a>
|
807
|
-
and
|
808
|
-
<a href="https://squidfunk.github.io/mkdocs-material/">
|
809
|
-
Material for MkDocs</a>
|
810
|
-
</div>
|
811
|
-
|
812
590
|
|
591
|
+
">
|
592
|
+
<a href="/rbcli/whoami/">
|
593
|
+
My Letter To You
|
594
|
+
|
595
|
+
</a>
|
813
596
|
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
597
|
+
|
598
|
+
</li>
|
599
|
+
|
600
|
+
|
601
|
+
|
602
|
+
|
603
|
+
|
604
|
+
</ul>
|
605
|
+
|
824
606
|
|
825
607
|
|
826
|
-
|
608
|
+
<section id="shortcuts">
|
609
|
+
<h3>More</h3>
|
610
|
+
<ul>
|
611
|
+
|
612
|
+
<li>
|
613
|
+
<a class="padding" href="https://github.com/akhoury6/rbcli"><i class='fab fa-github'></i> Github repo</a>
|
614
|
+
</li>
|
615
|
+
|
616
|
+
<li>
|
617
|
+
<a class="padding" href="https://rubygems.org/gems/rbcli"><i class='far fa-gem'></i> Rubygems</a>
|
618
|
+
</li>
|
619
|
+
|
620
|
+
</ul>
|
621
|
+
</section>
|
827
622
|
|
623
|
+
|
624
|
+
|
625
|
+
<section id="footer">
|
626
|
+
<p>Built with <a href="https://github.com/matcornic/hugo-theme-learn"><i class="fas fa-heart"></i></a> from <a href="https://getgrav.org">Grav</a> and <a href="https://gohugo.io/">Hugo</a></p>
|
627
|
+
|
628
|
+
</section>
|
629
|
+
</div>
|
630
|
+
</nav>
|
631
|
+
|
632
|
+
|
633
|
+
|
634
|
+
|
635
|
+
<section id="body">
|
636
|
+
<div id="overlay"></div>
|
637
|
+
<div class="padding highlightable">
|
638
|
+
|
639
|
+
<div>
|
640
|
+
<div id="top-bar">
|
641
|
+
|
642
|
+
|
643
|
+
<div id="breadcrumbs" itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb">
|
644
|
+
<span id="sidebar-toggle-span">
|
645
|
+
<a href="#" id="sidebar-toggle" data-sidebar-toggle="">
|
646
|
+
<i class="fas fa-bars"></i>
|
647
|
+
</a>
|
648
|
+
</span>
|
649
|
+
|
650
|
+
<span id="toc-menu"><i class="fas fa-list-alt"></i></span>
|
651
|
+
|
652
|
+
<span class="links">
|
653
|
+
|
654
|
+
|
655
|
+
|
656
|
+
|
657
|
+
|
658
|
+
|
659
|
+
|
660
|
+
|
661
|
+
|
662
|
+
|
663
|
+
|
664
|
+
|
665
|
+
|
666
|
+
<a href='/rbcli/'></a> > <a href='/rbcli/advanced/'>Advanced</a> > Interactive Commands
|
667
|
+
|
668
|
+
|
669
|
+
|
670
|
+
|
671
|
+
|
672
|
+
|
673
|
+
|
674
|
+
</span>
|
675
|
+
</div>
|
676
|
+
|
677
|
+
<div class="progress">
|
678
|
+
<div class="wrapper">
|
679
|
+
<nav id="TableOfContents">
|
680
|
+
<ul>
|
681
|
+
<li><a href="#why-interactive-commands">Why interactive commands?</a></li>
|
682
|
+
<li><a href="#how-to-do-it-with-rbcli">How to do it with Rbcli</a></li>
|
683
|
+
</ul>
|
684
|
+
</nav>
|
685
|
+
</div>
|
686
|
+
</div>
|
687
|
+
|
688
|
+
|
689
|
+
</div>
|
690
|
+
</div>
|
691
|
+
|
692
|
+
<div id="head-tags">
|
693
|
+
|
694
|
+
</div>
|
695
|
+
|
696
|
+
<div id="body-inner">
|
697
|
+
|
698
|
+
<h1>
|
699
|
+
|
700
|
+
Interactive Commands
|
701
|
+
</h1>
|
702
|
+
|
703
|
+
|
704
|
+
|
705
|
+
|
706
|
+
|
707
|
+
<h2 id="why-interactive-commands">Why interactive commands?</h2>
|
708
|
+
<p>When catering to an audience of users who are not accustomed to scripting, you may want to prompt them for the information directly (the typical CS-101 ‘puts’ and ‘gets’ pattern). This can be a lot more straightforward than having to read the help texts of your tool, and trying multiple times to enter all of the required data.</p>
|
709
|
+
<p>Of course, we want to make sure that scripting with the tool still works well (headless interaction). We accomplish this by extending our parameters with a <code>prompt</code> option; RBCli will continue to accept the parameter as usual, but if the parameter is omitted then it will prompt the user with the given text.</p>
|
710
|
+
<h2 id="how-to-do-it-with-rbcli">How to do it with Rbcli</h2>
|
711
|
+
<p>There is an option when declaring a command’s parameters to prompt the user for a value if not entered on the command line. This can be done with the <code>prompt:</code> keyword. For example:</p>
|
712
|
+
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-ruby" data-lang="ruby"><span style="color:#66d9ef">class</span> <span style="color:#a6e22e">Mycmd</span> <span style="color:#f92672"><</span> <span style="color:#66d9ef">Rbcli</span><span style="color:#f92672">::</span><span style="color:#66d9ef">Command</span>
|
713
|
+
parameter <span style="color:#e6db74">:sort</span>, <span style="color:#e6db74">'Sort output alphabetically'</span>, <span style="color:#e6db74">type</span>: <span style="color:#e6db74">:boolean</span>, <span style="color:#e6db74">default</span>: <span style="color:#66d9ef">false</span>, <span style="color:#e6db74">prompt</span>: <span style="color:#e6db74">"Sort output alphabetically?"</span>
|
714
|
+
action <span style="color:#66d9ef">do</span> <span style="color:#f92672">|</span>params, args, global_opts, config<span style="color:#f92672">|</span>
|
715
|
+
puts params<span style="color:#f92672">[</span><span style="color:#e6db74">:sort</span><span style="color:#f92672">]</span>
|
716
|
+
<span style="color:#66d9ef">end</span>
|
717
|
+
<span style="color:#66d9ef">end</span>
|
718
|
+
</code></pre></div><p>Now, if we run the command while omitting the <code>--sort</code> parameter, as such:</p>
|
719
|
+
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">mytool mycmd
|
720
|
+
</code></pre></div><p>That should give you the prompt:</p>
|
721
|
+
<pre><code>Sort output alphabetically? (y/N):
|
722
|
+
</code></pre><p>Because we set the parameter to default to <code>false</code> the default here is <code>N</code>, which is used if the user hits enter without entering a letter. If the default was set to <code>true</code>, then the <code>Y</code> would be capitalized and be the default.</p>
|
723
|
+
<p>String parameters behave similarly, but default to the string defined instead of a boolean value.</p>
|
724
|
+
|
725
|
+
|
726
|
+
<footer class="footline">
|
727
|
+
|
728
|
+
</footer>
|
729
|
+
|
730
|
+
|
731
|
+
</div>
|
732
|
+
|
733
|
+
|
734
|
+
</div>
|
735
|
+
|
736
|
+
<div id="navigation">
|
737
|
+
|
738
|
+
|
739
|
+
|
740
|
+
|
741
|
+
|
742
|
+
|
743
|
+
|
744
|
+
|
745
|
+
|
746
|
+
|
747
|
+
|
748
|
+
|
749
|
+
|
750
|
+
|
751
|
+
|
752
|
+
|
753
|
+
|
754
|
+
|
755
|
+
|
756
|
+
|
757
|
+
|
758
|
+
|
759
|
+
|
760
|
+
|
761
|
+
|
762
|
+
|
763
|
+
|
764
|
+
|
765
|
+
|
766
|
+
|
767
|
+
|
768
|
+
|
769
|
+
|
770
|
+
|
771
|
+
|
772
|
+
|
773
|
+
|
774
|
+
|
775
|
+
|
776
|
+
|
777
|
+
|
778
|
+
|
779
|
+
|
780
|
+
|
781
|
+
|
782
|
+
|
783
|
+
|
784
|
+
|
785
|
+
|
786
|
+
|
787
|
+
|
788
|
+
|
789
|
+
|
790
|
+
|
791
|
+
|
792
|
+
|
793
|
+
|
794
|
+
|
795
|
+
|
796
|
+
|
797
|
+
|
798
|
+
|
799
|
+
|
800
|
+
|
801
|
+
|
802
|
+
|
803
|
+
|
804
|
+
|
805
|
+
|
806
|
+
|
807
|
+
|
808
|
+
|
809
|
+
|
810
|
+
|
811
|
+
|
812
|
+
|
813
|
+
|
814
|
+
|
815
|
+
|
816
|
+
|
817
|
+
|
818
|
+
|
819
|
+
|
820
|
+
|
821
|
+
|
822
|
+
|
823
|
+
|
824
|
+
|
825
|
+
|
826
|
+
|
827
|
+
|
828
|
+
|
829
|
+
|
830
|
+
|
831
|
+
|
832
|
+
|
833
|
+
|
834
|
+
|
835
|
+
|
836
|
+
|
837
|
+
|
838
|
+
|
839
|
+
|
840
|
+
|
841
|
+
|
842
|
+
|
843
|
+
|
844
|
+
|
845
|
+
|
846
|
+
|
847
|
+
|
848
|
+
|
849
|
+
|
850
|
+
|
851
|
+
|
852
|
+
|
853
|
+
|
854
|
+
|
855
|
+
|
856
|
+
|
857
|
+
|
858
|
+
|
859
|
+
|
860
|
+
|
861
|
+
|
862
|
+
|
863
|
+
|
864
|
+
|
865
|
+
|
866
|
+
|
867
|
+
|
868
|
+
|
869
|
+
|
870
|
+
|
871
|
+
|
872
|
+
|
873
|
+
|
874
|
+
|
875
|
+
|
876
|
+
|
877
|
+
|
878
|
+
|
879
|
+
|
880
|
+
|
881
|
+
|
882
|
+
|
883
|
+
|
884
|
+
|
885
|
+
|
886
|
+
|
887
|
+
|
888
|
+
|
889
|
+
|
890
|
+
|
891
|
+
|
892
|
+
|
893
|
+
|
894
|
+
|
895
|
+
|
896
|
+
|
897
|
+
|
898
|
+
|
899
|
+
|
900
|
+
|
901
|
+
|
902
|
+
|
903
|
+
|
904
|
+
|
905
|
+
|
906
|
+
|
907
|
+
|
908
|
+
|
909
|
+
|
910
|
+
|
911
|
+
|
912
|
+
|
913
|
+
|
914
|
+
|
915
|
+
|
916
|
+
|
917
|
+
|
918
|
+
|
919
|
+
|
920
|
+
|
921
|
+
|
922
|
+
|
923
|
+
|
924
|
+
|
925
|
+
|
926
|
+
|
927
|
+
|
928
|
+
|
929
|
+
|
930
|
+
|
931
|
+
|
932
|
+
|
933
|
+
|
934
|
+
|
935
|
+
|
936
|
+
|
937
|
+
|
938
|
+
|
939
|
+
|
940
|
+
|
941
|
+
|
942
|
+
|
943
|
+
|
944
|
+
|
945
|
+
|
946
|
+
|
947
|
+
|
948
|
+
|
949
|
+
|
950
|
+
|
951
|
+
|
952
|
+
|
953
|
+
|
954
|
+
|
955
|
+
|
956
|
+
|
957
|
+
|
958
|
+
|
959
|
+
|
960
|
+
|
961
|
+
|
962
|
+
|
963
|
+
|
964
|
+
|
965
|
+
|
966
|
+
|
967
|
+
|
968
|
+
|
969
|
+
|
970
|
+
|
971
|
+
|
972
|
+
|
973
|
+
|
974
|
+
|
975
|
+
|
976
|
+
|
977
|
+
|
978
|
+
|
979
|
+
|
980
|
+
|
981
|
+
|
982
|
+
|
983
|
+
|
984
|
+
|
985
|
+
|
986
|
+
|
987
|
+
|
988
|
+
|
989
|
+
|
990
|
+
|
991
|
+
|
992
|
+
|
993
|
+
|
994
|
+
|
995
|
+
|
996
|
+
|
997
|
+
|
998
|
+
|
999
|
+
|
1000
|
+
|
1001
|
+
|
1002
|
+
|
1003
|
+
|
1004
|
+
|
1005
|
+
|
1006
|
+
|
1007
|
+
|
1008
|
+
|
1009
|
+
|
1010
|
+
|
1011
|
+
|
1012
|
+
|
1013
|
+
|
1014
|
+
|
1015
|
+
|
1016
|
+
|
1017
|
+
|
1018
|
+
|
1019
|
+
|
1020
|
+
|
1021
|
+
|
1022
|
+
|
1023
|
+
|
1024
|
+
|
1025
|
+
|
1026
|
+
|
1027
|
+
|
1028
|
+
|
1029
|
+
|
1030
|
+
|
1031
|
+
|
1032
|
+
|
1033
|
+
|
1034
|
+
|
1035
|
+
|
1036
|
+
|
1037
|
+
|
1038
|
+
|
1039
|
+
|
1040
|
+
|
1041
|
+
|
1042
|
+
|
1043
|
+
|
1044
|
+
|
1045
|
+
|
1046
|
+
|
1047
|
+
|
1048
|
+
|
1049
|
+
|
1050
|
+
|
1051
|
+
|
1052
|
+
|
1053
|
+
|
1054
|
+
|
1055
|
+
|
1056
|
+
|
1057
|
+
|
1058
|
+
|
1059
|
+
|
1060
|
+
|
1061
|
+
|
1062
|
+
|
1063
|
+
|
1064
|
+
|
1065
|
+
|
1066
|
+
|
1067
|
+
|
1068
|
+
|
1069
|
+
|
1070
|
+
|
1071
|
+
|
1072
|
+
|
1073
|
+
|
1074
|
+
|
1075
|
+
|
1076
|
+
|
1077
|
+
|
1078
|
+
|
1079
|
+
|
1080
|
+
|
1081
|
+
|
1082
|
+
|
1083
|
+
|
1084
|
+
|
1085
|
+
|
1086
|
+
|
1087
|
+
|
1088
|
+
|
1089
|
+
|
1090
|
+
|
1091
|
+
|
1092
|
+
|
1093
|
+
|
1094
|
+
|
1095
|
+
|
1096
|
+
|
1097
|
+
|
1098
|
+
|
1099
|
+
|
1100
|
+
|
1101
|
+
|
1102
|
+
|
1103
|
+
|
1104
|
+
|
1105
|
+
|
1106
|
+
|
1107
|
+
|
1108
|
+
|
1109
|
+
|
1110
|
+
|
1111
|
+
|
1112
|
+
|
1113
|
+
|
1114
|
+
|
1115
|
+
|
1116
|
+
|
1117
|
+
|
1118
|
+
|
1119
|
+
|
1120
|
+
|
1121
|
+
|
1122
|
+
|
1123
|
+
|
1124
|
+
|
1125
|
+
|
1126
|
+
|
1127
|
+
|
1128
|
+
|
1129
|
+
|
1130
|
+
|
1131
|
+
|
1132
|
+
|
1133
|
+
|
1134
|
+
|
1135
|
+
|
1136
|
+
|
1137
|
+
|
1138
|
+
|
1139
|
+
|
1140
|
+
|
1141
|
+
|
1142
|
+
|
1143
|
+
|
1144
|
+
<a class="nav nav-prev" href="/rbcli/advanced/hooks/" title="Execution Hooks"> <i class="fa fa-chevron-left"></i></a>
|
1145
|
+
|
1146
|
+
|
1147
|
+
<a class="nav nav-next" href="/rbcli/advanced/logging/" title="Logging" style="margin-right: 0px;"><i class="fa fa-chevron-right"></i></a>
|
1148
|
+
|
1149
|
+
|
1150
|
+
</div>
|
1151
|
+
|
1152
|
+
</section>
|
1153
|
+
|
1154
|
+
<div style="left: -1000px; overflow: scroll; position: absolute; top: -1000px; border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;">
|
1155
|
+
<div style="border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;"></div>
|
1156
|
+
</div>
|
1157
|
+
<script src="/rbcli/js/clipboard.min.js?1596148729"></script>
|
1158
|
+
<script src="/rbcli/js/perfect-scrollbar.min.js?1596148729"></script>
|
1159
|
+
<script src="/rbcli/js/perfect-scrollbar.jquery.min.js?1596148729"></script>
|
1160
|
+
<script src="/rbcli/js/jquery.sticky.js?1596148729"></script>
|
1161
|
+
<script src="/rbcli/js/featherlight.min.js?1596148729"></script>
|
1162
|
+
<script src="/rbcli/js/highlight.pack.js?1596148729"></script>
|
1163
|
+
<script>hljs.initHighlightingOnLoad();</script>
|
1164
|
+
<script src="/rbcli/js/modernizr.custom-3.6.0.js?1596148729"></script>
|
1165
|
+
<script src="/rbcli/js/learn.js?1596148729"></script>
|
1166
|
+
<script src="/rbcli/js/hugo-learn.js?1596148729"></script>
|
1167
|
+
|
1168
|
+
<link href="/rbcli/mermaid/mermaid.css?1596148729" rel="stylesheet" />
|
1169
|
+
<script src="/rbcli/mermaid/mermaid.js?1596148729"></script>
|
1170
|
+
<script>
|
1171
|
+
mermaid.initialize({ startOnLoad: true });
|
1172
|
+
</script>
|
1173
|
+
|
1174
|
+
|
828
1175
|
</body>
|
829
|
-
</html>
|
1176
|
+
</html>
|
1177
|
+
|