shorten_path is deprecated now Reference: https://github.com/nvim-telescope/telescope.nvim/wiki/Path-Display-Configuration
* modify sed command to work in both gnu sed and mac os sed https://stackoverflow.com/a/4247319 * use printf everywhere for more compatibility * add some error checking