From 80ddd8de4b14d0bb828d3b9686dc70536dd9e3fd Mon Sep 17 00:00:00 2001 From: Anton Bobov Date: Wed, 21 Feb 2024 00:01:07 +0500 Subject: [zsh] Update modules --- files/.zsh/grml-etc-core | 2 +- files/.zsh/rc/S50_functions | 9 +++++++-- files/.zsh/z | 2 +- files/.zsh/zsh-completions | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) (limited to 'files/.zsh') diff --git a/files/.zsh/grml-etc-core b/files/.zsh/grml-etc-core index 4fab924..bdc51f9 160000 --- a/files/.zsh/grml-etc-core +++ b/files/.zsh/grml-etc-core @@ -1 +1 @@ -Subproject commit 4fab92406d02f1cfe2a0a5cb1f57ca6832fbd22b +Subproject commit bdc51f9788c98839cfcb248b9a16d87c8f99c3e2 diff --git a/files/.zsh/rc/S50_functions b/files/.zsh/rc/S50_functions index f510bd3..b9f2a08 100644 --- a/files/.zsh/rc/S50_functions +++ b/files/.zsh/rc/S50_functions @@ -64,7 +64,8 @@ alias calc="noglob calc" # Take from @garybernhardt activate_virtualenv() { local found_location="" - for name in venv env ; do + local default_name=venv + for name in $default_name env ; do for up in . ../.. ../../.. ; do if [ -f "$up/$name/bin/activate" ] ; then found_location="$up/$name/bin/activate" @@ -78,7 +79,11 @@ activate_virtualenv() { # create read -r "answer?Virtualenv not found, create? " if [[ "$answer" =~ ^[Yy]$ ]] ; then - virtualenv venv + if command -v virtualenv>/dev/null ; then + virtualenv $default_name + else + python3 -m venv $default_name + fi activate_virtualenv fi else diff --git a/files/.zsh/z b/files/.zsh/z index b82ac78..d37a763 160000 --- a/files/.zsh/z +++ b/files/.zsh/z @@ -1 +1 @@ -Subproject commit b82ac78a2d4457d2ca09973332638f123f065fd1 +Subproject commit d37a763a6a30e1b32766fecc3b8ffd6127f8a0fd diff --git a/files/.zsh/zsh-completions b/files/.zsh/zsh-completions index 0cee6ab..507f1f8 160000 --- a/files/.zsh/zsh-completions +++ b/files/.zsh/zsh-completions @@ -1 +1 @@ -Subproject commit 0cee6ab50885845464724a6501f872f842253b36 +Subproject commit 507f1f8715edd9f1f403c140fa332644d81ebab5 -- cgit v1.2.3