summaryrefslogtreecommitdiff
path: root/.config/fish/functions/__fzf_parse_commandline.fish
diff options
context:
space:
mode:
Diffstat (limited to '.config/fish/functions/__fzf_parse_commandline.fish')
-rw-r--r--.config/fish/functions/__fzf_parse_commandline.fish23
1 files changed, 0 insertions, 23 deletions
diff --git a/.config/fish/functions/__fzf_parse_commandline.fish b/.config/fish/functions/__fzf_parse_commandline.fish
deleted file mode 100644
index 80bf3eb..0000000
--- a/.config/fish/functions/__fzf_parse_commandline.fish
+++ /dev/null
@@ -1,23 +0,0 @@
-function __fzf_parse_commandline -d 'Parse the current command line token and return split of existing filepath and rest of token'
- # eval is used to do shell expansion on paths
- set -l commandline (eval "printf '%s' "(commandline -t))
-
- if [ -z $commandline ]
- # Default to current directory with no --query
- set dir '.'
- set fzf_query ''
- else
- set dir (__fzf_get_dir $commandline)
-
- if [ "$dir" = "." -a (string sub -l 1 $commandline) != '.' ]
- # if $dir is "." but commandline is not a relative path, this means no file path found
- set fzf_query $commandline
- else
- # Also remove trailing slash after dir, to "split" input properly
- set fzf_query (string replace -r "^$dir/?" '' "$commandline")
- end
- end
-
- echo $dir
- echo $fzf_query
-end