summaryrefslogtreecommitdiff
path: root/src/options.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/options.c')
-rw-r--r--src/options.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/options.c b/src/options.c
index 3aa3e63..7e4d414 100644
--- a/src/options.c
+++ b/src/options.c
@@ -6,6 +6,8 @@
#include "options.h"
+#include "../config.h"
+
static const char *usage_str =
""
"Usage: fzy [OPTION]...\n"
@@ -37,15 +39,15 @@ static struct option longopts[] = {{"show-matches", required_argument, NULL, 'e'
void options_init(options_t *options) {
/* set defaults */
- options->benchmark = 0;
- options->filter = NULL;
- options->init_search = NULL;
- options->tty_filename = "/dev/tty";
- options->show_scores = 0;
- options->num_lines = 10;
- options->scrolloff = 1;
- options->prompt = "> ";
- options->workers = 0;
+ options->benchmark = 0;
+ options->filter = NULL;
+ options->init_search = NULL;
+ options->show_scores = 0;
+ options->scrolloff = 1;
+ options->tty_filename = DEFAULT_TTY;
+ options->num_lines = DEFAULT_NUM_LINES;
+ options->prompt = DEFAULT_PROMPT;
+ options->workers = DEFAULT_WORKERS;
}
void options_parse(options_t *options, int argc, char *argv[]) {