읊다, 읊조리다

Linux 또는 Mac에서 현재 터미널로 oh-my-zsh을 사용하고 있거나 Windows에서 WSL을 사용하고 있다고 들어보셨을 수도 있습니다.PowerShell로 현재 oh-my-posh을 사용하고 있다고 들었을 수도 있습니다.Azure은 기본적으로 Bash Shell과 PowerShell을 모두 사용하는 Azure Cloud Shell 서비스를 제공합니다.따라서 oh my zsh 또는 oh my posh를 원하거나 둘 다 원한다면 스스로 설정해야 합니다.
이 글은 두 개의 셸 환경을 어떻게 설정하는지 보여 줍니다.

This GitHub repository provides the working shell script source for your reference.

가스틴 / 읊다, 읊조리다

Azure Cloud Shell 환경에서 oh my zsh 및 oh my posh를 설정하는 데 사용되는 고집스런 스크립트 모음을 제공합니다.

읊다, 읊조리다

This provides an OPINIONATED collection of scripts to set up oh-my-zsh and oh-my-posh to your Azure Cloud Shell environment.

개시하다

오 마이 갓

If you want to apply oh-my-zsh to your Azure Cloud Shell environment, follow the steps below:

  1. Open your Azure Cloud Shell.

  2. Make sure you are in the bash prompt. If you are in the PowerShell prompt, enter bash to switch the prompt.

  3. Clone this repository to your Azure Cloud Shell.

    git clone https://github.com/justinyoo/oh-my-azure-cloud-shell.git ~/oh-my-azure-cloud-shell
  4. Run the following commands and follow the instruction on the screen.

    ~/oh-my-azure-cloud-shell/install.sh

    The command above will install the Spaceship theme by default. If you prefer the Powerlevel10k theme, run the following command:

    # Turn on the clock feature
    ~/oh-my-azure-cloud-shell/install.sh -t p10k -c
    # Turn off the clock feature
    ~/oh-my-azure-cloud-shell/install.sh -t p10k
  5. Restart your Azure Cloud Shell.

  6. If you want to turn…


오 마이 갓


oh-my-zsh에서 Azure Cloud Shell을 구성하겠습니다.Bash Shell 프롬프트가 표시되는지 확인합니다.없으면 bash 명령을 입력하여 Bash로 프롬프트를 전환합니다.

  • 읊다, 읊조리다


  • oh my zsh에 플러그인을 설치합니다.좋은 플러그인이 많지만 본고는 세 가지 유행하는 플러그인을 설치할 것이다. 그것이 바로 zsh-completions, zsh-syntax-highlightingzsh-autosuggestions이다.추가 플러그 인이 필요한 경우 다음 절차를 따르십시오






  • 테마를 oh my zsh에 설치합니다.어떤 주제를 선택하느냐는 전적으로 당신에게 달려 있지만 본고는 Spaceship 또는 Powerlevel10k을 선택합니다.






  • Powerlevel10k 테마를 선택하면 다음 명령을 실행하여 추가 설정을 하십시오






  • 위에서 설명한 대로 기본적으로 Azure Cloud Shell은 Bash Shell을 사용합니다.죄송합니다. chsh -s $(which zsh) 명령을 실행할 수 없습니다. sudo을 사용할 수 없기 때문입니다.따라서 다음과 같이 솔루션으로 .bashrc을 업데이트하십시오





  • 모든 작업을 완료한 후 Azure Cloud Shell을 다시 시작합니다.또는 명령 source .bashrc을 실행합니다.그리고 oh my zsh applied 셸 프롬프트를 획득합니다


  • 한 명령에서 상술한 모든 절차를 실행하려면 다음 명령을 실행하십시오:






  • Powerlevel10k 테마를 사용하고 현재 시간을 열거나 닫으려면 다음 스크립트를 실행하십시오:






  • 현재 Azure Cloud Shell에서 oh-my-zsh을 시작합니다


    For oh-my-posh


    이번에는 oh-my-poshAzure Cloud Shell을 구성하겠습니다.PowerShell 프롬프트가 표시되는지 확인합니다.없는 경우 pwsh 명령을 입력하여 PowerShell로 프롬프트를 전환합니다



    1. 오, 나의 패션






    2. 내 패션 설치 테마.다시 한 번 말씀드리지만, 어떤 주제를 선택하느냐는 전적으로 당신에게 달려 있습니다. 그러나 이 글은 Spaceship을 선택하든지 Powerlevel10k - Rainbow을 선택하든지






    3. oh my posh에 플러그인을 설치합니다(예: Terminal Icons






    4. PowerShell 세션을 시작할 때 실행할 $PROFILE 파일을 만듭니다






    5. 다음 명령을 실행하여 $PROFILE을 다시 로드합니다






    6. 한 명령에서 상술한 모든 절차를 실행하려면 다음 명령을 실행하십시오:






    7. Powerlevel10k - Rainbow 테마를 사용하고 현재 시간을 열거나 닫으려면 다음 스크립트를 실행하십시오:






    현재 Azure Cloud Shell에서 oh-my-zsh을 시작합니다




    지금까지 저는 oh-my-zsh 또는 oh-my-posh을 어떻게 설정하는지 소개했습니다.이 두 가지 설정을 사용하면 로컬 셸 스크립트 작성 체험을 Azure Cloud Shell으로 확장할 수 있습니다

    좋은 웹페이지 즐겨찾기