Skip to content

Commit

Permalink
adding search functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Cveinnt committed May 12, 2022
1 parent b0d8afb commit bbfba0e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/utils/bin/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,27 @@ export const linkedin = async (args: string[]): Promise<string> => {
return 'Opening linkedin...';
};

// Search
export const google = async (args: string[]): Promise<string> => {
window.open(`https://google.com/search?q=${args.join(' ')}`);
return `Searching google for ${args.join(' ')}...`;
};

export const duckduckgo = async (args: string[]): Promise<string> => {
window.open(`https://duckduckgo.com/?q=${args.join(' ')}`);
return `Searching duckduckgo for ${args.join(' ')}...`;
};

export const bing = async (args: string[]): Promise<string> => {
window.open(`https://bing.com/search?q=${args.join(' ')}`);
return `Wow, really? You are using bing for ${args.join(' ')}?`;
};

export const reddit = async (args: string[]): Promise<string> => {
window.open(`https://www.reddit.com/search/?q=${args.join(' ')}`);
return `Searching reddit for ${args.join(' ')}...`;
};

// Typical linux commands
export const echo = async (args: string[]): Promise<string> => {
return args.join(' ');
Expand Down

0 comments on commit bbfba0e

Please sign in to comment.