I would like to setup a makefile that reads user input with Bash autocompletion, and based on that create a directory where some files would be copied into. Basically something like
$ make initializeProject
Enter destination: Dir<ectory>/Sub<directory>/ProjectDirectory
mkdir: created directory 'Directory/Subdirectory/ProjectDirectory'
'Templates/TemplateFile' -> 'Directory/Subdirectory/ProjectDirectory/TemplateFile'
where < X >
stands for autocompleted parts.
As of now my makefile does not autocomplete, and it looks like this:
initProjectLaTeX:
@read -p "Enter destination: " destination; \
mkdir -pv $$destination; \
cp -iv ~/.templates/latex/* $$destination
I have tried this option, but it produces the error /bin/sh: 1: read: Illegal option -e
.
How can I access Bash autocompletion here?