This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: bash: igncr shell option breaks my PS1 prompt


On 2016-08-30 15:34, Nellis, Kenneth wrote:
[snip]

But, get this:

$ PS1='$(date)\n\$ '
Tue Aug 30 09:30:37 EDT 2016
$ set -o igncr
-bash: command substitution: line 1: syntax error near unexpected token `)'
-bash: command substitution: line 1: `date)'

$ PS1='`date`\n\$ '
Tue Aug 30 09:31:01 EDT 2016
$

So, the $() syntax is part of the mix. Use back-ticks as a workaround.

Or: replacing \n by \012 also does the trick.

(No! I do not know why!)

Henri :-))

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]