Skip to content

Commit

Permalink
feat: add a --local-only option to use only local cheats
Browse files Browse the repository at this point in the history
  • Loading branch information
xgaia committed Jun 11, 2024
1 parent c025b78 commit 33129ea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arsenal/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,18 @@ def get_args(self):
group_out.add_argument('-t', '--tmux', action='store_true', help='Send command to tmux panel')
group_out.add_argument('-c', '--check', action='store_true', help='Check the existing commands')
group_out.add_argument('-f', '--prefix', action='store_true', help='command prefix')
group_out.add_argument('-l', '--local-only', action='store_true', help='Local cheats only')
parser.add_argument('-V', '--version', action='version', version='%(prog)s (version {})'.format(__version__))

return parser.parse_args()

def run(self):
args = self.get_args()

# keep only ~/.cheats if --local-only is set
if args.local_only:
config.CHEATS_PATHS = [os.path.join(config.HOMEPATH, ".cheats")]

# load cheatsheets
cheatsheets = cheat.Cheats().read_files(config.CHEATS_PATHS, config.FORMATS,
config.EXCLUDE_LIST)
Expand Down

0 comments on commit 33129ea

Please sign in to comment.