broot: up/down arrow keys do nothing.

I just installed broot for the first time with ‘cargo install broot’ on ubuntu linux 16.04 using bash.

To Reproduce After invoking br ~, I see a directory tree, but navigation keys such as up/down arrow and pg up/down do nothing.

Expected behavior upon pressing down arrow or up arrow, the selected line should move down or up accordingly.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 18 (5 by maintainers)

Most upvoted comments

Necroposting here, but want to add my 2 cents, so that others bang their heads against the wall a little less.

In my case dropping zle -N zle-line-finish from my .zshrc file remedied broot up and down keys not working.

Here is the log if I set EDITOR="nvim". I pressed up and down, and then :q to exit. Note that I am sshing to a Mac VM, and that’s why I was using a terminal editor. The issue happens kind of randomly (sometimes it works).

───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: broot.log
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ 03:23:11.722 [INFO] cli_log::init: Starting broot v1.6.1 with log level DEBUG
   2   │ 03:23:11.725 [DEBUG] broot::cli: Conf::from_default_location() took 472.32µs
   3   │ 03:23:11.725 [DEBUG] broot::cli: config: Conf {
   4   │     files: [
   5   │         "/Users/amin/.config/broot/conf.hjson",
   6   │     ],
   7   │     default_flags: None,
   8   │     date_time_format: None,
   9   │     verbs: [
  10   │         VerbConf {
  11   │             invocation: Some(
  12   │                 "edit",
  13   │             ),
  14   │             internal: None,
  15   │             external: None,
  16   │             execution: Some(
  17   │                 String(
  18   │                     "$EDITOR +{line} {file}",
  19   │                 ),
  20   │             ),
  21   │             cmd: None,
  22   │             cmd_separator: None,
  23   │             key: None,
  24   │             keys: [],
  25   │             shortcut: Some(
  26   │                 "e",
  27   │             ),
  28   │             leave_broot: Some(
  29   │                 false,
  30   │             ),
  31   │             from_shell: None,
  32   │             apply_to: None,
  33   │             set_working_dir: None,
  34   │             working_dir: None,
  35   │             description: None,
  36   │             auto_exec: None,
  37   │         },
  38   │         VerbConf {
  39   │             invocation: Some(
  40   │                 "create {subpath}",
  41   │             ),
  42   │             internal: None,
  43   │             external: None,
  44   │             execution: Some(
  45   │                 String(
  46   │                     "$EDITOR {directory}/{subpath}",
  47   │                 ),
  48   │             ),
  49   │             cmd: None,
  50   │             cmd_separator: None,
  51   │             key: None,
  52   │             keys: [],
  53   │             shortcut: None,
  54   │             leave_broot: Some(
  55   │                 false,
  56   │             ),
  57   │             from_shell: None,
  58   │             apply_to: None,
  59   │             set_working_dir: None,
  60   │             working_dir: None,
  61   │             description: None,
  62   │             auto_exec: None,
  63   │         },
  64   │         VerbConf {
  65   │             invocation: Some(
  66   │                 "git_diff",
  67   │             ),
  68   │             internal: None,
  69   │             external: None,
  70   │             execution: Some(
  71   │                 String(
  72   │                     "git difftool -y {file}",
  73   │                 ),
  74   │             ),
  75   │             cmd: None,
  76   │             cmd_separator: None,
  77   │             key: None,
  78   │             keys: [],
  79   │             shortcut: Some(
  80   │                 "gd",
  81   │             ),
  82   │             leave_broot: Some(
  83   │                 false,
  84   │             ),
  85   │             from_shell: None,
  86   │             apply_to: None,
  87   │             set_working_dir: None,
  88   │             working_dir: None,
  89   │             description: None,
  90   │             auto_exec: None,
  91   │         },
  92   │         VerbConf {
  93   │             invocation: Some(
  94   │                 "backup {version}",
  95   │             ),
  96   │             internal: None,
  97   │             external: None,
  98   │             execution: Some(
  99   │                 String(
 100   │                     "cp -r {file} {parent}/{file-stem}-{version}{file-dot-extension}",
 101   │                 ),
 102   │             ),
 103   │             cmd: None,
 104   │             cmd_separator: None,
 105   │             key: Some(
 106   │                 "ctrl-b",
 107   │             ),
 108   │             keys: [],
 109   │             shortcut: None,
 110   │             leave_broot: Some(
 111   │                 false,
 112   │             ),
 113   │             from_shell: None,
 114   │             apply_to: None,
 115   │             set_working_dir: None,
 116   │             working_dir: None,
 117   │             description: None,
 118   │             auto_exec: Some(
 119   │                 false,
 120   │             ),
 121   │         },
 122   │         VerbConf {
 123   │             invocation: Some(
 124   │                 "terminal",
 125   │             ),
 126   │             internal: None,
 127   │             external: None,
 128   │             execution: Some(
 129   │                 String(
 130   │                     "$SHELL",
 131   │                 ),
 132   │             ),
 133   │             cmd: None,
 134   │             cmd_separator: None,
 135   │             key: Some(
 136   │                 "ctrl-t",
 137   │             ),
 138   │             keys: [],
 139   │             shortcut: None,
 140   │             leave_broot: Some(
 141   │                 false,
 142   │             ),
 143   │             from_shell: None,
 144   │             apply_to: None,
 145   │             set_working_dir: Some(
 146   │                 true,
 147   │             ),
 148   │             working_dir: None,
 149   │             description: None,
 150   │             auto_exec: None,
 151   │         },
 152   │     ],
 153   │     skin: None,
 154   │     special_paths: {},
 155   │     search_modes: None,
 156   │     disable_mouse_capture: None,
 157   │     cols_order: None,
 158   │     show_selection_mark: Some(
 159   │         true,
 160   │     ),
 161   │     ext_colors: {},
 162   │     syntax_theme: None,
 163   │     true_colors: None,
 164   │     icon_theme: None,
 165   │     modal: None,
 166   │     max_panels_count: None,
 167   │     quit_on_last_cancel: None,
 168   │     file_sum_threads_count: None,
 169   │ }
 170   │ 03:23:11.741 [DEBUG] broot::tree_build::builder: GitIgnorer::default() took 104ns
 171   │ 03:23:11.754 [DEBUG] broot::app::app: display panel took 1.440876ms
 172   │ 03:23:11.756 [INFO] broot::app::app: pending_tasks took 946ns
 173   │ 03:23:13.946 [INFO] broot::app::app: event: Key(KeyEvent { code: Esc, modifiers: NONE })
 174   │ 03:23:13.948 [DEBUG] broot::app::app: command after add_event: Internal { internal: back, input_invocation: None }
 175   │ 03:23:13.953 [DEBUG] broot::app::app: display panel took 4.208174ms
 176   │ 03:23:13.954 [INFO] broot::app::app: pending_tasks took 1.454µs
 177   │ 03:23:14.889 [INFO] broot::app::app: event: Key(KeyEvent { code: Char(':'), modifiers: NONE })
 178   │ 03:23:14.890 [DEBUG] broot::app::app: command after add_event: VerbEdit(VerbInvocation { name: "", args: None, bang: false })
 179   │ 03:23:14.897 [DEBUG] broot::app::app: display panel took 5.846348ms
 180   │ 03:23:14.898 [INFO] broot::app::app: pending_tasks took 717ns
 181   │ 03:23:15.072 [INFO] broot::app::app: event: Key(KeyEvent { code: Char('q'), modifiers: NONE })
 182   │ 03:23:15.073 [DEBUG] broot::app::app: command after add_event: VerbEdit(VerbInvocation { name: "q", args: None, bang: false })
 183   │ 03:23:15.079 [DEBUG] broot::app::app: display panel took 4.933129ms
 184   │ 03:23:15.081 [INFO] broot::app::app: pending_tasks took 1.255µs
 185   │ 03:23:15.322 [INFO] broot::app::app: event: Key(KeyEvent { code: Enter, modifiers: NONE })
 186   │ 03:23:15.323 [DEBUG] broot::app::app: command after add_event: VerbInvocate(VerbInvocation { name: "q", args: None, bang: false })
 187   │ 03:23:15.325 [DEBUG] broot::task_sync: dead dam
 188   │ 03:23:15.328 [INFO] broot: bye

