Skip to content

Modify activate.bat to remove forced space after --prompt arg - #1285

Closed
bskinn wants to merge 1 commit into
pypa:masterfrom
bskinn:sh-add-space
Closed

bskinn wants to merge 1 commit into
pypa:masterfrom
bskinn:sh-add-space

Conversation

@bskinn

@bskinn bskinn commented Jan 14, 2019 •

Copy link
Copy Markdown

Fixes #1168, per the approach suggested there (BUT SEE BELOW).

The tasks/update_embedded.py script has been run, updating
virtualenv.py.

A local test virtual environment created after implementing the change
does show the desired space between the virtualenv --prompt
argument and the old $PS1 portion of the prompt.

Per discussion under #1168, this PR will now REMOVE forced spaces added after custom prompt prefixes as specified via --prompt. Only activate.bat required changes; these changes were embedded into virtualenv.py via tox -e embed.

Thanks for contributing a pull request, see checklist all is good!

  • wrote descriptive pull request text
  • added/updated test(s)
  • updated/extended the documentation [N/A]
  • added news fragment in docs/changelog folder

@gaborbernat gaborbernat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would like test for this, just to avoid regression. Thanks!

@bskinn

bskinn commented Jan 15, 2019 •

Copy link
Copy Markdown
Author

I would like test for this, just to avoid regression. Thanks!

<nod>, can do. I should also be able to add a similar test for Windows cmd.

I'm not familiar with the other shells -- should they have similar tests as well?

Also, I'll fix that :user: directive that's raising the warning in the docs test.

@gaborbernat

Copy link
Copy Markdown
Contributor

I've fixed on master now 😁

@bskinn bskinn changed the title Modify activate.sh to add space after --prompt arg Modify activate.bat, activate.ps1 to remove forced space after --prompt arg Jan 17, 2019
@bskinn bskinn changed the title Modify activate.bat, activate.ps1 to remove forced space after --prompt arg Modify activate.bat to remove forced space after --prompt arg Jan 17, 2019
fish and bash *already had* NO forced space
cmd REVISED to NO forced space

csh and PowerShell appear not even to *support* `--prompt`

xonsh does not appear to modify the prompt at all (if it
even has a prompt?)

`virtualenv.py` updated via `tox -e embed`
@bskinn

bskinn commented Jan 21, 2019 •

Copy link
Copy Markdown
Author

Ok, @gaborbernat, after taking a closer look at all of the activate.xyz scripts, it seems like there's potentially a fair amount of work to do in order to bring their behavior into consistency. I created a Project on my fork to try to organize the info on where things stand; in particular, check out this column.

How deep down the rabbit hole should I go on this?

@gaborbernat

Copy link
Copy Markdown
Contributor

@bskinn I like the level you went here. Thank you very much for this. I would say let's create issues for it, and tackle it one by one. @scopatz can assist with the xonosh part 👍

@bskinn

bskinn commented Jan 28, 2019

Copy link
Copy Markdown
Author

Ok, @gaborbernat, I created #1294 through #1299 as the framework for the work to be done. I would plan to take them in ascending numerical sequence.

Thoughts?

@gaborbernat

Copy link
Copy Markdown
Contributor

Sounds great.

@bskinn

bskinn commented Mar 1, 2019

Copy link
Copy Markdown
Author

This PR is obsolete now; closing.

@bskinn bskinn closed this Mar 1, 2019
@bskinn
bskinn deleted the sh-add-space branch March 1, 2019 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

COSMETIC: On Windows, --prompt adds a space to the resulting prompt after its argument; doesn't add space on Linux

2 participants