Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bashhub-client
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 22
    • Issues 22
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • 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
  • Ryan Caloras
  • bashhub-client
  • Issues
  • #59
Closed
Open
Issue created Dec 24, 2017 by Perilin Night@Perilin

Filter by active dir

Filtering by command is great, but how about also filtering by currently active directory? I've quickly hammered something into place that works using preexec...

# Added to end of  ~/.bashrc

__peri_filter_preexec() { if [[ "${PWD}" =~ .*Private.* ]] ; then __BH_SAVE_COMMAND=''; fi }
if [ -f ~/.bashhub/deps/bash-preexec.sh ]; then source  ~/.bashhub/deps/bash-preexec.sh ; preexec_functions+=(__peri_filter_preexec); fi

Prevents saving any command while active in any path containing the word Private But this feels a bit iffy, would prefer not to have to use internal bashhub variables, etc, etc

Assignee
Assign to
Time tracking