diff options
Diffstat (limited to '.config/zsh/alias.zsh')
-rw-r--r-- | .config/zsh/alias.zsh | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/.config/zsh/alias.zsh b/.config/zsh/alias.zsh index 4cd4099..bcd4cf8 100644 --- a/.config/zsh/alias.zsh +++ b/.config/zsh/alias.zsh @@ -60,6 +60,7 @@ alias \ irssi='irssi --config="$XDG_CONFIG_HOME"/irssi/config --home="$XDG_DATA_HOME"/irssi' \ irc='irssi' \ free='freecolor' \ + n='nnn' \ gt='gpg-tui' \ lg='lazygit' \ tf='terraform' \ @@ -68,6 +69,20 @@ alias \ dgit='git --git-dir=$HOME/docs/dotfiles-bsd --work-tree=$HOME' \ confgit='git --git-dir=$HOME/docs/conffiles-bsd --work-tree=/' \ git-pull-all='git branch -r | sed "1d;s,\x1B\[[0-9;]*[a-zA-Z],,g" | while read remote; do git branch --track "${remote#origin/}" "$remote"; git checkout "${remote#origin/}"; git pull; done' +b() { + oldpath="$(pwd)" + cd $HOME/.config/nnn/bookmarks + dir=$(fzf) + if [ -z "$dir" ]; then + cd "$oldpath" + return + fi + if ! cd "$dir"; then + cd "$oldpath" + return + fi + nnn +} bssh() { user='rbousset' host='bastion' @@ -158,24 +173,6 @@ de() { $VISUAL $sc cd $p } -eebin() { - file=$(find "$HOME"/.local/bin -type f | fzf) - [ $? -ne 0 ] && return - bsdsetsid emacsclient -c "$file" - kill -9 "$(ps -p $$ -oppid=)" -} -eeconf() { - file=$(find "$HOME"/.config -type f | fzf) - [ $? -ne 0 ] && return - bsdsetsid emacsclient -c "$file" - kill -9 "$(ps -p $$ -oppid=)" -} -ee() { - file=$(find . -type f | fzf) - [ $? -ne 0 ] && return - bsdsetsid emacsclient -c "$file" - kill -9 "$(ps -p $$ -oppid=)" -} pa() { if [ -d $HOME/.local/packs ] && cd $HOME/.local/packs || return 1 dir=$(\ls $HOME/.local/packs | fzf) @@ -220,7 +217,7 @@ update() { yay ;; po-rbo) - doas apt update && doas apt dist-upgrade + doas apt update; doas apt dist-upgrade nix-channel --update nix-env -u # git -C $HOME/.local/packs/neovim checkout master |