Implement a FuzzyFinder Inspired by this link I found on Reddit.

A FuzzyFinder is a feature of many text editors. As you start to type a file path S, the FuzzyFinder kicks in and shows you all files in the current directory containing the string you entered, sorted by the position of S in the file.

Your task is to implement a fuzzy finder. It should be program or function that takes (via stdin, function argument, or command line) a string S and a list of strings L, formatted however you wish, and returns or prints the result of running the fuzzy finder. The search should be case-sensitive. Results where S is in the same position in multiple strings may be sorted however you wish.

Example:

Input: mig, [imig, mig, migd, do, Mig]
Output:
    [mig, migd, imig]
OR
    [migd, mig, imig]


This is code golf, so the shortest solution wins.
CJam, 18 15 bytes

{1$#)}q~2$,@$p;


Try it online in the CJam interpreter.

I/O

Input:

"mig" ["imig" "mig" "migd" "do" "Mig"]


Output:

["mig" "migd" "imig"]


How it works

      q~        e# Read and evaluate the input from STDIN.
                e# Pushes a needle and an array of haystacks.
{    }          e# Define a code block:
 1$             e#   Copy the needle.
   #            e#   Compute the index of the needle in the haystack.
    )           e#   Add 1 to the index.
        2$      e# Copy the block.
          ,     e# Filter: Keep only haystacks for which the code block
                e#         pushed a non-zero value.
           @    e# Rotate the block on top of the stack.
            $   e# Sort: Arrange the haystacks according to the values
                e#       pushed by the code block.
             p  e# Print the filtered and sorted haystacks.
              ; e# Discard the needle.