aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/__fish_complete_path.fish
diff options
context:
space:
mode:
Diffstat (limited to 'share/functions/__fish_complete_path.fish')
-rw-r--r--share/functions/__fish_complete_path.fish14
1 files changed, 14 insertions, 0 deletions
diff --git a/share/functions/__fish_complete_path.fish b/share/functions/__fish_complete_path.fish
new file mode 100644
index 00000000..e10ef706
--- /dev/null
+++ b/share/functions/__fish_complete_path.fish
@@ -0,0 +1,14 @@
+function __fish_complete_path --description "Complete using path"
+ set -l target
+ set -l description
+ switch (count $argv)
+ case 0
+ # pass
+ case 1
+ set target "$argv[1]"
+ case 2 "*"
+ set target "$argv[1]"
+ set description "$argv[2]"
+ end
+ printf "%s\t$description\n" (command ls -dp "$target"*)
+end