79214113

Date: 2024-11-22 08:09:02
Score: 0.5
Natty:
Report link

A little late but here is my approach:

  1. Maintained a separate copy of the function's original logic, referred to as ~/.config/fish/functions/__fish_move_last_copy.fish (the basepath is a conventional place for custom fish functions, also specified inside $FISH_FUNCTION_PATH).

  2. Also in ~/.config/fish/functions, write your new __fish_move_last.fish, import __fish_move_last_copy.fish inside it then passed all of __fish_move_last.fish's arguments to __fish_move_last_copy.fish.

  3. Add a cronjob (or systemd timer, whatever suits you) to copy /usr/share/fish/functions/__fish_move_last.fish to ~/.config/fish/functions/__fish_move_last_copy.fish every start of the week (too frequent? month is also good as well).

This is how I managed to overwrite many of Fish's default function without the fear of original function gets update later

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: silverbullet069