X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=states%2Fbash%2Ffiles%2Fbash_aliases;fp=states%2Fbash%2Ffiles%2Fbash_aliases;h=0000000000000000000000000000000000000000;hb=288c0509a2dcccbca6ab39cb282c983e5f089a0d;hp=d5cc9d5ca933872062bbcccab5a85f84f5a0cfe1;hpb=db255d601320b867b8a6d0ba8ec7825f94297e72;p=max%2Fsaltfiles.git diff --git a/states/bash/files/bash_aliases b/states/bash/files/bash_aliases deleted file mode 100644 index d5cc9d5..0000000 --- a/states/bash/files/bash_aliases +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -if [ -x /usr/bin/dircolors ]; then - test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" - alias ls='ls --color=auto' - alias dir='dir --color=auto' - alias vdir='vdir --color=auto' - - alias grep='grep --color=auto' - alias fgrep='fgrep --color=auto' - alias egrep='egrep --color=auto' -fi - -function la { - ls_out=$(\ls -lah --color=always "$@") - let "allowed_lines = $(tput lines) - 3" - if [ $(echo "$ls_out" | wc -l) -le $allowed_lines ]; then - echo "$ls_out" - else - echo "$ls_out" | less -r - fi -} -alias tmux='TERM=xterm-256color tmux' -if [ -x /usr/bin/gvim ]; then - alias vim='gvim -v' -fi - - -function ssh_in() { - control_file="$TMPDIR/${1}_ssh_in" - if [[ -e $control_file ]]; then - echo "Session is already open" - exit - fi - - cat ~/.tmux.conf | ssh \ - -M \ - -S "$control_file" \ - -o ControlPersist=yes \ - "${1}" \ - 'cat - > ~/.tmux_ssh.conf' - - - i3-sensible-terminal -e \ - sh -c \ - "ssh \ - -o RemoteCommand=\"/bin/sh -c 'exec tmux -f ~/.tmux_ssh.conf new -As remote'\" \ - -S \"$control_file\" \ - -t \ - \"$@\" - ssh -O exit -S \"$control_file\" \"$1\"" -}