Skip to content

Instantly share code, notes, and snippets.

@pymen
Created December 15, 2013 10:00
Show Gist options
  • Save pymen/7971005 to your computer and use it in GitHub Desktop.
Save pymen/7971005 to your computer and use it in GitHub Desktop.
ZSH Commands
#zsh configs
############### INSERT LAST COMMAND OUTPUT ################
zmodload -i zsh/parameter
insert-last-command-output() {
LBUFFER+=" $(eval $history[$((HISTCMD-1))])"
}
zle -N insert-last-command-output
bindkey "^X^X" insert-last-command-output
###########################################################
###################### COPY PATH OF FILE or FOLDER to CLIPBOARD ############
cc() {
echo -n "$(realpath $1)" | xclip -selection clipboard
}
################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment