Problem
When I want to add something to the staging area, I usually type git add <folder name>. However, I cannot add folders with spaces in the name. My git add autoload does not allow spaces to be avoided.
for instance
I have a folder named: Folder A
I run the git add F < tab-autocomplete > , which becomes git add Folder A/ . If I try to add this folder, it will give an error:
fatal: pathspec 'Folder' did not match any files
This is because the correct syntax must be git add Folder\ A/ .
Summary
I am not sure how to fix this, and I cannot find any resources with a permanent fix. This problem How git treats folder names with spaces "describes the fix. But this is due to putting voice tags around the folder name, which I really don't want to do. Is there a better solution?
I am using git version 2.2.0 and zsh version 5.0.7. Thank you in advance!
source share