I would like to be able to complete command-line arguments with spaces in eshell with helm, like so :

evince A\ file\ with\ a\ lot\ of\ spaces.pdf

Using helm and pcomplete works fine (spaces are escaped) but a bit tedious to use outside the current directories (tedious as in I could do it in the terminal directly !).

If I want files in upper directories, I have tried to use helm-find-files, then complete-at-point (mapped to C-c i). Unfortunately, the filename is inserted "as is", without spaces being escaped.

Is there a way to use complete-at-point with shell escaping ? Thanks !

Edit : To run a program on a single file, I have found 2 options :

  1. Locate the file with helm-find-files and then run an eshell command on the file (M-!). Aliases are possible to make it easier.
  2. Or use projectile to locate the file and use Open file externally (C-c C-x). It saves the default program so that's better than solution 1.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.