diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-10-01 12:54:23 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-10-01 12:54:23 +0200 |
commit | 53ab3784fad41b1a57acc5d09ec1899a6d273db0 (patch) | |
tree | 34aca36be5cfc9575fdb59a52d49346d95e2909b /config/essentials | |
parent | 63a1c6f825dcfd2ba3fee9af49f4c9745f875b9f (diff) |
checkpoint
Diffstat (limited to 'config/essentials')
-rw-r--r-- | config/essentials/shell/aliases.sh | 2 | ||||
-rw-r--r-- | config/essentials/shell/functions.sh | 13 | ||||
-rw-r--r-- | config/essentials/zsh/.gitignore | 1 |
3 files changed, 11 insertions, 5 deletions
diff --git a/config/essentials/shell/aliases.sh b/config/essentials/shell/aliases.sh index c37c702..60c7b6c 100644 --- a/config/essentials/shell/aliases.sh +++ b/config/essentials/shell/aliases.sh @@ -319,7 +319,7 @@ alias dbsmu='rsync -rlpP db:/media/basilisk/music/ /media/kilimanjaro/music' # git alias config='GIT_WORK_TREE=~/src/dotfiles/ GIT_DIR=~/src/dotfiles/.git' alias cfg='edit_git_file ~/src/dotfiles/' -alias nvcfg='edit_git_file ~/.config/nvim' +alias ncfg='edit_git_file ~/.config/nvim' alias gmod='git status --short | sed '\''/^\s*M/!d;s/^\s*M\s*//'\'' | fzf | xargs vi' alias gclc='git clone "$(clipo)"' diff --git a/config/essentials/shell/functions.sh b/config/essentials/shell/functions.sh index 2a21655..d18a188 100644 --- a/config/essentials/shell/functions.sh +++ b/config/essentials/shell/functions.sh @@ -340,13 +340,18 @@ ffconcat () { ffmpeg -y -f concat -safe 0 -i $tmp -c copy "$1" rm $tmp } -nvim_bindings() { "$(tmp="$(mktemp)"; nvim +":set nomore | :redir! > $tmp | :map | :redir END | :q" ; fzf < "$tmp"; rm "$tmp")"; } +nvim_bindings() { + tmp="$(mktemp)" + nvim +":set nomore | :redir! > $tmp | :map | :redir END | :q" > /dev/null + eval "nvim $(fzf < "$tmp" | awk '{print $NF}' | cut -f1 -d'>' | sed 's/:/ +/')" + rm "$tmp" +} prj () { pfx="$HOME/proj" - d="$(find "$pfx" -mindepth 1 -maxdepth 1 -type d | sed "s@$pfx@@" |fzf)" - [ -d "$d" ] || exit 1 - cd "$pfx"/"$d" + d="$(find "$pfx" -mindepth 1 -maxdepth 1 -type d | sed "s@$pfx/@@" |fzf)" + [ -d "$pfx/$d" ] || exit 1 + cd "$pfx/$d" } edit_git_file () { diff --git a/config/essentials/zsh/.gitignore b/config/essentials/zsh/.gitignore index 524b20e..0a4640d 100644 --- a/config/essentials/zsh/.gitignore +++ b/config/essentials/zsh/.gitignore @@ -1,3 +1,4 @@ histfile zcompcache* .zcompdump +.zsh_history |