-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from tamada/release/v2.0.0-beta-1
Release/v2.0.0 beta 1
- Loading branch information
Showing
19 changed files
with
328 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ name: Version Up | |
on: | ||
push: | ||
branches: | ||
- 'release/v[0-9]+.[0-9]+.[0-9]*' | ||
- 'release/v[0-9]+.[0-9]+.[0-9]*.*' | ||
|
||
jobs: | ||
versionup: | ||
|
@@ -16,18 +16,13 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ steps.vars.outputs.branch }} | ||
fetch-depth: 0 | ||
|
||
- name: Initialize | ||
shell: bash | ||
run: | | ||
git config --global user.name "GitHub Actions" | ||
git config --global user.email "[email protected]" | ||
auth_header="$(git config --local --get http.https://github.com/.extraheader)" | ||
git submodule sync --recursive | ||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 | ||
- name: Version up | ||
id: updating_version | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
_sibling() { | ||
local i cur prev opts cmd | ||
COMPREPLY=() | ||
cur="${COMP_WORDS[COMP_CWORD]}" | ||
prev="${COMP_WORDS[COMP_CWORD-1]}" | ||
cmd="" | ||
opts="" | ||
|
||
for i in ${COMP_WORDS[@]} | ||
do | ||
case "${cmd},${i}" in | ||
",$1") | ||
cmd="sibling" | ||
;; | ||
*) | ||
;; | ||
esac | ||
done | ||
|
||
case "${cmd}" in | ||
sibling) | ||
opts="-a -l -p -P -s -i -t -h -V --csv --absolute --list --progress --parent --step --init --type --help --version [DIR]..." | ||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then | ||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) | ||
return 0 | ||
fi | ||
case "${prev}" in | ||
--step) | ||
COMPREPLY=($(compgen -f "${cur}")) | ||
return 0 | ||
;; | ||
-s) | ||
COMPREPLY=($(compgen -f "${cur}")) | ||
return 0 | ||
;; | ||
--init) | ||
COMPREPLY=($(compgen -f "${cur}")) | ||
return 0 | ||
;; | ||
-i) | ||
COMPREPLY=($(compgen -f "${cur}")) | ||
return 0 | ||
;; | ||
--type) | ||
COMPREPLY=($(compgen -W "first last previous next random keep" -- "${cur}")) | ||
return 0 | ||
;; | ||
-t) | ||
COMPREPLY=($(compgen -W "first last previous next random keep" -- "${cur}")) | ||
return 0 | ||
;; | ||
*) | ||
COMPREPLY=() | ||
;; | ||
esac | ||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) | ||
return 0 | ||
;; | ||
esac | ||
} | ||
|
||
if [[ "${BASH_VERSINFO[0]}" -eq 4 && "${BASH_VERSINFO[1]}" -ge 4 || "${BASH_VERSINFO[0]}" -gt 4 ]]; then | ||
complete -F _sibling -o nosort -o bashdefault -o default sibling | ||
else | ||
complete -F _sibling -o bashdefault -o default sibling | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
|
||
use builtin; | ||
use str; | ||
|
||
set edit:completion:arg-completer[sibling] = {|@words| | ||
fn spaces {|n| | ||
builtin:repeat $n ' ' | str:join '' | ||
} | ||
fn cand {|text desc| | ||
edit:complex-candidate $text &display=$text' '(spaces (- 14 (wcswidth $text)))$desc | ||
} | ||
var command = 'sibling' | ||
for word $words[1..-1] { | ||
if (str:has-prefix $word '-') { | ||
break | ||
} | ||
set command = $command';'$word | ||
} | ||
var completions = [ | ||
&'sibling'= { | ||
cand -s 'specify the number of times to execute sibling' | ||
cand --step 'specify the number of times to execute sibling' | ||
cand -i 'generate the initialize script for the shell' | ||
cand --init 'generate the initialize script for the shell' | ||
cand -t 'specify the nexter type' | ||
cand --type 'specify the nexter type' | ||
cand --csv 'print the result in the csv format' | ||
cand -a 'print the directory name in the absolute path' | ||
cand --absolute 'print the directory name in the absolute path' | ||
cand -l 'list the sibling directories' | ||
cand --list 'list the sibling directories' | ||
cand -p 'print the progress of traversing directories' | ||
cand --progress 'print the progress of traversing directories' | ||
cand -P 'print parent directory, when no more sibling directories are found' | ||
cand --parent 'print parent directory, when no more sibling directories are found' | ||
cand -h 'Print help' | ||
cand --help 'Print help' | ||
cand -V 'Print version' | ||
cand --version 'Print version' | ||
} | ||
] | ||
$completions[$command] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
complete -c sibling -s s -l step -d 'specify the number of times to execute sibling' -r | ||
complete -c sibling -s i -l init -d 'generate the initialize script for the shell' -r | ||
complete -c sibling -s t -l type -d 'specify the nexter type' -r -f -a "{first\t'',last\t'',previous\t'',next\t'',random\t'',keep\t''}" | ||
complete -c sibling -l csv -d 'print the result in the csv format' | ||
complete -c sibling -s a -l absolute -d 'print the directory name in the absolute path' | ||
complete -c sibling -s l -l list -d 'list the sibling directories' | ||
complete -c sibling -s p -l progress -d 'print the progress of traversing directories' | ||
complete -c sibling -s P -l parent -d 'print parent directory, when no more sibling directories are found' | ||
complete -c sibling -s h -l help -d 'Print help' | ||
complete -c sibling -s V -l version -d 'Print version' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
|
||
using namespace System.Management.Automation | ||
using namespace System.Management.Automation.Language | ||
|
||
Register-ArgumentCompleter -Native -CommandName 'sibling' -ScriptBlock { | ||
param($wordToComplete, $commandAst, $cursorPosition) | ||
|
||
$commandElements = $commandAst.CommandElements | ||
$command = @( | ||
'sibling' | ||
for ($i = 1; $i -lt $commandElements.Count; $i++) { | ||
$element = $commandElements[$i] | ||
if ($element -isnot [StringConstantExpressionAst] -or | ||
$element.StringConstantType -ne [StringConstantType]::BareWord -or | ||
$element.Value.StartsWith('-') -or | ||
$element.Value -eq $wordToComplete) { | ||
break | ||
} | ||
$element.Value | ||
}) -join ';' | ||
|
||
$completions = @(switch ($command) { | ||
'sibling' { | ||
[CompletionResult]::new('-s', 's', [CompletionResultType]::ParameterName, 'specify the number of times to execute sibling') | ||
[CompletionResult]::new('--step', 'step', [CompletionResultType]::ParameterName, 'specify the number of times to execute sibling') | ||
[CompletionResult]::new('-i', 'i', [CompletionResultType]::ParameterName, 'generate the initialize script for the shell') | ||
[CompletionResult]::new('--init', 'init', [CompletionResultType]::ParameterName, 'generate the initialize script for the shell') | ||
[CompletionResult]::new('-t', 't', [CompletionResultType]::ParameterName, 'specify the nexter type') | ||
[CompletionResult]::new('--type', 'type', [CompletionResultType]::ParameterName, 'specify the nexter type') | ||
[CompletionResult]::new('--csv', 'csv', [CompletionResultType]::ParameterName, 'print the result in the csv format') | ||
[CompletionResult]::new('-a', 'a', [CompletionResultType]::ParameterName, 'print the directory name in the absolute path') | ||
[CompletionResult]::new('--absolute', 'absolute', [CompletionResultType]::ParameterName, 'print the directory name in the absolute path') | ||
[CompletionResult]::new('-l', 'l', [CompletionResultType]::ParameterName, 'list the sibling directories') | ||
[CompletionResult]::new('--list', 'list', [CompletionResultType]::ParameterName, 'list the sibling directories') | ||
[CompletionResult]::new('-p', 'p', [CompletionResultType]::ParameterName, 'print the progress of traversing directories') | ||
[CompletionResult]::new('--progress', 'progress', [CompletionResultType]::ParameterName, 'print the progress of traversing directories') | ||
[CompletionResult]::new('-P', 'P ', [CompletionResultType]::ParameterName, 'print parent directory, when no more sibling directories are found') | ||
[CompletionResult]::new('--parent', 'parent', [CompletionResultType]::ParameterName, 'print parent directory, when no more sibling directories are found') | ||
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help') | ||
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help') | ||
[CompletionResult]::new('-V', 'V ', [CompletionResultType]::ParameterName, 'Print version') | ||
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Print version') | ||
break | ||
} | ||
}) | ||
|
||
$completions.Where{ $_.CompletionText -like "$wordToComplete*" } | | ||
Sort-Object -Property ListItemText | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#compdef sibling | ||
|
||
autoload -U is-at-least | ||
|
||
_sibling() { | ||
typeset -A opt_args | ||
typeset -a _arguments_options | ||
local ret=1 | ||
|
||
if is-at-least 5.2; then | ||
_arguments_options=(-s -S -C) | ||
else | ||
_arguments_options=(-s -C) | ||
fi | ||
|
||
local context curcontext="$curcontext" state line | ||
_arguments "${_arguments_options[@]}" : \ | ||
'-s+[specify the number of times to execute sibling]:COUNT: ' \ | ||
'--step=[specify the number of times to execute sibling]:COUNT: ' \ | ||
'-i+[generate the initialize script for the shell]:SHELL: ' \ | ||
'--init=[generate the initialize script for the shell]:SHELL: ' \ | ||
'-t+[specify the nexter type]:TYPE:(first last previous next random keep)' \ | ||
'--type=[specify the nexter type]:TYPE:(first last previous next random keep)' \ | ||
'--csv[print the result in the csv format]' \ | ||
'-a[print the directory name in the absolute path]' \ | ||
'--absolute[print the directory name in the absolute path]' \ | ||
'-l[list the sibling directories]' \ | ||
'--list[list the sibling directories]' \ | ||
'-p[print the progress of traversing directories]' \ | ||
'--progress[print the progress of traversing directories]' \ | ||
'-P[print parent directory, when no more sibling directories are found]' \ | ||
'--parent[print parent directory, when no more sibling directories are found]' \ | ||
'-h[Print help]' \ | ||
'--help[Print help]' \ | ||
'-V[Print version]' \ | ||
'--version[Print version]' \ | ||
'*::dirs -- the target directory:_files' \ | ||
&& ret=0 | ||
} | ||
|
||
(( $+functions[_sibling_commands] )) || | ||
_sibling_commands() { | ||
local commands; commands=() | ||
_describe -t commands 'sibling commands' commands "$@" | ||
} | ||
|
||
if [ "$funcstack[1]" = "_sibling" ]; then | ||
_sibling "$@" | ||
else | ||
compdef _sibling sibling | ||
fi |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{{- $version := $.Site.Params.version }} | ||
{{- if eq (.Get "double_dash") "true" -}} | ||
{{- $version = strings.Replace $version "-" "--" -}} | ||
{{- end -}} | ||
{{ $version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.