qemush : suppression des aliases, utilisation d'une variable à la place, support des options pour les commandes ls
This commit is contained in:
parent
4fa490d088
commit
bde39b0d72
1 changed files with 7 additions and 6 deletions
13
bin/qemush
13
bin/qemush
|
@ -21,9 +21,7 @@ EDITOR="${EDITOR:-nvim}"
|
|||
export QEMUSH_NAME
|
||||
|
||||
# Aliases
|
||||
alias ls='ls --color=auto'
|
||||
alias exec='exec '
|
||||
shopt -s expand_aliases
|
||||
ls='ls --color=auto'
|
||||
|
||||
# Set a restrictive umask to make sure qemu user files are private
|
||||
umask 027
|
||||
|
@ -86,14 +84,16 @@ public_watch() {
|
|||
public_active() {
|
||||
cd || return
|
||||
echo "Running machines:"
|
||||
exec ls -t sockets
|
||||
set -- $ls -t sockets "$@"
|
||||
exec "$@"
|
||||
}
|
||||
|
||||
# List available virtual machines entrypoints
|
||||
public_ls() {
|
||||
cd || return
|
||||
echo "Available machines:"
|
||||
exec ls launchers
|
||||
set -- $ls launchers "$@"
|
||||
exec "$@"
|
||||
}
|
||||
|
||||
# Create a copy-on-write disk for a virtual machine
|
||||
|
@ -114,7 +114,8 @@ public_diskrm() {
|
|||
public_diskls() {
|
||||
cd || return
|
||||
echo "Available disks:"
|
||||
exec ls disks
|
||||
set -- $ls disks "$@"
|
||||
exec "$@"
|
||||
}
|
||||
|
||||
# Edit a virtual machine entrypoint with a text editor
|
||||
|
|
Loading…
Reference in a new issue