aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Fadel <samuel@nihil.ws>2023-02-23 11:58:31 +0100
committerSamuel Fadel <samuel@nihil.ws>2023-02-23 11:58:31 +0100
commitd04dca96c1620db4aead4fa16b5627af07b5153d (patch)
treea9d3c779a1a60f7f7c5d217a7acbbef478cbaa9e
parentb396d0eae7fabc5e8f9b20f469e07b629b00dca1 (diff)
* bin/menu-projects: Allow cancelling selection0.4
-rwxr-xr-xbin/menu-projects5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/menu-projects b/bin/menu-projects
index 6d529f5..728e52a 100755
--- a/bin/menu-projects
+++ b/bin/menu-projects
@@ -5,6 +5,11 @@ project=$({ for p in $HOME/src/*/.git ;do
basename `dirname $p`
done } | bemenu -i -s -c -l 20 -W 0.5 -p 'Project:')
+if [ -z $project ]; then
+ # Allows cancelling selection
+ exit 1
+fi
+
# cd into the project directory to load manifests, if available, and start Emacs from there
cd $HOME/src/$project
if [ -f manifest.scm ]; then