snip


Logs | Files | README | LICENSE | GitLab


1
commit 46915a59d7384db51020620c038d53ac89673818
2
Author: Connor Etherington <[email protected]>
3
Date:   Mon May 1 11:00:19 2023 +0200
4
5
    Auto-Commit Update - 20230501
6
---
7
 PKGBUILD     | 2 +-
8
 usr/bin/snip | 7 ++++++-
9
 2 files changed, 7 insertions(+), 2 deletions(-)
10
11
diff --git a/PKGBUILD b/PKGBUILD
12
index ea96ce4..1b99419 100644
13
--- a/PKGBUILD
14
+++ b/PKGBUILD
15
@@ -1,7 +1,7 @@
16
 # Maintainer: Connor Etherington <[email protected]>
17
 # ---
18
 pkgname=snip
19
-pkgver=0.1.2
20
+pkgver=1.0.0
21
 pkgrel=1
22
 pkgdesc="A simple snippet manager for your predefined Ultisnips Snippet Directory"
23
 arch=(any)
24
diff --git a/usr/bin/snip b/usr/bin/snip
25
index f0bb8cf..b067fff 100755
26
--- a/usr/bin/snip
27
+++ b/usr/bin/snip
28
@@ -43,9 +43,14 @@ newCatagory(){ \
29
   [ -z "${snipFile}" ] && err "No Snippet Type Was Entered..."
30
 
31
   [ -d ${SNIPDIR}/${snipType} ] || mkdir -p ${SNIPDIR}/${snipType} >/dev/null 2>&1
32
-  ${EDITOR} ${SNIPDIR}/${snipType}/${snipType}p${snipFile%0}.snippets &&
33
+
34
+  [ -f "${SNIPDIR}/${snipType}/${snipType}-p${snipFile%0}.snippets" ] ||
35
+    echo -e "priority ${snipFile}\n" >> "${SNIPDIR}/${snipType}/${snipType}-p${snipFile%0}.snippets"
36
+
37
+  ${EDITOR} ${SNIPDIR}/${snipType}/${snipType}-p${snipFile%0}.snippets &&
38
   notify-send " ✅ New Snippet File Created!" &&
39
   exit 0 || err "Snippet file could not be altered ..."
40
+
41
 }
42
 
43
 firstRun(){