mgunyho / tere

Terminal file explorer
European Union Public License 1.2
1.67k stars 36 forks source link

Windows Terminal Preview maybe others help ... help #81

Closed AddictArts closed 1 year ago

AddictArts commented 1 year ago

In Terminal Preview the ? does not trigger the Help action, instead it searches.

To work around this use --map Ctrl-h:Help or any other mapping, I believe a modifier like Ctrl is needed others it will search.

Or

   5   │ function Invoke-Tere() {
   6   │     $result = . (Get-Command -CommandType Application tere) --map Ctrl-h:Help $args
   7   │
   8   │     if ($result) {
   9   │         Set-Location $result
  10   │     }
  11   │ }
  12   │ Set-Alias tere Invoke-Tere
mgunyho commented 1 year ago

Hmm, interesting. Does it happen with a non-preview version of the terminal?

If you are able to compile Rust code yourself, could you try to clone this repo, and run cargo run in the folder examples/print_key and see what pressing ? prints?

holly-hacker commented 1 year ago

I noticed the same thing in Alacritty on Windows. Using the crokey example, I get the following output when pressing ? (using SHIFT and /), ESC and CTRL+C in order.

C:\Users\-snip-\Projects\Other\crokey\examples\print_key〉cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.06s
     Running `C:\Users\-snip-\Projects\Other\crokey\target\debug\print_key.exe`

Type any key combination (remember that your terminal intercepts many ones)
There's no help on this app
You typed Esc
Arg! You savagely killed me with a Ctrl-c
mgunyho commented 1 year ago

So it seems that the question-mark gets correctly passed to the terminal. The crokey example handles both key('?') and key(shift-'?'). Perhaps the Windows terminal sends the latter? If you run tere with --map "shift-?:Help", does it work?

holly-hacker commented 1 year ago

Passing the --map parameter seems to fix the problem on both Alacritty and Windows Terminal.

mgunyho commented 1 year ago

This is now fixed in v1.3.1.