diff options
| author | TwoFinger <Two-Finger@users.noreply.github.com> | 2018-01-27 12:06:35 +0200 |
|---|---|---|
| committer | TwoFinger <Two-Finger@users.noreply.github.com> | 2018-01-27 16:59:24 +0200 |
| commit | 83ac70b7a2dac1e100f1fddb40383c017ddb94cf (patch) | |
| tree | e4fd874d2e0329ccf5b4c667e756ea0662d5b717 | |
| parent | 4709c829619dcbb568c16daf221295fe0a45db8c (diff) | |
| download | vis-83ac70b7a2dac1e100f1fddb40383c017ddb94cf.tar.gz vis-83ac70b7a2dac1e100f1fddb40383c017ddb94cf.tar.xz | |
vis-complete: Strip the common part
The previous commit would generate duplicate entries when files with the
same name exist in more than one directory.
| -rwxr-xr-x | vis-complete | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vis-complete b/vis-complete index 2df916c..2e664b0 100755 --- a/vis-complete +++ b/vis-complete @@ -58,8 +58,8 @@ else \) 2>/dev/null | head -n $FIND_FILE_LIMIT | sort | - xargs -n1 basename + sed "s|^$(dirname $XPATTERN)/||" fi | vis-menu -b | - sed "s/^$(basename $PATTERN)//" | + sed "s|^$(basename $PATTERN)$(echo $PATTERN | tail -c 2 | fgrep /)||" | tr -d '\n' |
