diff options
-rw-r--r-- | doc/ranger.1 | 9 | ||||
-rw-r--r-- | doc/ranger.pod | 5 | ||||
-rw-r--r-- | doc/rifle.1 | 2 | ||||
-rwxr-xr-x | ranger/config/commands.py | 10 | ||||
-rw-r--r-- | ranger/config/rc.conf | 5 | ||||
-rw-r--r-- | ranger/container/settings.py | 2 |
6 files changed, 18 insertions, 15 deletions
diff --git a/doc/ranger.1 b/doc/ranger.1 index 780027ac..508c2972 100644 --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RANGER 1" -.TH RANGER 1 "ranger-1.9.0b6" "2018-01-23" "ranger manual" +.TH RANGER 1 "ranger-1.9.0b6" "2018-01-25" "ranger manual" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -729,9 +729,10 @@ Changes case sensitivity for the \*(L"cd\*(R" command tab completion. Possible v \& insensitive \& smart .Ve -.IP "cd_tab_smart [bool]" 4 -.IX Item "cd_tab_smart [bool]" -Use smart tab completion with less typing? E.g. \*(L":cd /f/b/b<tab>\*(R" yields \*(L":cd /foo/bar/baz\*(R". +.IP "cd_tab_fuzzy [bool]" 4 +.IX Item "cd_tab_fuzzy [bool]" +Use fuzzy tab completion with the \*(L"cd\*(R" command. For example, +\&\fB:cd /u/lo/b<\s-1TAB\s0>\fR expands to \fB:cd /usr/local/bin\fR. .IP "clear_filters_on_dir_change [bool]" 4 .IX Item "clear_filters_on_dir_change [bool]" If set to 'true', persistent filters would be cleared upon leaving the directory diff --git a/doc/ranger.pod b/doc/ranger.pod index 1260c8db..72386efc 100644 --- a/doc/ranger.pod +++ b/doc/ranger.pod @@ -708,9 +708,10 @@ Changes case sensitivity for the "cd" command tab completion. Possible values ar insensitive smart -=item cd_tab_smart [bool] +=item cd_tab_fuzzy [bool] -Use smart tab completion with less typing? E.g. ":cd /f/b/b<tab>" yields ":cd /foo/bar/baz". +Use fuzzy tab completion with the "cd" command. For example, +B<:cd /u/lo/b<TABE<gt>> expands to B<:cd /usr/local/bin>. =item clear_filters_on_dir_change [bool] diff --git a/doc/rifle.1 b/doc/rifle.1 index 44faa332..0441f37a 100644 --- a/doc/rifle.1 +++ b/doc/rifle.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RIFLE 1" -.TH RIFLE 1 "rifle-1.9.0b6" "2018-01-23" "rifle manual" +.TH RIFLE 1 "rifle-1.9.0b6" "2018-01-25" "rifle manual" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/ranger/config/commands.py b/ranger/config/commands.py index 2450c1c5..d426b72e 100755 --- a/ranger/config/commands.py +++ b/ranger/config/commands.py @@ -200,7 +200,7 @@ class cd(Command): return [os.path.join(dest_dir, d) for d in dirnames if self._tab_match(dest_base, d)], '' - def _tab_smart_match(self, basepath, tokens): + def _tab_fuzzy_match(self, basepath, tokens): """ Find directories matching tokens recursively """ if not tokens: tokens = [''] @@ -221,7 +221,7 @@ class cd(Command): return None - def _tab_smart(self, dest, dest_abs): + def _tab_fuzzy(self, dest, dest_abs): tokens = [] basepath = dest_abs while True: @@ -234,7 +234,7 @@ class cd(Command): break tokens.append(token) - paths = self._tab_smart_match(basepath, tokens) + paths = self._tab_fuzzy_match(basepath, tokens) if not os.path.isabs(dest): paths_rel = basepath paths = [os.path.relpath(path, paths_rel) for path in paths] @@ -249,8 +249,8 @@ class cd(Command): paths, paths_rel = self._tab_paths(dest, dest_abs, ends_with_sep) if paths is None: - if self.fm.settings.cd_tab_smart: - paths, paths_rel = self._tab_smart(dest, dest_abs) + if self.fm.settings.cd_tab_fuzzy: + paths, paths_rel = self._tab_fuzzy(dest, dest_abs) else: paths, paths_rel = self._tab_normal(dest, dest_abs) diff --git a/ranger/config/rc.conf b/ranger/config/rc.conf index 6bb8f0d0..388e56e6 100644 --- a/ranger/config/rc.conf +++ b/ranger/config/rc.conf @@ -207,8 +207,9 @@ set cd_bookmarks true # Changes case sensitivity for the cd command tab completion set cd_tab_case sensitive -# Use smart tab completion with less typing? E.g. ":cd /f/b/b<tab>" yields ":cd /foo/bar/baz". -set cd_tab_smart false +# Use fuzzy tab completion with the "cd" command. For example, +# ":cd /u/lo/b<tab>" expands to ":cd /usr/local/bin". +set cd_tab_fuzzy false # Avoid previewing files larger than this size, in bytes. Use a value of 0 to # disable this feature. diff --git a/ranger/container/settings.py b/ranger/container/settings.py index 2f38a2b6..d0b094d0 100644 --- a/ranger/container/settings.py +++ b/ranger/container/settings.py @@ -29,7 +29,7 @@ ALLOWED_SETTINGS = { 'autoupdate_cumulative_size': bool, 'cd_bookmarks': bool, 'cd_tab_case': str, - 'cd_tab_smart': bool, + 'cd_tab_fuzzy': bool, 'clear_filters_on_dir_change': bool, 'collapse_preview': bool, 'colorscheme': str, |