summaryrefslogtreecommitdiffstats
path: root/root/.bash_aliases
diff options
context:
space:
mode:
Diffstat (limited to 'root/.bash_aliases')
-rw-r--r--root/.bash_aliases12
1 files changed, 7 insertions, 5 deletions
diff --git a/root/.bash_aliases b/root/.bash_aliases
index 65c81d7..d7730ea 100644
--- a/root/.bash_aliases
+++ b/root/.bash_aliases
@@ -23,10 +23,6 @@ function c () {
gcc -g -Wall -Wextra -pedantic -Wformat -Wformat-security $@ -lm
}
alias pmbootstrap="pmbootstrap --as-root"
-function upload () {
- chmod 0664 "$1"
- sftp -b- upload@4a.si <<< "put '$1' www/`[ '$2'x = x ] && echo $1 || echo $2`"
-}
HISTCONTORL=ignoreboth
shopt -s histappend
HISTSIZE=100000000
@@ -34,7 +30,10 @@ HISTFILESIZE=1000000000
function upload () {
# chmod 0644 "$1"
d=`[ "$2"x = x ] && echo $1 || echo $2`
- sftp -b- upload@upload.sijanec.eu <<< "put '$1' www/$d"
+ sftp -b- upload@upload.sijanec.eu <<EOF
+ progress
+ put '$1' www/$d
+EOF
grep '/$' <<<$d && d=$d`rev <<<$1 | cut -d/ -f1 | rev`
ssh upload@upload.sijanec.eu chmod 0644 "www/$d"
echo https://upload.sijanec.eu./$d | xclip
@@ -75,3 +74,6 @@ function d () {
alias de='docker exec -it `docker ps | tail -n1 | cut -d\ -f1` /bin/bash'
[ -d ~/projects/r/skripti ] && PATH=$PATH:~/projects/r/skripti
export XMLLINT_INDENT=$'\t'
+function j () {
+ javac `sed 's/\.$/.java/' <<<$1` && java `sed -e s/.java// -e 's/\.$//' <<<$1`
+}