Lots of stuff. Working on refactoring

This commit is contained in:
Thomas Loven
2017-10-14 09:47:18 +02:00
parent 8230d22739
commit 1b5423997e
23 changed files with 620 additions and 12 deletions

14
fish/functions/try_subst.fish Executable file
View File

@@ -0,0 +1,14 @@
function try_subst
# Use s/word/replacement<tab> to replace word with replacement
# in last command
commandline | read -l saved_commandline
set -l pattern '^s/..*/.*$'
if commandline -t | grep -E -q "$pattern"
commandline -tr (echo -n "$history[1]" | sed -e (commandline -t)/g)
else
commandline -f complete
end
end