.dots/zsh/zprofile
2024-08-28 15:22:02 +02:00

71 lines
1.4 KiB
Bash
Executable file

#!/usr/bin/env zsh
# author: Daniel Sommer <daniel.sommer@velvettear.de>
# license: MIT
# export environment variables
# set .dots directory
export VELVETTEAR_DOTS="$HOME/.dots"
# set prompt
export PROMPT="%(!.%F{red}.)%n@%m > %/%(!.#.$) %f"
# set general variables
export USER="$(whoami)"
export HOST="$(hostname)"
export HOSTNAME="$HOST"
export TMP="/tmp"
export TEMP="/tmp"
export TMPDIR="/tmp"
# set nvim as default editor
export EDITOR="nvim"
export VISUAL="nvim"
export PAGER="less"
# configure the shell history
export HISTFILE="$HOME/.zhistory"
export SAVEHIST="100"
export HISTSIZE="10000"
export HISTTIMEFORMAT="%d.%m.%Y %H:%M:%S"
export HISTCONTROL="ignoredups"
# set all kinds of aliases
# file and directory listings
alias ls="ls --color=auto"
alias la="ls -a --color=auto"
alias ll="ls -l --color=auto"
alias lla="ls -la --color=auto"
# grep
alias grep="grep --color=auto"
alias fgrep="fgrep --color=auto"
alias egrep="egrep --color=auto"
# diff
alias diff="diff --color=auto"
# tar
alias tarp="tar -I pigz -cf -v"
alias untarp="tar -I pigz -xf"
# general
alias ..="cd .."
alias whereami="realpath ."
alias c="clear"
# create / delete / copy / move
alias rmr="rm -r"
alias rmrf="rm -rf"
alias cpr="cp -R"
alias cprf="cp -Rf"
alias mkdirp="mkdir -p"
# applications
alias vi="nvim"
alias vim="nvim"
# scripts
alias update="sudo $VELVETTEAR_DOTS/scripts/update.sh"