Browse Source

bashrc: add f __ssh_with_cd

pull/1/head
10sr 11 years ago
parent
commit
87b94fec0e
2 changed files with 27 additions and 0 deletions
  1. +14
    -0
      bashrc
  2. +13
    -0
      emacs.el

+ 14
- 0
bashrc View File

@@ -413,6 +413,20 @@ ssh(){
command ssh "$@" command ssh "$@"
} }


__ssh_with_cd(){
# __ssh_with_cd <host> <directory> [<arg> ...]
if test -z "$2"
then
echo "usage: __ssh_with_cd <host> <directory> [<arg> ...]"
return 1
fi
host="$1"
shift
dir="$1"
shift
ssh "$host" "$@" -t "cd \"$dir\"; \$SHELL -l"
}

memo(){ memo(){
if test -z "$1" if test -z "$1"
then then


+ 13
- 0
emacs.el View File

@@ -2049,6 +2049,19 @@ this is test, does not rename files"
(message file)) (message file))
(message "not visiting file.")))) (message "not visiting file."))))


(defvar kill-ring-buffer-name "*kill-ring*"
"Buffer name for `kill-ring-buffer'.")
(defun open-kill-ring-buffer ()
"Open kill- ring buffer."
(interactive)
(pop-to-buffer
(with-current-buffer (get-buffer-create kill-ring-buffer-name)
(erase-buffer)
(yank)
(text-mode)
(current-local-map)
(goto-char (point-min)))))

;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;; savage emacs ;; ;; savage emacs
;; ;; when enabled emacs fails to complete ;; ;; when enabled emacs fails to complete


Loading…
Cancel
Save