Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Move command line options to start of line



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.)



Messages sorted by: Reverse Date, Date, Thread, Author