dotfiles/zsh/makefile
James Patrick 3b54637ca7 Adding basic zsh configuration.
At this point the following doesn't work.

- prompt
- history
- most autocomplete

Additionally with the tmux script getting loaded zplug we are getting a double
render issue, which is increasing the start up time. I'll probably move this
before the .zshrc set to short circuit having to set up all zplug script twice
before having a useable shell.
2019-04-30 23:29:37 -04:00

41 lines
1.0 KiB
Makefile

SRC := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
include ../lib/shared.mk
ZSH_DIR := ~/.zsh
ZPLUG_DIR := ~/.zplug
install: | init update
init:
$(info => Setting up zsh)
ifeq ($(shell [ ! -e $(ZPLUG_DIR) ] $(return_val_truthy) ), true)
export ZPLUG_HOME=$(ZPLUG_DIR) \
; git clone https://github.com/zplug/zplug $ZPLUG_HOME \
; $(report) "zplug installed"
endif
$(mk_link) $(SRC) ~/.zsh
$(mk_link) $(ZSH_DIR)/zshrc ~/.zshrc
$(mk_link) $(ZSH_DIR)/zlogin ~/.zlogin
$(mk_link) $(ZSH_DIR)/zprofile ~/.zprofile
$(mk_link) $(ZSH_DIR)/zshenv ~/.zshenv
update:
ifeq ($(shell [ -e $(ZPLUG_DIR) ] $(return_val_truthy) ), true)
echo "=> Updating zplug"
source $(ZPLUG_DIR)/init.zsh ; zplug install ; zplug update
else
$(report) warn "No zplug install detected. Skipping."
endif
remove:
ifeq ($(shell [ -e $(ZPLUG_DIR) ] $(return_val_truthy) ), true)
$(report) warn "Leaving $(ZPLUG_DIR) directory."
endif
$(info => Removing zsh)
$(rm_link) ~/.zprofile
$(rm_link) ~/.zlogin
$(rm_link) ~/.zshrc
$(rm_link) ~/.zsh
$(rm_link) ~/.zshenv