ohmybash / oh-my-bash

A delightful community-driven framework for managing your bash configuration, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.
https://ohmybash.github.io
MIT License
5.53k stars 624 forks source link

Resolve VIRTUAL_ENV with double-quotes #541

Closed ScumbagScalawag closed 3 months ago

ScumbagScalawag commented 3 months ago

Without double-quotes, paths with spaces are not resolved correctly and venv name is not displayed correctly.

Before:

└─▪ echo $VIRTUAL_ENV
~/Documents/Path with spaces/env
basename: extra operand ‘spaces/env’
Try 'basename --help' for more information.
┌─()[name][os][±][( main ?:3 ⊘ )][~<Path redacted>]

But with this small change:

┌─(env)[name][os][±][( main ?:3 ⊘ )][~<Path redacted>]
└─▪

Edit: I'm not super familiar with Bash, but I'd recommend a quick once-over to make sure this issue doesn't appear in other places for zork. I only really discoverd this because of novice-level Bash knowledge and ChatGPT xd.

akinomyoga commented 3 months ago

I've applied the same change to the theme mairan and merged the PR. Thanks!