Add base configuration
- Follow XDG standard: ~/.config and ~/.local folders - Set environment variables and define aliases within ~/.config/shell - Add installation script for easy setup and maintenance (i.e., `dotfiles-install` and `dotfiles-update`) - Add README.md with info on the installation and general notes
This commit is contained in:
commit
a89c4955c5
13 changed files with 583 additions and 0 deletions
55
.config/shell/aliases
Normal file
55
.config/shell/aliases
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Aliases used in all kinds of shells
|
||||
|
||||
|
||||
# Manage the bare `git` repository in ~/ holding the dotfiles
|
||||
alias dotfiles='git --git-dir=$DOTFILES_DIR --work-tree=$HOME'
|
||||
|
||||
|
||||
|
||||
alias path='echo $PATH | tr ":" "\n"'
|
||||
|
||||
|
||||
# Easier `cd` movements
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
alias ....='cd ../../..'
|
||||
alias .....='cd ../../../..'
|
||||
|
||||
|
||||
# Use human-readable sizes
|
||||
alias df='df --human-readable'
|
||||
alias du='du --human-readable'
|
||||
alias free='free --human'
|
||||
|
||||
|
||||
# Make the terminal more colorful
|
||||
|
||||
alias diff='diff --color=auto'
|
||||
alias grep='grep --color=auto --exclude-dir=.git'
|
||||
alias ip='ip -color=auto'
|
||||
|
||||
if _command_exists dircolors; then
|
||||
|
||||
# Compute `$LS_COLORS` only once because this file is also sourced
|
||||
# by every non-interactive `bash` via `$BASH_ENV` (e.g., ":!cmd" in `vi`)
|
||||
if [ -z "${LS_COLORS:-}" ]; then
|
||||
if [ -r "$XDG_CONFIG_HOME/dircolors" ]; then
|
||||
eval "$(dircolors -b "$XDG_CONFIG_HOME/dircolors")"
|
||||
else
|
||||
eval "$(dircolors -b)"
|
||||
fi
|
||||
fi
|
||||
|
||||
alias ls='ls --color=auto'
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# Add common `ls` utilities
|
||||
alias l='ls --classify --format=vertical'
|
||||
alias la='ls --classify --format=vertical --almost-all'
|
||||
alias lal='ls --classify --format=long --almost-all'
|
||||
alias ll='ls --classify --format=long'
|
||||
alias lla='lal'
|
||||
Loading…
Reference in a new issue