diff options
Diffstat (limited to 'functions')
| -rw-r--r-- | functions/ac.fish | 3 | ||||
| -rw-r--r-- | functions/ag.fish | 3 | ||||
| -rw-r--r-- | functions/as.fish | 5 | ||||
| -rw-r--r-- | functions/fish_greeting.fish | 3 | ||||
| -rw-r--r-- | functions/fish_prompt.fish | 9 | ||||
| -rw-r--r-- | functions/fish_title.fish | 3 | ||||
| -rw-r--r-- | functions/imgup.fish | 7 | 
7 files changed, 33 insertions, 0 deletions
| 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 | 
