Last active
February 29, 2016 11:34
-
-
Save shouhei/142e0d996c46d3a17150 to your computer and use it in GitHub Desktop.
zsh functions
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
| function fis() | |
| { | |
| find . -name "*.$1" | xargs grep -n $2 | |
| } |
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
| function kgrep (){ | |
| kill `pgrep -fl "$1" | awk '{print $1}'` | |
| } |
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
| function paper() | |
| { | |
| open ./build/main.pdf | |
| } |
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
| function papernize() | |
| { | |
| for FILE in `find . -name "*.tex"` | |
| do | |
| sed -ie 's/。/./g' $FILE | |
| sed -ie 's/、/,/g' $FILE | |
| rm "$FILE"e | |
| done | |
| } |
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
| function urlnize() | |
| { | |
| "file://"`pwd`"/"$1 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment