Skip to content

Commit

Permalink
add: added command line arrow key support.
Browse files Browse the repository at this point in the history
  • Loading branch information
Almas-Ali committed Aug 9, 2023
1 parent 639ad28 commit 44616aa
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions radon.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@

import argparse

try:
import readline

# Enable arrow key support
readline.parse_and_bind('"\e[A": history-search-backward')
readline.parse_and_bind('"\e[B": history-search-forward')
readline.parse_and_bind('"\e[C": forward-char')
readline.parse_and_bind('"\e[D": backward-char')
except ImportError:
pass

import core as base_core


Expand Down

0 comments on commit 44616aa

Please sign in to comment.