From 1957058cf21e672302d264fdc072419be5788b87 Mon Sep 17 00:00:00 2001 From: MorganGeek Date: Thu, 23 Jul 2020 09:20:17 +0200 Subject: [PATCH] aliases for some recurrent commands --- dot_aliases/files.sh | 3 ++- dot_aliases/git.sh | 1 + dot_aliases/misc.sh | 5 +++++ dot_zshrc | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dot_aliases/files.sh b/dot_aliases/files.sh index 200fcc2..59a9ec1 100755 --- a/dot_aliases/files.sh +++ b/dot_aliases/files.sh @@ -14,7 +14,8 @@ alias ctrl-c='pbcopy' alias s=ls alias sl=ll alias ls='lsd' -alias lsg='ll | grip' # show me files matching "ls grep" +alias lsg='ll | grip' # show me files matching "ls grep" +alias ltr='ls -latr' alias lh='ls -alt | head' # see the last modified files alias tree='ls --almost-all --tree -I .git' alias x='extract' diff --git a/dot_aliases/git.sh b/dot_aliases/git.sh index fe75072..65f097f 100755 --- a/dot_aliases/git.sh +++ b/dot_aliases/git.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash alias commit='gc' +alias gpa='git add -p .' alias gcls='git clone --depth 1 --recurse-submodules' alias gpar='gitpushallremote' alias gpcr='gitpushcurrentremote' diff --git a/dot_aliases/misc.sh b/dot_aliases/misc.sh index 4255cc1..6111042 100755 --- a/dot_aliases/misc.sh +++ b/dot_aliases/misc.sh @@ -7,6 +7,11 @@ alias bash="/usr/local/bin/bash" #alias date="gdate" alias away='moro break 10 && coffee' alias afk='away' + +# Protect the / directory - via https://github.com/JanEbbing/mytoolbox/blob/5440831fbd0d1575e595d931d4d35be187cf736e/.bash_aliases +alias chown='gchown --preserve-root' +alias chmod='gchmod --preserve-root' +alias chgrp='gchgrp --preserve-root' alias current_year='`echo date +"%Y"`' alias headers='curl -I --compress' # Find out if remote server supports gzip / mod_deflate or not # alias https='http --default-scheme=https' # useful alias stealed from a colleague. http is provided by httpie diff --git a/dot_zshrc b/dot_zshrc index ba78e3a..360edfb 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -137,6 +137,8 @@ export GIT_PERSONAL_USER="" export GIT_PRO_EMAIL="" export GIT_PRO_USER="" +source "$HOME/Code/dotfiles/dot_aliases/misc.sh" + if test -f "$HOME/.scripts/secrets.sh"; then chmod +x "$HOME/.scripts/secrets.sh" source "$HOME/.scripts/secrets.sh"