Skip to main content
sw2090
SuperUser
SuperUser
November 15, 2018
Question

Make CLI accept tab-stop formatted configs

  • November 15, 2018
  • 1 reply
  • 3051 views

currently tabstops in config cause dublication of command they are in front of and this causes syntax errors in consequence.

Would be much easier if CLI would understand tabstops.

    1 reply

    lobstercreed
    New Member
    December 4, 2018

    Easy solution: use Notepad++ to clean up your config before pasting into CLI.

     

    For example this:

     

    config log null-device setting
    set status disable
    end
    config log setting
    set fwpolicy6-implicit-log enable
    set local-in-allow enable
    set local-out enable
    end
    config log gui-display
    set location fortianalyzer
    end

     

    Becomes this:

     

    config log null-device setting
    set status disable
    end
    config log setting
    set fwpolicy6-implicit-log enable
    set local-in-allow enable
    set local-out enable
    end
    config log gui-display
    set location fortianalyzer
    end

     

    If you simply paste it into Notepad++, select all, and choose Edit > Blank Operations > Trim Leading Space

     

    This solves the issue on many platforms where the config spits out with tabs and you want to copy paste without the tabs.

     

    - Daniel Hamilton