diff options
| author | Simon Hauser <Simon-Hauser@outlook.de> | 2021-07-14 19:54:06 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-14 19:54:06 +0200 |
| commit | 876bed9632d8da78761f3d8edd3c153478c0a13f (patch) | |
| tree | d46810ab78f377b6cc828c261f66c5815bf73858 /lua | |
| parent | df579bac425e4b6b69a0c8e694b154610cd5420b (diff) | |
chore: changelog for 473 (#992)
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/telescope/utils.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lua/telescope/utils.lua b/lua/telescope/utils.lua index bb48c2c..4b2b56b 100644 --- a/lua/telescope/utils.lua +++ b/lua/telescope/utils.lua @@ -1,7 +1,7 @@ local has_devicons, devicons = pcall(require, 'nvim-web-devicons') local Path = require('plenary.path') -local Job = require('plenary.job') +local Job = require('plenary.job') local utils = {} @@ -251,6 +251,10 @@ utils.diagnostics_to_tbl = function(opts) return items end +utils.path_shorten = function(file) + return Path:new(file):shorten() +end + utils.path_tail = (function() local os_sep = utils.get_separator() local match_string = '[^' .. os_sep .. ']*$' |
