n-cd.conf 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # Hotlist
  2. # Can use e.g. $ZSH_VERSION, e.g. /usr/share/zsh/$ZSH_VERSION/functions
  3. local -a hotlist
  4. hotlist=(
  5. ~/.config/znt
  6. /usr/share/zsh/site-functions
  7. /usr/share/zsh
  8. /usr/local/share/zsh/site-functions
  9. /usr/local/share/zsh
  10. /usr/local/bin
  11. /usr/lib
  12. )
  13. # Suppress adding (to directory stack) directories visited by n-cd
  14. # Value 0 is the default (directories will be added to dirstack)
  15. local NCD_DONT_PUSHD=0
  16. # How should be current element of the list drawn. Possible values: reverse,
  17. # underline.
  18. # On Linux virtual terminal this will be enforced to reverse (because of poor
  19. # underline support on that terminal). The same for screen/tmux.
  20. local active_text=reverse
  21. # Colorize last segments of the paths
  22. # (#s) is ^, (#e) is $, # is *, ## is + (comparing to regex)
  23. local NLIST_COLORING_PATTERN="[a-zA-Z0-9 ._-]##/#(#e)"
  24. local NLIST_COLORING_COLOR=$'\x1b[00;33m'
  25. # Search keywords, iterated with F2 or Ctrl-X or Ctrl-/
  26. local -a keywords
  27. keywords=( "zsh" "local" "git" )
  28. #
  29. # Zshrc integration. All below variables can
  30. # be set in zshrc and will have precedence
  31. # over config files
  32. #
  33. # 1. znt_cd_hotlist (array)
  34. if (( ${+znt_cd_hotlist} )); then
  35. hotlist=( "${znt_cd_hotlist[@]}" )
  36. fi
  37. # 2. znt_cd_dont_pushd
  38. NCD_DONT_PUSHD=${znt_cd_dont_pushd:-$NCD_DONT_PUSHD}
  39. # 3. znt_cd_active_text
  40. active_text=${znt_cd_active_text:-$active_text}
  41. # 4. znt_cd_nlist_coloring_pattern
  42. NLIST_COLORING_PATTERN=${znt_cd_nlist_coloring_pattern:-$NLIST_COLORING_PATTERN}
  43. # 5. znt_cd_nlist_coloring_color
  44. NLIST_COLORING_COLOR=${znt_cd_nlist_coloring_color:-$NLIST_COLORING_COLOR}
  45. # 6. znt_cd_nlist_coloring_match_multiple
  46. NLIST_COLORING_MATCH_MULTIPLE=${znt_cd_nlist_coloring_match_multiple:-$NLIST_COLORING_MATCH_MULTIPLE}
  47. # 7. znt_cd_keywords (array)
  48. if (( ${+znt_cd_keywords} )); then
  49. keywords=( "${znt_cd_keywords[@]}" )
  50. fi