mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-10 04:26:17 +02:00
Merge 8a7806d5a4 into f3fa41834d
This commit is contained in:
commit
1128d59888
2 changed files with 6 additions and 4 deletions
|
|
@ -7,11 +7,13 @@ When writing Coffeescript it's very common to want to preview the output of a
|
||||||
certain snippet of code, either because you want to test the output or because
|
certain snippet of code, either because you want to test the output or because
|
||||||
you'd like to execute it in a browser console which doesn't accept Coffeescript.
|
you'd like to execute it in a browser console which doesn't accept Coffeescript.
|
||||||
|
|
||||||
Preview the compiled result of your coffeescript with `cf "code"` as per the
|
Preview the compiled result of your coffeescript with `cf "code"`, as shown in this example:
|
||||||
following:
|
|
||||||
|
|
||||||
```zsh
|
```zsh
|
||||||
$ cf 'if a then be else c'
|
$ cf 'if a then b else c'
|
||||||
|
```
|
||||||
|
which would output the following:
|
||||||
|
```zsh
|
||||||
if (a) {
|
if (a) {
|
||||||
b;
|
b;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ cfc () {
|
||||||
}
|
}
|
||||||
|
|
||||||
# compile from pasteboard & print
|
# compile from pasteboard & print
|
||||||
alias cfp='coffeeMe "$(pbpaste)"'
|
alias cfp='cf "$(pbpaste)"'
|
||||||
|
|
||||||
# compile from pasteboard and copy to clipboard
|
# compile from pasteboard and copy to clipboard
|
||||||
alias cfpc='cfp | pbcopy'
|
alias cfpc='cfp | pbcopy'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue