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). --- a/thefuck/shells/generic.py 2018-12-20 16:25:30.217136599 +0000 +++ b/thefuck/shells/generic.py 2018-12-20 16:26:11.156565614 +0000 @@ -35,7 +35,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")