Keys pressed:
ssh<space>cs15lfa23gd@ieng6.ucsd.edu<enter>
Explanation:
The commend is never run in the terminal, which we need to type out the entire command includign the host that we’re connecting to. The ssh key is already set up, so no password required.
Keys pressed:
<open-website(https://github.com/jasper-hyj/lab7)>
<click-button(<> Code)>
<click-button(copy)>
<open-terminal>
git<space>clone<space><right-click>
Explanation:
First go to webiste and copy the link by clicking the copy button in the website that copy the ssh link of the repository. Then go back to terminal type out the
git clone
commmand and use right click to paste the link that we copy from the websitehttps://github.com/jasper-hyj/lab7
Key pressed:
cd<space>l<tab><enter>
bash<space>t<tab><enter>
Explanation:
First use
cd
command to go in the directory we just clone. Since onlylab7
directory start withl
, typel
and then<tab>
to auto-complete the directory name and pressenter
to execute. We then run thetest.sh
file by first typebash
, and then typet
and then<tab>
to auto-complete the file name since onlytest.sh
start witht
.
Key pressed:
vim<space>L<tab>.<tab><enter>
Explanation:
First type
vim
command to open the vim editor for the .java file. Specify the file to open by first typeL
to specify the file name andtab
to auto complete toListExamples
, then type.
andtab
to specify the file name toListExamples.java
instead ofListExamplesTests.java
.
Key pressed:
:set number<enter>
44gg
e
i
<delete>
2
<esc>
:x<enter>
Explanation:
First type
:set number<enter>
to make the vim editor to display the line number. Sednd, use44gg
to jump the cursor to line 44 since the code we want to fix is at line 44. After that, thee
command move to the very end of the wordindex1
, and change the mode to insert mode usingi
command. Then, we delete the number 1 with<delete>
and type the number2
in. Finally, we save the file by changing the mode to the normal mode by pressingesc
, and save and quit the vim editor by typing:x<enter>
.
Key pressed:
bash<space>t<tab><enter>
Explanation:
We use the
bash
command to run thetest.sh
bash script, which we first typebash<space>t
and auto-complete the file name by typing<tab>
and then<enter>
to execute the command.
Key pressed:
git<space>add<space>.<enter>
git<space>commit<space>-m<space>"fix<space>error"<enter>
git<space>push<enter>
Explanation:
First we type out
git<space>add<space>.<add>
to add all the files in the directory to git. Then, we type outgit<space>commit<space>-m<space>
follow with the commit message"fix<space>error"
and<enter>
to execute the command. Lastly, we typegit<space>push<enter>
to push the changes to the directory to github.