summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vimulti.clj7
1 files changed, 4 insertions, 3 deletions
diff --git a/vimulti.clj b/vimulti.clj
index 5f862f1..30c6c25 100644
--- a/vimulti.clj
+++ b/vimulti.clj
@@ -50,13 +50,14 @@
(let [separator (if branch-style? #":" (if tag-style? #"@" #" "))
target-array (str/split target separator)
app-name (if (= (first target-array) "") "nvim" (first target-array))
- repo (fs/path (System/getProperty "user.home") ".config" app-name)]
+ repo (fs/path (System/getProperty "user.home") ".config" app-name)
+ no-mark (= (count target-array) 1)]
(when (> (count target-array) 2)
(println "Invalid target string.")
(System/exit 1))
(cond-> {:app-name app-name}
- branch-style? (assoc :branch (last target-array))
- tag-style? (assoc :tag (last target-array))
+ branch-style? (assoc :branch (when-not no-mark (last target-array)))
+ tag-style? (assoc :tag (when-not no-mark (last target-array)))
(fs/exists? repo) (assoc :repo repo))))))
;; main