On Tue, Sep 30, 2008 at 8:37 PM, Myrddin Emrys <[EMAIL PROTECTED]> wrote: > Suraj N. Kurapati wrote: >> What is the equivalent of csh's "!$" expression (which evaluates to >> the last argument of the previous command) in fish? > > I'm curious... I can understand the need to retrieve the previous > command. But what's the value in retrieving the somewhat arbitrary > last argument of the last command? Where is that useful? Even > retrieving the first argument (ie, $0, the command name) seems more > useful than retrieving the last argument.
Command names are usually short, so there is little cost in re-typing them. Intermediate arguments are usually parameters, which only work with the command. But the last argument is often the name of a file or directory, and you often want to perform several operations on it. For example: mkdir -P one/very/long/file/path cd $! ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Fish-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fish-users
