Skip to content

Commit c2aaba0

Browse files
authored
chore: psql keybindings
1 parent 534d477 commit c2aaba0

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

preferences/terminal.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,23 @@ defaults write com.googlecode.iterm2 PromptOnQuit -bool false
2020
# Open File Manager To Directories (instead of jumping):
2121
# jo music
2222
brew install autojump
23+
24+
# Define the required keybindings
25+
KEYBINDINGS='
26+
"\C-b": backward-word
27+
"\C-f": forward-word
28+
"\e\C-f": forward-word
29+
'
30+
31+
# Check if ~/.inputrc exists
32+
if [ ! -f ~/.inputrc ]; then
33+
echo "Creating ~/.inputrc"
34+
touch ~/.inputrc
35+
fi
36+
37+
# Append keybindings if they are not already present
38+
echo "$KEYBINDINGS" | while read -r line; do
39+
if ! grep -Fxq "$line" ~/.inputrc; then
40+
echo "$line" >> ~/.inputrc
41+
fi
42+
done

0 commit comments

Comments
 (0)