I-Xonsh: I-Cross-Platform Command Prompt kanye nolimi lweShell

I-Xonsh: I-Cross-Platform Command Prompt kanye nolimi lweShell

I-Xonsh: I-Cross-Platform Command Prompt kanye nolimi lweShell

Kulezi zinsuku zakamuva bengiphequlula i-inthanethi, ngifuna ukwaziswa okuwusizo okuhlobene Isikripthi se-Shell. Ukuze ngibuyekeze ikhodi yethuluzi lesofthiwe eliwusizo engilidalile eminyakeni engaphezu kweshumi edlule. Isicelo ngaleso sikhathi, sabizwa Faka i-Linux Post - Bicentennial Script (LPI-SB), futhi yakhiwe kuphela nge Imiyalo esekelwe ku-Bash. Futhi phakathi nalokho kusesha ngihlangabezane nensizakalo ethokozisayo noma uhlelo olubizwa "Xonsh".

Kulabo abangakaze bezwe ngalolu hlelo lokusebenza, kufanelekile ukulindela ukuthi iyithuluzi elihle kakhulu isofthiwe yokugcina lokho kunikeza ulimi lwegobolondo futhi a Umyalo we-Cross-platform esebenza nge Python.

Isikripthi se-Shell

Futhi njengenjwayelo, ngaphambi kokuthi singene esihlokweni sanamuhla sokuthi Amathuluzi wetheminali kanye nokusetshenziswa, futhi ngokuqondile mayelana nohlelo lokusebenza oluwusizo olubizwa  "Xonsh", sizoshiya kulabo abathanda izixhumanisi ezilandelayo kwabanye okuthunyelwe kwangaphambilini okuhlobene. Ngendlela yokuthi bangazihlola kalula, uma kunesidingo, ngemva kokuqeda ukufunda le ncwadi:

“I-Shell Scripting iwubuchule (ikhono) lokuklama nokudala i-Script (ifayela elizenzakalelayo lomsebenzi) ngeShell (okungcono kakhulu) Yohlelo Olusebenzayo, noma Isihleli Sombhalo (Isithombe noma Itheminali). Lolu wuhlobo lolimi lokuhlela olutolikwa ngokujwayelekile. Okusho ukuthi, ngenkathi izinhlelo eziningi zihlanganiswa (zibethelwe), ngenxa yokuthi ziguqulelwa unomphela kukhodi ethile (ekhethekile) ngaphambi kokuthi zenziwe (inqubo yokuhlanganisa), iskripthi segobolondo sihlala sisesimweni saso sangempela (umthombo wekhodi yawo ngendlela text) futhi zihunyushwa umyalo ngomyalo isikhathi ngasinye lapho zibulawa". I-Shell, i-Bash ne-Scripts: Konke mayelana ne-Shell Scripting

I-athikili ehlobene:
Izinsizakusebenza eziku-inthanethi nezinsizakusebenza zeShell Scripting

I-athikili ehlobene:
Yakha uhlelo lwakho ngesinyathelo ngesinyathelo usebenzisa i-Shell Scripting - Ingxenye 1

I-Xonsh: Igobolondo le-Bash, i-Python nokuningi

I-Xonsh: Igobolondo le-Bash, i-Python nokuningi

Yini i-Xonsh?

Ngokusho kwe- Iwebhusayithi esemthethweni, uhlelo lokusebenza "Xonsh" Ichazwe kafushane ngale ndlela elandelayo:

"Kuyigobolondo elinikwa amandla yiPython. Ulimi lwegobolondo le-cross-platform kanye nomyalo womyalo oxhaswe yiPython. Ulimi luyi-superset ye-Python 3.6+ enamagobolondo engeziwe owajwayele ukusuka ku-Bash ne-Python. Isebenza kuwo wonke amasistimu amakhulu ahlanganisa i-Linux, i-OSX ne-Windows. I-Xonsh ihloselwe ukusetshenziswa nsuku zonke ngochwepheshe nabaqalayo".

Nokho, kamuva bangeza ukuthi naye:

"Noma yimuphi umsebenzisi wokugcina angaxuba kalula imiyalo yePython neShell (efana neBash) ngendlela enamandla nelula yomugqa womyalo.".

Okungukuthi, ngamagama alula, kusho ukuthi lapho kwenziwa "Xonsh" sinikezwa iShell noma indawo yokugcina lapho singakwazi khona sebenzisa imiyalo elula yomibili njengoba I-Complex Bash Shell Command Prompts njengoba kwe Python. Okungaba usizo kakhulu, kokubili I-SysAdmin ne-Devs, kanye nalabo abathanda ukugcina kanye nabaqalayo, ukufunda noma ukuqala ukusebenza.

Izici

Okwamanje, "Xonsh" uya ngeyakhe inguqulo yakamuva kwenombolo 0.11.0, wakhulula usuku 17 / 11 / 21. Futhi ingafakwa ngezindlela eziningi, ngokwesibonelo, nge-console, ngendlela evamile nomphathi wephakheji evamile esetshenziswa ku-GNU/Linux Distro ngayinye, njengomphathi. i-python pip, noma ngefayela le-AppImage noma usebenzisa i-Docker.

