Add the base zsh config.
This commit is contained in:
parent
207c7c2f71
commit
ba1d4fb9d9
@ -1,2 +1,6 @@
|
||||
[defaults]
|
||||
pipelining = True
|
||||
# Need to allow world readable tmpfiles for switching to an
|
||||
# unprivileged user other than the connection user because the setfacl
|
||||
# command fails on ZFS on FreeBSD.
|
||||
allow_world_readable_tmpfiles = True
|
||||
|
1
ansible/roles/zsh/defaults/main.yaml
Normal file
1
ansible/roles/zsh/defaults/main.yaml
Normal file
@ -0,0 +1 @@
|
||||
additional_zshrc_files: []
|
40
ansible/roles/zsh/files/zshrc
Normal file
40
ansible/roles/zsh/files/zshrc
Normal file
@ -0,0 +1,40 @@
|
||||
# Lines configured by zsh-newuser-install
|
||||
HISTFILE=~/.zhistory
|
||||
HISTSIZE=100000
|
||||
SAVEHIST=100000
|
||||
setopt appendhistory notify
|
||||
unsetopt beep
|
||||
bindkey -e
|
||||
# End of lines configured by zsh-newuser-install
|
||||
# The following lines were added by compinstall
|
||||
#
|
||||
|
||||
# Use menu complete immediately instead of after the first tab
|
||||
setopt MENU_COMPLETE
|
||||
|
||||
zstyle :compinstall filename "$HOME/.zshrc"
|
||||
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
# End of lines added by compinstall
|
||||
|
||||
# Enable the 2d menu for tab completion
|
||||
zstyle ':completion:*' menu select
|
||||
|
||||
autoload colors zsh/terminfo
|
||||
if [[ "$terminfo[colors]" -ge 8 ]]; then
|
||||
colors
|
||||
fi
|
||||
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
|
||||
eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
|
||||
eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
|
||||
(( count = $count + 1 ))
|
||||
done
|
||||
PR_NO_COLOR="%{$terminfo[sgr0]%}"
|
||||
PS1="[$PR_BLUE%n$PR_WHITE@$PR_GREEN%U%m%u$PR_NO_COLOR:$PR_RED%2c$PR_NO_COLOR]%(!.#.$) "
|
||||
|
||||
source $HOME/.ansible_deploy/zsh-histdb/sqlite-history.zsh
|
||||
autoload -Uz add-zsh-hook
|
||||
|
||||
source $HOME/.ansible_deploy/zsh-histdb/histdb-interactive.zsh
|
||||
bindkey '^r' _histdb-isearch
|
@ -1,33 +1,34 @@
|
||||
- include_role:
|
||||
name: per_user
|
||||
# - name: clone zsh-histdb repo
|
||||
# git:
|
||||
# repo: "https://github.com/larkery/zsh-histdb.git"
|
||||
# dest: "{{ account_homedir.stdout }}/.ansible_deploy/zsh-histdb"
|
||||
# version: "6c7159be9de8586ac2f19d179d562cf5d10a2bab"
|
||||
# diff: false
|
||||
|
||||
# - name: Create zshrc additional imports directory
|
||||
# file:
|
||||
# name: "{{ account_homedir.stdout }}/.ansible_deploy/zshrc"
|
||||
# state: directory
|
||||
# mode: 0700
|
||||
# owner: "{{ account_name.stdout }}"
|
||||
# group: "{{ group_name.stdout }}"
|
||||
- name: clone zsh-histdb repo
|
||||
git:
|
||||
repo: "https://github.com/larkery/zsh-histdb.git"
|
||||
dest: "{{ account_homedir.stdout }}/.ansible_deploy/zsh-histdb"
|
||||
version: "6c7159be9de8586ac2f19d179d562cf5d10a2bab"
|
||||
diff: false
|
||||
|
||||
# - name: Configure zshrc additional imports
|
||||
# copy:
|
||||
# src: "files/zshrc_{{ item }}"
|
||||
# dest: "{{ account_homedir.stdout }}/.ansible_deploy/zshrc/{{ item }}.zsh"
|
||||
# mode: 0600
|
||||
# owner: "{{ account_name.stdout }}"
|
||||
# group: "{{ group_name.stdout }}"
|
||||
# with_items: "{{ additional_zshrc_files }}"
|
||||
- name: Create zshrc additional imports directory
|
||||
file:
|
||||
name: "{{ account_homedir.stdout }}/.ansible_deploy/zshrc"
|
||||
state: directory
|
||||
mode: 0700
|
||||
owner: "{{ account_name.stdout }}"
|
||||
group: "{{ group_name.stdout }}"
|
||||
|
||||
# - name: Configure zshrc
|
||||
# copy:
|
||||
# src: files/zshrc
|
||||
# dest: "{{ account_homedir.stdout }}/.zshrc"
|
||||
# mode: 0600
|
||||
# owner: "{{ account_name.stdout }}"
|
||||
# group: "{{ group_name.stdout }}"
|
||||
- name: Configure zshrc additional imports
|
||||
copy:
|
||||
src: "files/zshrc_{{ item }}"
|
||||
dest: "{{ account_homedir.stdout }}/.ansible_deploy/zshrc/{{ item }}.zsh"
|
||||
mode: 0600
|
||||
owner: "{{ account_name.stdout }}"
|
||||
group: "{{ group_name.stdout }}"
|
||||
loop: "{{ additional_zshrc_files }}"
|
||||
|
||||
- name: Configure zshrc
|
||||
copy:
|
||||
src: files/zshrc
|
||||
dest: "{{ account_homedir.stdout }}/.zshrc"
|
||||
mode: 0600
|
||||
owner: "{{ account_name.stdout }}"
|
||||
group: "{{ group_name.stdout }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user