diff --git a/src/completions.ts b/src/completions.ts index 8461fc1b..bb726ff9 100644 --- a/src/completions.ts +++ b/src/completions.ts @@ -449,8 +449,11 @@ export class HistoryCompletionSource extends CompletionSourceFuse { constructor(private _parent) { super( [ + "o ", "open ", + "t ", "tabopen ", + "w ", "winopen ", ], "HistoryCompletionSource", "History" @@ -575,6 +578,7 @@ export class BufferCompletionSource extends CompletionSourceFuse { constructor(private _parent) { super( [ + "b ", "buffer ", "tabclose ", "tabdetach ", diff --git a/src/excmds.ts b/src/excmds.ts index 180d5dd6..ca70d1a9 100644 --- a/src/excmds.ts +++ b/src/excmds.ts @@ -274,6 +274,12 @@ export function open(...urlarr: string[]) { window.location.href = forceURI(url) } +/** Convenience function for [[ open ]] */ +//#background +export function o(...urlarr: string[]) { + open(...urlarr) +} + /** Go to your homepage(s) @@ -628,6 +634,12 @@ export async function tablast() { tabIndexSetActive(0) } +/** Convenience function for [[tabopen]] */ +//#background +export async function t(...addressarr: string[]) { + tabopen(...addressarr) +} + /** Like [[open]], but in a new tab. If no address is given, it will open the newtab page, which can be set with `set newtab [url]` */ //#background export async function tabopen(...addressarr: string[]) { @@ -785,6 +797,12 @@ export async function pin() { // {{{ WINDOWS +/** Alias for [[winopen]] */ +//#background +export async function w(...args: string[]) { + winopen(...args) +} + /** Like [[tabopen]], but in a new window */ //#background export async function winopen(...args: string[]) { @@ -1028,6 +1046,12 @@ export async function buffers() { tabs() } +/** Alias for [[buffer]] */ +//#background +export async function b(index: number | '#') { + buffer(index) +} + /** Change active tab. @param index