Skip to content

Instantly share code, notes, and snippets.

@MaxPleaner
Last active January 19, 2017 17:44
Show Gist options
  • Save MaxPleaner/59f1487d791035f58396d8060082944a to your computer and use it in GitHub Desktop.
Save MaxPleaner/59f1487d791035f58396d8060082944a to your computer and use it in GitHub Desktop.
top fish functions
# ~/.config/fish/functions/cfn.fish
# stands for "cat function" (shows a function definition)
function cfn
cat ~/.config/fish/functions/$argv.fish
end
# ~/.config/fish/functions/cfn.fish
# stands for "functions" (lists functions)
function fns
ls ~/.config/fish/functions
end
# ~/.config/fish/functions/cfn.fish
# stands for "funcsave" (saves a function)
function fs
funcsave $argv
end
# ~/.config/fish/functions/cfn.fish
# stands for "remove function" (removes a function)
function rmfn
rm ~/.config/fish/functions/$argv.fish
end
# ~/.config/fish/functions/cfn.fish
# stands for "function" (defines a function)
function fn
echo -e "function $argv[1]\n $argv[2]\nend" > ~/.config/fish/functions/$argv[1].fish
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment