Hi,
I have a problem:
I wrote a tiny command: Save: nothing
Command: CHAR=$(cat) echo -en "($CHAR)"
Input: Selected Text OR Character
Output: Show as Tool Tip
If I don't make a selection it outputs only '()'. But I expect between the parenthesizes the character left from the caret. Can this verified by others as well, or am i wrong, or is my TM installation broken?
Many thanks,
Hans
On 10/10/2007, at 16:18, Hans-Joerg Bibiko wrote:
[...] If I don't make a selection it outputs only '()'. But I expect between the parenthesizes the character left from the caret. Can this verified by others as well, or am i wrong, or is my TM installation broken?
Maybe let the command be: xxd
That should show exactly what you get as stdin (as a hex dump).
On 10.10.2007, at 16:52, Allan Odgaard wrote:
On 10/10/2007, at 16:18, Hans-Joerg Bibiko wrote:
[...] If I don't make a selection it outputs only '()'. But I expect between the parenthesizes the character left from the caret. Can this verified by others as well, or am i wrong, or is my TM installation broken?
Maybe let the command be: xxd That should show exactly what you get as stdin (as a hex dump).
OK. That works, but I get the character RIGHT of the caret. On the other hand why does not work 'selected text' or 'character'?
Thanks, Hans
On 10/10/2007, at 17:17, Hans-Jörg Bibiko wrote:
On 10.10.2007, at 16:52, Allan Odgaard wrote:
On 10/10/2007, at 16:18, Hans-Joerg Bibiko wrote:
[...] If I don't make a selection it outputs only '()'. But I expect between the parenthesizes the character left from the caret. Can this verified by others as well, or am i wrong, or is my TM installation broken?
Maybe let the command be: xxd That should show exactly what you get as stdin (as a hex dump).
OK. That works, but I get the character RIGHT of the caret.
Yes, since generally when you run something “on the current character” it is implied that it is the one to the right of the caret. E.g. ⌃G or ⌃⇧X.
On the other hand why does not work 'selected text' or 'character'?
What does not work?
On 10.10.2007, at 17:20, Allan Odgaard wrote:
Yes, since generally when you run something “on the current character” it is implied that it is the one to the right of the caret. E.g. ⌃G or ⌃⇧X.
OK.
On the other hand why does not work 'selected text' or 'character'?
What does not work?
Sorry Allan, now it works perfectly. Maybe I'm a bit overtired ;)
Hans