Skip to content

Instantly share code, notes, and snippets.

@victorabraham
Last active June 14, 2023 18:46
Show Gist options
  • Save victorabraham/f06b75f16419080ae57761e4555614c4 to your computer and use it in GitHub Desktop.
Save victorabraham/f06b75f16419080ae57761e4555614c4 to your computer and use it in GitHub Desktop.
Bash Aliases
alias ll='ls -lahG'
alias home='cd ~'
alias ni="npm install"
alias nid="npm install --save-dev"
alias nis="npm install --save"
alias nit="npm init"
alias glog="git log --oneline --decorate --graph"
alias gsl="git diff --cached --name-only"
alias gad="git diff"
alias gas="git status"
# Eg. gc "commit message"
gc() {
git commit -m "$1" && git push
}
# Eg. gac "commit message"
gac() {
git commit -am "$1" && git push
}
alias gstandardize="git config core.fileMode false && git config core.autocrlf input"
alias dxauth="sfdx force:auth:web:login -r"
alias dxlist="sfdx force:org:list"
alias dxopen="sfdx force:org:open"
alias dxhelp="sfdx force:doc:commands:list"
alias dxpull="sfdx force:source:pull"
alias dxpush="sfdx force:source:push"
alias dxtest="sfdx force:apex:test:run -l RunLocalTests -y -c -r human"
alias dxcoverage="sfdx force:data:soql:query -q 'select ApexClassOrTrigger.Name, NumLinesUncovered, NumLinesCovered from ApexCodeCoverageAggregate' -t -r human"
alias dxcreate="sfdx force:project:create -n"
alias dxcreateorg="sfdx force:org:create -f config/project-scratch-def.json -a"
alias dxdeleteorg="sfdx force:org:delete"
alias dxmdtodx="sfdx force:mdapi:convert -r"
alias dxdxtomd="sfdx force:source:convert -d"
alias dxdeploy="sfdx force:mdapi:deploy -w 100 -d"
alias dxdeploystat="sfdx force:mdapi:deploy:report"
alias dxinstall="sfdx force:package:install -w 10 -p"
# Eg. dxurl tempScratch
dxlink() {
if [ $# -eq 0 ]
then
sfdx force:org:open --json -b edge | jq '.result.url'
fi
if [ $# -eq 1 ]
then
sfdx force:org:open -u $1 --json -b edge | jq '.result.url'
fi
if [ $# -eq 2 ]
then
sfdx force:org:open -u $2 --json -b edge | jq '.result.url'
fi
}
eval "$(ssh-agent -s)"
ssh-add /home/codespace/.ssh/github
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment