diff options
| author | Cian Bagshaw <cian@cianb.xyz> | 2024-09-25 23:27:23 +0100 |
|---|---|---|
| committer | Cian Bagshaw <cian@cianb.xyz> | 2024-09-25 23:27:23 +0100 |
| commit | 554ae71136359fa1b5c8b26af9a5a99dd748618f (patch) | |
| tree | 714fce06f41c631dbf16d120d6ce4df2037dbb0c | |
| parent | cd16a5154761b3c065de7e0c3a82730ee1a025b6 (diff) | |
| download | dotFiles-master.tar.bz2 dotFiles-master.zip | |
Buffered line input using GNU Readline is now configured globally.
Also, fixed Python Shell Readline history, so it is available for the current
session, though still not saved after that.
| -rw-r--r-- | .bashrc | 3 | ||||
| -rw-r--r-- | .config/python | 2 | ||||
| -rw-r--r-- | .config/readline | 29 | ||||
| -rw-r--r-- | .profile | 1 |
4 files changed, 31 insertions, 4 deletions
| @@ -21,9 +21,6 @@ man() { | |||
| 21 | command man "$@" | 21 | command man "$@" |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | # vim mode | ||
| 25 | set -o vi | ||
| 26 | |||
| 27 | # disable history | 24 | # disable history |
| 28 | unset HISTFILE | 25 | unset HISTFILE |
| 29 | 26 | ||
diff --git a/.config/python b/.config/python index e026454..94a4e40 100644 --- a/.config/python +++ b/.config/python | |||
| @@ -3,4 +3,4 @@ | |||
| 3 | 3 | ||
| 4 | # disable history | 4 | # disable history |
| 5 | import readline | 5 | import readline |
| 6 | readline.set_auto_history(False) | 6 | readline.write_history_file = lambda *args: None |
diff --git a/.config/readline b/.config/readline new file mode 100644 index 0000000..39a869f --- /dev/null +++ b/.config/readline | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | # vim: filetype=readline | ||
| 2 | |||
| 3 | $include /etc/inputrc | ||
| 4 | |||
| 5 | set editing-mode vi | ||
| 6 | set keyseq-timeout 250 | ||
| 7 | |||
| 8 | set colored-stats | ||
| 9 | set colored-completion-prefix | ||
| 10 | |||
| 11 | set completion-ignore-case | ||
| 12 | set completion-map-case | ||
| 13 | set mark-symlinked-directories | ||
| 14 | set show-all-if-ambiguous | ||
| 15 | set blink-matching-paren | ||
| 16 | set skip-completed-text | ||
| 17 | set revert-all-at-newline | ||
| 18 | |||
| 19 | "jj": "\e" | ||
| 20 | |||
| 21 | Control-l: clear-screen | ||
| 22 | Control-w: clear-screen line | ||
| 23 | Control-a: beginning-of-line | ||
| 24 | Control-e: end-of-line | ||
| 25 | |||
| 26 | Control-k: history-search-backward | ||
| 27 | Control-j: history-search-forward | ||
| 28 | Control-n: menu-complete | ||
| 29 | Control-b: menu-complete-backward | ||
| @@ -22,6 +22,7 @@ export XDG_STATE_HOME="$HOME/.local/state" | |||
| 22 | export XDG_RUNTIME_DIR="/run/user/$UID" | 22 | export XDG_RUNTIME_DIR="/run/user/$UID" |
| 23 | 23 | ||
| 24 | # config file locations | 24 | # config file locations |
| 25 | export INPUTRC="$XDG_CONFIG_HOME/readline" | ||
| 25 | export VIMINIT="source $XDG_CONFIG_HOME/vim" | 26 | export VIMINIT="source $XDG_CONFIG_HOME/vim" |
| 26 | export XINITRC="$XDG_CONFIG_HOME/x11" | 27 | export XINITRC="$XDG_CONFIG_HOME/x11" |
| 27 | export NOTMUCH_CONFIG="$XDG_CONFIG_HOME/notmuch" | 28 | export NOTMUCH_CONFIG="$XDG_CONFIG_HOME/notmuch" |
