Hi, I'm enjoying using ivy so far, but I've run into a problem I can't figure out. I want to use ivy-read to read a file from the minibuffer, and I want to start the input with an automatically generated file name without the extension, like "01234.". I thought :initial-input would do this but it's not working as I expected. Here's my code which I modified from counsel-find-file
rel-fname is the auto-generated name. I'm also let binding default-directory to start in a directory that may not exist, which is the reason for make-directory. What happens is I get a candidate that is preselected in the completions, but what I want is to be able to quickly type el RET and get the file name with an "el" extension. Does that make sense? Is there a variable I need to set? I can do M-i then el RET but I was hoping to eliminate that step. Thanks
The text was updated successfully, but these errors were encountered:
I have (setq initial-input nil) specifically for 'read-file-name-internal. This is for e.g. rgrep and similar commands: they use the full path as initial-input resulting in a mess, since ivy uses relative paths for file name completion.
I can avoid setting it to nil when action is supplied. Would that be OK for you?