mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
scm-prompt: fix single quotes showing up with no format string
Summary: Regression that wasn't tested by the tests before Test Plan: This is now tested with a new test Reviewers: #fbhgext, mjpieters Reviewed By: mjpieters Differential Revision: https://phab.mercurial-scm.org/D823
This commit is contained in:
parent
3add344955
commit
59d15d70c8
@ -193,7 +193,7 @@ _scm_prompt() {
|
||||
# - provide a space for the user so that they don't have to have
|
||||
# random extra spaces in their prompt when not in a repo
|
||||
# - provide parens so it's differentiated from other crap in their prompt
|
||||
fmt="${1:-' (%s)'}"
|
||||
fmt="${1:- (%s)}"
|
||||
|
||||
# find out if we're in a git or hg repo by looking for the control dir
|
||||
dir="$PWD"
|
||||
|
@ -35,3 +35,7 @@ Test format string
|
||||
$ hg init repo
|
||||
$ oldcmd cd repo
|
||||
g g empty g g
|
||||
|
||||
Test main prompt with no format string
|
||||
$ _scm_prompt
|
||||
(empty) (no-eol)
|
||||
|
Loading…
Reference in New Issue
Block a user