aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeposite Pirate2025-01-26 06:28:39 +0100
committerDeposite Pirate2025-01-26 06:28:39 +0100
commit7eccc43affd86423c649c7ffd66ab0b21d429f8a (patch)
tree964bd300c27289aba6f911e1886dec04739bfb19
parent8195e6ade375717aec62a9d4e32b8e8bc3e01125 (diff)
Move browser functions to separate files.
modified: conf.d/05browser.fish new file: functions/www.fish new file: functions/wwwsearch.fish
-rw-r--r--conf.d/05browser.fish18
-rw-r--r--functions/www.fish8
-rw-r--r--functions/wwwsearch.fish8
3 files changed, 16 insertions, 18 deletions
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