Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • thanks for the answer, when you say that we can add the string PROMPT=$'%{\ek%~\e\\%}$ ' directly in our prompt instead of using precmd, does that means that I can write this line in my .zshrc file instead of the precmd function, and it will execute $'%{\ek%~\e\\%}$ ' each time I use the command lines ? Like a surveillance of the prompt action ? Commented Jul 24, 2018 at 9:55
  • so I tried: what you meant was to write PROMPT=$'%{\ek%~\e\\%}$ ' directly in the terminal prompt, it works indeed but weirdly: usually zsh show me multiple informations at the beginning of each prompt, like the git branch or the name of the folder, after typing your command line it's replaced by just a dollar sign $, also it doesn't solve my question which is to have the name of the file I'm working on, not only the folder Commented Jul 24, 2018 at 11:00
  • I'm wondering if I posted the question on the right forum ? maybe super user or stackoverflow are better place for my issue ? Commented Jul 25, 2018 at 13:30
  • i got one working answer here stackoverflow.com/a/51769020/9497573 Commented Aug 14, 2018 at 10:46