From 5e2b08abafbb2732a5f6f7ae63497d319336127b Mon Sep 17 00:00:00 2001
From: Michael Aaron Murphy <mmstickman@gmail.com>
Date: Thu, 26 Oct 2017 10:27:07 -0400
Subject: [PATCH] Fix #557 Closes #557

---
 src/shell/completer.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/shell/completer.rs b/src/shell/completer.rs
index 68a21725..92025968 100644
--- a/src/shell/completer.rs
+++ b/src/shell/completer.rs
@@ -76,7 +76,7 @@ impl Completer for IonFileCompleter {
                     // search pattern begins, and re-use that index to slice the completions so
                     // that we may re-add the tilde character with the completion that follows.
                     if let Some(completion) = iterator.next() {
-                        if let Some(e_index) = completion.find(search) {
+                        if let Some(e_index) = completion.rfind(search) {
                             completions.push(escape(&[tilde, &completion[e_index..]].concat()));
                             for completion in iterator {
                                 let expanded = &completion[e_index..];
-- 
GitLab