Commit bec65fb5 authored by Justin Garrison's avatar Justin Garrison 🤷

More shell aliases and functions

parent 2e3d11dd
......@@ -6,9 +6,9 @@ if command -v exa >& /dev/null; then
# show git status in ll
function ll() {
if [ -d .git ] || git rev-parse --git-dir > /dev/null 2>&1 ; then
exa -alFh --git
exa -alFh --git [email protected]
else
exa -alFh
exa -alFh [email protected]
fi
}
ealias la='exa -1a'
......
......@@ -85,3 +85,5 @@ function aws-get-tags() {
--filters "Name=resource-id,Values=${1:$INSTANCE-ID}" "Name=key,Values=${TAG_PREFIX}*" \
--output text
}
alias aws-get-console='aws ec2 get-console-output --output text --latest --instance-id '
......@@ -20,3 +20,20 @@ book(){
LINK=$(echo "${O}" | grep pdf | awk -F "> " '{print $2}')
xdg-open $LINK
}
# this doesn't work but I want it to
# taken from https://unix.stackexchange.com/questions/517674/tab-complete-global-alias-names-not-at-the-beginning-of-a-line/604498#604498
# Whenever a completion is attempted, first run `_galiases`.
#compdef _galiases -first-
#
#_galiases() {
# # Get access to the `galiases` hash table.
# zmodload -i zsh/parameter
#
# # Add the completions to the `aliases` group.
# local expl
# _description aliases expl 'alias'
#
# # Add the keys from `galiases` as the actual completions.
# compadd "$expl[@]" -Q -k galiases
#}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment