Commit f91895b7 authored by Bram Schoenmakers's avatar Bram Schoenmakers

Split a command's arguments with shlex.

This fixes the issue that `ls -F "%p %s"` doesn't work, because the
double quotes weren't interpreted properly.

Reported by @mruwek.
parent 35cb964e
......@@ -14,6 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import shlex
import urwid
from six import u
......@@ -122,7 +123,8 @@ class UIApplication(CLIApplicationBase):
Executes a command, given as a string.
"""
p_output = p_output or self._output
(subcommand, args) = get_subcommand(p_command.split())
p_command = shlex.split(p_command)
(subcommand, args) = get_subcommand(p_command)
try:
command = subcommand(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment