summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorAhmed ElSamhaa <assamhaa@gmail.com>2023-04-05 06:35:00 +0300
committerAhmed ElSamhaa <assamhaa@gmail.com>2023-04-05 06:35:00 +0300
commit91d3f16d66da3e9bebd3b1097e011ca59cfe645f (patch)
tree99f278503718913816fa978a8b8b7105a425713e /README.md
parentbd025a06bfc38843073a36a033671e0372d459b9 (diff)
Adds ability to cd into last changed-to directory with ZZ
- Adds a new keymap ZQ to exit fx without changind the directory - Adds to README.md a tip to add the function to better integrate with unix shells
Diffstat (limited to 'README.md')
-rw-r--r--README.md30
1 files changed, 25 insertions, 5 deletions
diff --git a/README.md b/README.md
index 536ddf4..5c8776f 100644
--- a/README.md
+++ b/README.md
@@ -2,10 +2,10 @@
# _felix_
-A tui file manager with Vim-like key mapping, written in Rust.
+A tui file manager with Vim-like key mapping, written in Rust.
Fast, simple, and easy to configure & use.
-For an overview of this app, take a look at this README, especially [key manual](#key-manual).
+For an overview of this app, take a look at this README, especially [key manual](#key-manual).
For more detailed document, visit https://kyoheiu.dev/felix.
- [New release](#new-release)
@@ -81,7 +81,7 @@ cargo install felix
pacman -S felix-rs
```
-*The launcher binary name is `felix` via pacman.
+*The launcher binary name is `felix` via pacman.
Alias fx='felix' if you want, as this document (and other installations) uses `fx`.*
### NetBSD
@@ -104,6 +104,25 @@ cargo install --path .
## Integrations
+In order for the shortcut `ZZ` to work, you need to add the following to your `.bashrc` or `.zshrc`
+or an equivalent depending on your (POSIX) shell:
+```sh
+fx() {
+ SHELL_PID=$$ command fx
+ cd "$(
+ set -e
+ if [ -n "$XDG_RUNTIME_DIR" ]; then
+ local runtime_dir="$XDG_RUNTIME_DIR/felix"
+ else
+ local runtime_dir="$TMPDIR/felix"
+ fi
+ cat "$runtime_dir/$$"
+ # Clean up the current and any leftover lwd files
+ find "$runtime_dir" \( -type f -mtime +1s -or -name $$ \) -delete
+ )"
+}
+```
+
In addition, you can use felix more conveniently by installing these two apps:
- [zoxide](https://github.com/ajeetdsouza/zoxide): A smarter `cd` command, which enables you to jump to a directory that matches the keyword in felix.
@@ -172,14 +191,15 @@ Esc :Return to the normal mode.
:trash :Go to the trash directory.
:empty :Empty the trash directory.
:h :Show help.
-:q / ZZ :Exit.
+:ZZ :cd to current directory and Exit.
+:q / ZQ :Exit.
```
<a id="preview"></a>
## Preview feature
-By default, text files and directories can be previewed.
+By default, text files and directories can be previewed.
Install `chafa` and you can preview images without any configuration.
<a id="configuration"></a>