I use GNU Emacs 24.3.1
on Ubuntu 14.04
and I have a bash script: ~/path/to the/script/test.sh
. As you see the path has space
character. Script has a simple content:
ENTRY=`zenity --password --username`
When I try to run script from Emacs
by C-c C-x
(execute script option from Sh-Script
menu), without marking any region, I got this error:
/bin/bash: ~/path/to: No such file or directory
Comint exited abnormally with code 127 ...
But when I try to run that from bash, it runs normally:
~/path/to\ the/script/test.sh
So I'm sure the problem is in about space
character in path of script. Also I do not want to change the path (by removing space
and for example replacing it by '_') because it is a part of a nested/linked content manager system and changing it may cause a big problem. Is there a way to solve this problem without changing path of script?
C-c C-x
? That's not a key which is customarily bound to some common command.What command do you have bound to C-c C-x?
but I did not mark (select) any text in script. Also I edited my question, please see it again.C-c C-x
shortcut (specically theexecutable-interpret
command). It looks like this command has a bug which should be reported withM-x report-emacs-bug
, but we can probably also work around. I'll make the work-around into an answer.