Xonsh: Tsare-tsare Umurnin Sakon da Harshen Shell

Xonsh: Tsare-tsare Umurnin Sakon da Harshen Shell

Xonsh: Tsare-tsare Umurnin Sakon da Harshen Shell

A 'yan kwanakin nan na yi ta binciken Intanet, ina neman bayanai masu amfani da suka shafi su Scriptan Shell. Domin sabunta lambar ƙaramin kayan aikin software na ƙirƙira sama da shekaru goma da suka wuce. Aikace-aikacen da a lokacin, aka kira Shigar Linux Post - Rubutun Bicentennial (LPI-SB), kuma an samar dashi kawai tare da Umarnin tushen Bash. Kuma a tsakiyar wannan binciken na ci karo da wani amfani ko shirin mai ban sha'awa mai suna "Xonsh".

Ga waɗanda ba su taɓa jin wannan aikace-aikacen ba, yana da kyau a jira cewa babban kayan aiki ne software ta ƙarshe miƙa a harshe harsashi da kuma Canza-dandamali umarnin umarni wanda ke aiki da Python.

Scriptan Shell

Kuma kamar yadda muka saba, kafin mu shiga cikin maudu’inmu na yau Tashar kayan aiki da amfani, da ƙari musamman game da aikace-aikacen mai amfani da ake kira  "Xonsh", za mu bar wa masu sha'awar wadannan hanyoyin zuwa wasu abubuwan da suka shafi baya. Ta yadda za su iya gano su cikin sauƙi, idan ya cancanta, bayan kammala karatun wannan littafin:

“Rubutun Shell ita ce dabara (ƙwarewar) na ƙirƙira da ƙirƙirar Rubutun (fayil ɗin aiki da kai) ta hanyar Shell (zai fi dacewa) na Tsarin Ayyuka, ko Editan Rubutu (Graphic ko Terminal). Wannan nau'in yaren shirye-shirye ne wanda galibi ana fassara shi. Wato yayin da galibin shirye-shiryen ana tattara su (incrypted), saboda ana canza su har abada zuwa takamaiman lambar (na musamman) kafin a iya aiwatar da su (tsarin tattarawa), rubutun harsashi ya kasance a cikin asalinsa (madogarar lambar sa a cikin hanyar). rubutu) kuma ana fassara umarni ta hanyar umarni duk lokacin da aka kashe su". Shell, Bash da Rubutun: Duk game da Rubutun Shell

Albarkatun yanar gizo don Rubutun Shell Shell
Labari mai dangantaka:
Albarkatun kan layi da kuma abubuwan more rayuwa don Koyon Rubutun Harsashin Shell

Scriptan Shell
Labari mai dangantaka:
Gina shirinku mataki zuwa mataki ta amfani da rubutun Shell - Sashe na 1

Xonsh: Shell don Bash, Python da ƙari

Xonsh: Shell don Bash, Python da ƙari

Menene Xonsh?

A cewar ka shafin yanar gizo, aikace-aikace "Xonsh" An bayyana shi a taƙaice kamar haka:

"Harsashi ne da Python ke sarrafa shi. Harshen harsashi na giciye-dandamali da faɗakarwar umarni ta Python. Harshen babban tsari ne na Python 3.6+ tare da wasu ƙarin harsashi waɗanda kuka saba dasu daga Bash da Python. Yana aiki akan duk manyan tsarin ciki har da Linux, OSX da Windows. An yi nufin Xonsh don amfanin yau da kullun ta hanyar kwararru da novice".

Sai dai daga baya sun kara da cewa:

"Duk wani mai amfani da tasha zai iya haɗawa cikin sauƙi Python da umarnin Shell (kamar Bash) a cikin ingantaccen tsarin layin umarni.".

Wanne, a cikin kalmomi masu sauƙi, yana nufin cewa lokacin aiwatarwa "Xonsh" Ana ba mu Shell ko muhallin tasha inda za mu iya gudanar da sauƙaƙan umarni guda biyu kamar yadda Complex Bash Shell Command Commands kamar yadda Python. Wanda zai iya zama da amfani sosai, duka biyu don SysAdmin da Devs, da kuma ga masu sha'awar tashar jiragen ruwa da masu farawa, ko dai don koyo ko fara aiki.

Ayyukan

A halin yanzu, "Xonsh" ya tafi nasa sabuwar sigar na lamba 0.11.0, saki ranar 17 / 11 / 21. Kuma ana iya shigar da shi ta hanyoyi da yawa, misali, ta hanyar na'ura wasan bidiyo, ta hanyar gargajiya tare da mai sarrafa fakitin da aka saba amfani da shi a cikin kowane GNU/Linux Distro, kamar yadda mai sarrafa ya yi. Python pip, ko ta hanyar fayil ɗin AppImage ko amfani da Docker.

