]> git.mdlowis.com Git - projs/tide.git/commitdiff
Rename xpick to just pick
authorMichael D. Lowis <mike.lowis@gentex.com>
Wed, 31 May 2017 13:01:56 +0000 (09:01 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Wed, 31 May 2017 13:01:56 +0000 (09:01 -0400)
14 files changed:
.gitignore
Makefile
TODO.md
docs/pick.1 [new file with mode: 0644]
docs/pick.1.md [moved from docs/xpick.1.md with 64% similarity]
docs/tide.1
docs/tide.1.md
docs/xpick.1 [deleted file]
docs/xtagpick.1
docs/xtagpick.1.md
pick.c [moved from xpick.c with 98% similarity]
tests/pick.c [moved from tests/xpick.c with 73% similarity]
xfilepick
xtagpick

index fa9f81cf5888426c9e6873e9e660ae617b36224c..bec87bb117790134987ed2aa62c73f5e4699547b 100644 (file)
@@ -49,3 +49,5 @@ term
 xcpd
 tests/tide
 tide
+pick
+tests/pick
index c95ac5dab77fb20c8734a8513939a0d4df97902a..0629d3b78eb9aa14c7bcc191e8c92217ddcd892d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 INCS = -Iinc/
 
-BINS = tide xpick xcpd term
-MAN1 = docs/tide.1 docs/xpick.1 docs/xtagpick.1 docs/xfilepick.1
+BINS = tide pick xcpd term
+MAN1 = docs/tide.1 docs/pick.1 docs/xtagpick.1 docs/xfilepick.1
 
 LIBEDIT_OBJS =     \
        lib/buf.o      \
@@ -15,7 +15,7 @@ LIBEDIT_OBJS =     \
 
 TEST_BINS =      \
        tests/tide  \
-       tests/xpick  \
+       tests/pick  \
        tests/term   \
        tests/libedit
 
@@ -30,20 +30,20 @@ docs:
 
 clean:
        find . -name '*.[oad]' -delete
-       $(RM) xpick tide xcpd term tests/libedit
+       $(RM) pick tide xcpd term tests/libedit
        $(RM) $(TEST_BINS)
 
 install: all
        mkdir -p $(PREFIX)/bin
        cp -f tide $(PREFIX)/bin
-       cp -f xpick $(PREFIX)/bin
+       cp -f pick $(PREFIX)/bin
        cp -f xcpd $(PREFIX)/bin
        cp -f xfilepick $(PREFIX)/bin
        cp -f xtagpick $(PREFIX)/bin
 
 uninstall:
        rm -f $(PREFIX)/bin/tide
-       rm -f $(PREFIX)/bin/xpick
+       rm -f $(PREFIX)/bin/pick
        rm -f $(PREFIX)/bin/xcpd
        rm -f $(PREFIX)/bin/xfilepick
        rm -f $(PREFIX)/bin/xtagpick
@@ -55,12 +55,12 @@ libedit.a: $(LIBEDIT_OBJS)
        $(AR) $(ARFLAGS) $@ $^
 
 tide: tide.o libedit.a
-xpick: xpick.o libedit.a
+pick: pick.o libedit.a
 xcpd: xcpd.o libedit.a
 term: term.o libedit.a
 tests/libedit: tests/libedit.o tests/lib/buf.o tests/lib/utf8.o libedit.a
 tests/tide: tests/tide.o libedit.a
-tests/xpick: tests/xpick.o libedit.a
+tests/pick: tests/pick.o libedit.a
 tests/term: tests/term.o libedit.a
 
 # define implicit rule for building binaries
diff --git a/TODO.md b/TODO.md
index 0cd149b9bbf2a3f6d7de8fd860995c3109efaf67..cab8f262b234c8c7d8bfb792dfdd28939d5bb79a 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -26,6 +26,12 @@ The Future:
 * implement command diffing logic to optimize the undo/redo log
 * Status line should omit characters from beginning of path to make file path fit
 
+Possible Shortcuts:
+
+* Ctrl+{,} - Move to start or end brace of block
+* Ctrl+(,) - Move to start or end of paragraph
+* Ctrl+'   - Move to matching brace, bracket, or paren
+
 Maybe think about addressing these later:
 
 * Shift+Insert should insert primary selection
diff --git a/docs/pick.1 b/docs/pick.1
new file mode 100644 (file)
index 0000000..4c0119f
--- /dev/null
@@ -0,0 +1,28 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "PICK" "1" "May 2017" "" ""
+.
+.SH "NAME"
+\fBpick\fR \- fuzzy find an item from a list of items
+.
+.SH "SYNOPSIS"
+\fBpick\fR [\fIquery\fR]
+.
+.SH "DESCRIPTION"
+\fBpick\fR Takes a list of items on standard input delimited by newlines and an optional initial \fIquery\fR\. A gui window is then presented to the user which allows the user to filter the list using a fuzzy\-find algorithm\. The user\'s selection is printed to standard output upon completion\. If no option is selected \fBpick\fR exits with no output\.
+.
+.SS "Fuzzy\-Find Algorithm"
+TODO: Document this
+.
+.SH "ENVIRONMENT"
+.
+.TP
+\fBXPICKTITLE\fR
+If this variable is set its contents are used to populate the status region of the \fBpick\fR window\.
+.
+.SH "AUTHOR"
+Michael D\. Lowis
+.
+.SH "SEE ALSO"
+tide(1) pick(1) xfilepick(1) xtagpick(1)
similarity index 64%
rename from docs/xpick.1.md
rename to docs/pick.1.md
index 33958140b1477c1848425693b2ec8aa27a8bb36a..81757f181c32a581bf28eb5458754ce35ab3f631 100644 (file)
@@ -1,16 +1,16 @@
-# xpick -- fuzzy find an item from a list of items
+# pick -- fuzzy find an item from a list of items
 
 ## SYNOPSIS
 
-`xpick` [_query_]
+`pick` [_query_]
 
 ## DESCRIPTION
 
-`xpick` Takes a list of items on standard input delimited by newlines and an
+`pick` Takes a list of items on standard input delimited by newlines and an
 optional initial _query_. A gui window is then presented to the user which
 allows the user to filter the list using a fuzzy-find algorithm. The user's
 selection is printed to standard output upon completion. If no option is
-selected `xpick` exits with no output.
+selected `pick` exits with no output.
 
 ### Fuzzy-Find Algorithm
 
@@ -20,7 +20,7 @@ TODO: Document this
 
 * `XPICKTITLE`:
     If this variable is set its contents are used to populate the status region
-    of the `xpick` window.
+    of the `pick` window.
 
 ## AUTHOR
 
@@ -28,4 +28,4 @@ Michael D. Lowis
 
 ## SEE ALSO
 
-tide(1) xpick(1) xfilepick(1) xtagpick(1)
+tide(1) pick(1) xfilepick(1) xtagpick(1)
index 52abdcc74841e9243b468182bea80cbc00939142..8fb6da66116db638ac17661ba6e1b988022c40d4 100644 (file)
@@ -374,4 +374,4 @@ The contents of this variable are used as the shell in which all non\-builtin co
 Michael D\. Lowis
 .
 .SH "SEE ALSO"
-tide(1) xpick(1) xfilepick(1) xtagpick(1)
+tide(1) pick(1) xfilepick(1) xtagpick(1)
index 6e33033262b948b9d44e02af34add377b599849c..21dd9bb567a1ed6e847946a3b8e81f39fb7f7f3a 100644 (file)
@@ -402,4 +402,4 @@ Michael D. Lowis
 
 ## SEE ALSO
 
-tide(1) xpick(1) xfilepick(1) xtagpick(1)
+tide(1) pick(1) xfilepick(1) xtagpick(1)
diff --git a/docs/xpick.1 b/docs/xpick.1
deleted file mode 100644 (file)
index 762c728..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-.\" generated with Ronn/v0.7.3
-.\" http://github.com/rtomayko/ronn/tree/0.7.3
-.
-.TH "XPICK" "1" "May 2017" "" ""
-.
-.SH "NAME"
-\fBxpick\fR \- fuzzy find an item from a list of items
-.
-.SH "SYNOPSIS"
-\fBxpick\fR [\fIquery\fR]
-.
-.SH "DESCRIPTION"
-\fBxpick\fR Takes a list of items on standard input delimited by newlines and an optional initial \fIquery\fR\. A gui window is then presented to the user which allows the user to filter the list using a fuzzy\-find algorithm\. The user\'s selection is printed to standard output upon completion\. If no option is selected \fBxpick\fR exits with no output\.
-.
-.SS "Fuzzy\-Find Algorithm"
-TODO: Document this
-.
-.SH "ENVIRONMENT"
-.
-.TP
-\fBXPICKTITLE\fR
-If this variable is set its contents are used to populate the status region of the \fBxpick\fR window\.
-.
-.SH "AUTHOR"
-Michael D\. Lowis
-.
-.SH "SEE ALSO"
-tide(1) xpick(1) xfilepick(1) xtagpick(1)
index 5377e2de59b6333322795b912a07f24216438c86..f20736a3d9652fb8a0835b622ea492099daa423c 100644 (file)
@@ -4,7 +4,7 @@
 .TH "XTAGPICK" "1" "May 2017" "" ""
 .
 .SH "NAME"
-\fBxtagpick\fR \- Parses a ctags file and sends results to xpick
+\fBxtagpick\fR \- Parses a ctags file and sends results to pick(1)
 .
 .SH "SYNOPSIS"
 .
index 55b10851b2068d6bc7136856e9f24c6ca623b2e7..b5c5e8efbfc53cbc68ccca6018f2e38770757a79 100644 (file)
@@ -1,4 +1,4 @@
-# xtagpick -- Parses a ctags file and sends results to xpick
+# xtagpick -- Parses a ctags file and sends results to pick(1)
 ## SYNOPSIS
 ## DESCRIPTION
 ## OPTIONS
diff --git a/xpick.c b/pick.c
similarity index 98%
rename from xpick.c
rename to pick.c
index d7134bbe825fc0f62798c47f6bc3d22fc555fe7c..58afbdc2afb410d2a9cad8c9e602a351bbc42ab3 100644 (file)
--- a/xpick.c
+++ b/pick.c
@@ -226,9 +226,9 @@ int main(int argc, char** argv) {
     char* title = getenv("XPICKTITLE");
     load_choices();
     if (vec_size(&Choices) > 1) {
-        win_dialog("xpick", onerror);
+        win_dialog("pick", onerror);
         win_setkeys(Bindings);
-        win_settext(STATUS, (title ? title : "xpick"));
+        win_settext(STATUS, (title ? title : "pick"));
         if (argc >= 2) {
             for (char* str = argv[1]; *str; str++)
                 buf_insert(win_buf(TAGS), false, Pos++, *str);
similarity index 73%
rename from tests/xpick.c
rename to tests/pick.c
index 82adc258da81029f4d5e4cafadbb78234cffaa4e..9e787de2654556b6b68673f77f1ef9b7f4d6fed8 100644 (file)
@@ -2,8 +2,8 @@
 #include <atf.h>
 #include <time.h>
 
-// Inculd the source file so we can access everything 
-#include "../xpick.c"
+// Inculd the source file so we can access everything
+#include "../pick.c"
 
 TEST_SUITE(UnitTests) {
 }
index 6ba9c661fdae364b0c266857ff1aee8d9e162fcf..a890643f099aacd658599b5297f30a71886fc487 100755 (executable)
--- a/xfilepick
+++ b/xfilepick
@@ -5,4 +5,4 @@ if [ "$#" -ne 1 ]; then
 fi
 
 export XPICKTITLE="Pick File ($PWD)"
-find $1 -not -path '*/\.*' -type f | sed "s|^\./||" | xpick
+find $1 -not -path '*/\.*' -type f | sed "s|^\./||" | pick
index d4027ee3cd516dafa512c227edff13b10b7d254b..20f7ab22be4a6afc1984258f31ea73900f2b384b 100755 (executable)
--- a/xtagpick
+++ b/xtagpick
@@ -21,12 +21,12 @@ printtags(){
 }
 
 print(){
-    printtags | xpick "$TAG"
+    printtags | pick "$TAG"
 }
 
 fetch(){
     if [ "" == "$TAG" ]; then
-        TAG=$(printtags | xpick)
+        TAG=$(printtags | pick)
         [ "" == "$TAG" ] && exit
     fi
     awk -v TAG="$TAG" '
@@ -38,7 +38,7 @@ fetch(){
         gsub(/\*/, "\\*", matchstr)
         print "grep -Hn", matchstr, $2, "| cut -d: -f1,2"
     }
-    ' "$TAGFILE" | /bin/sh | xpick
+    ' "$TAGFILE" | /bin/sh | pick
 }
 
 export XPICKTITLE="Pick CTag ($PWD)"