Skip to content

Commit

Permalink
Merge pull request #805 from linsword13/docs
Browse files Browse the repository at this point in the history
Add the missing `ramble docs` command
  • Loading branch information
douglasjacobsen authored Jan 6, 2025
2 parents 39345d8 + 96e0669 commit 070ecda
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
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

0 comments on commit 070ecda

Please sign in to comment.