More advanced o command that opens multiple files

Use a little script for `o` instead of a simple alias to xdg-open. This
way multiple files can be opened.
This commit is contained in:
Jean-Claude 2024-01-16 12:12:47 +01:00
parent 262341bc00
commit 8a1359be1a
Signed by: jeanclaude
GPG Key ID: 8A300F57CBB9F63E
2 changed files with 18 additions and 1 deletions

18
Scripts/o Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
show_help() {
echo "Usage: $0 [OPTION] [FILE]..."
echo "Open the provided FILEs using xdg-open."
echo
echo "Options:"
echo " -h, --help Display this help menu."
exit 0
}
if [ "$1" == "--help" ] || [ "$1" == "-h" ] || [ "$#" -eq 0 ]; then
show_help
fi
for var in "$@"; do
xdg-open "$var" &
done

View File

@ -19,7 +19,6 @@ alias md='mkdir -p'
alias l='ls -lah'
alias tree='tree -a'
alias c='clear'
alias o='xdg-open'
alias g='git'
alias copy='xclip'
alias copyc='xclip -selection clipboard'