From 7eccc43affd86423c649c7ffd66ab0b21d429f8a Mon Sep 17 00:00:00 2001 From: Deposite Pirate Date: Sun, 26 Jan 2025 06:28:39 +0100 Subject: Move browser functions to separate files. modified: conf.d/05browser.fish new file: functions/www.fish new file: functions/wwwsearch.fish --- conf.d/05browser.fish | 18 ------------------ functions/www.fish | 8 ++++++++ functions/wwwsearch.fish | 8 ++++++++ 3 files changed, 16 insertions(+), 18 deletions(-) create mode 100644 functions/www.fish create mode 100644 functions/wwwsearch.fish diff --git a/conf.d/05browser.fish b/conf.d/05browser.fish index 1a8b92d..6f4eeb0 100644 --- a/conf.d/05browser.fish +++ b/conf.d/05browser.fish @@ -33,24 +33,6 @@ if status is-interactive; and not fish_is_root_user alias webbrowser "$BROWSER" - function www --description "Browser the WWW" - if test -z $argv - webbrowser &>/dev/null - return - end - - webbrowser $argv &>/dev/null - end - - function wwwsearch --description "Search on the WWW" - if test -z $argv - webbrowser $WEBSEARCH &>/dev/null - return - end - - webbrowser "$WEBSEARCH/$argv" &>/dev/null - end - # Console gopher browser to look for by order of preference set -f gbrowsers 'ncgopher' set -f found_gbrowser (find_prog $gbrowsers) diff --git a/functions/www.fish b/functions/www.fish new file mode 100644 index 0000000..0ae1e86 --- /dev/null +++ b/functions/www.fish @@ -0,0 +1,8 @@ +function www --description "Browse the WWW" + if test -z $argv + webbrowser &>/dev/null + return + end + + webbrowser $argv &>/dev/null +end diff --git a/functions/wwwsearch.fish b/functions/wwwsearch.fish new file mode 100644 index 0000000..f07bbcc --- /dev/null +++ b/functions/wwwsearch.fish @@ -0,0 +1,8 @@ +function wwwsearch --description "Search on the WWW" + if test -z $argv + webbrowser $WEBSEARCH &>/dev/null + return + end + + webbrowser "$WEBSEARCH/$argv" &>/dev/null +end -- cgit v1.3.1