xcpd
tests/tide
tide
+pick
+tests/pick
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 \
TEST_BINS = \
tests/tide \
- tests/xpick \
+ tests/pick \
tests/term \
tests/libedit
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
$(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
* 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
--- /dev/null
+.\" 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)
-# 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
* `XPICKTITLE`:
If this variable is set its contents are used to populate the status region
- of the `xpick` window.
+ of the `pick` window.
## AUTHOR
## SEE ALSO
-tide(1) xpick(1) xfilepick(1) xtagpick(1)
+tide(1) pick(1) xfilepick(1) xtagpick(1)
Michael D\. Lowis
.
.SH "SEE ALSO"
-tide(1) xpick(1) xfilepick(1) xtagpick(1)
+tide(1) pick(1) xfilepick(1) xtagpick(1)
## SEE ALSO
-tide(1) xpick(1) xfilepick(1) xtagpick(1)
+tide(1) pick(1) xfilepick(1) xtagpick(1)
+++ /dev/null
-.\" 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)
.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"
.
-# xtagpick -- Parses a ctags file and sends results to xpick
+# xtagpick -- Parses a ctags file and sends results to pick(1)
## SYNOPSIS
## DESCRIPTION
## OPTIONS
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);
#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) {
}
fi
export XPICKTITLE="Pick File ($PWD)"
-find $1 -not -path '*/\.*' -type f | sed "s|^\./||" | xpick
+find $1 -not -path '*/\.*' -type f | sed "s|^\./||" | pick
}
print(){
- printtags | xpick "$TAG"
+ printtags | pick "$TAG"
}
fetch(){
if [ "" == "$TAG" ]; then
- TAG=$(printtags | xpick)
+ TAG=$(printtags | pick)
[ "" == "$TAG" ] && exit
fi
awk -v TAG="$TAG" '
gsub(/\*/, "\\*", matchstr)
print "grep -Hn", matchstr, $2, "| cut -d: -f1,2"
}
- ' "$TAGFILE" | /bin/sh | xpick
+ ' "$TAGFILE" | /bin/sh | pick
}
export XPICKTITLE="Pick CTag ($PWD)"