php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64078 cli.prompt weird trailing spaces behavior on interactive shell
Submitted: 2013-01-25 22:58 UTC Modified: -
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: oliver at x10 dot pe Assigned:
Status: Open Package: CGI/CLI related
PHP Version: 5.4.11 OS: Ubuntu Linux 12.10 64bits
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: oliver at x10 dot pe
New email:
PHP Version: OS:

 

 [2013-01-25 22:58 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-06-30 07:53 UTC] oliver at x10 dot pe
Problem persists on PHP 5.5.0
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 19:01:28 2024 UTC