Skip to content
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
1 change: 1 addition & 0 deletions .vuepress/configs/navbar/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ export * from './ja.js';
export * from './pt-BR.js';
export * from './ru.js';
export * from './zh-CN.js';
export * from './ko.js';
8 changes: 8 additions & 0 deletions .vuepress/configs/navbar/ko.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import type { NavbarConfig } from '@vuepress/theme-default';

export const navbarKo: NavbarConfig = [
{ text: '문서', link: '/ko/book/' },
// { text: "Contributor Book", link: "/contributor-book/" },
{ text: 'Cookbook', link: '/cookbook/' },
{ text: '블로그', link: '/blog/' },
];
1 change: 1 addition & 0 deletions .vuepress/configs/sidebar/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ export * from './ja.js';
export * from './pt-BR.js';
export * from './ru.js';
export * from './zh-CN.js';
export * from './ko.js';
76 changes: 76 additions & 0 deletions .vuepress/configs/sidebar/ko.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import type { SidebarConfig } from '@vuepress/theme-default';
import type { commandCategories } from './command_categories';

export const sidebarKo: SidebarConfig = {
'/ko/book/': [
{
text: '소개',
link: '/ko/book/README.md',
collapsible: false,
},
{
text: '시작하기',
link: '/ko/book/getting_started.md',
collapsible: false,
children: [
'/ko/book/installation',
'/ko/book/moving_around',
'/ko/book/thinking_in_nushell',
],
},
{
text: 'Nu 기본',
link: '/ko/book/nu_fundamentals.md',
collapsible: false,
children: [
'/ko/book/types_of_data',
'/ko/book/loading_data',
'/ko/book/pipeline.md',
'/ko/book/working_with_strings',
'/ko/book/working_with_lists',
'/ko/book/working_with_tables',
],
},
{
text: 'Nu에서 프로그래밍하기',
link: '/ko/book/programming_in_nu.md',
collapsible: false,
children: [
'/ko/book/custom_commands',
'/ko/book/aliases',
'/ko/book/operators',
'/ko/book/variables_and_subexpressions.md',
'/ko/book/scripts',
'/ko/book/overlays',
'/ko/book/command_signature',
],
},
{
text: '셸로서의 Nu',
link: '/ko/book/nu_as_a_shell.md',
collapsible: false,
children: [
'/ko/book/configuration',
'/ko/book/environment',
'/ko/book/escaping',
'/ko/book/3rdpartyprompts',
'/ko/book/custom_completions',
'/ko/book/coloring_and_theming',
'/ko/book/hooks',
'/ko/book/background_jobs.md',
],
},
{
text: 'Nu로 전환하기',
link: '/ko/book/coming_to_nu.md',
collapsible: false,
children: ['/ko/book/coming_from_bash', '/ko/book/command_reference'],
},
{
text: '(단지) 고급 사용자를 위한 것은 아닙니다',
link: '/ko/book/advanced.md',
collapsible: false,
children: ['/ko/book/plugins', '/ko/book/metadata.md'],
},
],
};
51 changes: 51 additions & 0 deletions ko/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
home: true
heroImage: null
heroText: Nushell
tagline: 새로운 종류의 셸
actionText: 시작하기 →
actionLink: /ko/book/
features:
- title: 모든 OS를 제어하는 파이프라인
details: Nu는 Linux, macOS, Windows에서 작동합니다. 한 번 배우면 어디서든 사용할 수 있습니다.
- title: 어디서나 구조화된 데이터
details: Nu의 파이프라인은 쉽게 선택하고, 필터링하고, 정렬할 수 있는 구조화된 데이터를 사용합니다. 더 이상 문자열을 파싱하지 않고 바로 문제 해결을 시작하세요.
- title: 강력한 플러그인
details: Nu는 강력한 플러그인 시스템 덕분에 쉽게 확장할 수 있습니다.
---

<img src="https://www.nushell.sh/frontpage/ls-example.png" alt="ls 명령어 사용법을 보여주는 스크린샷" class="hero"/>

