{"id":1540,"date":"2016-10-12T00:01:00","date_gmt":"2016-10-12T05:01:00","guid":{"rendered":"http:\/\/linuxitos.com\/main\/por-que-uso-zsh-y-no-bash\/"},"modified":"2016-10-12T00:01:00","modified_gmt":"2016-10-12T05:01:00","slug":"por-que-uso-zsh-y-no-bash","status":"publish","type":"post","link":"https:\/\/linuxitos.com\/main\/por-que-uso-zsh-y-no-bash\/","title":{"rendered":"\u00bfPor qu\u00e9 uso ZSH y no Bash?"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\">\n<div style=\"text-align: center;\"><\/div>\n<div style=\"text-align: center;\"><img decoding=\"async\" border=\"0\" src=\"https:\/\/1.bp.blogspot.com\/-_0iVhMJuzIQ\/WAaxxXCdcqI\/AAAAAAAADnU\/zJ6h_DhDR3kQtiIPGnHxbgJ-ghRnjdmHgCLcB\/s640\/1terminal.gif\" \/><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><span style=\"font-size: large;\">Bash (Bourne again shell) es un int\u00e9rprete de \u00f3rdenes para nuestro sistema con base Linux, adem\u00e1s de un lenguaje de programaci\u00f3n, que es con lo que interactuamos cada vez que abrimos un terminal en Linux. No importa la distribuci\u00f3n de Linux que uses, estoy convencido de que por defecto viene con Bash o derivadas de ella.<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">El problema es, que si bien usando bash-completion hacemos que Bash obtenga una serie de funciones que no vienen activadas por defecto, como el autocompletado de comandos, hay otras alternativas para nuestro terminal que nos permiten trabajar de forma m\u00e1s productiva y m\u00e1s r\u00e1pido.<\/span><\/div>\n<div style=\"text-align: justify;\"><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: x-large;\">ZSH<\/span><\/div>\n<div style=\"text-align: justify;\"><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">La historia de Z Shell (a.k.a Zsh&nbsp;<a href=\"http:\/\/www.zsh.org\/\">http:\/\/www.zsh.org<\/a><\/span><span style=\"font-size: large;\">) la pueden encontrar en Internet. Yo lo que voy a mostrar son algunas de las cualidades que tiene que lo hacen una excelente opci\u00f3n y los motivos por el cual yo lo uso. Adem\u00e1s, para aumentar a\u00fan m\u00e1s sus posibilidades y mejorar su apariencia, podemos hacer uso de Oh My Zsh&nbsp;<\/span><a href=\"http:\/\/ohmyz.sh\/\" style=\"font-size: x-large;\">http:\/\/ohmyz.sh<\/a><span style=\"font-size: large;\">, lo cual podemos instalar f\u00e1cilmente siguiendo las instrucciones de sus sitio web.<\/span><\/div>\n<div style=\"text-align: justify;\"><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: x-large;\">Primero el Autocompletado de directorios con cd<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">Cuando usamos el comando cd para trabajar con directorio, ZSH es capaz de mostrar cuales son los posibles directorio y subdirectorios a los que podemos acceder al escribir el comando y pulsar la tecla.<\/span><\/div>\n<div style=\"text-align: justify;\"><\/div>\n<div>\n<div style=\"text-align: center;\"><img decoding=\"async\" border=\"0\" src=\"https:\/\/2.bp.blogspot.com\/-mHPz1TzV0LI\/WAaxPEcuetI\/AAAAAAAADnM\/wdbxccGDQfAqulmWNOb-CpgrWBDn7S-fACEw\/s640\/2terminal.gif\" \/><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><span style=\"font-size: large;\">Pero eso no es tan \u00fatil como la siguiente opci\u00f3n del comando cd.<\/span><\/div>\n<div style=\"text-align: justify;\"><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: x-large;\">Segundo Autocompletado de nombre de rutas<\/span><\/div>\n<div style=\"text-align: justify;\"><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">Yo lo llamo Autocompletado de nombre de rutas, y lo que hace es que, poniendo por ejemplo \/des\/carp\/m\/ al presionar la tecla Tab, Zsh nos auto-completa la ruta Descargas\/carpComp\/M&amp;S\/<\/span><br \/><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"text-align: center;\"><img decoding=\"async\" border=\"0\" src=\"https:\/\/2.bp.blogspot.com\/-YlA6xkq0fCE\/WAaxPGdt7XI\/AAAAAAAADnI\/DnkucguXZEQ3X1VtyYxl48Qaarl7167AACEw\/s640\/3terminal.gif\" \/><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><span style=\"font-size: large;\">Pero la cosa no termina aqu\u00ed. Ahora les muestro la funcionalidad que m\u00e1s uso posiblemente con ZSH y es la siguiente. Como sabemos, cuando ejecutamos varios comandos en Bash, estos se van guardando en un historial. Si queremos volver a repetir el comando anterior, simplemente con la flecha de arriba lo volvemos a mostrar \u00bfcierto?<\/span><\/div>\n<div style=\"text-align: right;\"><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">Pues con ZSH es lo mismo, pero, tiene otra caracter\u00edstica. Si antes de darle a la flecha de arriba, escribimos un comando, por ejemplo cd, &nbsp;en vez de mostrar todos los comandos anteriores en el historial, nos mostrar\u00e1, todo los comandos anteriores que ejecutamos solo que comienzan con cd.<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><span style=\"font-size: large;\"><img decoding=\"async\" border=\"0\" src=\"https:\/\/3.bp.blogspot.com\/-wIyUGFgTTgQ\/WAaxug32RqI\/AAAAAAAADnQ\/v52zk6JYvAI2cVMHawLOgf-FjSjq9FSrQCEw\/s640\/4terminal.gif\" style=\"font-size: medium; text-align: right;\" \/><\/span><br \/><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">De todos modos, la mejor forma de entender lo que digo es usar ZSH, as\u00ed que s\u00f3lo tienen que instalarlo.<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">Para derivados de Fedora:<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><a href=\"https:\/\/linuxgx.blogspot.mx\/2016\/05\/instalar-zsh-en-fedora-24.html\">https:\/\/linuxgx.blogspot.mx\/2016\/05\/instalar-zsh-en-fedora-24.html<\/a><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">Para derivados de Arch:<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><a href=\"https:\/\/linuxgx.blogspot.mx\/2016\/05\/shell-zsh-en-manjaro.html\">https:\/\/linuxgx.blogspot.mx\/2016\/05\/shell-zsh-en-manjaro.html<\/a><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div><span style=\"font-size: large;\">Hay much\u00edsimas otras cosas que podemos hacer con este int\u00e9rprete de \u00f3rdenes, pero ya queda por ustedes hacer la tarea.<\/span><br \/><span style=\"font-size: large;\"><br \/><\/span><span style=\"font-size: large;\">Y si a eso le agregan que pueden tener una terminal como \u00e9sta, es perfecto.<\/span><br \/><span style=\"font-size: large;\"><br \/><\/span><\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" border=\"0\" src=\"https:\/\/1.bp.blogspot.com\/-7L8MzwgjZ-Y\/WAa1DuSysRI\/AAAAAAAADng\/iYJdDU6Za1oRjY9n5Yf7vJNcGzmfrW7YACLcB\/s640\/Captura%2Bde%2Bpantalla%2Bde%2B2016-10-18%2B18-48-59.png\" \/><\/div>\n<p><span style=\"font-size: large;\"><br \/><\/span><\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" border=\"0\" src=\"https:\/\/4.bp.blogspot.com\/-pFrPYiI04o0\/V_3EYIZC_5I\/AAAAAAAADlM\/t4NNb3TWqIM929Ajh5zs7dlWUk7lEqg3ACLcB\/s640\/Captura%2Bde%2Bpantalla%2Bde%2B2016-10-12%2B00-03-41.png\" \/><\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Bash (Bourne again shell) es un int\u00e9rprete de \u00f3rdenes para nuestro sistema con base Linux, adem\u00e1s de un lenguaje de programaci\u00f3n, que es con lo que interactuamos cada vez que abrimos un terminal en Linux. No importa la distribuci\u00f3n de Linux que uses, estoy convencido de que por defecto viene con Bash o derivadas de [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[374,375,383,7,384,219],"tags":[],"class_list":["post-1540","post","type-post","status-publish","format-standard","hentry","category-apricity","category-arch","category-bash","category-fedora","category-mis-razones","category-zsh"],"_links":{"self":[{"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/posts\/1540","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/comments?post=1540"}],"version-history":[{"count":0,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/posts\/1540\/revisions"}],"wp:attachment":[{"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/media?parent=1540"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/categories?post=1540"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/tags?post=1540"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}