gh-pages
sayanarijit 2 years ago
parent 6d1c8c5ba4
commit c39588ad4f

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 434 KiB

After

Width:  |  Height:  |  Size: 434 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,933 +0,0 @@
<!DOCTYPE HTML>
<html lang="en" class="sidebar-visible no-js light">
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Message - xplr book</title>
<!-- Custom HTML head -->
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="description" content="A hackable, minimal, fast TUI file explorer">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="favicon.svg">
<link rel="shortcut icon" href="favicon.png">
<link rel="stylesheet" href="css/variables.css">
<link rel="stylesheet" href="css/general.css">
<link rel="stylesheet" href="css/chrome.css">
<link rel="stylesheet" href="css/print.css" media="print">
<!-- Fonts -->
<link rel="stylesheet" href="FontAwesome/css/font-awesome.css">
<link rel="stylesheet" href="fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="highlight.css">
<link rel="stylesheet" href="tomorrow-night.css">
<link rel="stylesheet" href="ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<!-- Provide site root to javascript -->
<script type="text/javascript">
var path_to_root = "";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
}
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
}
} catch (e) { }
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
var html = document.querySelector('html');
html.classList.remove('no-js')
html.classList.remove('light')
html.classList.add(theme);
html.classList.add('js');
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
}
html.classList.remove('sidebar-visible');
html.classList.add("sidebar-" + sidebar);
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li class="chapter-item expanded "><a href="quickstart.html"><strong aria-hidden="true">2.</strong> Quickstart</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="install.html"><strong aria-hidden="true">2.1.</strong> Install</a></li><li class="chapter-item expanded "><a href="post-install.html"><strong aria-hidden="true">2.2.</strong> Post Install</a></li></ol></li><li class="chapter-item expanded "><a href="awesome-hacks.html"><strong aria-hidden="true">3.</strong> Awesome Hacks</a></li><li class="chapter-item expanded "><a href="configuration.html"><strong aria-hidden="true">4.</strong> Configuration</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="key-bindings.html"><strong aria-hidden="true">4.1.</strong> Key Bindings</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="configure-key-bindings.html"><strong aria-hidden="true">4.1.1.</strong> Configure Key Bindings</a></li><li class="chapter-item expanded "><a href="default-key-bindings.html"><strong aria-hidden="true">4.1.2.</strong> Default Key Bindings</a></li><li class="chapter-item expanded "><a href="debug-key-bindings.html"><strong aria-hidden="true">4.1.3.</strong> Debug Key Bindings</a></li></ol></li><li class="chapter-item expanded "><a href="general-config.html"><strong aria-hidden="true">4.2.</strong> General Config</a></li><li class="chapter-item expanded "><a href="modes.html"><strong aria-hidden="true">4.3.</strong> Modes</a></li><li class="chapter-item expanded "><a href="message.html" class="active"><strong aria-hidden="true">4.4.</strong> Message</a></li><li class="chapter-item expanded "><a href="layouts.html"><strong aria-hidden="true">4.5.</strong> Layouts</a></li><li class="chapter-item expanded "><a href="node_types.html"><strong aria-hidden="true">4.6.</strong> Node Types</a></li><li class="chapter-item expanded "><a href="borders.html"><strong aria-hidden="true">4.7.</strong> Borders</a></li><li class="chapter-item expanded "><a href="style.html"><strong aria-hidden="true">4.8.</strong> Style</a></li><li class="chapter-item expanded "><a href="sorting.html"><strong aria-hidden="true">4.9.</strong> Sorting</a></li><li class="chapter-item expanded "><a href="filtering.html"><strong aria-hidden="true">4.10.</strong> Filtering</a></li><li class="chapter-item expanded "><a href="column-renderer.html"><strong aria-hidden="true">4.11.</strong> Column Renderer</a></li></ol></li><li class="chapter-item expanded "><a href="plugin.html"><strong aria-hidden="true">5.</strong> Plugin</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="installing-plugins.html"><strong aria-hidden="true">5.1.</strong> Installing Plugins</a></li><li class="chapter-item expanded "><a href="writing-plugins.html"><strong aria-hidden="true">5.2.</strong> Writing Plugins</a></li><li class="chapter-item expanded "><a href="awesome-plugins.html"><strong aria-hidden="true">5.3.</strong> Awesome Plugins</a></li></ol></li><li class="chapter-item expanded "><a href="integration.html"><strong aria-hidden="true">6.</strong> Integration</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="awesome-integrations.html"><strong aria-hidden="true">6.1.</strong> Awesome Integrations</a></li></ol></li><li class="chapter-item expanded "><a href="todo.html"><strong aria-hidden="true">7.</strong> TODO</a></li><li class="chapter-item expanded "><a href="alternatives.html"><strong aria-hidden="true">8.</strong> Alternatives</a></li><li class="chapter-item expanded "><a href="upgrade-guide.html"><strong aria-hidden="true">9.</strong> Upgrade Guide</a></li><li class="chapter-item expanded "><a href="community.html"><strong aria-hidden="true">10.</strong> Community</a></li><li class="chapter-item expanded "><a href="contribute.html"><strong aria-hidden="true">11.</strong> Contribute</a></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">xplr book</h1>
<div class="right-buttons">
<a href="print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<a href="https://github.com/sayanarijit/xplr" title="Git repository" aria-label="Git repository">
<i id="git-repository-button" class="fa fa-github"></i>
</a>
<a href="https://github.com/sayanarijit/xplr/edit/main/docs/en/src/message.md" title="Suggest an edit" aria-label="Suggest an edit">
<i id="git-edit-button" class="fa fa-edit"></i>
</a>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
<ul id="searchresults">
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
});
</script>
<div id="content" class="content">
<main>
<h1 id="message"><a class="header" href="#message">Message</a></h1>
<p>You can think of xplr as a server. Just like web servers listen to HTTP
requests, xplr listens to <a href="#full-list-of-messages">messages</a>.</p>
<p>You can send these messages to an xplr session in the following ways:</p>
<ul>
<li>Via command-line (currently during start-up only, using <code>--on-load</code>)</li>
<li>Via <a href="key-bindings.html">key bindings</a></li>
<li>Via <a href="#lua-function-calls">Lua function calls</a></li>
<li>Via shell command using the <a href="#input-pipe">input pipe</a></li>
<li>Via socket (coming soon)</li>
</ul>
<h2 id="format"><a class="header" href="#format">Format</a></h2>
<p>To send messages using the <a href="key-bindings.html">key bindings</a> or
<a href="#lua-function-calls">Lua function calls</a>, messages are represented in
<a href="https://www.lua.org/">Lua</a> syntax. For example:</p>
<ul>
<li>&quot;Quit&quot;</li>
<li>{ FocusPath = &quot;/path/to/file&quot; }</li>
<li>{ Call = { command = &quot;bash&quot;, args = { &quot;-c&quot;, &quot;read -p test&quot; } } }</li>
</ul>
<p>However, to send messages using the <a href="#input-pipe">input pipe</a>, they need to be
represented using
<a href="http://yaml.org/">YAML</a> (or <a href="https://www.json.org">JSON</a>) syntax. For example:</p>
<ul>
<li>Quit</li>
<li>FocusPath: &quot;/path/to/file&quot;</li>
<li>Call: { command: bash, args: [&quot;-c&quot;, &quot;read -p test&quot;] }</li>
</ul>
<h2 id="full-list-of-messages"><a class="header" href="#full-list-of-messages">Full List of Messages</a></h2>
<h3 id="explorepwd"><a class="header" href="#explorepwd">&quot;ExplorePwd&quot;</a></h3>
<p><strong>YAML:</strong> <code>ExplorePwd</code></p>
<p>Explore the present working directory and register the filtered nodes.
This operation is expensive. So, try to avoid using it too often.</p>
<h3 id="explorepwdasync"><a class="header" href="#explorepwdasync">&quot;ExplorePwdAsync&quot;</a></h3>
<p><strong>YAML:</strong> <code>ExplorePwdAsync</code></p>
<p>Explore the present working directory and register the filtered nodes asynchronously.
This operation happens asynchronously. That means, the xplr directory buffers won't be updated
immediately. Hence, it needs to be used with care and probably with special checks in place.
To explore <code>$PWD</code> synchronously, use <code>ExplorePwd</code> instead.</p>
<h3 id="exploreparentsasync"><a class="header" href="#exploreparentsasync">&quot;ExploreParentsAsync&quot;</a></h3>
<p><strong>YAML:</strong> <code>ExploreParentsAsync</code></p>
<p>Explore the present working directory along with its parents and register the filtered nodes.
This operation happens asynchronously. That means, the xplr directory buffers won't be updated
immediately. Hence, it needs to be used with care and probably with special checks in place.
To explore just the <code>$PWD</code> synchronously, use <code>ExplorePwd</code> instead.</p>
<h3 id="refresh"><a class="header" href="#refresh">&quot;Refresh&quot;</a></h3>
<p><strong>YAML:</strong> <code>Refresh</code></p>
<p>Refresh the UI.
But it will not re-explore the directory if the working directory is the same.
If there is some change in the working directory and you want to re-explore it,
use the <code>Explore</code> message instead.
Also, it will not clear the screen. Use <code>ClearScreen</code> for that.</p>
<h3 id="clearscreen"><a class="header" href="#clearscreen">&quot;ClearScreen&quot;</a></h3>
<p><strong>YAML:</strong> <code>ClearScreen</code></p>
<p>Clears the screen.</p>
<h3 id="focusnext"><a class="header" href="#focusnext">&quot;FocusNext&quot;</a></h3>
<p><strong>YAML:</strong> <code>FocusNext</code></p>
<p>Focus next node.</p>
<h3 id="-focusnextbyrelativeindex--int-"><a class="header" href="#-focusnextbyrelativeindex--int-">{ FocusNextByRelativeIndex = int }</a></h3>
<p><strong>YAML:</strong> <code>FocusNextByRelativeIndex: int</code></p>
<p>Focus on the <code>n</code>th node relative to the current focus where <code>n</code> is a given value.</p>
<p><strong>YAML Example:</strong> <code>FocusNextByRelativeIndex: 2</code></p>
<p><strong>Lua Example:</strong> <code>{ FocusNextByRelativeIndex = 2 }</code></p>
<h3 id="focusnextbyrelativeindexfrominput"><a class="header" href="#focusnextbyrelativeindexfrominput">&quot;FocusNextByRelativeIndexFromInput&quot;</a></h3>
<p><strong>YAML:</strong> <code>FocusNextByRelativeIndexFromInput</code></p>
<p>Focus on the <code>n</code>th node relative to the current focus where <code>n</code> is read from
the input buffer.</p>
<h3 id="focusprevious"><a class="header" href="#focusprevious">&quot;FocusPrevious&quot;</a></h3>
<p><strong>YAML:</strong> <code>FocusPrevious</code></p>
<p>Focus on the previous item.</p>
<h3 id="-focuspreviousbyrelativeindex--int-"><a class="header" href="#-focuspreviousbyrelativeindex--int-">{ FocusPreviousByRelativeIndex = int }</a></h3>
<p><strong>YAML:</strong> <code>FocusPreviousByRelativeIndex: int</code></p>
<p>Focus on the <code>-n</code>th node relative to the current focus where <code>n</code> is a given value.</p>
<p><strong>YAML Example:</strong> <code>FocusPreviousByRelativeIndex: 2</code></p>
<p><strong>Lua Example:</strong> <code>{ FocusPreviousByRelativeIndex = 2 }</code></p>
<h3 id="focuspreviousbyrelativeindexfrominput"><a class="header" href="#focuspreviousbyrelativeindexfrominput">&quot;FocusPreviousByRelativeIndexFromInput&quot;</a></h3>
<p><strong>YAML:</strong> <code>FocusPreviousByRelativeIndexFromInput</code></p>
<p>Focus on the <code>-n</code>th node relative to the current focus where <code>n</code> is read from
the input buffer.</p>
<h3 id="focusfirst"><a class="header" href="#focusfirst">&quot;FocusFirst&quot;</a></h3>
<p><strong>YAML:</strong> <code>FocusFirst</code></p>
<p>Focus on the first node.</p>
<h3 id="focuslast"><a class="header" href="#focuslast">&quot;FocusLast&quot;</a></h3>
<p><strong>YAML:</strong> <code>FocusLast</code></p>
<p>Focus on the last node.</p>
<h3 id="-focuspath--string-"><a class="header" href="#-focuspath--string-">{ FocusPath = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>FocusPath: string</code></p>
<p>Focus on the given path.</p>
<p><strong>YAML Example:</strong> <code>FocusPath: /path/to/file</code></p>
<p><strong>Lua Example:</strong> <code>{ FocusPath = &quot;/path/to/file&quot; }</code></p>
<h3 id="focuspathfrominput"><a class="header" href="#focuspathfrominput">&quot;FocusPathFromInput&quot;</a></h3>
<p><strong>YAML:</strong> <code>FocusPathFromInput</code></p>
<p>Focus on the path read from input buffer.</p>
<h3 id="-focusbyindex--int-"><a class="header" href="#-focusbyindex--int-">{ FocusByIndex = int }</a></h3>
<p><strong>YAML:</strong> <code>FocusByIndex: int</code></p>
<p>Focus on the absolute <code>n</code>th node where <code>n</code> is a given value.</p>
<p><strong>YAML Example:</strong> <code>FocusByIndex: 2</code></p>
<p><strong>Lua Example:</strong> <code>{ FocusByIndex = 2 }</code></p>
<h3 id="focusbyindexfrominput"><a class="header" href="#focusbyindexfrominput">&quot;FocusByIndexFromInput&quot;</a></h3>
<p><strong>YAML:</strong> <code>FocusByIndexFromInput</code></p>
<p>Focus on the absolute <code>n</code>th node where <code>n</code> is read from the input buffer.</p>
<h3 id="-focusbyfilename--string-"><a class="header" href="#-focusbyfilename--string-">{ FocusByFileName = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>FocusByFileName: string</code></p>
<p>Focus on the file by name from the present working directory.</p>
<p><strong>YAML Example:</strong> <code>FocusByFileName: filename.ext</code></p>
<p><strong>Lua Example:</strong> <code>{ FocusByFileName = &quot;filename.ext&quot; }</code></p>
<h3 id="-changedirectory--string-"><a class="header" href="#-changedirectory--string-">{ ChangeDirectory = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>ChangeDirectory: string</code></p>
<p>Change the present working directory ($PWD)</p>
<p><strong>YAML Example:</strong> <code>ChangeDirectory: /path/to/directory</code></p>
<p><strong>Lua Example:</strong> <code>{ ChangeDirectory = &quot;/path/to/directory&quot; }</code></p>
<h3 id="enter"><a class="header" href="#enter">&quot;Enter&quot;</a></h3>
<p><strong>YAML:</strong> <code>Enter</code></p>
<p>Enter into the currently focused path if it's a directory.</p>
<h3 id="back"><a class="header" href="#back">&quot;Back&quot;</a></h3>
<p><strong>YAML:</strong> <code>Back</code></p>
<p>Go back to the parent directory.</p>
<h3 id="lastvisitedpath"><a class="header" href="#lastvisitedpath">&quot;LastVisitedPath&quot;</a></h3>
<p><strong>YAML:</strong> <code>LastVisitedPath</code></p>
<p>Go to the last path visited.</p>
<h3 id="nextvisitedpath"><a class="header" href="#nextvisitedpath">&quot;NextVisitedPath&quot;</a></h3>
<p><strong>YAML:</strong> <code>NextVisitedPath</code></p>
<p>Go to the next path visited.</p>
<h3 id="followsymlink"><a class="header" href="#followsymlink">&quot;FollowSymlink&quot;</a></h3>
<p><strong>YAML:</strong> <code>FollowSymlink</code></p>
<p>Follow the symlink under focus to its actual location.</p>
<h3 id="-updateinputbuffer--input-opertaion-"><a class="header" href="#-updateinputbuffer--input-opertaion-">{ UpdateInputBuffer = <a href="#inputoperation">Input Opertaion</a> }</a></h3>
<p><strong>YAML:</strong> <code>BufferInput: Input Operation</code></p>
<p>Update the input buffer using cursor based operations.</p>
<p><strong>YAML Example:</strong> <code>UpdateInputBuffer: GoToPreviousWord</code></p>
<p><strong>Lua Example:</strong> <code>{ UpdateInputBuffer = &quot;GoToPreviousWord&quot; }</code></p>
<h3 id="updateinputbufferfromkey"><a class="header" href="#updateinputbufferfromkey">&quot;UpdateInputBufferFromKey&quot;</a></h3>
<p><strong>YAML:</strong> <code>UpdateInputBufferFromKey</code></p>
<p>Update the input buffer from the key read from keyboard input.</p>
<h3 id="-bufferinput--string-"><a class="header" href="#-bufferinput--string-">{ BufferInput = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>BufferInput: string</code></p>
<p>Append/buffer the given string into the input buffer.</p>
<p><strong>YAML Example:</strong> <code>BufferInput: foo</code></p>
<p><strong>Lua Example:</strong> <code>{ BufferInput = &quot;foo&quot; }</code></p>
<h3 id="bufferinputfromkey"><a class="header" href="#bufferinputfromkey">&quot;BufferInputFromKey&quot;</a></h3>
<p><strong>YAML:</strong> <code>BufferInputFromKey</code></p>
<p>Append/buffer the characted read from a keyboard input into the
input buffer.</p>
<h3 id="-setinputbuffer--string-"><a class="header" href="#-setinputbuffer--string-">{ SetInputBuffer = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>SetInputBuffer: string</code></p>
<p>Set/rewrite the input buffer with the given string.
When the input buffer is not-null (even if empty string)
it will show in the UI.</p>
<p><strong>YAML Example:</strong> <code>SetInputBuffer: foo</code></p>
<p><strong>Lua Example:</strong> <code>{ SetInputBuffer = &quot;foo&quot; }</code></p>
<h3 id="removeinputbufferlastcharacter"><a class="header" href="#removeinputbufferlastcharacter">&quot;RemoveInputBufferLastCharacter&quot;</a></h3>
<p><strong>YAML:</strong> <code>RemoveInputBufferLastCharacter</code></p>
<p>Remove input buffer's last character.</p>
<h3 id="removeinputbufferlastword"><a class="header" href="#removeinputbufferlastword">&quot;RemoveInputBufferLastWord&quot;</a></h3>
<p><strong>YAML:</strong> <code>RemoveInputBufferLastWord</code></p>
<p>Remove input buffer's last word.</p>
<h3 id="resetinputbuffer"><a class="header" href="#resetinputbuffer">&quot;ResetInputBuffer&quot;</a></h3>
<p><strong>YAML:</strong> <code>ResetInputBuffer</code></p>
<p>Reset the input buffer back to null. It will not show in the UI.</p>
<h3 id="-switchmode--string-"><a class="header" href="#-switchmode--string-">{ SwitchMode = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>SwitchMode: string</code></p>
<p>Switch input <a href="modes.html#mode">mode</a>.
It clears the input buffer.</p>
<blockquote>
<p><strong>NOTE:</strong> To be specific about which mode to switch to, use <code>SwitchModeBuiltin</code> or
<code>SwitchModeCustom</code> instead.</p>
</blockquote>
<p><strong>YAML Example:</strong> <code>SwitchMode: default</code></p>
<p><strong>Lua Example:</strong> <code>{ SwitchMode = &quot;default&quot; }</code></p>
<h3 id="-switchmodekeepinginputbuffer--string-"><a class="header" href="#-switchmodekeepinginputbuffer--string-">{ SwitchModeKeepingInputBuffer = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>SwitchModeKeepingInputBuffer: string</code></p>
<p>Switch input <a href="modes.html#mode">mode</a>.
It keeps the input buffer.</p>
<blockquote>
<p><strong>NOTE:</strong> To be specific about which mode to switch to, use
<code>SwitchModeBuiltinKeepingInputBuffer</code> or
<code>SwitchModeCustomKeepingInputBuffer</code> instead.</p>
</blockquote>
<p><strong>YAML Example:</strong> <code>SwitchModeKeepingInputBuffer: default</code></p>
<p><strong>Lua Example:</strong> <code>{ SwitchModeKeepingInputBuffer = &quot;default&quot; }</code></p>
<h3 id="-switchmodebuiltin--string-"><a class="header" href="#-switchmodebuiltin--string-">{ SwitchModeBuiltin = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>SwitchModeBuiltin: string</code></p>
<p>Switch to a <a href="modes.html#builtin">builtin mode</a>.
It clears the input buffer.</p>
<p><strong>YAML Example:</strong> <code>SwitchModeBuiltin: default</code></p>
<p><strong>Lua Example:</strong> <code>{ SwitchModeBuiltin = &quot;default&quot; }</code></p>
<h3 id="-switchmodebuiltinkeepinginputbuffer--string-"><a class="header" href="#-switchmodebuiltinkeepinginputbuffer--string-">{ SwitchModeBuiltinKeepingInputBuffer = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>SwitchModeBuiltinKeepingInputBuffer: string</code></p>
<p>Switch to a <a href="modes.html#builtin">builtin mode</a>.
It keeps the input buffer.</p>
<p><strong>YAML Example:</strong> <code>SwitchModeBuiltinKeepingInputBuffer: default</code></p>
<p><strong>Lua Example:</strong> <code>{ SwitchModeBuiltinKeepingInputBuffer = &quot;default&quot; }</code></p>
<h3 id="-switchmodecustom--string-"><a class="header" href="#-switchmodecustom--string-">{ SwitchModeCustom = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>SwitchModeCustom: string</code></p>
<p>Switch to a <a href="modes.html#custom">custom mode</a>.
It clears the input buffer.</p>
<p><strong>YAML Example:</strong> <code>SwitchModeCustom: my_custom_mode</code></p>
<p><strong>Lua Example:</strong> <code>{ SwitchModeCustom = &quot;my_custom_mode&quot; }</code></p>
<h3 id="-switchmodecustomkeepinginputbuffer--string-"><a class="header" href="#-switchmodecustomkeepinginputbuffer--string-">{ SwitchModeCustomKeepingInputBuffer = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>SwitchModeCustom: string</code></p>
<p>Switch to a <a href="modes.html#custom">custom mode</a>.
It keeps the input buffer.</p>
<p><strong>YAML Example:</strong> <code>SwitchModeCustomKeepingInputBuffer: my_custom_mode</code></p>
<p><strong>Lua Example:</strong> <code>{ SwitchModeCustomKeepingInputBuffer = &quot;my_custom_mode&quot; }</code></p>
<h3 id="popmode"><a class="header" href="#popmode">&quot;PopMode&quot;</a></h3>
<p><strong>YAML:</strong> <code>PopMode</code></p>
<p>Pop the last mode from the history and switch to it.
It clears the input buffer.</p>
<h3 id="popmodekeepinginputbuffer"><a class="header" href="#popmodekeepinginputbuffer">PopModeKeepingInputBuffer</a></h3>
<p><strong>YAML:</strong> <code>PopModeKeepingInputBuffer</code></p>
<p>Pop the last mode from the history and switch to it.
It keeps the input buffer.</p>
<h3 id="-switchlayout--string-"><a class="header" href="#-switchlayout--string-">{ SwitchLayout = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>SwitchLayout: string</code></p>
<p>Switch <a href="layouts.html#layout">layout</a>.</p>
<blockquote>
<p><strong>NOTE:</strong> To be specific about which layout to switch to, use <code>SwitchLayoutBuiltin</code> or
<code>SwitchLayoutCustom</code> instead.</p>
</blockquote>
<p><strong>YAML Example:</strong> <code>SwitchLayout: default</code></p>
<p><strong>Lua Example:</strong> <code>{ SwitchLayout = &quot;default&quot; }</code></p>
<h3 id="-switchlayoutbuiltin--string-"><a class="header" href="#-switchlayoutbuiltin--string-">{ SwitchLayoutBuiltin = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>SwitchLayoutBuiltin: string</code></p>
<p>Switch to a <a href="layouts.html#builtin">builtin layout</a>.</p>
<p><strong>YAML Example:</strong> <code>SwitchLayoutBuiltin: default</code></p>
<p><strong>Lua Example:</strong> <code>{ SwitchLayoutBuiltin = &quot;default&quot; }</code></p>
<h3 id="-switchlayoutcustom--string-"><a class="header" href="#-switchlayoutcustom--string-">{ SwitchLayoutCustom = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>SwitchLayoutCustom: string</code></p>
<p>Switch to a <a href="layouts.html#custom">custom layout</a>.</p>
<p><strong>YAML Example:</strong> <code>SwitchLayoutCustom: my_custom_layout</code></p>
<p><strong>Lua Example:</strong> <code>{ SwitchLayoutCustom = &quot;my_custom_layout&quot; }</code></p>
<h3 id="-call--string-"><a class="header" href="#-call--string-">{ Call = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>Call: string</code></p>
<p>Call a shell command with the given arguments.
Note that the arguments will be shell-escaped.
So to read the variables, the <code>-c</code> option of the shell
can be used.
You may need to pass <code>ExplorePwd</code> depening on the expectation.</p>
<p><strong>YAML Example:</strong> <code>Call: { command: bash, args: [&quot;-c&quot;, &quot;read -p test&quot;] }</code></p>
<p><strong>Lua Example:</strong> <code>{ Call = { command = &quot;bash&quot;, args = { &quot;-c&quot;, &quot;read -p test&quot; } } }</code></p>
<h3 id="-callsilently--string-"><a class="header" href="#-callsilently--string-">{ CallSilently = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>CallSilently: string</code></p>
<p>Like <code>Call</code> but without the flicker. The stdin, stdout
stderr will be piped to null. So it's non-interactive.</p>
<p><strong>YAML Example:</strong> <code>CallSilently: { command: tput, args: [&quot;bell&quot;] }</code></p>
<p><strong>Lua Example:</strong> <code>{ CallSilently = { command = &quot;tput&quot;, args = { &quot;bell&quot; } } }</code></p>
<h3 id="-bashexec--string-"><a class="header" href="#-bashexec--string-">{ BashExec = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>BashExec: string</code></p>
<p>An alias to <code>Call: {command: bash, args: [&quot;-c&quot;, &quot;{string}&quot;], silent: false}</code>
where <code>{string}</code> is the given value.</p>
<p><strong>YAML Example:</strong> <code>BashExec: &quot;read -p test&quot;</code></p>
<p><strong>Lua Example:</strong> <code>{ BashExec = &quot;read -p test&quot; }</code></p>
<h3 id="-bashexecsilently--string-"><a class="header" href="#-bashexecsilently--string-">{ BashExecSilently = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>BashExecSilently(String)</code></p>
<p>Like <code>BashExec</code> but without the flicker. The stdin, stdout
stderr will be piped to null. So it's non-interactive.</p>
<p><strong>YAML Example:</strong> <code>BashExecSilently: &quot;tput bell&quot;</code></p>
<p><strong>Lua Example:</strong> <code>{ BashExecSilently = &quot;tput bell&quot; }</code></p>
<h3 id="-calllua--string-"><a class="header" href="#-calllua--string-">{ CallLua = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>CallLua: string</code></p>
<p>Call a Lua function.</p>
<p>A <a href="#lua-context">Lua Context</a> object will be passed to the <a href="#lua-function-calls">function</a> as argument.
The function can optionally return a list of messages for xplr to handle
after the executing the function.</p>
<p><strong>YAML Example:</strong> <code>CallLua: custom.some_custom_funtion</code></p>
<p><strong>Lua Example:</strong> <code>{ CallLua = &quot;custom.some_custom_funtion&quot; }</code></p>
<h3 id="-callluasilently--string-"><a class="header" href="#-callluasilently--string-">{ CallLuaSilently = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>CallLuaSilently: string</code></p>
<p>Like <code>CallLua</code> but without the flicker. The stdin, stdout
stderr will be piped to null. So it's non-interactive.</p>
<p><strong>YAML Example:</strong> <code>CallLuaSilently: custom.some_custom_function</code></p>
<p><strong>Lua Example:</strong> <code>{ CallLuaSilently = &quot;custom.some_custom_function&quot; }</code></p>
<h3 id="-luaeval--string-"><a class="header" href="#-luaeval--string-">{ LuaEval = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>LuaEval: string</code></p>
<p>Execute Lua code without needing to define a function.</p>
<p>If the <code>string</code> is a callable, xplr will try to call it with with the
<a href="#lua-context">Lua Context</a> argument.</p>
<p><strong>YAML Example:</strong> <code>LuaEval: &quot;return { { LogInfo = io.read() } }&quot;</code>
<strong>YAML Example:</strong> <code>LuaEval: &quot;function(app) return { { LogInfo = app.pwd } } end&quot;</code></p>
<p><strong>Lua Example:</strong> <code>{ LuaEval = [[return { { LogInfo = io.read() } }]] }</code>
<strong>Lua Example:</strong> <code>{ LuaEval = [[function(app) return { { LogInfo = app.pwd } } end]] }</code></p>
<h3 id="-luaevalsilently--string-"><a class="header" href="#-luaevalsilently--string-">{ LuaEvalSilently = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>LuaEvalSilently: string</code></p>
<p>Like <code>LuaEval</code> but without the flicker. The stdin, stdout
stderr will be piped to null. So it's non-interactive.</p>
<p><strong>YAML Example:</strong> <code>LuaEvalSilently: &quot;return { { LogInfo = 'foo' } }&quot;</code></p>
<p><strong>Lua Example:</strong> <code>{ LuaEvalSilently = [[return { { LogInfo = &quot;foo&quot; } }]] }</code></p>
<h3 id="select"><a class="header" href="#select">&quot;Select&quot;</a></h3>
<p><strong>YAML:</strong> <code>Select</code></p>
<p>Select the focused node.</p>
<h3 id="selectall"><a class="header" href="#selectall">&quot;SelectAll&quot;</a></h3>
<p><strong>YAML:</strong> <code>SelectAll</code></p>
<p>Select all the visible nodes.</p>
<h3 id="-selectpath--string-"><a class="header" href="#-selectpath--string-">{ SelectPath = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>SelectPath: string</code></p>
<p>Select the given path.</p>
<p><strong>YAML Example:</strong> <code>SelectPath: /path/to/file</code></p>
<p><strong>Lua Example:</strong> <code>{ SelectPath = &quot;/path/to/file&quot; }</code></p>
<h3 id="unselect"><a class="header" href="#unselect">&quot;UnSelect&quot;</a></h3>
<p><strong>YAML:</strong> <code>UnSelect</code></p>
<p>Unselect the focused node.</p>
<h3 id="unselectall"><a class="header" href="#unselectall">&quot;UnSelectAll&quot;</a></h3>
<p><strong>YAML:</strong> <code>UnSelectAll</code></p>
<p>Unselect all the visible nodes.</p>
<h3 id="-unselectpath--string-"><a class="header" href="#-unselectpath--string-">{ UnSelectPath = &quot;string)&quot; }</a></h3>
<p><strong>YAML:</strong> <code>UnSelectPath: string</code></p>
<p>UnSelect the given path.</p>
<p><strong>YAML Example:</strong> <code>UnSelectPath: /path/to/file</code></p>
<p><strong>Lua Example:</strong> <code>{ UnSelectPath = &quot;/path/to/file&quot; }</code></p>
<h3 id="toggleselection"><a class="header" href="#toggleselection">&quot;ToggleSelection&quot;</a></h3>
<p><strong>YAML:</strong> <code>ToggleSelection</code></p>
<p>Toggle selection on the focused node.</p>
<h3 id="toggleselectall"><a class="header" href="#toggleselectall">&quot;ToggleSelectAll&quot;</a></h3>
<p><strong>YAML:</strong> <code>ToggleSelectAll</code></p>
<p>Toggle between select all and unselect all.</p>
<h3 id="-toggleselectionbypath--string-"><a class="header" href="#-toggleselectionbypath--string-">{ ToggleSelectionByPath = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>ToggleSelectionByPath: string</code></p>
<p>Toggle selection by file path.</p>
<p><strong>YAML Example:</strong> <code>ToggleSelectionByPath: /path/to/file</code></p>
<p><strong>Lua Example:</strong> <code>{ ToggleSelectionByPath = &quot;/path/to/file&quot; }</code></p>
<h3 id="clearselection"><a class="header" href="#clearselection">&quot;ClearSelection&quot;</a></h3>
<p><strong>YAML:</strong> <code>ClearSelection</code></p>
<p>Clear the selection.</p>
<h3 id="-addnodefilter---filter--filter-input--string-"><a class="header" href="#-addnodefilter---filter--filter-input--string-">{ AddNodeFilter = { filter = <a href="filtering.html#filter">Filter</a>, input = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>AddNodeFilter: { filter = Filter, input = string }</code></p>
<p>Add a <a href="filtering.html">filter</a> to exclude nodes while exploring directories.</p>
<p><strong>YAML Example:</strong> <code>AddNodeFilter: { filter: RelativePathDoesStartWith, input: foo }</code></p>
<p><strong>Lua Example:</strong> <code>{ AddNodeFilter = { filter = &quot;RelativePathDoesStartWith&quot;, input = &quot;foo&quot; } }</code></p>
<h3 id="-removenodefilter---filter--filter-input--string-"><a class="header" href="#-removenodefilter---filter--filter-input--string-">{ RemoveNodeFilter = { filter = <a href="filtering.html#filter">Filter</a>, input = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>RemoveNodeFilter: { filter = Filter, input = string</code></p>
<p>Remove an existing <a href="filtering.html">filter</a>.</p>
<p><strong>YAML Example:</strong> <code>RemoveNodeFilter: { filter: RelativePathDoesStartWith, input: foo }</code></p>
<p><strong>Lua Example:</strong> <code>{ RemoveNodeFilter: { filter: &quot;RelativePathDoesStartWith&quot;, input: &quot;foo&quot; } }</code></p>
<h3 id="-togglenodefilter---filter--filter-input--string-"><a class="header" href="#-togglenodefilter---filter--filter-input--string-">{ ToggleNodeFilter = { filter = <a href="filtering.html#filter">Filter</a>, input = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>ToggleNodeFilter: { filter = Filter, input = string }</code></p>
<p>Remove a <a href="filtering.html">filter</a> if it exists, else, add a it.</p>
<p><strong>YAML Example:</strong> <code>ToggleNodeFilter: { filter: RelativePathDoesStartWith, input: foo }</code></p>
<p><strong>Lua Example:</strong> <code>{ ToggleNodeFilter = { filter = &quot;RelativePathDoesStartWith&quot;, input = &quot;foo&quot; } }</code></p>
<h3 id="-addnodefilterfrominput--filter-"><a class="header" href="#-addnodefilterfrominput--filter-">{ AddNodeFilterFromInput = <a href="filtering.html#filter">Filter</a> }</a></h3>
<p><strong>YAML:</strong> <code>AddNodeFilterFromInput: Filter</code></p>
<p>Add a node <a href="filtering.html">filter</a> reading the input from the buffer.</p>
<p><strong>YAML Example:</strong> <code>AddNodeFilterFromInput: RelativePathDoesStartWith</code></p>
<p><strong>Lua Example:</strong> <code>{ AddNodeFilterFromInput = &quot;RelativePathDoesStartWith&quot; }</code></p>
<h3 id="-removenodefilterfrominput--filter-"><a class="header" href="#-removenodefilterfrominput--filter-">{ RemoveNodeFilterFromInput = <a href="filtering.html#filter">Filter</a> }</a></h3>
<p><strong>YAML:</strong> <code>RemoveNodeFilterFromInput: Filter</code></p>
<p>Remove a node <a href="filtering.html">filter</a> reading the input from the buffer.</p>
<p><strong>YAML Example:</strong> <code>RemoveNodeFilterFromInput: RelativePathDoesStartWith</code></p>
<p><strong>Lua Example:</strong> <code>{ RemoveNodeFilterFromInput = &quot;RelativePathDoesStartWith&quot; }</code></p>
<h3 id="removelastnodefilter"><a class="header" href="#removelastnodefilter">&quot;RemoveLastNodeFilter&quot;</a></h3>
<p><strong>YAML:</strong> <code>RemoveLastNodeFilter</code></p>
<p>Remove the last node <a href="filtering.html">filter</a>.</p>
<h3 id="resetnodefilters"><a class="header" href="#resetnodefilters">&quot;ResetNodeFilters&quot;</a></h3>
<p><strong>YAML:</strong> <code>ResetNodeFilters</code></p>
<p>Reset the node <a href="filtering.html">filters</a> back to the default configuration.</p>
<h3 id="clearnodefilters"><a class="header" href="#clearnodefilters">&quot;ClearNodeFilters&quot;</a></h3>
<p><strong>YAML:</strong> <code>ClearNodeFilters</code></p>
<p>Clear all the node <a href="filtering.html">filters</a>.</p>
<h3 id="-addnodesorter---sorter--sorter-reverse--bool--"><a class="header" href="#-addnodesorter---sorter--sorter-reverse--bool--">{ AddNodeSorter = { sorter = <a href="sorting.html#sorter">Sorter</a>, reverse = bool } }</a></h3>
<p><strong>YAML:</strong> <code>AddNodeSorter: { sorter: Sorter, reverse = bool }</code></p>
<p>Add a <a href="sorting.html#sorter">sorter</a> to sort nodes while exploring directories.</p>
<p><strong>YAML Example:</strong> <code>AddNodeSorter: { sorter: ByRelativePath, reverse: false }</code></p>
<p><strong>YAML Example:</strong> <code>{ AddNodeSorter = { sorter = &quot;ByRelativePath&quot;, reverse = false } }</code></p>
<h3 id="-removenodesorter--sorter-"><a class="header" href="#-removenodesorter--sorter-">{ RemoveNodeSorter = <a href="sorting.html#sorter">Sorter</a> }</a></h3>
<p><strong>YAML:</strong> <code>RemoveNodeSorter: Sorter</code></p>
<p>Remove an existing <a href="sorting.html#sorter">sorter</a>.</p>
<p><strong>YAML Example:</strong> <code>RemoveNodeSorter: ByRelativePath</code></p>
<p><strong>Lua Example:</strong> <code>{ RemoveNodeSorter = &quot;ByRelativePath&quot; }</code></p>
<h3 id="-reversenodesorter--sorter-"><a class="header" href="#-reversenodesorter--sorter-">{ ReverseNodeSorter = <a href="sorting.html#sorter">Sorter</a> }</a></h3>
<p><strong>YAML:</strong> <code>ReverseNodeSorter: Sorter</code></p>
<p>Reverse a node <a href="sorting.html#sorter">sorter</a>.</p>
<p><strong>YAML Example:</strong> <code>ReverseNodeSorter: ByRelativePath</code></p>
<p><strong>Lua Example:</strong> <code>{ ReverseNodeSorter = &quot;ByRelativePath&quot; }</code></p>
<h3 id="-togglenodesorter---sorter--sorter-reverse--bool--"><a class="header" href="#-togglenodesorter---sorter--sorter-reverse--bool--">{ ToggleNodeSorter = { sorter = <a href="sorting.html#sorter">Sorter</a>, reverse = bool } }</a></h3>
<p><strong>YAML:</strong> <code>ToggleNodeSorter: { sorter: Sorter, reverse = bool }</code></p>
<p>Remove a <a href="sorting.html#sorter">sorter</a> if it exists, else, add a it.</p>
<p><strong>YAML Example:</strong> <code>ToggleSorterSorter: {sorter: ByRelativePath, reverse: false }</code></p>
<p><strong>Lua Example:</strong> <code>{ ToggleSorterSorter: { sorter = &quot;ByRelativePath&quot;, reverse = false } }</code></p>
<h3 id="reversenodesorters"><a class="header" href="#reversenodesorters">&quot;ReverseNodeSorters&quot;</a></h3>
<p><strong>YAML:</strong> <code>ReverseNodeSorters</code></p>
<p>Reverse the node <a href="sorting.html#sorter">sorters</a>.</p>
<h3 id="removelastnodesorter"><a class="header" href="#removelastnodesorter">&quot;RemoveLastNodeSorter&quot;</a></h3>
<p><strong>YAML:</strong> <code>RemoveLastNodeSorter</code></p>
<p>Remove the last node <a href="sorting.html#sorter">sorter</a>.</p>
<h3 id="resetnodesorters"><a class="header" href="#resetnodesorters">&quot;ResetNodeSorters&quot;</a></h3>
<p><strong>YAML:</strong> <code>ResetNodeSorters</code></p>
<p>Reset the node <a href="sorting.html#sorter">sorters</a> back to the default configuration.</p>
<h3 id="clearnodesorters"><a class="header" href="#clearnodesorters">&quot;ClearNodeSorters&quot;</a></h3>
<p><strong>YAML:</strong> <code>ClearNodeSorters</code></p>
<p>Clear all the node <a href="sorting.html#sorter">sorters</a>.</p>
<h3 id="enablemouse"><a class="header" href="#enablemouse">&quot;EnableMouse&quot;</a></h3>
<p><strong>YAML:</strong> <code>EnableMouse</code></p>
<p>Enable mouse</p>
<h3 id="disablemouse"><a class="header" href="#disablemouse">&quot;DisableMouse&quot;</a></h3>
<p><strong>YAML:</strong> <code>DisableMouse</code></p>
<p>Disable mouse</p>
<h3 id="togglemouse"><a class="header" href="#togglemouse">&quot;ToggleMouse&quot;</a></h3>
<p><strong>YAML:</strong> <code>ToggleMouse</code></p>
<p>Toggle mouse</p>
<h3 id="-startfifo--string-"><a class="header" href="#-startfifo--string-">{ StartFifo = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>StartFifo: string</code></p>
<p>Start piping the focused path to the given fifo path</p>
<p><strong>YAML Example:</strong> <code>StartFifo: /tmp/xplr.fifo</code></p>
<p><strong>Lua Example:</strong> <code>{ StartFifo = &quot;/tmp/xplr.fifo }</code></p>
<h3 id="stopfifo"><a class="header" href="#stopfifo">&quot;StopFifo&quot;</a></h3>
<p><strong>YAML:</strong> <code>StopFifo</code></p>
<p>Close the active fifo and stop piping.</p>
<h3 id="-togglefifo--string-"><a class="header" href="#-togglefifo--string-">{ ToggleFifo = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>ToggleFifo: string</code></p>
<p>Toggle betwen {Start|Stop}Fifo</p>
<p><strong>YAML Example:</strong> <code>ToggleFifo: /path/to/fifo</code></p>
<p><strong>Lua Example:</strong> <code>{ ToggleFifo = &quot;/path/to/fifo&quot; }</code></p>
<h3 id="-loginfo--string-"><a class="header" href="#-loginfo--string-">{ LogInfo = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>LogInfo: string</code></p>
<p>Log information message.</p>
<p><strong>YAML Example:</strong> <code>LogInfo: launching satellite</code></p>
<p><strong>Lua Example:</strong> <code>{ LogInfo = &quot;launching satellite&quot; }</code></p>
<h3 id="-logsuccess--string-"><a class="header" href="#-logsuccess--string-">{ LogSuccess = &quot;String&quot; }</a></h3>
<p><strong>YAML:</strong> <code>LogSuccess: string</code></p>
<p>Log a success message.</p>
<p><strong>YAML Example:</strong> <code>LogSuccess: satellite reached destination</code>.</p>
<p><strong>Lua Example:</strong> <code>{ LogSuccess = &quot;satellite reached destination&quot; }</code>.</p>
<h3 id="-logwarning--string-"><a class="header" href="#-logwarning--string-">{ LogWarning = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>LogWarning: string</code></p>
<p>Log an warning message.</p>
<p><strong>YAML Example:</strong> <code>LogWarning: satellite is heating</code></p>
<p><strong>Lua Example:</strong> <code>{ LogWarning = &quot;satellite is heating&quot; }</code></p>
<h3 id="-logerror--string-"><a class="header" href="#-logerror--string-">{ LogError = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>LogError: string</code></p>
<p>Log an error message.</p>
<p><strong>YAML Example:</strong> <code>LogError: satellite crashed</code></p>
<p><strong>Lua Example:</strong> <code>{ LogError = &quot;satellite crashed&quot; }</code></p>
<h3 id="quit"><a class="header" href="#quit">&quot;Quit&quot;</a></h3>
<p><strong>YAML:</strong> <code>Quit</code></p>
<p>Quit with returncode zero (success).</p>
<h3 id="printpwdandquit"><a class="header" href="#printpwdandquit">&quot;PrintPwdAndQuit&quot;</a></h3>
<p><strong>YAML:</strong> <code>PrintPwdAndQuit</code></p>
<p>Print $PWD and quit.</p>
<h3 id="printfocuspathandquit"><a class="header" href="#printfocuspathandquit">&quot;PrintFocusPathAndQuit&quot;</a></h3>
<p><strong>YAML:</strong> <code>PrintFocusPathAndQuit</code></p>
<p>Print the path under focus and quit. It can be empty string if there's nothing to focus.</p>
<h3 id="printselectionandquit"><a class="header" href="#printselectionandquit">&quot;PrintSelectionAndQuit&quot;</a></h3>
<p><strong>YAML:</strong> <code>PrintSelectionAndQuit</code></p>
<p>Print the selected paths and quit. It can be empty is no path is selected.</p>
<h3 id="printresultandquit"><a class="header" href="#printresultandquit">&quot;PrintResultAndQuit&quot;</a></h3>
<p><strong>YAML:</strong> <code>PrintResultAndQuit</code></p>
<p>Print the selected paths if it's not empty, else, print the focused node's path.</p>
<h3 id="printappstateandquit"><a class="header" href="#printappstateandquit">&quot;PrintAppStateAndQuit&quot;</a></h3>
<p><strong>YAML:</strong> <code>PrintAppStateAndQuit</code></p>
<p>Print the state of application in YAML format. Helpful for debugging or generating
the default configuration file.</p>
<h3 id="-debug--string-"><a class="header" href="#-debug--string-">{ Debug = &quot;string&quot; }</a></h3>
<p><strong>YAML:</strong> <code>Debug: string</code></p>
<p>Write the application state to a file, without quitting. Also helpful for debugging.</p>
<p><strong>YAML Example:</strong> <code>Debug: /path/to/file</code></p>
<p><strong>Lua Example:</strong> <code>{ Debug = &quot;/path/to/file&quot; }</code></p>
<h3 id="terminate"><a class="header" href="#terminate">&quot;Terminate&quot;</a></h3>
<p><strong>YAML:</strong> <code>Terminate</code></p>
<p>Terminate the application with a non-zero return code.</p>
<h2 id="inputoperation"><a class="header" href="#inputoperation">InputOperation</a></h2>
<p>Cursor based input operation can be one of the following:</p>
<ul>
<li>{ SetCursor = int }</li>
<li>{ InsertCharacter = str }</li>
<li>&quot;GoToPreviousCharacter&quot;</li>
<li>&quot;GoToNextCharacter&quot;</li>
<li>&quot;GoToPreviousWord&quot;</li>
<li>&quot;GoToNextWord&quot;</li>
<li>&quot;GoToStart&quot;</li>
<li>&quot;GoToEnd&quot;</li>
<li>&quot;DeletePreviousCharacter&quot;</li>
<li>&quot;DeleteNextCharacter&quot;</li>
<li>&quot;DeletePreviousWord&quot;</li>
<li>&quot;DeleteNextWord&quot;</li>
<li>&quot;DeleteLine&quot;</li>
</ul>
<h2 id="lua-function-calls"><a class="header" href="#lua-function-calls">Lua Function Calls</a></h2>
<p>xplr allows users to define lua functions using the <code>xplr.fn.custom</code> Lua API.</p>
<p>These functions can be called using messages like <code>CallLua</code>, <code>CallLuaSilently</code>.</p>
<p>When called the function receives a <a href="#lua-context">special argument</a> that
contains some useful information. The function can optionally return a list of
messages which will be handled by xplr.</p>
<h3 id="lua-context"><a class="header" href="#lua-context">Lua Context</a></h3>
<p>This is a special argument passed to the lua functions when called using the
<code>CallLua</code>, <code>CallLuaSilently</code> messages.</p>
<p>It contains the following information:</p>
<ul>
<li><a href="#version">version</a></li>
<li><a href="#pwd">pwd</a></li>
<li><a href="#focused_node">focused_node</a></li>
<li><a href="#directory_buffer">directory_buffer</a></li>
<li><a href="#selection">selection</a></li>
<li><a href="#mode">mode</a></li>
<li><a href="#layout">layout</a></li>
<li><a href="#input_buffer">input_buffer</a></li>
<li><a href="#pid">pid</a></li>
<li><a href="#session_path">session_path</a></li>
<li><a href="#explorer_config">explorer_config</a></li>
<li><a href="#history">history</a></li>
<li><a href="#last_modes">last_modes</a></li>
</ul>
<h3 id="version"><a class="header" href="#version">version</a></h3>
<p>Type: string</p>
<p>xplr version. Can be used to test compatibility.</p>
<h3 id="pwd"><a class="header" href="#pwd">pwd</a></h3>
<p>Type: string</p>
<p>The present working directory/</p>
<h3 id="focused_node"><a class="header" href="#focused_node">focused_node</a></h3>
<p>Type: nullable <a href="#node">Node</a></p>
<p>The node under focus.</p>
<h3 id="directory_buffer"><a class="header" href="#directory_buffer">directory_buffer</a></h3>
<p>Type: nullable <a href="#directory-buffer">Directory Buffer</a></p>
<p>The directory buffer being rendered.</p>
<h3 id="selection"><a class="header" href="#selection">selection</a></h3>
<p>Type: list of selected <a href="#node">Node</a>s</p>
<p>The selected nodes.</p>
<h3 id="mode"><a class="header" href="#mode">mode</a></h3>
<p>Type: <a href="modes.html#mode">Mode</a></p>
<p>Current mode.</p>
<h3 id="layout"><a class="header" href="#layout">layout</a></h3>
<p>Type: <a href="layouts.html#layout">Layout</a></p>
<p>Current layout.</p>
<h3 id="input_buffer"><a class="header" href="#input_buffer">input_buffer</a></h3>
<p>Type: nullable string</p>
<p>The input buffer.</p>
<h3 id="pid"><a class="header" href="#pid">pid</a></h3>
<p>Type: integer</p>
<p>The xplr session PID.</p>
<h3 id="session_path"><a class="header" href="#session_path">session_path</a></h3>
<p>Type: string</p>
<p>The session path.</p>
<h3 id="explorer_config"><a class="header" href="#explorer_config">explorer_config</a></h3>
<p><a href="https://docs.rs/xplr/latest/xplr/app/struct.ExplorerConfig.html">TODO</a></p>
<h3 id="history"><a class="header" href="#history">history</a></h3>
<p>Type: <a href="#history-1">History</a></p>
<h3 id="last_modes"><a class="header" href="#last_modes">last_modes</a></h3>
<p>Type: list of <a href="modes.html#mode">Mode</a></p>
<p>Last modes, not popped yet.</p>
<h3 id="parent"><a class="header" href="#parent">parent</a></h3>
<p>Type: string</p>
<p>The parent path of the node.</p>
<h3 id="relative_path"><a class="header" href="#relative_path">relative_path</a></h3>
<p>Type: string</p>
<p>The path relative to the parent, i.e. the file/directory name with extension.</p>
<h3 id="absolute_path"><a class="header" href="#absolute_path">absolute_path</a></h3>
<p>Type: string</p>
<p>The absolute path (without resolving symlinks) of the node.</p>
<h3 id="extension"><a class="header" href="#extension">extension</a></h3>
<p>Type: string</p>
<p>The extension of the node.</p>
<h3 id="is_symlink"><a class="header" href="#is_symlink">is_symlink</a></h3>
<p>Type: boolean</p>
<p><code>true</code> if the node is a symlink.</p>
<h3 id="is_broken"><a class="header" href="#is_broken">is_broken</a></h3>
<p>Type: boolean</p>
<p><code>true</code> if the node is a broken symlink.</p>
<h3 id="is_dir"><a class="header" href="#is_dir">is_dir</a></h3>
<p>Type: boolean</p>
<p><code>true</code> if the node is a directory.</p>
<h3 id="is_file"><a class="header" href="#is_file">is_file</a></h3>
<p>Type: boolean</p>
<p><code>true</code> if the node is a file.</p>
<h3 id="is_readonly"><a class="header" href="#is_readonly">is_readonly</a></h3>
<p>Type: boolean</p>
<p><code>true</code> if the node is real-only.</p>
<h3 id="mime_essence"><a class="header" href="#mime_essence">mime_essence</a></h3>
<p>Type: string</p>
<p>The mime type of the node. For e.g. <code>text/csv</code>, <code>image/jpeg</code> etc.</p>
<h3 id="size"><a class="header" href="#size">size</a></h3>
<p>Type: integer</p>
<p>The size of the exact node. The size of a directory won't be calculated
recursively.</p>
<h3 id="human_size"><a class="header" href="#human_size">human_size</a></h3>
<p>Type: string</p>
<p>Like size but in human readable format.</p>
<h3 id="permissions"><a class="header" href="#permissions">permissions</a></h3>
<p>Type: <a href="column-renderer.html#permission">Permission</a></p>
<p>The <a href="column-renderer.html#permission">permissions</a> applied to the node.</p>
<h3 id="canonical"><a class="header" href="#canonical">canonical</a></h3>
<p>Type: nullable <a href="column-renderer.html#resolved-node-metadata">Resolved Node Metadata</a></p>
<p>If the node is a symlink, it will hold information about the symlink resolved
node. Else, it will hold information the actual node. It the symlink is broken,
it will be null.</p>
<h3 id="symlink"><a class="header" href="#symlink">symlink</a></h3>
<p>Type: nullable <a href="column-renderer.html#resolved-node-metadata">Resolved Node Metadata</a></p>
<p>If the node is a symlink and is not broken, it will hold information about the
symlink resolved node. However, it will never hold information about the actual
node. It will instead be null.</p>
<h3 id="node"><a class="header" href="#node">Node</a></h3>
<p>A node contains the following fields:</p>
<ul>
<li><a href="#parent">parent</a></li>
<li><a href="#relative_path">relative_path</a></li>
<li><a href="#absolute_path">absolute_path</a></li>
<li><a href="#extension">extension</a></li>
<li><a href="#is_symlink">is_symlink</a></li>
<li><a href="#is_broken">is_broken</a></li>
<li><a href="#is_dir">is_dir</a></li>
<li><a href="#is_file">is_file</a></li>
<li><a href="#is_readonly">is_readonly</a></li>
<li><a href="#mime_essence">mime_essence</a></li>
<li><a href="#size">size</a></li>
<li><a href="#human_size">human_size</a></li>
<li><a href="#permissions">permissions</a></li>
<li><a href="#canonical">canonical</a></li>
<li><a href="#symlink">symlink</a></li>
</ul>
<h3 id="directory-buffer"><a class="header" href="#directory-buffer">Directory Buffer</a></h3>
<p>Directory buffer contains the following fields:</p>
<ul>
<li><a href="#parent">parent</a></li>
<li><a href="#nodes">nodes</a></li>
<li><a href="#total">total</a></li>
<li><a href="#focus">focus</a></li>
</ul>
<h4 id="parent-1"><a class="header" href="#parent-1">parent</a></h4>
<p>Type: string</p>
<p>The parent path of the node.</p>
<h4 id="nodes"><a class="header" href="#nodes">nodes</a></h4>
<p>Type: list of <a href="#node">Node</a>s</p>
<p>A list of visible nodes.</p>
<h4 id="total"><a class="header" href="#total">total</a></h4>
<p>Type: int</p>
<p>The count of nodes being rendered.</p>
<h4 id="focus"><a class="header" href="#focus">focus</a></h4>
<p>Type: int</p>
<p>The index of the node under focus. It can be <code>0</code> even when there's no node to
focus on.</p>
<h3 id="history-1"><a class="header" href="#history-1">History</a></h3>
<p>History contains the following fields:</p>
<ul>
<li><a href="#loc">loc</a></li>
<li><a href="#paths">paths</a></li>
</ul>
<h4 id="loc"><a class="header" href="#loc">loc</a></h4>
<p>Type: int</p>
<p>Location of the current path in history.</p>
<h4 id="paths"><a class="header" href="#paths">paths</a></h4>
<p>Type: list of string</p>
<p>Visited paths.</p>
<h3 id="example-using-lua-function-calls"><a class="header" href="#example-using-lua-function-calls">Example: Using Lua Function Calls</a></h3>
<pre><code class="language-lua">-- Define the function
xplr.fn.custom.ask_name_and_greet = function(app)
print(&quot;What's your name?&quot;)
local name = io.read()
local greeting = &quot;Hello &quot; .. name .. &quot;!&quot;
local message = greeting .. &quot; You are inside &quot; .. app.pwd
return {
{ LogSuccess = message },
}
end
-- Map the function to a key (space)
xplr.config.modes.builtin.default.key_bindings.on_key.space = {
help = &quot;ask name and greet&quot;,
messages = {
{ CallLua = &quot;custom.ask_name_and_greet&quot; }
}
}
-- Now, when you press &quot;space&quot; in default mode, you will be prompted for your
-- name. Enter your name to receive a nice greeting and to know your location.
</code></pre>
<h2 id="environment-variables-and-pipes"><a class="header" href="#environment-variables-and-pipes">Environment Variables and Pipes</a></h2>
<p>Alternative to <code>CallLua</code>, <code>CallLuaSilently</code> messages that call Lua functions,
there are <code>Call</code>, <code>CallSilently</code>, <code>BashExec</code>, <code>BashExecSilently</code> messages
that call shell commands.</p>
<p>However, unlike the Lua functions, these shell commands have to read the useful
information and send messages via environment variables and temporary files
called &quot;pipe&quot;s. These environment variables and files are only available when
a command is being executed.</p>
<p>Visit the <a href="configure-key-bindings.html#tutorial-adding-a-new-mode"><strong>fzf integration tutorial</strong></a>
for example.</p>
<h3 id="environment-variables"><a class="header" href="#environment-variables">Environment variables</a></h3>
<p>To see the environment variables, invoke the shell by typing <code>:!</code> in default
mode and run the following command:</p>
<pre><code>env | grep ^XPLR_
</code></pre>
<p>You will see something like:</p>
<pre><code>XPLR_FOCUS_INDEX=0
XPLR_MODE=action to
XPLR_PIPE_SELECTION_OUT=/run/user/1000/xplr/session/122278/pipe/selection_out
XPLR_INPUT_BUFFER=
XPLR_PIPE_GLOBAL_HELP_MENU_OUT=/run/user/1000/xplr/session/122278/pipe/global_help_menu_out
XPLR_PID=122278
XPLR_PIPE_MSG_IN=/run/user/1000/xplr/session/122278/pipe/msg_in
XPLR_PIPE_LOGS_OUT=/run/user/1000/xplr/session/122278/pipe/logs_out
XPLR_PIPE_RESULT_OUT=/run/user/1000/xplr/session/122278/pipe/result_out
XPLR_PIPE_HISTORY_OUT=/run/user/1000/xplr/session/122278/pipe/history_out
XPLR_FOCUS_PATH=/home/sayanarijit/Documents/GitHub/xplr/docs/en/book
XPLR_SESSION_PATH=/run/user/1000/xplr/session/122278
XPLR_APP_VERSION=0.14.3
XPLR_PIPE_DIRECTORY_NODES_OUT=/run/user/1000/xplr/session/122278/pipe/directory_nodes_out
</code></pre>
<p>The environment variables starting with <code>XPLR_PIPE_</code> are the temporary files
called &quot;pipe&quot;s.</p>
<h4 id="input-pipe"><a class="header" href="#input-pipe">Input pipe</a></h4>
<p>Current there is only one input pipe.</p>
<ul>
<li><a href="#xplr_pipe_msg_in">XPLR_PIPE_MSG_IN</a></li>
</ul>
<h4 id="output-pipes"><a class="header" href="#output-pipes">Output pipes</a></h4>
<p><code>XPLR_PIPE_*_OUT</code> are the output pipes that contain data which cannot be
exposed directly via environment variables, like multi-line string.</p>
<ul>
<li><a href="#xplr_pipe_selection_out">XPLR_PIPE_SELECTION_OUT</a></li>
<li><a href="#xplr_pipe_global_help_menu_out">XPLR_PIPE_GLOBAL_HELP_MENU_OUT</a></li>
<li><a href="#xplr_pipe_logs_out">XPLR_PIPE_LOGS_OUT</a></li>
<li><a href="#xplr_pipe_result_out">XPLR_PIPE_RESULT_OUT</a></li>
<li><a href="#xplr_pipe_history_out">XPLR_PIPE_HISTORY_OUT</a></li>
<li><a href="#xplr_pipe_directory_nodes_out">XPLR_PIPE_DIRECTORY_NODES_OUT</a></li>
</ul>
<h4 id="xplr_pipe_msg_in"><a class="header" href="#xplr_pipe_msg_in">XPLR_PIPE_MSG_IN</a></h4>
<p>Append new-line delimited messages to this pipe in <a href="https://www.yaml.org">YAML</a>
(or <a href="https://www.json.org">JSON</a>) syntax. These messages will be read and
handled by xplr after the command execution.</p>
<h4 id="xplr_pipe_selection_out"><a class="header" href="#xplr_pipe_selection_out">XPLR_PIPE_SELECTION_OUT</a></h4>
<p>New-line delimited list of selected paths.</p>
<h4 id="xplr_pipe_global_help_menu_out"><a class="header" href="#xplr_pipe_global_help_menu_out">XPLR_PIPE_GLOBAL_HELP_MENU_OUT</a></h4>
<p>The full help menu.</p>
<h4 id="xplr_pipe_logs_out"><a class="header" href="#xplr_pipe_logs_out">XPLR_PIPE_LOGS_OUT</a></h4>
<p>New-line delimited list of logs.</p>
<h4 id="xplr_pipe_result_out"><a class="header" href="#xplr_pipe_result_out">XPLR_PIPE_RESULT_OUT</a></h4>
<p>New-line delimited result (selected paths if any, else the focused path)</p>
<h4 id="xplr_pipe_history_out"><a class="header" href="#xplr_pipe_history_out">XPLR_PIPE_HISTORY_OUT</a></h4>
<p>New-line delimited list of last visited paths (similar to jump list in vim).</p>
<h4 id="xplr_pipe_directory_nodes_out"><a class="header" href="#xplr_pipe_directory_nodes_out">XPLR_PIPE_DIRECTORY_NODES_OUT</a></h4>
<p>New-line delimited list of paths, filtered and sorted as displayed in the
<a href="layouts.html#table">files table</a>.</p>
<h3 id="example-using-environment-variables-and-pipes"><a class="header" href="#example-using-environment-variables-and-pipes">Example: Using Environment Variables and Pipes</a></h3>
<pre><code class="language-lua">xplr.config.modes.builtin.default.key_bindings.on_key.space = {
help = &quot;ask name and greet&quot;,
messages = {
{
BashExec = [===[
echo &quot;What's your name?&quot;
read name
greeting=&quot;Hello $name!&quot;
message=&quot;$greeting You are inside $PWD&quot;
echo LogSuccess: '&quot;'$message'&quot;' &gt;&gt; &quot;${XPLR_PIPE_MSG_IN:?}&quot;
]===]
}
}
}
-- Now, when you press &quot;space&quot; in default mode, you will be prompted for your
-- name. Enter your name to receive a nice greeting and to know your location.
</code></pre>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="modes.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="layouts.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
</div>
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a rel="prev" href="modes.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="layouts.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playground_copyable = true;
</script>
<script src="elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="book.js" type="text/javascript" charset="utf-8"></script>
<!-- Custom JS scripts -->
</body>
</html>

@ -1,276 +0,0 @@
<!DOCTYPE HTML>
<html lang="en" class="sidebar-visible no-js light">
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Node Types - xplr book</title>
<!-- Custom HTML head -->
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="description" content="A hackable, minimal, fast TUI file explorer">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="favicon.svg">
<link rel="shortcut icon" href="favicon.png">
<link rel="stylesheet" href="css/variables.css">
<link rel="stylesheet" href="css/general.css">
<link rel="stylesheet" href="css/chrome.css">
<link rel="stylesheet" href="css/print.css" media="print">
<!-- Fonts -->
<link rel="stylesheet" href="FontAwesome/css/font-awesome.css">
<link rel="stylesheet" href="fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="highlight.css">
<link rel="stylesheet" href="tomorrow-night.css">
<link rel="stylesheet" href="ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<!-- Provide site root to javascript -->
<script type="text/javascript">
var path_to_root = "";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
}
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
}
} catch (e) { }
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
var html = document.querySelector('html');
html.classList.remove('no-js')
html.classList.remove('light')
html.classList.add(theme);
html.classList.add('js');
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
}
html.classList.remove('sidebar-visible');
html.classList.add("sidebar-" + sidebar);
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li class="chapter-item expanded "><a href="quickstart.html"><strong aria-hidden="true">2.</strong> Quickstart</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="install.html"><strong aria-hidden="true">2.1.</strong> Install</a></li><li class="chapter-item expanded "><a href="post-install.html"><strong aria-hidden="true">2.2.</strong> Post Install</a></li></ol></li><li class="chapter-item expanded "><a href="awesome-hacks.html"><strong aria-hidden="true">3.</strong> Awesome Hacks</a></li><li class="chapter-item expanded "><a href="configuration.html"><strong aria-hidden="true">4.</strong> Configuration</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="key-bindings.html"><strong aria-hidden="true">4.1.</strong> Key Bindings</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="configure-key-bindings.html"><strong aria-hidden="true">4.1.1.</strong> Configure Key Bindings</a></li><li class="chapter-item expanded "><a href="default-key-bindings.html"><strong aria-hidden="true">4.1.2.</strong> Default Key Bindings</a></li><li class="chapter-item expanded "><a href="debug-key-bindings.html"><strong aria-hidden="true">4.1.3.</strong> Debug Key Bindings</a></li></ol></li><li class="chapter-item expanded "><a href="general-config.html"><strong aria-hidden="true">4.2.</strong> General Config</a></li><li class="chapter-item expanded "><a href="modes.html"><strong aria-hidden="true">4.3.</strong> Modes</a></li><li class="chapter-item expanded "><a href="message.html"><strong aria-hidden="true">4.4.</strong> Message</a></li><li class="chapter-item expanded "><a href="layouts.html"><strong aria-hidden="true">4.5.</strong> Layouts</a></li><li class="chapter-item expanded "><a href="node_types.html" class="active"><strong aria-hidden="true">4.6.</strong> Node Types</a></li><li class="chapter-item expanded "><a href="borders.html"><strong aria-hidden="true">4.7.</strong> Borders</a></li><li class="chapter-item expanded "><a href="style.html"><strong aria-hidden="true">4.8.</strong> Style</a></li><li class="chapter-item expanded "><a href="sorting.html"><strong aria-hidden="true">4.9.</strong> Sorting</a></li><li class="chapter-item expanded "><a href="filtering.html"><strong aria-hidden="true">4.10.</strong> Filtering</a></li><li class="chapter-item expanded "><a href="column-renderer.html"><strong aria-hidden="true">4.11.</strong> Column Renderer</a></li></ol></li><li class="chapter-item expanded "><a href="plugin.html"><strong aria-hidden="true">5.</strong> Plugin</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="installing-plugins.html"><strong aria-hidden="true">5.1.</strong> Installing Plugins</a></li><li class="chapter-item expanded "><a href="writing-plugins.html"><strong aria-hidden="true">5.2.</strong> Writing Plugins</a></li><li class="chapter-item expanded "><a href="awesome-plugins.html"><strong aria-hidden="true">5.3.</strong> Awesome Plugins</a></li></ol></li><li class="chapter-item expanded "><a href="integration.html"><strong aria-hidden="true">6.</strong> Integration</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="awesome-integrations.html"><strong aria-hidden="true">6.1.</strong> Awesome Integrations</a></li></ol></li><li class="chapter-item expanded "><a href="todo.html"><strong aria-hidden="true">7.</strong> TODO</a></li><li class="chapter-item expanded "><a href="alternatives.html"><strong aria-hidden="true">8.</strong> Alternatives</a></li><li class="chapter-item expanded "><a href="upgrade-guide.html"><strong aria-hidden="true">9.</strong> Upgrade Guide</a></li><li class="chapter-item expanded "><a href="community.html"><strong aria-hidden="true">10.</strong> Community</a></li><li class="chapter-item expanded "><a href="contribute.html"><strong aria-hidden="true">11.</strong> Contribute</a></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">xplr book</h1>
<div class="right-buttons">
<a href="print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<a href="https://github.com/sayanarijit/xplr" title="Git repository" aria-label="Git repository">
<i id="git-repository-button" class="fa fa-github"></i>
</a>
<a href="https://github.com/sayanarijit/xplr/edit/main/docs/en/src/node_types.md" title="Suggest an edit" aria-label="Suggest an edit">
<i id="git-edit-button" class="fa fa-edit"></i>
</a>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
<ul id="searchresults">
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
});
</script>
<div id="content" class="content">
<main>
<h1 id="node-types"><a class="header" href="#node-types">Node Types</a></h1>
<p>This configuration defines how to deal with different kinds of nodes (files,
directories, symlinks etc.) in a directory.</p>
<p>This can be configured using the <code>xplr.config.node_types</code> Lua API.</p>
<p>It contains the following fields:</p>
<ul>
<li><a href="#directory">directory</a></li>
<li><a href="#file">file</a></li>
<li><a href="#symlink">symlink</a></li>
<li><a href="#mime_essence">mime_essence</a></li>
<li><a href="#extension">extension</a></li>
<li><a href="#special">special</a></li>
</ul>
<p>One node can fall into multiple categories. For example, a node can have the
extension <code>md</code>, and be a <code>file</code>. In that case, the properties from the more
specific category i.e. extension will be used.</p>
<p>The priority is:</p>
<p><strong>special</strong> &gt; <strong>extension</strong> &gt; <strong>mime_essence</strong> &gt; <strong>symlink</strong> &gt; <strong>file</strong> &gt; <strong>directory</strong></p>
<h3 id="directory"><a class="header" href="#directory">directory</a></h3>
<p>Type: <a href="#nodetype-config">NodeType Config</a></p>
<p>Properties related to directories are defined here.</p>
<p>Contains the following fields:</p>
<p>Example:</p>
<pre><code class="language-lua">xplr.config.node_types.directory.meta.icon = &quot;&quot;
xplr.config.node_types.directory.style.add_modifiers = { &quot;Bold&quot; }
</code></pre>
<h3 id="file"><a class="header" href="#file">file</a></h3>
<p>Type: <a href="#nodetype-config">NodeType Config</a></p>
<p>Properties related to regular files are defined here.</p>
<p>Contains the following fields:</p>
<p>Example:</p>
<pre><code class="language-lua">xplr.config.node_types.file.meta.icon = &quot;&quot;
xplr.config.node_types.file.style.fg = &quot;White&quot;
</code></pre>
<h3 id="symlink"><a class="header" href="#symlink">symlink</a></h3>
<p>Type: <a href="#nodetype-config">NodeType Config</a></p>
<p>Properties related to symlink are defined here.</p>
<p>Example:</p>
<pre><code class="language-lua">xplr.config.node_types.symlink.meta.icon = &quot;&quot;
xplr.config.node_types.symlink.style.add_modifiers = { &quot;Italic&quot; }
</code></pre>
<h3 id="mime_essence"><a class="header" href="#mime_essence">mime_essence</a></h3>
<p>Type: mapping of mime-type and mapping of mime-subtype and <a href="#nodetype-config">NodeType Config</a></p>
<p>Properties related to files with specific mime types are defined here.</p>
<p>It is possible to use the wildcard <code>*</code> to match all mime subtypes. It will be
overwritten by the more specific sub types that are defined.</p>
<p>Example:</p>
<pre><code class="language-lua">xplr.config.node_types.mime_essence = {
application = {
-- application/*
[&quot;*&quot;] = { meta = { icon = &quot;a&quot; } }
-- application/pdf
pdf = { meta = { icon = &quot;&quot; } },
-- application/zip
zip = { meta = { icon = &quot;&quot;} },
},
}
</code></pre>
<h3 id="extension"><a class="header" href="#extension">extension</a></h3>
<p>Type: mapping of extension and <a href="#nodetype-config">NodeType Config</a></p>
<p>Properties related to files with specific extension are defined here.</p>
<p>Example:</p>
<pre><code class="language-lua">xplr.config.node_types.extension.md = { meta = { icon = &quot;&quot; } }
xplr.config.node_types.extension.rs = { meta = { icon = &quot;🦀&quot; } }
</code></pre>
<h3 id="special"><a class="header" href="#special">special</a></h3>
<p>Type: mapping of name and <a href="#nodetype-config">NodeType Config</a></p>
<p>Properties related to files and directories with special names are defined
here.</p>
<p>Example:</p>
<pre><code class="language-lua">xplr.config.node_types.special[&quot;Cargo.toml&quot;] = { meta = { icon = &quot;&quot; } }
xplr.config.node_types.special[&quot;Downloads&quot;] = { meta = { icon = &quot;&quot; } }
</code></pre>
<h2 id="nodetype-config"><a class="header" href="#nodetype-config">NodeType Config</a></h2>
<p>A node-type config contains the following fields:</p>
<ul>
<li><a href="#meta">meta</a></li>
<li><a href="style.html">style</a></li>
</ul>
<h3 id="meta"><a class="header" href="#meta">meta</a></h3>
<p>Type: mapping of string and string</p>
<p>A meta field can contain custom metadata about a node. By default, the &quot;icon&quot;
metadata is set for the <a href="#directory">directory</a>, <a href="#file">file</a>, and
<a href="#symlink">symlink</a> nodes.</p>
<p>Example:</p>
<pre><code class="language-lua">xplr.config.node_types.file = {
meta = {
icon = &quot;f&quot;,
foo = &quot;bar&quot;,
}
}
</code></pre>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="layouts.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="borders.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
</div>
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a rel="prev" href="layouts.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="borders.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playground_copyable = true;
</script>
<script src="elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="book.js" type="text/javascript" charset="utf-8"></script>
<!-- Custom JS scripts -->
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save