Skip to content

Commit 9f853b1

Browse files
committed
add utils
1 parent a32994a commit 9f853b1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Utils.ps1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Function Search-Google {
2+
<#
3+
.SYNOPSIS
4+
Opens a google search in the default browser.
5+
6+
.DESCRIPTION
7+
Credit goes to https://github.com/nickbeau/PowerShellScripting/blob/master/scripts/googlefunction.ps1
8+
#>
9+
$query = 'https://www.google.com/search?q='
10+
foreach ($arg in $ARGS) { $query += "${arg}+" }
11+
$url = $query.Substring(0, $query.Length - 1)
12+
start "$url"
13+
}
14+
15+
Set-Alias glg Search-Google

0 commit comments

Comments
 (0)