add emacs tramp command and completion
This commit is contained in:
parent
41e02c7bb1
commit
674f8cd7c1
2 changed files with 4 additions and 0 deletions
|
|
@ -1,3 +1,6 @@
|
||||||
# Some completions
|
# Some completions
|
||||||
compctl -K _completemarks j
|
compctl -K _completemarks j
|
||||||
compdef _path_commands catwhich
|
compdef _path_commands catwhich
|
||||||
|
|
||||||
|
_complete_tramp() {reply=($(ls $INFRA/host && grep "^ [^ ]" ~/dev/robespierre/infra/hosts/all.yml | sed 's/^ *\(.*\):$/\1/'))}
|
||||||
|
compctl -K _complete_tramp tramp
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ dchroot() {docker run --rm --privileged -ti $@ debian:stretch /bin/bash}
|
||||||
dontknow() {echo -n "¯\\_(ツ)_/¯" | xclip}
|
dontknow() {echo -n "¯\\_(ツ)_/¯" | xclip}
|
||||||
dualscreen() {[ $# -eq 1 ] && xrandr --auto && xrandr --output $1 --primary --output eDP1 --left-of $1}
|
dualscreen() {[ $# -eq 1 ] && xrandr --auto && xrandr --output $1 --primary --output eDP1 --left-of $1}
|
||||||
e() {emacsclient -n $@ > /dev/null 2>&1}
|
e() {emacsclient -n $@ > /dev/null 2>&1}
|
||||||
|
tramp() {emacsclient -n $(for x in $@; do echo /root@$x:README; done) > /dev/null 2>&1}
|
||||||
fd() {fdfind -H -I -L $@}
|
fd() {fdfind -H -I -L $@}
|
||||||
ips() {i=0; while [ $i -lt 10 ]; do curl -s ipinfo.io | jq '.ip'; i=$(($i + 1)); done | sort | uniq -c}
|
ips() {i=0; while [ $i -lt 10 ]; do curl -s ipinfo.io | jq '.ip'; i=$(($i + 1)); done | sort | uniq -c}
|
||||||
j() {if [ $# -eq 0 ]; then marks; else jump $@; fi}
|
j() {if [ $# -eq 0 ]; then marks; else jump $@; fi}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue