Created
May 30, 2014 01:13
-
-
Save Chun-Yang/d57c56a5894850ab4976 to your computer and use it in GitHub Desktop.
linux only show dir on command line, add handy aliases
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
| # Change PS1 to only display \w full path | |
| # Comment this to go back to default | |
| PS1='\w\$ ' | |
| # Show date before any prompt | |
| # PROMPT_COMMAND="date +%k:%m:%S" | |
| # enable color support of ls and also add handy aliases | |
| if [ -x /usr/bin/dircolors ]; then | |
| test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" | |
| alias ls='ls --color=auto' | |
| #alias dir='dir --color=auto' | |
| #alias vdir='vdir --color=auto' | |
| alias grep='grep --color=auto' | |
| alias fgrep='fgrep --color=auto' | |
| alias egrep='egrep --color=auto' | |
| fi | |
| # some more ls aliases | |
| alias ll='ls -alF' | |
| alias la='ls -A' | |
| alias l='ls -CF' | |
| # Add alias for rm remove file to show warning message | |
| alias rm='rm -i' | |
| # show $PATH nicely(pretty path) | |
| alias ppath='echo $PATH | tr \: \\n' | |
| # from cs50 | |
| alias lf="ls -l | grep -v '^d'" | |
| alias ldir="ls -l | grep '^d'" | |
| # gcc with warnings | |
| alias mygcc='gcc -Wall -pedantic -std=c99' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment