{
    "mode": "man",
    "parameter": "nano",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/nano/1/json",
    "generated": "2026-05-30T05:15:01Z",
    "synopsis": "nano [options] [[+line[,column]] file]...\nnano [options] [[+[crCR](/|?)string] file]...",
    "sections": {
        "NAME": {
            "content": "nano - Nano's ANOther editor, inspired by Pico\n\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "nano [options] [[+line[,column]] file]...\n\nnano [options] [[+[crCR](/|?)string] file]...\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "nano  is a small and friendly editor.  It copies the look and feel of Pico, but is free soft‐\nware, and implements several features that Pico  lacks,  such  as:  opening  multiple  files,\nscrolling  per  line,  undo/redo, syntax coloring, line numbering, and soft-wrapping overlong\nlines.\n\nWhen giving a filename on the command line, the cursor can be  put  on  a  specific  line  by\nadding  the line number with a plus sign (+) before the filename, and even in a specific col‐\numn by adding it with a comma.  (Negative numbers count from the end of the  file  or  line.)\nThe cursor can be put on the first or last occurrence of a specific string by specifying that\nstring after +/ or +? before the filename.  The string can  be  made  case  sensitive  and/or\ncaused  to  be  interpreted as a regular expression by inserting c and/or r after the + sign.\nThese search modes can be explicitly disabled by using the uppercase variant  of  those  let‐\nters:  C  and/or  R.  When the string contains spaces, it needs to be enclosed in quotes.  To\ngive an example: to open a file at the first occurrence of the word \"Foo\", you would do:\n\nnano +c/Foo file\n\nAs a special case: if instead of a filename a dash (-) is given, nano  will  read  data  from\nstandard input.\n\n",
            "subsections": []
        },
        "EDITING": {
            "content": "Entering  text  and  moving around in a file is straightforward: typing the letters and using\nthe normal cursor movement keys.  Commands are entered by using the Control (^) and  the  Alt\nor Meta (M-) keys.  Typing ^K deletes the current line and puts it in the cutbuffer.  Consec‐\nutive ^Ks will put all deleted lines together in the cutbuffer.  Any cursor movement or  exe‐\ncuting  any other command will cause the next ^K to overwrite the cutbuffer.  A ^U will paste\nthe current contents of the cutbuffer at the current cursor position.\n\nWhen a more precise piece of text needs to be cut or copied, you can mark its start with  ^6,\nmove  the cursor to its end (the marked text will be highlighted), and then use ^K to cut it,\nor M-6 to copy it to the cutbuffer.  You can also save the marked text to a file with ^O,  or\nspell check it with ^T^T.\n\nOn  some  terminals,  text  can  be selected also by holding down Shift while using the arrow\nkeys.  Holding down the Ctrl or Alt key too will increase the stride.   Any  cursor  movement\nwithout Shift being held will cancel such a selection.\n\nThe  two  lines  at  the bottom of the screen show some important commands; the built-in help\n(^G) lists all the available ones.  The default key bindings can be changed via a nanorc file\n-- see nanorc(5).\n\n",
            "subsections": []
        },
        "NOTICE": {
            "content": "Since version 4.0, nano by default:\n\n• does not automatically hard-wrap lines that become overlong,\n• includes the line below the title bar in the editing area,\n• does linewise (smooth) scrolling.\n\nIf  you  want  the  old,  Pico  behavior back, you can use --breaklonglines, --emptyline, and\n--jumpyscrolling (or -bej for short).\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-A --smarthome",
                    "content": "Make the Home key smarter.  When Home is pressed anywhere but at the very beginning of\nnon-whitespace  characters  on  a line, the cursor will jump to that beginning (either\nforwards or backwards).  If the cursor is already at that position, it  will  jump  to\nthe true beginning of the line.\n",
                    "flag": "-A",
                    "long": "--smarthome"
                },
                {
                    "name": "-B --backup",
                    "content": "When  saving  a  file,  back up the previous version of it, using the current filename\nsuffixed with a tilde (~).\n",
                    "flag": "-B",
                    "long": "--backup"
                },
                {
                    "name": "-C --backupdir=",
                    "content": "Make and keep not just one backup file, but make and keep a uniquely numbered one  ev‐\nery  time  a  file  is  saved -- when backups are enabled (-B).  The uniquely numbered\nfiles are stored in the specified directory.\n",
                    "flag": "-C"
                },
                {
                    "name": "-D --boldtext",
                    "content": "For the interface, use bold instead of reverse video.  This will be overridden by set‐\nting the options titlecolor, statuscolor, keycolor, functioncolor, numbercolor, and/or\nselectedcolor in your nanorc file.  See nanorc(5).\n",
                    "flag": "-D",
                    "long": "--boldtext"
                },
                {
                    "name": "-E --tabstospaces",
                    "content": "Convert each typed tab to spaces -- to the number of spaces that a tab at  that  posi‐\ntion would take up.\n",
                    "flag": "-E",
                    "long": "--tabstospaces"
                },
                {
                    "name": "-F --multibuffer",
                    "content": "Read a file into a new buffer by default.\n",
                    "flag": "-F",
                    "long": "--multibuffer"
                },
                {
                    "name": "-G --locking",
                    "content": "Use vim-style file locking when editing files.\n",
                    "flag": "-G",
                    "long": "--locking"
                },
                {
                    "name": "-H --historylog",
                    "content": "Save the last hundred search strings and replacement strings and executed commands, so\nthey can be easily reused in later sessions.\n",
                    "flag": "-H",
                    "long": "--historylog"
                },
                {
                    "name": "-I --ignorercfiles",
                    "content": "Don't look at the system's nanorc nor at the user's nanorc.\n",
                    "flag": "-I",
                    "long": "--ignorercfiles"
                },
                {
                    "name": "-J --guidestripe=",
                    "content": "Draw a vertical stripe at the given column, to help judge the width of the text.  (The\ncolor of the stripe can be changed with set stripecolor in your nanorc file.)\n",
                    "flag": "-J"
                },
                {
                    "name": "-K --rawsequences",
                    "content": "Interpret escape sequences directly, instead of asking ncurses to translate them.  (If\nyou need this option to get some keys to work properly, it  means  that  the  terminfo\nterminal  description  that  is  used does not fully match the actual behavior of your\nterminal.  This can happen when you ssh into a BSD machine, for example.)  Using  this\noption disables nano's mouse support.\n",
                    "flag": "-K",
                    "long": "--rawsequences"
                },
                {
                    "name": "-L --nonewlines",
                    "content": "Don't  automatically add a newline when a text does not end with one.  (This can cause\nyou to save non-POSIX text files.)\n",
                    "flag": "-L",
                    "long": "--nonewlines"
                },
                {
                    "name": "-M --trimblanks",
                    "content": "Snip trailing whitespace from the wrapped line when automatic hard-wrapping occurs  or\nwhen text is justified.\n",
                    "flag": "-M",
                    "long": "--trimblanks"
                },
                {
                    "name": "-N --noconvert",
                    "content": "Disable automatic conversion of files from DOS/Mac format.\n",
                    "flag": "-N",
                    "long": "--noconvert"
                },
                {
                    "name": "-O --bookstyle",
                    "content": "When  justifying,  treat  any  line  that starts with whitespace as the beginning of a\nparagraph (unless auto-indenting is on).\n",
                    "flag": "-O",
                    "long": "--bookstyle"
                },
                {
                    "name": "-P --positionlog",
                    "content": "For the 200 most recent files, log the last position of the cursor, and  place  it  at\nthat position again upon reopening such a file.\n",
                    "flag": "-P",
                    "long": "--positionlog"
                },
                {
                    "name": "-Q --quotestr=\"",
                    "content": "Set the regular expression for matching the quoting part of a line.  The default value\nis \"^([ \\t]*([!#%:;>|}]|//))+\".  (Note that \\t stands for an actual Tab.)  This  makes\nit  possible  to  rejustify  blocks of quoted text when composing email, and to rewrap\nblocks of line comments when writing source code.\n",
                    "flag": "-Q",
                    "long": "--quotestr",
                    "arg": "\""
                },
                {
                    "name": "-R --restricted",
                    "content": "Restricted mode: don't read or write to any file not specified on  the  command  line.\nThis  means:  don't  read  or write history files; don't allow suspending; don't allow\nspell checking; don't allow a file to be appended to, prepended to, or saved  under  a\ndifferent  name  if  it already has one; and don't make backup files.  Restricted mode\ncan also be activated by  invoking  nano  with  any  name  beginning  with  'r'  (e.g.\n\"rnano\").\n",
                    "flag": "-R",
                    "long": "--restricted"
                },
                {
                    "name": "-S --softwrap",
                    "content": "Display over multiple screen rows lines that exceed the screen's width.  (You can make\nthis soft-wrapping occur at whitespace instead of rudely at the screen's edge, by  us‐\ning also --atblanks.)  (The old short option, -$, is deprecated.)\n",
                    "flag": "-S",
                    "long": "--softwrap"
                },
                {
                    "name": "-T --tabsize=",
                    "content": "Set  the size (width) of a tab to number columns.  The value of number must be greater\nthan 0.  The default value is 8.\n",
                    "flag": "-T"
                },
                {
                    "name": "-U --quickblank",
                    "content": "Make status-bar messages disappear after 1 keystroke instead of after 20.   Note  that\noption  -c (--constantshow) overrides this.  When option --minibar or --zero is in ef‐\nfect, --quickblank makes a message disappear after 0.8 seconds instead  of  after  the\ndefault 1.5 seconds.\n",
                    "flag": "-U",
                    "long": "--quickblank"
                },
                {
                    "name": "-V --version",
                    "content": "Show the current version number and exit.\n",
                    "flag": "-V",
                    "long": "--version"
                },
                {
                    "name": "-W --wordbounds",
                    "content": "Detect  word  boundaries  differently  by treating punctuation characters as part of a\nword.\n",
                    "flag": "-W",
                    "long": "--wordbounds"
                },
                {
                    "name": "-X --wordchars=\"",
                    "content": "Specify which other characters (besides the normal alphanumeric ones) should  be  con‐\nsidered  as  part  of  a  word.   When using this option, you probably want to omit -W\n(--wordbounds).\n",
                    "flag": "-X",
                    "long": "--wordchars",
                    "arg": "\""
                },
                {
                    "name": "-Y --syntax=",
                    "content": "Specify the name of the syntax highlighting to use from among the ones defined in  the\nnanorc files.\n",
                    "flag": "-Y"
                },
                {
                    "name": "-Z --zap",
                    "content": "Let  an  unmodified  Backspace  or Delete erase the marked region (instead of a single\ncharacter, and without affecting the cutbuffer).\n",
                    "flag": "-Z",
                    "long": "--zap"
                },
                {
                    "name": "-a --atblanks",
                    "content": "When doing soft line wrapping, wrap lines at whitespace instead of always at the  edge\nof the screen.\n",
                    "flag": "-a",
                    "long": "--atblanks"
                },
                {
                    "name": "-b --breaklonglines",
                    "content": "Automatically  hard-wrap  the  current line when it becomes overlong.  (This option is\nthe opposite of -w (--nowrap) -- the last one given takes effect.)\n",
                    "flag": "-b",
                    "long": "--breaklonglines"
                },
                {
                    "name": "-c --constantshow",
                    "content": "Constantly show the cursor position on the status bar.  Note that this  overrides  op‐\ntion -U (--quickblank).\n",
                    "flag": "-c",
                    "long": "--constantshow"
                },
                {
                    "name": "-d --rebinddelete",
                    "content": "Interpret  the Delete and Backspace keys differently so that both Backspace and Delete\nwork properly.  You should only use this option when on your system  either  Backspace\nacts like Delete or Delete acts like Backspace.\n",
                    "flag": "-d",
                    "long": "--rebinddelete"
                },
                {
                    "name": "-e --emptyline",
                    "content": "Do not use the line below the title bar, leaving it entirely blank.\n",
                    "flag": "-e",
                    "long": "--emptyline"
                },
                {
                    "name": "-f --rcfile=",
                    "content": "Read  only  this  file for setting nano's options, instead of reading both the system-\nwide and the user's nanorc files.\n",
                    "flag": "-f"
                },
                {
                    "name": "-g --showcursor",
                    "content": "Make the cursor visible in the file browser (putting it on the highlighted  item)  and\nin the help viewer.  Useful for braille users and people with poor vision.\n",
                    "flag": "-g",
                    "long": "--showcursor"
                },
                {
                    "name": "-h --help",
                    "content": "Show a summary of the available command-line options and exit.\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "-i --autoindent",
                    "content": "Automatically  indent a newly created line to the same number of tabs and/or spaces as\nthe previous line (or as the next line if the previous line  is  the  beginning  of  a\nparagraph).\n",
                    "flag": "-i",
                    "long": "--autoindent"
                },
                {
                    "name": "-j --jumpyscrolling",
                    "content": "Scroll the buffer contents per half-screen instead of per line.\n",
                    "flag": "-j",
                    "long": "--jumpyscrolling"
                },
                {
                    "name": "-k --cutfromcursor",
                    "content": "Make  the 'Cut Text' command (normally ^K) cut from the current cursor position to the\nend of the line, instead of cutting the entire line.\n",
                    "flag": "-k",
                    "long": "--cutfromcursor"
                },
                {
                    "name": "-l --linenumbers",
                    "content": "Display line numbers to the left of the text area.  (Any line with an anchor addition‐\nally gets a mark in the margin.)\n",
                    "flag": "-l",
                    "long": "--linenumbers"
                },
                {
                    "name": "-m --mouse",
                    "content": "Enable mouse support, if available for your system.  When enabled, mouse clicks can be\nused to place the cursor, set the mark (with a double click), and  execute  shortcuts.\nThe  mouse  will  work in the X Window System, and on the console when gpm is running.\nText can still be selected through dragging by holding down the Shift key.\n",
                    "flag": "-m",
                    "long": "--mouse"
                },
                {
                    "name": "-n --noread",
                    "content": "Treat any name given on the command line as a new file.  This allows nano to write  to\nnamed  pipes:  it  will start with a blank buffer, and will write to the pipe when the\nuser saves the \"file\".  This way nano can be used as an editor in combination with for\ninstance gpg without having to write sensitive data to disk first.\n",
                    "flag": "-n",
                    "long": "--noread"
                },
                {
                    "name": "-o --operatingdir=",
                    "content": "Set the operating directory.  This makes nano set up something similar to a chroot.\n",
                    "flag": "-o"
                },
                {
                    "name": "-p --preserve",
                    "content": "Preserve  the  XON and XOFF sequences (^Q and ^S) so they will be caught by the termi‐\nnal.\n",
                    "flag": "-p",
                    "long": "--preserve"
                },
                {
                    "name": "-q --indicator",
                    "content": "Display a \"scrollbar\" on the righthand side of the edit window.  It shows the position\nof the viewport in the buffer and how much of the buffer is covered by the viewport.\n",
                    "flag": "-q",
                    "long": "--indicator"
                },
                {
                    "name": "-r --fill=",
                    "content": "Set the target width for justifying and automatic hard-wrapping at this number of col‐\numns.  If the value is 0 or less, wrapping will occur at the width of the screen minus\nnumber  columns, allowing the wrap point to vary along with the width of the screen if\nthe screen is resized.  The default value is -8.\n",
                    "flag": "-r"
                },
                {
                    "name": "-s --speller=\"",
                    "content": "Use this command to perform spell checking and correcting, instead of using the built-\nin corrector that calls hunspell(1) or spell(1).\n",
                    "flag": "-s",
                    "long": "--speller",
                    "arg": "\""
                },
                {
                    "name": "-t --saveonexit",
                    "content": "Save  a changed buffer without prompting (when exiting with ^X).  (The old form of the\nlong option, --tempfile, is deprecated.)\n",
                    "flag": "-t",
                    "long": "--saveonexit"
                },
                {
                    "name": "-u --unix",
                    "content": "Save a file by default in Unix format.  This overrides nano's default behavior of sav‐\ning  a  file  in the format that it had.  (This option has no effect when you also use\n--noconvert.)\n",
                    "flag": "-u",
                    "long": "--unix"
                },
                {
                    "name": "-v --view",
                    "content": "Just view the file and disallow editing: read-only mode.  This mode allows the user to\nopen also other files for viewing, unless --restricted is given too.\n",
                    "flag": "-v",
                    "long": "--view"
                },
                {
                    "name": "-w --nowrap",
                    "content": "Do not automatically hard-wrap the current line when it becomes overlong.  This is the\ndefault.  (This option is the opposite of -b (--breaklonglines) -- the last one  given\ntakes effect.)\n",
                    "flag": "-w",
                    "long": "--nowrap"
                },
                {
                    "name": "-x --nohelp",
                    "content": "Don't show the two help lines at the bottom of the screen.\n",
                    "flag": "-x",
                    "long": "--nohelp"
                },
                {
                    "name": "-y --afterends",
                    "content": "Make Ctrl+Right and Ctrl+Delete stop at word ends instead of beginnings.\n",
                    "flag": "-y",
                    "long": "--afterends"
                },
                {
                    "name": "-z --suspendable",
                    "content": "Obsolete  option; ignored.  Suspension is enabled by default, reachable via ^T^Z.  (If\nyou want a plain ^Z to suspend nano, add bind ^Z suspend main to your nanorc.)\n\n-%, --stateflags\nUse the top-right corner of the screen for showing some state flags: I  when  auto-in‐\ndenting,  M  when  the  mark is on, L when hard-wrapping (breaking long lines), R when\nrecording a macro, and S when soft-wrapping.  When the buffer is modified, a star  (*)\nis shown after the filename in the center of the title bar.\n\n-, --minibar\nSuppress  the  title  bar and instead show information about the current buffer at the\nbottom of the screen, in the space for the status bar.  In this \"minibar\" the filename\nis shown on the left, followed by an asterisk if the buffer has been modified.  On the\nright are displayed the current line and column number, the code of the character  un‐\nder  the  cursor  (in Unicode format: U+xxxx), the same flags as are shown by --state‐‐\nflags, and a percentage that expresses how far the cursor is into the file (linewise).\nWhen a file is loaded or saved, and also when switching between buffers, the number of\nlines in the buffer is displayed after the filename.  This number is cleared upon  the\nnext keystroke, or replaced with an [i/n] counter when multiple buffers are open.  The\nline plus column numbers and the character code are displayed only when --constantshow\nis  used,  and can be toggled on and off with M-C.  The state flags are displayed only\nwhen --stateflags is used.\n",
                    "flag": "-z",
                    "long": "--suspendable"
                },
                {
                    "name": "-0 --zero",
                    "content": "Hide all elements of the interface (title bar, status bar, and help lines) and use all\nrows  of  the terminal for showing the contents of the buffer.  The status bar appears\nonly when there is a significant message, and disappears after 1.5 seconds or upon the\nnext  keystroke.  With M-Z the title bar plus status bar can be toggled.  With M-X the\nhelp lines.\n\n-!, --magic\nWhen neither the file's name nor its first line give a clue, try using libmagic to de‐\ntermine the applicable syntax.\n\n",
                    "flag": "-0",
                    "long": "--zero"
                }
            ]
        },
        "TOGGLES": {
            "content": "Several  of the above options can be switched on and off also while nano is running.  For ex‐\nample, M-L toggles the hard-wrapping of long lines, M-S toggles  soft-wrapping,  M-N  toggles\nline  numbers,  M-M  toggles the mouse, M-I auto-indentation, and M-X the help lines.  See at\nthe end of the ^G help text for a complete list.\n\nThe M-X toggle is special: it works in all menus except the help viewer and the linter.   All\nother toggles work in the main menu only.\n\n",
            "subsections": []
        },
        "FILES": {
            "content": "When  --rcfile  is  given, nano will read just the specified file for setting its options and\nsyntaxes and key bindings.  Without that option, nano  will  read  two  configuration  files:\nfirst  the  system's nanorc (if it exists), and then the user's nanorc (if it exists), either\n~/.nanorc or $XDGCONFIGHOME/nano/nanorc or ~/.config/nano/nanorc, whichever is  encountered\nfirst.  See nanorc(5) for more information on the possible contents of those files.\n\nSee /usr/share/nano/ and /usr/share/nano/extra/ for available syntax-coloring definitions.\n\n",
            "subsections": []
        },
        "NOTES": {
            "content": "If  no  alternative  spell checker command is specified on the command line nor in one of the\nnanorc files, nano will check the SPELL environment variable for one.\n\nIn some cases nano will try to dump the buffer into an  emergency  file.   This  will  happen\nmainly  if nano receives a SIGHUP or SIGTERM or runs out of memory.  It will write the buffer\ninto a file named nano.save if the buffer didn't have a name already, or will add  a  \".save\"\nsuffix  to  the  current filename.  If an emergency file with that name already exists in the\ncurrent directory, it will add \".save\" plus a number (e.g. \".save.1\") to the current filename\nin  order  to  make  it unique.  In multibuffer mode, nano will write all the open buffers to\ntheir respective emergency files.\n\n",
            "subsections": []
        },
        "BUGS": {
            "content": "The recording and playback of keyboard macros works correctly only on  a  terminal  emulator,\nnot on a Linux console (VT), because the latter does not by default distinguish modified from\nunmodified arrow keys.\n\nPlease report any other bugs that you encounter via:\nhttps://savannah.gnu.org/bugs/?group=nano.\n\nWhen nano crashes, it will save any modified buffers to emergency .save files.   If  you  are\nable  to reproduce the crash and you want to get a backtrace, define the environment variable\nNANONOCATCH.\n\n",
            "subsections": []
        },
        "HOMEPAGE": {
            "content": "https://nano-editor.org/\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "nanorc(5)\n\n/usr/share/doc/nano/ (or equivalent on your system)\n\n\n\nFebruary 2022                                version 6.2                                     NANO(1)",
            "subsections": []
        }
    },
    "summary": "nano - Nano's ANOther editor, inspired by Pico",
    "flags": [
        {
            "flag": "-A",
            "long": "--smarthome",
            "arg": null,
            "description": "Make the Home key smarter. When Home is pressed anywhere but at the very beginning of non-whitespace characters on a line, the cursor will jump to that beginning (either forwards or backwards). If the cursor is already at that position, it will jump to the true beginning of the line."
        },
        {
            "flag": "-B",
            "long": "--backup",
            "arg": null,
            "description": "When saving a file, back up the previous version of it, using the current filename suffixed with a tilde (~)."
        },
        {
            "flag": "-C",
            "long": null,
            "arg": null,
            "description": "Make and keep not just one backup file, but make and keep a uniquely numbered one ev‐ ery time a file is saved -- when backups are enabled (-B). The uniquely numbered files are stored in the specified directory."
        },
        {
            "flag": "-D",
            "long": "--boldtext",
            "arg": null,
            "description": "For the interface, use bold instead of reverse video. This will be overridden by set‐ ting the options titlecolor, statuscolor, keycolor, functioncolor, numbercolor, and/or selectedcolor in your nanorc file. See nanorc(5)."
        },
        {
            "flag": "-E",
            "long": "--tabstospaces",
            "arg": null,
            "description": "Convert each typed tab to spaces -- to the number of spaces that a tab at that posi‐ tion would take up."
        },
        {
            "flag": "-F",
            "long": "--multibuffer",
            "arg": null,
            "description": "Read a file into a new buffer by default."
        },
        {
            "flag": "-G",
            "long": "--locking",
            "arg": null,
            "description": "Use vim-style file locking when editing files."
        },
        {
            "flag": "-H",
            "long": "--historylog",
            "arg": null,
            "description": "Save the last hundred search strings and replacement strings and executed commands, so they can be easily reused in later sessions."
        },
        {
            "flag": "-I",
            "long": "--ignorercfiles",
            "arg": null,
            "description": "Don't look at the system's nanorc nor at the user's nanorc."
        },
        {
            "flag": "-J",
            "long": null,
            "arg": null,
            "description": "Draw a vertical stripe at the given column, to help judge the width of the text. (The color of the stripe can be changed with set stripecolor in your nanorc file.)"
        },
        {
            "flag": "-K",
            "long": "--rawsequences",
            "arg": null,
            "description": "Interpret escape sequences directly, instead of asking ncurses to translate them. (If you need this option to get some keys to work properly, it means that the terminfo terminal description that is used does not fully match the actual behavior of your terminal. This can happen when you ssh into a BSD machine, for example.) Using this option disables nano's mouse support."
        },
        {
            "flag": "-L",
            "long": "--nonewlines",
            "arg": null,
            "description": "Don't automatically add a newline when a text does not end with one. (This can cause you to save non-POSIX text files.)"
        },
        {
            "flag": "-M",
            "long": "--trimblanks",
            "arg": null,
            "description": "Snip trailing whitespace from the wrapped line when automatic hard-wrapping occurs or when text is justified."
        },
        {
            "flag": "-N",
            "long": "--noconvert",
            "arg": null,
            "description": "Disable automatic conversion of files from DOS/Mac format."
        },
        {
            "flag": "-O",
            "long": "--bookstyle",
            "arg": null,
            "description": "When justifying, treat any line that starts with whitespace as the beginning of a paragraph (unless auto-indenting is on)."
        },
        {
            "flag": "-P",
            "long": "--positionlog",
            "arg": null,
            "description": "For the 200 most recent files, log the last position of the cursor, and place it at that position again upon reopening such a file."
        },
        {
            "flag": "-Q",
            "long": "--quotestr",
            "arg": "\"",
            "description": "Set the regular expression for matching the quoting part of a line. The default value is \"^([ \\t]*([!#%:;>|}]|//))+\". (Note that \\t stands for an actual Tab.) This makes it possible to rejustify blocks of quoted text when composing email, and to rewrap blocks of line comments when writing source code."
        },
        {
            "flag": "-R",
            "long": "--restricted",
            "arg": null,
            "description": "Restricted mode: don't read or write to any file not specified on the command line. This means: don't read or write history files; don't allow suspending; don't allow spell checking; don't allow a file to be appended to, prepended to, or saved under a different name if it already has one; and don't make backup files. Restricted mode can also be activated by invoking nano with any name beginning with 'r' (e.g. \"rnano\")."
        },
        {
            "flag": "-S",
            "long": "--softwrap",
            "arg": null,
            "description": "Display over multiple screen rows lines that exceed the screen's width. (You can make this soft-wrapping occur at whitespace instead of rudely at the screen's edge, by us‐ ing also --atblanks.) (The old short option, -$, is deprecated.)"
        },
        {
            "flag": "-T",
            "long": null,
            "arg": null,
            "description": "Set the size (width) of a tab to number columns. The value of number must be greater than 0. The default value is 8."
        },
        {
            "flag": "-U",
            "long": "--quickblank",
            "arg": null,
            "description": "Make status-bar messages disappear after 1 keystroke instead of after 20. Note that option -c (--constantshow) overrides this. When option --minibar or --zero is in ef‐ fect, --quickblank makes a message disappear after 0.8 seconds instead of after the default 1.5 seconds."
        },
        {
            "flag": "-V",
            "long": "--version",
            "arg": null,
            "description": "Show the current version number and exit."
        },
        {
            "flag": "-W",
            "long": "--wordbounds",
            "arg": null,
            "description": "Detect word boundaries differently by treating punctuation characters as part of a word."
        },
        {
            "flag": "-X",
            "long": "--wordchars",
            "arg": "\"",
            "description": "Specify which other characters (besides the normal alphanumeric ones) should be con‐ sidered as part of a word. When using this option, you probably want to omit -W (--wordbounds)."
        },
        {
            "flag": "-Y",
            "long": null,
            "arg": null,
            "description": "Specify the name of the syntax highlighting to use from among the ones defined in the nanorc files."
        },
        {
            "flag": "-Z",
            "long": "--zap",
            "arg": null,
            "description": "Let an unmodified Backspace or Delete erase the marked region (instead of a single character, and without affecting the cutbuffer)."
        },
        {
            "flag": "-a",
            "long": "--atblanks",
            "arg": null,
            "description": "When doing soft line wrapping, wrap lines at whitespace instead of always at the edge of the screen."
        },
        {
            "flag": "-b",
            "long": "--breaklonglines",
            "arg": null,
            "description": "Automatically hard-wrap the current line when it becomes overlong. (This option is the opposite of -w (--nowrap) -- the last one given takes effect.)"
        },
        {
            "flag": "-c",
            "long": "--constantshow",
            "arg": null,
            "description": "Constantly show the cursor position on the status bar. Note that this overrides op‐ tion -U (--quickblank)."
        },
        {
            "flag": "-d",
            "long": "--rebinddelete",
            "arg": null,
            "description": "Interpret the Delete and Backspace keys differently so that both Backspace and Delete work properly. You should only use this option when on your system either Backspace acts like Delete or Delete acts like Backspace."
        },
        {
            "flag": "-e",
            "long": "--emptyline",
            "arg": null,
            "description": "Do not use the line below the title bar, leaving it entirely blank."
        },
        {
            "flag": "-f",
            "long": null,
            "arg": null,
            "description": "Read only this file for setting nano's options, instead of reading both the system- wide and the user's nanorc files."
        },
        {
            "flag": "-g",
            "long": "--showcursor",
            "arg": null,
            "description": "Make the cursor visible in the file browser (putting it on the highlighted item) and in the help viewer. Useful for braille users and people with poor vision."
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "Show a summary of the available command-line options and exit."
        },
        {
            "flag": "-i",
            "long": "--autoindent",
            "arg": null,
            "description": "Automatically indent a newly created line to the same number of tabs and/or spaces as the previous line (or as the next line if the previous line is the beginning of a paragraph)."
        },
        {
            "flag": "-j",
            "long": "--jumpyscrolling",
            "arg": null,
            "description": "Scroll the buffer contents per half-screen instead of per line."
        },
        {
            "flag": "-k",
            "long": "--cutfromcursor",
            "arg": null,
            "description": "Make the 'Cut Text' command (normally ^K) cut from the current cursor position to the end of the line, instead of cutting the entire line."
        },
        {
            "flag": "-l",
            "long": "--linenumbers",
            "arg": null,
            "description": "Display line numbers to the left of the text area. (Any line with an anchor addition‐ ally gets a mark in the margin.)"
        },
        {
            "flag": "-m",
            "long": "--mouse",
            "arg": null,
            "description": "Enable mouse support, if available for your system. When enabled, mouse clicks can be used to place the cursor, set the mark (with a double click), and execute shortcuts. The mouse will work in the X Window System, and on the console when gpm is running. Text can still be selected through dragging by holding down the Shift key."
        },
        {
            "flag": "-n",
            "long": "--noread",
            "arg": null,
            "description": "Treat any name given on the command line as a new file. This allows nano to write to named pipes: it will start with a blank buffer, and will write to the pipe when the user saves the \"file\". This way nano can be used as an editor in combination with for instance gpg without having to write sensitive data to disk first."
        },
        {
            "flag": "-o",
            "long": null,
            "arg": null,
            "description": "Set the operating directory. This makes nano set up something similar to a chroot."
        },
        {
            "flag": "-p",
            "long": "--preserve",
            "arg": null,
            "description": "Preserve the XON and XOFF sequences (^Q and ^S) so they will be caught by the termi‐ nal."
        },
        {
            "flag": "-q",
            "long": "--indicator",
            "arg": null,
            "description": "Display a \"scrollbar\" on the righthand side of the edit window. It shows the position of the viewport in the buffer and how much of the buffer is covered by the viewport."
        },
        {
            "flag": "-r",
            "long": null,
            "arg": null,
            "description": "Set the target width for justifying and automatic hard-wrapping at this number of col‐ umns. If the value is 0 or less, wrapping will occur at the width of the screen minus number columns, allowing the wrap point to vary along with the width of the screen if the screen is resized. The default value is -8."
        },
        {
            "flag": "-s",
            "long": "--speller",
            "arg": "\"",
            "description": "Use this command to perform spell checking and correcting, instead of using the built- in corrector that calls hunspell(1) or spell(1)."
        },
        {
            "flag": "-t",
            "long": "--saveonexit",
            "arg": null,
            "description": "Save a changed buffer without prompting (when exiting with ^X). (The old form of the long option, --tempfile, is deprecated.)"
        },
        {
            "flag": "-u",
            "long": "--unix",
            "arg": null,
            "description": "Save a file by default in Unix format. This overrides nano's default behavior of sav‐ ing a file in the format that it had. (This option has no effect when you also use --noconvert.)"
        },
        {
            "flag": "-v",
            "long": "--view",
            "arg": null,
            "description": "Just view the file and disallow editing: read-only mode. This mode allows the user to open also other files for viewing, unless --restricted is given too."
        },
        {
            "flag": "-w",
            "long": "--nowrap",
            "arg": null,
            "description": "Do not automatically hard-wrap the current line when it becomes overlong. This is the default. (This option is the opposite of -b (--breaklonglines) -- the last one given takes effect.)"
        },
        {
            "flag": "-x",
            "long": "--nohelp",
            "arg": null,
            "description": "Don't show the two help lines at the bottom of the screen."
        },
        {
            "flag": "-y",
            "long": "--afterends",
            "arg": null,
            "description": "Make Ctrl+Right and Ctrl+Delete stop at word ends instead of beginnings."
        },
        {
            "flag": "-z",
            "long": "--suspendable",
            "arg": null,
            "description": "Obsolete option; ignored. Suspension is enabled by default, reachable via ^T^Z. (If you want a plain ^Z to suspend nano, add bind ^Z suspend main to your nanorc.) -%, --stateflags Use the top-right corner of the screen for showing some state flags: I when auto-in‐ denting, M when the mark is on, L when hard-wrapping (breaking long lines), R when recording a macro, and S when soft-wrapping. When the buffer is modified, a star (*) is shown after the filename in the center of the title bar. -, --minibar Suppress the title bar and instead show information about the current buffer at the bottom of the screen, in the space for the status bar. In this \"minibar\" the filename is shown on the left, followed by an asterisk if the buffer has been modified. On the right are displayed the current line and column number, the code of the character un‐ der the cursor (in Unicode format: U+xxxx), the same flags as are shown by --state‐‐ flags, and a percentage that expresses how far the cursor is into the file (linewise). When a file is loaded or saved, and also when switching between buffers, the number of lines in the buffer is displayed after the filename. This number is cleared upon the next keystroke, or replaced with an [i/n] counter when multiple buffers are open. The line plus column numbers and the character code are displayed only when --constantshow is used, and can be toggled on and off with M-C. The state flags are displayed only when --stateflags is used."
        },
        {
            "flag": "-0",
            "long": "--zero",
            "arg": null,
            "description": "Hide all elements of the interface (title bar, status bar, and help lines) and use all rows of the terminal for showing the contents of the buffer. The status bar appears only when there is a significant message, and disappears after 1.5 seconds or upon the next keystroke. With M-Z the title bar plus status bar can be toggled. With M-X the help lines. -!, --magic When neither the file's name nor its first line give a clue, try using libmagic to de‐ termine the applicable syntax."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "nanorc",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/nanorc/5/json"
        }
    ]
}