~gpanders/dotfiles

ref: c8e63bac959db19c138dcc3198a56514f0b444ff dotfiles/.config/fish/completions/venv.fish -rw-r--r-- 590 bytes
c8e63bacGreg Anders Manage dotfiles directly in home directory 1 year, 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
function __fish_complete_venvs
    set -q VENV_DIR; or set -U VENV_DIR $XDG_DATA_HOME/venv
    printf "%s\n" (command ls $VENV_DIR)
end

complete -x -c venv -n '__fish_use_subcommand' -a 'create' -d 'Create a virtual environment'
complete -x -c venv -n '__fish_use_subcommand' -a 'rm' -d 'Delete a virtual environment'
complete -x -c venv -n '__fish_use_subcommand' -a 'ls' -d 'List all virtual environments'
complete -x -c venv -n '__fish_use_subcommand' -a '(__fish_complete_venvs)'
complete -x -c venv -n '__fish_seen_subcommand_from rm' -a '(__fish_complete_venvs)'
complete -x -c venv