summaryrefslogtreecommitdiff
path: root/qutebrowser/completion/models/filepathcategory.py
AgeCommit message (Collapse)Author
2021-07-28Simplify exception catchingFlorian Bruhin
(cherry picked from commit 52d551875dba74b63b322a07baa4aeac4da865eb)
2021-07-28Handle and test more file path corner casesFlorian Bruhin
(cherry picked from commit 676c9db2fe9833e52b12f723c3ed62a38759f82d)
2021-07-28Handle UnicodeEncodeError in path completionFlorian Bruhin
(cherry picked from commit 0001d4fe20a4cdef9dd628fad220e09a03618932)
2021-01-26doc: Switch URLs to httpsFlorian Bruhin
2021-01-20completion: Avoid pathlib in filepathcategoryFlorian Bruhin
On GitHub Actions, it looks like there's a situation where os.path.expanduser and pathlib.Path.expanduser disagree. When in test_filesystem_completion_hypothesis the completion gets '~' as input, it fails with: tests/unit/completion/test_models.py:469: in test_filesystem_completion_hypothesis model.set_pattern(text) qutebrowser/completion/models/filepathcategory.py:88: in set_pattern self._paths = sorted(self._contract_user(val, path) for path in paths) qutebrowser/completion/models/filepathcategory.py:88: in <genexpr> self._paths = sorted(self._contract_user(val, path) for path in paths) qutebrowser/completion/models/filepathcategory.py:52: in _contract_user return str(head / pathlib.Path(path).relative_to(head.expanduser())) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = PosixPath('/home/runneradmin'), other = (PosixPath('/home/runner'),) parts = ['/', 'home', 'runneradmin'], drv = '', root = '/' def relative_to(self, *other): [...] E ValueError: '/home/runneradmin' does not start with '/home/runner' Let's use os.path everywhere, so we can be sure the two code paths agree with each other.
2021-01-20Handle null bytes in filepath completionFlorian Bruhin
2021-01-20Update docsFlorian Bruhin
2021-01-20Refactor FilePathCategoryFlorian Bruhin
2021-01-20Minor reformatFlorian Bruhin
2021-01-19Add some testsAndrew MacFie
2021-01-19Add favorite_paths as settingAndrew MacFie
2021-01-19Remove config import for nowAndrew MacFie
2021-01-19Fix name from QtAndrew MacFie
2021-01-19Fix method implementationAndrew MacFie
2021-01-19Add filesystem completion to defaultAndrew MacFie
2021-01-19Leave prefix as user typed itAndrew MacFie
2021-01-19Fix some stuffAndrew MacFie
2021-01-19Update qutebrowser/completion/models/filepathcategory.pyAndrew
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2021-01-19Update qutebrowser/completion/models/filepathcategory.pyAndrew
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2021-01-19Update qutebrowser/completion/models/filepathcategory.pyAndrew
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2021-01-19Update qutebrowser/completion/models/filepathcategory.pyAndrew
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2021-01-14Fix c/p'ed docstringAndrew MacFie
2021-01-14Remove lint (whoops)Andrew MacFie
2021-01-14Support file protocol in filename completionAndrew MacFie
2021-01-14Add file path completionAndrew MacFie