b1617bd0016fe9b2ab59215f6b8be5594ef4288a

Author
Michael Aquilina <michaelaquilina@gmail.com>
Committer
Michael Aquilina <michaelaquilina@gmail.com>
Date

Message

Prevent useless use of cat

Diff

 1diff --git a/autoswitch_virtualenv.plugin.zsh b/autoswitch_virtualenv.plugin.zsh
 2index ef6c880f54c3dc25f51e4f29a38a8f5093edfebe..229efccbbfe4d37ced6fee57fb741eb314d17481 100644
 3--- a/autoswitch_virtualenv.plugin.zsh
 4+++ b/autoswitch_virtualenv.plugin.zsh
 5@@ -41,7 +41,7 @@ function check_venv()
 6             echo "Reason: Found a .venv file with weak permission settings ($file_permissions)."
 7             echo "Run the following command to fix this: \"chmod 600 .venv\""
 8           else
 9-            SWITCH_TO="$(cat .venv)"
10+            SWITCH_TO="$(<.venv)"
11             AUTOSWITCH_PROJECT="$PWD"
12           fi
13         fi
14@@ -70,7 +70,7 @@ function default_venv()
15 function rmvenv()
16 {
17   if [[ -f ".venv" ]]; then
18-    venv_name="$(cat .venv)"
19+    venv_name="$(<.venv)"
20     current_venv="$(basename $VIRTUAL_ENV)"
21     if [[ "$current_venv" = "$venv_name" ]]; then
22       default_venv