~gpanders/ual

d4921ac0185b501ebfa4e2ddc45cf03da39cb8b3 — Greg Anders 2 months ago c180cb1
Update UAL_PATH in completion files
3 files changed, 4 insertions(+), 4 deletions(-)

M completions/bash/ual
M completions/fish/ual.fish
M completions/zsh/_ual
M completions/bash/ual => completions/bash/ual +2 -2
@@ 6,8 6,8 @@ _ual () {
    fi

    local notes=()
    for note in "${UAL_PATH:-$HOME/.notes}"/*; do
        notes+=($(basename -- "${note%.*}"))
    for note in "${UAL_PATH:-${XDG_DATA_HOME:-HOME/.local/share}/ual}"/*; do
        notes+=("$(basename -- "${note%.*}")")
    done

    case "${COMP_WORDS[1]}" in

M completions/fish/ual.fish => completions/fish/ual.fish +1 -1
@@ 1,5 1,5 @@
function __ual_complete_notes
    set -q UAL_PATH; or set -l UAL_PATH "$HOME/.notes"
    set -q UAL_PATH; or set -l UAL_PATH "$HOME/.local/share/ual"
    printf "%s\n" (command ls $UAL_PATH | sed 's/\.[^.]*$//')
end


M completions/zsh/_ual => completions/zsh/_ual +1 -1
@@ 8,7 8,7 @@ function _ual() {
        '2: :->arg'

    local -a notes
    notes=("${UAL_PATH:-$HOME/.notes}"/*(:t:r))
    notes=("${UAL_PATH:-${XDG_DATA_HOME:-$HOME/.local/share}/ual}"/*(:t:r))

    case $state in
        subcmd)