shells/fish: fix completions for python

Eliminate errors during command completion for python, python2, and python3 if
the /usr/local/bin/python symlink does not exist.  Additionally, even if the
symlink does exist, the completions will be wrong for the non-default
interpreter.  So I'm simply deleting the problematic completions altogether.  I
opened an upstream bug for the latter issue.

https://github.com/fish-shell/fish-shell/issues/3840

While I'm here, delete an extraneous patch file for DOCS=off

PR:		216987
Reported by:	Keren Sky <keren_sky@live.com>
Approved by:	brd (ports, implicit)
This commit is contained in:
Alan Somers
2017-02-11 05:23:19 +00:00
parent 046dc6241d
commit ffb63ce535
3 changed files with 19 additions and 24 deletions

View File

@@ -3,7 +3,7 @@
PORTNAME= fish
PORTVERSION= 2.4.0
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= shells
MASTER_SITES= http://fishshell.com/files/${PORTVERSION}/
@@ -28,8 +28,6 @@ NLS_USES= gettext
NLS_CONFIGURE_ENV= ac_cv_func_gettext=yes
NLS_CONFIGURE_OFF= --without-gettext
DOCS_EXTRA_PATCHES_OFF= ${FILESDIR}/extra-patch-Makefile.in
post-patch:
@${REINPLACE_CMD} -e \
'/^all:/s|user_doc|| ; \

View File

@@ -1,21 +0,0 @@
--- Makefile.in.orig 2017-01-17 16:12:49 UTC
+++ Makefile.in
@@ -701,12 +701,12 @@ install-force: all install-translations
true; \
done;
@echo "Installing online user documentation";
- $v $(INSTALL) -m 755 -d $(DESTDIR)$(docdir)
- $v for i in user_doc/html/* CHANGELOG.md; do \
- if test -f $$i; then \
- $(INSTALL) -m 644 $$i $(DESTDIR)$(docdir); \
- fi; \
- done;
+# $v $(INSTALL) -m 755 -d $(DESTDIR)$(docdir)
+# $v for i in user_doc/html/* CHANGELOG.md; do \
+# if test -f $$i; then \
+# $(INSTALL) -m 644 $$i $(DESTDIR)$(docdir); \
+# fi; \
+# done;
@echo "Installing more man pages";
$v $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1;
$v for i in $(MANUALS); do \

View File

@@ -0,0 +1,18 @@
--- share/completions/python.fish.orig 2017-02-11 04:56:23 UTC
+++ share/completions/python.fish
@@ -16,15 +16,3 @@ complete -c python -s W -x --description
complete -c python -s x -d 'Skip first line of source, allowing use of non-Unix forms of #!cmd'
complete -c python -a "(__fish_complete_suffix .py)"
complete -c python -a '-' -d 'Read program from stdin'
-
-switch (python -V 2>&1 | string replace -r '^.*\s([23])..*' '$1')[1]
- case 2
- complete -c python -s 3 -d 'Warn about Python 3.x incompatibilities that 2to3 cannot trivially fix'
- complete -c python -s t --description "Warn on mixed tabs and spaces"
- complete -c python -s Q -x -a "old new warn warnall" --description "Division control"
- case 3
- complete -c python -s q --description 'Don\'t print version and copyright messages on interactive startup'
- complete -c python -s X -x -d 'Set implementation-specific option'
- complete -c python -s b -d 'Issue warnings about str(bytes_instance), str(bytearray_instance) and comparing bytes/bytearray with str'
- complete -c python -o bb -d 'Issue errors'
-end