From 1e148ed75ef7aa8435e38b095a7aa22a5ed093f8 Mon Sep 17 00:00:00 2001 From: Aaron Johnson Date: Sun, 26 Aug 2018 17:54:53 -0500 Subject: [PATCH] Added toggle for auto cd feature --- example_configs/zsh.conf | 1 + setopt | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/example_configs/zsh.conf b/example_configs/zsh.conf index 6d756d9..b23fc15 100644 --- a/example_configs/zsh.conf +++ b/example_configs/zsh.conf @@ -1,6 +1,7 @@ # ZSH Configuration BSD_MODE=false #Some options must be specified differently in BSD SYNTAX_HIGHLIGHT=true #On-the-fly syntax highlighting of commands that you type +AUTO_CD=true #When true, if only a directory path is entered, you will cd to the directory # Prompt Style PROMPT_STYLE=bsd #Valid options: bsd, bsd2, ar5 diff --git a/setopt b/setopt index ced2288..a45f54c 100644 --- a/setopt +++ b/setopt @@ -2,7 +2,10 @@ autoload -U compinit promptinit autoload -U colors && colors compinit -d ${HOME}/.cache/.zcompdump promptinit -setopt autocd +if [ $AUTO_CD = true ] +then + setopt autocd +fi unsetopt beep setopt HIST_IGNORE_SPACE if [ $COMPLETION_STYLE = bash ]