# shell（殼）

`shell` 模組提供與桌面整合相關的功能。

***

#### 方法 <a href="#z1a5y" id="z1a5y"></a>

## beep() <a href="#tkp0d" id="tkp0d"></a>

播放系統嗶嗶的提示聲音。

* 返回 `Promise<void>`

```javascript
await eagle.shell.beep();
```

***

## openExternal(url) <a href="#haugb" id="haugb"></a>

使用系統預設方式開啓指定 URL。注意：如果系統沒有設定預設應用，此功能將不會有任何反應。

* `url` string - 欲開啓之URL
* 返回 `Promise<void>`

```javascript
await eagle.shell.openExternal('https://www.google.com/');
```

***

## openPath(path) <a href="#bh5yu" id="bh5yu"></a>

使用系統預設方式開啓指定路徑。

* `path` string - 欲開啓檔案路徑
* 返回 `Promise<void>`

```javascript
await eagle.shell.openPath('path_to_file');
```

***

## showItemInFolder(path) <a href="#sdnth" id="sdnth"></a>

在檔案管理器中顯示指定的檔案、資料夾。

* `path` string - 欲顯示指定的檔案、資料夾
* 返回 `Promise<void>`

```javascript
await eagle.shell.showItemInFolder('path_to_file_or_directory');
```

### &#x20;<a href="#nptwx" id="nptwx"></a>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.eagle.cool/plugin-api/zh-tw/api/shell.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
