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
  • #514
Closed
Open
Issue created Jan 18, 2018 by Administrator@rootContributor

Exit status when defaulting to '.'

Created by: other-mickk

My understanding is that autojump defaults to the current directory (.) when no match is found, while still exiting with a success status:

$ autojump --stat | grep inexistent # assume 'inexistent' is not in the database
$ autojump inexistent && echo ping
.
ping

The first line is the output from autojump, the second line from the echo command. Would it be sensible for autojump to exit with an error status instead?

My use case is that I find myself using jc some_child_somewhere && run command in child (sometimes with j) as a pattern more and more. Sometimes it comes out of habit, but if I use it in the wrong place or I forgot to train the database (e.g. because I moved things around) the command will still be run in the current directory.

Admittedly if this isn’t the right feature for autojump I could hack a script around it.

Assignee
Assign to
Time tracking