| Hash | Commit message | Author | Date | Files | + | - |
1 | commit 627ab050e34b20136a518eb32e6d351054a9708a |
2 | Author: Connor Etherington <[email protected]> |
3 | Date: Tue May 24 06:21:54 2022 +0200 |
4 | |
5 | Auto-Commit Update - 20220524 |
6 | --- |
7 | PKGBUILD | 2 +- |
8 | usr/bin/qcopy | 32 +++++++++++++++++++++++++------- |
9 | usr/share/man/man1/qcopy.1.gz | Bin 393 -> 416 bytes |
10 | 3 files changed, 26 insertions(+), 8 deletions(-) |
11 | |
12 | diff --git a/PKGBUILD b/PKGBUILD |
13 | index 5ae688d..014ee4d 100644 |
14 | --- a/PKGBUILD |
15 | +++ b/PKGBUILD |
16 | @@ -1,7 +1,7 @@ |
17 | # Maintainer: Connor Etherington <[email protected]> |
18 | # --- |
19 | pkgname=qcopy |
20 | -pkgver=1.2 |
21 | +pkgver=1.3 |
22 | pkgrel=1 |
23 | pkgdesc="Easily set variables and their respective values for easy access at any point" |
24 | arch=(any) |
25 | diff --git a/usr/bin/qcopy b/usr/bin/qcopy |
26 | index f504a58..c658cbe 100755 |
27 | --- a/usr/bin/qcopy |
28 | +++ b/usr/bin/qcopy |
29 | @@ -41,17 +41,34 @@ function NEW { |
30 | ENTRYVALUE=$(head -n2 ${TMP} | tail -n1) |
31 | |
32 | [[ -n $ENTRYNAME ]] && [[ -n $ENTRYVALUE ]] && |
33 | - echo "${ENTRYNAME}=${ENTRYVALUE}" >> $ENTRIESFILE || MAIN && exit 0 |
34 | + echo "${ENTRYNAME}=${ENTRYVALUE}" >> $ENTRIESFILE ||[41m |
35 | + MAIN && exit 0 |
36 | |
37 | } |
38 | |
39 | +function DEL { |
40 | + |
41 | + FIRSTLOOP && clear |
42 | + |
43 | + VALUE=$( PLACEHOLDER $1 |fzf \ |
44 | + --ansi --no-sort --no-info \ |
45 | + --prompt="Select for Deletion :" \ |
46 | + --header " " \ |
47 | + --height 99% \ |
48 | + --preview="cat $ENTRIESFILE|grep {}|cut -d= -f2-|bat --style=numbers,grid --color=always" \ |
49 | + --preview-window=70% ) || exit 1 |
50 | + |
51 | + sed -i "/${VALUE[@]}/d" $ENTRIESFILE |
52 | + |
53 | +} |
54 | + |
55 | function MAIN { |
56 | |
57 | FIRSTLOOP && clear |
58 | |
59 | VALUE=$( PLACEHOLDER $1 |fzf \ |
60 | - --multi --ansi --no-sort --no-info \ |
61 | - --prompt="Please select :" \ |
62 | + --ansi --no-sort --no-info \ |
63 | + --prompt="Select for Copying :" \ |
64 | --header " " \ |
65 | --height 99% \ |
66 | --preview="cat $ENTRIESFILE|grep {}|cut -d= -f2-|bat --style=numbers,grid --color=always" \ |
67 | @@ -68,9 +85,10 @@ function MAIN { |
68 | trap "rm -f $TMP" EXIT QUIT |
69 | |
70 | FIRSTLOOP && case ${1} in |
71 | - '-a'|'-n'|'--add'|'--new') |
72 | - NEW && MAIN && exit 0 ;; |
73 | - *) MAIN && exit 0 ;; esac |
74 | + '-a'|'-n'|'--add'|'--new') NEW && exit 0 ;; |
75 | + '-d'|'-r'|'--del'|'--delete'|'--remove') DEL && exit 0 ;; |
76 | + *) MAIN && exit 0 ;; |
77 | + |
78 | +esac |
79 | |
80 | -MAIN && exit 0 |
81 | |
82 | diff --git a/usr/share/man/man1/qcopy.1.gz b/usr/share/man/man1/qcopy.1.gz |
83 | index f397c08..9651fa3 100644 |
84 | Binary files a/usr/share/man/man1/qcopy.1.gz and b/usr/share/man/man1/qcopy.1.gz differ |