發表文章

目前顯示的是 7月, 2011的文章

Script for notifying process termination

圖片
When I'm working, I usually have a lot of terminal open with different tasks running in different terminal. When I run a process that takes a long time(e.g. compiling, file prcoessing), I usually switch to another terminal. The annoying thing is that I need to constantly switch back to the terminal to check the progress of the process. Because of this, I wrote a script that monitors processes specified, and notify you when the process is finished via 'notify-send'.

Show GIT status on bash prompt

圖片
It's been a while since I last post, so I'm quite surprised by the new blogger interface. Guess it's all because of Google+ integration :p I've been using git for quite a while, and it's by far the best VCS I've ever used. The thing is, when you have a lot of branches in you project,it's really hard to keep track of what branch you are on. It would be nice to have a indicator or something that tell you just that. I've seem people using Fish shell . With Fish shell, you can simply write a ruby script to customize the prompt text, showing git status is just one of the things you can do. But since I never get used to Fish shell and at that time my projects never went over two branches, I didn't think it's necessary. Recently I am working on some projects that requires 3 to 4 branches, so I sometimes commit/edit on the wrong branch. That's when I decided to add git status to my prompt.