From dd6b47230066a81c83c5272b34dd47c67a7cd5d8 Mon Sep 17 00:00:00 2001 From: nightsense Date: Sat, 6 Aug 2016 03:17:20 -0400 Subject: add hash to escaped characters in shell commands This is required for shell commands to succeed with filenames that start with the hash character. The 'mv' command invoked by 'bulkrename', for instance, will fail with such files unless hashes are escaped. --- ranger/ext/shell_escape.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ranger/ext/shell_escape.py b/ranger/ext/shell_escape.py index fe542084..d57ff339 100644 --- a/ranger/ext/shell_escape.py +++ b/ranger/ext/shell_escape.py @@ -3,7 +3,7 @@ """Functions to escape metacharacters of arguments for shell commands.""" -META_CHARS = (' ', "'", '"', '`', '&', '|', ';', +META_CHARS = (' ', "'", '"', '`', '&', '|', ';', '#', '$', '!', '(', ')', '[', ']', '<', '>', '\t') UNESCAPABLE = set(map(chr, list(range(9)) + list(range(10, 32)) + list(range(127, 256)))) -- cgit 1.4.1-2-gfad0