You are not logged in.

#1 2009-06-25 04:19:11

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,384
Website

bash alias for "./configure"

I want to achieve what this looks like it might do but doesn't....

alias ./configure="linux32 ./configure"

just using configure=... works but then it is not really the same thing. 

Edit: I tried this but it does not work as "./configure" is not matched.

alias configure="configure --host=i686-pc-gnu-linux --build=i686-pc-gnu-linux"

Offline

#2 2009-06-25 04:35:21

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,222
Website

Re: bash alias for "./configure"

I think you might be crap outta luck Allan neutral

fukawi2 ~  $ alias \.\/configure='ls -a'
bash: alias: `./configure': invalid alias name
fukawi2 ~  $ alias .\/configure='ls -a'
bash: alias: `./configure': invalid alias name
fukawi2 ~  $ alias ./configure='ls -a'
bash: alias: `./configure': invalid alias name
fukawi2 ~  $ alias './configure'='ls -a'
bash: alias: `./configure': invalid alias name

Offline

#3 2009-06-25 07:00:11

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,384
Website

Re: bash alias for "./configure"

I have reached that conclusion too...  sad

Offline

#4 2009-06-25 11:25:52

Xabre
Member
From: Serbia
Registered: 2009-03-19
Posts: 750

Re: bash alias for "./configure"

In zsh it works

alias './configure'='linux32 ./configure'

but not sure how it would help...... sad

Offline

#5 2009-06-25 16:42:44

SamC
Member
From: Calgary
Registered: 2008-05-13
Posts: 611
Website

Re: bash alias for "./configure"

Why don't you use an function?

function lin32config {
  linux32 `pwd`/configure
}

Offline

#6 2009-06-25 21:51:09

agorist
Member
Registered: 2009-06-25
Posts: 3

Re: bash alias for "./configure"

Honestly, why not just:

alias configure="./configure <whatever>"

Do you want to be able to tab complete the ./configure and have it do something else? Aliases'll be tab completed as well, and better yet, you could name it something like:


alias cfg=foo

Such that you never have to even worry about tab completing.

Offline

#7 2009-06-26 01:00:44

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,384
Website

Re: bash alias for "./configure"

I could just use configure="linux32 ./configure" (and that is what my current alias is), but after years of typing ./configure, I would prefer it to be a bit more seamless.  This is the only annoyance left for me while running an x86_64 kernel on the i686 userspace.

Offline

#8 2009-06-26 08:12:06

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: bash alias for "./configure"

You could use a macro, but readline's is recursive, and screen's times out fast, and neither will display what you write, so any ./ will become awkward.

For screen it's bindkey "./c" stuff "linux32 ./c"

Offline

Board footer

Powered by FluxBB