-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modified "go" alias to support multiple args/files
- Loading branch information
1 parent
2b7b703
commit 50cf5d2
Showing
2 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
if [ $# -eq 0 ]; then | ||
xdg-open . &> /dev/null | ||
else | ||
for file in "$@"; do | ||
xdg-open "$file" &> /dev/null | ||
done | ||
fi | ||
|
||
# #!/bin/bash | ||
# set -euo pipefail; shopt -s failglob # bash strict mode | ||
|
||
# max=${max:-10} # Set default maximum if $max is not set | ||
# [[ ${all:-} ]] && max=$# # Set max to all files if $all is non-null | ||
|
||
# for file in "${@:1:$max}"; do | ||
# xdg-open "$file" | ||
# done &>>~/.xsession-errors |