关于Windows:在特定文件夹中启动cmder ConEmu控制台

Start up cmder ConEmu console in a specific folder

我想在此路由C:\ xampp \ htdocs中启动Cmder控制台,但我不了解"任务参数"的语法。 例如:

1
 `/icon"%CMDER_ROOT%\\cmder.exe`"

有人可以翻译吗? C:\\xampp\\htdocs to -> /icon"%CMDER_ROOT%\\cmder.exe"

因此,我可以编辑配置并放置我的自定义文件夹:
enter image description here

非常感谢你。


转到安装程序,然后单击"启动目录..."按钮并指定启动目录。
如示例所示,波纹管启动目录为C:\ DEV
enter image description here


改为将%USERPROFILE%更改为所需的文件夹。


说明:打开Cmder->设置->任务->选择{cmd :: Cmder}(在我的情况下)。在底部(文本区域下方),有一个名为"启动目录..."的按钮,然后选择启动目录。关闭cmder,然后重新开始。就是这样,享受


两种方式:

  • 如果要更改位置PER任务,请执行" Maximus"所说的操作,将%USERPROFILE%更改为特定位置。缺点是,在创建新的控制台窗口时,"新进程的启动目录"(请参见下图)仍将是默认的ConEmu安装目录。
  • 如果要在创建新控制台时更改"新进程的启动目录:"位置(从默认的ConEmu安装目录更改为自定义):
  • enter image description here

    然后为ConEmu / Cmder创建一个快捷方式,并在快捷方式属性中更改"开始于:"属性;像这样:

    enter image description here

    现在,只需使用快捷方式而不是exe。这样做的好处是可以更改所有任务(已设置的所有终端)的开始位置。


    您可以这样做:

  • 编辑/config/user-startup.cmd文件,追加一行(假设dir为'e:'):

    @cd /d"e:"

  • 重新启动cmder。
  • 参考:

    cmder配置


    cmder/vendor/init.bat

    找到这条线

    :: Set home path

    在添加之前

    @cd /d"C:/YOUR_DIR_NAME/"

    参考


    对于最新版本,您可以执行以下操作:

  • 开罐
  • Presh:Windows + ALT + T
    enter image description here
  • 按下"启动目录..."按钮
  • 选择文件夹
    enter image description here

  • 编辑文件:\ CMDER_DIRECTORY \ config \ user-profile.cmd

    1
    cd C:\\xampp\\htdocs

    在下面的示例中,我更改了目录并创建了一个例程来启动宅基。

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    :: use this file to run your own startup commands
    :: use  in front of the command to prevent printing the command

    :: uncomment this to have the ssh agent load when cmder starts
    :: call"%GIT_INSTALL_ROOT%/cmd/start-ssh-agent.cmd"

    :: uncomment this next two lines to use pageant as the ssh authentication agent
    :: SET SSH_AUTH_SOCK=/tmp/.ssh-pageant-auth-sock
    :: call"%GIT_INSTALL_ROOT%/cmd/start-ssh-pageant.cmd"

    :: you can add your plugins to the cmder path like so
    :: set"PATH=%CMDER_ROOT%\\vendor\\whatever;%PATH%"

    e:
    cd ../../../../../Homestead

    @echo off

    :Ask
    echo Would you like to start the Homestead?(Y/N)

    set INPUT=
    set /P INPUT=Yes(y) ou No(n): %=%
    If /I"%INPUT%"=="y" goto yes
    If /I"%INPUT%"=="Y" goto yes
    If /I"%INPUT%"=="n" goto no

    cls
    echo Invalid option
    echo -
    echo -
    goto Ask

    :yes
    vagrant up
    goto finalMessage

    :no
    cls
    goto finalMessage

    :finalMessage
    echo Your console is ready Mr. Chapela.