Created
June 8, 2018 15:12
-
-
Save BideoWego/bce3e9b1dc1f21b51ebe9961229eb78f to your computer and use it in GitHub Desktop.
My Windows Dotfiles
This file contains hidden or 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
echo '' | |
echo "Hello $(whoami)!" | |
echo '' | |
# ------------------------------------ | |
# Directory Shortcuts | |
# ------------------------------------ | |
alias back='cd $OLDPWD' | |
alias up='cd ..' | |
alias home='cd ~' | |
alias desktop='cd ~/Desktop' | |
alias documents='cd ~/Documents' | |
# ------------------------------------ | |
# Command Shorthands | |
# ------------------------------------ | |
alias ll='ls -lahGF' | |
alias c='clear' | |
alias h='history' | |
# ------------------------------------ | |
# Rewrite Commands | |
# ------------------------------------ | |
alias mv='mv -i' | |
alias cp='cp -i' | |
alias rm='rm -i' | |
alias rm!='sudo rm' | |
alias rmdir='rm -iR' | |
alias rmdir!='sudo rm -R' | |
alias df='df -h' | |
alias du='du -h' | |
alias mkdir='mkdir -v -p' | |
# ------------------------------------ | |
# Node/NPM | |
# ------------------------------------ | |
alias node="winpty node" | |
alias npm="node C:/Program\ Files/nodejs/node_modules/npm/bin/npm-cli.js" | |
# ---------------------------------------- | |
# Version Control | |
# ---------------------------------------- | |
alias github='start https://github.com' | |
alias bitbucket='start https://bitbucket.org' | |
# ------------------------------------ | |
# VS Code | |
# ------------------------------------ | |
alias code='/c/Program\ Files/Microsoft\ VS\ Code/bin/code' | |
# ------------------------------------ | |
# Bash Git Prompt | |
# ------------------------------------ | |
GIT_PROMPT_ONLY_IN_REPO=1 | |
source ~/.bash-git-prompt/gitprompt.sh | |
# ------------------------------------ | |
# Functions | |
# ------------------------------------ | |
# man | |
function man() { | |
if [ "$1" ]; then | |
$1 --help | less | |
else | |
echo "Please enter a command" | |
fi | |
} | |
# localhost | |
function localhost { | |
PORT='3000' | |
if [ $1 ]; then | |
PORT="$1" | |
fi | |
start "http://localhost:$PORT" | |
} | |
alias localhost='localhost' | |
# ------------------------------------ | |
# PATH | |
# ------------------------------------ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment