From 008bf1bc64a30ef68881767434ff11181e6b0f69 Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Tue, 27 Feb 2024 15:30:45 -0500 Subject: [PATCH] Ask for project type when creating new project --- config.org | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/config.org b/config.org index a4d14b1..e232d10 100644 --- a/config.org +++ b/config.org @@ -1190,9 +1190,14 @@ TYPE specifies the type of project to create. It can take the following values: - `projectile', which creates a .projectile file in the project root. - A string, which is used as a filename to create in the project root. - A function, which is called with no arguments inside the root of the project. +When called interactively, this defaults to `git' unless a prefix arg is given. If PARENTS is non-nil, the parents of the specified directory will also be created." - (interactive (list (read-directory-name "Create new project: ") 'git t)) + (interactive (list (read-directory-name "Create new project: ") + (if current-prefix-arg + (intern (completing-read "Project type: " + '("git" "projectile") nil t)) + 'git) t)) (make-directory dir parents) (let ((default-directory dir)) (pcase type