Given the usual size of the terminal window, short commands fit. Ex:

stoqlt@desktop:~ > ls files

However, typing a command that is longer than the free space after the prompt, and reaching the end of the (first) line, the whole text entry changes to the next full line.

stoqlt@desktop:~ >
ls files1111* dirs2222* | grep 'stakcexchange' | sed -e 's/stakc/stack/'

This is really a nice feature, but I'd like to display the last two chars of the prompt (usually: '> ') at the beginning of this extra line, like

> ls files1111* dirs2222* | grep 'stakcexchange' | sed -e 's/stakc/stack/'

How could I create that feature?

  • Put a line feed in your prompt? – DavidPostill May 27 at 6:32
  • No. I use a singleline prompt. But reaching the right side of the window, fish transports my whole command entry to the next line, then I can continue typing there. – stoqlt May 27 at 11:09

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.