Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
-bash:‘;export:command not found-bash:400::command not found两者都出现在mac终端上_Bash_Git_Macos_Terminal_Autocomplete - Fatal编程技术网

-bash:‘;export:command not found-bash:400::command not found两者都出现在mac终端上

-bash:‘;export:command not found-bash:400::command not found两者都出现在mac终端上,bash,git,macos,terminal,autocomplete,Bash,Git,Macos,Terminal,Autocomplete,当我打开终端时,两者都会出现 我尝试按照以下说明获取git自动完成: 转到终端 将git completion.bash脚本放在主目录中: curlhttps://raw.githubusercontent.com/git... -o~/.git-completion.bash 将以下行添加到您的:.bash_配置文件;这会告诉bash运行git自动完成脚本(如果存在) vi~/.bash\u配置文件 if[-f~/.git-completion.bash];然后 . ~/.git-compl

当我打开终端时,两者都会出现

我尝试按照以下说明获取git自动完成:

  • 转到终端
    git completion.bash
    脚本放在主目录中:

    curlhttps://raw.githubusercontent.com/git... -o~/.git-completion.bash
    
  • 将以下行添加到您的:
    .bash_配置文件
    ;这会告诉bash运行git自动完成脚本(如果存在)

    vi~/.bash\u配置文件
    if[-f~/.git-completion.bash];然后
    . ~/.git-completion.bash
    fi
    
  • 但它不起作用,现在当我打开终端时,我得到了这两条线,它们不会消失:

    -bash: ‘export: command not found
    -bash: 400:: command not found
    

    看看
    curl的输出https://raw.githubusercontent.com/git...
    。URL被截断,
    ~/.git completion.bash
    现在包含
    400:无效请求
    。这会导致您在尝试将其作为Bash文件源时看到的错误。再次从
    .bash\u profile
    中删除这些行,然后删除
    ~/.git completion.bash
    。然后使用自制软件安装git completion,如所述。