Here is another one that I pressed down a couple of times, then exited with CTRL+C

───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: broot.log
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ 03:30:06.640 [INFO] cli_log::init: Starting broot v1.6.1 with log level DEBUG
   2   │ 03:30:06.643 [DEBUG] broot::cli: Conf::from_default_location() took 804.731µs
   3   │ 03:30:06.644 [DEBUG] broot::cli: config: Conf {
   4   │     files: [
   5   │         "/Users/amin/.config/broot/conf.hjson",
   6   │     ],
   7   │     default_flags: None,
   8   │     date_time_format: None,
   9   │     verbs: [
  10   │         VerbConf {
  11   │             invocation: Some(
  12   │                 "edit",
  13   │             ),
  14   │             internal: None,
  15   │             external: None,
  16   │             execution: Some(
  17   │                 String(
  18   │                     "$EDITOR +{line} {file}",
  19   │                 ),
  20   │             ),
  21   │             cmd: None,
  22   │             cmd_separator: None,
  23   │             key: None,
  24   │             keys: [],
  25   │             shortcut: Some(
  26   │                 "e",
  27   │             ),
  28   │             leave_broot: Some(
  29   │                 false,
  30   │             ),
  31   │             from_shell: None,
  32   │             apply_to: None,
  33   │             set_working_dir: None,
  34   │             working_dir: None,
  35   │             description: None,
  36   │             auto_exec: None,
  37   │         },
  38   │         VerbConf {
  39   │             invocation: Some(
  40   │                 "create {subpath}",
  41   │             ),
  42   │             internal: None,
  43   │             external: None,
  44   │             execution: Some(
  45   │                 String(
  46   │                     "$EDITOR {directory}/{subpath}",
  47   │                 ),
  48   │             ),
  49   │             cmd: None,
  50   │             cmd_separator: None,
  51   │             key: None,
  52   │             keys: [],
  53   │             shortcut: None,
  54   │             leave_broot: Some(
  55   │                 false,
  56   │             ),
  57   │             from_shell: None,
  58   │             apply_to: None,
  59   │             set_working_dir: None,
  60   │             working_dir: None,
  61   │             description: None,
  62   │             auto_exec: None,
  63   │         },
  64   │         VerbConf {
  65   │             invocation: Some(
  66   │                 "git_diff",
  67   │             ),
  68   │             internal: None,
  69   │             external: None,
  70   │             execution: Some(
  71   │                 String(
  72   │                     "git difftool -y {file}",
  73   │                 ),
  74   │             ),
  75   │             cmd: None,
  76   │             cmd_separator: None,
  77   │             key: None,
  78   │             keys: [],
  79   │             shortcut: Some(
  80   │                 "gd",
  81   │             ),
  82   │             leave_broot: Some(
  83   │                 false,
  84   │             ),
  85   │             from_shell: None,
  86   │             apply_to: None,
  87   │             set_working_dir: None,
  88   │             working_dir: None,
  89   │             description: None,
  90   │             auto_exec: None,
  91   │         },
  92   │         VerbConf {
  93   │             invocation: Some(
  94   │                 "backup {version}",
  95   │             ),
  96   │             internal: None,
  97   │             external: None,
  98   │             execution: Some(
  99   │                 String(
 100   │                     "cp -r {file} {parent}/{file-stem}-{version}{file-dot-extension}",
 101   │                 ),
 102   │             ),
 103   │             cmd: None,
 104   │             cmd_separator: None,
 105   │             key: Some(
 106   │                 "ctrl-b",
 107   │             ),
 108   │             keys: [],
 109   │             shortcut: None,
 110   │             leave_broot: Some(
 111   │                 false,
 112   │             ),
 113   │             from_shell: None,
 114   │             apply_to: None,
 115   │             set_working_dir: None,
 116   │             working_dir: None,
 117   │             description: None,
 118   │             auto_exec: Some(
 119   │                 false,
 120   │             ),
 121   │         },
 122   │         VerbConf {
 123   │             invocation: Some(
 124   │                 "terminal",
 125   │             ),
 126   │             internal: None,
 127   │             external: None,
 128   │             execution: Some(
 129   │                 String(
 130   │                     "$SHELL",
 131   │                 ),
 132   │             ),
 133   │             cmd: None,
 134   │             cmd_separator: None,
 135   │             key: Some(
 136   │                 "ctrl-t",
 137   │             ),
 138   │             keys: [],
 139   │             shortcut: None,
 140   │             leave_broot: Some(
 141   │                 false,
 142   │             ),
 143   │             from_shell: None,
 144   │             apply_to: None,
 145   │             set_working_dir: Some(
 146   │                 true,
 147   │             ),
 148   │             working_dir: None,
 149   │             description: None,
 150   │             auto_exec: None,
 151   │         },
 152   │     ],
 153   │     skin: None,
 154   │     special_paths: {},
 155   │     search_modes: None,
 156   │     disable_mouse_capture: None,
 157   │     cols_order: None,
 158   │     show_selection_mark: Some(
 159   │         true,
 160   │     ),
 161   │     ext_colors: {},
 162   │     syntax_theme: None,
 163   │     true_colors: None,
 164   │     icon_theme: None,
 165   │     modal: None,
 166   │     max_panels_count: None,
 167   │     quit_on_last_cancel: None,
 168   │     file_sum_threads_count: None,
 169   │ }
 170   │ 03:30:06.668 [DEBUG] broot::tree_build::builder: GitIgnorer::default() took 59ns
 171   │ 03:30:06.681 [DEBUG] broot::app::app: display panel took 2.716831ms
 172   │ 03:30:06.683 [INFO] broot::app::app: pending_tasks took 1.055µs
 173   │ 03:30:10.141 [INFO] broot::app::app: event: Key(KeyEvent { code: Char('c'), modifiers: CONTROL })
 174   │ 03:30:10.142 [DEBUG] broot::app::app: command after add_event: VerbTrigger { index: 55, input_invocation: None }
 175   │ 03:30:10.143 [DEBUG] broot::task_sync: dead dam
 176   │ 03:30:10.147 [INFO] broot: bye

I am also having the same issue. What was the solution? It happens rather randomly.

The issue seems to have something to do with the EDITOR environment variable. My bash_profile was setting it to nvim, which caused some issues. Unsetting this variable fixes the problem.