跟讀練習: GitHub Copilot now controls your command line... - 通過影片學習英語口語
選擇練習模式
每種模式都會開啟全屏練習室。
68 句
如果句子過短或過長,請點選 Edit 進行調整。
1
One of the most impressive things a programmer can do in
2
life is type out a bunch of incoherent text into the terminal, hit enter, then make something cool happen.
3
Maybe this command is just searching for a text pattern in some files, or maybe it's about to take down the nation's entire power grid.
4
If you're not a good enough hacker to tell the difference, I've got some good news for you.
5
GitHub Copilot for the CLI just became generally available and turns anyone into a bash boss, command line cowboy, or some other AI-generated nickname.
6
By the end of today's video, you'll be able to generate and understand any type of CLI command you could imagine.
7
Never again will you be stuck in front of your computer for weeks just trying to exit Vim.
8
To get started, you'll first need to have the GitHub CLI installed on your system.
9
If you don't already have it, it's a tool that's linked to your GitHub account and allows you to basically manage everything from the CLI, like your GitHub repos, pull requests,
10
etc. And as of yesterday, it also supports Copilot from the CLI.
11
If you're paying for Copilot as a personal user, you automatically have access to it, or if your boss pays for it, you might need to enable it for enterprise.
12
The Copilot CLI only has two useful commands.
13
Explain, which will take a command and then explain what it does, and Suggest, which as the name suggests, will try to create a command based on your instructions.
14
Now, before we go any further, one thing I want to point out is that you can also create aliases for these commands, which I would highly recommend doing in real life,
15
because it becomes really annoying to type out copilot suggest every time you want to use it.
16
But in this video, I'm not going to use the aliases just to keep the on-screen code really clear.
17
Let's assume I know nothing about computers, and I just want to use the terminal to create a new directory.
18
We can use the copilot suggest command and ask it to create a new directory for our source code.
19
That'll give us the option to choose between a git command, a github cli command, or in our case what we want is a generic shell command.
20
That'll print out a command in yellow, which we can now run.
21
It's the make dir command, which you might have guessed, but if you want a more in-depth explanation, you can have Copilot explain it step by step.
22
In addition, I don't like the name it chose for the directory, so I can have it revise that command by providing a secondary shot
23
or prompt that I can use to revise the original response.
24
By default, it will copy the command to your clipboard so you can then paste it in yourself, but you can also configure it to run the command automatically.
25
When we run it, it then creates that source directory, and we're good to go.
26
But now we also want a JavaScript HTML and CSS file in that directory, so let's go ahead and ask it to generate those as well.
27
And as you might imagine, it uses the touch command to do that.
28
Now let's find out
29
if it's a good HTML programmer by asking it to write a hello world in the index HTML file.
30
When we execute this command, it looks pretty good at first glance, but then when I try to run it, I get this error where Bash is having a problem with the bang.
31
That's because it's not properly escaped from the HTML string, which I would think a sophisticated AI would be able to catch, but apparently not.
32
It's pretty stupid on my part to be doing HTML programming from the CLI anyway, so let's just go into the index.html file, use an exclamation mark for the Emmet abbreviation,
33
hit tab, and generate our hello world that way.
34
By the way, if you want to get better at using tools like VS Code as well as Git and GitHub, I have courses for both of those topics on Fireship.io,
35
which you can access as a pro member or individually for $10.
36
And next week I'll have a new Stripe payments course out if you're interested in building software as a service type products.
37
But now let's find out if the CLI can actually run this app.
38
When I initially asked it to serve the app locally, it didn't seem to understand that command, and it required me to add a secondary prompt to explain in more detail what I wanted,
39
then eventually it gave me a Python command to serve locally.
40
And this command worked perfectly fine, as you can see here.
41
That wouldn't have been my first choice of a command, but it works.
42
Now let's try something a little more complicated.
43
In the HTML, I'm going to add a phone number.
44
Then I'm going to prompt Copilot to come up with a command
45
that can search this entire project for any files that have patterns with phone numbers.
46
It returns this big long command that looks like some kind of alien language unless you're a Linux guru.
47
Like what does fine do, what does grep do, and what is this weird pattern here?
48
I could use my 15 years of human expertise to explain it to you, or you could just have Copilot do that, where it explains how fine looks in your current directories,
49
and grep matches this regular expression to look for any phone number patterns.
50
It's hard to believe, but there are programmers out there who can write code like this using nothing but their own brains.
51
I suppose nothing hurts you.
52
Only pain.
53
Luckily for you, you can allocate that brain space to something else, like a new TikTok dance.
54
When we paste the command into the terminal, it successfully searches and finds all the phone number patterns.
55
But now it's time for the grand finale.
56
As you can see here, I have this mp4 video, which contains a short clip of the world's greatest actor and governor.
57
What I want to do is use a tool called ffmpeg to convert it to an animated gif. And yes, I said gif with a hard g to get a bunch
58
of hateful comments from the United GIF Alliance in order to increase engagement on this video.
59
But the end result from our prompt is this long command that'll look completely foreign if you've never used ffmpeg.
60
It's an awesome tool that I have a separate video about.
61
But let's just go ahead and run it and see if it works.
62
And of course it works perfectly, turning the video clip into a GIF.
63
The bottom line is that the Copilot CLI makes all these amazing command line tools in Linux
64
and PowerShell accessible to anyone with very little effort.
65
And finally, the last thing I want to mention is that
66
if you don't want to pay Microsoft 10 bucks a month to use Copilot, there are some great free alternatives like Codium.
67
Just throwing that out there for anyone who's already spending way too much money on AI like me.
68
Thanks for watching, and I will see you in the next one.
同頻道
FOR YOU
推薦影片
本課的詞彙與口語要點
這節 B2 級別的口語課以影片“GitHub Copilot now controls your command line..”為素材。 影片中反覆出現的詞有:command, copilot, cli, html, github。 這段影片共有 68 個句子、1235 個單詞可供跟讀。 講話部分時長為 5:14。 說話人語速較快,每分鐘約 236 個詞,會出現較多連讀和弱讀。 只有 81% 的單詞屬於英語最常用的 3,000 詞,詞彙難度較高。
影片中的重點詞彙
影片中最難的 15 個單詞,附發音和釋義:
| 單詞 | 發音 | 釋義 |
|---|---|---|
| copilot 名詞 | 副駕駛 /副駕駛, 副機師 /副機師 | |
| directory 名詞 | /dɪˈɹɛktəɹi/ | 名錄 /名錄, 簿 |
| programmer 名詞 | /ˈpɹoʊɡɹæmɚ/ | 程式設計師 /程式設計師, 程式員 /程式員 |
| alias 名詞 | /ˈeɪ.li.əs/ | 別名 /別名, 化名 |
| revise 動詞 | /ɹɪˈvaɪz/ | 修改 |
| bash 動詞 | /bæʃ/ | 揍 |
| pasta 名詞 | /ˈpɑ.stə/ | мянфан, 義大利麵 /義大利麵 |
| abbreviation 名詞 | /əˌbɹi.viˈeɪ.ʃn̩/ | 縮寫 /縮寫 |
| animate 形容詞 | /ˈæn.ə.mət/ | 活的, 有生命的 |
| clipboard 名詞 | 剪貼簿 /剪貼簿, 剪貼簿 /剪貼簿 | |
| configure 動詞 | /kənˈfɪɡə(ɹ)/ | 配置, 設定 /設定 |
| exclamation 名詞 | /ˌɛkskləˈmeɪʃn̩/ | 叫喊, 感嘆 /感嘆 |
| guru 名詞 | /ˈɡʊɹ(ˌ)u/ | 古魯 /古魯 |
| cowboy 名詞 | /ˈkaʊˌbɔɪ/ | 牛仔 |
| nickname 名詞 | /ˈnɪkneɪm/ | 綽號 /綽號, 外號 /外號 |
影片中出現的短語動詞
| 單詞 | 發音 | 釋義 |
|---|---|---|
| find out 動詞 | 找出, 查明 | |
| go ahead 動詞 | /ˌɡoʊ əˈhɛd/ | 請便 /請便 |
| come up with 動詞 | 想出, 提出 | |
| point out 動詞 | 指, 指出 |
需要注意的發音
說話人用了 21 次縮略和弱讀形式,例如 you're, don't, I'm。請按聽到的簡短形式來說。
- “sh” 和 “zh” 音: bash /bæʃ/, abbreviation /əˌbɹi.viˈeɪ.ʃn̩/, exclamation /ˌɛkskləˈmeɪʃn̩/, instruction /ɪnˈstɹʌkʃən/
- 長單詞——注意重音位置: directory /dɪˈɹɛktəɹi/, abbreviation /əˌbɹi.viˈeɪ.ʃn̩/, individually /ˌɪndɪˈvɪd͡ʒ(u)əli/, accessible /əkˈsɛs.ɪ.bəl/
中文母語者容易讀錯的音:
- /v/ — 不要讀成 /w/,上齒輕觸下唇: revise /ɹɪˈvaɪz/, abbreviation /əˌbɹi.viˈeɪ.ʃn̩/, individually /ˌɪndɪˈvɪd͡ʒ(u)əli/, convert /kənˈvɝt/
- 詞尾子音 — 要讀清楚,後面不要加母音: prompt /pɹɑmpt/, alias /ˈeɪ.li.əs/, grep /ɡɹɛp/, revise /ɹɪˈvaɪz/, bash /bæʃ/
- /æ/ — 嘴張大,不要讀成 /e/: programmer /ˈpɹoʊɡɹæmɚ/, bash /bæʃ/, allocate /ˈæl.ə.keɪt/, animate /ˈæn.ə.mət/, hacker /hækəɹ/
如何用這段影片練習
- 先完整聽一遍影片,不要開口,記下不認識的單詞。
- 先用 0.75 倍速逐句跟讀,熟練之後再回到正常速度。
- 錄下自己的聲音並與原聲對比,特別注意 copilot, directory, programmer 這類單詞。
什麼是跟讀法?
跟讀法 (Shadowing) 是一種有科學依據的語言學習技巧,最初開發用於專業口譯員的培訓,並由多語言者Alexander Arguelles博士普及。這個方法簡單而強大:您在聽英語母語原聲的同時立即大聲重複——就像是一個延遲1-2秒緊跟說話者的影子。與被動聽力或語法練習不同,跟讀法強迫您的大腦和口腔肌肉同時處理並模模擬實的講話模式。研究表明它能顯著提高發音準確性,語調,節奏,連讀,聽力理解和口語流利度——使其成為雅思口語備考和真實英語交流最有效的方法之一。












