1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00

Remove fuzzy matching option.

This commit is contained in:
Dave Davenport 2016-06-18 20:54:29 +02:00
parent 7a2435a23b
commit 03239cb989
10 changed files with 3 additions and 50 deletions

View file

@ -1,3 +1,6 @@
v1.unrelease
- Remove fuzzy option
v1.1.0 v1.1.0
New Features New Features
- Keys mode, showing keybindings. - Keys mode, showing keybindings.

View file

@ -317,8 +317,6 @@ test-x: $(bin_PROGRAMS) textbox_test
$(top_srcdir)/test/run_test.sh 215 $(top_srcdir)/test/run_regex_test.sh $(top_builddir) $(top_srcdir)/test/run_test.sh 215 $(top_srcdir)/test/run_regex_test.sh $(top_builddir)
echo "Test dmenu glob" echo "Test dmenu glob"
$(top_srcdir)/test/run_test.sh 216 $(top_srcdir)/test/run_glob_test.sh $(top_builddir) $(top_srcdir)/test/run_test.sh 216 $(top_srcdir)/test/run_glob_test.sh $(top_builddir)
echo "Test dmenu fuzzy"
$(top_srcdir)/test/run_test.sh 217 $(top_srcdir)/test/run_fuzzy_test.sh $(top_builddir)
echo "Test config dump" echo "Test config dump"
$(top_srcdir)/test/run_test.sh 218 $(top_srcdir)/test/xr_config_test.sh $(top_builddir) $(top_srcdir) $(top_srcdir)/test/run_test.sh 218 $(top_srcdir)/test/xr_config_test.sh $(top_builddir) $(top_srcdir)
echo "Test issue 333" echo "Test issue 333"

View file

@ -108,8 +108,6 @@ Settings config = {
.parse_known_hosts = TRUE, .parse_known_hosts = TRUE,
/** Modi to combine into one view. */ /** Modi to combine into one view. */
.combi_modi = "window,run", .combi_modi = "window,run",
/** Fuzzy matching. */
.fuzzy = FALSE,
.glob = FALSE, .glob = FALSE,
.tokenize = TRUE, .tokenize = TRUE,
.regex = FALSE, .regex = FALSE,

View file

@ -187,10 +187,6 @@ Start in case sensitive mode.
Cycle through the results list. Default is 'true'. Cycle through the results list. Default is 'true'.
`-fuzzy`
Enable experimental fuzzy matching.
`-filter` *filter* `-filter` *filter*
Filter the list by setting text in input bar to *filter* Filter the list by setting text in input bar to *filter*

View file

@ -274,12 +274,6 @@ Start in case sensitive mode\.
Cycle through the results list\. Default is \'true\'\. Cycle through the results list\. Default is \'true\'\.
. .
.P .P
\fB\-fuzzy\fR
.
.P
Enable experimental fuzzy matching\.
.
.P
\fB\-filter\fR \fIfilter\fR \fB\-filter\fR \fIfilter\fR
. .
.P .P

View file

@ -64,8 +64,6 @@ rofi.parse-hosts: false
rofi.parse-known-hosts: true rofi.parse-known-hosts: true
! Set the modi to combine in combi mode ! Set the modi to combine in combi mode
rofi.combi-modi: window,drun,run,ssh rofi.combi-modi: window,drun,run,ssh
! Do a more fuzzy matching
rofi.fuzzy: false
! Use glob matching ! Use glob matching
rofi.glob: false rofi.glob: false
! Use regex matching ! Use regex matching

View file

@ -106,8 +106,6 @@ typedef struct
unsigned int parse_known_hosts; unsigned int parse_known_hosts;
/** Combi Modes */ /** Combi Modes */
char *combi_modi; char *combi_modi;
/** Fuzzy match */
unsigned int fuzzy;
unsigned int glob; unsigned int glob;
unsigned int tokenize; unsigned int tokenize;
unsigned int regex; unsigned int regex;

View file

@ -178,14 +178,6 @@ static GRegex * create_regex ( const char *input, int case_sensitive )
g_free ( r ); g_free ( r );
} }
} }
else if ( config.fuzzy ) {
gchar *r = g_regex_escape_string ( input, -1 );
// TODO either strip fuzzy, or fix this pattern.
gchar *str = g_strdup_printf ( "[%s]+", r );
retv = R ( str );
g_free ( r );
g_free ( str );
}
else{ else{
// TODO; regex should be default? // TODO; regex should be default?
gchar *r = g_regex_escape_string ( input, -1 ); gchar *r = g_regex_escape_string ( input, -1 );

View file

@ -139,8 +139,6 @@ static XrmOption xrmOptions[] = {
"Parse known_hosts file for ssh mode" }, "Parse known_hosts file for ssh mode" },
{ xrm_String, "combi-modi", { .str = &config.combi_modi }, NULL, { xrm_String, "combi-modi", { .str = &config.combi_modi }, NULL,
"Set the modi to combine in combi mode" }, "Set the modi to combine in combi mode" },
{ xrm_Boolean, "fuzzy", { .num = &config.fuzzy }, NULL,
"Do a more fuzzy matching" },
{ xrm_Boolean, "glob", { .num = &config.glob }, NULL, { xrm_Boolean, "glob", { .num = &config.glob }, NULL,
"Use glob matching" }, "Use glob matching" },
{ xrm_Boolean, "regex", { .num = &config.regex }, NULL, { xrm_Boolean, "regex", { .num = &config.regex }, NULL,

View file

@ -1,22 +0,0 @@
#!/usr/bin/env bash
echo -en "nooty\naap\nnoot\nmies" | rofi -fuzzy -no-regex -dmenu > output.txt &
RPID=$!
# send enter.
sleep 5;
xdotool type 'nty'
sleep 0.4
xdotool key Return
# Get result, kill xvfb
wait ${RPID}
RETV=$?
OUTPUT=$(cat output.txt)
if [ "${OUTPUT}" != 'nooty' ]
then
echo "Got: '${OUTPUT}' expected 'nooty'"
exit 1
fi
exit ${RETV}