Linux terminal nalh leh hman nuam zawka customize dan:

Linux terminal nalh leh hman nuam zawka customize dan:

Tun tum a terminal customize dan ka rawn sawi tur ber hi chu zsh leh oh-my-zsh install dan ani a, enge an nih chu a chiang zawkin kan la sawi anga, enge an nih chiah tih leh enge an that bik na tih te kan en chho zel dawn ani.

Tuna terminal ka customize tur hi Debian leh Debian behchhan a siam Linux distro dang Ubuntu, PopOS, Linux Mint tih velah chuan a tihdan a in ang vek anga, mahse distribution dangah chuan a hrang ve hlek maithei e.

Ngati nge customize kher a ngaih chhan?

Debian distro leh a family (ti tawh mai ang.. Ubuntu, Kubuntu, PopOs, etc.) hian default in a tirah GNOME Terminal a rawn keng a, a rawng hi hmuh chu a nuam tho maia, mahse a font hman te nen zawng zawng phei hi chuan chuti teh ual a hmuh nuam leh mit la chu ani tehchiam lo.

Ubuntu in terminal a rawn chhawm sa cho Gnome Terminal ani a, a mawi teh chiam lem lo. Bakah, bash zawk hi shell atan a rawn hmanga, tuna kan tum ber pahkhat chu a shell pawh thlak tela, bash aia zsh install kan tum ani. Linux computer i hmanga, eng shell nge i hman i hre duh anih chuan hemi command hi i hmang dawn nia : echo $SHELL

usr/bin/bash tih vel alo display anga tuna ka terminal rawn tarlan ah hi chuan. Bash a rawn chhawm miau avangin. Chuan zsh in kan thlak dawn ani. Hetiang deuha lang tur hian:

Installing zsh

Zsh hi chu apt repository ah a awm sa avangin awlsam te a install mai theih a ni a. Mahse chumi hma in kan apt repository kan update ve phawt ang:

sudo apt update -y

Chuan a zawh ah zsh chu kan install ang:

sudo apt install zsh

A in install dik ngei ani tih i check duh chuan which zsh tih command hi hmang la, zsh a in install na path chu alo lang mai ang. Emaw zsh --version tih hian a version alo in display bawk ang.

TIkhan zsh chu install tawh mah la, automatic in i terminal khan a hmang nghal taqwp thei lova, default shell ni tura i set chawp leh te te a ngai ani. Chumi ti tur chuan he command hi run la:

chsh -s $(which zsh)

Heti kher lo pawh hian which zsh tih command i run khan /usr/bin/zsh tih vel alo in ziak anga chumi chu copy la, chsh -s /usr/bin/zsh tia tih pawh khan a in ang reng ani.

Installing Oh My Zsh

Oh My Zsh hi Zsh behchhana shell framework an siam a ni a, thil rawn ken tel tamtak a nei a, theme te, plugins te, plugins ah pawh auto-suggestions te leh syntax highlighting te, a tangkai chi hlir a rawn chhawm tir a, a tul leh mamawh dana install belh tur pawh a awm nual bawk.

Oh My Zsh install tur chuan hemi command hi i terminal ah khan run rawh le:

sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"

I install zawh ah zsh hi i default shel atan i duh leh duhloh a rawn zawt nawn kher maithei che a, i duh chuan 'y' enter la, duhloh chuan 'n'.

Tichuan i install zawh ah chuan i duh leh a theme te pawh i thlak kual thei tawha,

Oh My Zsh Themes Github hian theme chi hrang hrang an neia, i duh ber download la, chuan oh-my-zsh tih folder chhunga themes tih folder ah khan suan luh ve hmiah a ni mai. oh-my-zsh tih folder chu a awmna i hrelo anih chuan

sudo find /home -iname 'oh-my-zsh'

Hemi command hi run la, oh-my-zsh folder awmna path chu i hmu thei nghal mai ang.

Tichuan i themes duh te chu 'themes' folder ah chuan ilo suan lut zo ta a, tichuan i theme install thar te chu i lo activate dawn ang hmiang. Terminal han hawng la,

nano ~/.zshrc

Hei hi han run phawt mai la, zshrc file khi kan edit dawn ani. Scroll thla zel la, ZSH_THEME= tih awmna line tak kha ani kan edit tur chu.

