Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
O
oh-my-fish
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
oh-my-fish
Commits
b664e263
Commit
b664e263
authored
Feb 11, 2015
by
Jorge Bucaran
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #369 from bucaran/fix-tiny
Change tiny declared globals to local scope.
parents
87d94023
935b2d5a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
plugins/tiny/tiny.fish
plugins/tiny/tiny.fish
+8
-8
No files found.
plugins/tiny/tiny.fish
View file @
b664e263
...
@@ -51,12 +51,6 @@
...
@@ -51,12 +51,6 @@
import plugins/getopts
import plugins/getopts
set -g __GITHUB_URL "https://github.com"
set -g __GITHUB_USER (git config github.user)
set -g __TINY_ERR_BAD_URL 1
set -g __TINY_ERR_BAD_INPUT 2
function github.io -a url code
function github.io -a url code
if test -n "$code"
if test -n "$code"
set code -F code=$code
set code -F code=$code
...
@@ -68,6 +62,12 @@ function github.io -a url code
...
@@ -68,6 +62,12 @@ function github.io -a url code
end
end
function tiny -d "get a git.io short URL"
function tiny -d "get a git.io short URL"
set -l __github_url "https://github.com"
set -l __github_user (git config github.user)
set -l __TINY_ERR_BAD_URL 1
set -l __TINY_ERR_BAD_INPUT 2
while set opts (getopts ":o:open u:user: r:repo: c:code: h:help" $argv)
while set opts (getopts ":o:open u:user: r:repo: c:code: h:help" $argv)
switch $opts[1]
switch $opts[1]
case o
case o
...
@@ -101,7 +101,7 @@ function tiny -d "get a git.io short URL"
...
@@ -101,7 +101,7 @@ function tiny -d "get a git.io short URL"
return $__TINY_ERR_BAD_INPUT
return $__TINY_ERR_BAD_INPUT
end
end
set user $__
GITHUB_USER
set user $__
github_user
if test -z "$user"
if test -z "$user"
echo "Specify a username via the -u option or save it to your git config."
echo "Specify a username via the -u option or save it to your git config."
echo -sn (set_color ccc) "e.g., git config --global github.user"
echo -sn (set_color ccc) "e.g., git config --global github.user"
...
@@ -110,7 +110,7 @@ function tiny -d "get a git.io short URL"
...
@@ -110,7 +110,7 @@ function tiny -d "get a git.io short URL"
end
end
end
end
set url "$__
GITHUB_URL
/$user/$repo" "$code"
set url "$__
github_url
/$user/$repo" "$code"
end
end
set url (github.io $url)
set url (github.io $url)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment