Using an alias is something very common for everyone that works with the terminal.
Most people decide to create their alias names on the fly from intuition.
This creates aliases like gc
which is mapped to git commit
.
My brain does not work like this.
Now i have infinite possibilities to create aliases and no measure if there are useful.
This is why i created the rule, that useful shortcuts have only one letter.
Then you have a personalized map of 24 aliases for your absolut essentials.
My rule created a new problem.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run git status if you are in an repository, but no another command is supplied | |
function g() { | |
if git rev-parse --git-dir > /dev/null 2>&1; then | |
if [ $# -eq 0 ]; then | |
git status | |
return | |
fi | |
fi | |
git $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Give your checking syntax a meaningful name | |
# You may enjoy onMacos more, don't judge me | |
onmacOS() { | |
[[ ${OSTYPE} == darwin* ]] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl | |
github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg= | |
github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export XDG_VIM_HOME=${XDG_CONFIG_HOME}/vim | |
export ENV_VIMRC=${XDG_VIM_HOME}/vimrc # remember that place for later | |
export VIMINIT='let $MYVIMRC="$ENV_VIMRC" | source $MYVIMRC' # the magic line | |
# you need an additional line for gvim | |
# look at https://wiki.archlinux.org/title/Vim#Workaround_for_XDG_Base_Directory_specification |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BREW_INSTALL_PATH=/opt/homebrew # no export, because this is not needed in sub shells | |
if [ -d ${BREW_INSTALL_PATH} ]; then | |
# brew is installed - safe to load into path | |
eval "$(${BREW_INSTALL_PATH}/bin/brew shellenv)" | |
export HOMEBREW_NO_ENV_HINTS=1 # hints are clutter | |
export HOMEBREW_NO_ANALYTICS=1 # sorry | |
alias b=brew # simple alias |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Improved from the Symfony Conf example | |
help: ## This comment creates ouput | |
@grep -E '(^[a-zA-Z_]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | sed 's/[^:]*\(:.*\)/\1/' | cut -c 1 --complement | awk 'BEGIN {FS = ":.*?## "}{printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/' | |
build: ## Build your application | |
include submakefile | |
# --- Example output --- |