개발자를 위한 터미널 설정 가이드

6224 단어
터미널은 모든 개발자에게 가장 중요한 도구이며 개발자의 생산성을 높일 수 있습니다.
이 기사에서는 Windows 시스템에 완벽한 쉘 프롬프트가 있는 아름다운 터미널을 얻는 방법을 보여 드리겠습니다.




1 단계



원하는 터미널을 가져옵니다. 저는 Windows 터미널을 사용하는 것을 좋아합니다. Windows 터미널은 Microsoft에서 공식적으로 인정한 것일 뿐만 아니라 요즘에는 다른 것을 요청할 수 있는 오픈 소스이기 때문입니다.

alacrity(크로스 플랫폼), cmder(창), Hyper(크로스 플랫폼), iTerm2(MacOS)와 같은 좋은 대안이 있습니다.
탭을 원하지 않으면 계산 가속을 위해 GPU를 사용하는 사용자입니다.

또한 기본적으로 터미널에서 이미지를 지원하는 kitty로 알려진 GPU 가속을 사용하는 기민함의 대안이 있습니다. 이는 다른 터미널에서 구성하는 데 상당히 지루한 작업입니다.

요약:

In short, is prefer to use windows terminal in windows and of Linux base system I use alacritty and for macOS I recommend you to use itTerm2.
In this article, I am setting up a windows terminal as I like you can you any terminal of your choice.



windowsterminalthemes과 같은 사이트를 사용하여 선택한 테마를 얻을 수 있으며 Windows 터미널에서 다른 셸에 대해 다른 테마를 설정할 수 있습니다.
Windows 터미널에 설치하려면 드롭다운 화살표를 클릭하고 설정을 클릭합니다.



그런 다음 설정 메뉴에서 이 ⛮ 아이콘으로 JSON 파일 열기를 클릭하면 "setting.json"파일이 열립니다. 여기에서는 Visual Studio 코드를 사용하고 있습니다.

프로 팁:

Use it if you are not.



이제 "schemes"속성 이름으로 이동하여 거기에 windowsterminalthemes에서 테마를 추가합니다. dev(테마 가져오기 버튼을 누르면 클립보드에 복사됩니다).



그리고 설정 메뉴에서 테마를 선택하면 됩니다.



프로 팁 진지한 것:

Get a package manager to install software and modules from the command line my recommendation for windows is chocolaty.



다음과 같이 터미널에 아이콘을 표시하려면 여기에서 nerd 글꼴을 설치하십시오.


2 단계



이제 쉘 프롬프트로 이동하겠습니다. 이제 쉘 프롬프트가 무엇인지 묻습니다.
셸 프롬프트는 작업 실행 후 매번 표시되는 줄입니다. 기본적으로 현재 작업 디렉터리 이상은 표시되지 않으므로 사용자 지정하겠습니다.

여기서는 PowerShell을 사용하고 있지만 모든 주요 셸에서 작동합니다.
시스템에 starship을 설치하려면 PowerShell을 관리자로 실행하고 다음 명령을 실행합니다.

choco install starship



또한 다음 명령을 실행하여 Nerd 글꼴을 가져오지 않은 경우:

choco install firanf



chocolaty를 설치하지 않았다면 이 가이드를 사용하여 설치하세요.
starship과 firanf를 모두 성공적으로 설치한 후 PowerShell에서 이 명령을 실행합니다.

notepad $PROFILE



끝에 메모장 창이 열리며 이 줄을 추가하고 파일을 저장해야 합니다.

Invoke-Expression (&starship init powershell)



이제 PowerShell을 열면 프롬프트에 녹색 화살표가 표시됩니다. 원하는 것이 아닌 경우 원하는 대로 셸 승격을 사용자 지정할 수 있지만 내 구성을 원하는 경우 C:에 "starship.toml"파일을 추가하기만 하면 됩니다. 이 안에\Users{your user}.config 폴더가 있습니다.

# Don't print a new line at the start of the prompt
add_newline = false

# Make prompt a single line instead of two lines
[line_break]
disabled = false

# Replace the "❯" symbol in the prompt with "➜"
[character]
success_symbol = "[λ](bold red)" #[➜](bold green)

[username]
style_user = "green bold"
style_root = "green bold"
format = "[$user](bold green)@$hostname"
disabled = false
show_always = true

[rust]
format = "via 🦀[$version](red bold)"

[aws]
symbol = "☁️ "

[conda]
symbol = " "

[dart]
symbol = " "

[directory]
read_only = "🔐 "

[docker_context]
format = "via [🐋 $context](blue bold)"

[elixir]
symbol = " "

[elm]
symbol = " "

[git_branch]
format = " [$symbol$branch]($style) "
style = "bold yellow"
symbol = " "

[golang]
symbol = " "

[hg_branch]
symbol = " "

[java]
symbol = " "

[julia]
symbol = " "

[memory_usage]
symbol = " "

[nim]
symbol = " "

[nix_shell]
symbol = " "

[nodejs]
symbol = " "

[package]
symbol = "📦 "

[perl]
symbol = " "

[php]
symbol = " "

[ruby]
symbol = " "

[swift]
symbol = "ﯣ "


[git_commit]
commit_hash_length = 8
style = "bold white"

[git_status]
conflicted = "⚔️ "
ahead = "🏎️ 💨×${count}"
behind = "🐢×${count}"
diverged = "🔱 🏎️ 💨 ×${ahead_count} 🐢 ×${behind_count}"
untracked = "🛤️ ×${count}"
stashed = "📦 "
modified = "📝×${count}"
staged = "🗃️ ×${count}"
renamed = "📛×${count}"
deleted = "🗑️ ×${count}"
style = "bright-white"
format = "$all_status $ahead_behind"

[hostname]
ssh_only = false
format = "[$hostname]($style) "
trim_at = "-"
style = "bold dimmed white"
disabled = false

[time]
time_format = "%T"
format = "🕙 $time($style) "
style = "bright-white"
disabled = true


# [battery]
# full_symbol = "🔋"
# charging_symbol = "🔌"
# discharging_symbol = "⚡"
# disabled = false

# [[battery.display]]
# threshold = 30
# style = "bold red"


이제 원하는 쉘이 생겼습니다 😉

좋아요와 공유 부탁드립니다.

오타를 용서하십시오 CU의 I'm NOOB

좋은 웹페이지 즐겨찾기