Index: trunk/src/VBox/Frontends/VBoxShell/vboxshell.py
===================================================================
--- trunk/src/VBox/Frontends/VBoxShell/vboxshell.py	(revision 29802)
+++ trunk/src/VBox/Frontends/VBoxShell/vboxshell.py	(revision 29809)
@@ -178,4 +178,7 @@
             return rlcompleter.Completer.complete(self,text,state)
 
+    def canBePath(self, phrase,word):
+        return word.startswith('/')
+
     def canBeCommand(self, phrase, word):
         spaceIdx = phrase.find(" ")
@@ -188,12 +191,6 @@
         return False
 
-    def canBePath(self,phrase,word):
-        return word.startswith('/')
-
     def canBeMachine(self,phrase,word):
         return not self.canBePath(phrase,word) and not self.canBeCommand(phrase, word)
-
-    def canBePath(self,phrase,word):
-        return word.startswith('/')
 
     def global_matches(self, text):
@@ -208,4 +205,11 @@
 
         try:
+            if self.canBePath(phrase,text):
+                (dir,rest) = os.path.split(text)
+                n = len(rest)
+                for word in os.listdir(dir):
+                    if n == 0 or word[:n] == rest:
+                        matches.append(os.path.join(dir,word))
+
             if self.canBeCommand(phrase,text):
                 n = len(text)
@@ -227,11 +231,4 @@
                         matches.append(word)
 
-            if self.canBePath(phrase,text):
-                (dir,rest) = os.path.split(text)
-                n = len(rest)
-                for word in os.listdir(dir):
-                    if n == 0 or word[:n] == rest:
-                        matches.append(os.path.join(dir,word))
-
         except Exception,e:
             printErr(e)
@@ -251,5 +248,5 @@
   readline.set_completer(completer.complete)
   delims = readline.get_completer_delims()
-  readline.set_completer_delims(re.sub("[\\.]", "", delims)) # remove some of the delimiters
+  readline.set_completer_delims(re.sub("[\\./-]", "", delims)) # remove some of the delimiters
   readline.parse_and_bind("set editing-mode emacs")
   # OSX need it
@@ -853,15 +850,12 @@
     return 0
 
-def execInGuest(ctx,console,args,env):
+def execInGuest(ctx,console,args,env,user,passwd,tmo):
     if len(args) < 1:
         print "exec in guest needs at least program name"
         return
-    user = ""
-    passwd = ""
-    tmo = 0
     guest = console.guest
     # shall contain program name as argv[0]
     gargs = args
-    print "executing %s with args %s" %(args[0], gargs)
+    print "executing %s with args %s as %s" %(args[0], gargs, user)
     (progress, pid) = guest.executeProcess(args[0], 0, gargs, env, user, passwd, tmo)
     print "executed with pid %d" %(pid)
@@ -882,7 +876,32 @@
             if progress.cancelable:
                 progress.cancel()
+        (reason, code, flags) = guest.getProcessStatus(pid)
+        print "Exit code: %d" %(code)
         return 0
     else:
         reportError(ctx, progress)
+
+def nh_raw_input(prompt=""):
+    stream = sys.stdout
+    prompt = str(prompt)
+    if prompt:
+        stream.write(prompt)
+    line = sys.stdin.readline()
+    if not line:
+        raise EOFError
+    if line[-1] == '\n':
+        line = line[:-1]
+    return line
+
+
+def getCred(ctx):
+    import getpass
+    user = getpass.getuser()
+    user_inp = raw_input("User (%s): " %(user))
+    if len (user_inp) > 0:
+        user = user_inp
+    passwd = getpass.getpass()
+
+    return (user,passwd)
 
 def gexecCmd(ctx,args):
@@ -895,5 +914,6 @@
     gargs = args[2:]
     env = [] # ["DISPLAY=:0"]
-    gargs.insert(0, lambda ctx,mach,console,args: execInGuest(ctx,console,args,env))
+    (user,passwd) = getCred(ctx)
+    gargs.insert(0, lambda ctx,mach,console,args: execInGuest(ctx,console,args,env,user,passwd,1000))
     cmdExistingVm(ctx, mach, 'guestlambda', gargs)
     return 0
@@ -908,5 +928,6 @@
     gargs = args[2:]
     env = []
-    gargs.insert(0, lambda ctx,mach,console,args: execInGuest(ctx,console,args,env))
+    (user,passwd) = getCred(ctx)
+    gargs.insert(0, lambda ctx,mach,console,args: execInGuest(ctx,console,args,env, user, passwd, 0))
     cmdExistingVm(ctx, mach, 'guestlambda', gargs)
     return 0
