I have an alias jp for looking up Japanese words in the terminal via myougiden. Often I will be typing in Japanese in another application and will switch to bash to use the dictionary. However, when I have the Japanese keyboard turned on and try to input jp 言葉, OSX inputs jp 言葉, with full-width letters and spaces. This line then gets interpreted as a single command, which of course is not found. It is not convenient to switch back and forth between half-width romaji input, so I would rather bash interpreted the full-width input.
I can certainly add another alias for jp, but if bash can't interpret the full-width space then the command makes no sense. Is there any combination of aliases or settings that I can use to make bash interpret full-width spaces as regular half-width spaces?
IFSvariable, which determines what separates fields.IFS=" "; jp fooit tells me:-bash: jp foo: command not found. My$LANGis set toen_US.UTF-8.IFS="<your space>$IFS". Is it possible to rewrite yourjpas a simple shell script that reads one line from the input, then calls myougiden with that as parameter? It means 1 more <enter> to type.x=$(printf '\u3000'); IFS="$x$IFS". I triedb="echo$x/foo"after this and then$bgot correctly executed asecho /foo.