Initialise cd options to empty string
Inline while loop in cd function with do
Sort options alphabetically
Quote expansions in cd function
Test for substring presence in cd function