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
For me , I had to put
source $(brew --prefix)/etc/bash_completion
into .bashrc
(not .bash_profile) to get this to work.
".bash_profile is executed for login shells, while .bashrc is executed
for interactive non-login shells" -- from What is the difference between .bash_profile and .bashrc? It appears to me that MacOS Sierra doesn't execute .bash_profile
when opening a new terminal window, only .bashrc
.
I wouldn't put it in _bash_profile, because then I'd have to reboot/logout for updates to take effect.