summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyohei Uto <im@kyoheiu.dev>2023-04-24 05:13:29 +0900
committerGitHub <noreply@github.com>2023-04-24 05:13:29 +0900
commitd2bbb17081784471c43887eb84d3f63256ce5697 (patch)
treec77a9194e5697b44ab03ff623129a0ee5a0f8186
parent729ffdb72e5b610be20893564f5473aad7f35d23 (diff)
parent61ee275e8eb394f15c2aca6abe6e7c2ab9e7f3a9 (diff)
Merge pull request #195 from kyoheiu/developv2.2.6
v2.2.6: Remove -v option
-rw-r--r--CHANGELOG.md235
-rw-r--r--Cargo.lock2
-rw-r--r--Cargo.toml2
-rw-r--r--README.md72
-rw-r--r--src/functions.rs24
-rw-r--r--src/help.rs2
-rw-r--r--src/main.rs3
7 files changed, 212 insertions, 128 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5702435..5cbf123 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,9 +4,19 @@
## Unreleased
+## v2.2.6 (2023-04-24)
+
+### Removed
+
+- Remove duplicated `-v | --version` option. This is because i) Since some users
+ do not have `cargo` installed, fetching latest version via `cargo` doesn't
+ work for many, and ii) `-h | --help` option can already show the current
+ version.
+
## v2.2.5 (2023-02-12)
### Added
+
- Allow renaming even when item name contains non-ascii chars (i.e. wide chars).
- Key command with arguments is now supported: For example,
```
@@ -14,15 +24,18 @@
'feh -.':
[jpg, jpeg, png, gif, svg, hdr]
```
- this configuration enables you to execute `feh -. <item path>` by `Enter | l | Right`, or `o`.
+ this configuration enables you to execute `feh -. <item path>` by
+ `Enter | l | Right`, or `o`.
- Check for out-of-boundary of the cursor at the top of loop.
### Fixed
+
- Display when using in kitty: Correctly show the cursor and preview.
## v2.2.4 (2023-02-01)
### Fixed
+
- Disable remove_and_yank in the trash dir.
- Clear selection in the select mode if something fails.
- Cursor move after deleting multiple items in select mode.
@@ -30,10 +43,14 @@
## v2.2.3 (2023-01-20)
### Fixed
-- Wide chars handling: Using unicode_width, now felix can properly split file name or previewed texts.
-- Preview space height: When horizontally split, image preview could break the layout. Fixed this by adjusting the height.
+
+- Wide chars handling: Using unicode_width, now felix can properly split file
+ name or previewed texts.
+- Preview space height: When horizontally split, image preview could break the
+ layout. Fixed this by adjusting the height.
### Added
+
- `chafa`'s minimal supported version: >= v1.10.0
- Add pacman installation.
@@ -41,7 +58,10 @@
### Fixed
-- Disable commands with Ctrl or other modifiers unless explicitly implemented. (For now, `Ctrl + r` to redo, `Alt + j` and `Alt + k` to scroll the preview text are implemented) This avoids for example the situation where `Ctrl + d` unintentionally deletes an item.
+- Disable commands with Ctrl or other modifiers unless explicitly implemented.
+ (For now, `Ctrl + r` to redo, `Alt + j` and `Alt + k` to scroll the preview
+ text are implemented) This avoids for example the situation where `Ctrl + d`
+ unintentionally deletes an item.
- Add `create_dir_all` to `config_dir` and `data_local_dir` to avoid error.
- Check if the argument is directory.
@@ -56,10 +76,17 @@
### Changed
- **IMPORTANT**: Trash, log directory, and session file path changed.
- - from v2.2.0, felix will use `dirs::data_local_dir()` to store the deleted items and log files, instead of `dirs::config_dir()`.
- - Due to this change, the path for linux will be `$XDG_DATA_HOME/felix/{Trash, log, .session}`, in most case `/home/user/.local/share/felix/{Trash, log, .session}`. For Windows `{FOLDERID_LocalAppData}\felix\{Trash, log, .session}`, typically `C:\Users\user\AppData\Local\felix\{Trash, log, .session}`. No change for macOS users.
+ - from v2.2.0, felix will use `dirs::data_local_dir()` to store the deleted
+ items and log files, instead of `dirs::config_dir()`.
+ - Due to this change, the path for linux will be
+ `$XDG_DATA_HOME/felix/{Trash, log, .session}`, in most case
+ `/home/user/.local/share/felix/{Trash, log, .session}`. For Windows
+ `{FOLDERID_LocalAppData}\felix\{Trash, log, .session}`, typically
+ `C:\Users\user\AppData\Local\felix\{Trash, log, .session}`. No change for
+ macOS users.
- Note that config file path does not change on any OS!
- - Please don't forget deleting old trash directory and log files if you don't want them anymore.
+ - Please don't forget deleting old trash directory and log files if you don't
+ want them anymore.
- Refactoring overall.
### Added
@@ -69,38 +96,47 @@
### Fixed
- Support NetBSD to open file in a new window.
-- Properly remove broken symlink in Windows as well. Also, when deleting/puttiing a directory, broken symlink(s) in it won't cause any error and will be removed from the file system after deleting/putting.
+- Properly remove broken symlink in Windows as well. Also, when
+ deleting/puttiing a directory, broken symlink(s) in it won't cause any error
+ and will be removed from the file system after deleting/putting.
## v2.1.1 (2022-12-02)
### Fixed
- You can now open a file in a new window on Wayland environment too.
-- Proper handling of wide characters: Even if an item or a info message includes some wide charatcters such as CJK, the layout won't break anymore.
+- Proper handling of wide characters: Even if an item or a info message includes
+ some wide charatcters such as CJK, the layout won't break anymore.
- Fix cursor color after printing the text preview.
### Changed
- Some refactoring around text-printing in the preview space.
-- When you change the sort key, felix refresh the list more efficiently than ever by avoiding to read all the items.
+- When you change the sort key, felix refresh the list more efficiently than
+ ever by avoiding to read all the items.
- Item order(Name): Case-insensitive instead of sensitive.
## v2.1.0 (2022-11-19)
### Added
-- Feature to unpack archive/compressed file to the current directory. Supported types: `tar.gz`(Gzip), `tar.xz`(lzma), `tar.zst`(Zstandard & tar), `zst`(Zstandard), `tar`, zip file format and formats based on it(`zip`, `docx`, ...). To unpack, press `e` on the item.
+- Feature to unpack archive/compressed file to the current directory. Supported
+ types: `tar.gz`(Gzip), `tar.xz`(lzma), `tar.zst`(Zstandard & tar),
+ `zst`(Zstandard), `tar`, zip file format and formats based on it(`zip`,
+ `docx`, ...). To unpack, press `e` on the item.
- The number of dependencies bumps up to around 150 due to this.
### Fixed
-- Bug: In the select mode, the selected item was unintentionally canceled when going up/down.
+- Bug: In the select mode, the selected item was unintentionally canceled when
+ going up/down.
- Delete pointer properly when removing items.
- Instead of panic, return error when `config_dir()` fails.
### Changed
-- Image file detection: Use magic bytes instead of checking the extension. This will enable to detect image more precisely.
+- Image file detection: Use magic bytes instead of checking the extension. This
+ will enable to detect image more precisely.
## v2.0.1 (2022-11-12)
@@ -113,53 +149,77 @@
### Changed
-- Migrated to yaml from toml: New config file will be created at the first launch (In this process you should enter the default command name or choose to use \$EDITOR). No more need to keep `config.toml`.
-- Add the fallback when config file cannot be read: In such a case, you can use the default Config.
+- Migrated to yaml from toml: New config file will be created at the first
+ launch (In this process you should enter the default command name or choose to
+ use \$EDITOR). No more need to keep `config.toml`.
+- Add the fallback when config file cannot be read: In such a case, you can use
+ the default Config.
- HUGE refactoring overall.
### Added
- Horizontal split, in addition to the vertical split. To toggle, press `s`.
-- Syntax highlighting (if possible) in previewed texts. To turn on, state `syntax_hightlight = true` in `config.toml`. you can also choose your theme, either from the default theme set or your favorite .tmtheme.
-- Enable scrolling in the preview space. `Alt + j / Up` goes down, `Alt + k` goes up. Experimental and may have some bugs, and with a big text file the perf issue may arise.
-- Search by keyword. Similar to the filter mode, but this feature do not manipulate the item list, just let users jump to the item that matches the keyword, just like Vim's `/`. `n` and `N` after `/` also works.
+- Syntax highlighting (if possible) in previewed texts. To turn on, state
+ `syntax_hightlight = true` in `config.toml`. you can also choose your theme,
+ either from the default theme set or your favorite .tmtheme.
+- Enable scrolling in the preview space. `Alt + j / Up` goes down, `Alt + k`
+ goes up. Experimental and may have some bugs, and with a big text file the
+ perf issue may arise.
+- Search by keyword. Similar to the filter mode, but this feature do not
+ manipulate the item list, just let users jump to the item that matches the
+ keyword, just like Vim's `/`. `n` and `N` after `/` also works.
- Show permissions on the footer (in unix only).
### Fixed
-- Use `exists()` instead of `File::open()` to check whether the item path is valid when moving between directories. This allows Windows users to use this app at least with the basic commands.
+- Use `exists()` instead of `File::open()` to check whether the item path is
+ valid when moving between directories. This allows Windows users to use this
+ app at least with the basic commands.
- Avoid `unwrap()` / `panic!` as possible and return the proper error.
### Removed
- Removed the filter mode, which is replaced by the keyword search.
- Removed debug print in `make_config_if_not_exists`
-- Removed `use_full_width` and `item_name_length` in `config.toml`. Will always use full width of the terminal.
+- Removed `use_full_width` and `item_name_length` in `config.toml`. Will always
+ use full width of the terminal.
## v1.3.2 (2022-10-23)
### Added
-- Add `std::panic::catch_unwind` to manually restore after a panic rewind. This allows the cursor to be restored and the screen cleared when this app panics.
+- Add `std::panic::catch_unwind` to manually restore after a panic rewind. This
+ allows the cursor to be restored and the screen cleared when this app panics.
### Fixed
-- Fixed: Similar to v1.3.1, attempting to preview a symbolic link to a nonexistent file caused a panic. Now the preview shows `(file not readable)` for such a link.
+- Fixed: Similar to v1.3.1, attempting to preview a symbolic link to a
+ nonexistent file caused a panic. Now the preview shows `(file not readable)`
+ for such a link.
## v1.3.1 (2022-10-21)
### Fixed
-- Attempting to preview a symbolic link to a directory caused a panic. It has been fixed and the preview will now show the contents of the linked directory.
+- Attempting to preview a symbolic link to a directory caused a panic. It has
+ been fixed and the preview will now show the contents of the linked directory.
## v1.3.0 (2022-10-18)
### Changed
-- Huge refactoring: Migrated to crossterm from termion due to the maintainability and future-support for Windows. New module `term.rs` contains (almost) all of the terminal API, so that other modules will not get effected by the future backend change.
+- Huge refactoring: Migrated to crossterm from termion due to the
+ maintainability and future-support for Windows. New module `term.rs` contains
+ (almost) all of the terminal API, so that other modules will not get effected
+ by the future backend change.
- Alongside, some changes are added to show the file path properly in Windows.
- - With crossterm, opening a file in e.g. Vim, it feels as if this app "freezes". This behavior is not what I want, so from v1.3.0, `open_file_in_new_window` can work only if \[exec\] is set in config file, and the extension of the item matches the key.
-- `default` key in the config file become `Option`, so that users can select `$EDITOR` without explicitly setting it up. The initial process of asking users to select the default command has also been fixed accordingly.
+ - With crossterm, opening a file in e.g. Vim, it feels as if this app
+ "freezes". This behavior is not what I want, so from v1.3.0,
+ `open_file_in_new_window` can work only if \[exec\] is set in config file,
+ and the extension of the item matches the key.
+- `default` key in the config file become `Option`, so that users can select
+ `$EDITOR` without explicitly setting it up. The initial process of asking
+ users to select the default command has also been fixed accordingly.
### Fixed
@@ -175,10 +235,12 @@
### Changed
-- Huge refactoring: Instead of `thiserror`, use custom error type to make it easier to handle.
+- Huge refactoring: Instead of `thiserror`, use custom error type to make it
+ easier to handle.
- Bump up chrono version to 0.4.22, clarifing the feature to use.
- Avoid extra heap allocation by using write! instead of push_str/format!.
-- Copied item will be renamed with the suffix "\_{count}" such as "test_1.txt", instead of "test_copied.txt".
+- Copied item will be renamed with the suffix "\_{count}" such as "test_1.txt",
+ instead of "test_copied.txt".
### Fixed
@@ -188,24 +250,32 @@
### Fixed
-- Use full width of the terminal when `use_full_width` in config.toml is not set.
-- Use `cursor::Goto` instead of `cursor::Left` to fix the layout in macOS Terminal.app.
+- Use full width of the terminal when `use_full_width` in config.toml is not
+ set.
+- Use `cursor::Goto` instead of `cursor::Left` to fix the layout in macOS
+ Terminal.app.
- Refactor functions around the layout.
## v1.1.1 (2022-08-11)
### Fixed
-- In the filter mode and shell mode, when you don't have any input, `backspace` now means to return to the normal mode.
-- Also, when you press `Esc` during the filter mode, the cursor position is now restored.
+- In the filter mode and shell mode, when you don't have any input, `backspace`
+ now means to return to the normal mode.
+- Also, when you press `Esc` during the filter mode, the cursor position is now
+ restored.
## v1.1.0 (2022-08-08)
### Changed
-- Use `chafa` instead of `libsixel` & `viuer` to preview image files. This greatly improves the performance and code maintainability, and as a consequence, the number of dependencies is reduced (137 -> 53).
-- With `chafa`, the hi-res image preview is supported in kitty or terminals that support sixel.
-- Files larger than 1GB are no longer previewed in order to improve the performance.
+- Use `chafa` instead of `libsixel` & `viuer` to preview image files. This
+ greatly improves the performance and code maintainability, and as a
+ consequence, the number of dependencies is reduced (137 -> 53).
+- With `chafa`, the hi-res image preview is supported in kitty or terminals that
+ support sixel.
+- Files larger than 1GB are no longer previewed in order to improve the
+ performance.
- Remove profile.release to support older version of Rust.
- Huge refactoring (layout.rs created).
@@ -217,7 +287,11 @@
### Fixed
-- Add thread sleep time after state.open_file(). This is necessary because, with tiling window managers, the window resizing is sometimes slow and felix reloads the layout so quickly that the display may become broken. By the sleep (50ms for now and I think it's not easy to recognize this sleep), this will be avoided.
+- Add thread sleep time after state.open_file(). This is necessary because, with
+ tiling window managers, the window resizing is sometimes slow and felix
+ reloads the layout so quickly that the display may become broken. By the sleep
+ (50ms for now and I think it's not easy to recognize this sleep), this will be
+ avoided.
## v1.0.0 (2022-07-04)
@@ -256,16 +330,21 @@
### Changed
-- `z <keyword>` works without prefix `:` (jump to a directory that matches the keyword).
+- `z <keyword>` works without prefix `:` (jump to a directory that matches the
+ keyword).
- Refactor: Use redraw() and reload() instead of multiple methods.
-- Better config: If config file not found, now you can interactively set the default command.
-- In the filter mode, press `h` or `Left` to return to the normal mode and reload the current directory's contents.
+- Better config: If config file not found, now you can interactively set the
+ default command.
+- In the filter mode, press `h` or `Left` to return to the normal mode and
+ reload the current directory's contents.
## v0.9.4 (2022-06-08)
### Added
-- Hi-res image preview is enabled if i) your terminal supports sixel, and ii) you've preinstalled `libsixel`. If not, images are printed by blocks as before.
+- Hi-res image preview is enabled if i) your terminal supports sixel, and ii)
+ you've preinstalled `libsixel`. If not, images are printed by blocks as
+ before.
### Changed
@@ -275,14 +354,18 @@
### Added
-- `-l` option creates a log file in `$XDG_CONFIG_HOME/felix/log`. Information such as put, delete, rename, emptying the trash directory, etc. will be recorded.
+- `-l` option creates a log file in `$XDG_CONFIG_HOME/felix/log`. Information
+ such as put, delete, rename, emptying the trash directory, etc. will be
+ recorded.
- Add message when there are no operations left to undo/redo.
### Changed
- Simplify the info line(below the current directory information).
-- Make rename information more understandable("New name: " instead of "&#8658;").
-- Use struct `Operation` to express the manipulation within the app (put/delete/rename) and implement some methods.
+- Make rename information more understandable("New name: " instead of
+ "&#8658;").
+- Use struct `Operation` to express the manipulation within the app
+ (put/delete/rename) and implement some methods.
- Refactor overall.
### Fixed
@@ -293,19 +376,26 @@
### Added
-- [Experimental] Image preview on the right half of the terminal (press `v`). This feature uses `viuer`, and high resolution preview, which can be used in kitty or terminals that support sixel, is disabled due to the clearance issues.
+- [Experimental] Image preview on the right half of the terminal (press `v`).
+ This feature uses `viuer`, and high resolution preview, which can be used in
+ kitty or terminals that support sixel, is disabled due to the clearance
+ issues.
- create `viuer` and `image` to preview the image.
### Fixed
- Fix text preview bug around new line that occurs when it has tab character.
-- file_ext in ItemInfo is now always lowercased to speed up matching with the extension map.
-- Disable renaming non-ascii items: Wide characters such as CJK or characters that do not match our intuition caused panic, so before editing, item name is now checked if it contains only ascii characters.
+- file_ext in ItemInfo is now always lowercased to speed up matching with the
+ extension map.
+- Disable renaming non-ascii items: Wide characters such as CJK or characters
+ that do not match our intuition caused panic, so before editing, item name is
+ now checked if it contains only ascii characters.
### Changed
- Version check option now uses -v | --version, instead of -c | --check.
-- Refactor: Remove magic number and use variable with proper name in the filter and shell mode.
+- Refactor: Remove magic number and use variable with proper name in the filter
+ and shell mode.
- Restore debug print, which works in debug mode(RUST_LOG has some value).
- Use `simplelog` instead of `env_logger` to create the log file.
@@ -324,15 +414,20 @@
### Added
- CHANGELOG.md
-- New command: `v` to toggle whether to show i) part of the content for text file (no wrapping and static), or ii) contents tree for directory. Note that this preview feature may not work effectively with small terminal.
-- trying to make felix user guide (just to show how to use each commands) by mdbook
+- New command: `v` to toggle whether to show i) part of the content for text
+ file (no wrapping and static), or ii) contents tree for directory. Note that
+ this preview feature may not work effectively with small terminal.
+- trying to make felix user guide (just to show how to use each commands) by
+ mdbook
### Changed
-- felix now works with smaller terminal size (4 rows and 4 columns is the minimum). If column is fewer than 28, modified time is not displayed.
+- felix now works with smaller terminal size (4 rows and 4 columns is the
+ minimum). If column is fewer than 28, modified time is not displayed.
- Huge refactoring overall.
- use `struct colors` for `state.layout.colors`
- - `is_hidden` moved to `ItemInfo`'s field, make it easier to toggle show/hidden items
+ - `is_hidden` moved to `ItemInfo`'s field, make it easier to toggle
+ show/hidden items
- in `open_files` method, use `ItemInfo`'s existing field to get extension
- `Iteminfo.ext` to `Option<String>`
- split `move_cursor` method to multiple methods
@@ -340,20 +435,25 @@
### Fixed
-- Show help text correctly in small window size (scrollable with `j` | `k` | `Up` | `Down`)
-- 'P' to print manipulation lists (put/delete/rename) is changed to work only when RUST_LOG has a value.
+- Show help text correctly in small window size (scrollable with `j` | `k` |
+ `Up` | `Down`)
+- 'P' to print manipulation lists (put/delete/rename) is changed to work only
+ when RUST_LOG has a value.
## v0.8.1 (2022-05-04)
### Fixed
-- undo/redo order when new operations occurs. Now manipulation list will be "branched", which means undone operations will be discarded when new manipulation is pushed, so that redo cannot lead to an error.
+- undo/redo order when new operations occurs. Now manipulation list will be
+ "branched", which means undone operations will be discarded when new
+ manipulation is pushed, so that redo cannot lead to an error.
## v0.8.0 (2022-05-03)
### Added
-- New commands: 'u' to undo and 'Ctrl + r' to redo. Targets of these new commands are put/delete/rename.
+- New commands: 'u' to undo and 'Ctrl + r' to redo. Targets of these new
+ commands are put/delete/rename.
### Fixed
@@ -374,13 +474,17 @@
### Added
-- New configuration: You can now use the full width of terminal by setting `use_full_width` to true (false by default). I hope this will lead to a better user experience. _For those who use <=0.6.0, felix can work without replacing config.toml because `use_full_width` is an option._
+- New configuration: You can now use the full width of terminal by setting
+ `use_full_width` to true (false by default). I hope this will lead to a better
+ user experience. _For those who use <=0.6.0, felix can work without replacing
+ config.toml because `use_full_width` is an option._
## v0.6.0 (2022-04-13)
### Added
-- ':z <keyword>' lets you jump to a directory that matches the keyword. (zoxide required)
+- ':z <keyword>' lets you jump to a directory that matches the keyword. (zoxide
+ required)
- :cd | :z => Go to home directory.
### Fixed
@@ -391,7 +495,10 @@
### Added
-- New option for config: Now you can set the max length of the item name to be displayed (if the terminal size is not enough, it will be automatically adjusted). It's optional, so you can use your config file in < v.0.5.1 as is. See `config.toml` for details.
+- New option for config: Now you can set the max length of the item name to be
+ displayed (if the terminal size is not enough, it will be automatically
+ adjusted). It's optional, so you can use your config file in < v.0.5.1 as is.
+ See `config.toml` for details.
## v0.5.1 (2022-03-30)
@@ -436,7 +543,8 @@
### Added
- enable to show/hide hidden items
-- felix keeps the state of show_hidden(whether to show hidden items) and sort_by(by name or by modified time): The change remains after exit.
+- felix keeps the state of show_hidden(whether to show hidden items) and
+ sort_by(by name or by modified time): The change remains after exit.
## v0.3.2 (2022-01-14)
@@ -491,7 +599,8 @@
### Removed
-- Remove Ctrl + c for copying item name to the clipboard (in order to reduce build dependency)
+- Remove Ctrl + c for copying item name to the clipboard (in order to reduce
+ build dependency)
### Changed
@@ -590,7 +699,8 @@
### Added
-- Command argument enabled: fm <directory path> shows items in the path (both relative and absolute can be used).
+- Command argument enabled: fm <directory path> shows items in the path (both
+ relative and absolute can be used).
- `H` to show help.
## v0.1.3 (2021-10-22)
@@ -603,4 +713,5 @@
### Added
-- Add `FileType::Symlink` to change color of symlink item (color configurable in `config.toml`).
+- Add `FileType::Symlink` to change color of symlink item (color configurable in
+ `config.toml`).
diff --git a/Cargo.lock b/Cargo.lock
index b5dff0e..ee1a105 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -371,7 +371,7 @@ checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797"
[[package]]
name = "felix"
-version = "2.2.5"
+version = "2.2.6"
dependencies = [
"chrono",
"content_inspector",
diff --git a/Cargo.toml b/Cargo.toml
index cd3cf01..e19ecf1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "felix"
-version = "2.2.5"
+version = "2.2.6"
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 536ddf4..393a908 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,14 @@
-[![crates.io](https://img.shields.io/crates/v/felix)](https://crates.io/crates/felix) ![arch linux](https://img.shields.io/archlinux/v/community/x86_64/felix-rs) ![MSRV](https://img.shields.io/badge/MSRV-1.60.0-orange)
+[![crates.io](https://img.shields.io/crates/v/felix)](https://crates.io/crates/felix)
+![arch linux](https://img.shields.io/archlinux/v/community/x86_64/felix-rs)
+![MSRV](https://img.shields.io/badge/MSRV-1.60.0-orange)
# _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)
@@ -23,9 +26,19 @@ For more detailed document, visit https://kyoheiu.dev/felix.
## New release
+## v2.2.6 (2023-04-24)
+
+### Removed
+
+- Remove duplicated `-v | --version` option. This is because i) Since some users
+ do not have `cargo` installed, fetching latest version via `cargo` doesn't
+ work for many, and ii) `-h | --help` option can already show the current
+ version.
+
## v2.2.5 (2023-02-12)
### Added
+
- Allow renaming even when item name contains non-ascii chars (i.e. wide chars).
- Key command with arguments is now supported: For example,
```
@@ -33,10 +46,12 @@ For more detailed document, visit https://kyoheiu.dev/felix.
'feh -.':
[jpg, jpeg, png, gif, svg, hdr]
```
- this configuration enables you to execute `feh -. <item path>` by `Enter | l | Right`, or `o`.
+ this configuration enables you to execute `feh -. <item path>` by
+ `Enter | l | Right`, or `o`.
- Check for out-of-boundary of the cursor at the top of loop.
### Fixed
+
- Display when using in kitty: Correctly show the cursor and preview.
For more details, see `CHANGELOG.md`.
@@ -52,13 +67,21 @@ For more details, see `CHANGELOG.md`.
| MacOS | works |
| Windows | not fully tested yet |
-_For Windows users: From v1.3.0, it can be at least compiled on Windows (see `.github/workflows/install_test.yml`.) If you're interested, please try and report any problems._
+_For Windows users: From v1.3.0, it can be at least compiled on Windows (see
+`.github/workflows/install_test.yml`.) If you're interested, please try and
+report any problems._
<a id="installation"></a>
## Installation
-### Prerequisites
+| package | installation command | notes |
+| ---------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
+| crates.io | `cargo install felix` | |
+| Arch Linux | `pacman -S felix-rs` | The binary name is `felix` if you install via pacman. Alias `fx='felix'` if you want, as this document (and other installations) uses `fx`. |
+| NetBSD | `pkgin install felix` | |
+
+### From this repository
- Make sure that `gcc` is installed.
- MSRV(Minimum Supported rustc Version): **1.60.0**
@@ -69,31 +92,6 @@ Update Rust if rustc < 1.60:
rustup update
```
-### From crates.io
-
-```
-cargo install felix
-```
-
-### Arch Linux
-
-```
-pacman -S felix-rs
-```
-
-*The launcher binary name is `felix` via pacman.
-Alias fx='felix' if you want, as this document (and other installations) uses `fx`.*
-
-### NetBSD
-
-Available from the official repositories.
-
-```
-pkgin install felix
-```
-
-### From this repository
-
```
git clone https://github.com/kyoheiu/felix.git
cd felix
@@ -106,8 +104,11 @@ cargo install --path .
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.
-- [chafa](https://hpjansson.org/chafa/): Terminal graphics for the 21st century, by which you can preview images in felix. ***chafa must be v1.10.0 or later.***
+- [zoxide](https://github.com/ajeetdsouza/zoxide): A smarter `cd` command, which
+ enables you to jump to a directory that matches the keyword in felix.
+- [chafa](https://hpjansson.org/chafa/): Terminal graphics for the 21st century,
+ by which you can preview images in felix. _**chafa must be v1.10.0 or
+ later.**_
These apps do not need any configuration to use with felix!
@@ -115,7 +116,7 @@ These apps do not need any configuration to use with felix!
## Usage
-*If you install this app via pacman, the default binary name is `felix`.*
+_If you install this app via pacman, the default binary name is `felix`._
```
`fx` => Show items in the current directory.
@@ -127,7 +128,6 @@ Both relative and absolute path available.
```
`-h` | `--help` => Print help.
-`-v` | `--version` => Check update.
`-l` | `--log` => Launch the app, automatically generating a log file in `{data_local_dir}/felix/log`.
```
@@ -179,7 +179,7 @@ Esc :Return to the normal mode.
## 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>
diff --git a/src/functions.rs b/src/functions.rs
index ac7a4d1..9f453ed 100644
--- a/src/functions.rs
+++ b/src/functions.rs
@@ -252,30 +252,6 @@ pub fn init_log(data_local_path: &Path) -> Result<(), FxError> {
Ok(())
}
-/// Check the latest version of felix.
-pub fn check_version() -> Result<(), FxError> {
- let output = std::process::Command::new("cargo")
- .args(["search", "felix", "--limit", "1"])
- .output()?
- .stdout;
- if !output.is_empty() {
- if let Ok(ver) = std::str::from_utf8(&output) {
- let latest: String = ver.chars().skip(9).take_while(|x| *x != '\"').collect();
- let current = env!("CARGO_PKG_VERSION");
- if latest != current {
- println!("felix v{}: Latest version is {}.", current, latest);
- } else {
- println!("felix v{}: Up to date.", current);
- }
- } else {
- println!("Cannot read the version.");
- }
- } else {
- println!("Cannot fetch the latest version: Check your internet connection.");
- }
- Ok(())
-}
-
/// linux-specific: Convert u32 to permission-ish string.
pub fn convert_to_permissions(permissions: u32) -> String {
let permissions = format!("{permissions:o}");
diff --git a/src/help.rs b/src/help.rs
index 5b0ce9a..3450339 100644
--- a/src/help.rs
+++ b/src/help.rs
@@ -1,5 +1,5 @@
/// Help text.
-pub const HELP: &str = "# felix v2.2.5
+pub const HELP: &str = "# felix v2.2.6
A simple TUI file manager with vim-like keymapping.
## Usage
diff --git a/src/main.rs b/src/main.rs
index 58b122f..0dc3bf4 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -31,9 +31,6 @@ fn main() -> Result<(), errors::FxError> {
"-h" | "--help" => {
print!("{}", help::HELP);
}
- "-v" | "--version" => {
- functions::check_version()?;
- }
"-l" | "--log" => {
if let Err(e) = run::run(
std::env::current_dir().unwrap_or_else(|_| PathBuf::from(".")),