Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A autojump
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 158
    • Issues 158
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 54
    • Merge requests 54
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • William Ting
  • autojump
  • Issues
  • #377
Closed
Open
Issue created Aug 06, 2015 by Administrator@rootContributor

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.

Assignee
Assign to
Time tracking