mirror of
https://github.com/sebaschi/dotfiles.git
synced 2025-12-30 10:28:26 +01:00
More stow refactoring; now actually including bashrc
This commit is contained in:
5
pet/dot-config/pet/notes.md
Normal file
5
pet/dot-config/pet/notes.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# IMPORTANT
|
||||
The two `prev.{bash, zsh}` functions need to go into `.bashrc` or `.zshrc` respectively.
|
||||
The `pet-slect.*` need to be put in the rc EXACTLY AS IS!!!. Else the keys aren't rebound.
|
||||
Those files are taken from [this](https://github.com/knqyf263/pet) Readme. As such,
|
||||
that repos license might apply!
|
||||
2073
pet/dot-config/pet/pet-repo-README.md
Normal file
2073
pet/dot-config/pet/pet-repo-README.md
Normal file
File diff suppressed because one or more lines are too long
6
pet/dot-config/pet/pre-select.bash
Normal file
6
pet/dot-config/pet/pre-select.bash
Normal file
@@ -0,0 +1,6 @@
|
||||
function pet-select() {
|
||||
BUFFER=$(pet search --query "$READLINE_LINE")
|
||||
READLINE_LINE=$BUFFER
|
||||
READLINE_POINT=${#BUFFER}
|
||||
}
|
||||
bind -x '"\C-x\C-r": pet-select'
|
||||
8
pet/dot-config/pet/pre-select.zsh
Normal file
8
pet/dot-config/pet/pre-select.zsh
Normal file
@@ -0,0 +1,8 @@
|
||||
function pet-select() {
|
||||
BUFFER=$(pet search --query "$LBUFFER")
|
||||
CURSOR=$#BUFFER
|
||||
zle redisplay
|
||||
}
|
||||
zle -N pet-select
|
||||
stty -ixon
|
||||
bindkey '^s' pet-select
|
||||
4
pet/dot-config/pet/prev.bash
Normal file
4
pet/dot-config/pet/prev.bash
Normal file
@@ -0,0 +1,4 @@
|
||||
function prev() {
|
||||
PREV=$(echo `history | tail -n2 | head -n1` | sed 's/[0-9]* //')
|
||||
sh -c "pet new `printf %q "$PREV"`"
|
||||
}
|
||||
4
pet/dot-config/pet/prev.zsh
Normal file
4
pet/dot-config/pet/prev.zsh
Normal file
@@ -0,0 +1,4 @@
|
||||
function prev() {
|
||||
PREV=$(fc -lrn | head -n 1)
|
||||
sh -c "pet new `printf %q "$PREV"`"
|
||||
}
|
||||
Reference in New Issue
Block a user