aports/testing/thefuck/ash.patch
2020-03-21 19:54:48 +00:00

16 lines
634 B
Diff

This patch replaces the default call to "fc" (which is a builtin
function in many shells) to a sed command to work on the alpine
default shell (ash).
--- old/thefuck/shells/generic.py
+++ new/thefuck/shells/generic.py
@@ -37,7 +37,7 @@
def app_alias(self, alias_name):
return """alias {0}='eval "$(TF_ALIAS={0} PYTHONIOENCODING=utf-8 """ \
- """thefuck "$(fc -ln -1)")"'""".format(alias_name)
+ """thefuck "$(sed -n '\"'x;\\$p'\"' /home/build/.ash_history)")'""".format(alias_name)
def instant_mode_alias(self, alias_name):
warn("Instant mode not supported by your shell")