Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change use sock recommended #72

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

yuki-yano
Copy link
Owner

No description provided.

@yuki-yano yuki-yano force-pushed the feature/recommended_sock branch 2 times, most recently from dde9e47 to 1ff2b48 Compare February 4, 2023 09:14
Comment on lines +100 to +102
# Recommended: Use UNIX Domain Socket
# if disable
# export ZENO_ENABLE_SOCK=0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest changing the variable.
Expecting default values to be empty is a good design for zero configuration.

Suggested change
# Recommended: Use UNIX Domain Socket
# if disable
# export ZENO_ENABLE_SOCK=0
# by default a unix domain socket is used
# if disable it
# export ZENO_DISABLE_SOCK=1

Also change the line in file shell/function/zeno-call-client-and-fallback.

--- a/shell/function/zeno-call-client-and-fallback
+++ b/shell/function/zeno-call-client-and-fallback
@@ -1,6 +1,6 @@
 #autoload
 
-if [[ -n $ZENO_ENABLE_SOCK ]]; then
+if [[ -z $ZENO_DISABLE_SOCK ]]; then
   (( $+functions[zeno-client] )) || zeno-enable-sock
   if [[ -S $ZENO_SOCK ]]; then
     zeno-client "$@"

@@ -1,6 +1,5 @@
#autoload

export ZENO_ENABLE_SOCK=1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing variable.

Suggested change
export ZENO_ENABLE_SOCK=1
unset ZENO_DISABLE_SOCK

Comment on lines +34 to +35
export ZENO_ENABLE_SOCK="${ZENO_ENABLE_SOCK:-1}"
if [[ $ZENO_ENABLE_SOCK == "1" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing variable.

Suggested change
export ZENO_ENABLE_SOCK="${ZENO_ENABLE_SOCK:-1}"
if [[ $ZENO_ENABLE_SOCK == "1" ]]; then
if [[ -z $ZENO_DISABLE_SOCK ]]; then

Also change the following line:

   else
-    unset ZENO_ENABLE_SOCK
+    export ZENO_DISABLE_SOCK=1
   fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants