summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.fish4
-rw-r--r--functions/ac.fish3
-rw-r--r--functions/ag.fish3
-rw-r--r--functions/as.fish5
-rw-r--r--functions/fish_greeting.fish3
-rw-r--r--functions/fish_prompt.fish9
-rw-r--r--functions/fish_title.fish3
-rw-r--r--functions/imgup.fish7
8 files changed, 37 insertions, 0 deletions
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