From dbf09a6f2cc016c1d571ec337acd11e517094456 Mon Sep 17 00:00:00 2001 From: Nathan Lasseter Date: Sun, 3 Apr 2011 23:30:24 +0100 Subject: First Commit --- config.fish | 4 ++++ functions/ac.fish | 3 +++ functions/ag.fish | 3 +++ functions/as.fish | 5 +++++ functions/fish_greeting.fish | 3 +++ functions/fish_prompt.fish | 9 +++++++++ functions/fish_title.fish | 3 +++ functions/imgup.fish | 7 +++++++ 8 files changed, 37 insertions(+) create mode 100644 config.fish create mode 100644 functions/ac.fish create mode 100644 functions/ag.fish create mode 100644 functions/as.fish create mode 100644 functions/fish_greeting.fish create mode 100644 functions/fish_prompt.fish create mode 100644 functions/fish_title.fish create mode 100644 functions/imgup.fish diff --git a/config.fish b/config.fish new file mode 100644 index 0000000..74c104a --- /dev/null +++ b/config.fish @@ -0,0 +1,4 @@ +alias she='ssh njel500@milan.cs.york.ac.uk' +alias sft='sftp njel500@milan.cs.york.ac.uk' +alias shx='ssh -YC njel500@milan.cs.york.ac.uk' +alias 4574='ssh nathan@4574.co.uk' diff --git a/functions/ac.fish b/functions/ac.fish new file mode 100644 index 0000000..8a96c90 --- /dev/null +++ b/functions/ac.fish @@ -0,0 +1,3 @@ +function ac + sudo apt-cache search $argv +end diff --git a/functions/ag.fish b/functions/ag.fish new file mode 100644 index 0000000..f89dea6 --- /dev/null +++ b/functions/ag.fish @@ -0,0 +1,3 @@ +function ag + sudo apt-get install $argv +end diff --git a/functions/as.fish b/functions/as.fish new file mode 100644 index 0000000..e7ceaa7 --- /dev/null +++ b/functions/as.fish @@ -0,0 +1,5 @@ +function as + sudo apt-get update + sudo apt-get -y upgrade + sudo apt-get -y autoremove +end diff --git a/functions/fish_greeting.fish b/functions/fish_greeting.fish new file mode 100644 index 0000000..ee30df4 --- /dev/null +++ b/functions/fish_greeting.fish @@ -0,0 +1,3 @@ +function fish_greeting + set -g cmdcount 0 +end diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish new file mode 100644 index 0000000..ad34183 --- /dev/null +++ b/functions/fish_prompt.fish @@ -0,0 +1,9 @@ +function fish_prompt + set cmdcount (math $cmdcount+1) + printf '[%d] ' $cmdcount + if test -d .git + printf '%s%s %s(%s)%s>: ' (set_color red) (pwd) (set_color blue) (git branch | grep "*" | awk -F" " '{print $2}') (set_color normal) + else + printf '%s%s%s>: ' (set_color red) (pwd) (set_color normal) + end +end diff --git a/functions/fish_title.fish b/functions/fish_title.fish new file mode 100644 index 0000000..d4776ab --- /dev/null +++ b/functions/fish_title.fish @@ -0,0 +1,3 @@ +function fish_title + echo Terminal +end diff --git a/functions/imgup.fish b/functions/imgup.fish new file mode 100644 index 0000000..08a7033 --- /dev/null +++ b/functions/imgup.fish @@ -0,0 +1,7 @@ +function imgup + if test -n (echo $argv | awk '{print $2}') + cat $argv[1] | ssh nathan@4574.co.uk "sudo su - www-data -c 'cat > /var/www/gallery/$argv[2]'" + else + cat $argv[1] | ssh nathan@4574.co.uk "sudo su - www-data -c 'cat > /var/www/gallery/$argv[1]'" + end +end -- cgit v1.2.1