Skip to content

Commit 2354038

Browse files
committed
use vhs instead of asciinema
1 parent 0b4ea0b commit 2354038

File tree

9 files changed

+109
-13
lines changed

9 files changed

+109
-13
lines changed

content/code/aws-pager/0.tape

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Where should we write the GIF?
2+
Output ../../../static/images/2024/04/help0.mp4
3+
4+
# Set up a 1200x600 terminal with 46px font.
5+
Set Padding 10
6+
Set FontSize 15
7+
Set Width 800
8+
Set Height 500
9+
Set Shell zsh
10+
Set WindowBar Colorful
11+
12+
# Type a command in the terminal.
13+
Type "aws iam create-role help"
14+
Sleep 500ms
15+
Enter
16+
17+
Sleep 2s
18+
Type "q"
19+
20+
# Admire the output for a bit.
21+
Sleep 1s

content/code/aws-pager/1.tape

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Where should we write the GIF?
2+
Output ../../../static/images/2024/04/help1.mp4
3+
4+
# Set up a 1200x600 terminal with 46px font.
5+
Set Padding 10
6+
Set FontSize 15
7+
Set Width 800
8+
Set Height 500
9+
Set Shell zsh
10+
Set WindowBar Colorful
11+
12+
# Type a command in the terminal.
13+
Type `export MANPAGER='less -isXF'`
14+
Sleep 1s
15+
Enter
16+
17+
Type "aws iam create-role help"
18+
Sleep 500ms
19+
Enter
20+
21+
Sleep 2s
22+
Type "q"
23+
24+
# Admire the output for a bit.
25+
Sleep 1s

content/code/aws-pager/2.tape

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Where should we write the GIF?
2+
Output ../../../static/images/2024/04/help2.mp4
3+
4+
# Set up a 1200x600 terminal with 46px font.
5+
Set Padding 10
6+
Set FontSize 15
7+
Set Width 800
8+
Set Height 500
9+
Set Shell zsh
10+
Set WindowBar Colorful
11+
12+
Hide
13+
Type "export AWS_PAGER=less && clear"
14+
Enter
15+
Show
16+
17+
# Type a command in the terminal.
18+
Type "aws iam list-role-policies --role-name rmoff-decodable-s3"
19+
Sleep 500ms
20+
Enter
21+
22+
Sleep 2s
23+
Type "q"
24+
25+
26+
# Admire the output for a bit.
27+
Sleep 1s

content/code/aws-pager/3.tape

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Where should we write the GIF?
2+
Output ../../../static/images/2024/04/help3.mp4
3+
4+
# Set up a 1200x600 terminal with 46px font.
5+
Set Padding 10
6+
Set FontSize 15
7+
Set Width 800
8+
Set Height 500
9+
Set Shell zsh
10+
Set WindowBar Colorful
11+
12+
# Type a command in the terminal.
13+
Type "aws iam list-role-policies --role-name rmoff-decodable-s3 --no-cli-pager"
14+
Sleep 500ms
15+
Enter
16+
17+
Sleep 3s
18+
19+
Type `clear`
20+
Enter
21+
Type `export AWS_PAGER='less -isXF'`
22+
Sleep 1s
23+
Enter
24+
25+
Type "aws iam list-role-policies --role-name rmoff-decodable-s3
26+
Sleep 500ms
27+
Enter
28+
29+
30+
# Admire the output for a bit.
31+
Sleep 1s

content/post/aws-pager.adoc

+5-13
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ categories:
1515
:rouge-css: style
1616
:rouge-style: github
1717

18-
After a break from using AWS I had reason to reacquaint myself with it again today, and did so via the CLI. The AWS CLI is pretty intuitive and has a good helptext system, but one thing that kept frustrasting me was that after closing the help text, the screen cleared—so I couldn't copy the syntax out to use in my command!
18+
After a break from using AWS I had reason to reacquaint myself with it again today, and did so via the CLI. The https://aws.amazon.com/cli/[AWS CLI] is pretty intuitive and has a good helptext system, but one thing that kept frustrasting me was that after closing the help text, the screen cleared—so I couldn't copy the syntax out to use in my command!
1919

2020
The same thing happened when I ran a command that returned output - the screen cleared.
2121

@@ -25,9 +25,7 @@ Here's how to fix either, or both, of these
2525

2626
== AWS CLI help text disappears when closed
2727

28-
++++
29-
<script src="https://asciinema.org/a/SvT2Ncm92T49vGMFcX5R6R7Ct.js" id="asciicast-656551" async="true"></script>
30-
++++
28+
video::/images/2024/04/help0.mp4[]
3129

3230
The fix: set `MANPAGER` (https://ashley.raiteri.net/stop-aws-cli-help-command-from-clearing-screen/[h/t])
3331

@@ -36,19 +34,15 @@ The fix: set `MANPAGER` (https://ashley.raiteri.net/stop-aws-cli-help-command-fr
3634
export MANPAGER='less -isXF'
3735
----
3836

39-
++++
40-
<script src="https://asciinema.org/a/MuEdcL9wSLSU6eFJKYr2mwcoQ.js" id="asciicast-656553" async="true"></script>
41-
++++
37+
video::/images/2024/04/help1.mp4[]
4238

4339
== AWS CLI command output disappears when closed
4440

4541
Similar to the above, but a different solution, which confuses the issue when Googling :)
4642

4743
You run a command, you want to refer to the output, but as soon as you return to the command prompt it's gone 🤨
4844

49-
++++
50-
<script src="https://asciinema.org/a/HeeDf3YOTO64sHzg7SyJBvoZf.js" id="asciicast-656555" async="true"></script>
51-
++++
45+
video::/images/2024/04/help2.mp4[]
5246

5347
The fix: make sure that `AWS_PAGER` is set to the correct invocation of `less`. Or other options, including setting `--no-cli-pager` argument. This https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-pagination.html#cli-usage-pagination-clientside[is documented] if you want to read more.
5448

@@ -64,6 +58,4 @@ or simply
6458
unset AWS_PAGER
6559
----
6660

67-
++++
68-
<script src="https://asciinema.org/a/K5bCE9wXJDN5Bid6GHeWGrM8D.js" id="asciicast-656557" async="true"></script>
69-
++++
61+
video::/images/2024/04/help3.mp4[]

static/images/2024/04/help0.mp4

47.3 KB
Binary file not shown.

static/images/2024/04/help1.mp4

51.6 KB
Binary file not shown.

static/images/2024/04/help2.mp4

24.2 KB
Binary file not shown.

static/images/2024/04/help3.mp4

45.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)