Skip to content

Commit 8012c54

Browse files
bendikrodhellmann
authored andcommitted
Fix shell completion on FreeBSD
sed on FreeBSD does not support '\s', and gives the error: "sed: 1: "/^\s*$/d": RE error: trailing backslash (\)" Fix by using POSIX bracket expression '[[:space:]]'
1 parent 0332d4a commit 8012c54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

virtualenvwrapper.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ function virtualenvwrapper_show_workon_options {
586586
| command \tr "\n" " " \
587587
| command \sed "s|/$VIRTUALENVWRAPPER_ENV_BIN_DIR/activate |/|g" \
588588
| command \tr "/" "\n" \
589-
| command \sed "/^\s*$/d" \
589+
| command \sed "/^[[:space:]]*$/d" \
590590
| (unset GREP_OPTIONS; command \grep -E -v '^\*$') 2>/dev/null
591591
}
592592

0 commit comments

Comments
 (0)