Phakathi kwakhe izici ezijwayelekile noma imisebenzi inokulandelayo:

  1. Ikuvumela ukuthi uhlanganise (Bash) imiyalo yeShell nePython noma okuphambene nalokho.
  2. Ivumela ukusetshenziswa kwezandiso zenkampani yangaphandle, i-xontributions noma i-xontribs, engeyona into engaphezu kwesethi yamathuluzi nezimiso zokwandisa ukusebenza kwe-xonsh.
  3. Inikeza ukusebenzelana okuqinile ngokwemibandela yokuphathwa komlando, njengoba idala amafayela omlando anesakhiwo esicebile nemethadatha kanye ne-API ukuze ihlanganyele nawo.
  4. Kuhlanganisa ukwenza ngendlela oyifisayo ngokushesha okunamandla ngokuqeda ithebhu, ukubophezela okubalulekile, nezitayela zombala ozenzeka ngokwezifiso ezakhelwe ngaphakathi ngokuzenzakalelayo.

Ngenkathi, kulokhu inguqulo yakamuva izici ezintsha zifakiwe, njenge:

  1. Ukwengezwa kokuhlanganiswa kokhiye be-CTRL-Right ukuze kuqedelwe igama elilodwa le-autosuggestion.
  2. Ukuboniswa kohlobo nencazelo yezinto eziguquguqukayo zemvelo lapho kuqedwa.
  3. Isigcwalisi se-pip/xpip esithuthukisiwe.
  4. Yengeza ukhiye we-CTRL-Backspace ukuze ususe igama elilodwa nge-$XONSH_CTRL_BKSPC_DELETION.

Ngeminye imininingwane nge "Xonsh" Ungavakashela isigaba sayo esisemthethweni kokuthi I-PyPi y GitHub, noma ngokuqondile ingxenye yakho ye imibhalo y Tutorial, kuwebhusayithi yayo esemthethweni.

Izithombe zesikrini

Esimweni sethu, ngemva kokufakwa ngomyalo «sudo apt install xonsh» nokulandelayo «sudo pip3 install prompt_toolkit», sakwazi ukuqala ukuyifeza futhi ukuthayipha imiyalo ye-Bash ne-Python eyodwa kuphela shell, njengoba kukhonjisiwe ngezansi:

Ukuvulwa Kwetheminali

Isithombe-skrini 1

Ukusebenzisa i-Xonsh Shell

Isithombe-skrini 2

Isithombe-skrini 3

Izibonelo Zomyalo we-Bash

Xonsh: Isithombe-skrini 4

Xonsh: Isithombe-skrini 4

Izibonelo zomyalo wePython

Xonsh: Isithombe-skrini 5

Okokugcina, ukuhlola izindatshana ezengeziwe ku I-Shell Scripting ku-FromLinux ungachofoza okulandelayo isixhumanisi. Futhi uma ufisa ukubona uhlelo engithuthukisa ngalo i-bash ehlanzekileNgincoma ukuthi uye kimi Isiteshi se-YouTube futhi ubuke amavidiyo mayelana Ukufaka i-Linux Post - I-Automated Optimization Script (LPI-SOA).

Umjikelezo: Okuthunyelwe kwesibhengezo sango-2021

Isifingqo

Ngokufingqa, "Xonsh" iyithuluzi elikhulu isoftware yetheminali (CLI). Ngaphezu kwalokho, iwusizo kakhulu kulabo abathanda yenza imibhalo noma uzijwayeze i-Shell Scripting, hhayi kuphela mayelana Bash kodwa mayelana Python, phakathi kwabanye (Zsh, Fish, kanye nePlumbum). Ngakho-ke, sithemba ukuthi ithuluzi elithakazelisayo qhubeka nokuthuthukisa ukuze kuzuze labo abanothando Abasebenzisi be-GNU / Linux, kanye netheminali.

Siyethemba ukuthi lolu shicilelo luwusizo olukhulu kubo bonke «Comunidad de Software Libre, Código Abierto y GNU/Linux». Futhi ungakhohlwa ukuphawula ngakho ngezansi, futhi wabelane ngakho nabanye kumawebhusayithi ayizintandokazi zakho, iziteshi, amaqembu noma imiphakathi yezokuxhumana nabantu noma izinhlelo zemiyalezo. Ekugcineni, vakashela ikhasi lethu lasekhaya ku «KusukaLinux» ukuhlola ezinye izindaba, bese ujoyina isiteshi sethu esisemthethweni se- Yocingo kusuka ku-DesdeLinux.


Okuqukethwe yi-athikili kunamathela ezimisweni zethu ze izimiso zokuhlelela. Ukubika iphutha chofoza lapha.

Yiba ngowokuqala ukuphawula

Shiya umbono wakho

Ikheli lakho le ngeke ishicilelwe.

*

*

  1. Ubhekele imininingwane: Miguel Ángel Gatón
  2. Inhloso yedatha: Lawula Ugaxekile, ukuphathwa kwamazwana.
  3. Ukusemthethweni: Imvume yakho
  4. Ukuxhumana kwemininingwane: Imininingwane ngeke idluliselwe kubantu besithathu ngaphandle kwesibopho esisemthethweni.
  5. Isitoreji sedatha: Idatabase ebanjwe yi-Occentus Networks (EU)
  6. Amalungelo: Nganoma yisiphi isikhathi ungakhawulela, uthole futhi ususe imininingwane yakho.