Last active
October 3, 2015 02:28
-
-
Save bitsandbooks/2372395 to your computer and use it in GitHub Desktop.
Bash stuff
This file contains 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
#!/bin/bash | |
# Shamelessly stolen from parts of bash-it (https://github.com/hmans/bash-it) | |
alias reload='source ~/.bash_profile' | |
# Directory stuff | |
alias sl=ls | |
alias ls='ls -G' # Compact view, show colors | |
alias la='ls -AF' # Compact view, show hidden | |
alias ll='ls -al' | |
alias lll='ls -al | less' | |
alias l='ls -a' | |
alias l1='ls -1' | |
if [ $(uname) = "Linux" ] | |
then | |
alias ls='ls --color=auto' | |
fi | |
alias md='mkdir -p' | |
alias rd='rmdir' | |
alias ..='cd ..' # Go up one directory | |
alias ...='cd ../..' # Go up two directories | |
alias ....='cd ../../..' # Go up two directories | |
alias -- -="cd -" # Go back | |
alias _='sudo' | |
alias h='history' | |
alias c='clear' | |
alias k='clear' | |
alias cls='clear' | |
alias q='exit' | |
function aliases-help() { | |
echo "Generic Alias Usage | |
sl = ls | |
ls = ls -G | |
la = ls -AF | |
ll = ls -al | |
l = ls -a | |
c/k/cls = clear | |
.. = cd .. | |
... = cd ../.. | |
- = cd - | |
h = history | |
md = mkdir -p | |
rd = rmdir | |
q = exit" | |
echo | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment