opts.zsh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # History Config
  2. setopt interactivecomments
  3. setopt EXTENDED_HISTORY
  4. setopt HIST_EXPIRE_DUPS_FIRST
  5. setopt HIST_IGNORE_DUPS
  6. setopt HIST_IGNORE_ALL_DUPS
  7. setopt HIST_IGNORE_SPACE
  8. setopt HIST_FIND_NO_DUPS
  9. setopt HIST_SAVE_NO_DUPS
  10. setopt HIST_BEEP
  11. setopt INC_APPEND_HISTORY
  12. setopt HIST_FCNTL_LOCK
  13. setopt SHARE_HISTORY
  14. setopt AUTO_CD
  15. # History file configuration - per host
  16. HISTORY_IGNORE='(*.git/hooks*)'
  17. LESSHISTFILE="-"
  18. HISTFILE="$ZDOTDIR/zsh_history_$HOST"
  19. HISTFILESIZE=100000
  20. HISTSIZE=100000
  21. SAVEHIST=100000
  22. # Ensure history file exists and has proper permissions
  23. if [[ ! -f "$HISTFILE" ]]; then
  24. touch "$HISTFILE"
  25. chmod 644 "$HISTFILE" # More permissive permissions
  26. fi
  27. # AWS Vault configuration
  28. export AWS_VAULT_PL_MFA=inline
  29. export AWS_VAULT_PL_CHAR="󰅟 "
  30. prompt_aws_vault() {
  31. local vault_segment
  32. vault_segment="`prompt_aws_vault_segment`"
  33. if [[ $vault_segment != '' ]]; then
  34. echo -n " %F{yellow}$vault_segment%f"
  35. fi
  36. }
  37. MNML_INFOLN=()
  38. MNML_PROMPT=( mnml_ssh mnml_status 'mnml_cwd 2 0' mnml_git prompt_aws_vault mnml_keymap )
  39. MNML_RPROMPT=()
  40. MNML_NORMAL_CHAR="◉"