Changeset 28618 in vbox for trunk/src/VBox/Frontends/VBoxShell
- Timestamp:
- Apr 22, 2010 10:35:33 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 60467
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxShell/vboxshell.py
r28614 r28618 32 32 import shlex 33 33 import time 34 import re 35 36 HISTORY_FILENAME=".vboxshell_history" 34 37 35 38 # Simple implementation of IConsoleCallback, one can use it as skeleton … … 179 182 # although it has autoconversion, we need to cast 180 183 # explicitly for subscripts to work 181 word = str(m.name)184 word = re.sub("(?<!\\\\) ", "\\ ", str(m.name)) 182 185 if word[:n] == text: 183 186 matches.append(word) … … 193 196 return matches 194 197 195 196 198 def autoCompletion(commands, ctx): 197 199 import platform … … 204 206 completer = CompleterNG(comps, ctx) 205 207 readline.set_completer(completer.complete) 208 delims = readline.get_completer_delims() 209 readline.set_completer_delims(re.sub("[\\.]", "", delims)) # remove some of the delimiters 206 210 # OSX need it 207 211 if platform.system() == 'Darwin': … … 1961 1965 autoCompletion(commands, ctx) 1962 1966 1967 if g_hasreadline and os.path.exists(HISTORY_FILENAME): 1968 readline.read_history_file(HISTORY_FILENAME) 1969 1963 1970 # to allow to print actual host information, we collect info for 1964 1971 # last 150 secs maximum, (sample every 10 secs and keep up to 15 samples) … … 1990 1997 except: 1991 1998 pass 1999 if g_hasreadline: 2000 readline.write_history_file(HISTORY_FILENAME) 1992 2001 1993 2002 def runCommandCb(ctx, cmd, args):
Note:
See TracChangeset
for help on using the changeset viewer.