Skip to content

Commit 57e6bf0

Browse files
committed
Fix Sphinx warning due to _static directory
Also: - Made alias_startup.py example robust as to what directory it is launched from
1 parent 38c23a8 commit 57e6bf0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
# Add any paths that contain custom static files (such as style sheets) here,
103103
# relative to this directory. They are copied after the builtin static files,
104104
# so a file named "default.css" will overwrite the builtin "default.css".
105-
html_static_path = ['_static']
105+
html_static_path = []
106106

107107

108108
# -- Options for HTMLHelp output ------------------------------------------

examples/alias_startup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
1) How to add custom command aliases using the alias command
55
2) How to load an initialization script at startup
66
"""
7-
7+
import os
88
import cmd2
99

1010
class AliasAndStartup(cmd2.Cmd):
1111
""" Example cmd2 application where we create commands that just print the arguments they are called with."""
1212

1313
def __init__(self):
14-
super().__init__(startup_script='.cmd2rc')
14+
alias_script = os.path.join(os.path.dirname(__file__), '.cmd2rc')
15+
super().__init__(startup_script=alias_script)
1516

1617

1718
if __name__ == '__main__':

0 commit comments

Comments
 (0)