OS4 DepotLogo by Liksmaskaren 
(anonymous IP: 52.15.63.145,2193) 
 HomeRecentStatsSearchSubmitUploadsMirrorsContactInfoDisclaimerConfigAdmin
 Menu

 Features
   Crashlogs
   Bug tracker
   Locale browser
 

 Categories

   o Audio (343)
   o Datatype (51)
   o Demo (203)
   o Development (596)
   o Document (22)
   o Driver (97)
   o Emulation (147)
   o Game (1004)
   o Graphics (497)
   o Library (115)
   o Network (232)
   o Office (66)
   o Utility (923)
   o Video (69)

Total files: 4365

Full index file
Recent index file

 Links

  Amigans.net
  OpenAmiga
  Aminet
  IntuitionBase


Support the site


 File comments for:  Utility » Shell » rearg.lha

Rearg

Description: Adds flexibility to Alias command
Download: rearg.lha
Version: 1.0
Date: 14 Dec 2004
Category: utility/shell
FileID: 369
RSS Feed url: http://os4depot.net/modules/comments/rssfeed.php?file=utility/shell/rearg.lha

[Back to readme page]   [Add Comment]   [Refresh page]

Comment by: AlexC (66.229.32.101)At: 01 Dec 2005, 05:46File version: 1.0
Recently I learned something new, I thought I'd share it with you in case you
didn't know it already...

Square brackets [] in aliases are substituted with the arguments provided on the
commandline.

Let say you have a command with a syntax such as:

'Command FOO ARG1 ARG2 BAR'

If you want your alias to insert ARG1 and ARG2 between FOO and BAR, instead of
using:

'Alias Test ReArg BAR 4 Command FOO'

you can simply use:

'Alias Test Command FOO [] BAR'

Another advantage of using the brackets is that the argument count doesn't have
to be known ahead of time (it does with ReArg), in the example above BAR will
always be appended after the arguments, so

'Test A B C D E' will become 'Command FOO A B C D E BAR'
 
 

Copyright © 2004-2024 by Björn Hagström All Rights Reserved