Hacktoberfest Week 1: First Contribution...
Tags: opensource, typescript, hacktoberfest, beginners
Published: 2022-10-10 20:45:00

For some, it's the month to watch scary movies. In contrast, for others, it is an opportunity to make valuable code contributions to open-source projects in a global event known as [Hacktoberfest](https://hacktoberfest.com). 

I began my hunt for projects using GitHub's topic search function, ignoring any entries that would disqualify me from [participating in Hacktoberfest](https://hacktoberfest.com/participation/).

Finding a participating repository that matches my skill set proved to be complicated. I expressed my frustration to my [professor](https://blog.humphd.org), who quickly guided me in the correct direction.

## First PR request
After extensive searching on GitHub, I saw [Fig](https://fig.io) listed as one of the projects participating in Hacktoberfest.

### What is Fig? 
Fig is a CLI tool that brings GitHub Copilot-style autocompletion features to the command line on macOS. It is smart enough to provide accurate suggestions to commands you regularly use to avoid errors and save time. 

### My Contribution

I saw an [issue](https://github.com/withfig/autocomplete/issues/1535) filed by one of the _code owners_ regarding Fig not having _completion specs_ for `ssh-keygen`. I quickly navigated to the `man` pages for `ssh-keygen` online, and I felt good about creating a [PR](https://github.com/withfig/autocomplete/pull/1569) to close the issue. 

#### Setting Up the Environment
Setting up the environment was easy. The maintainers did a great job making the well-documented guide on [GitHub](https://github.com/withfig/autocomplete) to help new Contributors get started. I later joined Fig's Slack channel, where everyone was welcoming and supportive. 

I had one issue with authentication, which I resolved quickly on my own. 

#### Adding Completion Specs for `ssh-keygen`

Writing completion specs for `ssh-keygen` was an overall fun experience. It required prior knowledge of JSON, some built-in javascript functions, and custom functions written for by the Fig team. I was able to familiarize myself with the official Fig API without any problems.

#### Outcome

Fig users can now easily use  `ssh-keygen` as the CLI is currently configured to support its command syntax.

### Usage
 - With Fig running, start by typing `ssh-keygen` followed by a `<space>`, and see the magic happen:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fw41mpul3e0hcofxjfkc.png)

- Now type `ssh-keygen` in the terminal with a valid `option`: 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/minb922uybx964fwob5k.png)

You can see the default value of an argument when you type an option that works with an argument, such as `-a`. Also, you can see the details of the argument that this particular `option` accepts. 

- If you use an `option` such as `-K`, Fig will automatically suggest you _only_ the valid options that go with the `-K` option:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/edu2hfli1oj3r6yecyhs.png)

## Final Thoughts

When I created the PR request, I was amazed by how swiftly my PR was approved and [merged](https://github.com/withfig/autocomplete/pull/1569/commits/0991e39cbc6ff7c1a9aa99d2cce1f3b951702d3e). I connected with my professor as soon as my first PR for Hacktoberfest was merged, to get his feedback. I told him how such a small contribution made me feel good about myself. He even _tweeted_ about it:

{% twitter 1577392177700896769 %} 

_**I am grateful to those who acknowledged my minor contributions by offering encouraging feedback that bolstered my confidence**._