mc.1.in 127 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330
  1. .\" -*- mode: troff; coding: utf8 -*-
  2. .\"TOPICS "Topics:"
  3. .TH MC 1 "%DATE_OF_MAN_PAGE%" "MC Version %DISTR_VERSION%" "GNU Midnight Commander"
  4. .\"SKIP_SECTION"
  5. .SH "NAME"
  6. mc \- Visual shell for Unix\-like systems.
  7. .\"SKIP_SECTION"
  8. .SH "USAGE"
  9. .B mc
  10. [\-abcCdfhPstuUVx] [\-l log] [dir1 [dir2]] [\-e [file] ...] [\-v file]
  11. .\"NODE "DESCRIPTION"
  12. .SH "DESCRIPTION"
  13. GNU Midnight Commander is a directory browser/file manager for
  14. Unix\-like operating systems.
  15. .\"NODE "OPTIONS"
  16. .\"DONT_SPLIT"
  17. .SH "OPTIONS"
  18. .TP
  19. .I \-a, \-\-stickchars
  20. Disable usage of graphic characters for line drawing.
  21. .TP
  22. .I \-b, \-\-nocolor
  23. Force black and white display.
  24. .TP
  25. .I \-c, \-\-color
  26. Force color mode, please check the section
  27. .\"LINK2"
  28. Colors
  29. .\"Colors"
  30. for more information.
  31. .TP
  32. .I \-C arg, \-\-colors=arg
  33. Specify a different color set in the command line. The format of arg is
  34. documented in the
  35. .\"LINK2"
  36. Colors
  37. .\"Colors"
  38. section.
  39. .TP
  40. .I \-\-configure\-options
  41. Display configure options.
  42. .TP
  43. .I \-d, \-\-nomouse
  44. Disable mouse support.
  45. .TP
  46. .I \-D N, \-\-debuglevel=N
  47. Save the debug level for SMB VFS. N is in 0\-10 range.
  48. .TP
  49. .I \-e [file], \-\-edit[=file]
  50. Start the internal editor. If the file is specified, open it on
  51. startup. See also
  52. .BR "mcedit (1)" .
  53. .TP
  54. .I \-f, \-\-datadir
  55. Display the compiled\-in search paths for Midnight Commander files.
  56. .TP
  57. .I \-F, \-\-datadir\-info
  58. Display extended info about compiled\-in paths for
  59. Midnight Commander.
  60. .TP
  61. .I \-g, \-\-oldmouse
  62. Force a "normal tracking" mouse mode. Used when running on
  63. xterm\-capable terminals (tmux/screen).
  64. .TP
  65. .I \-k, \-\-resetsoft
  66. Reset softkeys to their default from the termcap/terminfo
  67. database. Only useful on HP terminals when the function keys don't work.
  68. .TP
  69. .I \-K file, \-\-keymap=file
  70. Specify a name of keymap file in the command line.
  71. .TP
  72. .I \-l file, \-\-ftplog=file
  73. Save the ftpfs dialog with the server in file.
  74. .TP
  75. .I \-\-nokeymap
  76. Don't load key bindings from any file, use default hardcoded keys.
  77. .TP
  78. .I \-P file, \-\-printwd=file
  79. Print the last working directory to the specified file. This option is
  80. not meant to be used directly. Instead, it's used from a special shell
  81. script that automatically changes the current directory of the shell to
  82. the last directory the Midnight Commander was in. Source the file
  83. .B %libexecdir%/mc/mc.sh
  84. (bash and zsh users) or
  85. .B %libexecdir%/mc.csh
  86. (tcsh users) respectively to define
  87. .B mc
  88. as an alias to the appropriate shell script.
  89. .TP
  90. .I \-s, \-\-slow
  91. Set alternative mode drawing of frameworks.
  92. If the section [Lines] is not filled, the symbol for the pseudographics
  93. frame is a space, otherwise the frame characters are taken from follow params.
  94. .B You can redefine the following variables:
  95. .TP
  96. .B lefttop
  97. left\-top corner
  98. .TP
  99. .B righttop
  100. right\-top corner
  101. .TP
  102. .B centertop
  103. center\-top cross
  104. .TP
  105. .B centerbottom
  106. center\-bottom cross
  107. .TP
  108. .B leftbottom
  109. left\-bottom corner
  110. .TP
  111. .B rightbottom
  112. right\-bottom corner
  113. .TP
  114. .B leftmiddle
  115. left\-middle cross
  116. .TP
  117. .B rightmiddle
  118. right\-middle cross
  119. .TP
  120. .B centermiddle
  121. center cross
  122. .TP
  123. .B horiz
  124. default horizontal line
  125. .TP
  126. .B vert
  127. default vertical line
  128. .TP
  129. .B thinhoriz
  130. thin horizontal line
  131. .TP
  132. .B thinvert
  133. thin vertical line
  134. .TP
  135. .I \-S arg, \-\-skin=arg
  136. Specify a name of skin in the command line. Technology of skins is
  137. documented in the
  138. .\"LINK2"
  139. Skins
  140. .\"Skins"
  141. section.
  142. .TP
  143. .I \-t, \-\-termcap
  144. Used only if the code was compiled with Slang and terminfo: it makes
  145. the Midnight Commander use the value of the
  146. .B TERMCAP
  147. variable for the terminal information instead of the information on
  148. the system wide terminal database
  149. .TP
  150. .I \-u, \-\-nosubshell
  151. Disable use of the concurrent shell (only makes sense if the Midnight
  152. Commander has been built with concurrent shell support).
  153. .TP
  154. .I \-U, \-\-subshell
  155. Enable use of the concurrent shell support (only makes sense if the
  156. Midnight Commander was built with the subshell support set as an
  157. optional feature).
  158. .TP
  159. .I \-v file, \-\-view=file
  160. Start the internal viewer to view the specified file. See also
  161. .BR "mcview (1)" .
  162. .TP
  163. .I \-V, \-\-version
  164. Display the version of the program.
  165. .TP
  166. .I \-x, \-\-xterm
  167. Force xterm mode. Used when running on xterm\-capable terminals (two
  168. screen modes, and able to send mouse escape sequences).
  169. .TP
  170. .I \-X, \-\-no\-x11
  171. Do not use X11 to get the state of modifiers Alt, Ctrl, Shift
  172. .PP
  173. If both paths are specified, the first path name is the directory to show
  174. in the active panel; the second path name is the directory to be shown in
  175. the other panel.
  176. .PP
  177. If one path is specified, the path name is the directory to show
  178. in the active panel; value of "other_dir" from panels.ini is the directory
  179. to be shown in the passive panel.
  180. .PP
  181. If no paths are specified, current directory is shown in the active panel;
  182. value of "other_dir" from panels.ini is the directory to be shown in
  183. the passive panel.
  184. .\"NODE "Overview"
  185. .SH "Overview"
  186. The screen of the Midnight Commander is divided into four parts.
  187. Almost all of the screen space is taken up by two directory panels.
  188. By default, the second line from the bottom of the screen is the
  189. shell command line, and the bottom line shows the function key labels.
  190. The topmost line is the
  191. .\"LINK2"
  192. menu bar line\&.
  193. .\"Menu Bar"
  194. The menu bar line may not be visible, but appears if you click the
  195. topmost line with the mouse or press the F9 key.
  196. .PP
  197. The Midnight Commander provides a view of two directories at the same
  198. time. One of the panels is the current panel (a selection bar is in
  199. the current panel). Almost all operations take place on the current
  200. panel. Some file operations like Rename and Copy by default use the
  201. directory of the unselected panel as a destination (don't worry, they
  202. always ask you for confirmation first). For more information, see the
  203. sections on the
  204. .\"LINK2"
  205. Directory Panels\&,
  206. .\"Directory Panels"
  207. the
  208. .\"LINK2"
  209. Left and Right Menus
  210. .\"Left and Right Menus"
  211. and the
  212. .\"LINK2"
  213. File Menu\&.
  214. .\"File Menu"
  215. .PP
  216. You can execute system commands from the Midnight Commander by simply
  217. typing them. Everything you type will appear on the shell command line,
  218. and when you press Enter the Midnight Commander will execute the
  219. command line you typed; read the
  220. .\"LINK2"
  221. Shell Command Line
  222. .\"Shell Command Line"
  223. and
  224. .\"LINK2"
  225. Input Line Keys
  226. .\"Input Line Keys"
  227. sections to learn more about the command line.
  228. .\"NODE "Mouse Support"
  229. .SH "Mouse Support"
  230. The Midnight Commander comes with mouse support. It is activated
  231. whenever you are running on an
  232. .B xterm(1)
  233. terminal (it even works if you take a telnet, ssh or rlogin connection to
  234. another machine from the xterm) or if you are running on a Linux
  235. console and have the
  236. .B gpm
  237. mouse server running.
  238. .PP
  239. When you left click on a file in the directory panels, that file is
  240. selected; if you click with the right button, the file is marked (or
  241. unmarked, depending on the previous state).
  242. .PP
  243. Double\-clicking on a file will try to execute the command if it is
  244. an executable program; and if the
  245. .\"LINK2"
  246. extension file
  247. .\"Edit Extension File"
  248. has a program specified for the file's extension, the specified
  249. program is executed.
  250. .PP
  251. Also, it is possible to execute the commands assigned to the function
  252. key labels by clicking on them.
  253. .PP
  254. The default auto repeat rate for the mouse buttons is 400
  255. milliseconds. This may be changed to other values by editing the
  256. .\"LINK2"
  257. \&~/.config/mc/ini
  258. .\"Save Setup"
  259. file and changing the
  260. .I mouse_repeat_rate
  261. parameter.
  262. .PP
  263. If you are running the Midnight Commander with the mouse support, you
  264. can get the default mouse behavior (cutting and pasting text) by holding
  265. down the Shift key.
  266. .SH ""
  267. .\"NODE "Keys"
  268. .SH "Keys"
  269. Some commands in the Midnight Commander involve the use of the
  270. .I Control
  271. (sometimes labeled CTRL or CTL) and the
  272. .I Meta
  273. (sometimes labeled ALT or even Compose) keys. In this manual we will
  274. use the following abbreviations:
  275. .TP
  276. .B C\-<chr>
  277. means hold the Control key while typing the character <chr>.
  278. Thus C\-f would be: hold the Control key and type f.
  279. .TP
  280. .B Alt\-<chr>
  281. means hold the Meta or Alt key down while typing <chr>.
  282. If there is no Meta or Alt key, type
  283. .IR ESC ,
  284. release it, then type the character <chr>.
  285. .TP
  286. .B S\-<chr>
  287. means hold the Shift key down while typing <chr>.
  288. .PP
  289. All input lines in the Midnight Commander use an approximation to
  290. the GNU Emacs editor's key bindings (default).
  291. .PP
  292. You may redefine key bindings. See
  293. .\"LINK2"
  294. .I redefine hotkey bindings
  295. .\"Keys_redefine"
  296. .PP
  297. for more info. All other key bindings (described in this manual) relative
  298. to default behavior.
  299. .PP
  300. There are many sections which tell about the keys. The following are
  301. the most important.
  302. .PP
  303. The
  304. .\"LINK2"
  305. File Menu
  306. .\"File Menu"
  307. section documents the keyboard shortcuts for the commands appearing in
  308. the File menu. This section includes the function keys. Most of these
  309. commands perform some action, usually on the selected file or the
  310. tagged files.
  311. .PP
  312. The
  313. .\"LINK2"
  314. Directory Panels
  315. .\"Directory Panels"
  316. section documents the keys which select a file or tag files as a
  317. target for a later action (the action is usually one from the file
  318. menu).
  319. .PP
  320. The
  321. .\"LINK2"
  322. Shell Command Line
  323. .\"Shell Command Line"
  324. section list the keys which are used for entering and editing command
  325. lines. Most of these copy file names and such from the directory
  326. panels to the command line (to avoid excessive typing) or access the
  327. command line history.
  328. .PP
  329. .\"LINK2"
  330. Input Line Keys
  331. .\"Input Line Keys"
  332. are used for editing input lines. This means both the command line and
  333. the input lines in the query dialogs.
  334. .\"NODE " Keys_redefine"
  335. .SH " Redefine hotkey bindings"
  336. Hotkey bindings may be read from external file (keymap\-file).
  337. Initially, Mignight Commander creates key bindings using keymap defined
  338. in the source code. Then, two files
  339. .B %prefix%/share/mc/mc.keymap
  340. and
  341. .B %sysconfdir%/mc/mc.keymap
  342. are loaded always, sequentially reassigned key bindings defined earlier.
  343. User\-defined keymap\-file is searched on the following algorithm (to the first one found):
  344. .IP
  345. .br
  346. 1) command line option
  347. .B \-K <keymap>
  348. or
  349. .B \-\-keymap=<keymap>
  350. .br
  351. 2) Environment variable
  352. .B MC_KEYMAP
  353. .br
  354. 3) Parameter
  355. .B keymap
  356. in section
  357. .B [Midnight\-Commander]
  358. of config file.
  359. .br
  360. 4) File
  361. .B ~/.config/mc/mc.keymap
  362. .br
  363. .PP
  364. Command line option, environment variable and parameter in config file may
  365. contain the absolute path to the keymap\-file (with the extension \.keymap
  366. or without it). Search of keymap\-file will occur in (to the first one found):
  367. .IP
  368. .br
  369. 1)
  370. .B ~/.config/mc
  371. .br
  372. 2)
  373. .B %sysconfdir%/mc/
  374. .br
  375. 3)
  376. .B %prefix%/share/mc/
  377. .\"NODE " Miscellaneous Keys"
  378. .SH " Miscellaneous Keys"
  379. Here are some keys which don't fall into any of the other categories:
  380. .TP
  381. .B Enter
  382. if there is some text in the command line (the one at the bottom of
  383. the panels), then that command is executed. If there is no text in the
  384. command line then if the selection bar is over a directory the
  385. Midnight Commander does a
  386. .B chdir(2)
  387. to the selected directory and reloads the information on the panel;
  388. if the selection is an executable file then it is executed. Finally,
  389. if the extension of the selected file name matches one of the
  390. extensions in the
  391. .\"LINK2"
  392. extensions file
  393. .\"Edit Extension File"
  394. then the corresponding command is executed.
  395. .TP
  396. .B C\-l
  397. repaint all the information in the Midnight Commander.
  398. .TP
  399. .B C\-x c
  400. run the
  401. .\"LINK2"
  402. Chmod
  403. .\"Chmod"
  404. command on a file or on the tagged files.
  405. .TP
  406. .B C\-x o
  407. run the
  408. .\"LINK2"
  409. Chown
  410. .\"Chown"
  411. command on the current file or on the tagged files.
  412. .TP
  413. .B C\-x l
  414. run the hard link command.
  415. .TP
  416. .B C\-x s
  417. run the absolute symbolic link command.
  418. .TP
  419. .B C\-x v
  420. run the relative symbolic link command. See the
  421. .\"LINK2"
  422. File Menu
  423. .\"File Menu"
  424. section for more information about symbolic links.
  425. .TP
  426. .B C\-x i
  427. set the other panel display mode to information.
  428. .TP
  429. .B C\-x q
  430. set the other panel display mode to quick view.
  431. .TP
  432. .B C\-x !
  433. execute the
  434. .\"LINK2"
  435. External panelize
  436. .\"External panelize"
  437. command.
  438. .TP
  439. .B C\-x h
  440. run the
  441. .\"LINK2"
  442. add directory to hotlist
  443. .\"Hotlist"
  444. command.
  445. .TP
  446. .B Alt\-!
  447. executes the Filtered view command, described in the
  448. .\"LINK2"
  449. view command\&.
  450. .\"Internal File Viewer"
  451. .TP
  452. .B Alt\-?
  453. executes the
  454. .\"LINK2"
  455. Find file
  456. .\"Find File"
  457. command.
  458. .TP
  459. .B Alt\-c
  460. pops up the
  461. .\"LINK2"
  462. quick cd
  463. .\"Quick cd"
  464. dialog.
  465. .TP
  466. .B C\-o
  467. when the program is being run in the Linux or FreeBSD console or under
  468. an xterm, it will show you the output of the previous command. When ran
  469. on the Linux console, the Midnight Commander uses an external program
  470. (cons.saver) to handle saving and restoring of information on the
  471. screen.
  472. .PP
  473. When the subshell support is compiled in, you can type C\-o at any time
  474. and you will be taken back to the Midnight Commander main screen, to
  475. return to your application just type C\-o. If you have an application
  476. suspended by using this trick, you won't be able to execute other
  477. programs from the Midnight Commander until you terminate the suspended
  478. application.
  479. .\"NODE " Directory Panels"
  480. .SH " Directory Panels"
  481. This section lists the keys which operate on the directory panels. If
  482. you want to know how to change the appearance of the panels take a
  483. look at the section on
  484. .\"LINK2"
  485. Left and Right Menus\&.
  486. .\"Left and Right Menus"
  487. .TP
  488. .B Tab, C\-i
  489. change the current panel. The old other panel becomes the new current
  490. panel and the old current panel becomes the new other panel. The
  491. selection bar moves from the old current panel to the new current
  492. panel.
  493. .TP
  494. .B Insert, C\-t
  495. to tag files you may use the Insert key (the kich1 terminfo sequence).
  496. To untag files, just retag a tagged file.
  497. .TP
  498. .B M\-e
  499. to change charset of panel you may use M\-e (Alt\-e).
  500. Recoding is made from selected codepage into system codepage. To
  501. cancel the recoding you may select "directory up" (..) in active panel.
  502. To cancel the charsets in all directories, select "No translation " in
  503. the dialog of encodings.
  504. .TP
  505. .B Alt\-g, Alt\-r, Alt\-j
  506. used to select the top file in a panel, the middle file and the bottom one,
  507. respectively.
  508. .TP
  509. .B Alt\-t
  510. toggle the current display listing to show the next display listing
  511. mode.
  512. With this it is possible to quickly switch to brief listing, long
  513. listing, user defined listing mode, and back to the default.
  514. .TP
  515. .B C\-\\\\ (control\-backslash)
  516. show the
  517. .\"LINK2"
  518. directory hotlist
  519. .\"Hotlist"
  520. and change to the selected directory.
  521. .TP
  522. .B + \ (plus)
  523. this is used to select (tag) a group of files. The Midnight Commander
  524. will prompt for a selection options. When
  525. .I Files only
  526. checkbox is on, only files will be selected. If
  527. .I Files only
  528. is off, as files as directories will be selected.
  529. When
  530. .I Shell Patterns
  531. checkbox is on, the regular expression is much like the filename globbing
  532. in the shell (* standing for zero or more characters and ? standing
  533. for one character). If
  534. .I Shell Patterns
  535. is off, then the tagging of files is done with normal regular
  536. expressions (see ed (1)). When
  537. .I Case sensitive
  538. checkbox is on, the selection will be case sensitive characters.
  539. If
  540. .I Case sensitive
  541. is off, the case will be ignored.
  542. .TP
  543. .B \\\\ (backslash)
  544. use the "\\" key to unselect a group of files. This is the opposite of
  545. the Plus key.
  546. .TP
  547. .B up\-key, C\-p
  548. move the selection bar to the previous entry in the panel.
  549. .TP
  550. .B down\-key, C\-n
  551. move the selection bar to the next entry in the panel.
  552. .TP
  553. .B home, a1, Alt\-<
  554. move the selection bar to the first entry in the panel.
  555. .TP
  556. .B end, c1, Alt\->
  557. move the selection bar to the last entry in the panel.
  558. .TP
  559. .B next\-page, C\-v
  560. move the selection bar one page down.
  561. .TP
  562. .B prev\-page, Alt\-v
  563. move the selection bar one page up.
  564. .TP
  565. .B Alt\-o
  566. If the currently selected file is a directory, load that directory on
  567. the other panel and moves the selection to the next file. If the
  568. currently selected file is not a directory, load the parent directory
  569. on the other panel and moves the selection to the next file.
  570. .TP
  571. .B Alt\-i
  572. make the current directory of the current panel also the current
  573. directory of the other panel. Put the other panel to the listing mode
  574. if needed. If the current panel is panelized, the other panel doesn't
  575. become panelized.
  576. .TP
  577. .B C\-PageUp, C\-PageDown
  578. only when supported by the terminal: change to ".." and to the currently
  579. selected directory respectively.
  580. .TP
  581. .B Alt\-y
  582. moves to the previous directory in the history, equivalent to clicking
  583. the
  584. .I <
  585. with the mouse.
  586. .TP
  587. .B Alt\-u
  588. moves to the next directory in the history, equivalent to clicking the
  589. .I >
  590. with the mouse.
  591. .TP
  592. .B Alt\-Shift\-h, Alt\-H
  593. displays the directory history, equivalent to depressing the 'v' with
  594. the mouse.
  595. .\"NODE " Quick search"
  596. .SH " Quick search"
  597. The Quick search mode allows you to perform fast file search in file panel.
  598. Press
  599. .I C\-s
  600. or
  601. .I Alt\-s
  602. to start a filename search in the directory listing.
  603. .P
  604. When the search is active, the user input will be added to the search string
  605. instead of the command line. If the
  606. .I Show mini\-status
  607. option is enabled the search string is shown on the mini\-status
  608. line. When typing, the selection bar will move to the next file
  609. starting with the typed letters. The
  610. .I Backspace
  611. or
  612. .I DEL
  613. keys can be used to correct typing mistakes. If C\-s is pressed
  614. again, the next match is searched for.
  615. .P
  616. If quick search is started with double pressing of C\-s, the previous quick
  617. search pattern will be used for current search.
  618. .P
  619. Besides the filename characters, you can also use wildcard
  620. characters '*' and '?'.
  621. .\"NODE " Shell Command Line"
  622. .SH " Shell Command Line"
  623. This section lists keys which are useful to avoid excessive typing when
  624. entering shell commands.
  625. .TP
  626. .B Alt\-Enter
  627. copy the currently selected file name to the command line.
  628. .TP
  629. .B C\-Enter
  630. same a Alt\-Enter. May not work on remote systems and some terminals.
  631. .TP
  632. .B C\-Shift\-Enter
  633. copy the full path name of the currently selected file to the command
  634. line. May not work on remote systems and some terminals.
  635. .TP
  636. .B Alt\-Tab
  637. does the filename, command, variable, username and hostname
  638. .\"LINK2"
  639. completion
  640. .\"Completion"
  641. for you.
  642. .TP
  643. .B C\-x t, C\-x C\-t
  644. copy the tagged files (or if there are no tagged files, the selected
  645. file) of the current panel (C\-x t) or of the other panel (C\-x C\-t) to
  646. the command line.
  647. .TP
  648. .B C\-x p, C\-x C\-p
  649. the first key sequence copies the current path name to the command
  650. line, and the second one copies the unselected panel's path name to
  651. the command line.
  652. .TP
  653. .B C\-q
  654. the quote command can be used to insert characters that are otherwise
  655. interpreted by the Midnight Commander (like the '+' symbol)
  656. .TP
  657. .B Alt\-p, Alt\-n
  658. use these keys to browse through the command history. Alt\-p takes you
  659. to the last entry, Alt\-n takes you to the next one.
  660. .TP
  661. .B Alt\-h
  662. displays the history for the current input line.
  663. .\"NODE " General Movement Keys"
  664. .SH " General Movement Keys"
  665. The help viewer, the file viewer and the directory tree use common
  666. code to handle moving. Therefore they accept exactly the same
  667. keys. Each of them also accepts some keys of its own.
  668. .PP
  669. Other parts of the Midnight Commander use some of the same movement
  670. keys, so this section may be of use for those parts too.
  671. .TP
  672. .B Up, C\-p
  673. moves one line backward.
  674. .TP
  675. .B Down, C\-n
  676. moves one line forward.
  677. .TP
  678. .B Prev Page, Page Up, Alt\-v
  679. moves one page up.
  680. .TP
  681. .B Next Page, Page Down, C\-v
  682. moves one page down.
  683. .TP
  684. .B Home, A1
  685. moves to the beginning.
  686. .TP
  687. .B End, C1
  688. move to the end.
  689. .PP
  690. The help viewer and the file viewer accept the following keys in
  691. addition the to ones mentioned above:
  692. .TP
  693. .B b, C\-b, C\-h, Backspace, Delete
  694. moves one page up.
  695. .TP
  696. .B Space bar
  697. moves one page down.
  698. .TP
  699. .B u, d
  700. moves one half of a page up or down.
  701. .TP
  702. .B g, G
  703. moves to the beginning or to the end.
  704. .\"NODE " Input Line Keys"
  705. .SH " Input Line Keys"
  706. The input lines (they are used for the
  707. .\"LINK2"
  708. command line
  709. .\"Shell Command Line"
  710. and for the query dialogs in the program) accept these keys:
  711. .TP
  712. .B C\-a
  713. puts the cursor at the beginning of line.
  714. .TP
  715. .B C\-e
  716. puts the cursor at the end of the line.
  717. .TP
  718. .B C\-b, move\-left
  719. move the cursor one position left.
  720. .TP
  721. .B C\-f, move\-right
  722. move the cursor one position right.
  723. .TP
  724. .B Alt\-f
  725. moves one word forward.
  726. .TP
  727. .B Alt\-b
  728. moves one word backward.
  729. .TP
  730. .B C\-h, Backspace
  731. delete the previous character.
  732. .TP
  733. .B C\-d, Delete
  734. delete the character in the point (over the cursor).
  735. .TP
  736. .B C\-@
  737. sets the mark for cutting.
  738. .TP
  739. .B C\-w
  740. copies the text between the cursor and the mark to a kill buffer and
  741. removes the text from the input line.
  742. .TP
  743. .B Alt\-w
  744. copies the text between the cursor and the mark to a kill buffer.
  745. .TP
  746. .B C\-y
  747. yanks back the contents of the kill buffer.
  748. .TP
  749. .B C\-k
  750. kills the text from the cursor to the end of the line.
  751. .TP
  752. .B Alt\-p, Alt\-n
  753. Use these keys to browse through the command history. Alt\-p takes you
  754. to the last entry, Alt\-n takes you to the next one.
  755. .TP
  756. .B Alt\-C\-h, Alt\-Backspace
  757. delete one word backward.
  758. .TP
  759. .B Alt\-Tab
  760. does the filename, command, variable, username and hostname
  761. .\"LINK2"
  762. completion
  763. .\"Completion"
  764. for you.
  765. .SH ""
  766. .\"NODE "Menu Bar"
  767. .SH "Menu Bar"
  768. The menu bar pops up when you press F9 or click the mouse on the top
  769. row of the screen. The menu bar has five menus: "Left", "File",
  770. "Command", "Options" and "Right".
  771. .PP
  772. The
  773. .\"LINK2"
  774. Left and Right Menus
  775. .\"Left and Right Menus"
  776. allow you to modify the appearance of the left and right directory
  777. panels.
  778. .PP
  779. The
  780. .\"LINK2"
  781. File Menu
  782. .\"File Menu"
  783. lists the actions you can perform on the currently selected file or
  784. the tagged files.
  785. .PP
  786. The
  787. .\"LINK2"
  788. Command Menu
  789. .\"Command Menu"
  790. lists the actions which are more general and bear no relation to the
  791. currently selected file or the tagged files.
  792. .PP
  793. The
  794. .\"LINK2"
  795. Options Menu
  796. .\"Options Menu"
  797. lists the actions which allow you to customize the Midnight Commander.
  798. .\"NODE " Left and Right Menus"
  799. .SH " Left and Right (Above and Below) Menus"
  800. The outlook of the directory panels can be changed from the
  801. .B Left
  802. and
  803. .B Right
  804. menus (they are named
  805. .B Above
  806. and
  807. .B Below
  808. when the horizontal panel split is chosen from the
  809. .\"LINK2"
  810. Layout
  811. .\"Layout"
  812. options dialog).
  813. .\"NODE " Listing Mode..."
  814. .SH " Listing Mode..."
  815. The listing mode view is used to display a listing of files, there are
  816. four different listing modes available:
  817. .BR Full ,
  818. .BR Brief ,
  819. .B Long
  820. and
  821. .BR User .
  822. The full directory view shows the file name, the size of the file and
  823. the modification time.
  824. .PP
  825. The brief view shows only the file name and it has two columns
  826. (therefore showing twice as many files as other views). The long view
  827. is similar to the output of
  828. .B "ls \-l"
  829. command. The long view takes the whole screen width.
  830. .PP
  831. If you choose the "User" display format, then you have to specify
  832. the display format.
  833. .PP
  834. The user display format must start with a panel size specifier. This
  835. may be "half" or "full", and they specify a half screen panel and a
  836. full screen panel respectively.
  837. .PP
  838. After the panel size, you may specify the two columns mode on the
  839. panel, this is done by adding the number "2" to the user format
  840. string.
  841. .PP
  842. After this you add the name of the fields with an optional size
  843. specifier. This are the available fields you may display:
  844. .TP
  845. .B name
  846. displays the file name.
  847. .TP
  848. .B size
  849. displays the file size.
  850. .TP
  851. .B bsize
  852. is an alternative form of the
  853. .B size
  854. format. It displays the size of the files and for directories it just
  855. shows SUB\-DIR or UP\-\-DIR.
  856. .TP
  857. .B type
  858. displays a one character wide type field. This character is similar to
  859. what is displayed by ls with the \-F flag \-
  860. .B *
  861. for executable files,
  862. .B /
  863. for directories,
  864. .B @
  865. for links,
  866. .B =
  867. for sockets,
  868. .B \-
  869. for character devices,
  870. .B +
  871. for block devices,
  872. .B |
  873. for pipes,
  874. .B ~
  875. for symbolic links to directories and
  876. .B !
  877. for stale symlinks (links that point nowhere).
  878. .TP
  879. .B mark
  880. an asterisk if the file is tagged, a space if it's not.
  881. .TP
  882. .B mtime
  883. file's last modification time.
  884. .TP
  885. .B atime
  886. file's last access time.
  887. .TP
  888. .B ctime
  889. file's status change time.
  890. .TP
  891. .B perm
  892. a string representing the current permission bits of the file.
  893. .TP
  894. .B mode
  895. an octal value with the current permission bits of the file.
  896. .TP
  897. .B nlink
  898. the number of links to the file.
  899. .TP
  900. .B ngid
  901. the GID (numeric).
  902. .TP
  903. .B nuid
  904. the UID (numeric).
  905. .TP
  906. .B owner
  907. the owner of the file.
  908. .TP
  909. .B group
  910. the group of the file.
  911. .TP
  912. .B inode
  913. the inode of the file.
  914. .PP
  915. Also you can use following keywords to define the panel layout:
  916. .TP
  917. .B space
  918. a space in the display format.
  919. .TP
  920. .B |
  921. add a vertical line to the display format.
  922. .PP
  923. To force one field to a fixed size (a size specifier), you just add
  924. .B :
  925. followed by the number of characters you want the field to have. If the
  926. number is followed by the symbol
  927. .BR + ,
  928. then the size specifies the minimal field size \- if the program finds
  929. out that there is more space on the screen, it will then expand that
  930. field.
  931. .PP
  932. For example, the
  933. .B Full
  934. display corresponds to this format:
  935. .PP
  936. half type name | size | mtime
  937. .PP
  938. And the
  939. .B Long
  940. display corresponds to this format:
  941. .PP
  942. full perm space nlink space owner space group space size space mtime
  943. space name
  944. .PP
  945. This is a nice user display format:
  946. .PP
  947. half name | size:7 | type mode:3
  948. .PP
  949. Panels may also be set to the following modes:
  950. .TP
  951. .B "Info"
  952. The info view display information related to the currently
  953. selected file and if possible information about the current file
  954. system.
  955. .TP
  956. .B "Tree"
  957. The tree view is quite similar to the
  958. .\"LINK2"
  959. directory tree
  960. .\"Directory Tree"
  961. feature. See the section about it for more information.
  962. .TP
  963. .B "Quick View"
  964. In this mode, the panel will switch to a reduced
  965. .\"LINK2"
  966. viewer
  967. .\"Internal File Viewer"
  968. that displays the contents of the currently selected file, if you
  969. select the panel (with the tab key or the mouse), you will have access
  970. to the usual viewer commands.
  971. .\"NODE " Sort Order..."
  972. .SH " Sort Order..."
  973. The eight sort orders are by name, by extension, by modification time,
  974. by access time, and by inode information modification time, by size,
  975. by inode and unsorted. In the Sort order dialog box you can choose
  976. the sort order and you may also specify if you want to sort in reverse
  977. order by checking the reverse box.
  978. .PP
  979. By default directories are sorted before files but this can be changed
  980. from the
  981. .\"LINK2"
  982. Panel options
  983. .\"Panel options"
  984. menu (option
  985. .BR "Mix all files" ).
  986. .\"NODE " Filter..."
  987. .SH " Filter..."
  988. The filter command allows you to specify a shell pattern (for example
  989. .BR "*.tar.gz" )
  990. which the files must match to be shown. Regardless
  991. of the filter pattern, the directories and the links to directories
  992. are always shown in the directory panel.
  993. .\"NODE " Reread"
  994. .SH " Reread"
  995. The reread command reload the list of files in the directory. It is
  996. useful if other processes have created or removed files.
  997. .\"NODE " File Menu"
  998. .SH " File Menu"
  999. The Midnight Commander uses the F1 \- F10 keys as keyboard shortcuts
  1000. for commands appearing in the file menu. The escape sequences for the
  1001. function keys are terminfo capabilities kf1 trough kf10. On terminals
  1002. without function key support, you can achieve the same functionality by
  1003. pressing the ESC key and then a number in the range 1 through 9 and 0
  1004. (corresponding to F1 to F9 and F10 respectively).
  1005. .PP
  1006. The File menu has the following commands (keyboard shortcuts in parentheses):
  1007. .PP
  1008. .B Help (F1)
  1009. .PP
  1010. Invokes the built\-in hypertext help viewer. Inside the
  1011. .\"LINK2"
  1012. help viewer\&,
  1013. .\"Contents"
  1014. you can use the Tab key to select the next link and the Enter key to
  1015. follow that link. The keys Space and Backspace are used to move
  1016. forward and backward in a help page. Press F1 again to get the full
  1017. list of accepted keys.
  1018. .PP
  1019. .B Menu (F2)
  1020. .PP
  1021. Invoke the
  1022. .\"LINK2"
  1023. user menu\&.
  1024. .\"Edit Menu File"
  1025. The user menu provides an easy way to provide users with a menu and
  1026. add extra features to the Midnight Commander.
  1027. .PP
  1028. .B View (F3, F13)
  1029. .PP
  1030. View the currently selected file. By default this invokes the
  1031. .\"LINK2"
  1032. Internal File Viewer
  1033. .\"Internal File Viewer"
  1034. but if the option "Use internal view" is off, it invokes an external
  1035. file viewer specified by the
  1036. .B VIEWER
  1037. environment variable. If
  1038. .B VIEWER
  1039. is undefined, the
  1040. .B PAGER
  1041. environment variable is tried. If
  1042. .B PAGER
  1043. is also undefined, the "view" command is invoked. If you use F13
  1044. instead, the viewer will be invoked without doing any formatting or
  1045. preprocessing to the file.
  1046. .P
  1047. See
  1048. .\"LINK2"
  1049. parameters for external viewer
  1050. .\"Parameters for external editor or viewer"
  1051. for explain how you may specify an extended command line options
  1052. for external viewers.
  1053. .PP
  1054. .B Filtered View (Alt\-!)
  1055. .PP
  1056. This command prompts for a command
  1057. and its arguments (the argument defaults to the currently selected
  1058. file name), the output from such command is shown in the internal file
  1059. viewer.
  1060. .PP
  1061. .B Edit (F4, F14)
  1062. .PP
  1063. Press F4 to edit the highlighted file. Press F14 (usually F14)
  1064. to start the editor with a new, empty file.
  1065. Currently they invoke the
  1066. .B vi
  1067. editor, or the editor specified in the
  1068. .B EDITOR
  1069. environment variable, or the
  1070. .\"LINK2"
  1071. Internal File Editor
  1072. .\"Internal File Editor"
  1073. if the use_internal_edit option is on.
  1074. .P
  1075. See
  1076. .\"LINK2"
  1077. parameters for external editor
  1078. .\"Parameters for external editor or viewer"
  1079. for explain how you may specify an extended command line options
  1080. for external editors.
  1081. .PP
  1082. .B Copy (F5, F15)
  1083. .PP
  1084. Press F5 to pop up an input dialog to copy the currently selected file (or
  1085. the tagged files, if there is at least one file tagged) to the
  1086. directory/filename you specify in the input dialog. The destination
  1087. defaults to the directory in the non\-selected panel. Space for destination
  1088. file may be preallocated relative to preallocate_space configure option.
  1089. During this process, you can press C\-c or ESC to abort the operation.
  1090. For details about source mask (which will be usually either * or ^\\(.*\\)$
  1091. depending on setting of Use shell patterns) and possible wildcards in the
  1092. destination see
  1093. .\"LINK2"
  1094. Mask copy/rename\&.
  1095. .\"Mask Copy/Rename"
  1096. .PP
  1097. F15 (usually F15) is similar, but defaults to the directory in the
  1098. selected panel. It always operates on the selected file, regardless of
  1099. any tagged files.
  1100. .PP
  1101. On some systems, it is possible to do the copy in the background by
  1102. clicking on the background button (or pressing Alt\-b in the dialog
  1103. box). The
  1104. .\"LINK2"
  1105. Background Jobs
  1106. .\"Background jobs"
  1107. is used to control the background process.
  1108. .PP
  1109. .B Link (C\-x l)
  1110. .PP
  1111. Create a hard link to the current file.
  1112. .PP
  1113. .B Absolute symlink (C\-x s)
  1114. .PP
  1115. Create a absolute symbolic link to the current file.
  1116. .PP
  1117. .B Relative symLink (C\-x v)
  1118. .PP
  1119. Create a relative symbolic link to the current file.
  1120. .PP
  1121. To those of you who don't know what links are: creating a link to a file
  1122. is a bit like copying the file, but both the source filename and the destination
  1123. filename represent the same file image. For example, if you edit one of these
  1124. files, all changes you make will appear in both files. Some people call
  1125. links aliases or shortcuts.
  1126. .PP
  1127. A hard link appears as a real file. After making it, there is no way of
  1128. telling which one is the original and which is the link. If you delete
  1129. either one of them the other one is still intact. It is very difficult
  1130. to notice that the files represent the same image. Use hard links when
  1131. you don't even want to know.
  1132. .PP
  1133. A symbolic link is a reference to the name of the original file. If
  1134. the original file is deleted the symbolic link is useless. It is quite
  1135. easy to notice that the files represent the same image. The Midnight
  1136. Commander shows an "@"\-sign in front of the file name if it is a
  1137. symbolic link to somewhere (except to directory, where it shows a tilde (~)).
  1138. The original file which the link points to is shown on mini\-status line if the
  1139. .I "Show mini\-status"
  1140. option is enabled. Use symbolic links when you want to avoid the
  1141. confusion that can be caused by hard links.
  1142. .PP
  1143. When you press "C\-x s" Midnight Commander will automatically fill in the
  1144. complete path+filename of the original file and suggest a name for the link.
  1145. You can change either one.
  1146. .PP
  1147. Sometimes you may want to change the absolute path of the original into
  1148. a relative path. An absolute path starts from the root directory:
  1149. .PP
  1150. .I /home/frodo/mc/mc \-> /home/frodo/new/mc
  1151. .PP
  1152. A relative link describes the original file's location starting from the
  1153. location of the link itself:
  1154. .PP
  1155. .I /home/frodo/mc/mc \-> ../new/mc
  1156. .PP
  1157. You can force Midnight Commander to suggest a relative path by pressing
  1158. "C\-x v" instead of "C\-x s".
  1159. .PP
  1160. .B Rename/Move (F6, F16)
  1161. .PP
  1162. Press F6 to pop up an input dialog to copy the currently selected file (or
  1163. the tagged files, if there is at least one file tagged) to the
  1164. directory/filename you specify in the input dialog. The destination
  1165. defaults to the directory in the non\-selected panel. For more details
  1166. look at Copy (F5) operation above, most of the things are quite similar.
  1167. .PP
  1168. F16 (usually F16) is similar, but defaults to the directory in the
  1169. selected panel. It always operates on the selected file, regardless of
  1170. any tagged files.
  1171. .PP
  1172. On some systems, it is possible to do the copy in the background by
  1173. clicking on the background button (or pressing Alt\-b in the dialog
  1174. box). The
  1175. .\"LINK2"
  1176. Background Jobs
  1177. .\"Background jobs"
  1178. is used to control the background process.
  1179. .PP
  1180. .B Mkdir (F7)
  1181. .PP
  1182. Pop up an input dialog and creates the directory specified.
  1183. .PP
  1184. .B Delete (F8)
  1185. .PP
  1186. Delete the currently selected file or the tagged files in the
  1187. currently selected panel. During the process, you can press C\-c or
  1188. ESC to abort the operation.
  1189. .PP
  1190. .B Quick cd (Alt\-c)
  1191. Use the
  1192. .\"LINK2"
  1193. quick cd
  1194. .\"Quick cd"
  1195. command if you have full command line and want to cd somewhere.
  1196. .PP
  1197. .B Select group (+)
  1198. .PP
  1199. This is used to select (tag) a group of files. The Midnight Commander
  1200. will prompt for a selection options. When
  1201. .I Files only
  1202. checkbox is on, only files will be selected. If
  1203. .I Files only
  1204. is off, as files as directories will be selected.
  1205. When
  1206. .I Shell Patterns
  1207. checkbox is on, the regular expression is much like the filename globbing
  1208. in the shell (* standing for zero or more characters and ? standing
  1209. for one character). If
  1210. .I Shell Patterns
  1211. is off, then the tagging of files is done with normal regular
  1212. expressions (see ed (1)). When
  1213. .I Case sensitive
  1214. checkbox is on, the selection will be case sensitive characters.
  1215. If
  1216. .I Case sensitive
  1217. is off, the case will be ignored.
  1218. .PP
  1219. .B Unselect group (\\\\)
  1220. .PP
  1221. Used to unselect a group of files. This is the opposite of the
  1222. .I "Select group"
  1223. command.
  1224. .PP
  1225. .B Quit (F10, Shift\-F10)
  1226. .PP
  1227. Terminate the Midnight Commander. Shift\-F10 is used when you want to
  1228. quit and you are using the shell wrapper. Shift\-F10 will not take you
  1229. to the last directory you visited with the Midnight Commander, instead
  1230. it will stay at the directory where you started the Midnight Commander.
  1231. .\"NODE " Quick cd"
  1232. .SH " Quick cd"
  1233. This command is useful if you have a full command line and want to
  1234. .\"LINK2"
  1235. cd
  1236. .\"The cd internal command"
  1237. somewhere without having to yank and paste the command line. This command
  1238. pops up a small dialog, where you enter everything you would enter after
  1239. .B cd
  1240. on the command line and then you press enter. This features all the things
  1241. that are already in the
  1242. .\"LINK2"
  1243. internal cd command\&.
  1244. .\"The cd internal command"
  1245. .\"NODE " Command Menu"
  1246. .SH " Command Menu"
  1247. The
  1248. .\"LINK2"
  1249. Directory tree
  1250. .\"Directory Tree"
  1251. command shows a tree figure of the directories.
  1252. .PP
  1253. The
  1254. .\"LINK2"
  1255. "Find file"
  1256. .\"Find File"
  1257. command allows you to search for a specific file.
  1258. .PP
  1259. The "Swap panels" command swaps the contents of the two directory panels.
  1260. .PP
  1261. The "Switch panels on/off" command shows the output of the last shell command.
  1262. This works only on xterm and on Linux and FreeBSD console.
  1263. .PP
  1264. The "Compare directories" command compares the directory
  1265. panels with each other. You can then use the Copy (F5) command to make
  1266. the panels identical. There are three compare methods. The quick method
  1267. compares only file size and file date. The thorough method makes a
  1268. full byte\-by\-byte compare. The thorough method is not available if the
  1269. machine does not support the mmap(2) system call. The size\-only
  1270. compare method just compares the file sizes and does not check the
  1271. contents or the date times, it just checks the file size.
  1272. .PP
  1273. The
  1274. .\"LINK2"
  1275. "External panelize"
  1276. .\"External panelize"
  1277. allows you to execute an external program, and make the output of that
  1278. program the contents of the current panel.
  1279. .PP
  1280. The "Command history" command shows a list of typed commands. The
  1281. selected command is copied to the command line. The command history
  1282. can also be accessed by typing Alt\-p or Alt\-n.
  1283. .PP
  1284. The
  1285. .\"LINK2"
  1286. "Directory hotlist"
  1287. .\"Hotlist"
  1288. command makes changing of the current directory to often used directories
  1289. faster.
  1290. .PP
  1291. The
  1292. .\"LINK2"
  1293. "Screen list"
  1294. .\"Screen selector"
  1295. command shows a dialog window with the list of currently running
  1296. internal editors, viewers and other MC modules that support this mode.
  1297. .PP
  1298. The
  1299. .\"LINK2"
  1300. "Edit extension file"
  1301. .\"Edit Extension File"
  1302. command allows you to specify programs to executed when you try to
  1303. execute, view, edit and do a bunch of other thing on files
  1304. with certain extensions (filename endings).
  1305. .PP
  1306. The
  1307. .\"LINK2"
  1308. "Edit Menu File"
  1309. .\"Edit Menu File"
  1310. command may be used for editing the user menu (which appears by
  1311. pressing F2).
  1312. .\"NODE " Directory Tree"
  1313. .SH " Directory Tree"
  1314. The Directory Tree command shows a tree figure of the directories. You
  1315. can select a directory from the figure and the Midnight Commander will
  1316. change to that directory.
  1317. .PP
  1318. There are two ways to invoke the tree. The real directory tree command
  1319. is available from Commands menu. The other way is to select tree view
  1320. from the Left or Right menu.
  1321. .PP
  1322. To get rid of long delays the Midnight Commander creates the tree
  1323. figure by scanning only a small subset of all the directories. If the
  1324. directory which you want to see is missing, move to its parent
  1325. directory and press C\-r (or F2).
  1326. .PP
  1327. You can use the following keys:
  1328. .PP
  1329. .\"LINK2"
  1330. General movement keys
  1331. .\"General Movement Keys"
  1332. are accepted.
  1333. .PP
  1334. .B Enter.
  1335. In the directory tree, exits the directory tree and changes to this
  1336. directory in the current panel. In the tree view, changes to this
  1337. directory in the other panel and stays in tree view mode in the
  1338. current panel.
  1339. .PP
  1340. .B C\-r, F2 (Rescan).
  1341. Rescan this directory. Use this when the tree figure is out of date:
  1342. it is missing subdirectories or shows some subdirectories which don't
  1343. exist any more.
  1344. .PP
  1345. .B F3 (Forget).
  1346. Delete this directory from the tree figure. Use this to remove clutter
  1347. from the figure. If you want the directory back to the tree figure
  1348. press F2 in its parent directory.
  1349. .PP
  1350. .B F4 (Static/Dynamic).
  1351. Toggle between the dynamic navigation mode (default) and the static
  1352. navigation mode.
  1353. .PP
  1354. In the static navigation mode you can use the Up and Down keys to
  1355. select a directory. All known directories are shown.
  1356. .PP
  1357. In the dynamic navigation mode you can use the Up and Down keys to
  1358. select a sibling directory, the Left key to move to the parent
  1359. directory, and the Right key to move to a child directory. Only the
  1360. parent, sibling and children directories are shown, others are left
  1361. out. The tree figure changes dynamically as you traverse.
  1362. .PP
  1363. .B F5 (Copy).
  1364. Copy the directory.
  1365. .PP
  1366. .B F6 (RenMov).
  1367. Move the directory.
  1368. .PP
  1369. .B F7 (Mkdir).
  1370. Make a new directory below this directory.
  1371. .PP
  1372. .B F8 (Delete).
  1373. Delete this directory from the file system.
  1374. .PP
  1375. .B C\-s, Alt\-s.
  1376. Search the next directory matching the search string. If there is
  1377. no such directory these keys will move one line down.
  1378. .PP
  1379. .B C\-h, Backspace.
  1380. Delete the last character of the search string.
  1381. .PP
  1382. .B Any other character.
  1383. Add the character to the search string and move to the next directory
  1384. which starts with these characters. In the tree view you must first
  1385. activate the search mode by pressing C\-s. The search string is shown
  1386. in the mini status line.
  1387. .PP
  1388. The following actions are available only in the directory tree. They
  1389. aren't supported in the tree view.
  1390. .PP
  1391. .B F1 (Help).
  1392. Invoke the help viewer and show this section.
  1393. .PP
  1394. .B Esc, F10.
  1395. Exit the directory tree. Do not change the directory.
  1396. .PP
  1397. The mouse is supported. A double\-click behaves like Enter. See
  1398. also the section on
  1399. .\"LINK2"
  1400. mouse support\&.
  1401. .\"Mouse Support"
  1402. .\"NODE " Find File"
  1403. .SH " Find File"
  1404. The Find File feature first asks for the start directory for the
  1405. search and the filename to be searched for. By pressing the Tree
  1406. button you can select the start directory from the
  1407. .\"LINK2"
  1408. directory tree
  1409. .\"Directory Tree"
  1410. figure.
  1411. .PP
  1412. Option \"Whole words\" allows select only those files containing matches that
  1413. form whole words. Like grep \-w.
  1414. .PP
  1415. You can start the search by pressing the OK button.
  1416. During the search you can stop from the Stop button and continue from
  1417. the Start button.
  1418. .PP
  1419. You can browse the filelist with the up and down arrow keys. The Chdir
  1420. button will change to the directory of the currently selected
  1421. file. The Again button will ask for the parameters for a new
  1422. search. The Quit button quits the search operation. The Panelize
  1423. button will place the found files to the current directory panel so
  1424. that you can do additional operations on them (view, copy, move,
  1425. delete and so on). After panelizing you can press C\-r to return to the
  1426. normal file listing.
  1427. .PP
  1428. The 'Enable ignore directories' checkbox and input field below it
  1429. allow to set up the list of directories that should be skip during the search
  1430. files (for example, you may want to avoid searches on a CD\-ROM or on a NFS
  1431. directory that is mounted across a slow link). List components must be separated
  1432. with a colon, here is an example:
  1433. .PP
  1434. .nf
  1435. /cdrom:/nfs/wuarchive:/afs
  1436. .fi
  1437. .PP
  1438. Relative paths are supported also. The following example shows how to skip special
  1439. directories of version control systems:
  1440. .nf
  1441. /cdrom:/nfs/wuarchive:/afs:.svn:.git:CVS
  1442. .fi
  1443. .PP
  1444. Attention: input field can contain a dot (.), this means the current absolute path.
  1445. .PP
  1446. You may consider using the
  1447. .\"LINK2"
  1448. External panelize
  1449. .\"External panelize"
  1450. command for some operations. Find file command is for simple queries
  1451. only, while using External panelize you can do as mysterious searches
  1452. as you would like.
  1453. .\"NODE " External panelize"
  1454. .SH " External panelize"
  1455. The External panelize allows you to execute an external program, and
  1456. make the output of that program the contents of the current panel.
  1457. .PP
  1458. For example, if you want to manipulate in one of the panels all the
  1459. symbolic links in the current directory, you can use external
  1460. panelization to run the following command:
  1461. .PP
  1462. .nf
  1463. find . \-type l \-print
  1464. .fi
  1465. .PP
  1466. Upon command completion, the directory contents of the panel will no
  1467. longer be the directory listing of the current directory, but all the
  1468. files that are symbolic links.
  1469. .PP
  1470. If you want to panelize all of the files that have been downloaded
  1471. from your FTP server, you can use this awk command to extract the file
  1472. name from the transfer log files:
  1473. .PP
  1474. .nf
  1475. awk '$9 ~! /incoming/ { print $9 }' < /var/log/xferlog
  1476. .fi
  1477. .PP
  1478. You may want to save often used panelize commands under a descriptive name,
  1479. so that you can recall them quickly. You do this by typing the command on
  1480. the input line and pressing Add new button. Then you enter a name under
  1481. which you want the command to be saved. Next time, you just choose that
  1482. command from the list and do not have to type it again.
  1483. .\"NODE " Hotlist"
  1484. .SH " Hotlist"
  1485. The Directory hotlist command shows the labels of the directories
  1486. in the directory hotlist. The Midnight Commander will change to the
  1487. directory corresponding to the selected label. From the hotlist dialog,
  1488. you can remove already created label/directory pairs and add new ones.
  1489. To add new directories quickly, you can use the Add to hotlist command
  1490. (C\-x h), which adds the current directory into the directory hotlist,
  1491. asking just for the label for the directory.
  1492. .PP
  1493. This makes cd to often used directories faster. You may consider using the
  1494. CDPATH variable as described in
  1495. .\"LINK2"
  1496. internal cd command
  1497. .\"The cd internal command"
  1498. description.
  1499. .\"NODE " Edit Extension File"
  1500. .SH " Edit Extension File"
  1501. This will invoke your editor on the file
  1502. .IR ~/.config/mc/mc.ext .
  1503. The format of this file following:
  1504. .PP
  1505. All lines starting with # or empty lines are thrown away.
  1506. .PP
  1507. Lines starting in the first column should have following format:
  1508. .PP
  1509. .IR keyword/expr ,
  1510. i.e. everything after the slash until new line is
  1511. .IR expr .
  1512. .PP
  1513. .I keyword
  1514. can be:
  1515. .TP
  1516. .I shell
  1517. \-
  1518. .I expr
  1519. is an extension (no wildcards). File matches it its name ends
  1520. with
  1521. .IR expr .
  1522. Example:
  1523. .I shell/.tar
  1524. matches
  1525. .IR *.tar .
  1526. .TP
  1527. .I regex
  1528. \-
  1529. .I expr
  1530. is a regular expression. File matches if its name matches the regular
  1531. expression.
  1532. .TP
  1533. .I directory
  1534. \-
  1535. .I expr
  1536. is a regular expression. File matches if it is a directory and its name
  1537. matches the regular expression.
  1538. .TP
  1539. .I type
  1540. \-
  1541. .I expr
  1542. is a regular expression. File matches if the output of
  1543. .I file %f
  1544. without the initial "filename:" part matches regular expression
  1545. .IR expr .
  1546. .TP
  1547. .I default
  1548. \- matches any file.
  1549. .I expr
  1550. is ignored.
  1551. .TP
  1552. .I include
  1553. \- denotes a common section.
  1554. .I expr
  1555. is the name of the section.
  1556. .PP
  1557. Other lines should start with a space or tab and should be of the format:
  1558. .I keyword=command
  1559. (with no spaces around =), where
  1560. .I keyword
  1561. should be:
  1562. .I Open
  1563. (invoked on Enter or double click),
  1564. .I View
  1565. (F3),
  1566. .I Edit
  1567. (F4) or
  1568. .I Include
  1569. (to add rules from the common section).
  1570. .I command
  1571. is any one\-line shell command, with the simple
  1572. .\"LINK2"
  1573. macro substitution\&.
  1574. .\"Macro Substitution"
  1575. .PP
  1576. Rules are matched from top to bottom, thus the order is important. If
  1577. the appropriate action is missing, search continues as if this rule
  1578. didn't match (i.e. if a file matches the first and second entry and View
  1579. action is missing in the first one, then on pressing F3 the View action
  1580. from the second entry will be used).
  1581. .I default
  1582. should match all the actions.
  1583. .\"NODE " Background jobs"
  1584. .SH " Background Jobs"
  1585. This lets you control the state of any background Midnight Commander
  1586. process (only copy and move files operations can be done in the
  1587. background). You can stop, restart and kill a background job from
  1588. here.
  1589. .\"NODE " Edit Menu File"
  1590. .SH " Edit Menu File"
  1591. The user menu is a menu of useful actions that can be customized by
  1592. the user. When you access the user menu, the
  1593. file .mc.menu from the current directory is used if it exists,
  1594. but only if it is owned by user or root and is not world\-writable.
  1595. If no such file found, ~/.config/mc/menu is tried in the same way,
  1596. and otherwise mc uses the default system\-wide menu
  1597. %prefix%/share/mc/mc.menu.
  1598. .PP
  1599. The format of the menu file is very simple. Lines that start with
  1600. anything but space or tab are considered entries for the menu (in
  1601. order to be able to use it like a hot key, the first character should
  1602. be a letter). All the lines that start with a space or a tab are the
  1603. commands that will be executed when the entry is selected.
  1604. .PP
  1605. When an option is selected all the command lines of the option are
  1606. copied to a temporary file in the temporary directory (usually
  1607. /usr/tmp) and then that file is executed. This allows the user to put
  1608. normal shell constructs in the menus. Also simple macro substitution
  1609. takes place before executing the menu code. For more information, see
  1610. .\"LINK2"
  1611. macro substitution\&.
  1612. .\"Macro Substitution"
  1613. .PP
  1614. Here is a sample mc.menu file:
  1615. .PP
  1616. .nf
  1617. A Dump the currently selected file
  1618. od \-c %f
  1619. B Edit a bug report and send it to root
  1620. I=`mktemp ${MC_TMPDIR:\-/tmp}/mail.XXXXXX` || exit 1
  1621. vi $I
  1622. mail \-s "Midnight Commander bug" root < $I
  1623. rm \-f $I
  1624. M Read mail
  1625. emacs \-f rmail
  1626. N Read Usenet news
  1627. emacs \-f gnus
  1628. H Call the info hypertext browser
  1629. info
  1630. J Copy current directory to other panel recursively
  1631. tar cf \- . | (cd %D && tar xvpf \-)
  1632. K Make a release of the current subdirectory
  1633. echo \-n "Name of distribution file: "
  1634. read tar
  1635. ln \-s %d `dirname %d`/$tar
  1636. cd ..
  1637. tar cvhf ${tar}.tar $tar
  1638. = f *.tar.gz | f *.tgz & t n
  1639. X Extract the contents of a compressed tar file
  1640. tar xzvf %f
  1641. .fi
  1642. .PP
  1643. .B Default Conditions
  1644. .PP
  1645. Each menu entry may be preceded by a condition. The condition must
  1646. start from the first column with a '=' character. If the condition is
  1647. true, the menu entry will be the default entry.
  1648. .PP
  1649. .nf
  1650. Condition syntax: = <sub\-cond>
  1651. or: = <sub\-cond> | <sub\-cond> ...
  1652. or: = <sub\-cond> & <sub\-cond> ...
  1653. Sub\-condition is one of following:
  1654. y <pattern> syntax of current file matching pattern?
  1655. (for edit menu only)
  1656. f <pattern> current file matching pattern?
  1657. F <pattern> other file matching pattern?
  1658. d <pattern> current directory matching pattern?
  1659. D <pattern> other directory matching pattern?
  1660. t <type> current file of type?
  1661. T <type> other file of type?
  1662. x <filename> is it executable filename?
  1663. ! <sub\-cond> negate the result of sub\-condition
  1664. .fi
  1665. .PP
  1666. Pattern is a normal shell pattern or a regular expression, according
  1667. to the shell patterns option. You can override the global value of
  1668. the shell patterns option by writing "shell_patterns=x" on the first
  1669. line of the menu file (where "x" is either 0 or 1).
  1670. .PP
  1671. Type is one or more of the following characters:
  1672. .PP
  1673. .nf
  1674. n not a directory
  1675. r regular file
  1676. d directory
  1677. l link
  1678. c character device
  1679. b block device
  1680. f FIFO (pipe)
  1681. s socket
  1682. x executable file
  1683. t tagged
  1684. .fi
  1685. .PP
  1686. For example 'rlf' means either regular file, link or fifo. The 't'
  1687. type is a little special because it acts on the panel instead of the
  1688. file. The condition '=t t' is true if there are tagged files in the
  1689. current panel and false if not.
  1690. .PP
  1691. If the condition starts with '=?' instead of '=' a debug trace will be
  1692. shown whenever the value of the condition is calculated.
  1693. .PP
  1694. The conditions are calculated from left to right. This means
  1695. .nf
  1696. = f *.tar.gz | f *.tgz & t n
  1697. .fi
  1698. is calculated as
  1699. .nf
  1700. ( (f *.tar.gz) | (f *.tgz) ) & (t n)
  1701. .fi
  1702. .PP
  1703. Here is a sample of the use of conditions:
  1704. .PP
  1705. .nf
  1706. = f *.tar.gz | f *.tgz & t n
  1707. L List the contents of a compressed tar\-archive
  1708. gzip \-cd %f | tar xvf \-
  1709. .fi
  1710. .PP
  1711. .B Addition Conditions
  1712. .PP
  1713. If the condition begins with '+' (or '+?') instead of '=' (or '=?') it
  1714. is an addition condition. If the condition is true the menu entry will
  1715. be included in the menu. If the condition is false the menu entry will
  1716. not be included in the menu.
  1717. .PP
  1718. You can combine default and addition conditions by starting condition
  1719. with '+=' or '=+' (or '+=?' or '=+?' if you want debug trace). If you
  1720. want to use two different conditions, one for adding and another for
  1721. defaulting, you can precede a menu entry with two condition lines, one
  1722. starting with '+' and another starting with '='.
  1723. .PP
  1724. Comments are started with '#'. The additional comment lines must start
  1725. with '#', space or tab.
  1726. .\"NODE " Options Menu"
  1727. .SH " Options Menu"
  1728. The Midnight Commander has some options that may be toggled on and
  1729. off in several dialogs which are accessible from this menu. Options
  1730. are enabled if they have an asterisk or "x" in front of them.
  1731. .PP
  1732. The
  1733. .\"LINK2"
  1734. Configuration
  1735. .\"Configuration"
  1736. command pops up a dialog from which you can change most of settings of
  1737. the Midnight Commander.
  1738. .PP
  1739. The
  1740. .\"LINK2"
  1741. Layout
  1742. .\"Layout"
  1743. command pops up a dialog from which you specify a bunch of options how mc
  1744. looks like on the screen.
  1745. .PP
  1746. The
  1747. .\"LINK2"
  1748. Panel options
  1749. .\"Panel options"
  1750. command pops up a dialog from which you specify options of file manager panels.
  1751. .PP
  1752. The
  1753. .\"LINK2"
  1754. Confirmation
  1755. .\"Confirmation"
  1756. command pops up a dialog from which you specify which actions you want to
  1757. confirm.
  1758. .PP
  1759. The
  1760. .\"LINK2"
  1761. Appearance
  1762. .\"Appearance"
  1763. command pops up a dialog from which you specify the skin.
  1764. .PP
  1765. The
  1766. .\"LINK2"
  1767. Display bits
  1768. .\"Display bits"
  1769. command pops up a dialog from which you may select which characters is your
  1770. terminal able to display.
  1771. .PP
  1772. The
  1773. .\"LINK2"
  1774. Learn keys
  1775. .\"Learn keys"
  1776. command pops up a dialog from which you test some keys which are not working
  1777. on some terminals and you may fix them.
  1778. .PP
  1779. The
  1780. .\"LINK2"
  1781. Virtual FS
  1782. .\"Virtual FS"
  1783. command pops up a dialog from which you specify some VFS related options.
  1784. .PP
  1785. The
  1786. .\"LINK2"
  1787. Save setup
  1788. .\"Save Setup"
  1789. command saves the current settings of the Left, Right and Options
  1790. menus. A small number of other settings is saved, too.
  1791. .\"NODE " Configuration"
  1792. .SH " Configuration"
  1793. The options in this dialog are divided into several groups: "File
  1794. operation options", "Esc key mode", "Pause after run" and "Other options".
  1795. .PP
  1796. .B File operation options
  1797. .PP
  1798. .I Verbose operation.
  1799. This toggles whether the file Copy, Rename and Delete operations are
  1800. verbose (i.e., display a dialog box for each operation). If you have a
  1801. slow terminal, you may wish to disable the verbose operation. It is
  1802. automatically turned off if the speed of your terminal is less than
  1803. 9600 bps.
  1804. .PP
  1805. .I Compute totals.
  1806. If this option is enabled, the Midnight Commander computes total byte
  1807. sizes and total number of files prior to any Copy, Rename and Delete
  1808. operations. This will provide you with a more accurate progress bar
  1809. at the expense of some speed. This option has no effect, if
  1810. .I Verbose operation
  1811. is disabled.
  1812. .PP
  1813. .I Classic progressbar.
  1814. If this option is enabled, the progressbar of Copy/Move/Delete operations
  1815. is always grown form left to right. If disabled, the growing direction
  1816. of progressbar follows to direction of Copy/Move/Delete operation:
  1817. from left panel to right one and vice versa. Enabled by default.
  1818. .PP
  1819. .I Mkdir autoname.
  1820. When you press F7 to create a new directory, the input line in popup dialog
  1821. will be filled by name of current file or directory in active panel.
  1822. Disabled by default.
  1823. .PP
  1824. .I Preallocate space.
  1825. Preallocate space for whole target file, if possible, before copy operation.
  1826. Disabled by default.
  1827. .PP
  1828. .B Esc key mode.
  1829. .PP
  1830. By default the Midnight Commander treats the ESC key as a key prefix.
  1831. Therefore, you should press Esc code twice to exit a dialog. But there is
  1832. a possibility to use a single press of ESC key for that action.
  1833. .PP
  1834. .I Single press.
  1835. By default this option is disabled. If you'll enable it, the ESC key
  1836. will act as a prefix key for set up time interval (see
  1837. .I Timeout
  1838. option below), and if no extra keys have arrived, then the ESC key
  1839. is interpreted as a cancel key (ESC ESC).
  1840. .PP
  1841. .I Timeout.
  1842. This options is used to setup the time interval (in microseconds)
  1843. for single press of ESC key. By default, this inrerval is one second
  1844. (1000000 microseconds). Also the timeout can be set via KEYBOARD_KEY_TIMEOUT_US
  1845. environment variable (also in microseconds), which has higher priority
  1846. than Timeout option value.
  1847. .PP
  1848. .B Pause after run
  1849. .PP
  1850. After executing your commands, the Midnight Commander can pause, so
  1851. that you can examine the output of the command. There are three
  1852. possible settings for this variable:
  1853. .PP
  1854. .I Never.
  1855. Means that you do not want to see the output of your command. If you
  1856. are using the Linux or FreeBSD console or an xterm, you will be able to
  1857. see the output of the command by typing C\-o.
  1858. .PP
  1859. .I On dumb terminals.
  1860. You will get the pause message on terminals that are not capable of
  1861. showing the output of the last command executed (any terminal that is
  1862. not an xterm or the Linux console).
  1863. .PP
  1864. .I Always.
  1865. The program will pause after executing all of your commands.
  1866. .PP
  1867. .B Other options
  1868. .PP
  1869. .I Use internal editor.
  1870. If this option is enabled, the built\-in file editor is used to edit
  1871. files. If the option is disabled, the editor specified in the
  1872. .B EDITOR
  1873. environment variable is used.
  1874. If no editor is specified,
  1875. .B vi
  1876. is used. See the section on the
  1877. .\"LINK2"
  1878. internal file editor\&.
  1879. .\"Internal File Editor"
  1880. .PP
  1881. .I Use internal viewer.
  1882. If this option is enabled, the built\-in file viewer is used to view
  1883. files. If the option is disabled, the pager specified in the
  1884. .B PAGER
  1885. environment variable is used.
  1886. If no pager is specified, the
  1887. .B view
  1888. command is used. See the section on the
  1889. .\"LINK2"
  1890. internal file viewer\&.
  1891. .\"Internal File Viewer"
  1892. .PP
  1893. .I Ask new file name.
  1894. If this option is enabled, file name is asked before open new file in editor.
  1895. .PP
  1896. .I Auto menus.
  1897. If this option is enabled, the user menu will be invoked at startup.
  1898. Useful for building menus for non\-unixers.
  1899. .PP
  1900. .I Drop down menus.
  1901. When this option is enabled, the pull down menus will be activated as
  1902. soon as you press the F9 key. Otherwise, you will only get the menu title,
  1903. and you will have to activate the menu either with the arrow keys or with
  1904. the hotkeys. It is recommended if you are using hotkeys.
  1905. .PP
  1906. .I Shell Patterns.
  1907. By default the Select, Unselect and Filter commands will use shell\-like
  1908. regular expressions. The following conversions are performed to achieve
  1909. this: the '*' is replaced by '.*' (zero or more characters); the '?'
  1910. is replaced by '.' (exactly one character) and '.' by the literal
  1911. dot. If the option is disabled, then the regular expressions are the
  1912. ones described in ed(1).
  1913. .PP
  1914. .I Complete: show all.
  1915. By default the Midnight Commander pops up all possible
  1916. .\"LINK2"
  1917. completions
  1918. .\"Completion"
  1919. if the completion is ambiguous only when you press
  1920. .B Alt\-Tab
  1921. for the second time. For the first time, it just completes as much as
  1922. possible and beeps in the case of ambiguity. Enable this option if you
  1923. want to see all possible completions even after pressing
  1924. .B Alt\-Tab
  1925. the first time.
  1926. .PP
  1927. .I Rotating dash.
  1928. If this option is enabled, the
  1929. Midnight Commander shows a rotating dash in the upper right corner
  1930. as a work in progress indicator.
  1931. .PP
  1932. .I Cd follows links.
  1933. This option, if set, causes the Midnight Commander to follow the
  1934. logical chain of directories when changing current directory
  1935. either in the panels, or using the cd command. This is the default
  1936. behavior of bash. When unset, the Midnight Commander follows the
  1937. real directory structure, so cd .. if you've entered that directory
  1938. through a link will move you to the current directory's real parent
  1939. and not to the directory where the link was present.
  1940. .PP
  1941. .I Safe delete.
  1942. If this option is enabled, deleting files and directory hotlist entries
  1943. unintentionally becomes more difficult. The default selection in the
  1944. confirmation dialogs for deletion changes from "Yes" to "No".
  1945. This option is disabled by default.
  1946. .PP
  1947. .I Auto save setup.
  1948. If this option is enabled, when you exit the Midnight Commander the
  1949. configurable options of the Midnight Commander are saved in the
  1950. ~/.config/mc/ini file.
  1951. .\"NODE " Layout"
  1952. .SH " Layout"
  1953. The layout dialog gives you a possibility to change the general layout
  1954. of screen. The options in this dialog are divided into several groups:
  1955. "Panel split", "Console output" and "Other options".
  1956. .PP
  1957. .B Panel split
  1958. .PP
  1959. The rest of the screen area is used for the two directory panels. You
  1960. can specify whether the area is split to the panels in
  1961. .I Vertical
  1962. or
  1963. .I Horizontal
  1964. direction. Panel layout can be changed using Alt\-, (Alt\-comma) shortcut.
  1965. .PP
  1966. .I Equal split.
  1967. By default, panels have equal sizes. Using this option you can specify
  1968. an unequal split.
  1969. .PP
  1970. .B Console output
  1971. .PP
  1972. On the Linux or FreeBSD console you can specify how many lines are shown
  1973. in the output window. This option is available if Midnight Commander runs
  1974. on native console only.
  1975. .PP
  1976. .B Other options
  1977. .PP
  1978. .I Menu bar visible.
  1979. If enabled, main menu of Midnight Commander is always visible on the top row
  1980. of screen above panels. Enabled by default.
  1981. .PP
  1982. .I Command prompt.
  1983. If enabled, command line is avalable. Enabled by default.
  1984. .PP
  1985. .I Keybar visible.
  1986. If enabled, 10 lables associated with F1\-F10 keys are located at the bottom
  1987. row of screen. Enabled by default.
  1988. .PP
  1989. .I Hintbar visible.
  1990. If enabled, the one\-line hints are visible below panels. Enabled by default.
  1991. .PP
  1992. .I XTerm window title.
  1993. When run in a terminal emulator for X11, Midnight Commander sets the
  1994. terminal window title to the current working directory and updates it
  1995. when necessary. If your terminal emulator is broken and you see some
  1996. incorrect output on startup and directory change, turn off this option.
  1997. Enabled by default.
  1998. .PP
  1999. .I Show free space.
  2000. If enabled, free space and total space of current file system is shown
  2001. at the bottom frame of panel. Enabled by default.
  2002. .\"NODE " Panel options"
  2003. .SH " Panel options"
  2004. .B Main panel options
  2005. .PP
  2006. .I Show mini\-status.
  2007. If enabled, one line of status information about the currently selected item
  2008. is shown at the bottom of the panels. Enabled by default.
  2009. .PP
  2010. .I Use SI size units.
  2011. If this option is enabled, Midnight Commander will use SI units (powers of 1000)
  2012. when displaying any byte sizes. The suffixes (k, m ...) are shown in lowercase.
  2013. If disabled (default), Midnight Commander will use binary units (powers of 1024)
  2014. and the suffixes are shown in upper case (K, M ...)
  2015. .PP
  2016. .I Mix all files.
  2017. If this option is enabled, all files and directories are shown mixed
  2018. together. If the option is disabled (default), directories (and links to
  2019. directories) are shown at the beginning of the listing, and other files below.
  2020. .PP
  2021. .I Show backup files.
  2022. If enabled, the Midnight Commander will show files ending with a tilde.
  2023. Otherwise, they won't be shown (like GNU's ls option \-B). Enabled by default.
  2024. .PP
  2025. .I Show hidden files.
  2026. If enabled, the Midnight Commander will show all files that start with
  2027. a dot (like ls \-a). Disabled by default.
  2028. .PP
  2029. .I Fast directory reload.
  2030. If this option is enabled, the Midnight Commander will use a trick to
  2031. determine if the directory contents have changed. The trick is to reload
  2032. the directory only if the i\-node of the directory has changed; this means
  2033. that reloads only happen when files are created or deleted. If what
  2034. changes is the i\-node for a file in the directory (file size changes,
  2035. mode or owner changes, etc) the display is not updated. In these cases,
  2036. if you have the option on, you have to rescan the directory manually
  2037. (with C\-r). Disabled by default.
  2038. .PP
  2039. .I Mark moves down.
  2040. If enabled, the selection bar will move down when you mark a file (with
  2041. Insert key). Enabled by default.
  2042. .PP
  2043. .I Reverse files only.
  2044. Allow revert selection of files only. Enabled by default.
  2045. If enabled, the reverse selection is applied to files only, not to directories.
  2046. The selection of directories is untouched. If off, the reverse selection
  2047. is applied to files as well to directories: all unselected items become
  2048. selected, and vice versa.
  2049. .PP
  2050. .I Simple swap.
  2051. If both panels contain file listing, simple swap means that panels exchange
  2052. its screen positions: left panel become right one, and vice versa. If this
  2053. option is unchecked, file listing panels exchange its content keeping listing
  2054. format and sort options. Unchecked by default.
  2055. .PP
  2056. .I Auto save panels setup.
  2057. If this option is enabled, when you exit the Midnight Commander the
  2058. current settings of panels are saved in the ~/.config/mc/panels.ini file.
  2059. Disabled by default.
  2060. .PP
  2061. .B Navigation
  2062. .PP
  2063. .I Lynx\-like motion.
  2064. If this option is enabled, you may use the arrows keys to automatically
  2065. chdir if the current selection is a subdirectory and the shell command
  2066. line is empty. By default, this setting is off.
  2067. .PP
  2068. .I Page scrolling.
  2069. If set (the default), panel will scroll by half the display when the
  2070. cursor reaches the end or the beginning of the panel, otherwise it
  2071. will just scroll a file at a time.
  2072. .PP
  2073. .I Mouse page scrolling.
  2074. Controls whenever scrolling with the mouse wheel is done by pages or
  2075. line by line on the panels.
  2076. .PP
  2077. .B File highlight
  2078. .PP
  2079. You can specify whether
  2080. .I permissions
  2081. and
  2082. .I file types
  2083. should be highlighted with distinctive
  2084. .\"LINK2"
  2085. Colors\&.
  2086. .\"Colors"
  2087. If the permission highlighting is enabled, the parts of the
  2088. .I perm
  2089. and
  2090. .I mode
  2091. .\"LINK2"
  2092. display fields
  2093. .\"Listing Mode..."
  2094. which apply to the user running Midnight Commander are highlighted with
  2095. the color defined by the
  2096. .I selected
  2097. keyword. If the file type highlighting is enabled, file names are colored
  2098. according to rules described in
  2099. %sysconfdir%/mc/filehighlight.ini
  2100. file. See
  2101. .\"LINK2"
  2102. Filenames Highlight
  2103. .\"Filenames Highlight"
  2104. for more info.
  2105. .PP
  2106. .B Quick search
  2107. .PP
  2108. You can specify how the
  2109. .\"LINK2"
  2110. Quick search
  2111. .\"Quick search"
  2112. mode should works: case insensitively, case sensitively or be matched
  2113. to the the panel sort order: case sensitive or not.
  2114. .\"NODE " Confirmation"
  2115. .SH " Confirmation"
  2116. In this dialog you configure the confirmation options for file deletion,
  2117. overwriting files, execution by pressing enter, quitting the program,
  2118. directory hotlist entries deletion and history cleanup.
  2119. .\"NODE " Appearance"
  2120. .SH " Appearance"
  2121. In this dialog you can select the skin to be used.
  2122. .PP
  2123. See the
  2124. .\"LINK2"
  2125. Skins
  2126. .\"Skins"
  2127. section for technical details about the skin definition files.
  2128. .\"NODE " Display bits"
  2129. .SH " Display bits"
  2130. This is used to configure the range of visible characters on the
  2131. screen. This setting may be 7\-bits if your terminal/curses supports
  2132. only seven output bits, ISO\-8859\-1 displays all the characters in the
  2133. ISO\-8859\-1 map and full 8 bits is for those terminals that can display
  2134. full 8 bit characters.
  2135. .\"NODE " Learn keys"
  2136. .SH " Learn keys"
  2137. This dialog allows you to test and redefine functional keys, cursor
  2138. arrows and some other keys to make them work properly on your terminal.
  2139. They often don't, since many terminal databases are incomplete or broken.
  2140. .PP
  2141. You can move around with the Tab key and with the vi moving keys ('h'
  2142. left, 'j' down, 'k' up and 'l' right). Once you press any cursor movement
  2143. key and it is recognized, you can use that key as well.
  2144. .PP
  2145. You can test keys just by pressing each of them. When you press a
  2146. key and it is recognized properly, OK should appear next to the name
  2147. of that key. Once a key is marked OK it starts working as usually,
  2148. e.g. F1 pressed the first time will just check that the F1 key works,
  2149. but after that it will show help. The same applies to the arrow keys.
  2150. The Tab key should be working always.
  2151. .PP
  2152. If some keys do not work properly then you won't see OK appear after
  2153. pressing one of these. Then you may want to redefine it. Do it by pressing
  2154. the button with the name of that key (either by the mouse or by Enter
  2155. or Space after selecting the button with Tab or arrows). Then a message
  2156. box will appear asking you to press that key. Do it and wait until the
  2157. message box disappears. If you want to abort, just press Escape once
  2158. and wait.
  2159. .PP
  2160. When you finish with all the keys, you can Save them. The definitions
  2161. for the keys you have redefined will be written into the [terminal:TERM]
  2162. section of your ~/.config/mc/ini file (where TERM is the name of your current
  2163. terminal). The definitions of the keys that were already working properly
  2164. are not saved.
  2165. .\"NODE " Virtual FS"
  2166. .SH " Virtual FS"
  2167. This option gives you control over the settings of the
  2168. .\"LINK2"
  2169. Virtual File System\&.
  2170. .\"Virtual File System"
  2171. .PP
  2172. The Midnight Commander keeps in memory the information related to some
  2173. of the virtual file systems to speed up the access to the files in the
  2174. file system (for example, directory listings fetched from FTP servers).
  2175. .PP
  2176. Also, in order to access the contents of compressed files (for example,
  2177. compressed tar files) the Midnight Commander needs to create temporary
  2178. uncompressed files on your disk.
  2179. .PP
  2180. Since both the information in memory and the temporary files on disk
  2181. take up resources, you may want to tune the parameters of the cached
  2182. information to decrease your resource usage or to maximize the speed of
  2183. access to frequently used file systems.
  2184. .PP
  2185. Because of the format of the tar archives, the
  2186. .I Tar filesystem
  2187. needs to read the whole file just to load the file entries. Since most
  2188. tar files are usually kept compressed (plain tar files are species in
  2189. extinction), the tar file system has to uncompress the file on the disk
  2190. in a temporary location and then access the uncompressed file as a
  2191. regular tar file.
  2192. .PP
  2193. Now, since we all love to browse files and tar files all over the disk,
  2194. it's common that you will leave a tar file and then re\-enter it later.
  2195. Since decompression is slow, the Midnight Commander will cache the
  2196. information in memory for a limited time. When the timeout expires, all
  2197. the resources associated with the file system are released. The default
  2198. timeout is set to one minute.
  2199. .PP
  2200. The
  2201. .\"LINK2"
  2202. FTP File System
  2203. .\"FTP File System"
  2204. (ftpfs) allows you to browse directories on remote FTP servers. It has
  2205. several options.
  2206. .PP
  2207. .I ftp anonymous password
  2208. is the password used when you login as "anonymous". Some sites require
  2209. a valid e\-mail address. On the other hand, you probably don't want to
  2210. give your real e\-mail address to untrusted sites, especially if you are
  2211. not using spam filtering.
  2212. .PP
  2213. ftpfs keeps the directory listing it fetches from a FTP server in a cache.
  2214. The cache expire time is configurable with the
  2215. .I ftpfs directory cache timeout
  2216. option. A low value for this option may slow down every operation on
  2217. the ftpfs because every operation would require sending a request to the
  2218. FTP server.
  2219. .PP
  2220. You can define an FTP proxy host for doing FTP. Note that most modern
  2221. firewalls are fully transparent at least for passive FTP (see below), so
  2222. FTP proxies are considered obsolete.
  2223. .PP
  2224. If
  2225. .I Always use ftp proxy
  2226. is not set, you can use the exclamation sign to enable proxy for certain
  2227. hosts. See
  2228. .\"LINK2"
  2229. FTP File System
  2230. .\"FTP File System"
  2231. for examples.
  2232. .PP
  2233. If this option is set, the program will do two things: consult the
  2234. %prefix%/lib/mc/mc.no_proxy file for lines containing host names that
  2235. are local (if the host name starts with a dot, it is assumed to be a
  2236. domain) and to assume that any hostnames without dots in their names are
  2237. directly accessible. All other hosts will be accessed through the
  2238. specified FTP proxy.
  2239. .PP
  2240. You can enable using
  2241. .I ~/.netrc
  2242. file, which keeps login names and passwords for ftp servers. See netrc
  2243. (5) for the description of the .netrc format.
  2244. .PP
  2245. .I Use passive mode
  2246. enables using FTP passive mode, when the connection for data transfer is
  2247. initiated by the client, not by the server. This option is recommended
  2248. and enabled by default. If this option is turned off, the data
  2249. connection is initiated by the server. This may not work with some
  2250. firewalls.
  2251. .\"NODE " Save Setup"
  2252. .SH " Save Setup"
  2253. At startup the Midnight Commander will try to load initialization
  2254. information from the ~/.config/mc/ini file. If this file
  2255. doesn't exist, it will load the information from the system\-wide
  2256. configuration file, located in %prefix%/share/mc/mc.ini. If the
  2257. system\-wide configuration file doesn't exist, MC uses the default settings.
  2258. .PP
  2259. The
  2260. .I Save Setup
  2261. command creates the ~/.config/mc/ini file by saving the
  2262. current settings of the
  2263. .\"LINK2"
  2264. Left, Right
  2265. .\"Left and Right Menus"
  2266. and
  2267. .\"LINK2"
  2268. Options
  2269. .\"Options Menu"
  2270. menus.
  2271. .PP
  2272. If you activate the
  2273. .I auto save setup
  2274. option, MC will always save the current settings when exiting.
  2275. .PP
  2276. There also exist settings which can't be changed from the menus. To
  2277. change these settings you have to edit the setup file with your
  2278. favorite editor. See the section on
  2279. .\"LINK2"
  2280. Special Settings
  2281. .\"Special Settings"
  2282. for more information.
  2283. .SH ""
  2284. .\"NODE "Executing operating system commands"
  2285. .SH "Executing operating system commands"
  2286. You may execute commands by typing them directly in the Midnight
  2287. Commander's input line, or by selecting the program you want to
  2288. execute with the selection bar in one of the panels and hitting Enter.
  2289. .PP
  2290. If you press Enter over a file that is not executable, the Midnight
  2291. Commander checks the extension of the selected file against the
  2292. extensions in the
  2293. .\"LINK2"
  2294. Extensions File\&.
  2295. .\"Edit Extension File"
  2296. If a match is found then the code associated with that extension is
  2297. executed. A very simple
  2298. .\"LINK2"
  2299. macro expansion
  2300. .\"Macro Substitution"
  2301. takes place before executing the command.
  2302. .\"NODE " The cd internal command"
  2303. .SH " The cd internal command"
  2304. The
  2305. .I cd
  2306. command is interpreted by the Midnight Commander, it is not passed to
  2307. the command shell for execution. Thus it may not handle all of the
  2308. nice macro expansion and substitution that your shell does, although it
  2309. does some of them:
  2310. .PP
  2311. .I Tilde substitution.
  2312. The (~) will be substituted with your home directory, if you append a
  2313. username after the tilde, then it will be substituted with the login
  2314. directory of the specified user.
  2315. .PP
  2316. For example, ~guest is the home directory for the user guest, while
  2317. ~/guest is the directory guest in your home directory.
  2318. .PP
  2319. .I Previous directory.
  2320. You can jump to the directory you were previously by using the special
  2321. directory name '\-' like this:
  2322. .B cd \-
  2323. .PP
  2324. .I CDPATH directories.
  2325. If the directory specified to the
  2326. .B cd
  2327. command is not in the current directory, then The Midnight Commander
  2328. uses the value in the environment variable
  2329. .B CDPATH
  2330. to search for the directory in any of the named directories.
  2331. .PP
  2332. For example you could set your
  2333. .B CDPATH
  2334. variable to ~/src:/usr/src, allowing you to change your directory to
  2335. any of the directories inside the ~/src and /usr/src directories, from
  2336. any place in the file system by using its relative name (for example
  2337. cd linux could take you to /usr/src/linux).
  2338. .\"NODE " Macro Substitution"
  2339. .SH " Macro Substitution"
  2340. When accessing a
  2341. .\"LINK2"
  2342. user menu\&,
  2343. .\"Edit Menu File"
  2344. or executing an
  2345. .\"LINK2"
  2346. extension dependent command\&,
  2347. .\"Edit Extension File"
  2348. or running a command from the command line input, a simple macro
  2349. substitution takes place.
  2350. .PP
  2351. The macros are:
  2352. .TP
  2353. .I %i
  2354. The indent of blank space, equal the cursor column position. For edit
  2355. menu only.
  2356. .TP
  2357. .I %y
  2358. The syntax type of current file. For edit menu only.
  2359. .TP
  2360. .I %k
  2361. The block file name.
  2362. .TP
  2363. .I %e
  2364. The error file name.
  2365. .TP
  2366. .I %m
  2367. The current menu name.
  2368. .TP
  2369. .IR %f " and " %p
  2370. The current file name.
  2371. .TP
  2372. .I %x
  2373. The extension of current file name.
  2374. .TP
  2375. .I %b
  2376. The current file name without extension.
  2377. .TP
  2378. .I %d
  2379. The current directory name.
  2380. .TP
  2381. .I %F
  2382. The current file in the unselected panel.
  2383. .TP
  2384. .I %D
  2385. The directory name of the unselected panel.
  2386. .TP
  2387. .I %t
  2388. The currently tagged files.
  2389. .TP
  2390. .I %T
  2391. The tagged files in the unselected panel.
  2392. .TP
  2393. .IR %u " and " %U
  2394. Similar to the %t and %T macros, but in addition the files are untagged.
  2395. You can use this macro only once per menu file entry or extension file
  2396. entry, because next time there will be no tagged files.
  2397. .TP
  2398. .IR %s " and " %S
  2399. The selected files: The tagged files if there are any. Otherwise the
  2400. current file.
  2401. .TP
  2402. .I %cd
  2403. This is a special macro that is used to change the current directory
  2404. to the directory specified in front of it. This is used primarily as
  2405. an interface to the
  2406. .\"LINK2"
  2407. Virtual File System\&.
  2408. .\"Virtual File System"
  2409. .TP
  2410. .I %view
  2411. This macro is used to invoke the internal viewer. This macro can be
  2412. used alone, or with arguments. If you pass any arguments to this
  2413. macro, they should be enclosed in brackets.
  2414. .IP
  2415. The arguments are:
  2416. .I ascii
  2417. to force the viewer into ascii mode;
  2418. .I hex
  2419. to force the viewer into hex mode;
  2420. .I nroff
  2421. to tell the viewer that it should interpret the bold and underline
  2422. sequences of nroff;
  2423. .I unformatted
  2424. to tell the viewer to not interpret nroff commands for making the text
  2425. bold or underlined.
  2426. .TP
  2427. .I %%
  2428. The % character
  2429. .TP
  2430. .I %{some text}
  2431. Prompt for the substitution. An input box is shown and the text inside
  2432. the braces is used as a prompt. The macro is substituted by the text
  2433. typed by the user. The user can press ESC or F10 to cancel. This macro
  2434. doesn't work on the command line yet.
  2435. .TP
  2436. .I %var{ENV:default}
  2437. If environment variable
  2438. .I ENV
  2439. is unset, the
  2440. .I default
  2441. is substituted. Otherwise, the value of
  2442. .I ENV
  2443. is substituted.
  2444. .\"NODE " The subshell support"
  2445. .SH " The subshell support"
  2446. The subshell support is a compile time option, that works with the
  2447. shells: bash, tcsh and zsh.
  2448. .PP
  2449. When the subshell code is activated the Midnight Commander will
  2450. spawn a concurrent copy of your shell (the one defined in the
  2451. .B SHELL
  2452. variable and if it is not defined, then the one in the /etc/passwd
  2453. file) and run it in a pseudo terminal, instead of invoking a new shell
  2454. each time you execute a command, the command will be passed to the
  2455. subshell as if you had typed it. This also allows you to change the
  2456. environment variables, use shell functions and define aliases that are
  2457. valid until you quit the Midnight Commander.
  2458. .PP
  2459. If you are using
  2460. .B bash
  2461. you can specify startup
  2462. commands for the subshell in your ~/.local/share/mc/bashrc file and
  2463. special keyboard maps in the ~/.local/share/mc/inputrc file.
  2464. .B tcsh
  2465. users may specify startup commands in the ~/.local/share/mc/tcshrc file.
  2466. .PP
  2467. When the subshell code is used, you can suspend applications at any
  2468. time with the sequence C\-o and jump back to the Midnight Commander, if
  2469. you interrupt an application, you will not be able to run other
  2470. external commands until you quit the application you interrupted.
  2471. .PP
  2472. An extra added feature of using the subshell is that the prompt
  2473. displayed by the Midnight Commander is the same prompt that you are
  2474. currently using in your shell.
  2475. .PP
  2476. The
  2477. .\"LINK2"
  2478. OPTIONS
  2479. .\"OPTIONS"
  2480. section has more information on how you can control the subshell code.
  2481. .\"NODE "Chmod"
  2482. .SH "Chmod"
  2483. The Chmod window is used to change the attribute bits in a group of
  2484. files and directories. It can be invoked with the C\-x c key combination.
  2485. .PP
  2486. The Chmod window has two parts \-
  2487. .I Permissions
  2488. and
  2489. .IR File .
  2490. .PP
  2491. In the File section are displayed the name of the file or directory
  2492. and its permissions in octal form, as well as its owner and group.
  2493. .PP
  2494. In the Permissions section there is a set of check buttons which
  2495. correspond to the file attribute bits. As you change the attribute
  2496. bits, you can see the octal value change in the File section.
  2497. .PP
  2498. To move between the widgets (buttons and check buttons) use the
  2499. .I arrow keys
  2500. or the
  2501. .I Tab
  2502. key. To change the state of the check buttons or to select a button
  2503. use
  2504. .I Space.
  2505. You can also use the hotkeys on the buttons to quickly activate them.
  2506. Hotkeys are shown as highlighted letters on the buttons.
  2507. .PP
  2508. To set the attribute bits, use the Enter key.
  2509. .PP
  2510. When working with a group of files or directories, you just click on
  2511. the bits you want to set or clear. Once you have selected the bits
  2512. you want to change, you select one of the action buttons (Set marked
  2513. or Clear marked).
  2514. .PP
  2515. Finally, to set the attributes exactly to those specified, you can use
  2516. the
  2517. .B [Set all]
  2518. button, which will act on all the tagged files.
  2519. .PP
  2520. .B [Marked all]
  2521. set only marked attributes to all selected files
  2522. .PP
  2523. .B [Set marked]
  2524. set marked bits in attributes of all selected files
  2525. .PP
  2526. .B [Clean marked]
  2527. clear marked bits in attributes of all selected files
  2528. .PP
  2529. .B [Set]
  2530. set the attributes of one file
  2531. .PP
  2532. .B [Cancel]
  2533. cancel the Chmod command
  2534. .\"NODE "Chown"
  2535. .SH "Chown"
  2536. The Chown command is used to change the owner/group of a file. The hot
  2537. key for this command is C\-x o.
  2538. .\"NODE "Advanced Chown"
  2539. .SH "Advanced Chown"
  2540. The Advanced Chown command is the
  2541. .\"LINK2"
  2542. Chmod
  2543. .\"Chmod"
  2544. and
  2545. .\"LINK2"
  2546. Chown
  2547. .\"Chown"
  2548. command combined into one window. You can change the permissions and
  2549. owner/group of files at once.
  2550. .\"NODE "File Operations"
  2551. .SH "File Operations"
  2552. When you copy, move or delete files the Midnight Commander shows the
  2553. file operations dialog. It shows the files currently being processed
  2554. and uses up to three progress bars. The file bar indicates the
  2555. percentage of the current file that has been processed so far. The
  2556. count bar shows how many of the tagged files have been handled. The
  2557. bytes bar indicates the percentage of the total size of the tagged files
  2558. that has been handled. If the verbose option is off, the file and bytes
  2559. bars are not shown.
  2560. .PP
  2561. There are two buttons at the bottom of the dialog. Pressing the Skip
  2562. button will skip the rest of the current file. Pressing the Abort
  2563. button will abort the whole operation, the rest of the files are
  2564. skipped.
  2565. .PP
  2566. There are three other dialogs which you can run into during the file
  2567. operations.
  2568. .PP
  2569. The error dialog informs about error conditions and has three choices.
  2570. Normally you select either the Skip button to skip the file or the Abort
  2571. button to abort the operation altogether. You can also select the Retry
  2572. button if you fixed the problem from another terminal.
  2573. .PP
  2574. The replace dialog is shown when you attempt to copy or move a file on
  2575. the top of an existing file. The dialog shows the dates and sizes of
  2576. the both files. Press the Yes button to overwrite the file, the No
  2577. button to skip the file, the All button to overwrite all the files, the
  2578. None button to never overwrite and the Update button to overwrite if the
  2579. source file is newer than the target file. You can abort the whole
  2580. operation by pressing the Abort button.
  2581. .PP
  2582. The recursive delete dialog is shown when you try to delete a directory
  2583. which is not empty. Press the Yes button to delete the directory
  2584. recursively, the No button to skip the directory, the All button to
  2585. delete all the directories and the None button to skip all the non\-empty
  2586. directories. You can abort the whole operation by pressing the Abort
  2587. button. If you selected the Yes or All button you will be asked for a
  2588. confirmation. Type "yes" only if you are really sure you want to do the
  2589. recursive delete.
  2590. .PP
  2591. If you have tagged files and perform an operation on them only the files
  2592. on which the operation succeeded are untagged. Failed and skipped files
  2593. are left tagged.
  2594. .\"NODE "Mask Copy/Rename"
  2595. .SH "Mask Copy/Rename"
  2596. The copy/move operations let you translate the names of files in an
  2597. easy way. To do it, you have to specify the correct source mask and
  2598. usually in the trailing part of the destination specify some wildcards.
  2599. All the files matching the source mask are copied/renamed according to
  2600. the target mask. If there are tagged files, only the tagged files
  2601. matching the source mask are renamed.
  2602. .PP
  2603. There are other options which you can set:
  2604. .PP
  2605. .B Follow links
  2606. .PP
  2607. determines whether make the symlinks and hardlinks in the source
  2608. directory (recursively in subdirectories) new links in the target
  2609. directory or whether would you like to copy their content.
  2610. .PP
  2611. .B Dive into subdirs
  2612. .PP
  2613. determines the behavior when the source directory is about to be copied,
  2614. but the target directory already exists. The default action is to copy
  2615. the contents of the source directory into the target directory.
  2616. Enabling this option causes copying the source directory itself into the
  2617. target directory.
  2618. .PP
  2619. For example, you want to copy directory
  2620. .I /foo
  2621. containing file
  2622. .I bar
  2623. to
  2624. .IR /bla/foo ,
  2625. which is an already existing directory. Normally (when
  2626. .B Dive into subdirs
  2627. is not set), mc would copy file
  2628. .I /foo/bar
  2629. into the file
  2630. .IR /bla/foo/bar .
  2631. By enabling this option the
  2632. .I /bla/foo/foo
  2633. directory will be created, and
  2634. .I /foo/bar
  2635. will be copied into
  2636. .IR /bla/foo/foo/bar .
  2637. .PP
  2638. .B Preserve attributes
  2639. .PP
  2640. determines whether to preserve the permissions, timestamps and (if you
  2641. are root) the ownership of the original files. If this option is not
  2642. set, the current value of the umask will be respected.
  2643. .PP
  2644. .B Use shell patterns
  2645. .PP
  2646. When this option is on you can use the '*' and '?' wildcards in the source
  2647. mask. They work like they do in the shell. In the target mask only the '*'
  2648. and '\\<digit>' wildcards are allowed. The first '*' wildcard in the target
  2649. mask corresponds to the first wildcard group in the source mask,
  2650. the second '*' corresponds to the second group and so on. The '\\1' wildcard
  2651. corresponds to the first wildcard group in the source mask, the '\\2' wildcard
  2652. corresponds to the second group and so on all the way up to '\\9'.
  2653. The '\\0' wildcard is the whole filename of the source file.
  2654. .PP
  2655. Two examples:
  2656. .PP
  2657. If the source mask is "*.tar.gz", the destination is "/bla/*.tgz" and the
  2658. file to be copied is "foo.tar.gz", the copy will be "foo.tgz" in "/bla".
  2659. .PP
  2660. Suppose you want to swap basename and extension so that "file.c" would
  2661. become "c.file" and so on. The source mask for this is "*.*" and the
  2662. destination is "\\2.\\1".
  2663. .PP
  2664. .B Use shell patterns off
  2665. .PP
  2666. When the shell patterns option is off the MC doesn't do automatic
  2667. grouping anymore. You must use '\\(...\\)' expressions in the source
  2668. mask to specify meaning for the wildcards in the target mask. This is
  2669. more flexible but also requires more typing. Otherwise target masks
  2670. are similar to the situation when the shell patterns option is on.
  2671. .PP
  2672. Two examples:
  2673. .PP
  2674. If the source mask is "^\\(.*\\)\\.tar\\.gz$", the destination is
  2675. "/bla/*.tgz" and the file to be copied is "foo.tar.gz", the copy
  2676. will be "/bla/foo.tgz".
  2677. .PP
  2678. Let's suppose you want to swap basename and extension so that "file.c"
  2679. will become "c.file" and so on. The source mask for this is
  2680. "^\\(.*\\)\\.\\(.*\\)$" and the destination is "\\2.\\1".
  2681. .PP
  2682. .B Case Conversions
  2683. .PP
  2684. You can also change the case of the filenames. If you use '\\u'
  2685. or '\\l' in the target mask, the next character will be converted to
  2686. uppercase or lowercase correspondingly.
  2687. .PP
  2688. If you use '\\U' or '\\L' in the target mask, the next characters will
  2689. be converted to uppercase or lowercase correspondingly up to the
  2690. next '\\E' or next '\\U', '\\L' or the end of the file name.
  2691. .PP
  2692. The '\\u' and '\\l' are stronger than '\\U' and '\\L'.
  2693. .PP
  2694. For example, if the source mask is '*' (
  2695. .I Use shell patterns
  2696. on) or '^\\(.*\\)$' (
  2697. .I Use shell patterns
  2698. off) and the target mask is '\\L\\u*' the file names will be converted
  2699. to have initial upper case and otherwise lower case.
  2700. .PP
  2701. You can also use '\\' as a quote character. For example, '\\\\' is
  2702. a backslash and '\\*' is an asterisk.
  2703. .PP
  2704. .B Stable symlinks
  2705. .PP
  2706. commands Midnight Commander, that it should change symlinks in the target,
  2707. so that they'll point to the same location as it did before. With absolute
  2708. symbolic links this does nothing, but if you have a relative one, it will
  2709. recompute its value, adding necessary ../ and other directory parts and making
  2710. the value as short as possible (most modern filesystems keep short symlinks
  2711. inside inodes and thus don't waste much disk space).
  2712. .\"NODE "Select/Unselect Files"
  2713. .SH "Select/Unselect Files"
  2714. The dialog of group of files and directories selection or uselection.
  2715. The
  2716. .\"LINK2"
  2717. input line
  2718. .\"Input Line Keys"
  2719. allow enter the regular expression of filenames that will be
  2720. selected/unselected.
  2721. .PP
  2722. When
  2723. .I Files only
  2724. checkbox is on, only files will be selected. If
  2725. .I Files only
  2726. is off, as files as directories will be selected.
  2727. When
  2728. .I Shell Patterns
  2729. checkbox is on, the regular expression is much like the filename globbing
  2730. in the shell (* standing for zero or more characters and ? standing
  2731. for one character). If
  2732. .I Shell Patterns
  2733. is off, then the tagging of files is done with normal regular
  2734. expressions (see ed (1)). When
  2735. .I Case sensitive
  2736. checkbox is on, the selection will be case sensitive characters.
  2737. If
  2738. .I Case sensitive
  2739. is off, the case will be ignored.
  2740. .\"NODE "Diff Viewer"
  2741. .SH "Internal Diff Viewer"
  2742. The mcdiff is a visual diff tool. You can compare two files and edit them
  2743. in\-place (diffs are updated dynamically). You can browse and view a working
  2744. copy from popular version control systems (GIT, Subversion, etc).
  2745. .PP
  2746. Following shortcuts are available in internal diff viewer of Midnight
  2747. Commander.
  2748. .PP
  2749. .B F1
  2750. Invoke the built\-in hypertext help viewer.
  2751. .PP
  2752. .B F2
  2753. Save modified files.
  2754. .PP
  2755. .B F4
  2756. Edit file of the left panel in the internal editor.
  2757. .PP
  2758. .B F14
  2759. Edit file of the right panel in the internal editor.
  2760. .PP
  2761. .B F5
  2762. Merge the current hunk. Only the current hunk will be merged.
  2763. .PP
  2764. .B F7
  2765. Start search.
  2766. .PP
  2767. .B F17
  2768. Continue search.
  2769. .PP
  2770. .B F10, Esc, q
  2771. Exit from diff viewer.
  2772. .PP
  2773. .B Alt\-s, s
  2774. Toggle show of hunk status.
  2775. .PP
  2776. .B Alt\-n, l
  2777. Toggle show of line numbers.
  2778. .PP
  2779. .B f
  2780. Maximize left panel.
  2781. .PP
  2782. .B =
  2783. Make panels equal in width.
  2784. .PP
  2785. .B >
  2786. Reduce the size of the right panel.
  2787. .PP
  2788. .B <
  2789. Reduce the size of the left panel.
  2790. .PP
  2791. .B c
  2792. Toggle show of trailing carriage return (CR) symbol as ^M.
  2793. .PP
  2794. .B 2, 3, 4, 8
  2795. Set tabulation size
  2796. .PP
  2797. .B C\-u
  2798. Swap contents of diff panels.
  2799. .PP
  2800. .B C\-r
  2801. Refresh the screen.
  2802. .PP
  2803. .B C\-o
  2804. Switch to the subshell and show the command screen.
  2805. .PP
  2806. .B Enter, Space, n
  2807. Find next diff hunk.
  2808. .PP
  2809. .B Backspace, p
  2810. Find previous diff hunk.
  2811. .PP
  2812. .B g
  2813. Go to line.
  2814. .PP
  2815. .B Down
  2816. Scroll one line forward.
  2817. .PP
  2818. .B Up
  2819. Scroll one line backward.
  2820. .PP
  2821. .B PageUp
  2822. Move one page up.
  2823. .PP
  2824. .B PageDown
  2825. Mves one page down.
  2826. .PP
  2827. .B Home, A1
  2828. Moves to the line beginning.
  2829. .PP
  2830. .B End
  2831. Moves to the line end.
  2832. .PP
  2833. .B C\-Home
  2834. Move to the file beginning.
  2835. .PP
  2836. .B C\-End, C1
  2837. Move to the file end.
  2838. .\"NODE "Internal File Viewer"
  2839. .SH "Internal File Viewer"
  2840. The internal file viewer provides two display modes: ASCII and hex.
  2841. To toggle between modes, use the F4 key.
  2842. .PP
  2843. The viewer will try to use the best method provided by your system or
  2844. the file type to display the information.
  2845. Some character sequences, which appear most often in preformatted manual
  2846. pages, are displayed bold and underlined, thus making a pretty display
  2847. of your files.
  2848. .PP
  2849. When in hex mode, the search function accepts text in quotes and
  2850. constant numbers. Text in quotes is matched exactly after removing
  2851. the quotes. Each number matches one byte. You can mix quoted text
  2852. with constants like this:
  2853. .PP
  2854. .nf
  2855. "String" \-1 0xBB 012 "more text"
  2856. .fi
  2857. .PP
  2858. Note that 012 is an octal number. \-1 is converted to 0xFF.
  2859. .PP
  2860. Here is a listing of the actions associated with each key that the
  2861. Midnight Commander handles in the internal file viewer.
  2862. .PP
  2863. .B F1
  2864. Invoke the built\-in hypertext help viewer.
  2865. .PP
  2866. .B F2
  2867. Toggle the wrap mode.
  2868. .PP
  2869. .B F4
  2870. Toggle the hex mode.
  2871. .PP
  2872. .B F5
  2873. Goto line. This will prompt you for a line number and will display
  2874. that line.
  2875. .PP
  2876. .B F6, /.
  2877. Regular expression search.
  2878. .PP
  2879. .B ?,
  2880. Reverse regular expression search.
  2881. .PP
  2882. .B F7
  2883. Normal search / hex mode search.
  2884. .PP
  2885. .B C\-s, F17, n.
  2886. Start normal search if there was no previous search expression else
  2887. find next match.
  2888. .PP
  2889. .B C\-r.
  2890. Start reverse search if there was no previous search expression else
  2891. find next match.
  2892. .PP
  2893. .B F8
  2894. Toggle Raw/Parsed mode: This will show the file as found on disk or if
  2895. a processing filter has been specified in the mc.ext file, then the
  2896. output from the filter. Current mode is always the other than written
  2897. on the button label, since on the button is the mode which you enter
  2898. by that key.
  2899. .PP
  2900. .B F9
  2901. Toggle the format/unformat mode: when format mode is on the viewer
  2902. will interpret some string sequences to show bold and underline with
  2903. different colors. Also, on button label is the other mode than current.
  2904. .PP
  2905. .B F10, Esc.
  2906. Exit the internal file viewer.
  2907. .PP
  2908. .B next\-page, space, C\-v.
  2909. Scroll one page forward.
  2910. .PP
  2911. .B prev\-page, Alt\-v, C\-b, Backspace.
  2912. Scroll one page backward.
  2913. .PP
  2914. .B down\-key
  2915. Scroll one line forward.
  2916. .PP
  2917. .B up\-key
  2918. Scroll one line backward.
  2919. .PP
  2920. .B C\-l
  2921. Refresh the screen.
  2922. .PP
  2923. .B C\-o
  2924. Switch to the subshell and show the command screen.
  2925. .PP
  2926. .B "[n] m"
  2927. Set the mark n.
  2928. .PP
  2929. .B "[n] r"
  2930. Jump to the mark n.
  2931. .PP
  2932. .B C\-f
  2933. Jump to the next file.
  2934. .PP
  2935. .B C\-b
  2936. Jump to the previous file.
  2937. .PP
  2938. .B Alt\-r
  2939. Toggle the ruler.
  2940. .PP
  2941. .B Alt\-e
  2942. to change charset of displayed text may use M\-e (Alt\-e).
  2943. Recoding is made from selected codepage into system codepage. To
  2944. cancel the recoding you may select "<No translation>" in charset
  2945. selection dialog.
  2946. .PP
  2947. It's possible to instruct the file viewer how to display a file, look
  2948. at the
  2949. .\"LINK2"
  2950. Edit Extension File section
  2951. .\"Edit Extension File"
  2952. .\"NODE "Internal File Editor"
  2953. .SH "Internal File Editor"
  2954. The internal file editor is a full\-featured full screen editor. It can
  2955. edit files up to 64 megabytes. It is possible to edit binary files.
  2956. The internal file editor is invoked using
  2957. .B F4
  2958. if the
  2959. .I use_internal_edit
  2960. option is set in the initialization file.
  2961. .PP
  2962. The features it presently supports are: block copy, move, delete, cut,
  2963. paste; key for key undo; pull\-down menus; file insertion; macro
  2964. commands; regular expression search and replace; shift\-arrow text highlighting
  2965. (if supported by the terminal); insert\-overwrite toggle; word wrap;
  2966. autoindent; tunable tab size; syntax highlighting for various file
  2967. types; and an option to pipe text blocks through shell commands like
  2968. indent and ispell.
  2969. .PP
  2970. Sections:
  2971. .IP
  2972. .\"LINK2"
  2973. Options of editor in ini\-file
  2974. .\"Internal File Editor / options"
  2975. .PP
  2976. The editor is very easy to use and requires no tutoring. To see what
  2977. keys do what, just consult the appropriate pull\-down menu. Other keys
  2978. are: Shift movement keys do text highlighting.
  2979. .B Ctrl\-Ins
  2980. copies to the file
  2981. .B mcedit.clip
  2982. and
  2983. .B Shift\-Ins
  2984. pastes from mcedit.clip.
  2985. .B Shift\-Del
  2986. cuts to
  2987. .BR mcedit.clip ,
  2988. and
  2989. .B Ctrl\-Del
  2990. deletes highlighted text. Mouse highlighting also works, and you
  2991. can override the mouse as usual by holding down the shift key
  2992. while dragging the mouse to let normal terminal mouse highlighting
  2993. work.
  2994. .PP
  2995. To define a macro, press
  2996. .B Ctrl\-R
  2997. and then type out the key
  2998. strokes you want to be executed. Press
  2999. .B Ctrl\-R
  3000. again when finished. You can then assign the macro to any key you
  3001. like by pressing that key. The macro is executed when you press
  3002. .B Ctrl\-A
  3003. and then the assigned key. The macro is also executed if
  3004. you press Meta, Ctrl, or Esc and the assigned key, provided that the
  3005. key is not used for any other function. Once defined, the macro
  3006. commands go into the file
  3007. .B ~/.local/share/mc/mcedit/mcedit.macros
  3008. You can delete a macro by deleting the
  3009. appropriate line in this file.
  3010. .PP
  3011. To change charset of displayed text may use M\-e (Alt\-e).
  3012. Recoding is made from selected codepage into system codepage. To
  3013. cancel the recoding you may select "<No translation>" in charset
  3014. selection dialog.
  3015. .PP
  3016. .B F19
  3017. will format the currently highlighted block (plain text or
  3018. .B C
  3019. or
  3020. .B C++
  3021. code or another). This is controlled by the
  3022. file
  3023. .B %prefix%/share/mc/edit.indent.rc
  3024. which is copied to
  3025. .B ~/.local/share/mc/mcedit/edit.indent.rc
  3026. in your home directory the first time you use it.
  3027. .PP
  3028. The editor also displays non\-us characters (160+). When editing
  3029. binary files, you should set
  3030. .B display bits
  3031. to 7 bits in the options menu to keep the spacing clean.
  3032. .\"NODE "Internal File Editor / options"
  3033. .SH "Options of editor in ini\-file"
  3034. Some editor options of ini\-file are described in this section.
  3035. Options are placed in [Midnight\-Commander] section
  3036. .TP
  3037. .I editor_wordcompletion_collect_entire_file
  3038. Search autocomplete candidates in entire of file or just from
  3039. begin of file to cursor position (0)
  3040. .\"NODE "Screen selector"
  3041. .SH "Screen selector"
  3042. Midnight Commander supports running many internal modules (such as
  3043. editor, viewer and diff viewer) simultaneously and switching between
  3044. them without closing open files. Using several file managers at a time,
  3045. however, is not currently supported.
  3046. .PP
  3047. Let's call each of these modules a screen. There are three ways to
  3048. switch between screens, using one of these global shortcuts:
  3049. .TP
  3050. .B Alt\-}
  3051. switch to the next screen;
  3052. .TP
  3053. .B Alt\-{
  3054. switch to the previous screen;
  3055. .TP
  3056. .B Alt\-`
  3057. open a dialog window with the list of currently open screens (or use the
  3058. "Screen list" menu item).
  3059. .\"NODE "Completion"
  3060. .SH "Completion"
  3061. Let the Midnight Commander type for you.
  3062. .PP
  3063. Attempt to perform completion on the text before current position. MC
  3064. attempts completion treating the text as variable (if the text begins
  3065. with
  3066. .BR $ ),
  3067. username (if the text begins with
  3068. .BR ~ ),
  3069. hostname (if the text begins with
  3070. .BR @ )
  3071. or command (if you are on the command line in the position where you
  3072. might type a command, possible completions then include shell reserved
  3073. words and shell built\-in commands as well) in turn. If none of these
  3074. matches, filename completion is attempted.
  3075. .PP
  3076. Filename, username, variable and hostname completion works on all input
  3077. lines, command completion is command line specific. If the completion
  3078. is ambiguous (there are more different possibilities), MC beeps and the
  3079. following action depends on the setting of the
  3080. .\"LINK2"
  3081. Complete: show all
  3082. .\"Configuration"
  3083. option in the
  3084. .\"LINK2"
  3085. Configuration
  3086. .\"Configuration"
  3087. dialog. If it is enabled, a list of all possibilities pops up next to
  3088. the current position and you can select with the arrow keys and
  3089. .B Enter
  3090. the correct entry. You can also type the first letters in which the
  3091. possibilities differ to move to a subset of all possibilities and
  3092. complete as much as possible. If you press
  3093. .B Alt\-Tab
  3094. again, only the subset will be shown in the listbox, otherwise the first
  3095. item which matches all the previous characters will be highlighted. As
  3096. soon as there is no ambiguity, dialog disappears, but you can hide it by
  3097. canceling keys
  3098. .BR Esc ,
  3099. .B F10
  3100. and left and right arrow keys. If
  3101. .\"LINK2"
  3102. Complete: show all
  3103. .\"Configuration"
  3104. is disabled, the dialog pops up only if you press
  3105. .B Alt\-Tab
  3106. for the second time, for the first time MC just beeps.
  3107. .PP
  3108. Apply escaping of
  3109. .BR ? ", " * " and " &
  3110. symbols (as \fB\\?\fR, \fB\\*\fR, \fB\\&\fR )
  3111. in filenames to disallow use them as metasymbols in regular expressions
  3112. when substitution is performed in the input line.
  3113. .\"NODE "Virtual File System"
  3114. .SH "Virtual File System"
  3115. The Midnight Commander is provided with a code layer to access the file
  3116. system; this code layer is known as the virtual file system switch. The
  3117. virtual file system switch allows the Midnight Commander to manipulate
  3118. files not located on the Unix file system.
  3119. .PP
  3120. Currently the Midnight Commander is packaged with some Virtual File
  3121. Systems (VFS): the
  3122. .I local
  3123. file system, used for accessing the regular Unix file system; the
  3124. .IR ftpfs ,
  3125. used to manipulate files on remote systems with the FTP protocol; the
  3126. .IR tarfs ,
  3127. used to manipulate tar and compressed tar files; the
  3128. .IR undelfs ,
  3129. used to recover deleted files on ext2 file systems (the default file
  3130. system for Linux systems),
  3131. .I fish
  3132. (for manipulating files over shell connections such as rsh and ssh).
  3133. If the code was compiled with
  3134. .I sftpfs
  3135. (for manipulating files over SFTP connections).
  3136. If the code was compiled with
  3137. .I smbfs
  3138. support, you can manipulate files on remote systems with the SMB (CIFS)
  3139. protocol.
  3140. .PP
  3141. A generic
  3142. .I extfs
  3143. (EXTernal virtual File System) is provided in order to easily expand
  3144. VFS capabilities using scripts and external software.
  3145. .PP
  3146. The VFS switch code will interpret all of the path names used and will
  3147. forward them to the correct file system, the formats used for each one
  3148. of the file systems is described later in their own section.
  3149. .\"NODE " FTP File System"
  3150. .SH " FTP File System"
  3151. The FTP File System (ftpfs) allows you to manipulate files on remote
  3152. machines. To actually use it, you can use the
  3153. .I FTP link
  3154. item in the menu or directly change your current directory using the
  3155. .I cd
  3156. command to a path name that looks like this:
  3157. .PP
  3158. .I ftp://[!][user[:pass]@]machine[:port][remote\-dir]
  3159. .PP
  3160. The
  3161. .IR user ,
  3162. .I port
  3163. and
  3164. .I remote\-dir
  3165. elements are optional. If you specify the
  3166. .I user
  3167. element, the Midnight Commander will login to the remote machine as that
  3168. user, otherwise it will use anonymous login or the login name from the
  3169. .I ~/.netrc
  3170. file. The optional
  3171. .I pass
  3172. element is the password used for the connection. Using the password in
  3173. the VFS directory name is not recommended, because it can appear on the
  3174. screen in clear text and can be saved to the directory history.
  3175. .PP
  3176. To enable using FTP proxy, prepend
  3177. .B !
  3178. (an exclamation sign) to the hostname.
  3179. .PP
  3180. Examples:
  3181. .PP
  3182. .nf
  3183. ftp://ftp.nuclecu.unam.mx/linux/local
  3184. ftp://tsx\-11.mit.edu/pub/linux/packages
  3185. ftp://!behind.firewall.edu/pub
  3186. ftp://guest@remote\-host.com:40/pub
  3187. ftp://miguel:xxx@server/pub
  3188. .fi
  3189. .PP
  3190. Please check the
  3191. .\"LINK2"
  3192. Virtual File System
  3193. .\"Virtual FS"
  3194. dialog box for ftpfs options.
  3195. .\"NODE " Tar File System"
  3196. .SH " Tar File System"
  3197. The tar file system provides you with read\-only access to your tar
  3198. files and compressed tar files by using the chdir command. To change
  3199. your directory to a tar file, you change your current directory to the
  3200. tar file by using the following syntax:
  3201. .PP
  3202. .I /filename.tar/utar://[dir\-inside\-tar]
  3203. .PP
  3204. The mc.ext file already provides a shortcut for tar files, this means
  3205. that usually you just point to a tar file and press return to enter
  3206. into the tar file, see the
  3207. .\"LINK2"
  3208. Edit Extension File
  3209. .\"Edit Extension File"
  3210. section for details on how this is done.
  3211. .PP
  3212. Examples:
  3213. .PP
  3214. .nf
  3215. mc\-3.0.tar.gz/utar://mc\-3.0/vfs
  3216. /ftp/GCC/gcc\-2.7.0.tar/utar://
  3217. .fi
  3218. .PP
  3219. The latter specifies the full path of the tar archive.
  3220. .\"NODE " FIle transfer over SHell filesystem"
  3221. .SH " FIle transfer over SHell filesystem"
  3222. The fish file system is a network based file system that allows you to
  3223. manipulate the files in a remote machine as if they were local. To use
  3224. this, the other side has to either run fish server, or has to have
  3225. bash\-compatible shell.
  3226. .PP
  3227. To connect to a remote machine, you just need to chdir
  3228. into a special directory which name is in the following
  3229. format:
  3230. .PP
  3231. .I sh://[user@]machine[:options]/[remote\-dir]
  3232. .PP
  3233. The
  3234. .I user,
  3235. .I options
  3236. and
  3237. .I remote\-dir
  3238. elements are optional. If you specify the
  3239. .I user
  3240. element, the Midnight Commander will try to login on the remote
  3241. machine as that user, otherwise it will use your login name.
  3242. .PP
  3243. The available
  3244. .I options
  3245. are:
  3246. .nf
  3247. 'C' \- use compression;
  3248. 'r' \- use rsh instead of ssh;
  3249. port \- specify the port used by remote server.
  3250. .fi
  3251. If the
  3252. .I remote\-dir
  3253. element is present, your current directory on the remote machine will be
  3254. set to this one.
  3255. .PP
  3256. Examples:
  3257. .PP
  3258. .nf
  3259. sh://onlyrsh.mx:r/linux/local
  3260. sh://joe@want.compression.edu:C/private
  3261. sh://joe@noncompressed.ssh.edu/private
  3262. sh://joe@somehost.ssh.edu:2222/private
  3263. .fi
  3264. .\"NODE " SFTP (SSH File Transfer Protocol) filesystem"
  3265. .SH " SFTP (SSH File Transfer Protocol) filesystem"
  3266. The SFTP file system is a network based file system that allows you to
  3267. manipulate the files in a remote machine as if they were local.
  3268. .PP
  3269. To connect to a remote machine, you just need to chdir
  3270. into a special directory which name is in the following
  3271. format:
  3272. .PP
  3273. .I sftp://[user@]machine:[port]/[remote\-dir]
  3274. .PP
  3275. The
  3276. .I user,
  3277. .I port
  3278. and
  3279. .I remote\-dir
  3280. elements are optional. If you specify the
  3281. .I user
  3282. element, the Midnight Commander will try to login on the remote
  3283. machine as that user, otherwise it will use your login name.
  3284. .I port
  3285. \- specify the port used by remote server (22 by default).
  3286. If the
  3287. .I remote\-dir
  3288. element is present, your current directory on the remote machine will be
  3289. set to this one.
  3290. .PP
  3291. Examples:
  3292. .PP
  3293. .nf
  3294. sftp://onlyrsh.mx/linux/local
  3295. sftp://joe:password@want.compression.edu/private
  3296. sftp://joe@noncompressed.ssh.edu/private
  3297. sftp://joe@somehost.ssh.edu:2222/private
  3298. .fi
  3299. .\"NODE " Undelete File System"
  3300. .SH " Undelete File System"
  3301. On Linux systems, if you asked configure to use the ext2fs undelete
  3302. facilities, you will have the undelete file system available.
  3303. Recovery of deleted files is only available on ext2 file systems. The
  3304. undelete file system is just an interface to the ext2fs library to
  3305. retrieve all of the deleted files names on an ext2fs and provides and
  3306. to extract the selected files into a regular partition.
  3307. .PP
  3308. To use this file system, you have to chdir into the special file name
  3309. formed by the "undel://" prefix and the file name where the actual
  3310. file system resides.
  3311. .PP
  3312. For example, to recover deleted files on the second partition of the
  3313. first SCSI disk on Linux, you would use the following path name:
  3314. .PP
  3315. .nf
  3316. undel://sda2
  3317. .fi
  3318. .PP
  3319. It may take a while for the undelfs to load the required information
  3320. before you start browsing files there.
  3321. .\"NODE " SMB File System"
  3322. .SH " SMB File System"
  3323. The smbfs allows you to manipulate files on remote machines with SMB
  3324. (or CIFS) protocol. These include Windows for Workgroups,
  3325. Windows 9x/ME/XP, Windows NT, Windows 2000 and Samba.
  3326. To actually use it, you may try to use the panel command "SMB link..."
  3327. (accessible from the menubar) or you may directly change your current
  3328. directory to it using the cd command to a path name that looks like this:
  3329. .PP
  3330. .I smb://[user@]machine[/service][/remote\-dir]
  3331. .PP
  3332. The
  3333. .IR user ,
  3334. .I service
  3335. and
  3336. .I remote\-dir
  3337. elements are optional.
  3338. The
  3339. .IR user ,
  3340. .I domain
  3341. and
  3342. .I password
  3343. can be specified in an input dialog.
  3344. .PP
  3345. Examples:
  3346. .PP
  3347. .nf
  3348. smb://machine/Share
  3349. smb://other_machine
  3350. smb://guest@machine/Public/Irlex
  3351. .fi
  3352. .\"NODE " EXTernal File System"
  3353. .SH " EXTernal File System"
  3354. .B extfs
  3355. allows you to integrate numerous features and file types into GNU Midnight
  3356. Commander in an easy way, by writing scripts.
  3357. .PP
  3358. Extfs filesystems can be divided into two categories:
  3359. .PP
  3360. 1. Stand\-alone filesystems, which are not associated with any existing
  3361. file. They represent certain system\-wide data as a directory tree.
  3362. You can invoke them by typing
  3363. .RI ' "cd fsname://" '
  3364. where fsname is an extfs short name (see below). Examples of such
  3365. filesystems include audio (list audio tracks on the CD) or apt (list of
  3366. all Debian packages in the system).
  3367. .PP
  3368. For example, to list CD\-Audio tracks on your CD\-ROM drive, type
  3369. .PP
  3370. .nf
  3371. cd audio://
  3372. .fi
  3373. .PP
  3374. 2. 'Archive' filesystems (like rpm, patchfs and more), which represent
  3375. contents of a file as a directory tree. It can consist of 'real' files
  3376. compressed in an archive (urar, rpm) or virtual files, like messages
  3377. in a mailbox (mailfs) or parts of a patch (patchfs). To access such
  3378. filesystems
  3379. .RI ' fsname:// '
  3380. should be appended to the archive name. Note that the archive itself
  3381. can be on another vfs.
  3382. .PP
  3383. For example, to list contents of a zip archive documents.zip type
  3384. .PP
  3385. .nf
  3386. cd documents.zip/uzip://
  3387. .fi
  3388. .PP
  3389. In many aspects, you could treat extfs like any other directory. For
  3390. instance, you can add it to the hotlist or change to it from directory
  3391. history. An important limitation is that you cannot invoke shell
  3392. commands inside extfs, just like any other non\-local VFS.
  3393. .PP
  3394. Common extfs scripts included with Midnight Commander are:
  3395. .TP
  3396. .B a
  3397. access 'A:' DOS/Windows diskette
  3398. .RI ( "cd a://" ).
  3399. .TP
  3400. .B apt
  3401. front end to Debian's APT package management system
  3402. .RI ( "cd apt://" ).
  3403. .TP
  3404. .B audio
  3405. audio CD ripping and playing
  3406. .RI ( "cd audio://"
  3407. or
  3408. .IR "cd device/audio://" ).
  3409. .TP
  3410. .B bpp
  3411. package of Bad Penguin GNU/Linux distribution
  3412. .RI ( "cd file.bpp/bpp://" ).
  3413. .TP
  3414. .B deb
  3415. package of Debian GNU/Linux distribution
  3416. .RI ( "cd file.deb/deb://" ).
  3417. .TP
  3418. .B dpkg
  3419. Debian GNU/Linux installed packages
  3420. .RI ( "cd deb://" ).
  3421. .TP
  3422. .B hp48
  3423. view and copy files to/from a HP48 calculator
  3424. .RI ( "cd hp48://" ).
  3425. .TP
  3426. .B lslR
  3427. browsing of lslR listings as found on many FTPs
  3428. .RI ( "cd filename/lslR://" ).
  3429. .TP
  3430. .B mailfs
  3431. mbox\-style mailbox files support
  3432. .RI ( "cd mailbox/mailfs://" ).
  3433. .TP
  3434. .B patchfs
  3435. extfs to handle unified and context diffs
  3436. .RI ( "cd filename/patchfs://" ).
  3437. .TP
  3438. .B rpm
  3439. RPM package
  3440. .RI ( "cd filename/rpm://" ).
  3441. .TP
  3442. .B rpms
  3443. RPM database management
  3444. .RI ( "cd rpms://" ).
  3445. .TP
  3446. .B ulha, urar, uzip, uzoo, uar, uha
  3447. archivers
  3448. .RI ( "cd archive/xxxx://"
  3449. where xxxx is one of:
  3450. .IR ulha ,
  3451. .IR urar ,
  3452. .IR uzip ,
  3453. .IR uzoo ,
  3454. .IR uar ,
  3455. .IR uha ).
  3456. .PP
  3457. You could bind file type/extension to specified extfs as described in the
  3458. .\"LINK2"
  3459. Edit Extension File
  3460. .\"Edit Extension File"
  3461. section. Here is an example entry for Debian packages:
  3462. .PP
  3463. .nf
  3464. regex/\.deb$
  3465. Open=%cd %p/deb://
  3466. .fi
  3467. .\"NODE "Colors"
  3468. .SH "Colors"
  3469. The Midnight Commander will try to detect if your terminal supports
  3470. color using the terminal database and your terminal name. Sometimes
  3471. it gets confused, so you may force color mode or disable color mode
  3472. using the \-c and \-b flag respectively.
  3473. .PP
  3474. If the program is compiled with the Slang screen manager instead of
  3475. ncurses, it will also check the variable
  3476. .B COLORTERM,
  3477. if it is set, it has the same effect as the \-c flag.
  3478. .PP
  3479. You may specify terminals that always force color mode
  3480. by adding the
  3481. .I color_terminals
  3482. variable to the Colors section of the initialization file. This will
  3483. prevent the Midnight Commander from trying to detect if your terminal
  3484. supports color. Example:
  3485. .PP
  3486. .nf
  3487. [Colors]
  3488. color_terminals=linux,xterm
  3489. color_terminals=terminal\-name1,terminal\-name2...
  3490. .fi
  3491. .PP
  3492. The program can be compiled with both ncurses and slang, ncurses does
  3493. not provide a way to force color mode: ncurses uses just the
  3494. information in the terminal database.
  3495. .PP
  3496. The Midnight Commander provides a way to change the default colors.
  3497. Currently the colors are configured using the environment variable
  3498. .B MC_COLOR_TABLE
  3499. or the Colors section in the initialization file.
  3500. .PP
  3501. In the Colors section, the default color map is loaded from the
  3502. .I base_color
  3503. variable. You can specify an alternate color map for a terminal by
  3504. using the terminal name as the key in this section. Example:
  3505. .PP
  3506. .nf
  3507. [Colors]
  3508. base_color=
  3509. xterm=menu=magenta:marked=,magenta:markselect=,red
  3510. .fi
  3511. .PP
  3512. The format for the color definition is:
  3513. .PP
  3514. .nf
  3515. <keyword>=<fgcolor>,<bgcolor>,<attributes>:<keyword>=...
  3516. .fi
  3517. .PP
  3518. The colors are optional, and the keywords are: normal, selected, disabled, marked,
  3519. markselect, errors, input, inputmark, inputunchanged, commandlinemark,
  3520. reverse, gauge, header, inputhistory, commandhistory. Button bar colors are:
  3521. bbarhotkey, bbarbutton. Status bar color: statusbar. Menu colors are: menunormal,
  3522. menusel, menuhot, menuhotsel, menuinactive. Dialog colors are: dnormal, dfocus,
  3523. dhotnormal, dhotfocus, dtitle. Error dialog colors are: errdfocus, errdhotnormal,
  3524. errdhotfocus, errdtitle. Help colors are: helpnormal, helpitalic, helpbold,
  3525. helplink, helpslink, helptitle. Viewer colors are: viewnormal, viewbold,
  3526. viewunderline, viewselected. Editor colors are: editnormal, editbold, editmarked,
  3527. editwhitespace, editlinestate. Popup menu colors are: pmenunormal, pmenusel,
  3528. pmenutitle.
  3529. .PP
  3530. .I header
  3531. determines the color of panel header, the line that contains column titles
  3532. and sort mode indicator.
  3533. .PP
  3534. .I input
  3535. determines the color of input lines used in query dialogs.
  3536. .PP
  3537. .I gauge
  3538. determines the color of the filled part of the progress bar (gauge),
  3539. which is used to show the user the progress of file operations, such as
  3540. copying.
  3541. .PP
  3542. .I disabled
  3543. determines the color of the widget that cannot be selected.
  3544. .PP
  3545. The dialog boxes use the following colors:
  3546. .I dnormal
  3547. is used for the normal text,
  3548. .I dfocus
  3549. is the color used for the currently selected component,
  3550. .I dhotnormal
  3551. is the color used to differentiate the hotkey color in normal
  3552. components, whereas the
  3553. .I dhotfocus
  3554. color is used for the highlighted color in the currently selected
  3555. component.
  3556. .PP
  3557. Menus use the same scheme but uses the menunormal, menusel, menuhot, menuhotsel
  3558. and menuinactive tags instead.
  3559. .PP
  3560. Help uses the following colors:
  3561. .I helpnormal
  3562. is used for normal text,
  3563. .I helpitalic
  3564. is used for text which is emphasized in italic in the manual page,
  3565. .I helpbold
  3566. is used for text which is emphasized in bold in the manual page,
  3567. .I helplink
  3568. is used for not selected hyperlinks and
  3569. .I helpslink
  3570. is used for selected hyperlink.
  3571. .PP
  3572. Popup menu uses following colors:
  3573. .I pmenunormal
  3574. is used for non\-selected menu items and as a main color of popup menu window,
  3575. .I pmenusel
  3576. is used for selected menu item,
  3577. .I pmenutitle
  3578. is used for popup menu title.
  3579. .PP
  3580. The possible colors are: black, gray, red, brightred, green,
  3581. brightgreen, brown, yellow, blue, brightblue, magenta, brightmagenta,
  3582. cyan, brightcyan, lightgray and white. And there is a special keyword
  3583. for transparent background. It is 'default'. The 'default' can only be
  3584. used for background color. Another special keyword "base" means mc's main
  3585. colors. When 256 colors are available, they can be specified either as
  3586. color16 to color255, or as rgb000 to rgb555 and gray0 to gray23. Example:
  3587. .PP
  3588. .nf
  3589. [Colors]
  3590. base_color=normal=white,default:marked=magenta,default
  3591. .fi
  3592. .PP
  3593. Attributes can be any of bold, underline, reverse and blink, appended by a
  3594. plus sign if more than one are desired. The special word "none" means no
  3595. attributes, without attempting to fall back to base_color. Example:
  3596. .PP
  3597. .nf
  3598. menuhotsel=yellow;black;bold+underline
  3599. .fi
  3600. .\"NODE "Skins"
  3601. .SH "Skins"
  3602. You can change the appearance of Midnight Commander.
  3603. To do this, you must specify a file that contain descriptions of colors
  3604. and lines to draw boxes. Redefining of the colors is entirely compatible
  3605. with the assignment of colors, as described in Section
  3606. .\"LINK2"
  3607. Colors\&.
  3608. .\"Colors"
  3609. .PP
  3610. If your skin contains any of 256\-color definitions, you should define
  3611. the '256colors' key set to TRUE value in [skin] section.
  3612. .PP
  3613. A skin\-file is searched on the following algorithm (to the first one found):
  3614. .IP
  3615. .br
  3616. 1) command line option
  3617. .B \-S <skin>
  3618. or
  3619. .B \-\-skin=<skin>
  3620. .br
  3621. 2) Environment variable
  3622. .B MC_SKIN
  3623. .br
  3624. 3) Parameter
  3625. .B skin
  3626. in section
  3627. .B [Midnight\-Commander]
  3628. in config file.
  3629. .br
  3630. 4) File
  3631. .B %sysconfdir%/mc/skins/default.ini
  3632. .br
  3633. 5) File
  3634. .B %prefix%/share/mc/skins/default.ini
  3635. .PP
  3636. Command line option, environment variable and parameter in config file may
  3637. contain the absolute path to the skin\-file (with the extension \.ini
  3638. or without it). Search of skin\-file will occur in (to the first one found):
  3639. .IP
  3640. 1)
  3641. .B ~/.local/share/mc/skins/
  3642. .br
  3643. 2)
  3644. .B @sysconfdir@/mc/skins/
  3645. .br
  3646. 3)
  3647. .B %prefix%/share/mc/skins/
  3648. .br
  3649. .PP
  3650. For getting extended info, refer to:
  3651. .IP
  3652. .\"LINK2"
  3653. Description of section and parameters
  3654. .\"Skins sections"
  3655. .br
  3656. .\"LINK2"
  3657. Color pair definitions
  3658. .\"Skins colors"
  3659. .br
  3660. .\"LINK2"
  3661. Draw lines
  3662. .\"Skins lines"
  3663. .br
  3664. .\"LINK2"
  3665. Compatibility
  3666. .\"Skins oldcolors"
  3667. .br
  3668. .\"NODE " Skins sections"
  3669. .SH " Description of section and parameters"
  3670. Section
  3671. .B [skin]
  3672. contain metainfo for skin\-file. Parameter
  3673. .I description
  3674. contain short text about skin.
  3675. .PP
  3676. Section
  3677. .B [filehighlight]
  3678. contain descriptions of color pairs for filenames highlighting.
  3679. Name of parameters must be equal to names of sections into
  3680. filehighlight.ini file.
  3681. See
  3682. .\"LINK2"
  3683. Filenames Highlight
  3684. .\"Filenames Highlight"
  3685. for getting more info.
  3686. .PP
  3687. Section
  3688. .B [core]
  3689. describes the elements that are used everywhere.
  3690. .TP
  3691. .I _default_
  3692. Default color pair. Used in all other sections if they not contain
  3693. color definitions
  3694. .TP
  3695. .I selected
  3696. cursor
  3697. .TP
  3698. .I marked
  3699. selected data
  3700. .TP
  3701. .I markselect
  3702. cursor on selected data
  3703. .TP
  3704. .I gauge
  3705. color of the filled part of the progress bar
  3706. .TP
  3707. .I input
  3708. color of input lines used in query dialogs
  3709. .TP
  3710. .I inputmark
  3711. color of input selected text
  3712. .TP
  3713. .I inputunhanged
  3714. color of input text before first modification or cursor movement
  3715. .TP
  3716. .I commandlinemark
  3717. color of selected text in command line
  3718. .TP
  3719. .I reverse
  3720. reverse color
  3721. .PP
  3722. Section
  3723. .B [dialog]
  3724. describes the elements that are placed on dialog windows (except error dialogs).
  3725. .TP
  3726. .I _default_
  3727. Default color for this section. Used [core]._default_ if not specified
  3728. .TP
  3729. .I dfocus
  3730. Color of active element (in focus)
  3731. .TP
  3732. .I dhotnormal
  3733. Color of hotkeys
  3734. .TP
  3735. .I dhotfocus
  3736. Color of hotkeys in focused element
  3737. .PP
  3738. Section
  3739. .B [error]
  3740. describes the elements that are placed on error dialog windows
  3741. .TP
  3742. .I _default_
  3743. Default color for this section. Used [core]._default_ if not specified
  3744. .TP
  3745. .I errdhotnormal
  3746. Color of hotkeys
  3747. .TP
  3748. .I errdhotfocus
  3749. Color of hotkeys in focused element
  3750. .PP
  3751. Section
  3752. .B [menu]
  3753. describes the elements that are placed in menu. This section describes
  3754. system menu (called by F9) and user\-defined menus (called by F2 in panels
  3755. and by F11 in editor).
  3756. .TP
  3757. .I _default_
  3758. Default color for this section. Used [core]._default_ if not specified
  3759. .TP
  3760. .I entry
  3761. Color of menu items
  3762. .TP
  3763. .I menuhot
  3764. Color of menu hotkeys
  3765. .TP
  3766. .I menusel
  3767. Color of active menu item (in focus)
  3768. .TP
  3769. .I menuhotsel
  3770. Color of menu hotkeys in focused menu item
  3771. .TP
  3772. .I menuinactive
  3773. Color of inactive menu
  3774. .PP
  3775. Section
  3776. .B [help]
  3777. describes the elements that are placed on help window.
  3778. .TP
  3779. .I _default_
  3780. Default color for this section. Used [core]._default_ if not specified
  3781. .TP
  3782. .I helpitalic
  3783. Color pair for element with
  3784. .B italic
  3785. attribute
  3786. .TP
  3787. .I helpbold
  3788. Color pair for element with
  3789. .B bold
  3790. attribute
  3791. .TP
  3792. .I helplink
  3793. Color of links
  3794. .TP
  3795. .I helpslink
  3796. Color of active link (on focus)
  3797. .PP
  3798. Section
  3799. .B [editor]
  3800. describes the colors of elements placed in editor.
  3801. .TP
  3802. .I _default_
  3803. Default color for this section. Used [core]._default_ if not specified
  3804. .TP
  3805. .I editbold
  3806. Color pair for element with
  3807. .B bold
  3808. attribute
  3809. .TP
  3810. .I editmarked
  3811. Color of selected text
  3812. .TP
  3813. .I editwhitespace
  3814. Color of tabs and trailing spaces highlighting
  3815. .TP
  3816. .I editlinestate
  3817. Color for line state area
  3818. .PP
  3819. Section
  3820. .B [viewer]
  3821. describes the colors of elements placed in viewer.
  3822. .TP
  3823. .I viewunderline
  3824. Color pair for element with
  3825. .B underline
  3826. attribute
  3827. .\"NODE " Skins colors"
  3828. .SH " Color pair definitions"
  3829. Any parameter in skin\-file contain definition of color pair.
  3830. .PP
  3831. Color pairs described as two colors and the optional attributes
  3832. separated by ';'. First field sets the foreground color, second
  3833. field sets background color, third field sets the attributes.
  3834. Any of the fields may be omitted, in this case value will be
  3835. taken from default color pair (global color pair or from default
  3836. color pair of this section).
  3837. .PP
  3838. Example:
  3839. .br
  3840. .nf
  3841. [core]
  3842. # green on black
  3843. _default_=green;black
  3844. # green (default) on blue
  3845. selected=;blue
  3846. # yellow on black (default)
  3847. # underlined yellow on black (default)
  3848. marked=yellow;;underline
  3849. .fi
  3850. .PP
  3851. Possible colors (names) and attributes are described in
  3852. .\"LINK2"
  3853. Colors\&.
  3854. .\"Colors"
  3855. section.
  3856. .\"NODE " Skins lines"
  3857. .SH " Draw lines"
  3858. Lines sets in section
  3859. .B [Lines]
  3860. into skin\-file. By default single lines are used, but you may redefine
  3861. to usage of any utf\-8 symbols (like to lines, for example).
  3862. .PP
  3863. .I WARNING!!!
  3864. When you build Midnight Commander with the Ncurses screen library
  3865. usage of drawing lines is limited!
  3866. Possible only drawing a single lines.
  3867. For all questions and comments please contact the developers of Ncurses.
  3868. .PP
  3869. Descriptions of parameters
  3870. .BR [Lines] :
  3871. .TP
  3872. .I lefttop
  3873. left\-top line fragment.
  3874. .TP
  3875. .I righttop
  3876. right\-top line fragment.
  3877. .TP
  3878. .I centertop
  3879. down branch of horizontal line
  3880. .TP
  3881. .I centerbottom
  3882. up branch of horizontal line
  3883. .TP
  3884. .I leftbottom
  3885. left\-bottom line fragment
  3886. .TP
  3887. .I rightbottom
  3888. right\-bottom line fragment
  3889. .TP
  3890. .I leftmiddle
  3891. right branch of vertical line
  3892. .TP
  3893. .I rightmiddle
  3894. left branch of vertical line
  3895. .TP
  3896. .I centermiddle
  3897. cross of lines
  3898. .TP
  3899. .I horiz
  3900. horizontal line
  3901. .TP
  3902. .I vert
  3903. vertical line
  3904. .TP
  3905. .I thinhoriz
  3906. thin horizontal line
  3907. .TP
  3908. .I thinvert
  3909. thin vertical line
  3910. .\"NODE " Skins oldcolors"
  3911. .SH " Compatibility"
  3912. Appointment of color by skin\-files fully compatible with
  3913. the appointment of the colors described in
  3914. .\"LINK2"
  3915. Colors\&.
  3916. .\"Colors"
  3917. section.
  3918. .PP
  3919. In this case, reassignment of colors has priority over the skin file and is
  3920. complementary.
  3921. .\"NODE "Filenames Highlight"
  3922. .SH "Filenames Highlight"
  3923. Section [filehighlight] in current skin\-file contains key names as
  3924. highlight groups and values as color pairs. Color pairs is documented
  3925. in
  3926. .\"LINK2"
  3927. Skins
  3928. .\"Skins"
  3929. section.
  3930. .PP
  3931. Rules of filenames highlight are placed in %prefix%/share/mc/filehighlight.ini file
  3932. (~/.config/mc/filehighlight.ini).
  3933. Name of section in this file must be equal to parameters names in
  3934. [filehighlight] section (in current skin\-file).
  3935. .PP
  3936. Keys in these groups are:
  3937. .TP
  3938. .I type
  3939. file type. If present, all other options are ignored.
  3940. .TP
  3941. .I regexp
  3942. regular expression. If present, 'extensions' option is ignored.
  3943. .TP
  3944. .I extensions
  3945. list of extensions of files. Separated by ';' sign.
  3946. .TP
  3947. .I extensions_case
  3948. (make sense only with 'extensions' parameter) make 'extensions'
  3949. rule case sentitive (true) or not (false).
  3950. .PP
  3951. `type' key may have values:
  3952. .nf
  3953. \- FILE (all files)
  3954. \- FILE_EXE
  3955. \- DIR (all directories)
  3956. \- LINK_DIR
  3957. \- LINK (all links except stale link)
  3958. \- HARDLINK
  3959. \- SYMLINK
  3960. \- STALE_LINK
  3961. \- DEVICE (all device files)
  3962. \- DEVICE_BLOCK
  3963. \- DEVICE_CHAR
  3964. \- SPECIAL (all special files)
  3965. \- SPECIAL_SOCKET
  3966. \- SPECIAL_FIFO
  3967. \- SPECIAL_DOOR
  3968. .fi
  3969. .PP
  3970. .\"NODE "Special Settings"
  3971. .SH "Special Settings"
  3972. Most of the Midnight Commander settings can be changed from the
  3973. menus. However, there are a small number of settings which can only be
  3974. changed by editing the setup file.
  3975. .PP
  3976. These variables may be set in your ~/.config/mc/ini file:
  3977. .TP
  3978. .I clear_before_exec
  3979. By default the Midnight Commander clears the screen before executing a
  3980. command. If you would prefer to see the output of the command at the
  3981. bottom of the screen, edit your ~/.config/mc/ini file and change the value of
  3982. the field clear_before_exec to 0.
  3983. .TP
  3984. .I confirm_view_dir
  3985. If you press F3 on a directory, normally MC enters that directory. If
  3986. this flag is set to 1, then MC will ask for confirmation before changing
  3987. the directory if you have files tagged.
  3988. .TP
  3989. .I ftpfs_retry_seconds
  3990. This value is the number of seconds the Midnight Commander will wait
  3991. before attempting to reconnect to an FTP server that has denied the
  3992. login. If the value is zero, the login will no be retried.
  3993. .TP
  3994. .I max_dirt_limit
  3995. Specifies how many screen updates can be skipped at most in the internal
  3996. file viewer. Normally this value is not significant, because the code
  3997. automatically adjusts the number of updates to skip according to the
  3998. rate of incoming keystrokes. However, on very slow machines or
  3999. terminals with a fast keyboard auto repeat, a big value can make screen
  4000. updates too jumpy.
  4001. .IP
  4002. It seems that setting max_dirt_limit to 10 causes the best behavior,
  4003. and that is the default value.
  4004. .TP
  4005. .I mouse_move_pages_viewer
  4006. Controls if scrolling with the mouse is done by pages or line by line
  4007. on the internal file viewer.
  4008. .TP
  4009. .I only_leading_plus_minus
  4010. Allow special treatment for '+', '\-', '*' in the command line (select,
  4011. unselect, reverse selection) only if the command line is empty. You
  4012. don't need to quote those characters in the middle of the command line.
  4013. On the other hand, you cannot use them to change selection when the
  4014. command line is not empty.
  4015. .TP
  4016. .I show_output_starts_shell
  4017. This variable only works if you are not using the subshell support.
  4018. When you use the C\-o keystroke to go back to the user screen, if this
  4019. one is set, you will get a fresh shell. Otherwise, pressing any key
  4020. will bring you back to the Midnight Commander.
  4021. .TP
  4022. .I timeformat_recent
  4023. Change the time format used to display dates less than 6 months from
  4024. now.
  4025. See strftime or date man page for the format specification. If this
  4026. option is absent, default timeformat is used.
  4027. .TP
  4028. .I timeformat_old
  4029. Change the time format used to display dates older than 6 months from
  4030. now or for dates in the future.
  4031. See strftime or date man page for the format specification. If this
  4032. option is absent, default timeformat is used.
  4033. .TP
  4034. .I torben_fj_mode
  4035. If this flag is set, then the home and end keys will work slightly
  4036. different on the panels, instead of moving the selection to the first
  4037. and last files in the panels, they will act as follows:
  4038. .IP
  4039. The home key will: Go up to the middle line, if below it; else go to the
  4040. top line unless it is already on the top line, in this case it will go
  4041. to the first file in the panel.
  4042. .IP
  4043. The end key has a similar behavior: Go down to the middle line, if over
  4044. it; else go to the bottom line unless you already are at the bottom
  4045. line, in such case it will move the selection to the last file name in
  4046. the panel.
  4047. .TP
  4048. .I use_file_to_guess_type
  4049. If this variable is on (the default) it will spawn the file command to
  4050. match the file types listed on the
  4051. .\"LINK2"
  4052. mc.ext file\&.
  4053. .\"Edit Extension File"
  4054. .TP
  4055. .I xtree_mode
  4056. If this variable is on (default is off) when you browse the file system
  4057. on a Tree panel, it will automatically reload the other panel with the
  4058. contents of the selected directory.
  4059. .TP
  4060. .I fish_directory_timeout
  4061. This variable holds the lifetime of a directory cache entry in seconds. The
  4062. default value is 900 seconds.
  4063. .TP
  4064. .I clipboard_store
  4065. This variable contains path (with options) to the external clipboard
  4066. utility like 'xclip' to read text into X selection from file.
  4067. For example:
  4068. .PP
  4069. .nf
  4070. clipboard_store=xclip \-i
  4071. .fi
  4072. .TP
  4073. .I clipboard_paste
  4074. This variable contains path (with options) to the external clipboard
  4075. utility like 'xclip' to print the selection to standard out.
  4076. For example:
  4077. .PP
  4078. .nf
  4079. clipboard_paste=xclip \-o
  4080. .fi
  4081. .TP
  4082. .I autodetect_codeset
  4083. This option allows use the `enca' command to autodetect codeset of text files
  4084. in internal viewer and editor. List of valid values can be obtain by the
  4085. `enca \-\-list languages | cut \-d : \-f1' command. Option must be located
  4086. in the [Misc] section.
  4087. .PP
  4088. For example:
  4089. .PP
  4090. .nf
  4091. autodetect_codeset=russian
  4092. .fi
  4093. .\"NODE "Parameters for external editor or viewer"
  4094. .SH "Parameters for external editor or viewer"
  4095. The Midnight Commander provides a way for specify an options for external editors
  4096. and viewers. The Midnight Commander tries to search the
  4097. "[External editor or viewer parameters]" section in the system initialization file
  4098. (the mc.lib file located in the Midnight Commander library directory)
  4099. and then in the ~/.config/mc/ini file. The option name should be equal to the name
  4100. (full pathname) of external editor or viewer. The option value can contain following
  4101. variables:
  4102. .TP
  4103. .I %filename
  4104. The filename to edit/view.
  4105. .TP
  4106. .I %lineno
  4107. The start line in the opening file.
  4108. .PP
  4109. For example:
  4110. .PP
  4111. .nf
  4112. [External editor or viewer parameters]
  4113. vi=%filename +%lineno
  4114. joe=%filename +%lineno
  4115. more=%filename +%lineno
  4116. .fi
  4117. .PP
  4118. Start line is passed to the external editor/viewer only if it is called from the
  4119. .\"LINK2"
  4120. Find file
  4121. .\"Find File"
  4122. results window.
  4123. .PP
  4124. If external editor/viewer is launched via F4/F3 keys, MC hopes that program
  4125. (at least "joe", but probably others too) has an own feature that by default
  4126. opens the file where it was last open. MC doesn't prevent external editor/viewer
  4127. to save and restore position in opened files.
  4128. .\"NODE "Terminal databases"
  4129. .SH "Terminal databases"
  4130. The Midnight Commander provides a way to fix your system terminal
  4131. database without requiring root privileges. The Midnight Commander
  4132. searches in the system initialization file (the mc.lib file located in
  4133. the Midnight Commander library directory) and in the
  4134. ~/.config/mc/ini file for the section
  4135. "terminal:your\-terminal\-name" and then for the section
  4136. "terminal:general", each line of the section contains a key symbol that
  4137. you want to define, followed by an equal sign and the definition for the
  4138. key. You can use the special \\e form to represent the escape character
  4139. and the ^x to represent the control\-x character.
  4140. .PP
  4141. The possible key symbols are:
  4142. .PP
  4143. .nf
  4144. f0 to f20 Function keys f0\-f20
  4145. bs backspace
  4146. home home key
  4147. end end key
  4148. up up arrow key
  4149. down down arrow key
  4150. left left arrow key
  4151. right right arrow key
  4152. pgdn page down key
  4153. pgup page up key
  4154. insert the insert character
  4155. delete the delete character
  4156. complete to do completion
  4157. .fi
  4158. .PP
  4159. For example, to define the key insert to be the Escape + [ + O + p, you
  4160. set this in the ini file:
  4161. .PP
  4162. .nf
  4163. insert=\\e[Op
  4164. .fi
  4165. .PP
  4166. Also now you can use
  4167. .I extended learn keys.
  4168. For example:
  4169. .nf
  4170. ctrl\-alt\-right=\\e[[1;6C
  4171. ctrl\-alt\-left=\\e[[1;6D
  4172. .fi
  4173. .PP
  4174. This means that ctrl+alt+left sends a \\e[[1;6D escape sequence
  4175. and therefore Midnight Commander interprets "\\e[[1;6D" as Ctrl\-Alt\-Left.
  4176. .PP
  4177. The
  4178. .I complete
  4179. key symbol represents the escape sequences used to invoke the completion
  4180. process, this is invoked with Alt\-tab, but you can define other keys to do
  4181. the same work (on those keyboard with tons of nice and unused keys
  4182. everywhere).
  4183. .SH ""
  4184. .\"NODE "FILES"
  4185. .SH "FILES"
  4186. Full paths below may vary between installations. They are also affected
  4187. by the
  4188. .BR MC_DATADIR
  4189. environment variable. If it's set, its value is used instead of
  4190. %prefix%/share/mc in the paths below.
  4191. .PP
  4192. .I %prefix%/share/mc/mc.hlp
  4193. .IP
  4194. The help file for the program.
  4195. .PP
  4196. .I %prefix%/share/mc/mc.ext
  4197. .IP
  4198. The default system\-wide extensions file.
  4199. .PP
  4200. .I ~/.config/mc/mc.ext
  4201. .IP
  4202. User's own extension, view configuration and edit configuration
  4203. file. They override the contents of the system wide files if present.
  4204. .PP
  4205. .I %prefix%/share/mc/mc.ini
  4206. .IP
  4207. The default system\-wide setup for the Midnight Commander, used only if
  4208. the user doesn't have his own ~/.config/mc/ini file.
  4209. .PP
  4210. .I %prefix%/share/mc/mc.lib
  4211. .IP
  4212. Global settings for the Midnight Commander. Settings in this file
  4213. affect all users, whether they have ~/.config/mc/ini or not. Currently, only
  4214. .\"LINK2"
  4215. terminal settings
  4216. .\"Terminal databases"
  4217. are loaded from mc.lib.
  4218. .PP
  4219. .I ~/.config/mc/ini
  4220. .IP
  4221. User's own setup. If this file is present then the setup is loaded
  4222. from here instead of the system\-wide startup file.
  4223. .PP
  4224. .I %prefix%/share/mc/mc.hint
  4225. .IP
  4226. This file contains the hints displayed by the program.
  4227. .PP
  4228. .I %prefix%/share/mc/mc.menu
  4229. .IP
  4230. This file contains the default system\-wide applications menu.
  4231. .PP
  4232. .I ~/.config/mc/menu
  4233. .IP
  4234. User's own application menu. If this file is present it is used instead
  4235. of the system\-wide applications menu.
  4236. .PP
  4237. .I ~/.cache/mc/Tree
  4238. .IP
  4239. The directory list for the directory tree and tree view features.
  4240. .PP
  4241. .I ~/.local/share/mc.menu
  4242. .IP
  4243. Local user\-defined menu. If this file is present, it is used instead of
  4244. the home or system\-wide applications menu.
  4245. .PP
  4246. To change default root directory of MC, you can use
  4247. .BR MC_HOME
  4248. environment variable. The value of MC_HOME must be an absolute path. If MC_HOME
  4249. is unset or empty, HOME variable is used. If HOME is unset or empty, MC
  4250. directories are get from GLib library.
  4251. .\"SKIP_SECTION"
  4252. .SH "LICENSE"
  4253. This program is distributed under the terms of the GNU General Public
  4254. License as published by the Free Software Foundation. See the built\-in
  4255. help for details on the License and the lack of warranty.
  4256. .\"NODE "AVAILABILITY"
  4257. .SH "AVAILABILITY"
  4258. The latest version of this program can be found at
  4259. http://ftp.midnight\-commander.org/.
  4260. .\"NODE "SEE ALSO"
  4261. .SH "SEE ALSO"
  4262. ed(1), gpm(1), terminfo(1), view(1), sh(1), bash(1),
  4263. tcsh(1), zsh(1).
  4264. .PP
  4265. .nf
  4266. The Midnight Commander page on the World Wide Web:
  4267. http://www.midnight\-commander.org/
  4268. .fi
  4269. .\"NODE "AUTHORS"
  4270. .SH "AUTHORS"
  4271. Authors and contributors are listed in the AUTHORS file in the source
  4272. distribution.
  4273. .\"NODE "BUGS"
  4274. .SH "BUGS"
  4275. See the file TODO in the distribution for information on what remains to
  4276. be done.
  4277. .PP
  4278. If you want to report a problem with the program, please create bugreport
  4279. at http://www.midnight\-commander.org/.
  4280. .PP
  4281. Provide a detailed description of the bug, the version of the program
  4282. you are running
  4283. .RI ( "mc \-V"
  4284. displays this information), the operating system you are running the
  4285. program on. If the program crashes, we would appreciate a stack trace.