### Nu는 기존 데이터와 함께 작동합니다

Nu는 [JSON, YAML, XML, Excel 등](/book/loading_data.md)을 이해합니다. 파일, 데이터베이스 또는 웹 API에 있든 상관없이 Nu 파이프라인으로 데이터를 가져오는 것은 쉽습니다.

<img src="https://www.nushell.sh/frontpage/fetch-example.png" alt="웹 API에서 데이터를 로드하는 것을 보여주는 스크린샷" class="hero"/>

### Nu는 훌륭한 오류 메시지를 제공합니다

Nu는 형식화된 데이터로 작업하므로 다른 셸이 감지하지 못하는 오류를 포착합니다. 그리고 문제가 발생하면 어디서 왜 발생했는지 정확히 알려줍니다.

<img src="https://www.nushell.sh/frontpage/miette-example.png" alt="Nu가 유형 오류를 포착할 때 오류 메시지를 보여주는 스크린샷" class="hero"/>

## Nu 설치

Nushell은 [컴파일된 프로그램](https://github.com/nushell/nushell/releases), [패키지 관리자](https://repology.org/project/nushell/versions) 및 [소스 코드](https://github.com/nushell/nushell)로 제공됩니다. 자세한 설치 지침은 [여기](/ko/book/installation.md)에서 찾을 수 있습니다. 또는 바로 시작하세요.

#### macOS / Linux:

```sh
$ brew install nushell
```

#### Windows:

```powershell
winget install nushell
```

## 커뮤니티

궁금한 점이 있으면 (영문) [Discord 서버](https://discord.gg/NtAbbGn)에 참여하세요. Nu를 처음 접하든 아니든 기꺼이 도와줄 사람들이 많이 있습니다.

[피드백](https://github.com/nushell/nushell.github.io/issues)이나 [풀 리퀘스트](https://github.com/nushell/nushell.github.io/pulls)를 통해 이 페이지를 개선하는 데 기여해주세요.
101 changes: 101 additions & 0 deletions ko/book/3rdpartyprompts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# How to Configure 3rd Party Prompts

## Nerd Fonts

Nerd Fonts are not required, but they can improve the prompt presentation through additional glyphs and iconography.

> Nerd Fonts patches developer targeted fonts with a high number of glyphs (icons).
> Specifically to add a high number of extra glyphs from popular ‘iconic fonts’ such as Font Awesome, Devicons, Octicons, and others.

* [Nerd Fonts website](https://www.nerdfonts.com)
* [Source Repository](https://github.com/ryanoasis/nerd-fonts)

## oh-my-posh

[site](https://ohmyposh.dev/)

[repo](https://github.com/JanDeDobbeleer/oh-my-posh)

If you like [oh-my-posh](https://ohmyposh.dev/), you can use oh-my-posh with Nushell with a few steps. It works great with Nushell. How to setup oh-my-posh with Nushell:

1. Install Oh My Posh and download oh-my-posh's themes following [guide](https://ohmyposh.dev/docs/installation/linux).
2. Download and install a [nerd font](https://github.com/ryanoasis/nerd-fonts).
3. Generate the .oh-my-posh.nu file. By default it will be generated to your home directory. You can use `--config` to specify a theme, other wise, oh-my-posh comes with a default theme.
4. Initialize oh-my-posh prompt by adding in ~/.config/nushell/config.nu(or the path output by `$nu.config-path`) to source ~/.oh-my-posh.nu.

```nu
# Generate the .oh-my-posh.nu file
oh-my-posh init nu --config ~/.poshthemes/M365Princess.omp.json

# Initialize oh-my-posh.nu at shell startup by adding this line in your config.nu file
source ~/.oh-my-posh.nu
```

For MacOS users:

1. You can install oh-my-posh using `brew`, just following the [guide here](https://ohmyposh.dev/docs/installation/macos)
2. Download and install a [nerd font](https://github.com/ryanoasis/nerd-fonts).
3. Set the PROMPT_COMMAND in the file output by `$nu.config-path`, here is a code snippet:

```nu
let posh_dir = (brew --prefix oh-my-posh | str trim)
let posh_theme = $'($posh_dir)/share/oh-my-posh/themes/'
# Change the theme names to: zash/space/robbyrussel/powerline/powerlevel10k_lean/
# material/half-life/lambda Or double lines theme: amro/pure/spaceship, etc.
# For more [Themes demo](https://ohmyposh.dev/docs/themes)
$env.PROMPT_COMMAND = { || oh-my-posh prompt print primary --config $'($posh_theme)/zash.omp.json' }
# Optional
$env.PROMPT_INDICATOR = $"(ansi y)$> (ansi reset)"
```

## Starship

[site](https://starship.rs/)

[repo](https://github.com/starship/starship)

1. Follow the links above and install Starship.
2. Install nerdfonts depending on your preferences.
3. Use the config example below. Make sure to set the `STARSHIP_SHELL` environment variable.

::: tip
An alternate way to enable Starship is described in the [Starship Quick Install](https://starship.rs/#nushell) instructions.

The link above is the official integration of Starship and Nushell and is the simplest way to get
Starship running without doing anything manual:

- Starship will create its own configuration / environment setup script
- you simply have to create it in `env.nu` and `use` it in `config.nu`
:::

Here's an example config section for Starship:

```nu
$env.STARSHIP_SHELL = "nu"

def create_left_prompt [] {
starship prompt --cmd-duration $env.CMD_DURATION_MS $'--status=($env.LAST_EXIT_CODE)'
}

# Use nushell functions to define your right and left prompt
$env.PROMPT_COMMAND = { || create_left_prompt }
$env.PROMPT_COMMAND_RIGHT = ""

# The prompt indicators are environmental variables that represent
# the state of the prompt
$env.PROMPT_INDICATOR = ""
$env.PROMPT_INDICATOR_VI_INSERT = ": "
$env.PROMPT_INDICATOR_VI_NORMAL = "〉"
$env.PROMPT_MULTILINE_INDICATOR = "::: "
```

Now restart Nu.

```
nushell on 📙 main is 📦 v0.60.0 via 🦀 v1.59.0
```

## Purs

[repo](https://github.com/xcambar/purs)
64 changes: 64 additions & 0 deletions ko/book/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Introduction

Hello, and welcome to the Nushell project.
The goal of this project is to take the Unix philosophy of shells, where pipes connect simple commands together, and bring it to the modern style of development.
Thus, rather than being either a shell, or a programming language, Nushell connects both by bringing a rich programming language and a full-featured shell together into one package.

Nu takes cues from a lot of familiar territory: traditional shells like bash, object based shells like PowerShell, gradually typed languages like TypeScript, functional programming, systems programming, and more. But rather than trying to be a jack of all trades, Nu focuses its energy on doing a few things well:

- Being a flexible cross-platform shell with a modern feel
- Solving problems as a modern programming language that works with the structure of your data
- Giving clear error messages and clean IDE support

## This Book

The book is split into chapters which are further broken down into sections.
You can click on the chapter headers to get more information about it.

- [Installation](installation.md), of course, helps you get Nushell onto your system.
- [Getting Started](getting_started.md) shows you the ropes. It also explains some of the design principles where Nushell differs from typical shells, such as Bash.
- [Nu Fundamentals](nu_fundamentals.md) explains basic concepts of the Nushell language.
- [Programming in Nu](programming_in_nu.md) dives more deeply into the language features and shows several ways how to organize and structure your code.
- [Nu as a Shell](nu_as_a_shell.md) focuses on the shell features, most notably the configuration and environment.
- [Coming to Nu](coming_to_nu.md) is intended to give a quick start for users coming from other shells or languages.
- [Design Notes](design_notes.md) has in-depth explanation of some of the Nushell's design choices.
- [(Not So) Advanced](advanced.md) includes some more advanced topics (they are not _so_ advanced, make sure to check them out, too!).

## The Many Parts of Nushell

The Nushell project consists of multiple different repositories and subprojects.
You can find all of them under [our organization on GitHub](https://github.com/nushell).

- The main Nushell repository can be found [here](https://github.com/nushell/nushell). It is broken into multiple crates that can be used as independent libraries in your own project, if you wish so.
- The repository of our [nushell.sh](https://www.nushell.sh) page, including this book, can be found [here](https://github.com/nushell/nushell.github.io).
- Nushell has its own line editor which [has its own repository](https://github.com/nushell/reedline)
- [`nu_scripts`](https://github.com/nushell/nu_scripts) is a place to share scripts and modules with other users until we have some sort of package manager.
- [Nana](https://github.com/nushell/nana) is an experimental effort to explore graphical user interface for Nushell.
- [Awesome Nu](https://github.com/nushell/awesome-nu) contains a list of tools that work with the Nushell ecosystem: plugins, scripts, editor extension, 3rd party integrations, etc.
- [Nu Showcase](https://github.com/nushell/showcase) is a place to share works about Nushell, be it blogs, artwork or something else.
- [Request for Comment (RFC)](https://github.com/nushell/rfcs) serves as a place to propose and discuss major design changes. While currently under-utilized, we expect to use it more as we get closer to and beyond 1.0.

## Contributing

We welcome contributions!
[As you can see](#the-many-parts-of-nushell), there are a lot of places to contribute to.
Most repositories contain `CONTRIBUTING.md` file with tips and details that should help you get started (if not, consider contributing a fix!).

Nushell itself is written in [Rust](https://www.rust-lang.org).
However, you do not have to be a Rust programmer to help.
If you know some web development, you can contribute to improving this website or the Nana project.
[Dataframes](dataframes.md) can use your data processing expertise.

If you wrote a cool script, plugin or integrated Nushell somewhere, we'd welcome your contribution to `nu_scripts` or Awesome Nu.
Discovering bugs with reproduction steps and filing GitHub issues for them is a valuable help, too!
You can contribute to Nushell just by using Nushell!

Since Nushell evolves fast, this book is in a constant need of updating.
Contributing to this book does not require any special skills aside from a basic familiarity with Markdown.
Furthermore, you can consider translating parts of it to your language.

## Community

The main place to discuss anything Nushell is our [Discord](https://discord.com/invite/NtAbbGn).
You can also follow our [blog](https://www.nushell.sh/blog) for news and updates.
Finally, you can use the GitHub discussions or file GitHub issues.
28 changes: 28 additions & 0 deletions ko/book/advanced.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
prev:
text: How Nushell Code Gets Run
link: /book/how_nushell_code_gets_run.md
next:
text: Standard Library (Preview)
link: /book/standard_library.md
---
# (Not so) Advanced

While the "Advanced" title might sound daunting and you might be tempted to skip this chapter, in fact, some of the most interesting and powerful features can be found here.

Besides the built-in commands, Nushell has a [standard library](standard_library.md).

Nushell operates on _structured data_.
You could say that Nushell is a "data-first" shell and a programming language.
To further explore the data-centric direction, Nushell includes a full-featured dataframe processing engine using [Polars](https://github.com/pola-rs/polars) as the backend.
Make sure to check the [Dataframes documentation](dataframes.md) if you want to process large data efficiently directly in your shell.

Values in Nushell contain some extra [metadata](metadata.md).
This metadata can be used, for example, to [create custom errors](creating_errors.md).

Thanks to Nushell's strict scoping rules, it is very easy to [iterate over collections in parallel](parallelism.md) which can help you speed up long-running scripts by just typing a few characters.

You can [interactively explore data](explore.md) with the [`explore`](/commands/docs/explore.md) command.

Finally, you can extend Nushell's functionality with [plugins](plugins.md).
Almost anything can be a plugin as long as it communicates with Nushell in a protocol that Nushell understands.
Loading