summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyohei Uto <im@kyoheiu.dev>2023-07-13 06:47:29 +0900
committerGitHub <noreply@github.com>2023-07-13 06:47:29 +0900
commit536d9004283bd05564ee8b8e10b8f9568bf7fc2f (patch)
tree8422755f9db28bea6cdde00953389c1b7377f109
parent0da09f2c51a6d18c93395a994ee9c538e01b27da (diff)
parentab488045e8e384914a194d7e3b71aa7c3d19c0a5 (diff)
Merge pull request #222 from kyoheiu/developv2.5.0
v2.5.0
-rw-r--r--.github/FUNDING.yml13
-rw-r--r--CHANGELOG.md6
-rw-r--r--Cargo.lock2
-rw-r--r--Cargo.toml2
-rw-r--r--README.md39
-rw-r--r--config.yaml6
-rw-r--r--src/main.rs2
-rw-r--r--src/run.rs2
8 files changed, 34 insertions, 38 deletions
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
deleted file mode 100644
index 0761043..0000000
--- a/.github/FUNDING.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-# These are supported funding model platforms
-
-github:
-patreon: # Replace with a single Patreon username
-open_collective: # Replace with a single Open Collective username
-ko_fi: kyoheiu
-tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
-community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
-liberapay: # Replace with a single Liberapay username
-issuehunt: # Replace with a single IssueHunt username
-otechie: # Replace with a single Otechie username
-lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
-custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 964479c..64bff6a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,12 @@
- Create temp file or directory by `af` or `ad` respectively. This feature has to feel like more "modal", so for now I comment out this feature.
+## v2.5.0 (2023-07-13)
+
+### Added
+
+- Ability to exit to LWD (last workind directory): See Integrations for details.
+
## v2.4.1 (2023-06-21)
### Changed
diff --git a/Cargo.lock b/Cargo.lock
index 338324d..5352311 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -323,7 +323,7 @@ checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91"
[[package]]
name = "felix"
-version = "2.4.1"
+version = "2.5.0"
dependencies = [
"chrono",
"content_inspector",
diff --git a/Cargo.toml b/Cargo.toml
index c8d4542..23204c9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "felix"
-version = "2.4.1"
+version = "2.5.0"
authors = ["Kyohei Uto <im@kyoheiu.dev>"]
edition = "2021"
description = "tui file manager with vim-like key mapping"
diff --git a/README.md b/README.md
index af478df..f2a6637 100644
--- a/README.md
+++ b/README.md
@@ -26,6 +26,12 @@ For more detailed document, visit https://kyoheiu.dev/felix.
## New release
+## v2.5.0 (2023-07-13)
+
+### Added
+
+- Ability to exit to LWD (last workind directory): See Integrations for details.
+
## v2.4.1 (2023-06-21)
### Changed
@@ -43,15 +49,6 @@ For more detailed document, visit https://kyoheiu.dev/felix.
- `:z` - Use `z` instead.
-## v2.3.0 (2023-05-26)
-
-### Changed
-
-- Add extra config file path for macOS: `/Users/$USER/.config/felix/config.yaml` will be read after `$HOME/Library/Application Support/felix/config.yaml`.
-- If config file is not found, or found one is broken, felix launches with the default configuration, without creating new one.
-- If the current directory is read-only, `dd`, `Vd` and `p` is disabled in the first place.
-- Bump up MSRV to 1.65.
-
For more details, see `CHANGELOG.md`.
<a id="status"></a>
@@ -100,15 +97,19 @@ cargo install --path .
## Integrations
-To be able to export your last working directory to the calling shell after exiting from `fx`,
-*-- using the default `ZQ` keybinding --*, you need to add the following to your `.bashrc` or
-`.zshrc` or an equivalent depending on your (POSIX) shell.
-Assuming the `fx` binary can be found in your `PATH`:
+### Exit to last working directory (LWD)
+To export your LWD to the calling shell after exiting from `fx`,
+add the following to your `.bashrc` or
+`.zshrc` or an equivalent depending on your (POSIX) shell.
+***Assuming the `fx` binary can be found in your `PATH`.***
```sh
source <(command fx --init)
```
+*If this is not set, exiting to LWD will fail and show the error message.*
+
+### Others
In addition, you can use felix more conveniently by installing these two apps:
- [zoxide](https://github.com/ajeetdsouza/zoxide): A smarter `cd` command, which
@@ -190,18 +191,18 @@ Esc :Return to the normal mode.
:empty :Empty the trash directory.
:h :Show help.
:q :Exit.
-ZZ :Exit without cd to last working directory (if `match_vim_exit_behavior`
- is `false`).
-ZQ :cd into the last working directory and exit (if `match_vim_exit_behavior`
- is `false`).
+ZZ :Exit without cd to last working directory
+ (if `match_vim_exit_behavior` is `false`).
+ZQ :cd into the last working directory and exit
+ (if shell setting is ready and `match_vim_exit_behavior is `false`).
```
<a id="preview"></a>
## Preview feature
-By default, text files and directories can be previewed.\
-Install `chafa` and you can preview images without any configuration.
+By default, text files and directories can be previewed by pressing `v`.\
+Install `chafa` and you can preview images as well.
<a id="configuration"></a>
diff --git a/config.yaml b/config.yaml
index a26bcee..36c281c 100644
--- a/config.yaml
+++ b/config.yaml
@@ -4,8 +4,10 @@
# default: nvim
# (Optional)
-# Whether to match the behavior of vim exit keybindings
-# i.e. `ZQ` exits without cd to LWD (Last Working Directory) while `ZZ` cd to LWD
+# Whether to match the behavior of Vim's exit keybindings.
+# false -> `ZZ` exits without `cd` to LWD(Last Working Directory) While `ZQ` to LWD
+# true -> vice versa
+# If not set, will default to false.
# match_vim_exit_behavior: false
# (Optional)
diff --git a/src/main.rs b/src/main.rs
index 03ac66c..01e7134 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -2,7 +2,6 @@ mod config;
mod errors;
mod functions;
mod help;
-mod shell;
mod layout;
mod magic_image;
mod magic_packed;
@@ -10,6 +9,7 @@ mod nums;
mod op;
mod run;
mod session;
+mod shell;
mod state;
mod term;
diff --git a/src/run.rs b/src/run.rs
index 2ba94fb..ffeb0c3 100644
--- a/src/run.rs
+++ b/src/run.rs
@@ -159,7 +159,7 @@ fn export_lwd(state: &State) -> Result<(), ()> {
})
} else {
print_warning(
- "The env variable 'SHELL_PID' is not set. Most probably, shell integration is not configured!",
+ "Shell integration may not be configured.",
state.layout.y,
);
return Err(());