Coloring stdout red restricts usefulness
Created by: EvanDorsky
Autojump pipes the directory that it chooses to stdout, which is great. But because it makes the text color red, I can't do something like this:
$ mv doc.md `j Markdown`
If I know where j Markdown
is going to go, this is extremely useful. I can compose with autojump. But this doesn't work by default because the special characters surrounding the path to make it red keep shell scripts from seeing the output of autojump as a directory.
I don't see the overwhelming advantage of coloring stdout red. In the meantime, if you want this functionality, you can use sed to strip the color characters:
function jj() {
j $* | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" # not my original pattern
}
But autojump could be a better Unix citizen if it just piped the directory, unadorned, to stdout. This change was easy to make in the zsh source, but I don't know all the supported shells well enough to make a pull request.