99c789df3425f86c7bafb534240d58b52b677805

Author
TheEdgeOfRage <git@theedgeofrage.com>
Committer
TheEdgeOfRage <git@theedgeofrage.com>
Date

Message

Remove snake emoji

Diff

  1diff --git a/README.rst b/README.rst
  2index c801a97b656887bee4262166a1fe0e3766e3ee7d..a59b24268a7370d3733fc80ab50206d45d54f942 100644
  3--- a/README.rst
  4+++ b/README.rst
  5@@ -233,7 +233,7 @@ following to your ``~/.zshrc``:
  6 
  7 ::
  8 
  9-    export AUTOSWITCH_MESSAGE_FORMAT="$(tput setaf 1)Switching to %venv_name ๐Ÿ %py_version $(tput sgr0)"
 10+    export AUTOSWITCH_MESSAGE_FORMAT="$(tput setaf 1)Switching to %venv_name %py_version $(tput sgr0)"
 11 
 12 ``$(tput setaf 1)`` generates the escape code terminals use for red foreground text. ``$(tput sgr0)`` sets
 13 the text back to a normal color.
 14diff --git a/tests/test_check_venv.zunit b/tests/test_check_venv.zunit
 15index 045bca38116317be361a0d67198f9590304a4de1..a96d79e6e4dc63e765cce05c9b3c531ad469fa53 100644
 16--- a/tests/test_check_venv.zunit
 17+++ b/tests/test_check_venv.zunit
 18@@ -88,7 +88,7 @@
 19     run check_venv
 20 
 21     assert $status equals 0
 22-    assert "$output" same_as "Switching to \e[1mvirtualenv\e[0m project: \e[1m\e[35mfoobar\e[0m \e[32m[๐Ÿ$PYTHON_VERSION]\e[0m"
 23+    assert "$output" same_as "Switching to \e[1mvirtualenv\e[0m project: \e[1m\e[35mfoobar\e[0m \e[32m[$PYTHON_VERSION]\e[0m"
 24 }
 25 
 26 @test 'check_venv - No security warning for readable by group permission' {
 27@@ -102,7 +102,7 @@
 28     run check_venv
 29 
 30     assert $status equals 0
 31-    assert "$output" same_as "Switching to \e[1mvirtualenv\e[0m project: \e[1m\e[35mfoobar\e[0m \e[32m[๐Ÿ$PYTHON_VERSION]\e[0m"
 32+    assert "$output" same_as "Switching to \e[1mvirtualenv\e[0m project: \e[1m\e[35mfoobar\e[0m \e[32m[$PYTHON_VERSION]\e[0m"
 33 }
 34 
 35 @test 'check_venv - No security warning for readable only by owner permission' {
 36@@ -115,7 +115,7 @@
 37     run check_venv
 38 
 39     assert $status equals 0
 40-    assert "$output" same_as "Switching to \e[1mvirtualenv\e[0m project: \e[1m\e[35mfoobar\e[0m \e[32m[๐Ÿ$PYTHON_VERSION]\e[0m"
 41+    assert "$output" same_as "Switching to \e[1mvirtualenv\e[0m project: \e[1m\e[35mfoobar\e[0m \e[32m[$PYTHON_VERSION]\e[0m"
 42 }
 43 
 44 
 45@@ -126,7 +126,7 @@
 46     run check_venv
 47 
 48     assert $status equals 0
 49-    assert "$output" same_as "Switching to \e[1mvirtualenv\e[0m project: \e[1m\e[35mfoodefault\e[0m \e[32m[๐Ÿ$PYTHON_VERSION]\e[0m"
 50+    assert "$output" same_as "Switching to \e[1mvirtualenv\e[0m project: \e[1m\e[35mfoodefault\e[0m \e[32m[$PYTHON_VERSION]\e[0m"
 51 }
 52 
 53 @test 'check_venv - activate if .venv unavailable but poetry available' {
 54@@ -141,7 +141,7 @@
 55     run check_venv
 56 
 57     assert $status equals 0
 58-    assert "$output" same_as "Switching to \e[1mpoetry\e[0m project: \e[1m\e[35mpoetry-foo\e[0m \e[32m[๐Ÿ$PYTHON_VERSION]\e[0m"
 59+    assert "$output" same_as "Switching to \e[1mpoetry\e[0m project: \e[1m\e[35mpoetry-foo\e[0m \e[32m[$PYTHON_VERSION]\e[0m"
 60 }
 61 
 62 @test 'check_venv - activate if .venv unavailable but pipenv available' {
 63@@ -155,7 +155,7 @@
 64     run check_venv
 65 
 66     assert $status equals 0
 67-    assert "$output" same_as "Switching to \e[1mpipenv\e[0m project: \e[1m\e[35mfoobar\e[0m \e[32m[๐Ÿ$PYTHON_VERSION]\e[0m"
 68+    assert "$output" same_as "Switching to \e[1mpipenv\e[0m project: \e[1m\e[35mfoobar\e[0m \e[32m[$PYTHON_VERSION]\e[0m"
 69 }
 70 
 71 
 72@@ -196,7 +196,7 @@
 73     run check_venv
 74 
 75     assert $status equals 0
 76-    assert "$output" same_as "Switching to \e[1mvirtualenv\e[0m project: \e[1m\e[35mfoobar\e[0m \e[32m[๐Ÿ$PYTHON_VERSION]\e[0m"
 77+    assert "$output" same_as "Switching to \e[1mvirtualenv\e[0m project: \e[1m\e[35mfoobar\e[0m \e[32m[$PYTHON_VERSION]\e[0m"
 78 }
 79 
 80 @test 'check_venv - works as intended with .venv directory not being virtualenv' {
 81diff --git a/tests/test_maybeworkon.zunit b/tests/test_maybeworkon.zunit
 82index 08a424e69cb7724f7e4bd438158a4a43c3165212..d2bb43c75dbe2ddce2bd3801d3cca8f8bc865ee7 100644
 83--- a/tests/test_maybeworkon.zunit
 84+++ b/tests/test_maybeworkon.zunit
 85@@ -52,7 +52,7 @@
 86     run _maybeworkon "$TEST_VIRTUALENV" virtualenv
 87 
 88     assert $state equals 0
 89-    assert "$output" same_as "Switching to \e[1mvirtualenv\e[0m project: \e[1m\e[35mfoobar\e[0m \e[32m[๐Ÿ$PYTHON_VERSION]\e[0m"
 90+    assert "$output" same_as "Switching to \e[1mvirtualenv\e[0m project: \e[1m\e[35mfoobar\e[0m \e[32m[$PYTHON_VERSION]\e[0m"
 91 }
 92 
 93 @test '_maybeworkon - custom message' {
 94@@ -81,7 +81,7 @@
 95     run _maybeworkon "$TEST_VIRTUALENV" virtualfoo
 96 
 97     assert $state equals 0
 98-    assert "$output" contains "Switching to \e[1mvirtualfoo\e[0m project: \e[1m\e[35mfoobar\e[0m \e[32m[๐Ÿ$PYTHON_VERSION]\e[0m"
 99+    assert "$output" contains "Switching to \e[1mvirtualfoo\e[0m project: \e[1m\e[35mfoobar\e[0m \e[32m[$PYTHON_VERSION]\e[0m"
100 }
101 
102 @test '_maybeworkon - switches virtualenv if current virtualenv is different (silent)' {
103@@ -107,6 +107,6 @@
104     run _maybeworkon hello-world-foo-de31f pipenv
105 
106     assert $state equals 0
107-    assert "$output" same_as "Switching to \e[1mpipenv\e[0m project: \e[1m\e[35mhello-world-foo\e[0m \e[32m[๐Ÿ$PYTHON_VERSION]\e[0m"
108+    assert "$output" same_as "Switching to \e[1mpipenv\e[0m project: \e[1m\e[35mhello-world-foo\e[0m \e[32m[$PYTHON_VERSION]\e[0m"
109 
110 }
111diff --git a/tests/test_plugin.zunit b/tests/test_plugin.zunit
112index 64da1b5bedd80ee7d3564752c80ffbf7db9335eb..d959c59f4709c4aa663cadefe2eda90bfb376e64 100644
113--- a/tests/test_plugin.zunit
114+++ b/tests/test_plugin.zunit
115@@ -67,7 +67,7 @@
116     run cd "$TEMP_DIR"
117 
118     assert $status equals 0
119-    assert "$output" same_as "Switching to \e[1mvirtualenv\e[0m project: \e[1m\e[35mfoobar\e[0m \e[32m[๐Ÿ$PYTHON_VERSION]\e[0m"
120+    assert "$output" same_as "Switching to \e[1mvirtualenv\e[0m project: \e[1m\e[35mfoobar\e[0m \e[32m[$PYTHON_VERSION]\e[0m"
121 
122     mkdir "$TEMP_DIR/foo"
123 
124@@ -75,7 +75,7 @@
125     run cd "$TEMP_DIR/foo"
126 
127     assert $status equals 0
128-    assert "$output" same_as "Switching to \e[1mvirtualenv\e[0m project: \e[1m\e[35mfoobar\e[0m \e[32m[๐Ÿ$PYTHON_VERSION]\e[0m"
129+    assert "$output" same_as "Switching to \e[1mvirtualenv\e[0m project: \e[1m\e[35mfoobar\e[0m \e[32m[$PYTHON_VERSION]\e[0m"
130 }
131 
132 
133diff --git a/zsh-autoswitch-virtualenv.plugin.zsh b/zsh-autoswitch-virtualenv.plugin.zsh
134index 359b37015827a379d3f2d24f8fd54f8e1dee52b9..54036b0697d55cfff510e785b60a0569af105810 100644
135--- a/zsh-autoswitch-virtualenv.plugin.zsh
136+++ b/zsh-autoswitch-virtualenv.plugin.zsh
137@@ -87,11 +87,7 @@ function _maybeworkon() {
138     local venv_type="$2"
139     local venv_name="$(_get_venv_name $venv_dir $venv_type)"
140 
141-    local DEFAULT_MESSAGE_FORMAT="Switching to ${AUTOSWITCH_BOLD}%venv_type${AUTOSWITCH_NORMAL} project: ${AUTOSWITCH_BOLD}${AUTOSWITCH_PURPLE}%venv_name${AUTOSWITCH_NORMAL} ${AUTOSWITCH_GREEN}[๐Ÿ%py_version]${AUTOSWITCH_NORMAL}"
142-    if [[ "$LANG" != *".UTF-8" ]]; then
143-        # Remove multibyte characters if the terminal does not support utf-8
144-        DEFAULT_MESSAGE_FORMAT="${DEFAULT_MESSAGE_FORMAT/๐Ÿ/}"
145-    fi
146+    local DEFAULT_MESSAGE_FORMAT="Switching to ${AUTOSWITCH_BOLD}%venv_type${AUTOSWITCH_NORMAL} project: ${AUTOSWITCH_BOLD}${AUTOSWITCH_PURPLE}%venv_name${AUTOSWITCH_NORMAL} ${AUTOSWITCH_GREEN}[%py_version]${AUTOSWITCH_NORMAL}"
147 
148     # Don't reactivate an already activated virtual environment
149     if [[ -z "$VIRTUAL_ENV" || "$venv_dir" != "$VIRTUAL_ENV" ]]; then