Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filesystem Tools #5

Draft
wants to merge 11 commits into
base: develop
Choose a base branch
from
16 changes: 16 additions & 0 deletions aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,26 @@ alias git-current-branch='git rev-parse --abbrev-ref HEAD';
alias git-current-commit='git rev-parse --verify --short HEAD';
alias git-current-tag='git fetch --tags --force --quiet && git describe --tags 2> /dev/null';
alias git-reset='git reset --hard origin/$(git-current-branch)';
alias git-clean='git clean -df';
alias git-clean-local-branches='git fetch --prune --quiet && git branch -vv | grep -v "^\*" | grep "\[.*: gone\]" | cut -d " " -f 3 | xargs git branch --delete';
alias git-force-pull='git fetch --force && git pull --force';
alias git-global-ignore='git config --global core.excludesfile "~/utils/gitignore"';

alias sf-cs-fix='php-cs-fixer fix --rules=@Symfony';

alias mv-ln='function _mv_ln { mv $1 $2 && ln -s $2 $1; }; _mv_ln';
alias cpd='function _cpd { mkdir -p ${@: -1} && cp $@; }; _cpd';
alias mvd='function _mvd { mkdir -p ${@: -1} && mv $@; }; _mvd';
alias gz='gzip --keep';

if [ 'Darwin' = `uname` ]; then
# Mac OS X
alias lsd='ls -GhalF@';
else
alias lsd='ls -halF --color';
fi;
alias grep='grep --color=auto';
alias grepc='grep --color=always';
alias less='less --RAW-CONTROL-CHARS';
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
alias less='less --RAW-CONTROL-CHARS';
alias less='less --RAW-CONTROL-CHARS';
alias jql='jq --color-output | less --RAW-CONTROL-CHARS';


alias calc='bc -l <<< ';