Repository: chriskuehl/rustenv (language: python)

Issue:
`deactivate_rustenv` doesn't remove `deactivate_rustenv`
```console
(renv) asottile@babibox:/tmp
$ deactivate_rustenv 
asottile@babibox:/tmp
$ which cargo
asottile@babibox:/tmp
$ deactivate_rustenv 
ehco hi
bash: ehco: No such file or directory
echo hi
hi
```


Discussion / hints:

Fix patch:
diff --git a/rustenv.py b/rustenv.py
index ac82bb7..4cdbbc2 100644
--- a/rustenv.py
+++ b/rustenv.py
@@ -47,6 +47,7 @@
     unset _RUSTENV_BIN_PATH
     unset _RUSTENV_OLD_PS1
     unset _RUSTENV_OLD_PATH
+    unset -f deactivate_rustenv
 }}
 '''
 


Test patch:
diff --git a/tests/integration_test.py b/tests/integration_test.py
index 72088d5..e1b3e5c 100644
--- a/tests/integration_test.py
+++ b/tests/integration_test.py
@@ -22,6 +22,7 @@
     echo "[[$1-rustc:$(rustc --version 2>&1)]]"
     echo "[[$1-cargo:$(cargo --version 2>&1)]]"
     echo "[[$1-hello:$(hello 2>&1)]]"
+    echo "[[$1-deactivate_rustenv:$(type deactivate_rustenv | head -1)]]"
 }}
 
 report start