Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Move command line options to start of line
- X-seq: zsh-users 10807
- From: Andrey Borzenkov <arvidjaar@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Move command line options to start of line
- Date: Sat, 7 Oct 2006 10:20:07 +0400
- In-reply-to: <061006195500.ZM29412@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <200610061507.k96F7nU8000999@xxxxxxxxxxxxxx> <061006195500.ZM29412@xxxxxxxxxxxxxxxxxxxxxx>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Saturday 07 October 2006 06:55, Bart Schaefer wrote:
> On Oct 6, 4:07pm, Peter Stephenson wrote:
> }
> } # This moves an option, possibly with arguments, from before the
> } # cursor to immediately after the command word.
>
> Nice, but not precisely what David Korn had in mind. Given
>
> zsh% ls -s file1 file2 -l
>
> the result of the command should be
>
> zsh% ls -s -l file1 file2
>
> and not
>
> zsh% ls -l -s file1 file2
>
> I don't think this can be done without removing the trailing option and
> its argument(s) from the line before finding the index of the place to
> insert them again. (Sufficiently deeply nested expansion might still
> accomplish this in a single replacement.)
this apparently requires knowledge of arguments a given command accepts; this
makes it rather hard to implement in general way.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
iD8DBQFFJ0cYR6LMutpd94wRAmc8AJ9mwaNtorSYF/GGhXbxi75CFxMG4wCfbl9j
Rmqgim6+Vtwv7I11rrdEIN4=
=UlMk
-----END PGP SIGNATURE-----
Messages sorted by:
Reverse Date,
Date,
Thread,
Author