Skip to content

Commit

Permalink
per-shell default hotkeys
Browse files Browse the repository at this point in the history
  • Loading branch information
lasantosr committed May 22, 2023
1 parent 516d249 commit cc75920
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions intelli-shell.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Default bindings
intelli_search_key="${INTELLI_SEARCH_HOTKEY:-\C-@}"
intelli_bookmark_key="${INTELLI_BOOKMARK_HOTKEY:-\C-b}"
intelli_label_key="${INTELLI_LABEL_HOTKEY:-\C-l}"

if [[ -n "$ZSH_VERSION" ]]; then
# zshell
# https://zsh.sourceforge.io/Guide/zshguide04.html

# Default bindings
intelli_search_key="${INTELLI_SEARCH_HOTKEY:-^@}"
intelli_bookmark_key="${INTELLI_BOOKMARK_HOTKEY:-^b}"
intelli_label_key="${INTELLI_LABEL_HOTKEY:-^l}"

function _intelli_exec {
ps1_lines=$(echo "$PS1" | wc -l)
# Temp file for output
Expand Down Expand Up @@ -53,6 +53,11 @@ elif [[ -n "$BASH" ]]; then
# bash
# https://www.gnu.org/software/bash/manual/html_node/Bash-Builtins.html#index-bind

# Default bindings
intelli_search_key="${INTELLI_SEARCH_HOTKEY:-\C-@}"
intelli_bookmark_key="${INTELLI_BOOKMARK_HOTKEY:-\C-b}"
intelli_label_key="${INTELLI_LABEL_HOTKEY:-\C-l}"

function _intelli_exec {
ps1_lines=$(echo "$PS1" | wc -l)
# Temp file for output
Expand Down

0 comments on commit cc75920

Please sign in to comment.