Remove prefix from filenames
adityam opened this issue · 4 comments
adityam commented
Is it possible to add an option to remove '$HOME' (or perhaps a user specified prefix) from the list before displaying the files?
MarkHedleyJones commented
It would be possible to add such an option, but here are some reasons that I'm hoping will convince you that it's not a good idea.
- It would require making an alias for every file in the cache. So... when you execute
Pictures/cat.png
, the menu would have to look-up the alias table and get the full-path to the file. That adds a layer of complexity that every plug-in or special use character (e.g....@
,...:...
) would have to deal with. - Because the paths are being modified, how would you deal with the case where two paths, that were previously unique, have become the same (e.g.
/home/username/Pictures/cat.png
->Pictures/cat.png
, and/etc/var/www/Pictures/cat.png
->Pictures/cat.png
?
What could work may be to just replace /home/username
with ~
which would make the paths a bit tidier (for ones under the users home directory) and still keep them absolute (full paths).
adityam commented
Thank you for the explanation. I meant just the paths inside /home/username. The option to abbreviate it to `~` will be great.
MarkHedleyJones commented
Hi again.
Try the branch in #106 and let me know if that does what you're hoping for.
See the README.md in that branch for details on how to enable it.
adityam commented
Thanks. This works perfectly!