"robbyrussell" tih aiah kan theme duh hming kha dah mai tur ani a, download chawp kher ngailo pawn oh-my-zsh pawh hian thahnem tak chu a rawn chhawm sa ani.

Installing required fonts

Oh-my-zsh kan install hian theme dang te kan hmang duh thina, powerline te kan hman duh thin avangin font support bik an neia. Chung a font support bik te chu:

  • FiraCode

  • Meslo

  • JetBrains

Heng ho hi ka hman tawh a support tih ka chian te an ni a, Nerd Fonts dang pawh a support teuh a ni. Hemi Nerd Fonts Website atang hian i font duhber i install anga, tichuan i install zawhah terminal Settings ah khan Preferences > Profiles > Unnamed Profile > Text ah khan custom font checkbox kha i check anga, chuan nichina i font install thar kha i hmang ang; chuan Preferences window kha chu i close thei tawh e.

Khami settings atang khan a color palette tur te, cursor awmdan te leh transparency thlengin a set theiha, kha chu nangma duhthlanna a ni tawh e. Chuan theme installation ah kan lut thei ta..

Installing Powerlevel10k theme

Kei hi chuan Powerlevel10k theme kher ka hman duh avangin Github ami a hranpa in ka clone dawn ani.

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

Tichuan hemi ka clone zawha ka tih tur zawng chu ka ~/.zshrc file a ZSH_THEME= ah khan "powerlevel10k/powerlevel10k" tih hi (double quotation nen) ka va telh anga,ka save a ka chhuah hnu ah khan ka ~/.zshrc file update tur in source ~/.zshrc tih command hi run leh a ngai ani. TIchuan theme thar chu alo in apply chiah tawh ang.

Tichuan p10k configure tih command i run leh anga, i powerlevel10k theme kha i customize dawn ani. A script in a zawh ang zel che kha yes, no, 1, 2, 3, tih vel mai mai a chhan tur ania, tichuan i duh ang tak i thlan hnu ah a tawpah i save tir anga, chuan chumi i theme duh dan ang tak chu alo in apply dawn ta a ni.

Installing Syntax Highlighting

Theme lampang chu duhtawk ta ila, tuna mi hi chu rawng awmze nei an ni tawh dawna, kan text chhut a spelling emaw command a dik leh dikloh a zir a rawng danglam min pe tu tur ani a, spelling mistake te hmuh a awl phah a, mi a pui ve hle ani. Install tur chuan hemi clone command hi run a ngai:

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting

Installing Auto-Suggestions

Auto-suggestions hi chuan kan command run zin deuh te leh kan command chhut lai mek mil in suggestions a rawn siam thin a, a thil rawn suggest kha hman duh chuan Right Arrow (->) hmeh tawp ani mai; word by word in a suggestion i accept duh anih chuan Ctrl + Right Arrow (->) a ni ve thung.

Clone na command:

git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions

Tichuan syntax highlighting leh auto-suggestions te chu kan lo install ta a, activate tur chuan ~/.zshrc file leh bawk kha kan edit a ngai a:

plugins=(git) tih awmna tlar hi zawng la, chuan backet chhungah khuan i plugins install thar chu i zuk ziak lut ve dawn ani. Hetiang hian:

plugins=(git zsh-autosuggestions zsh-syntax-highlighting)

~/.zshrc file chu save la, close la, chuan i thil thlak danglam te kha a in update theih nan source ~/.zshrc tih command i run leh anga, tichuan syntax highlighting leh zuto-suggestion chu alo thawk tawh mai dawn ani.

I source hnu pawha a la danglam lo anih chuan i terminal kha close la, han log out la, han log in leh vel chhin la a thawk mai ang, settings in reload loh chang hi a awm ve thin.

Conclusion:

Tuna ka oh-my-sh plugins rawn sawi te bakah khian a dang tha tak tak a la awma, Oh My Zsh Plugins Wiki ah hian i plugins duh leh mamawh dang a awm leh awmloh te ilo va en kual ve dawn nia, hman tangkai deuh pawh ilo nei mial maithei asin.

Ka thil ziah ilo chhiar avangin lawmthu ka sawi a, chutih rualin eng emaw tal i thiam belh ngei ka beisei. Feedback te lo pe ve zel ula, in tana blog tangkai zawk kalo ziah zel theih nan.