From c25617ae4c0013c723e328847209a4570db04252 Mon Sep 17 00:00:00 2001 From: Honai Ueoka <29170100+honai@users.noreply.github.com> Date: Mon, 28 Oct 2019 16:42:54 +0900 Subject: [PATCH 1/2] Document: Add PowerShell command explanation --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index fd7ed90..4cefe30 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,9 @@ $ docker pull plass/mdtopdf $ docker run -it --rm -v `pwd`:/workdir plass/mdtopdf mdtopdf INPUT.md ``` +**Windows (PowerShell)**: Replace `` `pwd` `` to `$(pwd)` + + ## Advanced Usages ### Generate PDF file on save From 2473c110ab176a72230510aee745afef11170b93 Mon Sep 17 00:00:00 2001 From: Honai Ueoka <29170100+honai@users.noreply.github.com> Date: Tue, 29 Oct 2019 00:19:16 +0900 Subject: [PATCH 2/2] Document: add description to set alias on Windows --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4cefe30..eb5004b 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ $ docker pull plass/mdtopdf $ docker run -it --rm -v `pwd`:/workdir plass/mdtopdf mdtopdf INPUT.md ``` -**Windows (PowerShell)**: Replace `` `pwd` `` to `$(pwd)` +**Windows (PowerShell)** : Replace `` `pwd` `` to `${pwd}` ## Advanced Usages @@ -53,6 +53,16 @@ $ w-mdtopdf INPUT.md **zsh** : Modify `.zshrc` instead of `.bash_profile`. **Ubuntu** : Modify `.bashrc` instead of `.bash_profile`. +If you're using Docker for Windows, setting alias is a bit tricky. Use following command. + +``` +> echo 'Function mdtopdf {Param($file) docker run -it --rm -v ${pwd}:/workdir plass/mdtopdf mdtopdf $(Get-ChildItem $file -Name)}' >> $PROFILE +> echo 'Function mdtopdf {Param($file) docker run -it --rm -v ${pwd}:/workdir plass/mdtopdf w-mdtopdf $(Get-ChildItem $file -Name)}' >> $PROFILE +> . $PROFILE +> mdtopdf INPUT.md +> w-mdtopdf INPUT.md +``` + ### Generate tex file from markdown ```bash