https://github.com/yhagio/my_dev_setting
https://github.com/yhagio/my_dev_setting
bash bash-profile
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/yhagio/my_dev_setting
- Owner: yhagio
- Created: 2017-07-17T23:27:00.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-04-03T01:55:10.000Z (about 8 years ago)
- Last Synced: 2025-01-08T04:32:15.239Z (over 1 year ago)
- Topics: bash, bash-profile
- Size: 0 Bytes
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#### My dev setting note
`.bash_profile`
```
# Show directory and git branch in iTerm tabs
if [ $ITERM_SESSION_ID ]; then
export PROMPT_COMMAND='echo -ne "\033];${PWD##*/}\007"; ':"$PROMPT_COMMAND";
fi
# Git branch in prompt.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1=" \e[95m\]>\[\033[00m\] \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ "
```