Subversion Repositories HelenOS

Rev

Rev 3269 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3269 Rev 3278
Line 49... Line 49...
49
{
49
{
50
    if (level == HELP_SHORT) {
50
    if (level == HELP_SHORT) {
51
        printf("`%s' changes the current working directory.\n", cmdname);
51
        printf("`%s' changes the current working directory.\n", cmdname);
52
    } else {
52
    } else {
53
        printf(
53
        printf(
54
        "  %s [-L|-P] [dir]\n"
54
        "  %s <directory>\n"
55
        "  Your home directory is the default if [dir] is not provided.\n"
55
        "  Change directory to <directory>, e.g `%s /sbin'\n",
56
        "  The -P option specifies to always use the physical directory\n"
-
 
57
        "  structure instead of following symbolic links. The -L option\n"
-
 
58
        "  is the exact reverse of -P, symbolic links will be forced.\n"
-
 
59
        "  Note: -L|-P are not yet implemented\n", cmdname);
56
            cmdname, cmdname);
60
    }
57
    }
61
 
58
 
62
    return CMD_VOID;
59
    return CMD_VOID;
63
}
60
}
64
 
61
 
Line 78... Line 75...
78
    if (argc > 2) {
75
    if (argc > 2) {
79
        cli_error(CL_EFAIL, "Too many arguments to `%s'", cmdname);
76
        cli_error(CL_EFAIL, "Too many arguments to `%s'", cmdname);
80
        return CMD_FAILURE;
77
        return CMD_FAILURE;
81
    }
78
    }
82
 
79
 
-
 
80
    if (argc < 2) {
-
 
81
        printf("%s - no directory specified. Try `help %s extended'\n",
-
 
82
            cmdname, cmdname);
-
 
83
        return CMD_FAILURE;
-
 
84
    }
-
 
85
 
83
    /* We have the correct # of arguments
86
    /* We have the correct # of arguments
84
     * TODO: handle tidle (~) expansion? */
87
     * TODO: handle tidle (~) expansion? */
85
 
88
 
86
    rc = chdir(argv[1]);
89
    rc = chdir(argv[1]);
87
 
90