google / google/vim-maktaba

maktaba#path#GetDirectory behavior needs more thought

Open
#11 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Vim Script
Stars
588
Forks
41
PR merge metrics
No merged PRs in 30d

Description

`maktaba#path#GetDirectory` treats nonexistent paths as directories:

``` VimL
echo maktaba#path#GetDirectory('foo/bar/NONEXISTENT')
" --> foo/bar/NONEXISTENT/
```

Originally we had a variant that assumed files, not directories, but that was deleted. I would argue that assuming files in ambiguous cases is the more intuitive behavior, and we should detect trailing slashes so there's a mechanism to get the alternative behavior in cases where the caller already believes the nonexistent path should refer to a directory.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.