You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, and thanks for the great script. I wanted to include it in my project, but noticed that a dependency on a third party package (colorama) had crept in there, which I fear will complicate installation. Considering beautysh is only 400 lines, it seems a shame to introduce a dependency unnecessarily.
Upon investigation, I discovered that this dependency becomes completely unnecessary if the color_diff function is rewritten as
def color_diff(self, diff):
for line in diff:
if line.startswith("+"):
yield "\033[32m" + line + "\033[39m" # green
elif line.startswith("-"):
yield "\033[31m" + line + "\033[39m" # red
elif line.startswith("^"):
yield "\033[34m" + line + "\033[39m" # blue
else:
yield line
The text was updated successfully, but these errors were encountered:
Hello, and thanks for the great script. I wanted to include it in my project, but noticed that a dependency on a third party package (colorama) had crept in there, which I fear will complicate installation. Considering beautysh is only 400 lines, it seems a shame to introduce a dependency unnecessarily.
Upon investigation, I discovered that this dependency becomes completely unnecessary if the
color_diff
function is rewritten asThe text was updated successfully, but these errors were encountered: