mirror of
https://github.com/sayanarijit/xplr.git
synced 2024-09-11 11:05:39 +03:00
Add SwitchModeBuiltin and SwitchModeCustom
Also, use a better prompt symbol. Ref: https://github.com/sayanarijit/xplr/issues/107
This commit is contained in:
parent
f2eb8febd5
commit
0584a43c7c
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1630,7 +1630,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "xplr"
|
name = "xplr"
|
||||||
version = "0.5.12"
|
version = "0.5.13"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"chrono",
|
"chrono",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "xplr"
|
name = "xplr"
|
||||||
version = "0.5.12" # Update config.yml, config.rs and default.nix
|
version = "0.5.13" # Update config.yml, config.rs and default.nix
|
||||||
authors = ["Arijit Basu <sayanarijit@gmail.com>"]
|
authors = ["Arijit Basu <sayanarijit@gmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
description = "A hackable, minimal, fast TUI file explorer"
|
description = "A hackable, minimal, fast TUI file explorer"
|
||||||
|
105
src/app.rs
105
src/app.rs
@ -966,7 +966,7 @@ pub enum ExternalMsg {
|
|||||||
|
|
||||||
/// Focus on the `n`th node relative to the current focus where `n` is a given value.
|
/// Focus on the `n`th node relative to the current focus where `n` is a given value.
|
||||||
///
|
///
|
||||||
/// Example: `FocusNextByRelativeIndex: 2`
|
/// **Example:** `FocusNextByRelativeIndex: 2`
|
||||||
FocusNextByRelativeIndex(usize),
|
FocusNextByRelativeIndex(usize),
|
||||||
|
|
||||||
/// Focus on the `n`th node relative to the current focus where `n` is read from
|
/// Focus on the `n`th node relative to the current focus where `n` is read from
|
||||||
@ -978,7 +978,7 @@ pub enum ExternalMsg {
|
|||||||
|
|
||||||
/// Focus on the `-n`th node relative to the current focus where `n` is a given value.
|
/// Focus on the `-n`th node relative to the current focus where `n` is a given value.
|
||||||
///
|
///
|
||||||
/// Example: `FocusPreviousByRelativeIndex: 2`
|
/// **Example:** `FocusPreviousByRelativeIndex: 2`
|
||||||
FocusPreviousByRelativeIndex(usize),
|
FocusPreviousByRelativeIndex(usize),
|
||||||
|
|
||||||
/// Focus on the `-n`th node relative to the current focus where `n` is read from
|
/// Focus on the `-n`th node relative to the current focus where `n` is read from
|
||||||
@ -993,7 +993,7 @@ pub enum ExternalMsg {
|
|||||||
|
|
||||||
/// Focus on the given path.
|
/// Focus on the given path.
|
||||||
///
|
///
|
||||||
/// Example: `FocusPath: /tmp`
|
/// **Example:** `FocusPath: /tmp`
|
||||||
FocusPath(String),
|
FocusPath(String),
|
||||||
|
|
||||||
/// Focus on the path read from input buffer.
|
/// Focus on the path read from input buffer.
|
||||||
@ -1001,7 +1001,7 @@ pub enum ExternalMsg {
|
|||||||
|
|
||||||
/// Focus on the absolute `n`th node where `n` is a given value.
|
/// Focus on the absolute `n`th node where `n` is a given value.
|
||||||
///
|
///
|
||||||
/// Example: `FocusByIndex: 2`
|
/// **Example:** `FocusByIndex: 2`
|
||||||
FocusByIndex(usize),
|
FocusByIndex(usize),
|
||||||
|
|
||||||
/// Focus on the absolute `n`th node where `n` is read from the input buffer.
|
/// Focus on the absolute `n`th node where `n` is read from the input buffer.
|
||||||
@ -1009,12 +1009,12 @@ pub enum ExternalMsg {
|
|||||||
|
|
||||||
/// Focus on the file by name from the present working directory.
|
/// Focus on the file by name from the present working directory.
|
||||||
///
|
///
|
||||||
/// Example: `FocusByFileName: README.md`
|
/// **Example:** `FocusByFileName: README.md`
|
||||||
FocusByFileName(String),
|
FocusByFileName(String),
|
||||||
|
|
||||||
/// Change the present working directory ($PWD)
|
/// Change the present working directory ($PWD)
|
||||||
///
|
///
|
||||||
/// Example: `ChangeDirectory: /tmp`
|
/// **Example:** `ChangeDirectory: /tmp`
|
||||||
ChangeDirectory(String),
|
ChangeDirectory(String),
|
||||||
|
|
||||||
/// Enter into the currently focused path if it's a directory.
|
/// Enter into the currently focused path if it's a directory.
|
||||||
@ -1034,7 +1034,7 @@ pub enum ExternalMsg {
|
|||||||
|
|
||||||
/// Append/buffer the given string into the input buffer.
|
/// Append/buffer the given string into the input buffer.
|
||||||
///
|
///
|
||||||
/// Example: `BufferInput: foo`
|
/// **Example:** `BufferInput: foo`
|
||||||
BufferInput(String),
|
BufferInput(String),
|
||||||
|
|
||||||
/// Append/buffer the characted read from a keyboard input into the
|
/// Append/buffer the characted read from a keyboard input into the
|
||||||
@ -1045,7 +1045,7 @@ pub enum ExternalMsg {
|
|||||||
/// When the input buffer is not-null (even if empty string)
|
/// When the input buffer is not-null (even if empty string)
|
||||||
/// it will show in the UI.
|
/// it will show in the UI.
|
||||||
///
|
///
|
||||||
/// Example: `SetInputBuffer: foo`
|
/// **Example:** `SetInputBuffer: foo`
|
||||||
SetInputBuffer(String),
|
SetInputBuffer(String),
|
||||||
|
|
||||||
/// Remove input buffer's last character.
|
/// Remove input buffer's last character.
|
||||||
@ -1060,34 +1060,49 @@ pub enum ExternalMsg {
|
|||||||
/// Switch input mode.
|
/// Switch input mode.
|
||||||
/// This will reset the input buffer and call `Refresh` automatically.
|
/// This will reset the input buffer and call `Refresh` automatically.
|
||||||
///
|
///
|
||||||
/// Example: `SwitchMode: default`
|
/// > **NOTE:** To be specific about which mode to switch to, use `SwitchModeBuiltin` or
|
||||||
|
/// `SwitchModeCustom` instead.
|
||||||
|
///
|
||||||
|
/// **Example:** `SwitchMode: default`
|
||||||
SwitchMode(String),
|
SwitchMode(String),
|
||||||
|
|
||||||
|
/// Switch to a builtin mode.
|
||||||
|
/// This will reset the input buffer and call `Refresh` automatically.
|
||||||
|
///
|
||||||
|
/// **Example:** `SwitchModeBuiltin: default`
|
||||||
|
SwitchModeBuiltin(String),
|
||||||
|
|
||||||
|
/// Switch to a custom mode.
|
||||||
|
/// This will reset the input buffer and call `Refresh` automatically.
|
||||||
|
///
|
||||||
|
/// **Example:** `SwitchModeCustom: my_custom_mode`
|
||||||
|
SwitchModeCustom(String),
|
||||||
|
|
||||||
/// Call a shell command with the given arguments.
|
/// Call a shell command with the given arguments.
|
||||||
/// Note that the arguments will be shell-escaped.
|
/// Note that the arguments will be shell-escaped.
|
||||||
/// So to read the variables, the `-c` option of the shell
|
/// So to read the variables, the `-c` option of the shell
|
||||||
/// can be used.
|
/// can be used.
|
||||||
/// You may need to pass `Refresh` or `Explore` depening on the expectation.
|
/// You may need to pass `Refresh` or `Explore` depening on the expectation.
|
||||||
///
|
///
|
||||||
/// Example: `Call: {command: bash, args: ["-c", "read -p test"]}`
|
/// **Example:** `Call: {command: bash, args: ["-c", "read -p test"]}`
|
||||||
Call(Command),
|
Call(Command),
|
||||||
|
|
||||||
/// Like `Call` but without the flicker. The stdin, stdout
|
/// Like `Call` but without the flicker. The stdin, stdout
|
||||||
/// stderr will be piped to null. So it's non-interactive.
|
/// stderr will be piped to null. So it's non-interactive.
|
||||||
///
|
///
|
||||||
/// Example: `CallSilently: {command: tput, args: ["bell"]}`
|
/// **Example:** `CallSilently: {command: tput, args: ["bell"]}`
|
||||||
CallSilently(Command),
|
CallSilently(Command),
|
||||||
|
|
||||||
/// An alias to `Call: {command: bash, args: ["-c", "${command}"], silent: false}`
|
/// An alias to `Call: {command: bash, args: ["-c", "${command}"], silent: false}`
|
||||||
/// where ${command} is the given value.
|
/// where ${command} is the given value.
|
||||||
///
|
///
|
||||||
/// Example: `BashExec: "read -p test"`
|
/// **Example:** `BashExec: "read -p test"`
|
||||||
BashExec(String),
|
BashExec(String),
|
||||||
|
|
||||||
/// Like `BashExec` but without the flicker. The stdin, stdout
|
/// Like `BashExec` but without the flicker. The stdin, stdout
|
||||||
/// stderr will be piped to null. So it's non-interactive.
|
/// stderr will be piped to null. So it's non-interactive.
|
||||||
///
|
///
|
||||||
/// Example: `BashExecSilently: "tput bell"`
|
/// **Example:** `BashExecSilently: "tput bell"`
|
||||||
BashExecSilently(String),
|
BashExecSilently(String),
|
||||||
|
|
||||||
/// Select the focused node.
|
/// Select the focused node.
|
||||||
@ -1098,7 +1113,7 @@ pub enum ExternalMsg {
|
|||||||
|
|
||||||
/// Select the given path.
|
/// Select the given path.
|
||||||
///
|
///
|
||||||
/// Example: `SelectPath: "/tmp"`
|
/// **Example:** `SelectPath: "/tmp"`
|
||||||
SelectPath(String),
|
SelectPath(String),
|
||||||
|
|
||||||
/// Unselect the focused node.
|
/// Unselect the focused node.
|
||||||
@ -1109,7 +1124,7 @@ pub enum ExternalMsg {
|
|||||||
|
|
||||||
/// UnSelect the given path.
|
/// UnSelect the given path.
|
||||||
///
|
///
|
||||||
/// Example: `UnSelectPath: "/tmp"`
|
/// **Example:** `UnSelectPath: "/tmp"`
|
||||||
UnSelectPath(String),
|
UnSelectPath(String),
|
||||||
|
|
||||||
/// Toggle selection on the focused node.
|
/// Toggle selection on the focused node.
|
||||||
@ -1120,7 +1135,7 @@ pub enum ExternalMsg {
|
|||||||
|
|
||||||
/// Toggle selection by file path.
|
/// Toggle selection by file path.
|
||||||
///
|
///
|
||||||
/// Example: `ToggleSelectionByPath: "/tmp"`
|
/// **Example:** `ToggleSelectionByPath: "/tmp"`
|
||||||
ToggleSelectionByPath(String),
|
ToggleSelectionByPath(String),
|
||||||
|
|
||||||
/// Clear the selection.
|
/// Clear the selection.
|
||||||
@ -1128,27 +1143,27 @@ pub enum ExternalMsg {
|
|||||||
|
|
||||||
/// Add a filter to exclude nodes while exploring directories.
|
/// Add a filter to exclude nodes while exploring directories.
|
||||||
///
|
///
|
||||||
/// Example: `AddNodeFilter: {filter: RelativePathDoesStartWith, input: foo}`
|
/// **Example:** `AddNodeFilter: {filter: RelativePathDoesStartWith, input: foo}`
|
||||||
AddNodeFilter(NodeFilterApplicable),
|
AddNodeFilter(NodeFilterApplicable),
|
||||||
|
|
||||||
/// Remove an existing filter.
|
/// Remove an existing filter.
|
||||||
///
|
///
|
||||||
/// Example: `RemoveNodeFilter: {filter: RelativePathDoesStartWith, input: foo}`
|
/// **Example:** `RemoveNodeFilter: {filter: RelativePathDoesStartWith, input: foo}`
|
||||||
RemoveNodeFilter(NodeFilterApplicable),
|
RemoveNodeFilter(NodeFilterApplicable),
|
||||||
|
|
||||||
/// Remove a filter if it exists, else, add a it.
|
/// Remove a filter if it exists, else, add a it.
|
||||||
///
|
///
|
||||||
/// Example: `ToggleNodeFilter: {filter: RelativePathDoesStartWith, input: foo}`
|
/// **Example:** `ToggleNodeFilter: {filter: RelativePathDoesStartWith, input: foo}`
|
||||||
ToggleNodeFilter(NodeFilterApplicable),
|
ToggleNodeFilter(NodeFilterApplicable),
|
||||||
|
|
||||||
/// Add a node filter reading the input from the buffer.
|
/// Add a node filter reading the input from the buffer.
|
||||||
///
|
///
|
||||||
/// Example: `AddNodeFilterFromInput: RelativePathDoesStartWith`
|
/// **Example:** `AddNodeFilterFromInput: RelativePathDoesStartWith`
|
||||||
AddNodeFilterFromInput(NodeFilter),
|
AddNodeFilterFromInput(NodeFilter),
|
||||||
|
|
||||||
/// Remove a node filter reading the input from the buffer.
|
/// Remove a node filter reading the input from the buffer.
|
||||||
///
|
///
|
||||||
/// Example: `RemoveNodeFilterFromInput: RelativePathDoesStartWith`
|
/// **Example:** `RemoveNodeFilterFromInput: RelativePathDoesStartWith`
|
||||||
RemoveNodeFilterFromInput(NodeFilter),
|
RemoveNodeFilterFromInput(NodeFilter),
|
||||||
|
|
||||||
/// Remove the last node filter.
|
/// Remove the last node filter.
|
||||||
@ -1162,22 +1177,22 @@ pub enum ExternalMsg {
|
|||||||
|
|
||||||
/// Add a sorter to sort nodes while exploring directories.
|
/// Add a sorter to sort nodes while exploring directories.
|
||||||
///
|
///
|
||||||
/// Example: `AddNodeSorter: {sorter: ByRelativePath, reverse: false}`
|
/// **Example:** `AddNodeSorter: {sorter: ByRelativePath, reverse: false}`
|
||||||
AddNodeSorter(NodeSorterApplicable),
|
AddNodeSorter(NodeSorterApplicable),
|
||||||
|
|
||||||
/// Remove an existing sorter.
|
/// Remove an existing sorter.
|
||||||
///
|
///
|
||||||
/// Example: `RemoveNodeSorter: ByRelativePath`
|
/// **Example:** `RemoveNodeSorter: ByRelativePath`
|
||||||
RemoveNodeSorter(NodeSorter),
|
RemoveNodeSorter(NodeSorter),
|
||||||
|
|
||||||
/// Reverse a node sorter.
|
/// Reverse a node sorter.
|
||||||
///
|
///
|
||||||
/// Example: `ReverseNodeSorter: ByRelativePath`
|
/// **Example:** `ReverseNodeSorter: ByRelativePath`
|
||||||
ReverseNodeSorter(NodeSorter),
|
ReverseNodeSorter(NodeSorter),
|
||||||
|
|
||||||
/// Remove a sorter if it exists, else, add a it.
|
/// Remove a sorter if it exists, else, add a it.
|
||||||
///
|
///
|
||||||
/// Example: `ToggleSorterSorter: {sorter: ByRelativePath, reverse: false}`
|
/// **Example:** `ToggleSorterSorter: {sorter: ByRelativePath, reverse: false}`
|
||||||
ToggleNodeSorter(NodeSorterApplicable),
|
ToggleNodeSorter(NodeSorterApplicable),
|
||||||
|
|
||||||
/// Reverse the node sorters.
|
/// Reverse the node sorters.
|
||||||
@ -1194,17 +1209,17 @@ pub enum ExternalMsg {
|
|||||||
|
|
||||||
/// Log information message.
|
/// Log information message.
|
||||||
///
|
///
|
||||||
/// Example: `LogInfo: launching satellite`
|
/// **Example:** `LogInfo: launching satellite`
|
||||||
LogInfo(String),
|
LogInfo(String),
|
||||||
|
|
||||||
/// Log a success message.
|
/// Log a success message.
|
||||||
///
|
///
|
||||||
/// Example: `LogSuccess: satellite reached destination`.
|
/// **Example:** `LogSuccess: satellite reached destination`.
|
||||||
LogSuccess(String),
|
LogSuccess(String),
|
||||||
|
|
||||||
/// Log an error message.
|
/// Log an error message.
|
||||||
///
|
///
|
||||||
/// Example: `LogError: satellite crashed`
|
/// **Example:** `LogError: satellite crashed`
|
||||||
LogError(String),
|
LogError(String),
|
||||||
|
|
||||||
/// Quit with returncode zero (success).
|
/// Quit with returncode zero (success).
|
||||||
@ -1560,6 +1575,8 @@ impl App {
|
|||||||
ExternalMsg::RemoveInputBufferLastWord => self.remove_input_buffer_last_word(),
|
ExternalMsg::RemoveInputBufferLastWord => self.remove_input_buffer_last_word(),
|
||||||
ExternalMsg::ResetInputBuffer => self.reset_input_buffer(),
|
ExternalMsg::ResetInputBuffer => self.reset_input_buffer(),
|
||||||
ExternalMsg::SwitchMode(mode) => self.switch_mode(&mode),
|
ExternalMsg::SwitchMode(mode) => self.switch_mode(&mode),
|
||||||
|
ExternalMsg::SwitchModeBuiltin(mode) => self.switch_mode_builtin(&mode),
|
||||||
|
ExternalMsg::SwitchModeCustom(mode) => self.switch_mode_custom(&mode),
|
||||||
ExternalMsg::Call(cmd) => self.call(cmd),
|
ExternalMsg::Call(cmd) => self.call(cmd),
|
||||||
ExternalMsg::CallSilently(cmd) => self.call_silently(cmd),
|
ExternalMsg::CallSilently(cmd) => self.call_silently(cmd),
|
||||||
ExternalMsg::BashExec(cmd) => self.bash_exec(cmd),
|
ExternalMsg::BashExec(cmd) => self.bash_exec(cmd),
|
||||||
@ -1900,8 +1917,36 @@ impl App {
|
|||||||
.to_owned()
|
.to_owned()
|
||||||
.sanitized(self.config().general().read_only().unwrap_or_default());
|
.sanitized(self.config().general().read_only().unwrap_or_default());
|
||||||
self.msg_out.push_back(MsgOut::Refresh);
|
self.msg_out.push_back(MsgOut::Refresh);
|
||||||
};
|
Ok(self)
|
||||||
Ok(self)
|
} else {
|
||||||
|
self.log_error(format!("Mode not found: {}", mode))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn switch_mode_builtin(mut self, mode: &str) -> Result<Self> {
|
||||||
|
if let Some(mode) = self.config().modes().clone().get_builtin(mode) {
|
||||||
|
self.input_buffer = None;
|
||||||
|
self.mode = mode
|
||||||
|
.to_owned()
|
||||||
|
.sanitized(self.config().general().read_only().unwrap_or_default());
|
||||||
|
self.msg_out.push_back(MsgOut::Refresh);
|
||||||
|
Ok(self)
|
||||||
|
} else {
|
||||||
|
self.log_error(format!("Builtin mode not found: {}", mode))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn switch_mode_custom(mut self, mode: &str) -> Result<Self> {
|
||||||
|
if let Some(mode) = self.config().modes().clone().get(mode) {
|
||||||
|
self.input_buffer = None;
|
||||||
|
self.mode = mode
|
||||||
|
.to_owned()
|
||||||
|
.sanitized(self.config().general().read_only().unwrap_or_default());
|
||||||
|
self.msg_out.push_back(MsgOut::Refresh);
|
||||||
|
Ok(self)
|
||||||
|
} else {
|
||||||
|
self.log_error(format!("Custom mode not found: {}", mode))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn call(mut self, command: Command) -> Result<Self> {
|
fn call(mut self, command: Command) -> Result<Self> {
|
||||||
|
@ -948,8 +948,16 @@ pub struct ModesConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl ModesConfig {
|
impl ModesConfig {
|
||||||
|
pub fn get_builtin(&self, name: &str) -> Option<&Mode> {
|
||||||
|
self.builtin.get(name)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn get_custom(&self, name: &str) -> Option<&Mode> {
|
||||||
|
self.custom.get(name)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn get(&self, name: &str) -> Option<&Mode> {
|
pub fn get(&self, name: &str) -> Option<&Mode> {
|
||||||
self.builtin.get(name).or_else(|| self.custom.get(name))
|
self.get_builtin(name).or_else(|| self.get_custom(name))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn extend(mut self, other: Self) -> Self {
|
pub fn extend(mut self, other: Self) -> Self {
|
||||||
@ -1020,6 +1028,7 @@ impl Config {
|
|||||||
|
|
||||||
pub fn is_compatible(&self) -> Result<bool> {
|
pub fn is_compatible(&self) -> Result<bool> {
|
||||||
let result = match self.parsed_version()? {
|
let result = match self.parsed_version()? {
|
||||||
|
(0, 5, 13) => true,
|
||||||
(0, 5, 12) => true,
|
(0, 5, 12) => true,
|
||||||
(0, 5, 11) => true,
|
(0, 5, 11) => true,
|
||||||
(0, 5, 10) => true,
|
(0, 5, 10) => true,
|
||||||
@ -1041,7 +1050,8 @@ impl Config {
|
|||||||
|
|
||||||
pub fn upgrade_notification(&self) -> Result<Option<&str>> {
|
pub fn upgrade_notification(&self) -> Result<Option<&str>> {
|
||||||
let result = match self.parsed_version()? {
|
let result = match self.parsed_version()? {
|
||||||
(0, 5, 12) => None,
|
(0, 5, 13) => None,
|
||||||
|
(0, 5, 12) => Some("App version updated. Added new messages for switching mode."),
|
||||||
(0, 5, 11) => Some("App version updated. Fixed changing directory on focus using argument"),
|
(0, 5, 11) => Some("App version updated. Fixed changing directory on focus using argument"),
|
||||||
(0, 5, 10) => Some("App version updated. Added xplr desktop icon and search navigation"),
|
(0, 5, 10) => Some("App version updated. Added xplr desktop icon and search navigation"),
|
||||||
(0, 5, 9) => Some("App version updated. Fixed pipes not updating properly"),
|
(0, 5, 9) => Some("App version updated. Fixed pipes not updating properly"),
|
||||||
|
102
src/config.yml
102
src/config.yml
@ -1,4 +1,4 @@
|
|||||||
version: v0.5.12
|
version: v0.5.13
|
||||||
general:
|
general:
|
||||||
show_hidden: false
|
show_hidden: false
|
||||||
read_only: false
|
read_only: false
|
||||||
@ -311,7 +311,7 @@ modes:
|
|||||||
echo Explore >> "${XPLR_PIPE_MSG_IN:?}"
|
echo Explore >> "${XPLR_PIPE_MSG_IN:?}"
|
||||||
echo ClearSelection >> "${XPLR_PIPE_MSG_IN:?}"
|
echo ClearSelection >> "${XPLR_PIPE_MSG_IN:?}"
|
||||||
read -p "[enter to continue]"
|
read -p "[enter to continue]"
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
|
|
||||||
m:
|
m:
|
||||||
help: move here
|
help: move here
|
||||||
@ -326,7 +326,7 @@ modes:
|
|||||||
done < "${XPLR_PIPE_SELECTION_OUT:?}")
|
done < "${XPLR_PIPE_SELECTION_OUT:?}")
|
||||||
echo Explore >> "${XPLR_PIPE_MSG_IN:?}"
|
echo Explore >> "${XPLR_PIPE_MSG_IN:?}"
|
||||||
read -p "[enter to continue]"
|
read -p "[enter to continue]"
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
|
|
||||||
ctrl-c:
|
ctrl-c:
|
||||||
help: terminate
|
help: terminate
|
||||||
@ -335,7 +335,7 @@ modes:
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
|
|
||||||
create_file:
|
create_file:
|
||||||
name: create file
|
name: create file
|
||||||
@ -357,7 +357,7 @@ modes:
|
|||||||
echo "LogError: Failed to create $PTH" >> "${XPLR_PIPE_MSG_IN:?}"
|
echo "LogError: Failed to create $PTH" >> "${XPLR_PIPE_MSG_IN:?}"
|
||||||
echo Refresh >> "${XPLR_PIPE_MSG_IN:?}"
|
echo Refresh >> "${XPLR_PIPE_MSG_IN:?}"
|
||||||
fi
|
fi
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
backspace:
|
backspace:
|
||||||
help: remove last character
|
help: remove last character
|
||||||
messages:
|
messages:
|
||||||
@ -373,7 +373,7 @@ modes:
|
|||||||
esc:
|
esc:
|
||||||
help: cancel
|
help: cancel
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
ctrl-c:
|
ctrl-c:
|
||||||
help: terminate
|
help: terminate
|
||||||
messages:
|
messages:
|
||||||
@ -402,7 +402,7 @@ modes:
|
|||||||
echo "LogError: Failed to create $PTH" >> "${XPLR_PIPE_MSG_IN:?}"
|
echo "LogError: Failed to create $PTH" >> "${XPLR_PIPE_MSG_IN:?}"
|
||||||
echo Refresh >> "${XPLR_PIPE_MSG_IN:?}"
|
echo Refresh >> "${XPLR_PIPE_MSG_IN:?}"
|
||||||
fi
|
fi
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
|
|
||||||
backspace:
|
backspace:
|
||||||
help: remove last character
|
help: remove last character
|
||||||
@ -422,7 +422,7 @@ modes:
|
|||||||
esc:
|
esc:
|
||||||
help: cancel
|
help: cancel
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
|
|
||||||
ctrl-c:
|
ctrl-c:
|
||||||
help: terminate
|
help: terminate
|
||||||
@ -447,16 +447,16 @@ modes:
|
|||||||
d:
|
d:
|
||||||
help: create directory
|
help: create directory
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: create directory
|
- SwitchModeBuiltin: create directory
|
||||||
- SetInputBuffer: ''
|
- SetInputBuffer: ''
|
||||||
esc:
|
esc:
|
||||||
help: cancel
|
help: cancel
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
f:
|
f:
|
||||||
help: create file
|
help: create file
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: create file
|
- SwitchModeBuiltin: create file
|
||||||
- SetInputBuffer: ''
|
- SetInputBuffer: ''
|
||||||
on_alphabet: null
|
on_alphabet: null
|
||||||
on_number: null
|
on_number: null
|
||||||
@ -464,7 +464,7 @@ modes:
|
|||||||
default:
|
default:
|
||||||
help: null
|
help: null
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
rename:
|
rename:
|
||||||
name: rename
|
name: rename
|
||||||
help: null
|
help: null
|
||||||
@ -485,7 +485,7 @@ modes:
|
|||||||
else
|
else
|
||||||
echo "LogError: Failed to rename $SRC to $TARGET" >> "${XPLR_PIPE_MSG_IN:?}"
|
echo "LogError: Failed to rename $SRC to $TARGET" >> "${XPLR_PIPE_MSG_IN:?}"
|
||||||
fi
|
fi
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
|
|
||||||
backspace:
|
backspace:
|
||||||
help: remove last character
|
help: remove last character
|
||||||
@ -505,7 +505,7 @@ modes:
|
|||||||
esc:
|
esc:
|
||||||
help: cancel
|
help: cancel
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
|
|
||||||
ctrl-c:
|
ctrl-c:
|
||||||
help: terminate
|
help: terminate
|
||||||
@ -544,12 +544,12 @@ modes:
|
|||||||
enter:
|
enter:
|
||||||
help: apply filter
|
help: apply filter
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
esc:
|
esc:
|
||||||
help: cancel
|
help: cancel
|
||||||
messages:
|
messages:
|
||||||
- RemoveNodeFilterFromInput: IRelativePathDoesNotContain
|
- RemoveNodeFilterFromInput: IRelativePathDoesNotContain
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
- Explore
|
- Explore
|
||||||
ctrl-c:
|
ctrl-c:
|
||||||
help: terminate
|
help: terminate
|
||||||
@ -590,12 +590,12 @@ modes:
|
|||||||
enter:
|
enter:
|
||||||
help: apply filter
|
help: apply filter
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
esc:
|
esc:
|
||||||
help: cancel
|
help: cancel
|
||||||
messages:
|
messages:
|
||||||
- RemoveNodeFilterFromInput: IRelativePathDoesContain
|
- RemoveNodeFilterFromInput: IRelativePathDoesContain
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
- Explore
|
- Explore
|
||||||
ctrl-c:
|
ctrl-c:
|
||||||
help: terminate
|
help: terminate
|
||||||
@ -621,14 +621,14 @@ modes:
|
|||||||
r:
|
r:
|
||||||
help: relative does contain
|
help: relative does contain
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: relative_path_does_contain
|
- SwitchModeBuiltin: relative_path_does_contain
|
||||||
- SetInputBuffer: ""
|
- SetInputBuffer: ""
|
||||||
- AddNodeFilterFromInput: IRelativePathDoesContain
|
- AddNodeFilterFromInput: IRelativePathDoesContain
|
||||||
- Explore
|
- Explore
|
||||||
R:
|
R:
|
||||||
help: relative does not contain
|
help: relative does not contain
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: relative_path_does_not_contain
|
- SwitchModeBuiltin: relative_path_does_not_contain
|
||||||
- SetInputBuffer: ""
|
- SetInputBuffer: ""
|
||||||
- AddNodeFilterFromInput: IRelativePathDoesNotContain
|
- AddNodeFilterFromInput: IRelativePathDoesNotContain
|
||||||
- Explore
|
- Explore
|
||||||
@ -648,7 +648,7 @@ modes:
|
|||||||
- Terminate
|
- Terminate
|
||||||
default:
|
default:
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
|
|
||||||
sort:
|
sort:
|
||||||
name: sort
|
name: sort
|
||||||
@ -759,7 +759,7 @@ modes:
|
|||||||
- Terminate
|
- Terminate
|
||||||
default:
|
default:
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
|
|
||||||
default:
|
default:
|
||||||
name: default
|
name: default
|
||||||
@ -783,11 +783,11 @@ modes:
|
|||||||
s:
|
s:
|
||||||
help: sort
|
help: sort
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: sort
|
- SwitchModeBuiltin: sort
|
||||||
f:
|
f:
|
||||||
help: filter
|
help: filter
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: filter
|
- SwitchModeBuiltin: filter
|
||||||
.:
|
.:
|
||||||
help: show hidden
|
help: show hidden
|
||||||
messages:
|
messages:
|
||||||
@ -798,7 +798,7 @@ modes:
|
|||||||
':':
|
':':
|
||||||
help: action
|
help: action
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: action
|
- SwitchModeBuiltin: action
|
||||||
'?':
|
'?':
|
||||||
help: global help menu
|
help: global help menu
|
||||||
messages:
|
messages:
|
||||||
@ -820,13 +820,13 @@ modes:
|
|||||||
ctrl-f:
|
ctrl-f:
|
||||||
help: search
|
help: search
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: search
|
- SwitchModeBuiltin: search
|
||||||
- SetInputBuffer: ''
|
- SetInputBuffer: ''
|
||||||
- Explore
|
- Explore
|
||||||
d:
|
d:
|
||||||
help: delete
|
help: delete
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: delete
|
- SwitchModeBuiltin: delete
|
||||||
down:
|
down:
|
||||||
help: down
|
help: down
|
||||||
messages:
|
messages:
|
||||||
@ -838,7 +838,7 @@ modes:
|
|||||||
g:
|
g:
|
||||||
help: go to
|
help: go to
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: go to
|
- SwitchModeBuiltin: go to
|
||||||
left:
|
left:
|
||||||
help: back
|
help: back
|
||||||
messages:
|
messages:
|
||||||
@ -846,7 +846,7 @@ modes:
|
|||||||
r:
|
r:
|
||||||
help: rename
|
help: rename
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: rename
|
- SwitchModeBuiltin: rename
|
||||||
- BashExecSilently: |
|
- BashExecSilently: |
|
||||||
echo "SetInputBuffer: $(basename ${XPLR_FOCUS_PATH})" >> "${XPLR_PIPE_MSG_IN:?}"
|
echo "SetInputBuffer: $(basename ${XPLR_FOCUS_PATH})" >> "${XPLR_PIPE_MSG_IN:?}"
|
||||||
right:
|
right:
|
||||||
@ -894,13 +894,13 @@ modes:
|
|||||||
help: input
|
help: input
|
||||||
messages:
|
messages:
|
||||||
- ResetInputBuffer
|
- ResetInputBuffer
|
||||||
- SwitchMode: number
|
- SwitchModeBuiltin: number
|
||||||
- BufferInputFromKey
|
- BufferInputFromKey
|
||||||
on_special_character: null
|
on_special_character: null
|
||||||
default:
|
default:
|
||||||
help: null
|
help: null
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
go_to:
|
go_to:
|
||||||
name: go to
|
name: go to
|
||||||
help: null
|
help: null
|
||||||
@ -916,12 +916,12 @@ modes:
|
|||||||
help: top
|
help: top
|
||||||
messages:
|
messages:
|
||||||
- FocusFirst
|
- FocusFirst
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
f:
|
f:
|
||||||
help: follow symlink
|
help: follow symlink
|
||||||
messages:
|
messages:
|
||||||
- FollowSymlink
|
- FollowSymlink
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
x:
|
x:
|
||||||
help: open in gui
|
help: open in gui
|
||||||
messages:
|
messages:
|
||||||
@ -937,7 +937,7 @@ modes:
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
$OPENER "${XPLR_FOCUS_PATH:?}" &> /dev/null &
|
$OPENER "${XPLR_FOCUS_PATH:?}" &> /dev/null &
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
- ClearScreen
|
- ClearScreen
|
||||||
- Refresh
|
- Refresh
|
||||||
|
|
||||||
@ -947,7 +947,7 @@ modes:
|
|||||||
default:
|
default:
|
||||||
help: null
|
help: null
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
|
|
||||||
number:
|
number:
|
||||||
name: number
|
name: number
|
||||||
@ -978,17 +978,17 @@ modes:
|
|||||||
help: to down
|
help: to down
|
||||||
messages:
|
messages:
|
||||||
- FocusNextByRelativeIndexFromInput
|
- FocusNextByRelativeIndexFromInput
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
enter:
|
enter:
|
||||||
help: to index
|
help: to index
|
||||||
messages:
|
messages:
|
||||||
- FocusByIndexFromInput
|
- FocusByIndexFromInput
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
up:
|
up:
|
||||||
help: to up
|
help: to up
|
||||||
messages:
|
messages:
|
||||||
- FocusPreviousByRelativeIndexFromInput
|
- FocusPreviousByRelativeIndexFromInput
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
on_alphabet: null
|
on_alphabet: null
|
||||||
on_number:
|
on_number:
|
||||||
help: input
|
help: input
|
||||||
@ -998,7 +998,7 @@ modes:
|
|||||||
default:
|
default:
|
||||||
help: null
|
help: null
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
delete:
|
delete:
|
||||||
name: delete
|
name: delete
|
||||||
help: null
|
help: null
|
||||||
@ -1028,7 +1028,7 @@ modes:
|
|||||||
done < "${XPLR_PIPE_RESULT_OUT:?}")
|
done < "${XPLR_PIPE_RESULT_OUT:?}")
|
||||||
echo Explore >> "${XPLR_PIPE_MSG_IN:?}"
|
echo Explore >> "${XPLR_PIPE_MSG_IN:?}"
|
||||||
read -p "[enter to continue]"
|
read -p "[enter to continue]"
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
|
|
||||||
D:
|
D:
|
||||||
help: force delete
|
help: force delete
|
||||||
@ -1044,7 +1044,7 @@ modes:
|
|||||||
done < "${XPLR_PIPE_RESULT_OUT:?}")
|
done < "${XPLR_PIPE_RESULT_OUT:?}")
|
||||||
echo Explore >> "${XPLR_PIPE_MSG_IN:?}"
|
echo Explore >> "${XPLR_PIPE_MSG_IN:?}"
|
||||||
read -p "[enter to continue]"
|
read -p "[enter to continue]"
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
- Explore
|
- Explore
|
||||||
|
|
||||||
ctrl-c:
|
ctrl-c:
|
||||||
@ -1054,7 +1054,7 @@ modes:
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
|
|
||||||
action:
|
action:
|
||||||
name: action to
|
name: action to
|
||||||
@ -1066,7 +1066,7 @@ modes:
|
|||||||
help: go to index
|
help: go to index
|
||||||
messages:
|
messages:
|
||||||
- ResetInputBuffer
|
- ResetInputBuffer
|
||||||
- SwitchMode: number
|
- SwitchModeBuiltin: number
|
||||||
- BufferInputFromKey
|
- BufferInputFromKey
|
||||||
|
|
||||||
on_key:
|
on_key:
|
||||||
@ -1078,24 +1078,24 @@ modes:
|
|||||||
args:
|
args:
|
||||||
- "-i"
|
- "-i"
|
||||||
- Explore
|
- Explore
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
|
|
||||||
c:
|
c:
|
||||||
help: create
|
help: create
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: create
|
- SwitchModeBuiltin: create
|
||||||
|
|
||||||
e:
|
e:
|
||||||
help: open in editor
|
help: open in editor
|
||||||
messages:
|
messages:
|
||||||
- BashExec: |
|
- BashExec: |
|
||||||
${EDITOR:-vi} -- "${XPLR_FOCUS_PATH:?}"
|
${EDITOR:-vi} -- "${XPLR_FOCUS_PATH:?}"
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
|
|
||||||
s:
|
s:
|
||||||
help: selection operations
|
help: selection operations
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: selection ops
|
- SwitchModeBuiltin: selection ops
|
||||||
|
|
||||||
l:
|
l:
|
||||||
help: logs
|
help: logs
|
||||||
@ -1103,7 +1103,7 @@ modes:
|
|||||||
- BashExec: |
|
- BashExec: |
|
||||||
cat -- "${XPLR_PIPE_LOGS_OUT}"
|
cat -- "${XPLR_PIPE_LOGS_OUT}"
|
||||||
read -p "[enter to continue]"
|
read -p "[enter to continue]"
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
|
|
||||||
ctrl-c:
|
ctrl-c:
|
||||||
help: terminate
|
help: terminate
|
||||||
@ -1112,7 +1112,7 @@ modes:
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
messages:
|
messages:
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
search:
|
search:
|
||||||
name: search
|
name: search
|
||||||
help: null
|
help: null
|
||||||
@ -1155,13 +1155,13 @@ modes:
|
|||||||
help: focus
|
help: focus
|
||||||
messages:
|
messages:
|
||||||
- RemoveNodeFilterFromInput: IRelativePathDoesContain
|
- RemoveNodeFilterFromInput: IRelativePathDoesContain
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
- Explore
|
- Explore
|
||||||
esc:
|
esc:
|
||||||
help: cancel
|
help: cancel
|
||||||
messages:
|
messages:
|
||||||
- RemoveNodeFilterFromInput: IRelativePathDoesContain
|
- RemoveNodeFilterFromInput: IRelativePathDoesContain
|
||||||
- SwitchMode: default
|
- SwitchModeBuiltin: default
|
||||||
- Explore
|
- Explore
|
||||||
left:
|
left:
|
||||||
help: back
|
help: back
|
||||||
|
Loading…
Reference in New Issue
Block a user