dzfrias / projectable

:dizzy: A TUI file manager built for projects
https://dzfrias.dev/blog/projectable
MIT License
398 stars 12 forks source link

Help Menu seems to be broken #19

Closed nikbrunner closed 1 year ago

nikbrunner commented 1 year ago

First of all, thank you for this great application! I noticed two problems. (I will create one issue for each)

The first problem is that the help menu seems to be broken, when I open it with ?

Screenshot 2023-07-03 at 09 31 55

This also worked before (1.1.0). After upgrading with brew to 1.3.0 the Help Menu seemed to fail.

If you need more information, please let me know. Thank you! 😃

Version Info

[I] ➜ brew info projectable
==> dzfrias/formulae/projectable: stable 1.3.0
Highly configurable TUI project manager
https://github.com/dzfrias/projectable
/opt/homebrew/Cellar/projectable/1.3.0 (7 files, 7.1MB) *
  Built from source on 2023-07-03 at 09:08:58
From: https://github.com/dzfrias/homebrew-formulae/blob/HEAD/Formula/projectable.rb
==> Dependencies
Build: rust ✔

My config

# General settings
project_roots = [".git"]
esc_to_close = true

# Keys
up = ["k", "up"]
down = ["j", "down"]
quit = "q"
help = "?"
all_up = "g"
all_down = "G"
open = "enter"
# Kill processes started by projectable
kill_processes = "ctrl-c"
# Defaults to $EDITOR
editor_cmd = "nvim"

# General styles
selected = { color = "black", bg = "magenta" }
popup_border_style = { color = "white" }
help_key_style = { color = "lightcyan", mods = ["bold"] }

[special_commands]
# "<GLOB>" = ["<COMMAND>"] format
"package.json" = ["npm run dev"]

[commands]
ctrl-g = "!!lazygit"
ctrl-v = "tmux split-window -h nvim {}"
ctrl-x = "tmux split-window -v nvim {}"

[preview]
preview_cmd = "cat {}"
git_pager = "delta"
down_key = "ctrl-d"
up_key = "ctrl-u"
scroll_amount = 10

border_color = { color = "cyan" }
scroll_bar_color = { color = "magenta" }
# Unreached part of the scroll bar
unreached_bar_color = { color = "blue" }

[filetree]
# Whether to show git diffs
use_git = true
# Ignore certain elobs
ignore = []
use_gitignore = true
refresh_time = 1000
dirs_first = true
show_hidden_by_default = false
# Whether to show special commands in fuzzy matching view. The alternative is
# a list-style view
special_commands_fuzzy = true

# Keys
special_command = "v"
down_three = "ctrl-n"
up_three = "ctrl-p"
exec_cmd = ":"
delete = "d"
search = "/"
clear = '\'
new_file = "n"
new_dir = "N"
rename = "r"
move_path = "R"
git_filter = "T"
diff_mode = "t"
open_all = "o"
close_all = "O"
mark_selected = "m"
open_under = "l"
close_under = "h"
show_dotfiles = "."
focus = "f"

# Colors
dir_style = { color = "blue", mods = ["italic"] }
filtered_out_message = { color = "yellow" }
border_color = { color = "magenta" }
# Color of git added files
git_added_style = { color = "green" }
git_new_style = { color = "red" }
git_modified_style = { color = "blue" }
# Color of marked files
marks_style = { color = "yellow" }

[log]
border_color = { color = "blue" }

info = { color = "white" }
error = { color = "red" }
debug = { color = "green" }

# Only shown when run with the --debug option
warn = { color = "red" }
trace = { color = "magenta" }

[marks]
# Whether to show marks as relative paths or not
relative = true
open = "M"
delete = "d"

# Color of marks in marks window
mark_style = { color = "white" }
Absobel commented 1 year ago

Found the problem, the help menu doesn't work when there are two keys for one action.

dzfrias commented 1 year ago

Thanks for reporting the issue! You're right Absobel, it was how I formatted the list of keys. I pushed a fix with 379c5978ec5242bbec2b595e53b0b478de4bb1dc! I'll probably make a patch release soon so the help menu works again!

nikbrunner commented 1 year ago

Great! Thank you very much! :)