2021-11-11 23:01:00 +00:00
|
|
|
PROMPT=$'\n'"%B%F{green}%n%f %F{blue}%~%f%b"$'\n'"λ "
|
|
|
|
|
2021-11-12 21:44:09 +00:00
|
|
|
alias ls='/bin/ls --color=auto -F --group-directories-first'
|
|
|
|
alias ll='ls -l'
|
|
|
|
alias l='ls -lA'
|
2021-11-11 23:01:00 +00:00
|
|
|
|
|
|
|
extract () {
|
|
|
|
if [ -f $1 ] ; then
|
|
|
|
filename=$(basename -- "$1")
|
|
|
|
filename="${filename%.*}"
|
|
|
|
target="${2-"./$filename"}"
|
|
|
|
|
|
|
|
case $1 in
|
|
|
|
*.tar.bz2) tar xvjf $1 -C "$target" ;;
|
|
|
|
*.tar.gz) tar xvzf $1 -C "$target" ;;
|
|
|
|
*.tar.xz) tar xJf $1 -C "$target" ;;
|
|
|
|
*.bz2) bunzip2 $1 ;;
|
|
|
|
*.rar) rar x $1 "$target" ;;
|
|
|
|
*.gz) gunzip $1 ;;
|
|
|
|
*.tar) tar xvf $1 -C "$target" ;;
|
|
|
|
*.tbz2) tar xvjf $1 -C "$target" ;;
|
|
|
|
*.tgz) tar xvzf $1 -C "$target" ;;
|
|
|
|
*.zip) unzip $1 -d "$target" ;;
|
|
|
|
*.Z) uncompress $1 ;;
|
|
|
|
*.7z) 7z x $1 -o"$target" ;;
|
|
|
|
*) echo "don't know how to extract '$1'..." ;;
|
|
|
|
esac
|
|
|
|
else
|
|
|
|
echo "'$1' is not a valid file!"
|
|
|
|
fi
|
|
|
|
}
|
2021-11-13 00:33:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Cycle through history based on characters already typed on the line
|
|
|
|
autoload -U up-line-or-beginning-search
|
|
|
|
autoload -U down-line-or-beginning-search
|
|
|
|
zle -N up-line-or-beginning-search
|
|
|
|
zle -N down-line-or-beginning-search
|
|
|
|
bindkey "$key[Up]" up-line-or-beginning-search
|
|
|
|
bindkey "$key[Down]" down-line-or-beginning-search
|