r23825: Add ".." command as an alias to "cd ..".
authorGünther Deschner <gd@samba.org>
Wed, 11 Jul 2007 08:43:08 +0000 (08:43 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:28:30 +0000 (12:28 -0500)
Guenther

source/client/client.c

index ff8e28bba60a76439bd4c371f563b24d1fb8274c..6a1c453c2c8f740c07bcfc0b492ac15cb528b4a6 100644 (file)
@@ -343,6 +343,19 @@ static int cmd_cd(void)
        return rc;
 }
 
+/****************************************************************************
+ Change directory.
+****************************************************************************/
+
+static int cmd_cd_oneup(void)
+{
+       pstring buf;
+
+       pstrcpy(buf, "..");
+       return do_cd(buf);
+}
+
+
 /*******************************************************************
  Decide if a file should be operated on.
 ********************************************************************/
@@ -3308,7 +3321,8 @@ static struct
   {"logon",cmd_logon,"establish new logon",{COMPL_NONE,COMPL_NONE}},
   {"listconnect",cmd_list_connect,"list open connections",{COMPL_NONE,COMPL_NONE}},
   {"showconnect",cmd_show_connect,"display the current active connection",{COMPL_NONE,COMPL_NONE}},
-  
+  {"..",cmd_cd_oneup,"change the remote directory (up one level)",{COMPL_REMOTE,COMPL_NONE}},
+
   /* Yes, this must be here, see crh's comment above. */
   {"!",NULL,"run a shell command on the local system",{COMPL_NONE,COMPL_NONE}},
   {NULL,NULL,NULL,{COMPL_NONE,COMPL_NONE}}