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
|
export QEMUSH_NAME
|
||||||
|
|
||||||
# Aliases
|
# Aliases
|
||||||
alias ls='ls --color=auto'
|
ls='ls --color=auto'
|
||||||
alias exec='exec '
|
|
||||||
shopt -s expand_aliases
|
|
||||||
|
|
||||||
# Set a restrictive umask to make sure qemu user files are private
|
# Set a restrictive umask to make sure qemu user files are private
|
||||||
umask 027
|
umask 027
|
||||||
|
@ -86,14 +84,16 @@ public_watch() {
|
||||||
public_active() {
|
public_active() {
|
||||||
cd || return
|
cd || return
|
||||||
echo "Running machines:"
|
echo "Running machines:"
|
||||||
exec ls -t sockets
|
set -- $ls -t sockets "$@"
|
||||||
|
exec "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
# List available virtual machines entrypoints
|
# List available virtual machines entrypoints
|
||||||
public_ls() {
|
public_ls() {
|
||||||
cd || return
|
cd || return
|
||||||
echo "Available machines:"
|
echo "Available machines:"
|
||||||
exec ls launchers
|
set -- $ls launchers "$@"
|
||||||
|
exec "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create a copy-on-write disk for a virtual machine
|
# Create a copy-on-write disk for a virtual machine
|
||||||
|
@ -114,7 +114,8 @@ public_diskrm() {
|
||||||
public_diskls() {
|
public_diskls() {
|
||||||
cd || return
|
cd || return
|
||||||
echo "Available disks:"
|
echo "Available disks:"
|
||||||
exec ls disks
|
set -- $ls disks "$@"
|
||||||
|
exec "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Edit a virtual machine entrypoint with a text editor
|
# Edit a virtual machine entrypoint with a text editor
|
||||||
|
|
Loading…
Reference in a new issue