On Fri, Mar 02, 2018 at 07:10:22PM +0000, Holger Levsen wrote:
> On Tue, Feb 27, 2018 at 03:23:50PM +0100, haaber wrote:
> > to have the shell behave nicer. If I have some free time, I might
> > customize this stub to suggest available options to all qvm-* and
> > qubes-* commands. I am surprised that I might be  the first one to
> > discuss this subject (?!)   Bernhard
> i'm definitly interested in this, this is super useful.

so thanks, Unman and haaber, I now have this as my .bashrc and it works
nicely:


# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# Uncomment the following line if you don't like systemctl's auto-paging 
feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions

_qvm()
{   local cur
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    VMS=`qvm-ls --raw-list`
    COMPREPLY=( $(compgen -W "${VMS}" -- ${cur}) )
}

complete -F _qvm qvm-appmenus
complete -F _qvm qvm-clone
complete -F _qvm qvm-firewall
complete -F _qvm qvm-move-to-vm
complete -F _qvm qvm-remove
complete -F _qvm qvm-start-gui
complete -F _qvm qvm-unpause
complete -F _qvm qvm-backup
complete -F _qvm qvm-copy-to-vm
complete -F _qvm qvm-pause
complete -F _qvm qvm-run
complete -F _qvm qvm-usb
complete -F _qvm qvm-backup-restore
complete -F _qvm qvm-service
complete -F _qvm qvm-kill
complete -F _qvm qvm-shutdown
complete -F _qvm qvm-tags
complete -F _qvm qvm-check
complete -F _qvm qvm-features
complete -F _qvm qvm-prefs
complete -F _qvm qvm-start
complete -F _qvm qm

For your convinience I've also attached this file. (you might want to comment
out the last line...)


-- 
cheers,
        Holger

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/20180311125641.p5s4bfgqbhfyowlg%40layer-acht.org.
For more options, visit https://groups.google.com/d/optout.
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# Uncomment the following line if you don't like systemctl's auto-paging 
feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions

_qvm()
{   local cur
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    VMS=`qvm-ls --raw-list`
    COMPREPLY=( $(compgen -W "${VMS}" -- ${cur}) )
}

complete -F _qvm qvm-appmenus
complete -F _qvm qvm-clone
complete -F _qvm qvm-firewall
complete -F _qvm qvm-move-to-vm
complete -F _qvm qvm-remove
complete -F _qvm qvm-start-gui
complete -F _qvm qvm-unpause
complete -F _qvm qvm-backup
complete -F _qvm qvm-copy-to-vm
complete -F _qvm qvm-pause
complete -F _qvm qvm-run
complete -F _qvm qvm-usb
complete -F _qvm qvm-backup-restore
complete -F _qvm qvm-service
complete -F _qvm qvm-kill
complete -F _qvm qvm-shutdown
complete -F _qvm qvm-tags
complete -F _qvm qvm-check
complete -F _qvm qvm-features
complete -F _qvm qvm-prefs
complete -F _qvm qvm-start
complete -F _qvm qm

Attachment: signature.asc
Description: PGP signature

Reply via email to