ZSH: Updated config
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
## Load config files in $ZSH/lib that for stage 3
|
||||
for config_file (${ZLIBDIR}/30-*.zsh) source $config_file
|
||||
unset config_file
|
||||
|
||||
## Compile startup files
|
||||
zwcautocompile
|
||||
|
||||
@@ -2,3 +2,4 @@
|
||||
|
||||
# Load config files in $ZSH/lib that for stage 2
|
||||
for config_file (${ZLIBDIR}/20-*.zsh) source $config_file
|
||||
unset config_file
|
||||
|
||||
@@ -10,12 +10,12 @@ function dc() {
|
||||
# Save current working directory
|
||||
CURRENT_DIR="${PWD}"
|
||||
|
||||
for file in $(find ${PWD} -maxdepth 2 -type f -regextype posix-extended -regex '.*(docker-compose|compose)\.ya?ml' | sort); do
|
||||
cd $(dirname "$file")
|
||||
docker compose $@
|
||||
for file in $(find "${PWD}" -maxdepth 2 -type f \( -name "docker-compose.yml" -o -name "docker-compose.yaml" -o -name "compose.yml" -o -name "compose.yaml" \) | sort); do
|
||||
cd "$(dirname "$file")"
|
||||
docker compose "$@"
|
||||
done
|
||||
|
||||
# Change back to saved working directory
|
||||
cd ${CURRENT_DIR}
|
||||
cd "${CURRENT_DIR}"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ function extract() {
|
||||
echo " extract <path/file_name_1.ext> [path/file_name_2.ext] [path/file_name_3.ext]"
|
||||
return 1
|
||||
else
|
||||
for n in $@; do
|
||||
for n in "$@"; do
|
||||
if [ -f "$n" ]; then
|
||||
case "${n%,}" in
|
||||
*.tar.bz2 | *.tar.gz | *.tar.xz | *.tbz2 | *.tgz | *.txz | *.tar)
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
function zwcautocompile() {
|
||||
autoload -Uz zrecompile
|
||||
|
||||
for f in $(find ${ZDOTDIR} -maxdepth 3 -type f \( -name "*.zsh" -o -name ".zlogin" -o -name ".zshrc" \) ! -name "*.zwc" ! -name "*.zwc.old"); do
|
||||
zrecompile -pq ${f} && rm -f ${f}.zwc.old
|
||||
for f in $(find "${ZDOTDIR}" -maxdepth 3 -type f \( -name "*.zsh" -o -name ".zlogin" -o -name ".zshrc" \) ! -name "*.zwc" ! -name "*.zwc.old"); do
|
||||
zrecompile -pq "${f}" && rm -f "${f}.zwc.old"
|
||||
done
|
||||
|
||||
if [[ -d ${ZAUTOLOADDIR} ]]; then
|
||||
for f in ${ZAUTOLOADDIR}/*; do
|
||||
zrecompile -pq ${f} && rm -f ${f}.zwc.old
|
||||
if [[ -d "${ZAUTOLOADDIR}" ]]; then
|
||||
for f in "${ZAUTOLOADDIR}"/*; do
|
||||
zrecompile -pq "${f}" && rm -f "${f}.zwc.old"
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ -d ${ZLIBDIR} ]]; then
|
||||
for f in ${ZLIBDIR}/*; do
|
||||
zrecompile -pq ${f} && rm -f ${f}.zwc.old
|
||||
if [[ -d "${ZLIBDIR}" ]]; then
|
||||
for f in "${ZLIBDIR}"/*; do
|
||||
zrecompile -pq "${f}" && rm -f "${f}.zwc.old"
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
function zwcpurge() {
|
||||
autoload -Uz zrecompile
|
||||
for zsh_file in $(find ${ZDOTDIR} -maxdepth 3 -type f \( -name "*.zwc" -o -name "*.zwc.old" \)); do
|
||||
rm -f ${zsh_file}
|
||||
for zsh_file in $(find "${ZDOTDIR}" -maxdepth 3 -type f \( -name "*.zwc" -o -name "*.zwc.old" \)); do
|
||||
rm -f "${zsh_file}"
|
||||
done
|
||||
}
|
||||
|
||||
@@ -18,25 +18,20 @@ fi
|
||||
if ! _exists fetch; then
|
||||
if _exists curl; then
|
||||
alias fetch="curl -O"
|
||||
elif _exists curl; then
|
||||
elif _exists wget; then
|
||||
alias fetch="wget"
|
||||
else
|
||||
echo "fetch not found."
|
||||
fi
|
||||
fi
|
||||
|
||||
# htop
|
||||
if _exists htop; then
|
||||
alias htop="sudo htop"
|
||||
fi
|
||||
|
||||
unfunction _exists
|
||||
|
||||
alias mkdir="mkdir -p"
|
||||
alias ..="cd .."
|
||||
alias ...="cd ../.."
|
||||
alias ....="cd ../../.."
|
||||
alias google="ping -c 10240000 google.com"
|
||||
alias google="ping google.com"
|
||||
alias history="history -i"
|
||||
|
||||
case `uname` in
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
if [[ -d "${ZAUTOLOADDIR}" ]]; then
|
||||
|
||||
fpath=($fpath ${ZAUTOLOADDIR})
|
||||
fpath=(${ZAUTOLOADDIR} $fpath)
|
||||
|
||||
# Load functions
|
||||
for func in ${ZAUTOLOADDIR}/*; do
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
## Command history configuration
|
||||
export HISTFILE="${ZCACHE}/history"
|
||||
export HISTSIZE=1000000000
|
||||
export HISTSIZE=1000000
|
||||
export SAVEHIST=${HISTSIZE}
|
||||
export HISTORY_IGNORE="([bf]g *|disown|cd ..|cd -)"
|
||||
|
||||
export HISTTIMEFORMAT="[%F %T] "
|
||||
setopt INC_APPEND_HISTORY
|
||||
setopt EXTENDED_HISTORY
|
||||
setopt SHARE_HISTORY
|
||||
setopt HIST_FIND_NO_DUPS
|
||||
setopt hist_ignore_dups
|
||||
setopt hist_verify
|
||||
setopt incappendhistory
|
||||
setopt histignorespace
|
||||
setopt histnostore
|
||||
setopt share_history
|
||||
setopt HIST_IGNORE_DUPS
|
||||
setopt HIST_VERIFY
|
||||
setopt HIST_IGNORE_SPACE
|
||||
setopt HIST_NO_STORE
|
||||
@@ -10,7 +10,7 @@ setopt long_list_jobs
|
||||
|
||||
## pager
|
||||
export LC_CTYPE=$LANG
|
||||
export LC_ALL=de_DE.UTF-8
|
||||
export LANG=de_DE.UTF-8
|
||||
export IOCAGE_COLOR=TRUE
|
||||
|
||||
## Set some app specific dirs with XDM scheme
|
||||
|
||||
@@ -20,11 +20,11 @@ if [[ "$OSTYPE" == darwin* ]]; then
|
||||
else
|
||||
# Linux/BSD: Start ssh-agent if not running
|
||||
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
|
||||
ssh-agent -t 1h > "$HOME/.ssh-agent.env"
|
||||
( umask 077; ssh-agent -t 1h > "$HOME/.ssh-agent.env" )
|
||||
fi
|
||||
|
||||
# Source ssh-agent environment
|
||||
if [[ ! -S ~/.ssh/ssh_auth_sock && -f "$HOME/.ssh-agent.env" ]]; then
|
||||
if [[ ! -S "$SSH_AUTH_SOCK" && -f "$HOME/.ssh-agent.env" ]]; then
|
||||
source "$HOME/.ssh-agent.env" >/dev/null
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# get zsh_unplugged and store it with your other plugins
|
||||
if [[ ! -d ${ZPLUGINDIR}/zsh_unplugged ]]; then
|
||||
git clone --quiet https://github.com/mattmc3/zsh_unplugged ${ZPLUGINDIR}/zsh_unplugged
|
||||
git clone --quiet --depth 1 https://github.com/mattmc3/zsh_unplugged ${ZPLUGINDIR}/zsh_unplugged
|
||||
fi
|
||||
source ${ZPLUGINDIR}/zsh_unplugged/zsh_unplugged.zsh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user