mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 08:45:39 +00:00
add = to convert program to full path
This commit is contained in:
parent
25a959f404
commit
a7adc18463
@ -76,6 +76,10 @@
|
|||||||
description = "Full git commit on notes";
|
description = "Full git commit on notes";
|
||||||
body = builtins.readFile ./functions/syncnotes.fish;
|
body = builtins.readFile ./functions/syncnotes.fish;
|
||||||
};
|
};
|
||||||
|
_which = {
|
||||||
|
description = "Identify the path to a program in the shell";
|
||||||
|
body = "command --search (string sub --start=2 $argv)";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
interactiveShellInit = ''
|
interactiveShellInit = ''
|
||||||
fish_vi_key_bindings
|
fish_vi_key_bindings
|
||||||
@ -101,6 +105,13 @@
|
|||||||
"-" = "cd -";
|
"-" = "cd -";
|
||||||
mkd = "mkdir -pv";
|
mkd = "mkdir -pv";
|
||||||
|
|
||||||
|
# Convert a program into its full path
|
||||||
|
"=" = {
|
||||||
|
position = "anywhere";
|
||||||
|
regex = "=\\w+";
|
||||||
|
function = "_which";
|
||||||
|
};
|
||||||
|
|
||||||
# System
|
# System
|
||||||
s = "sudo";
|
s = "sudo";
|
||||||
sc = "systemctl";
|
sc = "systemctl";
|
||||||
|
Loading…
Reference in New Issue
Block a user