Results 1 to 8 of 8

Thread: Spaces in aliases?

  1. #1
    Just burned his ISO
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    18

    Default Spaces in aliases?

    Hi...
    Because my last topic got nearly instant solved, I want to ask something else. ;D
    Is it possible to do aliases in BT4 (alias xon='startx') and if yes, can I do them with spaces?
    Like 'startx' -> 'x on' or 'start graphical interface' to take an example.
    I hope you know the answer(s)...
    Bye

  2. #2
    Super Moderator Archangel-Amael's Avatar
    Join Date
    Jan 2010
    Location
    Somewhere
    Posts
    8,012

    Default Re: Spaces in aliases?

    Try # man alias or alias MAN Page
    The answers are always a search away.

  3. #3
    Just burned his ISO
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    18

    Default Re: Spaces in aliases?

    Maybe it's just me or the time, but I really don't get it... I'm sure I know everything there, but didn't found anything about using spaces there.
    Could someone explain it a bit further? xD

  4. #4
    Super Moderator Archangel-Amael's Avatar
    Join Date
    Jan 2010
    Location
    Somewhere
    Posts
    8,012

    Default Re: Spaces in aliases?

    Then here is another idea. Try it and see. I mean all this time you could have read the man page and tried it.

  5. #5
    Senior Member Thorn's Avatar
    Join Date
    Jan 2010
    Location
    The Green Dome
    Posts
    1,509

    Default Re: Spaces in aliases?

    Quote Originally Posted by Big-Blue View Post
    Maybe it's just me or the time, but I really don't get it... I'm sure I know everything there, but didn't found anything about using spaces there.
    Could someone explain it a bit further? xD
    It must be you. Specifically, you not reading the alias MAN page. There are at least 10 examples on that page that show use of spaces.
    Thorn
    Stop the TSA now! Boycott the airlines.

  6. #6
    Very good friend of the forum Gitsnik's Avatar
    Join Date
    Jan 2010
    Location
    The Crystal Wind
    Posts
    851

    Default Re: Spaces in aliases?

    Quote Originally Posted by Thorn View Post
    It must be you. Specifically, you not reading the alias MAN page. There are at least 10 examples on that page that show use of spaces.
    I was under the impression the OP was hunting for a counter-intuitive use of an alias:

    alias 'engage hyper drive' 'hd-on'

    I actually don't think alias' can go that way (at least not under tcsh) - it pretty well defeats the purpose of the exercise.

    OP should add ~/bin/ to his/her $PATH and then just create a bunch of two line .sh's without the .sh.
    Still not underestimating the power...

    There is no such thing as bad information - There is truth in the data, so you sift it all, even the crap stuff.

  7. #7
    Senior Member Thorn's Avatar
    Join Date
    Jan 2010
    Location
    The Green Dome
    Posts
    1,509

    Default Re: Spaces in aliases?

    OK, it could be I'm looking at it the wrong way, but in that case, it would seem that what he wants to do is create a script -not an alias- that has an argument. Said scripts would be like the scripts contained in /ect/init.d/ such as 'networking' (which as you know, is invoked as "networking start" or "networking stop", etc.)
    Thorn
    Stop the TSA now! Boycott the airlines.

  8. #8
    Super Moderator Archangel-Amael's Avatar
    Join Date
    Jan 2010
    Location
    Somewhere
    Posts
    8,012

    Default Re: Spaces in aliases?

    Quote Originally Posted by Thorn View Post
    It must be you. Specifically, you not reading the alias MAN page. There are at least 10 examples on that page that show use of spaces.
    Which is exactly why I gave the OP the man page and left it at that. I thought it was kind of self explanatory.
    OP You can use spaces you can actually use any "any valid shell input" and yes that included spaces. More or less this means anything that can be typed into a shell via the keyboard. Since a space has to be typed it will work.
    If you mean something else (like what Gitsnick implied) then I misunderstood what you wanted. So please clarify so we may further assist.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •