Fix zsh config inclusion
This commit is contained in:
		
							
								
								
									
										9
									
								
								zsh/.oh-my-zsh_old/plugins/thefuck/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								zsh/.oh-my-zsh_old/plugins/thefuck/README.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| # The Fuck | ||||
|  | ||||
| [The Fuck](https://github.com/nvbn/thefuck) plugin — magnificent app which corrects your previous console command. | ||||
|  | ||||
| ## Usage | ||||
| Press `ESC` twice to correct previous console command. | ||||
|  | ||||
| ## Notes | ||||
| `Esc`-`Esc` key binding conflicts with [sudo](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/sudo) plugin. | ||||
							
								
								
									
										20
									
								
								zsh/.oh-my-zsh_old/plugins/thefuck/thefuck.plugin.zsh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								zsh/.oh-my-zsh_old/plugins/thefuck/thefuck.plugin.zsh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| if [[ -z $commands[thefuck] ]]; then | ||||
|     echo 'thefuck is not installed, you should "pip install thefuck" or "brew install thefuck" first.' | ||||
|     echo 'See https://github.com/nvbn/thefuck#installation' | ||||
|     return 1 | ||||
| fi | ||||
|  | ||||
| # Register alias | ||||
| eval "$(thefuck --alias)" | ||||
|  | ||||
| fuck-command-line() { | ||||
|     local FUCK="$(THEFUCK_REQUIRE_CONFIRMATION=0 thefuck $(fc -ln -1 | tail -n 1) 2> /dev/null)" | ||||
|     [[ -z $FUCK ]] && echo -n -e "\a" && return | ||||
|     BUFFER=$FUCK | ||||
|     zle end-of-line | ||||
| } | ||||
| zle -N fuck-command-line | ||||
| # Defined shortcut keys: [Esc] [Esc] | ||||
| bindkey -M emacs '\e\e' fuck-command-line | ||||
| bindkey -M vicmd '\e\e' fuck-command-line | ||||
| bindkey -M viins '\e\e' fuck-command-line | ||||
		Reference in New Issue
	
	Block a user