Skip to content

Commit 64fb62e

Browse files
committed
history-search: move to inputrc fix non-login shell error
1 parent b7d08e8 commit 64fb62e

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

bashrc

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ _is_posix(){ shopt -oq posix; }
1818
. /etc/profile
1919

2020
# Provides prompt for non-login shells, specifically shells started
21-
# in the X environment.
21+
# in the X environment.
2222

2323
# TODO check case $- in (*i*)
2424
# Make bash append rather than overwrite the history on disk
@@ -34,7 +34,7 @@ HISTCONTROL='ignorespace'
3434
shopt -s cdspell autocd cdable_vars
3535

3636
# Do not complete when readline buf is empty
37-
shopt -s no_empty_cmd_completion
37+
shopt -s no_empty_cmd_completion
3838

3939
# Extended glob (3.5.8.1) & find-all-glob with **
4040
shopt -s extglob globstar
@@ -54,10 +54,6 @@ for c in {e,f,}grep {v,}dir ls; do alias $c="$c --color=auto"; done
5454
# space and time efficient cp
5555
alias cp='cp --reflink=auto --sparse=always'
5656

57-
# History Search
58-
bind '"\e[A": history-search-backward'
59-
bind '"\e[B": history-search-forward'
60-
6157
# So they can be unset.
6258
# I need someone to help me assign those names properly.
6359
# Those are actually bold colors.
@@ -97,7 +93,7 @@ _ret_prompt() {
9793
_ret_same() { return $?; }
9894

9995
# Base functions ready. Let's load bashrc.d.
100-
for script in /etc/bashrc.d/*; do . "$script"; done
96+
for script in /etc/bashrc.d/*; do . "$script"; done
10197

10298
# The prompt depends on vcs_status! Get one backup anyway.
10399
type _vcs_status &>/dev/null || ! echo _vcs_status not declared, making stub.. || alias _vcs_status=_ret_same

inputrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#History Search
2+
"\e[A": history-search-backward
3+
"\e[B": history-search-forward

0 commit comments

Comments
 (0)