refactor(zsh): improve handling of XDG dirs
This commit is contained in:
parent
b9df79bce9
commit
65f1d3c253
@ -1,13 +1,12 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
configure() {
|
||||
export XDG_CONFIG_HOME="${HOME}/.config"
|
||||
export XDG_CACHE_HOME="${HOME}/.cache"
|
||||
export XDG_BIN_HOME="${HOME}/.local/bin"
|
||||
export XDG_DATA_HOME="${HOME}/.local/share"
|
||||
export XDG_STATE_HOME="${HOME}/.local/state"
|
||||
export XDG_DATA_DIRS="${XDG_DATA_DIRS}:/usr/local/share:/usr/share"
|
||||
export XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS}:/etc/xdg"
|
||||
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||
export XDG_CACHE_HOME="${XDG_CONFIG_HOME:-$HOME/.cache}"
|
||||
export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
|
||||
export XDG_STATE_HOME="${XDG_DATA_HOME:-$HOME/.local/state}"
|
||||
export XDG_DATA_DIRS="${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
|
||||
export XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS:-/etc/xdg}"
|
||||
}
|
||||
|
||||
init() {
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
export SAVEHIST=10000
|
||||
export HISTSIZE=10000
|
||||
export HISTFILE="${XDG_CACHE_HOME:-"$HOME"}/zsh_history"
|
||||
export HISTFILE="${XDG_CACHE_HOME}/zsh_history"
|
||||
setopt INC_APPEND_HISTORY
|
||||
setopt SHARE_HISTORY
|
||||
setopt EXTENDED_HISTORY
|
||||
|
Loading…
Reference in New Issue
Block a user