add simple web function
This commit is contained in:
parent
ea1ef0fe42
commit
354a5fc535
1 changed files with 17 additions and 0 deletions
|
@ -110,3 +110,20 @@ print-paths() {
|
||||||
ta () {
|
ta () {
|
||||||
tmux attach -t "$@" || tmux new-session -s "$@"
|
tmux attach -t "$@" || tmux new-session -s "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
web () {
|
||||||
|
if [[ -z "$BROWSER" ]]; then
|
||||||
|
echo 'set $BROWSER'
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
for i
|
||||||
|
do
|
||||||
|
if [[ ! -r $i ]]
|
||||||
|
then
|
||||||
|
echo "$0: file doesn't exist: \`$i'" >&2
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
$BROWSER "$i" > /dev/null 2>&1 &
|
||||||
|
disown
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue