我正在尝试通过键入 activate [name of Venv] 创建一个别名来激活任何给定的 Venv。
我做了什么:
activate (){
directory = "~/Programming/path-to-venvs/$1"
cd $directory
source "bin/activate"
}
当我尝试运行它时,如果我这样做:
activate Test
我收到此错误:
activate:cd:3: no such file or directory: ~/Programming/path-to-venvs/Test
activate:source:4: no such file or directory: bin/activate
有任何想法吗?