Skip to content
This repository has been archived by the owner on Apr 19, 2021. It is now read-only.

[docs] Bash in Gitpod #385

Merged
merged 1 commit into from
Feb 5, 2020
Merged
Show file tree
Hide file tree
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
73 changes: 73 additions & 0 deletions src/docs/bash-in-gitpod.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Bash in Gitpod

Bash is the default shell for Gitpod. However, if you're developing a Bash script yourself, you may want to configure additional language support.

## Bash Examples

<div class="table-container">

| Repository | Description | Try It |
|------------|--------------|--------|
|[inlets/inlets](https://github.com/inlets/inlets) | Reverse proxy and service tunnel | [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/inlets/inlets)

</div>

## VSCode Extensions

### ShellCheck

ShellCheck provides linting for common mistakes in your shell script.

To use ShellCheck in Gitpod, first, we must install the `shellcheck` tool. Here is a simple Dockerfile to get you started:

```Dockerfile
FROM gitpod/workspace-full

USER gitpod

RUN brew install shellcheck
JesterOrNot marked this conversation as resolved.
Show resolved Hide resolved
```

You should also install the shellcheck VS Code extension in Gitpod, by adding a [`.gitpod.yml`](https://www.gitpod.io/docs/41_config_gitpod_file/) configuration file to your repository that looks like this (notice the `vscode` extensions section):

```yaml
image:
file: .gitpod.Dockerfile

vscode:
extensions:
- [email protected]:hsU/Rd39aqPYowTqL+DbXg==
```

Not sure about ShellCheck? Try it in Gitpod!

[![JesterOrNot/Gitpod-ShellCheck](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/JesterOrNot/Gitpod-ShellCheck)

### Bash IDE

![](images/bashIDE.png)
<br/>
Just to name a few things Bash IDE adds: Code completion, hovers, and diagnostic reporting.

To install Bash IDE to your repository add the following to your [`.gitpod.Dockerfile`](https://www.gitpod.io/docs/config-docker/)

```dockerfile
RUN npm i -g bash-language-server
```

Also the following in your
[`.gitpod.yml`](https://www.gitpod.io/docs/41-config-gitpod-file/)

```yaml
vscode:
extensions:
- [email protected]:/qx+rdXE/fGTGWhelNf3aQ==
```

Not sure about Bash IDE? Try it in Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/JesterOrNot/Gitpod-BashIDE)

## External Resources

- For more on ShellCheck see https://shellcheck.net
Binary file added src/docs/images/bashIDE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/docs/languages-and-frameworks.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Below is a list of language and framework specific tips & tricks.
* [Java](/docs/java-in-gitpod/)
* [C++](/docs/cpp-in-gitpod/)
* [Go](/docs/go-in-gitpod/)
* [Bash](/docs/bash-in-gitpod/)
* [Ruby](/docs/ruby-in-gitpod)
* [Rust](/docs/rust-in-gitpod/)
* [Julia](/docs/julia-in-gitpod/)
4 changes: 4 additions & 0 deletions src/docs/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ export const MENU: MenuEntry[] = [
"Go",
"go-in-gitpod"
),
M(
"Bash",
"bash-in-gitpod"
),
M(
"Ruby",
"ruby-in-gitpod"
Expand Down