Homebrew’s `git` not using completion

后端 未结 18 2062
盖世英雄少女心
盖世英雄少女心 2020-12-22 16:25

When using OSX’s git, after I modify a file I can simply do git commit , and that’ll auto complete the file’s name to the one that was modified. Howe

18条回答
  •  长情又很酷
    2020-12-22 16:50

    For bash on macOS Catalina, if you want to also use Bash 5 from homebrew, you need to make sure that your login shell is set to homebrew's bash, and not the default.

    To check if you need to do this, run echo ${BASH_VERSION}. If you see a version starting with 3, you are not using Brew's bash for your login shell.

    To change this,

    1. Open System Preferences->Users and Groups.
    2. Right click your user and select "Advanced Options". You may need to unlock this with your password by clicking the lock in the bottom left.
    3. Set the login shell field to the location of your brew's bash, which you can usually find by running which bash in a terminal after you install brew's bash. Mine was /usr/local/bin/bash.

    Restart your terminal, and follow the instructions in this excellent answer

提交回复
热议问题