mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 09:01:39 -05:00
Cheer up linter
This commit is contained in:
parent
72dfbddf3f
commit
304e5941bb
3 changed files with 14 additions and 16 deletions
|
@ -9,7 +9,7 @@ commits=$(git log -S "$@" --oneline --all --reverse | cut -d ' ' -f 1)
|
|||
for commit in $commits
|
||||
do
|
||||
# get the tag for the commit
|
||||
tag=$(git describe --tags $commit 2> /dev/null)
|
||||
tag=$(git describe --tags "$commit" 2> /dev/null)
|
||||
|
||||
# if the commit has a tag, break out of the loop
|
||||
if [ -n "$tag" ]
|
||||
|
@ -18,8 +18,8 @@ do
|
|||
fi
|
||||
done
|
||||
|
||||
prestr=pre$(git rev-list --count $commit)
|
||||
prestr=pre$(git rev-list --count "$commit")
|
||||
|
||||
# replace the middle number in tag-number-commit with prestr
|
||||
# nb: there's an extra -g but I don't care enough
|
||||
echo $tag | sed "s/\([^-]*\)-\([^-]*\)-\([^-]*\)/\1-$prestr-\3/"
|
||||
echo "$tag" | sed "s/\([^-]*\)-\([^-]*\)-\([^-]*\)/\1-$prestr-\3/"
|
||||
|
|
|
@ -2641,12 +2641,11 @@ export async function tabpush(windowId?: number) {
|
|||
const tabId = await activeTabId()
|
||||
const winId = windowId ?? nextWindow.id
|
||||
const pos = await config.getAsync("tabopenpos")
|
||||
switch (pos) {
|
||||
case "last":
|
||||
return browser.tabs.move(tabId, { index: -1, windowId: winId })
|
||||
default:
|
||||
let index = (await activeTabOnWindow(winId)).index + 1
|
||||
return browser.tabs.move(tabId, { index: index, windowId: winId })
|
||||
if (pos == "last") {
|
||||
return browser.tabs.move(tabId, { index: -1, windowId: winId })
|
||||
} else {
|
||||
const index = (await activeTabOnWindow(winId)).index + 1
|
||||
return browser.tabs.move(tabId, { index, windowId: winId })
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2708,12 +2707,11 @@ export async function tabgrab(id: string) {
|
|||
const windowId = (await browser.windows.getLastFocused({ windowTypes: ["normal"] })).id
|
||||
// Move window
|
||||
const pos = await config.getAsync("tabopenpos")
|
||||
switch (pos) {
|
||||
case "last":
|
||||
return browser.tabs.move(tabid, { index: -1, windowId })
|
||||
default:
|
||||
let index = (await activeTab()).index + 1
|
||||
return browser.tabs.move(tabid, { index: index, windowId })
|
||||
if (pos == "last") {
|
||||
return browser.tabs.move(tabid, { index: -1, windowId })
|
||||
} else {
|
||||
const index = (await activeTab()).index + 1
|
||||
return browser.tabs.move(tabid, { index, windowId })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ export async function activeTab() {
|
|||
export async function activeTabOnWindow(windowId?: number) {
|
||||
return (
|
||||
await browser.tabs.query({
|
||||
windowId: windowId,
|
||||
windowId,
|
||||
active: true
|
||||
})
|
||||
)[0]
|
||||
|
|
Loading…
Add table
Reference in a new issue