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
  • #257
Closed
Open
Issue created Jan 21, 2014 by Administrator@rootContributor

Don't put functions in profile.d (or add an export -f to export them)

Created by: tpavlic

This issue is related to issue #256 (closed). The autojump that is included in distributions like ArchLinux puts autojump.bash in /etc/profile.d/. This works great only if you are sure to use a login shell (e.g., by logging in via a real terminal). If you instead login to X11 and then fire off a terminal (inside Terminal or yakuake or whatever), all of the functions defined in /etc/profile.d/ will be masked by the child shell process that is not a login shell. The environment variables carry over, but the functions do not.

For this reason, autojump.bash might be better suited for /etc/bash_completion.d. Alternatively, stub scripts (or symlinks) for j, jo, jc, etc. could be used instead of the functions.

Another option, as @saamalik points out, is to use "export -f" to export the functions in the profile.d script.

Assignee
Assign to
Time tracking