qemush : suppression des aliases, utilisation d'une variable à la place, support des options pour les commandes ls

This commit is contained in:
Ahurac 2024-01-23 01:04:24 +01:00
parent 4fa490d088
commit bde39b0d72

View file

@ -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