mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 09:31:41 -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
|
for commit in $commits
|
||||||
do
|
do
|
||||||
# get the tag for the commit
|
# 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 the commit has a tag, break out of the loop
|
||||||
if [ -n "$tag" ]
|
if [ -n "$tag" ]
|
||||||
|
@ -18,8 +18,8 @@ do
|
||||||
fi
|
fi
|
||||||
done
|
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
|
# replace the middle number in tag-number-commit with prestr
|
||||||
# nb: there's an extra -g but I don't care enough
|
# 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 tabId = await activeTabId()
|
||||||
const winId = windowId ?? nextWindow.id
|
const winId = windowId ?? nextWindow.id
|
||||||
const pos = await config.getAsync("tabopenpos")
|
const pos = await config.getAsync("tabopenpos")
|
||||||
switch (pos) {
|
if (pos == "last") {
|
||||||
case "last":
|
|
||||||
return browser.tabs.move(tabId, { index: -1, windowId: winId })
|
return browser.tabs.move(tabId, { index: -1, windowId: winId })
|
||||||
default:
|
} else {
|
||||||
let index = (await activeTabOnWindow(winId)).index + 1
|
const index = (await activeTabOnWindow(winId)).index + 1
|
||||||
return browser.tabs.move(tabId, { index: index, windowId: winId })
|
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
|
const windowId = (await browser.windows.getLastFocused({ windowTypes: ["normal"] })).id
|
||||||
// Move window
|
// Move window
|
||||||
const pos = await config.getAsync("tabopenpos")
|
const pos = await config.getAsync("tabopenpos")
|
||||||
switch (pos) {
|
if (pos == "last") {
|
||||||
case "last":
|
|
||||||
return browser.tabs.move(tabid, { index: -1, windowId })
|
return browser.tabs.move(tabid, { index: -1, windowId })
|
||||||
default:
|
} else {
|
||||||
let index = (await activeTab()).index + 1
|
const index = (await activeTab()).index + 1
|
||||||
return browser.tabs.move(tabid, { index: index, windowId })
|
return browser.tabs.move(tabid, { index, windowId })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ export async function activeTab() {
|
||||||
export async function activeTabOnWindow(windowId?: number) {
|
export async function activeTabOnWindow(windowId?: number) {
|
||||||
return (
|
return (
|
||||||
await browser.tabs.query({
|
await browser.tabs.query({
|
||||||
windowId: windowId,
|
windowId,
|
||||||
active: true
|
active: true
|
||||||
})
|
})
|
||||||
)[0]
|
)[0]
|
||||||
|
|
Loading…
Add table
Reference in a new issue