autocomplete: assume selection when there's only one candidate#277
Open
adtac wants to merge 5 commits intokamiyaa:mainfrom
Open
autocomplete: assume selection when there's only one candidate#277adtac wants to merge 5 commits intokamiyaa:mainfrom
adtac wants to merge 5 commits intokamiyaa:mainfrom
Conversation
2f32a8d to
b64724c
Compare
b64724c to
b952351
Compare
kamiyaa
reviewed
Apr 17, 2023
Owner
kamiyaa
left a comment
There was a problem hiding this comment.
LGTM overall.
Just a few minor comments
src/key_command/impl_from_str.rs
Outdated
| } else if command == CMD_DELETE_FILES { | ||
| let (mut permanently, mut background) = (false, false); | ||
| for arg in arg.split_whitespace() { | ||
| eprintln!("arg: {:?}", arg); |
docs/image_previews.md
Outdated
| esac | ||
| ``` | ||
|
|
||
| `~/.config/joshuto/on_preview_removed.sh`: |
Owner
There was a problem hiding this comment.
Is there any reason for this change?
Author
There was a problem hiding this comment.
Both references to this script above ("Configuring Hook Scripts" and "The Hook Scripts") don't have the .sh. I blindly copy-pasted those instructions, but with the kitty modifications, but it took me a couple minutes to identify the typo.
| let _ = terminal.hide_cursor(); | ||
| return None; | ||
| } | ||
| Key::Ctrl('c') => { |
scutuatua-crypto
approved these changes
Jan 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes autocomplete behave like how it works in ranger. To test before and after, create a directory long directory chain
$HOME/foo/bar/baz, type:cd foand press Tab several times. Previously, joshuto would stop atfoo, but now the first Tab will autocompletefoo/, the second will autocompletefoo/bar/, and so on.I don't know any Rust, but the change seems to work. Feel free to cherry pick the commit and make changes to make it more idiomatic/cleaner/whatever.
The PR also includes a couple of other trivial improvements.