fix quotes

This commit is contained in:
Dmytro Meleshko 2018-07-04 23:55:45 +03:00
parent 58ac67c492
commit 27d0185cf1
3 changed files with 9 additions and 10 deletions

View File

@ -3,17 +3,17 @@
export LANG="en_US.UTF-8"
export LC_ALL="$LANG"
if [[ -z $USER && -n $USERNAME ]]; then
if [[ -z "$USER" && -n "$USERNAME" ]]; then
export USER="$USERNAME"
fi
export DEFAULT_USER=dmitmel
export DEFAULT_USER="dmitmel"
if [[ -n $SSH_CONNECTION ]]; then
if [[ -n "$SSH_CONNECTION" ]]; then
export EDITOR="rmate"
else
export EDITOR="code --wait"
fi
export CLICOLOR=1
export CLICOLOR="1"
export SDKMAN_DIR="$HOME/.sdkman"

View File

@ -1,11 +1,11 @@
#!/usr/bin/env zsh
is_linux() {
[[ $OSTYPE == linux* ]]
[[ "$OSTYPE" == linux* ]]
}
is_macos() {
[[ $OSTYPE == darwin* ]]
[[ "$OSTYPE" == darwin* ]]
}
command_exists() {
@ -13,7 +13,7 @@ command_exists() {
}
source_if_exists() {
[[ -f $1 ]] && source "$1"
[[ -f "$1" ]] && source "$1"
}
run_before() {

5
zshrc
View File

@ -8,9 +8,8 @@ find_dotfiles_dir() {
[[ -d "$DOTFILES_DIR" ]] && return
done
local script_path
script_path=$(realpath "${(%):-%x}")
DOTFILES_DIR=$(dirname "$script_path")
local script_path="$(realpath "${(%):-%x}")"
DOTFILES_DIR="$(dirname "$script_path")"
}
find_dotfiles_dir