VirtualBox

Changeset 29811 in vbox for trunk


Ignore:
Timestamp:
May 26, 2010 10:56:55 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
62020
Message:

vboxshell: prompts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxShell/vboxshell.py

    r29810 r29811  
    142142    g_hasreadline = False
    143143
     144
     145g_prompt = "vbox> "
    144146
    145147g_hascolors = True
     
    26592661    return 0
    26602662
     2663
     2664def promptCmd(ctx, args):
     2665    if    len(args) < 2:
     2666        print "Current prompt: '%s'" %(ctx['prompt'])
     2667        return 0
     2668
     2669    ctx['prompt'] = args[1]
     2670    return 0
     2671   
    26612672
    26622673aliases = {'s':'start',
     
    27342745            'colors':['Toggle colors', colorsCmd, 0],
    27352746            'snapshot':['VM snapshot manipulation, snapshot help for more info', snapshotCmd, 0],
    2736             'nat':['NAT manipulation, nat help for more info', natCmd, 0],
    2737             'nic' : ['network adapter management', nicCmd, 0],
     2747            'nat':['NAT (network address trasnlation engine) manipulation, nat help for more info', natCmd, 0],
     2748            'nic' : ['Network adapter management', nicCmd, 0],
     2749            'prompt' : ['Control prompt', promptCmd, 0],
    27382750            }
    27392751
     
    28212833
    28222834    vbox = ctx['vb']
    2823 
    28242835    if vbox is not None:
    28252836        print "Running VirtualBox version %s" %(vbox.version)
     
    28492860    while True:
    28502861        try:
    2851             cmd = raw_input("vbox> ")
     2862            cmd = raw_input(ctx['prompt'])
    28522863            done = runCommand(ctx, cmd)
    28532864            if done != 0: break
     
    29162927           'progressBar': lambda p: progressBar(ctx,p),
    29172928           'typeInGuest': typeInGuest,
    2918            '_machlist':None
     2929           '_machlist': None,
     2930           'prompt': g_prompt
    29192931           }
    29202932    interpret(ctx)
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette