FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
bash-it/plugins/available/browser.plugin.bash at master · gitanicsoftware/bash-it · GitHub
gitanicsoftware
bash-it
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
bash-it
/
plugins
/
available
/
browser.plugin.bash
Copy path
More file actions
More file actions
Latest commit
History
History
History
76 lines (64 loc) · 1.44 KB
Breadcrumbs
bash-it
/
plugins
/
available
/
browser.plugin.bash
Copy path
File metadata and controls
76 lines (64 loc) · 1.44 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#
based on https://gist.github.com/318247
cite about-plugin
about-plugin
'
render commandline output in your browser
'
function
browser()
{
about
'
pipe html to a browser
'
example
'
$ echo "<h1>hi mom!</h1>" | browser
'
example
'
$ ron -5 man/rip.5.ron | browser
'
group
'
browser
'
if
[
-t
0 ]
;
then
if
[
-n
"
$1
"
]
;
then
open
$1
else
reference browser
fi
else
f=
"
/tmp/browser.
$RANDOM
.html
"
cat /dev/stdin
>
$f
open
$f
fi
}
function
wmate()
{
about
'
pipe hot spicy interwebs into textmate and cleanup!
'
example
'
$ wmate google.com
'
group
'
browser
'
if
[
-t
0 ]
;
then
if
[
-n
"
$1
"
]
;
then
wget -qO-
$1
|
/usr/bin/mate
TIDY=
`
/usr/bin/osascript
<<
EOT
tell application "TextMate"
activate
end tell
tell application "System Events"
tell process "TextMate"
tell menu bar 1
tell menu bar item "Bundles"
tell menu "Bundles"
tell menu item "HTML"
tell menu "HTML"
click menu item "Tidy"
end tell
end tell
end tell
end tell
end tell
end tell
end tell
EOT
`
else
reference wmate
fi
fi
}
function
raw()
{
about
'
write wget into a temp file and pump it into your browser
'
example
'
$ raw google.com
'
group
'
browser
'
if
[
-t
0 ]
;
then
if
[
-n
"
$1
"
]
;
then
wget -qO-
$1
|
browser
else
reference raw
fi
fi
}
Back
|
FazBrowse Home
|
New Git URL