softempire
V2EX  ›  问与答

请问 Windows 下面有没有什么 commandline 可以配置成默认帮你输入 git 的?

  •  
  •   softempire · Nov 26, 2016 · 2087 views
    This topic created in 3539 days ago, the information mentioned may be changed or developed.
    比如我要 git pull 就只要输入 pull 就行,每次输 git 都烦了
    4 replies    2016-11-26 16:19:10 +08:00
    SpicyCat
        1
    SpicyCat  
       Nov 26, 2016   ❤️ 1
    alias pull='git pull'
    DiamondbacK
        2
    DiamondbacK  
       Nov 26, 2016   ❤️ 1
    cmd: doskey pull=git pull
    PowerShell: function pull() { git pull }
    DiamondbacK
        3
    DiamondbacK  
       Nov 26, 2016   ❤️ 1
    pull.bat: @git pull
    pull.vbs: WScript.CreateObject("WScript.Shell").Run('git pull')
    pull.js: (new ActiveXObject("WScript.Shell")).Run('git pull')
    Arnie97
        4
    Arnie97  
       Nov 26, 2016   ❤️ 1
    Bash 黑魔法:

    function command_not_found_handle {
    git $1
    return $?
    }

    注:*nix 用户使用时,请注意协调原有的 command_not_found (负责找不到命令时,自动提示你需要安装什么 package 才能获得这个命令)
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1232 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 17:32 · PVG 01:32 · LAX 10:32 · JFK 13:32
    ♥ Do have faith in what you're doing.