Daga cikinsu halaye na gaba ɗaya ko ayyuka yana da wadannan:

  1. Yana ba ku damar haɗa umarnin Shell (Bash) tare da Python ko akasin haka.
  2. Yana ba da damar yin amfani da kari na ɓangare na uku, xontributions ko xontribs, waɗanda ba kome ba ne face saitin kayan aiki da ƙa'idodi don ƙaddamar da ayyukan xonsh.
  3. Yana ba da ƙaƙƙarfan keɓancewa dangane da sarrafa tarihi, tunda yana ƙirƙirar fayilolin tarihi tare da ingantaccen tsari da metadata da API don yin hulɗa da su.
  4. Ya haɗa da gyare-gyaren gaggawa mai ƙarfi ta hanyar kammala shafin, ɗaurin maɓalli, da salon launi da za'a iya gyara su ta tsohuwa.

Yayin, a cikin wannan sabuwar sigar yanzu an haɗa sabbin abubuwa, kamar:

  1. Ƙara ƙungiyar maɓallan CTRL-Right don kammala kalma ɗaya ta atomatik.
  2. Nuna nau'in da bayanin masu canjin yanayi bayan kammalawa.
  3. Ingantaccen pip/xpip.
  4. Ƙara maɓallin CTRL-Backspace don share kalma ɗaya ta hanyar $XONSH_CTRL_BKSPC_DELETION.

Don ƙarin bayani akan "Xonsh" Kuna iya ziyartar sashin hukuma a PyPi y GitHub, ko kai tsaye sashenku na Takardun y tutorial, a kan official website.

Siffar allo

A cikin yanayinmu, bayan shigar da umarnin «sudo apt install xonsh» da na gaba «sudo pip3 install prompt_toolkit», mun sami damar fara aiwatar da shi kuma buga umarnin Bash da Python kai kadai Shell, kamar yadda aka nuna a ƙasa:

Buɗe Tasha

Screenshot 1

Yana aiki da Xonsh Shell

Screenshot 2

Screenshot 3

Misalan Umurnin Bash

Xonsh: Hoton hoto 4

Xonsh: Hoton hoto 4

Misalin umarnin Python

Xonsh: Hoton hoto 5

A ƙarshe, don bincika ƙarin labarai akan Rubutun Harshe a cikin FromLinux za ka iya danna wadannan mahada. Kuma idan kuna sha'awar ganin aikace-aikacen da nake haɓakawa da shi bash zallaIna ba ku shawara ku je wurina Tashar YouTube kuma kalli bidiyon game da Shigar Linux Post - Rubutun Ingantawa Na atomatik (LPI-SOA).

Zagaye: Banner post 2021

Tsaya

A takaice, "Xonsh" babban kayan aiki ne software ta ƙarshe (CLI). Menene ƙari, yana da matukar amfani ga waɗanda suke ƙauna yi rubutun ko aiwatar da Rubutun Shell, ba kawai game da Bash amma game da Python, da sauransu (Zsh, Kifi, da Plumbum). Don haka muna fatan hakan kayan aiki mai ban sha'awa ci gaba da bunkasa don amfanin masu sha'awar Masu amfani da GNU / Linux, da kuma Terminal.

Muna fatan wannan littafin yana da amfani sosai ga gaba ɗaya «Comunidad de Software Libre, Código Abierto y GNU/Linux». Kuma kar ku manta da yin tsokaci game da shi a ƙasa, kuma ku raba shi tare da wasu akan shafukan yanar gizon da kuka fi so, tashoshi, kungiyoyi ko al'ummomin cibiyoyin sadarwar jama'a ko tsarin saƙo. A ƙarshe, ziyarci shafinmu a «DagaLinux» don bincika ƙarin labarai, da shiga tashar tashar mu ta hukuma Sakon waya daga FromLinux.


Abubuwan da ke cikin labarin suna bin ka'idodinmu na ka'idojin edita. Don yin rahoton kuskure danna a nan.

Kasance na farko don yin sharhi

Bar tsokaci

Your email address ba za a buga. Bukata filayen suna alama da *

*

*

  1. Mai alhakin bayanan: Miguel Ángel Gatón
  2. Dalilin bayanan: Gudanar da SPAM, gudanar da sharhi.
  3. Halacci: Yarda da yarda
  4. Sadarwar bayanan: Ba za a sanar da wasu bayanan ga wasu kamfanoni ba sai ta hanyar wajibcin doka.
  5. Ajiye bayanai: Bayanin yanar gizo wanda Occentus Networks (EU) suka dauki nauyi
  6. Hakkoki: A kowane lokaci zaka iyakance, dawo da share bayanan ka.