diff --git a/bin/autojump.bash b/bin/autojump.bash index a7c8fdd..379e529 100644 --- a/bin/autojump.bash +++ b/bin/autojump.bash @@ -61,11 +61,11 @@ j() { output="$(autojump ${@})" if [[ -d "${output}" ]]; then - if [ -t 1 ]; then # if stdout is a terminal, use colors - echo -e "\\033[31m${output}\\033[0m" - else - echo -e "${output}" - fi + if [ -t 1 ]; then # if stdout is a terminal, use colors + echo -e "\\033[31m${output}\\033[0m" + else + echo -e "${output}" + fi cd "${output}" else echo "autojump: directory '${@}' not found" diff --git a/bin/autojump.zsh b/bin/autojump.zsh index 25d50ee..92c31d7 100644 --- a/bin/autojump.zsh +++ b/bin/autojump.zsh @@ -52,11 +52,11 @@ j() { setopt localoptions noautonamedirs local output="$(autojump ${@})" if [[ -d "${output}" ]]; then - if [ -t 1 ]; then # if stdout is a terminal, use colors - echo -e "\\033[31m${output}\\033[0m" - else - echo -e "${output}" - fi + if [ -t 1 ]; then # if stdout is a terminal, use colors + echo -e "\\033[31m${output}\\033[0m" + else + echo -e "${output}" + fi cd "${output}" else echo "autojump: directory '${@}' not found"