Feature Request: Positional Parameters
Vincent Borghi had an interesting feature request: positional parameters. So instead of typing
gloc -what pizza -where seattle
you could just go
gloc pizza seattle
The command itself would be written with $1, $2, ... to indicate the first word, second word, etc.
Would someone be willing to write (and host) a command (call it, say, positional) that other commands could in turn call?
gloc -what pizza -where seattle
you could just go
gloc pizza seattle
The command itself would be written with $1, $2, ... to indicate the first word, second word, etc.
Would someone be willing to write (and host) a command (call it, say, positional) that other commands could in turn call?
3 Comments:
well, maybe this is what you are looking for:
I've created this command:
http://www.yubnub.org/kernel/man?args=strWordNumber
strWordNumber - Returns a word for a given phrase
This alias for the previous one:
http://www.yubnub.org/kernel/man?args=%25
(I choose the percent(%) because we can refer the params like in a msdos batch file (%1, %2 ...) and because the dollar($) was already in use :(
And this other command:
http://www.yubnub.org/kernel/man?args=googlocal
for... well try it yourself:
googlocal pizza seattle
PS: could you delete this OTHER command:
http://www.yubnub.org/kernel/man?args=srtWordNumber
It has a mistake in its name and may be confusing
Fuska - very clever!!!
Sure I will delete the command you mentioned.
Thats really cool. Definatly useful.
Post a Comment
<< Home