Skip to content

Instantly share code, notes, and snippets.

View kassick's full-sized avatar

Rodrigo Kassick kassick

  • Porto Alegre, Brasil
View GitHub Profile
# Failure to copy here is expected, since CWD is clearly not ~/.oh-my-zsh
# Caveat emptor -- the user chooses to chase symlinks, he/she must track
# the current working directory
Voyager% setopt chaselinks
Voyager% pwd
/home/kassick
Voyager% cd .oh-my-zsh
Voyager% pwd
# Failure unexpected
# pwd reports that CWD is ~/.oh-my-zsh , the user
# would expect that the process executing 'cp' would run with cwd ~/.oh-my-zsh
# but zsh forks the process on the realpath -- which is odd from a user perspective
# specially due to the output of pwd
Voyager% pwd
/home/kassick
Voyager% setopt nochaselinks
@kassick
kassick / gist:bccb8fd02adc3f190a013f741a906d5a
Created July 27, 2016 14:54
Odd zsh behaviour when chdir into symlinks
▶ cd
~
▶ file .oh-my-zsh
.oh-my-zsh: symbolic link to /home/kassick/Sources/dotfiles/dot/oh-my-zsh
~
▶ cd .oh-my-zsh
~/.oh-my-zsh master ✗ 5d ◒
@kassick
kassick / company-simple-complete.el
Last active June 4, 2016 02:17
company-complete-simple.el with some tweaks
;; Modify company so that tab and S-tab cycle through completions without
;; needing to hit enter.
(defvar-local company-simple-complete--previous-prefix nil)
(defvar-local company-simple-complete--before-complete-point nil)
(defun company-simple-complete-frontend (command)
(when (or (eq command 'show)
(and (eq command 'update)
(not (equal company-prefix company-simple-complete--previous-prefix))))