Skip to content

Commit

Permalink
Add shortcut to copy the last command to the clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
robmiller committed Mar 22, 2013
1 parent 5f2c6d8 commit 2d6b4a6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ function sloc() {
grep -v '^$' **.(js|php) | grep -v '//' | wc -l
}

# Copy the last-run command to the clipboard
function clc() {
fc -ln -1 | tr -d '\n' | pbcopy
}

# Compile Compass, making a guess about what directory to compile in.
function compile_compass() {
ls -d **/s(c|a)ss(:h) | xargs -n 1 compass compile --force
Expand Down

0 comments on commit 2d6b4a6

Please sign in to comment.