Skip to content

Add newline to wp shell's prompt#2601

Merged
danielbachhuber merged 2 commits into
wp-cli:masterfrom
JRGould:shell-newline-prompt
Mar 29, 2016
Merged

Add newline to wp shell's prompt#2601
danielbachhuber merged 2 commits into
wp-cli:masterfrom
JRGould:shell-newline-prompt

Conversation

@JRGould
Copy link
Copy Markdown
Contributor

@JRGould JRGould commented Mar 29, 2016

Resolves #2600

@JRGould JRGould changed the title Shell newline prompt Add newline to wp shell's prompt Mar 29, 2016
@danielbachhuber danielbachhuber added this to the 0.24.0 milestone Mar 29, 2016
@danielbachhuber danielbachhuber merged commit d252bda into wp-cli:master Mar 29, 2016
Comment thread php/commands/shell.php
\Psy\Shell::debug();
} else {
$repl = new $class( 'wp> ' );
$repl = new $class( "\nwp> " );
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JRGould I noticed this adds a newline when the shell first begins too. Is there a way of preventing this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could probably add a flag to \WP_CLI\REPL and strip out the newline just the first time the prompt is printed. Not sure about Psy or Boris though. Happy to open another issue/PR for that if you think it's worth the tinker?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to open another issue/PR for that if you think it's worth the tinker?

Yes please. We should also look into whether we can inject the newline after command execution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants