removed cd becouse it doesnt work

This commit is contained in:
pika 2024-09-12 19:50:05 +02:00
parent 9ef2b68dfe
commit e6509a1240
2 changed files with 49 additions and 4 deletions

48
.zsh/custom/256color.zsh Normal file
View file

@ -0,0 +1,48 @@
# Copyright (c) 2014-2019, Christian Ludwig
#
# Set 256color terminal mode if available.
_zsh_256color_debug() {
[[ -n "${ZSH_256COLOR_DEBUG}" ]] && echo "zsh-256color: $@" >&2
}
_zsh_terminal_set_256color() {
if [[ "$TERM" =~ "-256color$" ]]; then
_zsh_256color_debug "256 color terminal already set."
return
fi
local TERM256="${TERM}-256color"
# Use (n-)curses binaries, if installed.
if [[ -x "$(which toe)" ]]; then
if toe -a | grep -E "^$TERM256" >/dev/null; then
_zsh_256color_debug "Found $TERM256 from (n-)curses binaries."
export TERM="$TERM256"
return
fi
fi
# Search through termcap descriptions, if binaries are not installed.
for termcaps in $TERMCAP "$HOME/.termcap" "/etc/termcap" "/etc/termcap.small"; do
if [[ -e "$termcaps" ]] && grep -E -q "(^$TERM256|\|$TERM256)\|" "$termcaps"; then
_zsh_256color_debug "Found $TERM256 from $termcaps."
export TERM="$TERM256"
return
fi
done
# Search through terminfo descriptions, if binaries are not installed.
for terminfos in $TERMINFO "$HOME/.terminfo" "/etc/terminfo" "/lib/terminfo" "/usr/share/terminfo"; do
if [[ -e "$terminfos"/$TERM[1]/"$TERM256" ||
-e "$terminfos"/"$TERM256" ]]; then
_zsh_256color_debug "Found $TERM256 from $terminfos."
export TERM="$TERM256"
return
fi
done
}
_zsh_terminal_set_256color
unset -f _zsh_terminal_set_256color
unset -f _zsh_256color_debug

5
.zshrc
View file

@ -74,6 +74,7 @@ _init (){
fi
if command_exists zoxide; then
eval "$(zoxide init zsh)"
eval "$(zoxide init zsh --cmd cd)"
fi
# ─< environment variables for zsh >──────────────────────────────────────────────────────
@ -145,25 +146,21 @@ _alias(){
alias l="exa --long --no-filesize --no-permissions --no-time --git --colour-scale --icons"
alias ll="exa --all --long --no-filesize --no-permissions --no-time --git --colour-scale --icons"
alias tree="exa --icons -l --tree"
alias cd="cd $1 && exa --icons"
elif command_exists lsd; then
alias ls="lsd -l -1 -h1 --almost-all --git"
alias l="lsd -1"
alias ll="lsd -1 --almost-all"
alias clearl="command clear && l"
alias tree="lsd --tree"
alias cd="cd $1 && lsd"
elif command_exists eza; then
alias ls="eza --icons --long --git"
alias l="eza --icons -l"
alias ll="eza --icons -laa"
alias tree="eza --icons -l --tree"
alias cd="cd $1 && eza --icons"
else
alias ls="ls --color=always -lAph"
alias l="ls --color=always -lph -w1"
alias ll="ls --color=always -lph"
alias cd="cd $1 && ls --color=always"
fi
# ─< t stands for tmux >────────────────────────────────────────────────────────────────────