Aydin Hassan
Aydin Hassan

Reputation: 1475

Providing an alias with a arguement without it evaluating to two strings

Hi I have added this alias to my .bashrc:

alias awrco='svn co https://x.x.com/x/x/x/projects/'

I want to be able to type at the command line:

awcro project1/src/

and it evaluate to:

svn co https://x.x.com/x/x/x/projects/project1/src

Is this possible? At the minute the command obviously evaluates to:

svn co https://x.x.com/x/x/x/projects/ project1/src    <--- note the space between projects and project1.

I have tried searching for this problem but to no avail.

Thanks in advance for your help

Upvotes: 1

Views: 61

Answers (1)

Igor Hatarist
Igor Hatarist

Reputation: 5442

Create a function instead:

function awrco() { svn co https://x.x.com/x/x/x/projects/"$@" ;}

Upvotes: 4

Related Questions