Merge pull request #63 from Brobin/master

added program title to terminal title
This commit is contained in:
michael-lazar
2015-04-02 10:47:07 -07:00

View File

@@ -15,6 +15,7 @@ from .curses_helpers import curses_session
from .submission import SubmissionPage
from .subreddit import SubredditPage
from .docs import *
from .__version__ import __version__
__all__ = []
@@ -68,6 +69,13 @@ def main():
args = command_line()
local_config = load_config()
# set the terminal title
title = 'rtv {0}'.format(__version__)
if os.name == 'nt':
os.system('title {0}'.format(title))
else:
sys.stdout.write("\x1b]2;{0}\x07".format(title))
# Fill in empty arguments with config file values. Paramaters explicitly
# typed on the command line will take priority over config file params.
for key, val in local_config.items():