Replies: 4 comments
-
|
From what I know, The problem is that it’s not safe to split the string, because it can legitimately contain spaces, such as In any event, I suppose the error message could be improved further, so if there is a space character in the |
Beta Was this translation helpful? Give feedback.
-
|
@jotaen I'm not sure that's accurate. I've never stumbled upon a Unix program that doesn't correctly handle spaces within |
Beta Was this translation helpful? Give feedback.
-
|
Looking into this further, there seem to be no consensus in how to handle this. Most program does handle this, but since there is no specification, you can't be certain.
I guess a solution would be to quote the parts that should stay together. For example: export EDITOR="'/a/path/containing spaces/editor'"
export EDITOR="'/a/path/containing spaces/editor' -arg"I'll leave it up to you whether or not you want to pursue that. 🙂 If not, I'll just have to create a wrapper script. |
Beta Was this translation helpful? Give feedback.
-
|
Your suggestion with quoting seems to be the cleanest to me, because it’s bash-native and leaves it to the user to choose from both options. I guess the error message would still need to be improved then, in case people aren’t aware of the quoting option. The downside is that it requires to parse the
tldr, I’m open to fixing this, but it’s not totally trivial. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
When I run
klog editI get the following error message:There's nothing wrong with my
$EDITORvariable and other tools such asgitopen it just fine.Beta Was this translation helpful? Give feedback.
All reactions