From b66b9923d9c4edb178396c627150b846974f0b09 Mon Sep 17 00:00:00 2001 From: Guillaume Chazarain Date: Mon, 11 Apr 2011 22:47:12 +0200 Subject: [PATCH] Pre-populate the history completion with gsh's own variables. --- gsh/control_commands.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gsh/control_commands.py b/gsh/control_commands.py index 071a247..19345bf 100644 --- a/gsh/control_commands.py +++ b/gsh/control_commands.py @@ -27,7 +27,7 @@ from gsh.control_commands_helpers import complete_shells, selected_shells from gsh.control_commands_helpers import list_control_commands from gsh.control_commands_helpers import get_control_command, toggle_shells from gsh.control_commands_helpers import expand_local_path -from gsh.completion import complete_local_path +from gsh.completion import complete_local_path, add_to_history from gsh.console import console_output from gsh.version import VERSION from gsh import dispatchers @@ -356,6 +356,8 @@ def do_export_vars(command): if shell.enabled: shell.dispatch_command('export GSH_NR_SHELLS=%d\n' % rank) +add_to_history('$GSH_RANK $GSH_NAME $GSH_DISPLAY_NAME $GSH_NR_SHELLS') + def complete_set_log(line, text): return complete_local_path(text) -- 2.11.4.GIT