Compare commits
	
		
			2 Commits
		
	
	
		
			309a8833c8
			...
			b694e9cdf5
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| b694e9cdf5 | |||
| d91d6b3534 | 
| @ -2,6 +2,25 @@ | ||||
| 
 | ||||
| autoload colors && colors | ||||
| 
 | ||||
| # Abstract different ways to copy to the clipboard. | ||||
| if [ -n "$SSH_CONNECTION" ] ; then | ||||
|   # Use OSC-52 to set the clipboard | ||||
|   alias copy='base64 | xargs -0 printf "\033]52;c;%s\a"' | ||||
| elif [ "`uname`" = "Darwin" ]; then | ||||
|   # Use pbcopy to set the clipboard | ||||
|   alias copy='pbcopy' | ||||
| elif which xclip &> /dev/null; then | ||||
|   # Use xclip to set the clipboard | ||||
|   alias copy='xclip -selection c' | ||||
| fi | ||||
| 
 | ||||
| # Abstract different ways to paste from the clipboard. | ||||
| if [ "`uname`" = "Darwin" ]; then | ||||
|   alias paste='pbpaste' | ||||
| elif which xclip &> /dev/null; then | ||||
|   alias paste='xclip -selection c -o' | ||||
| fi | ||||
| 
 | ||||
| # Detect the type and extract an archive file. | ||||
| extract() { | ||||
|   if [ -f $1 ]; then | ||||
| @ -25,6 +44,16 @@ extract() { | ||||
|   fi | ||||
| } | ||||
| 
 | ||||
| if which bat &> /dev/null; then | ||||
|   # Wrap bat to specify a theme, always enable color, pipe the output to less. | ||||
|   # Both --theme and --color can be specified multiple times and will override | ||||
|   # these defaults. | ||||
|   bat() { | ||||
|     command bat --theme='Solarized (dark)' --color always \ | ||||
|                 --paging always --pager 'less -R' "$@" | ||||
|   } | ||||
| fi | ||||
| 
 | ||||
| if which docker-machine &> /dev/null; then | ||||
|   # Wrap the docker command to print a message if a docker-machine is not | ||||
|   # running, rather than just stating it can not find it's socket. | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user