-
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Editor commands with quoting, like: vim -c 'set tw=74' -c 'set noai' -c 'set wrap' were being splitted in the wrong way: only spaces were being considered and each part was placed in a different slot of the command arg array: [vim, -c, 'set, tw=74', -c, 'set, noai', -c, 'set, wrap'] With that, lab ended up calling `vim` with strings like `'set` and `tw=74'` as separated args and, thus, vim was creating files with these names instead of using them as real arguments for the `-c` flag. This commit fixes it by using Google's shlex module, which respects shell-style rules for quoting and commenting in the command line. The previous example is now splitted as follows: [vim, -c, 'set tw=74', -c, 'set noai', -c, 'set wrap'] So the quoted values are kept together. Fixes: b73579a ("git: fix edit command when using extra args") Signed-off-by: Bruno Meneguele <bmeneg@redhat.com>
- Loading branch information
Showing
4 changed files
with
24 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters