Mercurial > hg > config
comparison .bashrc @ 167:842e1fca024a
add a quotemail function for quoting mail
| author | Jeff Hammel <jhammel@mozilla.com> |
|---|---|
| date | Thu, 08 Sep 2011 09:39:25 -0700 |
| parents | 700b43d5052e |
| children | ab2fc6222f94 |
comparison
equal
deleted
inserted
replaced
| 166:8b81dd40c160 | 167:842e1fca024a |
|---|---|
| 298 fi | 298 fi |
| 299 cd - | 299 cd - |
| 300 } | 300 } |
| 301 | 301 |
| 302 blog-file() { | 302 blog-file() { |
| 303 | |
| 304 echo "$HOME/web/blog/k0s/entries/public/$1" | 303 echo "$HOME/web/blog/k0s/entries/public/$1" |
| 305 | |
| 306 } | 304 } |
| 307 | 305 |
| 308 hgrc() { | 306 hgrc() { |
| 309 ROOT="${1}" | 307 ROOT="${1}" |
| 310 echo "[paths]" | 308 echo "[paths]" |
| 339 ps -e|grep -v TTY|awk {'print "echo -n \"Process: "$4"\tPID: "$1"\tNumber of FH: \"; lsof -p "$1"|wc -l"'} > ${TMPFILE} | 337 ps -e|grep -v TTY|awk {'print "echo -n \"Process: "$4"\tPID: "$1"\tNumber of FH: \"; lsof -p "$1"|wc -l"'} > ${TMPFILE} |
| 340 . ${TMPFILE} | sort | 338 . ${TMPFILE} | sort |
| 341 rm ${TMPFILE} | 339 rm ${TMPFILE} |
| 342 } | 340 } |
| 343 | 341 |
| 342 quotemail() { | |
| 343 | |
| 344 command='s/^/> /' | |
| 345 inplace="" | |
| 346 if [ "$#" == "2" ] | |
| 347 then | |
| 348 inplace="-i" | |
| 349 fi | |
| 350 | |
| 351 sed ${inplace} "${command}" "$1" | |
| 352 | |
| 353 } | |
| 354 | |
| 344 ### include overrides for commands | 355 ### include overrides for commands |
| 345 source ~/.bash_overrides | 356 source ~/.bash_overrides |
| 346 | 357 |
| 347 ### regenerate fluxbox menus here for convenience | 358 ### regenerate fluxbox menus here for convenience |
| 348 MENU=~/web/site/programs.html | 359 MENU=~/web/site/programs.html |
