Ir al contenido principal

Alias en terminal de Mac OS X

Muchos recordaran, de su paso por GNU/Linux, la existencia de los "alias" en los Shells.
Y siendo sincero, me he acostumbrado mucho ....mucho a escribir vdir, cuando quiero hacer un ls -la, pensaran que ahorro poco, no se. Es mental, me siento mas comodo escribiendo vdir que lo otro.

a)Ejecutar en una pantalla del Terminal :  vi /etc/profile
b)Editar/crear el archivo y agregarle el Alias deseado de la siguiente forma:
     alias aliasname='comando /camino/completo'
    
    ejemplo:
          alias vdir='ls -la'

c)Grabar los cambios con:  :wq!  en el editor VI
d)Cargue/recargue su Profile con:
        . /etc/profile

En la fuente existen mas casos, quizas alguno de ellos se encuentre el que Uds necesiten.


Fuente: higherVisibilityWebsites


ACTUALIZACION

Necesitaba agregar parametros al alias, para utilizarlo con MAVEN y buscando encontre este post.
Que me ayudo a enteder y mejorar mi ALIASes. ;-)

Ejemplo:

alias cdch='cd $1' 


Se hace: (en el mismo archivo /etc/profile)

mycd()
{
cd $1
}
alias cd=mycd

Comentarios

Entradas más populares de este blog

Warp 11

Cuando pense que todo sobre Star Trek, podria estar cubierto, me encontre con esta banda de lunaticos llamados Warp 11, y su Capitan Karl. Miren la opiniones en EEUU: "Warp 11 is one of the best bands in America, not since KISS has a band had this level of shtick, and an amazing sound backing it up." - Mark S. Allen Premiere Radio Networks "Warp 11 is a Trek band that has crossed over from fandom to mainstream music." - Tammy Oler Geek Monthly "This isn't a bunch of Trekkies who decided to rock, but rather it's a buncha rockers who dediced the world of Star Trek was ripe with rockin' potential.. Warp 11 doesn't let any joke get by.. they're so gloriously vulgar!" - Jerry Perry Alive & Kicking "Sactown's own Warp 11 are the bad boys at the Trekkie convention." - Justin Allen Sacramento News & Review "It's Dead, Jim - a typically ass-kicking release from the Warped ones." - A.L. Sirois Sci Fi Channe...

Free as in Freedom

Free as in Freedom interweaves biographical snapshots of GNU project founder Richard Stallman with the political, social and economic history of the free software movement. It examines Stallman's unique personality and how that personality has been at turns a driving force and a drawback in terms of the movement's overall success. Free as in Freedom examines one man's 20-year attempt to codify and communicate the ethics of 1970s era "hacking" culture in such a way that later generations might easily share and build upon the knowledge of their computing forebears. The book documents Stallman's personal evolution from teenage misfit to prescient adult hacker to political leader and examines how that evolution has shaped the free software movement. Like Alan Greenspan in the financial sector, Richard Stallman has assumed the role of tribal elder within the hacking community, a community that bills itself as anarchic and averse to central leadership or authority...

Capitán Raymar : Harlock

Captain Harlock ( 宇宙海賊キャプテンハーロック , Uchū Kaizoku Kyaputen Hārokku , lit. Space Pirate Captain Harlock ) is a fictional character created by manga artist Leiji Matsumoto . Harlock is the archetypical romantic hero, a space pirate with an individualist philosophy of life. He is as noble as he is taciturn, rebellious, stoically fighting against totalitarian regimes, whether they be earthborn or alien. In his own words, he "fight[s] for no one's sake... only [...] for something deep in [his] heart". The character first appears in Adventures of a Honeybee . (1953) The first series featuring Harlock in the lead role is 1978's Space Pirate Captain Harlock . As with most of Matsumoto's works, continuity is not a crucial issue. An appearance of any particular version of the character does not necessarily connect to any previous or following versions, and the interconnectedness of the various series is a common subject of speculation among fans. International releases...