From: Merciadri Luca on 6 May 2010 13:40 Hi, I would like to define an alias with some `-' characters into it, in my .bashrc. For example, if `this-is-my-alias' is my alias, I would use == alias 'this-is-my-alias'='some command to achieve' == It simply does not work. Why? I tried without `'' but emacs then stops highlighting the word, which is no good sign. Thanks. -- Merciadri Luca See http://www.student.montefiore.ulg.ac.be/~merciadri/ I use PGP. If there is an incompatibility problem with your mail client, please contact me. Instruction ends in the schoolroom, but education ends only with life. (F. W. Robertson)
From: Sven Joachim on 6 May 2010 14:00 On 2010-05-06 19:31 +0200, Merciadri Luca wrote: > I would like to define an alias with some `-' characters into it, in my > .bashrc. For example, if `this-is-my-alias' is my alias, I would use > > == > alias 'this-is-my-alias'='some command to achieve' > == > > It simply does not work. Why? Don't know -- it works for me in bash 4.1.5(1)-release. > I tried without `'' but emacs then stops > highlighting the word, which is no good sign. Syntax highlighting in Emacs' shell-script-mode leaves much to be desired, so this is not really a bad sign. Does it work if you leave out the apostrophes? Sven -- To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org Archive: http://lists.debian.org/87pr18ly1b.fsf(a)turtle.gmx.de
From: d.sastre.medina on 6 May 2010 14:00 On Thu, May 06, 2010 at 07:31:28PM +0200, Merciadri Luca wrote: > I would like to define an alias with some `-' characters into it, in my > .bashrc. For example, if `this-is-my-alias' is my alias, I would use > > == > alias 'this-is-my-alias'='some command to achieve' > == Hello, It does work here. I defined: alias this-is-a-test="uname -a" in my .bashrc, and then I sourced it: source .bashrc Issuing the alias produces the expected results: $ this-is-a-test Linux ghost 2.6.26-2-686-bigmem #1 SMP Tue Mar 9 18:01:52 UTC 2010 i686 GNU/Linux > It simply does not work. Why? I tried without `'' but emacs then stops > highlighting the word, which is no good sign. Thanks. Vim does not expect an alias word to contain dashes, and highlight does not work as expected. Regards. -- Huella de clave primaria: 0FDA C36F F110 54F4 D42B D0EB 617D 396C 448B 31EB
From: Alexander Batischev on 6 May 2010 14:00 Small note about highlighting â if you add quotes, emacs (and vim, and any other editor with syntax highlighting as well) thinks that it's a string and highlight it. If alias name isn't highlighted that doesn't mean that it won't work. So don't think about highlighting â everything works ;) Sincerely, Alexander Batischev -- To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org Archive: http://lists.debian.org/j2m28c1d5ea1005061055rf3c9b8deo62b4e33ea9de37b0(a)mail.gmail.com
From: Alexander Batischev on 6 May 2010 14:00 On 6 May 2010 20:31, Merciadri Luca wrote: > It simply does not work. Why? I tried without `'' but emacs then stops > highlighting the word, which is no good sign. Thanks. Don't mind about highlighting â alias defined in away like that: $ alias hello-world="echo 'hello world'" will work. Tested on bash 4.1.5(1)-release (i486-pc-linux-gnu). Regards, Alexander Batischev -- To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org Archive: http://lists.debian.org/m2q28c1d5ea1005061050h58958c33v58a8b61cd5e59d5(a)mail.gmail.com
|
Next
|
Last
Pages: 1 2 Prev: Current through USB bus Next: TOra with Oracle support (was: Re: Kde 3.5 ...) |