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:
parent
7a2435a23b
commit
03239cb989
10 changed files with 3 additions and 50 deletions
|
@ -1,3 +1,6 @@
|
|||
v1.unrelease
|
||||
- Remove fuzzy option
|
||||
|
||||
v1.1.0
|
||||
New Features
|
||||
- Keys mode, showing keybindings.
|
||||
|
|
|
@ -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)
|
||||
echo "Test dmenu glob"
|
||||
$(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"
|
||||
$(top_srcdir)/test/run_test.sh 218 $(top_srcdir)/test/xr_config_test.sh $(top_builddir) $(top_srcdir)
|
||||
echo "Test issue 333"
|
||||
|
|
|
@ -108,8 +108,6 @@ Settings config = {
|
|||
.parse_known_hosts = TRUE,
|
||||
/** Modi to combine into one view. */
|
||||
.combi_modi = "window,run",
|
||||
/** Fuzzy matching. */
|
||||
.fuzzy = FALSE,
|
||||
.glob = FALSE,
|
||||
.tokenize = TRUE,
|
||||
.regex = FALSE,
|
||||
|
|
|
@ -187,10 +187,6 @@ Start in case sensitive mode.
|
|||
|
||||
Cycle through the results list. Default is 'true'.
|
||||
|
||||
`-fuzzy`
|
||||
|
||||
Enable experimental fuzzy matching.
|
||||
|
||||
`-filter` *filter*
|
||||
|
||||
Filter the list by setting text in input bar to *filter*
|
||||
|
|
|
@ -274,12 +274,6 @@ Start in case sensitive mode\.
|
|||
Cycle through the results list\. Default is \'true\'\.
|
||||
.
|
||||
.P
|
||||
\fB\-fuzzy\fR
|
||||
.
|
||||
.P
|
||||
Enable experimental fuzzy matching\.
|
||||
.
|
||||
.P
|
||||
\fB\-filter\fR \fIfilter\fR
|
||||
.
|
||||
.P
|
||||
|
|
|
@ -64,8 +64,6 @@ rofi.parse-hosts: false
|
|||
rofi.parse-known-hosts: true
|
||||
! Set the modi to combine in combi mode
|
||||
rofi.combi-modi: window,drun,run,ssh
|
||||
! Do a more fuzzy matching
|
||||
rofi.fuzzy: false
|
||||
! Use glob matching
|
||||
rofi.glob: false
|
||||
! Use regex matching
|
||||
|
|
|
@ -106,8 +106,6 @@ typedef struct
|
|||
unsigned int parse_known_hosts;
|
||||
/** Combi Modes */
|
||||
char *combi_modi;
|
||||
/** Fuzzy match */
|
||||
unsigned int fuzzy;
|
||||
unsigned int glob;
|
||||
unsigned int tokenize;
|
||||
unsigned int regex;
|
||||
|
|
|
@ -178,14 +178,6 @@ static GRegex * create_regex ( const char *input, int case_sensitive )
|
|||
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{
|
||||
// TODO; regex should be default?
|
||||
gchar *r = g_regex_escape_string ( input, -1 );
|
||||
|
|
|
@ -139,8 +139,6 @@ static XrmOption xrmOptions[] = {
|
|||
"Parse known_hosts file for ssh mode" },
|
||||
{ xrm_String, "combi-modi", { .str = &config.combi_modi }, NULL,
|
||||
"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,
|
||||
"Use glob matching" },
|
||||
{ xrm_Boolean, "regex", { .num = &config.regex }, NULL,
|
||||
|
|
|
@ -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}
|
Loading…
Reference in a new issue