forked from martanne/vis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vis-open: fix for absolute and non-existent paths
When the shell cannot find any matching files, the glob is not expanded, and vis-open will return the absolute path of the current working directory (because dirname outputs '.'), followed by the filename, followed by a literal '*'. This commit checks that the final path actually exists, and if not, exits with status 1. It also uses text_object_longword for the range to match, so that absolute paths are accepted, and replaced properly (else it only works back to the first '/').
- Loading branch information
Showing
3 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters