Bug #64078 [Com]: cli.prompt weird trailing spaces behavior on interactive shell

From: Date: Sun, 30 Jun 2013 07:53:41 +0000
Subject: Bug #64078 [Com]: cli.prompt weird trailing spaces behavior on interactive shell
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-179984@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64078&edit=1

 ID:                 64078
 Comment by:         oliver at x10 dot pe
 Reported by:        oliver at x10 dot pe
 Summary:            cli.prompt weird trailing spaces behavior on
                     interactive shell
 Status:             Open
 Type:               Bug
 Package:            CGI/CLI related
 Operating System:   Ubuntu Linux 12.10 64bits
 PHP Version:        5.4.11
 Block user comment: N
 Private report:     N

 New Comment:

Problem persists on PHP 5.5.0


Previous Comments:
------------------------------------------------------------------------
[2013-01-25 22:58:56] oliver at x10 dot pe

Description:
------------
Hello everyone.

When I try to change the interactive shell prompt using the command line (via the 
-d option), the trailing spaces doesn't show unless I begin the prompt with an 
non-alphanumeric character.

It works OK using the shorthand notation (#cli.prompt=test      ) inside the 
shell

Test script:
---------------
$ php -d cli.prompt="test       " -a
Interactive shell

test# spaces are not shown
test^C

$ php -d cli.prompt="-test       " -a
Interactive shell

-test       # now the prompt is ok
-test       ^C

$ php -d cli.prompt=" test       " -a
Interactive shell

 test       # also ok
 test       ^C


Expected result:
----------------
$ php -d cli.prompt="test       " -a
Interactive shell

test       # The trailing spaces should be honored.
test       ^C

Actual result:
--------------
$ php -d cli.prompt="test       " -a
Interactive shell

test# not honored
test^C



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64078&edit=1


Thread (2 messages)

« previous php.bugs (#179984) next »