From 866d5dfccd90114ee431f144f9a62122d2768b82 Mon Sep 17 00:00:00 2001 From: Thomas Blaschke Date: Wed, 23 Jun 2021 16:20:11 +0200 Subject: [PATCH 1/2] Add conda to the list of requirements If conda is not in the list of requirements, the scripts exit too early in case pyenv is not installed and the module is configured with: zstyle ':prezto:module:python' skip-virtualenvwrapper-init 'on' zstyle ':prezto:module:python' conda-init 'on' Tested on Amazon EC2 Linux for Deeplearning AMI 47.0 and MacOS 11.4 --- modules/python/init.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/python/init.zsh b/modules/python/init.zsh index ed68990..91aa6d0 100644 --- a/modules/python/init.zsh +++ b/modules/python/init.zsh @@ -44,7 +44,7 @@ fi unset local_pyenv # Return if requirements are not found. -if (( ! $#commands[(i)python[23]#] && ! $+functions[pyenv] )); then +if (( ! $#commands[(i)python[23]#] && ! $+functions[pyenv] && ! $+commands[conda] )); then return 1 fi From f3c92ffeb3a09acf67bc4c07f56a721a827ac38e Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Tue, 22 Jun 2021 22:17:29 -0500 Subject: [PATCH 2/2] utility: Pipe diff output through colordiff Instead of aliasing `colordiff` behaves better as `stdin` filter. This is useful in retaining color escape sequences when used with `less`. --- modules/utility/functions/diff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/utility/functions/diff b/modules/utility/functions/diff index 4e08494..2e812f2 100644 --- a/modules/utility/functions/diff +++ b/modules/utility/functions/diff @@ -9,7 +9,7 @@ if zstyle -t ':prezto:module:utility:diff' color \ && (( $+commands[colordiff] )); then - command colordiff "$@" + command diff "$@" | colordiff else command diff "$@" fi