From a4db91cd2673ccbb9db4983e1bac99c547c1e2ec Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Fri, 9 Dec 2011 10:43:57 +0100 Subject: [PATCH] FISH: Bring config closer to ZSH --- .config/fish/config.fish | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 0cd7cd9..c397118 100755 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -1,4 +1,5 @@ -#! /bin/bash +#! /usr/bin/fish + function fish_prompt -d "Write out the prompt" printf '(%s%s %s%s%s)> ' (set_color 'magenta') (hostname|cut -d . -f 1) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal) end @@ -15,4 +16,32 @@ function less /bin/less -FXRS $argv end -set PAGER less +function ls + /bin/ls -F --color=always $argv +end + +function mysql + /usr/bin/mysql --pager $argv +end + +function slrn + set -x NNTPSERVER 'news.gmane.org' + /usr/bin/slrn $argv +end + +function shutdown + dbus-send --system --print-reply \ + --dest="org.freedesktop.ConsoleKit" \ + /org/freedesktop/ConsoleKit/Manager \ + org.freedesktop.ConsoleKit.Manager.Stop +end + +function reboot + dbus-send --system --print-reply \ + --dest="org.freedesktop.ConsoleKit" \ + /org/freedesktop/ConsoleKit/Manager \ + org.freedesktop.ConsoleKit.Manager.Restart +end + +set -x PAGER 'less -FXRS' +set -x BROWSER firefox