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
d951cb1a
Commit
d951cb1a
authored
Dec 17, 2016
by
Stephen M. Coakley
Committed by
GitHub
Dec 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Normalize redirection syntax (#459)
parent
6738f5ea
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
43 additions
and
42 deletions
+43
-42
Dockerfile
Dockerfile
+1
-1
bin/install
bin/install
+1
-1
lib/autoload.fish
lib/autoload.fish
+2
-2
pkg/omf/functions/bundle/omf.bundle.add.fish
pkg/omf/functions/bundle/omf.bundle.add.fish
+1
-1
pkg/omf/functions/cli/omf.cli.channel.fish
pkg/omf/functions/cli/omf.cli.channel.fish
+1
-1
pkg/omf/functions/cli/omf.cli.install.fish
pkg/omf/functions/cli/omf.cli.install.fish
+1
-0
pkg/omf/functions/cli/omf.cli.new.fish
pkg/omf/functions/cli/omf.cli.new.fish
+2
-2
pkg/omf/functions/cli/omf.cli.remove.fish
pkg/omf/functions/cli/omf.cli.remove.fish
+4
-4
pkg/omf/functions/cli/omf.cli.submit.fish
pkg/omf/functions/cli/omf.cli.submit.fish
+2
-2
pkg/omf/functions/cli/omf.cli.theme.fish
pkg/omf/functions/cli/omf.cli.theme.fish
+2
-2
pkg/omf/functions/core/omf.channel.set.fish
pkg/omf/functions/core/omf.channel.set.fish
+1
-1
pkg/omf/functions/omf.fish
pkg/omf/functions/omf.fish
+1
-1
pkg/omf/functions/packages/omf.packages.cd.fish
pkg/omf/functions/packages/omf.packages.cd.fish
+1
-1
pkg/omf/functions/packages/omf.packages.describe.fish
pkg/omf/functions/packages/omf.packages.describe.fish
+2
-2
pkg/omf/functions/packages/omf.packages.install.fish
pkg/omf/functions/packages/omf.packages.install.fish
+2
-2
pkg/omf/functions/packages/omf.packages.new.fish
pkg/omf/functions/packages/omf.packages.new.fish
+4
-4
pkg/omf/functions/packages/omf.packages.remove.fish
pkg/omf/functions/packages/omf.packages.remove.fish
+2
-2
pkg/omf/functions/packages/omf.packages.submit.fish
pkg/omf/functions/packages/omf.packages.submit.fish
+6
-6
pkg/omf/functions/packages/omf.packages.update.fish
pkg/omf/functions/packages/omf.packages.update.fish
+3
-3
pkg/omf/functions/repo/omf.repo.pull.fish
pkg/omf/functions/repo/omf.repo.pull.fish
+1
-1
pkg/omf/omf.update.fish
pkg/omf/omf.update.fish
+1
-1
tools/generate-themes-doc.fish
tools/generate-themes-doc.fish
+1
-1
tools/travis-github-pr-integration.sh
tools/travis-github-pr-integration.sh
+1
-1
No files found.
Dockerfile
View file @
d951cb1a
FROM
ohmyfish/fish:2.
3.1
FROM
ohmyfish/fish:2.
4.0
COPY
. /src/oh-my-fish
COPY
. /src/oh-my-fish
...
...
bin/install
View file @
d951cb1a
...
@@ -394,7 +394,7 @@ function backup_file -a file_path
...
@@ -394,7 +394,7 @@ function backup_file -a file_path
say "Existent $file found at $path"
say "Existent $file found at $path"
say "↳ Moving to $backup_file"
say "↳ Moving to $backup_file"
if not command cp "$file_path" $backup_file
2>
/dev/null
if not command cp "$file_path" $backup_file
^
/dev/null
abort "Could not backup $file_path"
abort "Could not backup $file_path"
end
end
...
...
lib/autoload.fish
View file @
d951cb1a
...
@@ -3,14 +3,14 @@ function autoload
...
@@ -3,14 +3,14 @@ function autoload
case '-e' '--erase'
case '-e' '--erase'
test (count $argv) -ge 2
test (count $argv) -ge 2
and __autoload_erase $argv[2..-1]
and __autoload_erase $argv[2..-1]
or echo "usage: autoload $argv[1] <path>..."
1
>&2
or echo "usage: autoload $argv[1] <path>..." >&2
case "-*" "--*"
case "-*" "--*"
echo "autoload: invalid option $argv[1]"
echo "autoload: invalid option $argv[1]"
return 1
return 1
case '*'
case '*'
test (count $argv) -ge 1
test (count $argv) -ge 1
and __autoload_insert $argv
and __autoload_insert $argv
or echo "usage: autoload <path>..."
1
>&2
or echo "usage: autoload <path>..." >&2
end
end
end
end
function __autoload_insert
function __autoload_insert
...
...
pkg/omf/functions/bundle/omf.bundle.add.fish
View file @
d951cb1a
...
@@ -8,7 +8,7 @@ function omf.bundle.add -a type name_or_url
...
@@ -8,7 +8,7 @@ function omf.bundle.add -a type name_or_url
set -l record "$type $name_or_url"
set -l record "$type $name_or_url"
if test -f $bundle
if test -f $bundle
if not grep $record $bundle > /dev/null
2>
&1
if not grep $record $bundle > /dev/null
^
&1
echo $record >> $bundle
echo $record >> $bundle
end
end
else
else
...
...
pkg/omf/functions/cli/omf.cli.channel.fish
View file @
d951cb1a
...
@@ -7,7 +7,7 @@ function omf.cli.channel
...
@@ -7,7 +7,7 @@ function omf.cli.channel
omf.channel.set $argv
omf.channel.set $argv
case '*'
case '*'
echo (omf::err)"Invalid number of arguments"(omf::off)
1^
&2
echo (omf::err)"Invalid number of arguments"(omf::off)
>
&2
omf help channel
omf help channel
return $OMF_INVALID_ARG
return $OMF_INVALID_ARG
end
end
...
...
pkg/omf/functions/cli/omf.cli.install.fish
View file @
d951cb1a
function omf.cli.install
function omf.cli.install
set fail_count 0
set fail_count 0
echo hi
switch (count $argv)
switch (count $argv)
case 0
case 0
...
...
pkg/omf/functions/cli/omf.cli.new.fish
View file @
d951cb1a
function omf.cli.new
function omf.cli.new
if test (count $argv) -ne 2
if test (count $argv) -ne 2
echo (omf::err)"Package type or name missing"(omf::off)
1^
&2
echo (omf::err)"Package type or name missing"(omf::off)
>
&2
echo "Usage: omf new "(omf::em)"(pkg | theme)"(omf::off)" <name>"
1^
&2
echo "Usage: omf new "(omf::em)"(pkg | theme)"(omf::off)" <name>"
>
&2
return $OMF_MISSING_ARG
return $OMF_MISSING_ARG
end
end
omf.packages.new $argv
omf.packages.new $argv
...
...
pkg/omf/functions/cli/omf.cli.remove.fish
View file @
d951cb1a
...
@@ -11,16 +11,16 @@ function omf.cli.remove -a name
...
@@ -11,16 +11,16 @@ function omf.cli.remove -a name
set -q OMF_AUTO_RELOAD
set -q OMF_AUTO_RELOAD
and omf.cli.reload
and omf.cli.reload
case 1
case 1
echo (omf::err)"$name could not be removed."(omf::off)
1^
&2
echo (omf::err)"$name could not be removed."(omf::off)
>
&2
case 2
case 2
echo (omf::err)"$name could not be found."(omf::off)
1^
&2
echo (omf::err)"$name could not be found."(omf::off)
>
&2
end
end
return $code
return $code
case '*'
case '*'
echo (omf::err)"Invalid number of arguments"(omf::off)
1^
&2
echo (omf::err)"Invalid number of arguments"(omf::off)
>
&2
echo "Usage: omf remove "(omf::em)"<name>"(omf::off)
1^
&2
echo "Usage: omf remove "(omf::em)"<name>"(omf::off)
>
&2
return $OMF_INVALID_ARG
return $OMF_INVALID_ARG
end
end
end
end
pkg/omf/functions/cli/omf.cli.submit.fish
View file @
d951cb1a
...
@@ -3,8 +3,8 @@ function omf.cli.submit
...
@@ -3,8 +3,8 @@ function omf.cli.submit
case 2
case 2
omf.packages.submit $argv
omf.packages.submit $argv
case "*"
case "*"
echo (omf::err)"Argument missing"(omf::off)
1^
&2
echo (omf::err)"Argument missing"(omf::off)
>
&2
echo "Usage: $_ "(omf::em)"submit"(omf::off)" "(omf::em)"pkg|themes"(omf::off)"/<name> <url>"
1^
&2
echo "Usage: $_ "(omf::em)"submit"(omf::off)" "(omf::em)"pkg|themes"(omf::off)"/<name> <url>"
>
&2
return $OMF_MISSING_ARG
return $OMF_MISSING_ARG
end
end
end
end
pkg/omf/functions/cli/omf.cli.theme.fish
View file @
d951cb1a
...
@@ -5,8 +5,8 @@ function omf.cli.theme -a name
...
@@ -5,8 +5,8 @@ function omf.cli.theme -a name
case 1
case 1
omf.theme.set $name
omf.theme.set $name
case '*'
case '*'
echo (omf::err)"Invalid number of arguments"(omf::off)
1^
&2
echo (omf::err)"Invalid number of arguments"(omf::off)
>
&2
echo "Usage: $_ "(omf::em)"$argv[1]"(omf::off)" [<theme name>]"
1^
&2
echo "Usage: $_ "(omf::em)"$argv[1]"(omf::off)" [<theme name>]"
>
&2
return $OMF_INVALID_ARG
return $OMF_INVALID_ARG
end
end
end
end
pkg/omf/functions/core/omf.channel.set.fish
View file @
d951cb1a
function omf.channel.set -a name
function omf.channel.set -a name
# If an argument is specified, set the update channel.
# If an argument is specified, set the update channel.
if begin; test -z "$name"; or not contains -- $name stable dev; end
if begin; test -z "$name"; or not contains -- $name stable dev; end
echo (omf::err)"'$name' is not a valid channel."(omf::off)
1^
&2
echo (omf::err)"'$name' is not a valid channel."(omf::off)
>
&2
return 1
return 1
end
end
...
...
pkg/omf/functions/omf.fish
View file @
d951cb1a
...
@@ -74,7 +74,7 @@ function omf -d "Oh My Fish"
...
@@ -74,7 +74,7 @@ function omf -d "Oh My Fish"
omf.cli.version $arguments
omf.cli.version $arguments
case "*"
case "*"
echo (omf::err)"$argv[1] option not recognized"(omf::off)
1^
&2
echo (omf::err)"$argv[1] option not recognized"(omf::off)
>
&2
return $OMF_UNKNOWN_OPT
return $OMF_UNKNOWN_OPT
end
end
end
end
pkg/omf/functions/packages/omf.packages.cd.fish
View file @
d951cb1a
...
@@ -17,6 +17,6 @@ function omf.packages.cd -a name -d "Change the current working directory to plu
...
@@ -17,6 +17,6 @@ function omf.packages.cd -a name -d "Change the current working directory to plu
end
end
end
end
echo (omf::err)"$name is not a valid package/theme name"(omf::off)
1^
&2
echo (omf::err)"$name is not a valid package/theme name"(omf::off)
>
&2
return $OMF_INVALID_ARG
return $OMF_INVALID_ARG
end
end
pkg/omf/functions/packages/omf.packages.describe.fish
View file @
d951cb1a
...
@@ -9,9 +9,9 @@ function omf.packages.describe -a name
...
@@ -9,9 +9,9 @@ function omf.packages.describe -a name
if test -e $package_path
if test -e $package_path
set url (cat $package_path)
set url (cat $package_path)
set repo (basename (dirname $url))/(basename $url)
set repo (basename (dirname $url))/(basename $url)
curl -s https://api.github.com/repos/$repo
2>
/dev/null | grep \"description\" | head -1 | cut -d':' -f2- | sed -e 's/["|,]//g;s/^[ \t]//g'
curl -s https://api.github.com/repos/$repo
^
/dev/null | grep \"description\" | head -1 | cut -d':' -f2- | sed -e 's/["|,]//g;s/^[ \t]//g'
else
else
echo (omf::err)"$name is not a valid pkg."(omf::off)
1^
&2
echo (omf::err)"$name is not a valid pkg."(omf::off)
>
&2
return $OMF_INVALID_ARG
return $OMF_INVALID_ARG
end
end
end
end
...
...
pkg/omf/functions/packages/omf.packages.install.fish
View file @
d951cb1a
...
@@ -3,11 +3,11 @@ function __omf.packages.install.success
...
@@ -3,11 +3,11 @@ function __omf.packages.install.success
end
end
function __omf.packages.install.error
function __omf.packages.install.error
echo (omf::err)"Could not install $argv."(omf::off)
1^
&2
echo (omf::err)"Could not install $argv."(omf::off)
>
&2
end
end
function __omf.packages.install.error.already
function __omf.packages.install.error.already
echo (omf::err)"Error: $argv already installed."(omf::off)
1^
&2
echo (omf::err)"Error: $argv already installed."(omf::off)
>
&2
end
end
function omf.packages.install -a name_or_url
function omf.packages.install -a name_or_url
...
...
pkg/omf/functions/packages/omf.packages.new.fish
View file @
d951cb1a
...
@@ -34,7 +34,7 @@ function __omf.packages.new.from_template -a path github user name
...
@@ -34,7 +34,7 @@ function __omf.packages.new.from_template -a path github user name
end)$target
end)$target
end
end
end
end
popd >/dev/null ^&
2
popd >/dev/null ^&
1
end
end
...
@@ -45,12 +45,12 @@ function omf.packages.new -a option name
...
@@ -45,12 +45,12 @@ function omf.packages.new -a option name
case "t" "th" "the" "thm" "theme" "themes"
case "t" "th" "the" "thm" "theme" "themes"
set option "themes"
set option "themes"
case "*"
case "*"
echo (omf::err)"$option is not a valid option."(omf::off)
1^
&2
echo (omf::err)"$option is not a valid option."(omf::off)
>
&2
return $OMF_INVALID_ARG
return $OMF_INVALID_ARG
end
end
if not omf.packages.valid_name "$name"
if not omf.packages.valid_name "$name"
echo (omf::err)"$name is not a valid package/theme name"(omf::off)
1^
&2
echo (omf::err)"$name is not a valid package/theme name"(omf::off)
>
&2
return $OMF_INVALID_ARG
return $OMF_INVALID_ARG
end
end
...
@@ -72,7 +72,7 @@ function omf.packages.new -a option name
...
@@ -72,7 +72,7 @@ function omf.packages.new -a option name
omf.theme.set $name
omf.theme.set $name
end
end
else
else
echo (omf::err)"\$OMF_CONFIG and/or \$OMF_PATH undefined."(omf::off)
1^
&2
echo (omf::err)"\$OMF_CONFIG and/or \$OMF_PATH undefined."(omf::off)
>
&2
exit $OMF_UNKNOWN_ERR
exit $OMF_UNKNOWN_ERR
end
end
end
end
pkg/omf/functions/packages/omf.packages.remove.fish
View file @
d951cb1a
function omf.packages.remove -a pkg
function omf.packages.remove -a pkg
if not omf.packages.valid_name $pkg
if not omf.packages.valid_name $pkg
echo (omf::err)"$pkg is not a valid package/theme name"(omf::off)
1
>&2
echo (omf::err)"$pkg is not a valid package/theme name"(omf::off) >&2
return $OMF_INVALID_ARG
return $OMF_INVALID_ARG
end
end
if test $pkg = "omf" -o $pkg = "default"
if test $pkg = "omf" -o $pkg = "default"
echo (omf::err)"You can't remove `$pkg`"(omf::off)
1
>&2
echo (omf::err)"You can't remove `$pkg`"(omf::off) >&2
return $OMF_INVALID_ARG
return $OMF_INVALID_ARG
end
end
...
...
pkg/omf/functions/packages/omf.packages.submit.fish
View file @
d951cb1a
...
@@ -10,27 +10,27 @@ function omf.packages.submit -a name url -d "Submit a package to the registry"
...
@@ -10,27 +10,27 @@ function omf.packages.submit -a name url -d "Submit a package to the registry"
case pkg
case pkg
case themes
case themes
case "*"
case "*"
echo (omf::err)"Missing directory name: pkg/ or themes/"(omf::off)
1^
&2
echo (omf::err)"Missing directory name: pkg/ or themes/"(omf::off)
>
&2
return $OMF_INVALID_ARG
return $OMF_INVALID_ARG
end
end
set -l pkg (basename $name)
set -l pkg (basename $name)
if not omf.packages.valid_name $pkg
if not omf.packages.valid_name $pkg
echo (omf::err)"$pkg is not a valid package/theme name"(omf::off)
1^
&2
echo (omf::err)"$pkg is not a valid package/theme name"(omf::off)
>
&2
return $OMF_INVALID_ARG
return $OMF_INVALID_ARG
end
end
if test -z "$url"
if test -z "$url"
echo (omf::em)"URL not specified, looking for a remote origin..."(omf::off)
1^
&2
echo (omf::em)"URL not specified, looking for a remote origin..."(omf::off)
>
&2
set url (git config --get remote.origin.url)
set url (git config --get remote.origin.url)
if test -z "$url"
if test -z "$url"
echo (omf::em)"$pkg remote URL not found"(omf::off)
1^
&2
echo (omf::em)"$pkg remote URL not found"(omf::off)
>
&2
echo "Try: git remote add <URL> or see Docs#Submitting"
1^
&2
echo "Try: git remote add <URL> or see Docs#Submitting"
>
&2
return $OMF_INVALID_ARG
return $OMF_INVALID_ARG
end
end
else
else
if test -e "$OMF_PATH/db/$name"
if test -e "$OMF_PATH/db/$name"
echo (omf::err)"Error: $pkg already exists in the registry!"(omf::off)
1^
&2
echo (omf::err)"Error: $pkg already exists in the registry!"(omf::off)
>
&2
return $OMF_INVALID_ARG
return $OMF_INVALID_ARG
else
else
echo "$url" > $OMF_PATH/db/$name
echo "$url" > $OMF_PATH/db/$name
...
...
pkg/omf/functions/packages/omf.packages.update.fish
View file @
d951cb1a
function omf.packages.update -a name
function omf.packages.update -a name
if not set target_path (omf.packages.path $name)
if not set target_path (omf.packages.path $name)
echo (omf::err)"Could not find $name."(omf::off)
1
>&2
echo (omf::err)"Could not find $name."(omf::off) >&2
return 1
return 1
end
end
...
@@ -12,7 +12,7 @@ function omf.packages.update -a name
...
@@ -12,7 +12,7 @@ function omf.packages.update -a name
omf.bundle.install $target_path/bundle
omf.bundle.install $target_path/bundle
set result (omf::em)"$name successfully updated."(omf::off)
set result (omf::em)"$name successfully updated."(omf::off)
case 1
case 1
echo (omf::err)"Could not update $name."(omf::off)
1
>&2
echo (omf::err)"Could not update $name."(omf::off) >&2
return 1
return 1
case 2
case 2
set result (omf::dim)"$name is already up-to-date."(omf::off)
set result (omf::dim)"$name is already up-to-date."(omf::off)
...
@@ -21,7 +21,7 @@ function omf.packages.update -a name
...
@@ -21,7 +21,7 @@ function omf.packages.update -a name
# Run update hook.
# Run update hook.
if not omf.packages.run_hook $target_path update
if not omf.packages.run_hook $target_path update
echo (omf::err)"Could not update $name."(omf::off)
1^
&2
echo (omf::err)"Could not update $name."(omf::off)
>
&2
return 1
return 1
end
end
...
...
pkg/omf/functions/repo/omf.repo.pull.fish
View file @
d951cb1a
function omf.repo.pull
function omf.repo.pull
if test (count $argv) -eq 0
if test (count $argv) -eq 0
echo (omf::err)"omf.repo.pull takes a repository path as an argument."(omf::off)
1
>&2
echo (omf::err)"omf.repo.pull takes a repository path as an argument."(omf::off) >&2
return $OMF_MISSING_ARG
return $OMF_MISSING_ARG
end
end
...
...
pkg/omf/omf.update.fish
View file @
d951cb1a
...
@@ -4,7 +4,7 @@ function omf.update -a name
...
@@ -4,7 +4,7 @@ function omf.update -a name
end
end
function __omf.update.error
function __omf.update.error
echo (omf::err)"Could not update $argv."(omf::off)
1^
&2
echo (omf::err)"Could not update $argv."(omf::off)
>
&2
end
end
if test \( -e $OMF_PATH/themes/$name \) -o \( -e $OMF_CONFIG/themes/$name \)
if test \( -e $OMF_PATH/themes/$name \) -o \( -e $OMF_CONFIG/themes/$name \)
...
...
tools/generate-themes-doc.fish
View file @
d951cb1a
...
@@ -46,7 +46,7 @@ for theme in (command find $project_dir/db/themes/ -type f|sort)
...
@@ -46,7 +46,7 @@ for theme in (command find $project_dir/db/themes/ -type f|sort)
echo "Fetching readme for $name"
echo "Fetching readme for $name"
__write_theme_readme $name $raw_content $readme
__write_theme_readme $name $raw_content $readme
else
else
echo "FAILED: No readme for $name"
1
>&2
echo "FAILED: No readme for $name" >&2
echo "See $url for details" >> $temp_theme_contents
echo "See $url for details" >> $temp_theme_contents
end
end
end
end
...
...
tools/travis-github-pr-integration.sh
View file @
d951cb1a
...
@@ -6,7 +6,7 @@ if [[ "$TRAVIS_PULL_REQUEST" = "false" ]]; then
...
@@ -6,7 +6,7 @@ if [[ "$TRAVIS_PULL_REQUEST" = "false" ]]; then
fi
fi
GITHUB_PR_URL
=
https://api.github.com/repos/
$TRAVIS_REPO_SLUG
/pulls/
$TRAVIS_PULL_REQUEST
GITHUB_PR_URL
=
https://api.github.com/repos/
$TRAVIS_REPO_SLUG
/pulls/
$TRAVIS_PULL_REQUEST
GITHUB_PR_BODY
=
$(
curl
-s
$GITHUB_PR_URL
2>
/dev/null
)
GITHUB_PR_BODY
=
$(
curl
-s
$GITHUB_PR_URL
^
/dev/null
)
if
[[
$GITHUB_PR_BODY
=
~
\"
ref
\"
:
\
*
\"
([
a-zA-Z0-9_-]
*
)
\"
]]
;
then
if
[[
$GITHUB_PR_BODY
=
~
\"
ref
\"
:
\
*
\"
([
a-zA-Z0-9_-]
*
)
\"
]]
;
then
export
OMF_REPO_BRANCH
=
${
BASH_REMATCH
[1]
}
export
OMF_REPO_BRANCH
=
${
BASH_REMATCH
[1]
}
...
...
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