Enum xplr::app::ExternalMsg [−][src]
Variants
Explore the present working directory and register the filtered nodes.
This operation is expensive. So, try avoiding using it too often.
Once exploration is done, it will auto Refresh
the state.
Refresh the app state (uncluding 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 Explore
message instead.
Clears the screen.
Focus next node.
FocusNextByRelativeIndex(usize)
Focus on the n
th node relative to the current focus where n
is a given value.
Example: FocusNextByRelativeIndex: 2
Focus on the n
th node relative to the current focus where n
is read from
the input buffer.
Focus on the previous item.
FocusPreviousByRelativeIndex(usize)
Focus on the -n
th node relative to the current focus where n
is a given value.
Example: FocusPreviousByRelativeIndex: 2
Focus on the -n
th node relative to the current focus where n
is read from
the input buffer.
Focus on the first node.
Focus on the last node.
FocusPath(String)
Focus on the given path.
Example: FocusPath: /tmp
Focus on the path read from input buffer.
FocusByIndex(usize)
Focus on the absolute n
th node where n
is a given value.
Example: FocusByIndex: 2
Focus on the absolute n
th node where n
is read from the input buffer.
FocusByFileName(String)
Focus on the file by name from the present working directory.
Example: FocusByFileName: README.md
ChangeDirectory(String)
Change the present working directory ($PWD)
Example: ChangeDirectory: /tmp
Enter into the currently focused path if it’s a directory.
Go back to the parent directory.
BufferInput(String)
Append/buffer the given string into the input buffer.
Example: BufferInput: foo
Append/buffer the characted read from a keyboard input into the input buffer.
SetInputBuffer(String)
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.
Example: SetInputBuffer: foo
Reset the input buffer back to null. It will not show in the UI.
SwitchMode(String)
Switch input mode.
This will call Refresh
automatically.
Example: SwitchMode: default
Call(Command)
Call a shell command with the given arguments.
Note that the arguments will be shell-escaped.
So read the variables, the -c
option of teh shell
can be used.
You may need to pass Refresh
or Explore
depening on the expectation.
Example: Call: {command: bash, args: ["-c", "read -p test"]}
Select the focused node.
Unselect the focused node.
Toggle selection on the focused node.
Clear the selection
AddNodeFilter(NodeFilterApplicable)
Add a filter to explude nodes while exploring directories.
Example: AddNodeFilter: {filter: RelativePathDoesStartWith, input: foo}
RemoveNodeFilter(NodeFilterApplicable)
Remove an existing filter.
Example: RemoveNodeFilter: {filter: RelativePathDoesStartWith, input: foo}
ToggleNodeFilter(NodeFilterApplicable)
Remove a filter if it exists, else, add a it.
Example: ToggleNodeFilter: {filter: RelativePathDoesStartWith, input: foo}
AddNodeFilterFromInput(NodeFilterFromInput)
Add a node filter reading the input from the buffer.
Example: AddNodeFilterFromInput: {filter: RelativePathDoesStartWith}
Reset the node filters back to the default configuration.
LogInfo(String)
Log information message. Stored in $XPLR_LOGS
.
Example: LogInfo: launching satellite
LogSuccess(String)
Log a success message. Stored in $XPLR_LOGS
.
Example: LogSuccess: satellite reached destination
. Stored in $XPLR_LOGS
LogError(String)
Log an error message, Stoted in $XPLR_LOGS
Example: LogError: satellite crashed
Print selected paths if it’s not empty, else, print the focused node’s path.
Print the state of application in YAML format. Helpful for debugging or generating the default configuration file.
Debug(String)
Write the application state to a file, without quitting. Also helpful for debugging.
Terminate the application with a non-zero return code.
Trait Implementations
impl Clone for ExternalMsg
[src]
fn clone(&self) -> ExternalMsg
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ExternalMsg
[src]
impl<'de> Deserialize<'de> for ExternalMsg
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for ExternalMsg
[src]
impl PartialEq<ExternalMsg> for ExternalMsg
[src]
fn eq(&self, other: &ExternalMsg) -> bool
[src]
fn ne(&self, other: &ExternalMsg) -> bool
[src]
impl Serialize for ExternalMsg
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for ExternalMsg
[src]
impl StructuralPartialEq for ExternalMsg
[src]
Auto Trait Implementations
impl RefUnwindSafe for ExternalMsg
impl Send for ExternalMsg
impl Sync for ExternalMsg
impl Unpin for ExternalMsg
impl UnwindSafe for ExternalMsg
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,