The alias below works well in zsh
when spaces in directory names are \
escaped, but bash
doesn't handle them properly. What changes would be required to make them work with bash properly.
dum() {
du -h --max-depth=1 $1
}
zsh succeeds
user@server: dum "Server Configuration"
32K Server Configuration
user@server: dum Server\ Configuration
32K Server Configuration
bash fails
user@server:~$ dum "Server Configuration"
8.0K Server/install_scripts
300K Server
du: cannot access 'Configuration': No such file or directory
user@server:~$ dum Server\ Configuration/
8.0K Server/install_scripts
300K Server
du: cannot access 'Configuration/': No such file or directory
How can the alias be written to make it work in bash
?