-
Notifications
You must be signed in to change notification settings - Fork 35
Description
I've just installed Antidote on a headless Mini PC and I'm pretty sure I've set it up properly according to the instructions. However, my custom dotfiles (especially aliases) are not getting loaded despite being added to the end of the .zshrc file. It's kinda like .zshrc isn't even getting called when I SSH into the system. Let me explain.
Here's my current .zshrc after installing Antidote and adding two lines that call custom dotfiles. The first of those two added lines shouldn't do anything, since /etc/zsh/.zshrc.local doesn't exist. The second one is what triggers .aliases, which I can tell isn't getting called:
# Set up the prompt
autoload -Uz promptinit
promptinit
prompt adam1
setopt histignorealldups sharehistory
# Use emacs keybindings even if our EDITOR is set to vi
bindkey -e
# Keep 1000 lines of history within the shell and save it to ~/.zsh_history:
HISTSIZE=1000
SAVEHIST=1000
HISTFILE=~/.zsh_history
# Use modern completion system
autoload -Uz compinit
compinit
zstyle ':completion:*' auto-description 'specify: %d'
zstyle ':completion:*' completer _expand _complete _correct _approximate
zstyle ':completion:*' format 'Completing %d'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' menu select=2
eval "$(dircolors -b)"
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
zstyle ':completion:*' menu select=long
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle ':completion:*' use-compctl false
zstyle ':completion:*' verbose true
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
source ${ZDOTDIR:-~}/.antidote
antidote load
# user configs
[[ -r /etc/zsh/zshrc.local ]] && source /etc/zsh/zshrc.local
[[ -r "$HOME/.zshrc.local" ]] && source "$HOME/.zshrc.local"In the .zshrc.local file:
# Load aliases if they exist.
[ -f "$HOME/.aliases" ] && source "$HOME/.aliases"
# Load SSH keys
if [ -z "$SSH_AUTH_SOCK" ] ; then
eval `ssh-agent -s`
ssh-add
fiThe ssh-agent is enough to tell whether or not .zshrc.local is being loaded, but I also have another method. My .aliases file is rather long, but here are the aliases in it that I'm using that also tell me whether or not .zshrc.local is being loaded:
# This set assumes lsd is installed: https://github.com/Peltoche/lsd
alias ll='lsd -la --group-directories-first'
alias l='lsd -l --group-directories-first'
alias la='lsd -lA --group-directories-first'So, after SSH-ing into the server, this is what I am greeted with and the result of attempting to run the ll alias, which should give me a colorful LSD version of ls:
However, after sourcing .zshrc manually, everything is loaded, but I get some strange results:
- I get an error message about 'menuselect' that appears to be a result of installing Antidote. Why?
ssh-agentis getting loaded, proving that.zshrc.localis getting called. Why wasn't it called when I logged in?- What is this strange prompt with a percent sign? It only appears once after sourcing
.zshrc, but it shouldn't appear at all. - My
llalias is finally working, using LSD. - After running a command (or just pressing ), the correct prompt returns.
So there are multiple things wrong (error message, strange prompt, not calling .zshrc.local). What can I do about this?

