(local)
Turn on saving commands to Bashhub. Applies globally.
Turn on saving commands to Bashhub. Applies globally.
Turn on saving commands to Bashhub . Applies globally .
def on(local):
    """Turn on saving commands to Bashhub. Applies globally."""
    f = io.open(BH_HOME + '/script.bh', 'w+', encoding='utf-8')

    if local:
        print(text("export BH_SAVE_COMMANDS='True'"), file=f)
    else:
        print(text("unset BH_SAVE_COMMANDS"), file=f)
        write_to_config_file('save_commands', 'True')
def on ( local ) : f = io . open ( BH_HOME + '/script.bh' , 'w+' , encoding = 'utf-8' ) if local : print ( text ( "export BH_SAVE_COMMANDS='True'" ) , file = f ) else : print ( text ( "unset BH_SAVE_COMMANDS" ) , file = f ) write_to_config_file ( 'save_commands' , 'True' )