nixos-config/home/shell/first-tab-completion.zsh

15 lines
270 B
Bash
Raw Normal View History

#!/usr/bin/env zsh
# shellcheck disable=all
first-tab-completion() {
if [[ $#BUFFER == 0 ]]; then
BUFFER="cd "
CURSOR=3
zle list-choices
# zle backward-kill-word # breaks completion
else
zle expand-or-complete
fi
}
zle -N first-tab-completion