Merge lp:~benoit.pierre/bzrtools/shell_improvement_parse_errors into lp:bzrtools

Proposed by Benoit Pierre
Status: Merged
Approved by: Aaron Bentley
Approved revision: 724
Merged at revision: not available
Proposed branch: lp:~benoit.pierre/bzrtools/shell_improvement_parse_errors
Merge into: lp:bzrtools
Diff against target: None lines
To merge this branch: bzr merge lp:~benoit.pierre/bzrtools/shell_improvement_parse_errors
Reviewer Review Type Date Requested Status
Aaron Bentley Approve
Review via email: mp+12188@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Aaron Bentley (abentley) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

 status approved

This is definitely an improvement. Ideally, the tool would act more
like a normal prompt and wait until the closing quotation is added.

Benoit PIERRE wrote:
> Benoit PIERRE has proposed merging lp:~benoit.pierre/bzrtools/shell_improvement_parse_errors into lp:bzrtools.
>
> Requested reviews:
> Aaron Bentley (abentley)
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkq+SQMACgkQ0F+nu1YWqI1w7QCfUTvoDbqikCTyA9dthS11K+zX
nlcAninvu6uwXS6m4AFdPuImWVPoeMmD
=lGuF
-----END PGP SIGNATURE-----

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'shell.py'
2--- shell.py 2008-02-13 04:58:32 +0000
3+++ shell.py 2009-09-21 19:32:30 +0000
4@@ -168,7 +168,12 @@
5 self.default("help "+line)
6
7 def default(self, line):
8- args = shlex.split(line)
9+ try:
10+ args = shlex.split(line)
11+ except ValueError, e:
12+ print 'Parse error:', e
13+ return
14+
15 alias_args = get_alias(args[0])
16 if alias_args is not None:
17 args[0] = alias_args.pop(0)

Subscribers

People subscribed via source and target branches