Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the missing ramble docs command #805

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions lib/ramble/ramble/cmd/docs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2022-2024 The Ramble Authors
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.

import webbrowser

description = "open Ramble documentation in a web browser"
section = "help"
level = "short"


def docs(parser, args):
webbrowser.open("https://ramble.readthedocs.io/")
2 changes: 1 addition & 1 deletion lib/ramble/ramble/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def add_subcommand_group(title, commands):
ramble help --all list all commands and options
ramble help <command> help on a specific command
ramble help --spec help on the application specification syntax
ramble docs open https://ramble.rtfd.io/ in a browser
ramble docs open https://ramble.readthedocs.io/ in a browser
""".format(
help=section_descriptions["help"]
)
Expand Down
6 changes: 5 additions & 1 deletion share/ramble/ramble-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ _ramble() {
then
RAMBLE_COMPREPLY="-h --help -H --all-help --color -c --config -C --config-scope -d --debug --disable-passthrough -N --disable-logger -P --disable-progress-bar --timestamp --pdb -w --workspace -D --workspace-dir -W --no-workspace --use-workspace-repo -k --insecure -l --enable-locks -L --disable-locks -m --mock --mock-applications --mock-modifiers --mock-package-managers --mock-base-applications --mock-base-modifiers --mock-base-package-managers -p --profile --sorted-profile --lines -v --verbose --stacktrace -V --version --print-shell-vars"
else
RAMBLE_COMPREPLY="attributes clean commands config debug deployment edit flake8 help info license list mirror mods on python repo results software-definitions style unit-test workspace"
RAMBLE_COMPREPLY="attributes clean commands config debug deployment docs edit flake8 help info license list mirror mods on python repo results software-definitions style unit-test workspace"
fi
}

Expand Down Expand Up @@ -408,6 +408,10 @@ _ramble_deployment_pull() {
RAMBLE_COMPREPLY="-h --help --deployment-path -p"
}

_ramble_docs() {
RAMBLE_COMPREPLY="-h --help"
}

_ramble_edit() {
if $list_options
then
Expand Down
Loading