use fileSeparators to determin end of file name in open command
@@ -192,13 +192,15 @@ class InteractivePrompt(app.controller.Controller):
penLineLength = len(penLine)
- while wordEnd < penLineLength and penLine[wordEnd] != ' ':
+ while (wordEnd < penLineLength and
+ penLine[wordEnd] not in fileSeparators):
wordEnd += 1
selectedWord = penLine[wordStart:wordEnd]
expandedPath = os.path.abspath(os.path.expanduser(selectedWord))
- if not os.path.isfile(expandedPath) or not os.access(expandedPath, os.R_OK):
+ if not os.path.isfile(expandedPath) or not os.access(
+ expandedPath, os.R_OK):
return {}, 'Path {} is not a readable file'.format(expandedPath)
# Open the file
