Skip to content

feat: add a section introducing CTRL+A and CTRL+E shortcuts #364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions episodes/01-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,38 @@ pwck pwconv pwd pwdx pwunconv

Displays the name of every program that starts with `pw`.

### Shortcut: Moving to the start or end of a command

Editing a long command can be time consuming. The shell has shortcut keys for moving to the start
or end of a command that you are typing.

Try typing this command, but don't hit enter yet.

```bash
ls home/dcuser/shell_data
```

Notice that there is an error: there should be a `/` at the start of the path.

Use CTRL+A (hold down the control (CTRL) key and press the A key) to move to the start of the command.

Edit the command to add the missing `/`, but don't hit enter yet.

```bash
ls /home/dcuser/shell_data
```

Now you decide actually you wanted to see the contents one level down in `sra_metadata`.

Use CTRL+E to move to the end of the command.

Edit the command to add `/sra_metadata` and now hit enter.

```bash
ls /home/dcuser/shell_data/sra_metadata
```


## Summary

We now know how to move around our file system using the command line.
Expand Down