mirror of
https://github.com/nvbn/thefuck.git
synced 2025-01-31 10:11:14 +00:00
#585: Add note about reloading changes in how to configure message
This commit is contained in:
parent
3a9942061d
commit
8447b5caa2
@ -83,13 +83,14 @@ def how_to_configure_alias(configuration_details):
|
|||||||
print("Seems like {bold}fuck{reset} alias isn't configured!".format(
|
print("Seems like {bold}fuck{reset} alias isn't configured!".format(
|
||||||
bold=color(colorama.Style.BRIGHT),
|
bold=color(colorama.Style.BRIGHT),
|
||||||
reset=color(colorama.Style.RESET_ALL)))
|
reset=color(colorama.Style.RESET_ALL)))
|
||||||
|
|
||||||
if configuration_details:
|
if configuration_details:
|
||||||
content, path = configuration_details
|
|
||||||
print(
|
print(
|
||||||
"Please put {bold}{content}{reset} in your "
|
"Please put {bold}{content}{reset} in your "
|
||||||
"{bold}{path}{reset}.".format(
|
"{bold}{path}{reset} and apply "
|
||||||
|
"changes with {bold}{reload}{reset} or restart your shell.".format(
|
||||||
bold=color(colorama.Style.BRIGHT),
|
bold=color(colorama.Style.BRIGHT),
|
||||||
reset=color(colorama.Style.RESET_ALL),
|
reset=color(colorama.Style.RESET_ALL),
|
||||||
path=path,
|
**configuration_details))
|
||||||
content=content))
|
|
||||||
print('More details - https://github.com/nvbn/thefuck#manual-installation')
|
print('More details - https://github.com/nvbn/thefuck#manual-installation')
|
||||||
|
@ -44,4 +44,9 @@ class Bash(Generic):
|
|||||||
config = '~/.bashrc'
|
config = '~/.bashrc'
|
||||||
else:
|
else:
|
||||||
config = 'bash config'
|
config = 'bash config'
|
||||||
return 'eval $(thefuck --alias)', config
|
|
||||||
|
return {
|
||||||
|
'content': 'eval $(thefuck --alias)',
|
||||||
|
'path': config,
|
||||||
|
'reload': u'source {}'.format(config),
|
||||||
|
}
|
||||||
|
@ -67,8 +67,11 @@ class Fish(Generic):
|
|||||||
return u'; and '.join(commands)
|
return u'; and '.join(commands)
|
||||||
|
|
||||||
def how_to_configure(self):
|
def how_to_configure(self):
|
||||||
return (r"eval (thefuck --alias | tr '\n' ';')",
|
return {
|
||||||
'~/.config/fish/config.fish')
|
'content': r"eval (thefuck --alias | tr '\n' ';')",
|
||||||
|
'path': '~/.config/fish/config.fish',
|
||||||
|
'reload': 'fish',
|
||||||
|
}
|
||||||
|
|
||||||
def put_to_history(self, command):
|
def put_to_history(self, command):
|
||||||
try:
|
try:
|
||||||
|
@ -15,4 +15,8 @@ class Powershell(Generic):
|
|||||||
return u' -and '.join('({0})'.format(c) for c in commands)
|
return u' -and '.join('({0})'.format(c) for c in commands)
|
||||||
|
|
||||||
def how_to_configure(self):
|
def how_to_configure(self):
|
||||||
return 'iex "thefuck --alias"', '$profile'
|
return {
|
||||||
|
'content': 'iex "thefuck --alias"',
|
||||||
|
'path': '$profile',
|
||||||
|
'reload': '& $profile',
|
||||||
|
}
|
||||||
|
@ -31,4 +31,8 @@ class Tcsh(Generic):
|
|||||||
return u'#+{}\n{}\n'.format(int(time()), command_script)
|
return u'#+{}\n{}\n'.format(int(time()), command_script)
|
||||||
|
|
||||||
def how_to_configure(self):
|
def how_to_configure(self):
|
||||||
return 'eval `thefuck --alias`', '~/.tcshrc'
|
return {
|
||||||
|
'content': 'eval `thefuck --alias`',
|
||||||
|
'path': '~/.tcshrc',
|
||||||
|
'reload': 'tcsh',
|
||||||
|
}
|
||||||
|
@ -45,4 +45,8 @@ class Zsh(Generic):
|
|||||||
return ''
|
return ''
|
||||||
|
|
||||||
def how_to_configure(self):
|
def how_to_configure(self):
|
||||||
return 'eval $(thefuck --alias)', '~/.zshrc'
|
return {
|
||||||
|
'content': 'eval $(thefuck --alias)',
|
||||||
|
'path': '~/.zshrc',
|
||||||
|
'reload': 'source ~/.zshrc',
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user