reddit / emacs

Is there a way to get a file open completing-reads to show only file names, excluding the directory path?

vfclists · 2022-07-18 22:25
I have some files in directories which are unique and since the filenames are long and descriptive sometimes I can't see the filenames right up to the extensions. Is there some way to configure the file opening completing reads to right align the display so the filenames can be seen? I guess this can be seen as a general case of right-aligning the completing-read display.
00-11 · 2022-07-18 22:36
Have you tried using `read-file-name`? Or what's the reason you want to use `completing-read` here? And do you need to use _absolute_ file names in the `COLLECTION` argument? Maybe show what you're trying (code), and explain why you use the code you use?
vfclists · 2022-07-18 22:45
Sorry, I am referring to commands like `helm-projectile-ag` or `helm-projectile-find-files`? `find-file` also seems to act that way. Which command is `read-file`? It doesn't appear under `M-x`?
00-11 · 2022-07-19 01:20
`read-file-name`, not `read-file`.
deaddyfreddy · 2022-07-19 14:26
`counsel-find-file` and `consult`/`helm`/etc counterparts