ada58e8818
- Replicate bash bang-operations (!^, !*, !string, etc.) via abbreviations - Add Ctrl+G for previous path head insertion - Add Ctrl+F for interactive history substitution - Add Ctrl+Alt+U to quickly replace command tokens - Update README documentation for all new features
12 lines
371 B
Fish
12 lines
371 B
Fish
function __insert_previous_path_head
|
|
# Get the last command tokens
|
|
set -l tokens (string split -n " " -- $history[1])
|
|
|
|
# If there are tokens, take the last one and strip the 'tail'
|
|
if set -q tokens[-1]
|
|
set -l path_head (dirname -- $tokens[-1])
|
|
# Insert it into the current command line
|
|
commandline -i -- $path_head
|
|
end
|
|
end
|