--- a/docs/make-screenshots.sh Sun Sep 07 01:36:29 2014 +0900
+++ b/docs/make-screenshots.sh Sun Sep 07 18:58:52 2014 +0900
[[ $(tput cols) -le 100 ]] && { echo 'Maximize the terminal window and press enter.'; read; }
-cd "$(dirname "${BASH_SOURCE[0]}")"
+DOC_DIR=$(cd "$(dirname "$0")" && pwd)
+cd "$(mktemp -d)" && mkdir '~' && cd '~'
for what in 'exit' venv hg git root ; do
- grep -v '^\s*\(#\|$\)' "./prompt-session-${what}.sh" | HISTFILE= bash -i
+ grep -v '^\s*\(#\|$\)' "$DOC_DIR/prompt-session-$what.sh" | HISTFILE= bash -i
sleep 1 # otherwise "$ exit" is in a superposition of showing and not showing
- import -window $WINDOWID "./prompt-${what}.png"
- mogrify -trim -background black -extent 800x "./prompt-${what}.png"
+ import -window "$WINDOWID" "$DOC_DIR/prompt-$what.png"
+ mogrify -trim -background black -extent 800x "$DOC_DIR/prompt-$what.png"
--- a/docs/prompt-session-git.sh Sun Sep 07 01:36:29 2014 +0900
+++ b/docs/prompt-session-git.sh Sun Sep 07 18:58:52 2014 +0900
# paste this into an interactive shell
-cd "$(mktemp -d)" && git init gitrepo && cd gitrepo
+git init -q gitrepo && cd gitrepo
-echo 's' >> foo && git commit -a -m 's'
+git checkout -q -b secret
+echo 's' >> foo && git commit -q -a -m 's'
git merge master --strategy=ours --no-commit
--- a/docs/prompt-session-hg.sh Sun Sep 07 01:36:29 2014 +0900
+++ b/docs/prompt-session-hg.sh Sun Sep 07 18:58:52 2014 +0900
# paste this into an interactive shell
-cd "$(mktemp -d)" && hg init hgrepo && cd hgrepo
+hg init hgrepo && cd hgrepo
echo 'a' > foo && hg add foo
echo 'b' >> foo && hg ci -m 'b'
--- a/docs/prompt-session-venv.sh Sun Sep 07 01:36:29 2014 +0900
+++ b/docs/prompt-session-venv.sh Sun Sep 07 18:58:52 2014 +0900
# paste this into an interactive shell
-cd "$(mktemp -d)" && virtualenv venv && cd venv
+source ./venv/bin/activate