Cheer up linter

This commit is contained in:
Oliver Blanthorn 2023-12-12 19:32:07 +01:00
parent 72dfbddf3f
commit 304e5941bb
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3
3 changed files with 14 additions and 16 deletions

View file

@ -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/"

View file

@ -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 })
}
}

View file

@ -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]