Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Esc to quit; Fixed re-use of 'line' bug; Better error message w/o default bang |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
630e1c27e3c26316a7ca699327bef45e |
| User & Date: | jmcclure 2020-03-25 21:36:34 |
Context
|
2020-03-25
| ||
| 23:26 | Added dependency comments to scripts check-in: 105c7b9165 user: jmcclure tags: trunk | |
| 21:36 | Esc to quit; Fixed re-use of 'line' bug; Better error message w/o default bang check-in: 630e1c27e3 user: jmcclure tags: trunk | |
| 21:23 | Fixed spacing: tab -> spaces check-in: edc0f9d268 user: jmcclure tags: trunk | |
Changes
Changes to config.h.
| ︙ | ︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
/* 'h' is determined by font metrics */
left = 4, // TODO, I hate this ... needs to come from font metrics
bpx = 1;
static Key keys[] = {
/* Modifiers Keysym Function Args */
{ ControlMask, XK_q, quit, { 0 } },
{ 0, XK_Tab, complete, { .v = "default" } },
{ 0, XK_Return, run, { .v = "default" } },
{ 0, XK_Left, move, { .i = -1 } },
{ 0, XK_Right, move, { .i = +1 } },
{ 0, XK_Home, move, { .i = -MAX } },
{ 0, XK_End, move, { .i = +MAX } },
| > | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
/* 'h' is determined by font metrics */
left = 4, // TODO, I hate this ... needs to come from font metrics
bpx = 1;
static Key keys[] = {
/* Modifiers Keysym Function Args */
{ ControlMask, XK_q, quit, { 0 } },
{ 0, XK_Escape, quit, { 0 } },
{ 0, XK_Tab, complete, { .v = "default" } },
{ 0, XK_Return, run, { .v = "default" } },
{ 0, XK_Left, move, { .i = -1 } },
{ 0, XK_Right, move, { .i = +1 } },
{ 0, XK_Home, move, { .i = -MAX } },
{ 0, XK_End, move, { .i = +MAX } },
|
| ︙ | ︙ |
Changes to interrobang.c.
| ︙ | ︙ | |||
74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
}
else if ((var=getenv("HOME"))) {
snprintf(line, MAX, "%s/.local/share/interrobang/tab/", var);
setenv(ENV_TAB, line, 1);
snprintf(line, MAX, "%s/.local/share/interrobang/run/", var);
setenv(ENV_RUN, line, 1);
}
return 0;
}
static int xlibInit(int argc, const char *argv[]) {
int i;
dpy = XOpenDisplay(0x0);
scr = DefaultScreen(dpy);
| > | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
}
else if ((var=getenv("HOME"))) {
snprintf(line, MAX, "%s/.local/share/interrobang/tab/", var);
setenv(ENV_TAB, line, 1);
snprintf(line, MAX, "%s/.local/share/interrobang/run/", var);
setenv(ENV_RUN, line, 1);
}
line[0] = '\0';
return 0;
}
static int xlibInit(int argc, const char *argv[]) {
int i;
dpy = XOpenDisplay(0x0);
scr = DefaultScreen(dpy);
|
| ︙ | ︙ | |||
260 261 262 263 264 265 266 |
pipe(fd);
pid = fork();
if (pid == 0) {
close(fd[0]);
if (run) close(fd[1]);
else dup2(fd[1], STDOUT_FILENO);
execl(arg0, arg0, arg1, NULL);
| | > > | 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
pipe(fd);
pid = fork();
if (pid == 0) {
close(fd[0]);
if (run) close(fd[1]);
else dup2(fd[1], STDOUT_FILENO);
execl(arg0, arg0, arg1, NULL);
fprintf(stderr, "%s for '%s' not found\n",
run ? "Runner": "Completer",
line[0] == bang ? getenv(ENV_BANG) : arg->v);
_exit(1);
}
else {
close(fd[1]);
if (run) { close(fd[0]); cleanup(); exit(0); }
in = fdopen(fd[0], "r");
if (!fgets(line, MAX, in)) {
|
| ︙ | ︙ |