mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-28 01:11:15 -03:00
Compare commits
103 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13a7269378 | ||
|
|
fd2644ce49 | ||
|
|
508de57459 | ||
|
|
de2405b35a | ||
|
|
a7f977836a | ||
|
|
f59e4a88c6 | ||
|
|
c755bd0358 | ||
|
|
536523ffd7 | ||
|
|
ca82fc2f03 | ||
|
|
d1411c42d6 | ||
|
|
9d770af5f4 | ||
|
|
d1ff6a323a | ||
|
|
112ea1759a | ||
|
|
76bafbef2a | ||
|
|
1947ec88f1 | ||
|
|
d0956f1e43 | ||
|
|
6996c7718e | ||
|
|
45d56d8e05 | ||
|
|
53295d38b7 | ||
|
|
bd9c843fd1 | ||
|
|
f812b9b26c | ||
|
|
52851a3ba4 | ||
|
|
b1bf115fa2 | ||
|
|
0f25ef365d | ||
|
|
55ea4b6fc0 | ||
|
|
5ef8cccf21 | ||
|
|
5613d96001 | ||
|
|
5d9ba8c1a2 | ||
|
|
0de232bf54 | ||
|
|
db5b887824 | ||
|
|
634bdb8b3b | ||
|
|
9c579a37bb | ||
|
|
1502acd83e | ||
|
|
ef3430f669 | ||
|
|
01af64cf1f | ||
|
|
349f52a1a5 | ||
|
|
850aa1963f | ||
|
|
185d0c3c1c | ||
|
|
3656443b1f | ||
|
|
6748b9699f | ||
|
|
dc91d7aec4 | ||
|
|
13a51ba4c2 | ||
|
|
749dad1309 | ||
|
|
7a07d7c188 | ||
|
|
53c95abfb2 | ||
|
|
7fd2ae4ffd | ||
|
|
717ac3f7fe | ||
|
|
50fa7234ea | ||
|
|
80b4055eab | ||
|
|
94b7c8d5e6 | ||
|
|
580ec26885 | ||
|
|
6ba5d80a20 | ||
|
|
d58b9de63b | ||
|
|
99a93b5add | ||
|
|
de50539c02 | ||
|
|
04cf08b93b | ||
|
|
2c5b52eb6c | ||
|
|
dd8150d98d | ||
|
|
99662d7711 | ||
|
|
5f3ad87a98 | ||
|
|
83d05f9170 | ||
|
|
0d56818664 | ||
|
|
5b0cd5a911 | ||
|
|
102b99a17b | ||
|
|
6222d00ffc | ||
|
|
73370f5f39 | ||
|
|
883ce6e440 | ||
|
|
f320f5f710 | ||
|
|
32b531667a | ||
|
|
c47dae77a4 | ||
|
|
53160d134e | ||
|
|
619defd748 | ||
|
|
40db2b3c2a | ||
|
|
b05ccee0f0 | ||
|
|
d722fa59ca | ||
|
|
60065614bd | ||
|
|
05b39a9bdb | ||
|
|
91ab644173 | ||
|
|
083fcd6491 | ||
|
|
7e9e7d77d1 | ||
|
|
66ee644130 | ||
|
|
c20b8982bc | ||
|
|
15bb8f712d | ||
|
|
d48e9ef8b1 | ||
|
|
acd28b5dc4 | ||
|
|
1fe4863039 | ||
|
|
d347da963b | ||
|
|
930bb9c6d1 | ||
|
|
676c3ed505 | ||
|
|
2d3588fa51 | ||
|
|
4835945c09 | ||
|
|
82bff9f407 | ||
|
|
3b6d8756ea | ||
|
|
d1bb30afae | ||
|
|
7a1d64637d | ||
|
|
5f85d27671 | ||
|
|
5d828b5fcf | ||
|
|
c2f6c6c1d2 | ||
|
|
7726cffdab | ||
|
|
3570013496 | ||
|
|
2401a163fe | ||
|
|
e8d802c5e1 | ||
|
|
dca4167de6 |
13
INSTALL
13
INSTALL
@@ -2,11 +2,12 @@
|
||||
Known issues
|
||||
============
|
||||
|
||||
Fish currently requires a semi-modern GCC version to
|
||||
compile. Specifically, GCC 2.95.* won't compile fish, but GCC 3.23
|
||||
should work. Fish has not been coded with an C99- or GNU-specific
|
||||
features in mind, so it is hoped that it should be possible to make
|
||||
fish work with other compilers. Patches are welcome.
|
||||
Fish is developed using GCC, with the goal of using only C89 language
|
||||
features. Fish does, however use the *wprintf family of functions,
|
||||
which are new to the C99 standrard. It is not unlikely that any given
|
||||
release contains a few GCC:isms, but ICC 9.0.030 has been found to
|
||||
produce working binaries. GCC 2.95.* won't compile fish, but GCC 3.2.3
|
||||
is known to work. Patches to fix any remaining GNU:isms are welcome.
|
||||
|
||||
Older versions of Doxygen has bugs in the man-page generation which
|
||||
cause the builtin help to render incorrectly. Doxygen 1.2.14 is known
|
||||
@@ -52,7 +53,7 @@ Local install procedure
|
||||
=======================
|
||||
|
||||
If you have downloaded the darcs repository of fish, you need to run
|
||||
autoconf first.
|
||||
autoconf to generate the configure script.
|
||||
|
||||
To install fish in your own home directory (typically as non-root),
|
||||
type:
|
||||
|
||||
242
Makefile.in
242
Makefile.in
@@ -36,8 +36,7 @@
|
||||
CC := @CC@
|
||||
INSTALL:=@INSTALL@
|
||||
|
||||
# Compiler flags
|
||||
CFLAGS:=@CFLAGS@ -Wall -std=gnu99 -fno-strict-aliasing
|
||||
CFLAGS:=@CFLAGS@
|
||||
CPPFLAGS=@CPPFLAGS@
|
||||
LDFLAGS:= @LIBS@ @LDFLAGS@
|
||||
|
||||
@@ -57,7 +56,7 @@ ETC_DIR_INSTALL = etc/fish_interactive.fish
|
||||
# Set to 1 if we have gettext
|
||||
HAVE_GETTEXT=@HAVE_GETTEXT@
|
||||
|
||||
CORE_OBJS := util.o common.o halloc.o halloc_util.o
|
||||
CORE_OBJS := util.o common.o halloc.o halloc_util.o fallback.o
|
||||
|
||||
# All objects used by fish, that are compiled from an ordinary .c file
|
||||
# using an ordinary .h file.
|
||||
@@ -73,7 +72,7 @@ COMMON_OBJS_WITH_HEADER := builtin_help.o
|
||||
|
||||
# main.c exists, but main.h does not, etc.
|
||||
COMMON_OBJS_WITH_CODE := builtin_set.o builtin_commandline.o \
|
||||
builtin_ulimit.c builtin_complete.o
|
||||
builtin_ulimit.o builtin_complete.o
|
||||
|
||||
# All objects that the system needs to build fish
|
||||
FISH_OBJS := $(COMMON_OBJS) $(COMMON_OBJS_WITH_CODE) \
|
||||
@@ -94,7 +93,7 @@ FISHD_OBJS := fishd.o env_universal_common.o wutil.o \
|
||||
|
||||
# All objects needed to build mimedb
|
||||
MIME_OBJS := mimedb.o xdgmimealias.o xdgmime.o xdgmimeglob.o \
|
||||
xdgmimeint.o xdgmimemagic.o xdgmimeparent.o wutil.o
|
||||
xdgmimeint.o xdgmimemagic.o xdgmimeparent.o wutil.o $(CORE_OBJS)
|
||||
|
||||
#
|
||||
# Files containing documentation for builtins. Should be listed
|
||||
@@ -165,14 +164,16 @@ ETC_DIR_FILES :=etc/fish.in etc/fish_inputrc \
|
||||
etc/fish_interactive.fish.in
|
||||
|
||||
# Files in ./share/
|
||||
SHARE_DIR_FILES :=share/fish
|
||||
SHARE_DIR_FILES :=share/fish.in
|
||||
|
||||
# Files in ./tests/
|
||||
TESTS_DIR_FILES := $(TEST_IN) $(TEST_IN:.in=.out) $(TEST_IN:.in=.err) \
|
||||
$(TEST_IN:.in=.status) tests/test.fish tests/gen_output.fish
|
||||
|
||||
# Files in ./share/completions/
|
||||
COMPLETIONS_DIR_FILES := $(wildcard share/completions/*.fish)
|
||||
|
||||
# Files in ./share/functions/
|
||||
FUNCTIONS_DIR_FILES := $(wildcard share/functions/*.fish)
|
||||
|
||||
# Programs to build
|
||||
@@ -196,8 +197,14 @@ all: $(PROGRAMS) user_doc
|
||||
@echo Use \'make install\' to install fish.
|
||||
.PHONY: all
|
||||
|
||||
configure: configure.ac
|
||||
./config.status --recheck
|
||||
|
||||
Makefile: Makefile.in configure
|
||||
./config.status
|
||||
|
||||
debug:
|
||||
make fish CFLAGS="-O0 -Wno-unused -Werror -g -Wall -std=gnu99 -fno-strict-aliasing"
|
||||
make fish CFLAGS="@CFLAGS@ -O0 -Wno-unused -Werror -g"
|
||||
.PHONY: debug
|
||||
|
||||
# User documentation, describing the features of the fish shell.
|
||||
@@ -268,8 +275,8 @@ doc.h:$(BUILTIN_DOC_SRC) $(CMD_DOC_SRC) doc_src/doc.hdr
|
||||
# Create a template translation object
|
||||
messages.pot: *.c *.h etc/*.in share/fish share/completions/*.fish share/functions/*.fish seq
|
||||
if test $(HAVE_GETTEXT) = 1;then \
|
||||
xgettext -k_ -kN_ -kcomplete_desc *.c *.h -o messages.pot; \
|
||||
if ! xgettext -j -k_ -LShell etc/*.in share/fish share/completions/*.fish share/functions/*.fish seq -o messages.pot; then \
|
||||
xgettext -k_ -kN_ *.c *.h -o messages.pot; \
|
||||
if ! xgettext -j -k_ -kN_ -LShell etc/*.in share/fish share/completions/*.fish share/functions/*.fish seq -o messages.pot; then \
|
||||
echo "Your xgettext version is too old to build the messages.pot file"\
|
||||
rm messages.pot\
|
||||
false;\
|
||||
@@ -337,7 +344,6 @@ builtin_help.c: $(BUILTIN_DOC_HDR) doc_src/count.doxygen gen_hdr2 gen_hdr.sh bui
|
||||
./gen_hdr.sh $*.doxygen >>$@
|
||||
echo ");" >>$@
|
||||
echo "}" >>$@
|
||||
#man -- doc_src/builtin_doc/man/man1/`basename $@ .c`.1 | cat -s | ./gen_hdr2 >>$@
|
||||
|
||||
#
|
||||
# The build rules for installing/uninstalling fish
|
||||
@@ -406,7 +412,7 @@ install-force: all install-translations
|
||||
@echo \* use the command \'chsh -s $(DESTDIR)$(bindir)/fish\'.
|
||||
@echo
|
||||
@echo Have fun!
|
||||
.PHONY: force-install
|
||||
.PHONY: install-force
|
||||
|
||||
|
||||
# Uninstall this fish version
|
||||
@@ -447,6 +453,8 @@ uninstall-legacy: uninstall
|
||||
fi;
|
||||
rmdir $(DESTDIR)$(sysconfdir)/fish.d/completions; true
|
||||
rmdir $(DESTDIR)$(sysconfdir)/fish.d; true
|
||||
@echo The previous fish installation has been removed.
|
||||
.PHONY: uninstall-legacy
|
||||
|
||||
install-translations: $(TRANSLATIONS)
|
||||
if test $(HAVE_GETTEXT) = 1; then \
|
||||
@@ -483,25 +491,26 @@ fish_tests: $(FISH_TESTS_OBJS)
|
||||
$(CC) $(FISH_TESTS_OBJS) $(LDFLAGS) -o $@
|
||||
|
||||
|
||||
mimedb: $(MIME_OBJS) util.o common.o doc_src/mimedb.c
|
||||
$(CC) ${MIME_OBJS} util.o common.o doc_src/mimedb.c $(LDFLAGS) -o $@
|
||||
mimedb: $(MIME_OBJS) doc_src/mimedb.o
|
||||
$(CC) ${MIME_OBJS} doc_src/mimedb.o $(LDFLAGS) -o $@
|
||||
|
||||
set_color: set_color.o doc_src/set_color.c
|
||||
$(CC) set_color.o doc_src/set_color.c $(LDFLAGS) -o $@
|
||||
set_color: set_color.o doc_src/set_color.o
|
||||
$(CC) set_color.o doc_src/set_color.o $(LDFLAGS) -o $@
|
||||
|
||||
# Test program for the tokenizer library
|
||||
tokenizer_test: tokenizer.c tokenizer.h util.o wutil.o common.o
|
||||
$(CC) ${CFLAGS} tokenizer.c util.o wutil.o common.o -D TOKENIZER_TEST $(LDFLAGS) -o $@
|
||||
|
||||
# Neat little program to show output from terminal
|
||||
key_reader: key_reader.o input_common.o common.o env_universal.o env_universal_common.o util.o wutil.o
|
||||
$(CC) key_reader.o input_common.o common.o env_universal.o env_universal_common.o util.o wutil.o $(LDFLAGS) -o $@
|
||||
key_reader: key_reader.o input_common.o $(CORE_OBJS) env_universal.o env_universal_common.o wutil.o
|
||||
$(CC) key_reader.o input_common.o $(CORE_OBJS) env_universal.o env_universal_common.o wutil.o $(LDFLAGS) -o $@
|
||||
|
||||
#
|
||||
# Update dependencies
|
||||
#
|
||||
depend:
|
||||
makedepend -fMakefile.in -Y *.c
|
||||
./config.status
|
||||
.PHONY: depend
|
||||
|
||||
# Copy all the source files into a new directory and use tar to create
|
||||
@@ -531,15 +540,27 @@ fish-@PACKAGE_VERSION@.tar: $(DOC_SRC_DIR_FILES) $(MAIN_DIR_FILES) $(ETC_DIR_FIL
|
||||
tar -c fish-@PACKAGE_VERSION@ >fish-@PACKAGE_VERSION@.tar
|
||||
rm -rf fish-@PACKAGE_VERSION@
|
||||
|
||||
tar: fish-@PACKAGE_VERSION@.tar
|
||||
.PHONY: tar
|
||||
|
||||
fish-@PACKAGE_VERSION@.tar.gz: fish-@PACKAGE_VERSION@.tar
|
||||
gzip -f --best -c fish-@PACKAGE_VERSION@.tar >fish-@PACKAGE_VERSION@.tar.gz
|
||||
|
||||
fish-@PACKAGE_VERSION@.tar.bz2: fish-@PACKAGE_VERSION@.tar
|
||||
bzip2 -f --best -k fish-@PACKAGE_VERSION@.tar
|
||||
|
||||
dist: fish-@PACKAGE_VERSION@.tar.bz2
|
||||
.PHONY: dist
|
||||
|
||||
# Create .rpm file for the current systems architecture and an
|
||||
# .src.rpm file.
|
||||
rpm: fish-@PACKAGE_VERSION@.tar.bz2
|
||||
@if ! which rpmbuild; then \
|
||||
echo Could not find the rpmbuild command, needed to build an rpm; \
|
||||
echo You may be able to install it using the following command:; \
|
||||
echo \'yum install rpm-build\'; \
|
||||
false; \
|
||||
fi
|
||||
cp fish.spec /usr/src/redhat/SPECS/
|
||||
cp fish-@PACKAGE_VERSION@.tar.bz2 /usr/src/redhat/SOURCES/
|
||||
rpmbuild -ba --clean /usr/src/redhat/SPECS/fish.spec
|
||||
@@ -553,15 +574,15 @@ rpm: fish-@PACKAGE_VERSION@.tar.bz2
|
||||
|
||||
distclean: clean
|
||||
rm -f fish.spec doc_src/fish.1 doc_src/Doxyfile
|
||||
rm -f etc/fish etc/fish_interactive.fish share/fish
|
||||
rm -f etc/fish etc/fish_interactive.fish seq
|
||||
rm -f config.status config.log config.h Makefile
|
||||
.PHONY: distclean
|
||||
|
||||
clean:
|
||||
rm -f *.o doc.h doc_src/*.doxygen doc_src/*.c builtin_help.c
|
||||
rm -f *.o doc.h doc_src/*.doxygen doc_src/*.c builtin_help.c doc_src/*.o
|
||||
rm -f tests/tmp.err tests/tmp.out tests/tmp.status tests/foo.txt
|
||||
rm -f tokenizer_test fish key_reader set_color gen_hdr2 mimedb
|
||||
rm -f fishd fish_pager count
|
||||
rm -f fishd fish_pager count fish_tests
|
||||
rm -f fish-@PACKAGE_VERSION@.tar
|
||||
rm -f fish-@PACKAGE_VERSION@.tar.gz
|
||||
rm -f fish-@PACKAGE_VERSION@.tar.bz2
|
||||
@@ -575,105 +596,112 @@ clean:
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
builtin.o: config.h util.h wutil.h builtin.h function.h complete.h proc.h
|
||||
builtin.o: io.h parser.h event.h reader.h env.h common.h wgetopt.h sanity.h
|
||||
builtin.o: tokenizer.h builtin_help.h wildcard.h input_common.h input.h
|
||||
builtin.o: intern.h signal.h translate.h halloc.h halloc_util.h parse_util.h
|
||||
builtin.o: expand.h
|
||||
builtin_commandline.o: signal.h config.h util.h wutil.h builtin.h common.h
|
||||
builtin_commandline.o: wgetopt.h reader.h proc.h io.h parser.h event.h
|
||||
builtin_commandline.o: tokenizer.h input_common.h input.h translate.h
|
||||
builtin.o: config.h fallback.h common.h util.h wutil.h builtin.h function.h
|
||||
builtin.o: complete.h proc.h io.h parser.h event.h reader.h env.h wgetopt.h
|
||||
builtin.o: sanity.h tokenizer.h builtin_help.h wildcard.h input_common.h
|
||||
builtin.o: input.h intern.h signal.h translate.h halloc.h halloc_util.h
|
||||
builtin.o: parse_util.h expand.h
|
||||
builtin_commandline.o: signal.h config.h fallback.h common.h util.h wutil.h
|
||||
builtin_commandline.o: builtin.h wgetopt.h reader.h proc.h io.h parser.h
|
||||
builtin_commandline.o: event.h tokenizer.h input_common.h input.h translate.h
|
||||
builtin_commandline.o: parse_util.h
|
||||
builtin_complete.o: signal.h config.h util.h wutil.h builtin.h common.h
|
||||
builtin_complete.o: complete.h wgetopt.h parser.h proc.h io.h event.h
|
||||
builtin_complete.o: reader.h translate.h
|
||||
builtin_complete.o: signal.h config.h fallback.h common.h util.h wutil.h
|
||||
builtin_complete.o: builtin.h complete.h wgetopt.h parser.h proc.h io.h
|
||||
builtin_complete.o: event.h reader.h translate.h
|
||||
builtin_help.o: config.h util.h common.h builtin_help.h
|
||||
builtin_set.o: signal.h config.h util.h wutil.h builtin.h env.h expand.h
|
||||
builtin_set.o: common.h wgetopt.h proc.h io.h parser.h event.h translate.h
|
||||
builtin_ulimit.o: config.h util.h builtin.h common.h wgetopt.h translate.h
|
||||
common.o: config.h util.h wutil.h common.h expand.h proc.h io.h wildcard.h
|
||||
common.o: parser.h event.h
|
||||
complete.o: signal.h config.h util.h tokenizer.h wildcard.h proc.h io.h
|
||||
complete.o: parser.h event.h function.h complete.h builtin.h env.h exec.h
|
||||
complete.o: expand.h common.h reader.h history.h intern.h translate.h
|
||||
complete.o: parse_util.h halloc_util.h wutil.h
|
||||
env.o: config.h signal.h util.h wutil.h proc.h io.h common.h env.h sanity.h
|
||||
env.o: expand.h history.h reader.h parser.h event.h env_universal.h
|
||||
builtin_set.o: signal.h config.h fallback.h common.h util.h wutil.h builtin.h
|
||||
builtin_set.o: env.h expand.h wgetopt.h proc.h io.h parser.h event.h
|
||||
builtin_set.o: translate.h
|
||||
builtin_ulimit.o: config.h fallback.h common.h util.h builtin.h wgetopt.h
|
||||
builtin_ulimit.o: translate.h
|
||||
common.o: config.h fallback.h common.h util.h wutil.h expand.h proc.h io.h
|
||||
common.o: wildcard.h parser.h event.h
|
||||
complete.o: signal.h config.h fallback.h common.h util.h tokenizer.h
|
||||
complete.o: wildcard.h proc.h io.h parser.h event.h function.h complete.h
|
||||
complete.o: builtin.h env.h exec.h expand.h reader.h history.h intern.h
|
||||
complete.o: translate.h parse_util.h halloc_util.h wutil.h
|
||||
env.o: config.h signal.h fallback.h common.h util.h wutil.h proc.h io.h env.h
|
||||
env.o: sanity.h expand.h history.h reader.h parser.h event.h env_universal.h
|
||||
env.o: env_universal_common.h input_common.h translate.h complete.h
|
||||
env_universal.o: config.h signal.h util.h common.h wutil.h
|
||||
env_universal.o: config.h signal.h fallback.h common.h util.h wutil.h
|
||||
env_universal.o: env_universal_common.h env_universal.h
|
||||
env_universal_common.o: config.h signal.h util.h common.h wutil.h
|
||||
env_universal_common.o: config.h signal.h fallback.h common.h util.h wutil.h
|
||||
env_universal_common.o: env_universal_common.h
|
||||
event.o: signal.h config.h util.h wutil.h function.h proc.h io.h parser.h
|
||||
event.o: event.h common.h translate.h halloc_util.h
|
||||
exec.o: signal.h config.h util.h common.h wutil.h proc.h io.h exec.h parser.h
|
||||
exec.o: event.h builtin.h function.h env.h wildcard.h sanity.h expand.h
|
||||
exec.o: env_universal.h env_universal_common.h translate.h halloc.h
|
||||
exec.o: halloc_util.h parse_util.h
|
||||
expand.o: signal.h config.h util.h common.h wutil.h env.h proc.h io.h
|
||||
expand.o: parser.h event.h expand.h wildcard.h exec.h tokenizer.h complete.h
|
||||
expand.o: translate.h parse_util.h halloc_util.h
|
||||
fishd.o: config.h signal.h util.h common.h wutil.h env_universal_common.h
|
||||
fish_pager.o: config.h signal.h util.h wutil.h common.h complete.h output.h
|
||||
fish_pager.o: input_common.h env_universal.h env_universal_common.h halloc.h
|
||||
fish_pager.o: halloc_util.h
|
||||
fish_tests.o: config.h signal.h util.h common.h proc.h io.h reader.h
|
||||
fish_tests.o: builtin.h function.h complete.h wutil.h env.h expand.h parser.h
|
||||
fish_tests.o: event.h tokenizer.h output.h exec.h halloc_util.h
|
||||
function.o: signal.h config.h wutil.h util.h function.h proc.h io.h parser.h
|
||||
function.o: event.h common.h intern.h reader.h parse_util.h env.h expand.h
|
||||
halloc.o: config.h util.h common.h halloc.h
|
||||
halloc_util.o: config.h util.h common.h halloc.h
|
||||
highlight.o: signal.h config.h util.h wutil.h highlight.h tokenizer.h proc.h
|
||||
highlight.o: io.h parser.h event.h parse_util.h builtin.h function.h env.h
|
||||
highlight.o: expand.h sanity.h common.h complete.h output.h
|
||||
history.o: config.h util.h wutil.h history.h common.h reader.h env.h sanity.h
|
||||
history.o: signal.h
|
||||
input.o: config.h signal.h util.h wutil.h reader.h proc.h io.h common.h
|
||||
input.o: sanity.h input_common.h input.h parser.h event.h env.h expand.h
|
||||
event.o: signal.h config.h fallback.h common.h util.h wutil.h function.h
|
||||
event.o: proc.h io.h parser.h event.h translate.h halloc_util.h
|
||||
exec.o: signal.h config.h fallback.h common.h util.h wutil.h proc.h io.h
|
||||
exec.o: exec.h parser.h event.h builtin.h function.h env.h wildcard.h
|
||||
exec.o: sanity.h expand.h env_universal.h env_universal_common.h translate.h
|
||||
exec.o: halloc.h halloc_util.h parse_util.h
|
||||
expand.o: signal.h config.h fallback.h common.h util.h wutil.h env.h proc.h
|
||||
expand.o: io.h parser.h event.h expand.h wildcard.h exec.h tokenizer.h
|
||||
expand.o: complete.h translate.h parse_util.h halloc_util.h
|
||||
fallback.o: config.h fallback.h common.h util.h
|
||||
fishd.o: config.h signal.h fallback.h common.h util.h wutil.h
|
||||
fishd.o: env_universal_common.h
|
||||
fish_pager.o: config.h signal.h fallback.h common.h util.h wutil.h complete.h
|
||||
fish_pager.o: output.h input_common.h env_universal.h env_universal_common.h
|
||||
fish_pager.o: halloc.h halloc_util.h
|
||||
fish_tests.o: config.h signal.h fallback.h common.h util.h proc.h io.h
|
||||
fish_tests.o: reader.h builtin.h function.h complete.h wutil.h env.h expand.h
|
||||
fish_tests.o: parser.h event.h tokenizer.h output.h exec.h halloc_util.h
|
||||
function.o: signal.h config.h wutil.h fallback.h common.h util.h function.h
|
||||
function.o: proc.h io.h translate.h parser.h event.h intern.h reader.h
|
||||
function.o: parse_util.h env.h expand.h
|
||||
halloc.o: config.h fallback.h common.h util.h halloc.h
|
||||
halloc_util.o: config.h fallback.h common.h util.h halloc.h
|
||||
highlight.o: signal.h config.h fallback.h common.h util.h wutil.h highlight.h
|
||||
highlight.o: tokenizer.h proc.h io.h parser.h event.h parse_util.h builtin.h
|
||||
highlight.o: function.h env.h expand.h sanity.h complete.h output.h
|
||||
history.o: config.h fallback.h common.h util.h wutil.h history.h reader.h
|
||||
history.o: env.h sanity.h signal.h
|
||||
input.o: config.h signal.h fallback.h common.h util.h wutil.h reader.h proc.h
|
||||
input.o: io.h sanity.h input_common.h input.h parser.h event.h env.h expand.h
|
||||
input.o: translate.h output.h
|
||||
input_common.o: config.h util.h common.h wutil.h input_common.h
|
||||
input_common.o: config.h fallback.h common.h util.h wutil.h input_common.h
|
||||
input_common.o: env_universal.h env_universal_common.h
|
||||
intern.o: config.h util.h wutil.h common.h intern.h
|
||||
io.o: config.h util.h wutil.h exec.h proc.h io.h common.h translate.h
|
||||
io.o: halloc.h
|
||||
key_reader.o: input_common.h
|
||||
kill.o: signal.h config.h util.h wutil.h kill.h proc.h io.h sanity.h common.h
|
||||
kill.o: env.h exec.h parser.h event.h
|
||||
main.o: config.h signal.h util.h common.h reader.h builtin.h function.h
|
||||
main.o: complete.h wutil.h env.h sanity.h proc.h io.h parser.h event.h
|
||||
main.o: expand.h intern.h exec.h output.h translate.h halloc_util.h
|
||||
mimedb.o: config.h xdgmime.h util.h
|
||||
output.o: config.h signal.h util.h wutil.h expand.h common.h output.h
|
||||
output.o: halloc_util.h highlight.h
|
||||
parser.o: signal.h config.h util.h common.h wutil.h proc.h io.h parser.h
|
||||
parser.o: event.h tokenizer.h exec.h wildcard.h function.h builtin.h
|
||||
intern.o: config.h fallback.h common.h util.h wutil.h intern.h
|
||||
io.o: config.h fallback.h common.h util.h wutil.h exec.h proc.h io.h
|
||||
io.o: translate.h halloc.h
|
||||
key_reader.o: fallback.h common.h util.h input_common.h
|
||||
kill.o: signal.h config.h fallback.h common.h util.h wutil.h kill.h proc.h
|
||||
kill.o: io.h sanity.h env.h exec.h parser.h event.h
|
||||
main.o: config.h signal.h fallback.h common.h util.h reader.h builtin.h
|
||||
main.o: function.h complete.h wutil.h env.h sanity.h proc.h io.h parser.h
|
||||
main.o: event.h expand.h intern.h exec.h output.h translate.h halloc_util.h
|
||||
main.o: history.h
|
||||
mimedb.o: config.h xdgmime.h fallback.h common.h util.h
|
||||
output.o: config.h signal.h fallback.h common.h util.h wutil.h expand.h
|
||||
output.o: output.h halloc_util.h highlight.h
|
||||
parser.o: signal.h config.h fallback.h common.h util.h wutil.h proc.h io.h
|
||||
parser.o: parser.h event.h tokenizer.h exec.h wildcard.h function.h builtin.h
|
||||
parser.o: builtin_help.h env.h expand.h reader.h sanity.h env_universal.h
|
||||
parser.o: env_universal_common.h translate.h intern.h parse_util.h halloc.h
|
||||
parser.o: halloc_util.h
|
||||
parse_util.o: config.h util.h wutil.h common.h tokenizer.h parse_util.h
|
||||
parse_util.o: expand.h intern.h exec.h proc.h io.h env.h halloc_util.h
|
||||
proc.o: config.h signal.h util.h wutil.h proc.h io.h common.h reader.h
|
||||
proc.o: sanity.h env.h parser.h event.h translate.h halloc.h halloc_util.h
|
||||
proc.o: output.h
|
||||
reader.o: config.h signal.h util.h wutil.h highlight.h reader.h proc.h io.h
|
||||
reader.o: parser.h event.h complete.h history.h common.h sanity.h env.h
|
||||
reader.o: exec.h expand.h tokenizer.h kill.h input_common.h input.h
|
||||
parse_util.o: config.h fallback.h common.h util.h wutil.h tokenizer.h
|
||||
parse_util.o: parse_util.h expand.h intern.h exec.h proc.h io.h env.h
|
||||
parse_util.o: wildcard.h halloc_util.h
|
||||
proc.o: config.h signal.h fallback.h common.h util.h wutil.h proc.h io.h
|
||||
proc.o: reader.h sanity.h env.h parser.h event.h translate.h halloc.h
|
||||
proc.o: halloc_util.h output.h
|
||||
reader.o: config.h signal.h fallback.h common.h util.h wutil.h highlight.h
|
||||
reader.o: reader.h proc.h io.h parser.h event.h complete.h history.h sanity.h
|
||||
reader.o: env.h exec.h expand.h tokenizer.h kill.h input_common.h input.h
|
||||
reader.o: function.h output.h translate.h parse_util.h
|
||||
refcount.o: config.h util.h wutil.h common.h refcount.h
|
||||
sanity.o: signal.h config.h util.h common.h sanity.h proc.h io.h history.h
|
||||
sanity.o: reader.h kill.h wutil.h translate.h
|
||||
refcount.o: config.h fallback.h common.h util.h wutil.h refcount.h
|
||||
sanity.o: signal.h config.h fallback.h common.h util.h sanity.h proc.h io.h
|
||||
sanity.o: history.h reader.h kill.h wutil.h translate.h
|
||||
set_color.o: config.h
|
||||
signal.o: config.h signal.h common.h util.h wutil.h event.h reader.h proc.h
|
||||
signal.o: io.h translate.h
|
||||
tokenizer.o: config.h util.h wutil.h tokenizer.h common.h wildcard.h
|
||||
tokenizer.o: translate.h
|
||||
translate.o: config.h common.h util.h halloc_util.h
|
||||
util.o: config.h util.h common.h wutil.h
|
||||
wgetopt.o: config.h wgetopt.h wutil.h translate.h
|
||||
wildcard.o: config.h util.h wutil.h complete.h common.h wildcard.h reader.h
|
||||
wildcard.o: expand.h translate.h
|
||||
wutil.o: config.h util.h common.h wutil.h
|
||||
signal.o: config.h signal.h common.h util.h fallback.h wutil.h event.h
|
||||
signal.o: reader.h proc.h io.h translate.h
|
||||
tokenizer.o: config.h fallback.h common.h util.h wutil.h tokenizer.h
|
||||
tokenizer.o: wildcard.h translate.h
|
||||
translate.o: config.h common.h util.h fallback.h halloc_util.h
|
||||
util.o: config.h fallback.h common.h util.h wutil.h
|
||||
wgetopt.o: config.h wgetopt.h wutil.h fallback.h common.h util.h translate.h
|
||||
wildcard.o: config.h fallback.h common.h util.h wutil.h complete.h wildcard.h
|
||||
wildcard.o: reader.h expand.h translate.h
|
||||
wutil.o: config.h fallback.h common.h util.h wutil.h
|
||||
xdgmimealias.o: xdgmimealias.h xdgmime.h xdgmimeint.h
|
||||
xdgmime.o: xdgmime.h xdgmimeint.h xdgmimeglob.h xdgmimemagic.h xdgmimealias.h
|
||||
xdgmime.o: xdgmimeparent.h
|
||||
|
||||
86
builtin.c
86
builtin.c
@@ -38,7 +38,10 @@
|
||||
#include <time.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "builtin.h"
|
||||
#include "function.h"
|
||||
@@ -583,6 +586,7 @@ static int builtin_generic( wchar_t **argv )
|
||||
}
|
||||
|
||||
/**
|
||||
Output a definition of the specified function to the sb_out
|
||||
stringbuffer. Used by the functions builtin.
|
||||
*/
|
||||
static void functions_def( wchar_t *name )
|
||||
@@ -1025,7 +1029,7 @@ static int builtin_function( wchar_t **argv )
|
||||
{
|
||||
event_t *e;
|
||||
|
||||
if( !wcsvarname( woptarg ) )
|
||||
if( wcsvarname( woptarg ) )
|
||||
{
|
||||
sb_printf( sb_err,
|
||||
_( L"%ls: Invalid variable name '%ls'\n" ),
|
||||
@@ -1141,7 +1145,7 @@ static int builtin_function( wchar_t **argv )
|
||||
argc-woptind );
|
||||
res=1;
|
||||
}
|
||||
else if( !(is_binding?wcsbindingname( argv[woptind] ) : wcsvarname( argv[woptind] ) ))
|
||||
else if( !(is_binding?wcsbindingname( argv[woptind] ) : !wcsvarname( argv[woptind] ) ))
|
||||
{
|
||||
sb_printf( sb_err,
|
||||
_( L"%ls: Illegal function name '%ls'\n" ),
|
||||
@@ -1344,7 +1348,8 @@ static int builtin_read( wchar_t **argv )
|
||||
wchar_t *nxt;
|
||||
wchar_t *prompt = DEFAULT_READ_PROMPT;
|
||||
wchar_t *commandline = L"";
|
||||
|
||||
int exit_res=0;
|
||||
|
||||
woptind=0;
|
||||
|
||||
while( 1 )
|
||||
@@ -1463,20 +1468,6 @@ static int builtin_read( wchar_t **argv )
|
||||
return 1;
|
||||
}
|
||||
|
||||
if( woptind == argc )
|
||||
{
|
||||
sb_printf( sb_err,
|
||||
BUILTIN_ERR_MISSING,
|
||||
argv[0] );
|
||||
|
||||
sb_append2( sb_err,
|
||||
parser_current_line(),
|
||||
L"\n",
|
||||
(void *)0 );
|
||||
builtin_print_help( argv[0], sb_err );
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
Verify all variable names
|
||||
*/
|
||||
@@ -1507,10 +1498,6 @@ static int builtin_read( wchar_t **argv )
|
||||
*/
|
||||
i=woptind;
|
||||
|
||||
ifs = env_get( L"IFS" );
|
||||
if( ifs == 0 )
|
||||
ifs = L"";
|
||||
|
||||
/*
|
||||
Check if we should read interactively using \c reader_readline()
|
||||
*/
|
||||
@@ -1526,10 +1513,12 @@ static int builtin_read( wchar_t **argv )
|
||||
else
|
||||
{
|
||||
string_buffer_t sb;
|
||||
int eof=0;
|
||||
|
||||
sb_init( &sb );
|
||||
|
||||
while( 1 )
|
||||
{
|
||||
int eof=0;
|
||||
int finished=0;
|
||||
|
||||
wchar_t res=0;
|
||||
@@ -1570,30 +1559,46 @@ static int builtin_read( wchar_t **argv )
|
||||
|
||||
if( eof )
|
||||
break;
|
||||
|
||||
if( res == L'\n' )
|
||||
break;
|
||||
|
||||
sb_append_char( &sb, res );
|
||||
}
|
||||
|
||||
if( sb.used < 2 && eof )
|
||||
{
|
||||
exit_res = 1;
|
||||
}
|
||||
|
||||
buff = wcsdup( (wchar_t *)sb.buff );
|
||||
sb_destroy( &sb );
|
||||
}
|
||||
|
||||
wchar_t *state;
|
||||
|
||||
nxt = wcstok( buff, (i<argc-1)?ifs:L"", &state );
|
||||
|
||||
while( i<argc )
|
||||
if( i != argc )
|
||||
{
|
||||
env_set( argv[i], nxt != 0 ? nxt: L"", place );
|
||||
|
||||
wchar_t *state;
|
||||
|
||||
i++;
|
||||
if( nxt != 0 )
|
||||
nxt = wcstok( 0, (i<argc-1)?ifs:L"", &state);
|
||||
ifs = env_get( L"IFS" );
|
||||
if( ifs == 0 )
|
||||
ifs = L"";
|
||||
|
||||
nxt = wcstok( buff, (i<argc-1)?ifs:L"", &state );
|
||||
|
||||
while( i<argc )
|
||||
{
|
||||
env_set( argv[i], nxt != 0 ? nxt: L"", place );
|
||||
|
||||
i++;
|
||||
if( nxt != 0 )
|
||||
nxt = wcstok( 0, (i<argc-1)?ifs:L"", &state);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
free( buff );
|
||||
return 0;
|
||||
|
||||
return exit_res;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2014,10 +2019,10 @@ static int builtin_source( wchar_t ** argv )
|
||||
parser_push_block( SOURCE );
|
||||
reader_push_current_filename( fn_intern );
|
||||
|
||||
|
||||
current_block->param1.source_dest = fn_intern;
|
||||
|
||||
parse_util_set_argv( argv+2);
|
||||
|
||||
res = reader_read( fd );
|
||||
|
||||
parser_pop_block();
|
||||
@@ -2026,8 +2031,7 @@ static int builtin_source( wchar_t ** argv )
|
||||
sb_printf( sb_err,
|
||||
_( L"%ls: Error while reading file '%ls'\n" ),
|
||||
argv[0],
|
||||
argv[1]
|
||||
);
|
||||
argv[1] );
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2490,7 +2494,7 @@ static int builtin_jobs( wchar_t **argv )
|
||||
*/
|
||||
for( j=first_job; j; j=j->next )
|
||||
{
|
||||
if( j->constructed )
|
||||
if( j->constructed && !job_is_completed(j) )
|
||||
{
|
||||
builtin_jobs_print( j, mode, !found );
|
||||
return 0;
|
||||
@@ -2523,7 +2527,7 @@ static int builtin_jobs( wchar_t **argv )
|
||||
|
||||
j = job_get_from_pid( pid );
|
||||
|
||||
if( j )
|
||||
if( j && !job_is_completed( j ) )
|
||||
{
|
||||
builtin_jobs_print( j, mode, !found );
|
||||
}
|
||||
@@ -2544,7 +2548,7 @@ static int builtin_jobs( wchar_t **argv )
|
||||
/*
|
||||
Ignore unconstructed jobs, i.e. ourself.
|
||||
*/
|
||||
if( j->constructed /*&& j->skip_notification*/ )
|
||||
if( j->constructed && !job_is_completed(j) )
|
||||
{
|
||||
builtin_jobs_print( j, mode, !found );
|
||||
found = 1;
|
||||
@@ -2580,7 +2584,7 @@ static int builtin_for( wchar_t **argv )
|
||||
argv[0] );
|
||||
builtin_print_help( argv[0], sb_err );
|
||||
}
|
||||
else if ( !wcsvarname(argv[1]) )
|
||||
else if ( wcsvarname(argv[1]) )
|
||||
{
|
||||
sb_printf( sb_err,
|
||||
_( L"%ls: '%ls' is not a valid variable name\n" ),
|
||||
@@ -3218,7 +3222,7 @@ static int internal_help( wchar_t *cmd )
|
||||
int builtin_run( wchar_t **argv )
|
||||
{
|
||||
int (*cmd)(wchar_t **argv)=0;
|
||||
cmd = hash_get( &builtin, argv[0] );
|
||||
cmd = (int (*)(wchar_t **))hash_get( &builtin, argv[0] );
|
||||
|
||||
if( argv[1] != 0 && !internal_help(argv[0]) )
|
||||
{
|
||||
|
||||
@@ -12,7 +12,10 @@ Functions used for implementing the commandline builtin.
|
||||
#include <signal.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "builtin.h"
|
||||
#include "common.h"
|
||||
|
||||
@@ -12,7 +12,10 @@ Functions used for implementing the complete builtin.
|
||||
#include <signal.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "builtin.h"
|
||||
#include "common.h"
|
||||
|
||||
171
builtin_set.c
171
builtin_set.c
@@ -12,7 +12,10 @@ Functions used for implementing the set builtin.
|
||||
#include <signal.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "builtin.h"
|
||||
#include "env.h"
|
||||
@@ -23,6 +26,26 @@ Functions used for implementing the set builtin.
|
||||
#include "parser.h"
|
||||
#include "translate.h"
|
||||
|
||||
#define BUILTIN_SET_PATH_ERROR L"%ls: Could not add component %ls to %ls.\n"
|
||||
#define BUILTIN_SET_PATH_HINT L"%ls: Did you mean 'set %ls $%ls %ls'?\n"
|
||||
|
||||
/**
|
||||
Call env_set. On error, print a description of the problem to
|
||||
stderr.
|
||||
*/
|
||||
static void my_env_set( const wchar_t *key, const wchar_t *val, int scope )
|
||||
{
|
||||
|
||||
switch( env_set( key, val, scope | ENV_USER ) )
|
||||
{
|
||||
case ENV_PERM:
|
||||
{
|
||||
sb_printf( sb_err, _(L"%ls: Tried to change the read-only variable '%ls'\n"), L"set", key );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Extract the name from a destination argument of the form name[index1 index2...]
|
||||
*/
|
||||
@@ -111,7 +134,12 @@ static int parse_fill_indexes( array_list_t *indexes,
|
||||
|
||||
|
||||
/**
|
||||
Update a list by writing the specified values at the specified indexes
|
||||
Update a list \c list by writing copies (using wcsdup) of the
|
||||
values specified by \c values to the indexes specified by \c
|
||||
indexes. The previous entries at the specidied position will be
|
||||
free'd.
|
||||
|
||||
\return The number of elements in the list after the modifications have been made
|
||||
*/
|
||||
static int update_values( array_list_t *list,
|
||||
array_list_t *indexes,
|
||||
@@ -119,16 +147,12 @@ static int update_values( array_list_t *list,
|
||||
{
|
||||
int i;
|
||||
|
||||
//fwprintf(stderr, L"Scan complete\n");
|
||||
/* Replace values where needed */
|
||||
for( i = 0; i < al_get_count(indexes); i++ )
|
||||
{
|
||||
int ind = *(int *) al_get(indexes, i) - 1;
|
||||
void *new = (void *) al_get(values, i);
|
||||
if (al_get(list, ind) != 0)
|
||||
{
|
||||
free((void *) al_get(list, ind));
|
||||
}
|
||||
free((void *) al_get(list, ind));
|
||||
al_set(list, ind, new != 0 ? wcsdup(new) : wcsdup(L""));
|
||||
}
|
||||
|
||||
@@ -166,8 +190,6 @@ static int erase_values(array_list_t *list, array_list_t *indexes)
|
||||
int i;
|
||||
array_list_t result;
|
||||
|
||||
//fwprintf(stderr, L"Starting with %d\n", al_get_count(list));
|
||||
|
||||
al_init(&result);
|
||||
|
||||
for (i = 0; i < al_get_count(list); i++)
|
||||
@@ -186,8 +208,6 @@ static int erase_values(array_list_t *list, array_list_t *indexes)
|
||||
al_push_all( list, &result );
|
||||
al_destroy(&result);
|
||||
|
||||
//fwprintf(stderr, L"Remaining: %d\n", al_get_count(&result));
|
||||
|
||||
return al_get_count(list);
|
||||
}
|
||||
|
||||
@@ -204,8 +224,6 @@ static int fill_buffer_from_list(string_buffer_t *sb, array_list_t *list)
|
||||
wchar_t *v = (wchar_t *) al_get(list, i);
|
||||
if (v != 0)
|
||||
{
|
||||
// fwprintf(stderr, L".\n");
|
||||
// fwprintf(stderr, L"Collecting %ls from %d\n", v, i);
|
||||
sb_append(sb, v);
|
||||
}
|
||||
if (i < al_get_count(list) - 1)
|
||||
@@ -251,12 +269,25 @@ static void print_variables(int include_values, int esc, int scope)
|
||||
al_destroy(&names);
|
||||
}
|
||||
|
||||
static int is_path_variable( const wchar_t *env )
|
||||
{
|
||||
return contains_str( env,
|
||||
L"PATH",
|
||||
L"CDPATH",
|
||||
(void *)0 );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
The set builtin. Creates, updates and erases environment variables and environemnt variable arrays.
|
||||
*/
|
||||
|
||||
int builtin_set( wchar_t **argv )
|
||||
{
|
||||
|
||||
/**
|
||||
Variables used for parsing the argument list
|
||||
*/
|
||||
const static struct woption
|
||||
long_options[] =
|
||||
{
|
||||
@@ -290,7 +321,7 @@ int builtin_set( wchar_t **argv )
|
||||
}
|
||||
;
|
||||
|
||||
wchar_t short_options[] = L"+xglenuUq";
|
||||
const wchar_t *short_options = L"+xglenuUq";
|
||||
|
||||
int argc = builtin_count_args(argv);
|
||||
|
||||
@@ -360,6 +391,15 @@ int builtin_set( wchar_t **argv )
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Ok, all arguments have been parsed, let's validate them
|
||||
*/
|
||||
|
||||
/*
|
||||
If we are checking the existance of a variable (-q) we can not
|
||||
also specify scope
|
||||
*/
|
||||
|
||||
if( query && (erase || list || global || local || universal || export || unexport ) )
|
||||
{
|
||||
sb_printf(sb_err,
|
||||
@@ -372,7 +412,7 @@ int builtin_set( wchar_t **argv )
|
||||
}
|
||||
|
||||
|
||||
/* Check operation and modifiers sanity */
|
||||
/* We can't both list and erase varaibles */
|
||||
if( erase && list )
|
||||
{
|
||||
sb_printf(sb_err,
|
||||
@@ -384,6 +424,9 @@ int builtin_set( wchar_t **argv )
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
Variables can only have one scope
|
||||
*/
|
||||
if( local + global + universal > 1 )
|
||||
{
|
||||
sb_printf( sb_err,
|
||||
@@ -394,6 +437,9 @@ int builtin_set( wchar_t **argv )
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
Variables can only have one export status
|
||||
*/
|
||||
if( export && unexport )
|
||||
{
|
||||
sb_printf( sb_err,
|
||||
@@ -407,13 +453,16 @@ int builtin_set( wchar_t **argv )
|
||||
if( query )
|
||||
{
|
||||
/*
|
||||
Query mode. Return number of specified variables that do not exist.
|
||||
Query mode. Return the number variables that do not exist
|
||||
out of the specified variables.
|
||||
*/
|
||||
int i;
|
||||
for( i=woptind; i<argc; i++ )
|
||||
{
|
||||
if( !env_exist( argv[i] ) )
|
||||
{
|
||||
retcode++;
|
||||
}
|
||||
|
||||
}
|
||||
return retcode;
|
||||
@@ -424,8 +473,7 @@ int builtin_set( wchar_t **argv )
|
||||
if( woptind < argc )
|
||||
{
|
||||
dest = wcsdup(argv[woptind++]);
|
||||
//fwprintf(stderr, L"Dest: %ls\n", dest);
|
||||
|
||||
|
||||
if( !wcslen( dest ) )
|
||||
{
|
||||
free( dest );
|
||||
@@ -441,9 +489,82 @@ int builtin_set( wchar_t **argv )
|
||||
while( woptind < argc )
|
||||
{
|
||||
al_push(&values, argv[woptind++]);
|
||||
// fwprintf(stderr, L"Val: %ls\n", argv[woptind - 1]);
|
||||
}
|
||||
|
||||
if( is_path_variable( dest ) )
|
||||
{
|
||||
int i;
|
||||
int error = 0;
|
||||
|
||||
for( i=0; i<al_get_count( &values ); i++ )
|
||||
{
|
||||
int show_perror = 0;
|
||||
int show_hint = 0;
|
||||
|
||||
struct stat buff;
|
||||
wchar_t *dir = (wchar_t *)al_get( &values, i );
|
||||
|
||||
if( wstat( dir, &buff ) )
|
||||
{
|
||||
error = 1;
|
||||
show_perror = 1;
|
||||
}
|
||||
|
||||
if( !( S_IFDIR & buff.st_mode ) )
|
||||
{
|
||||
error = 1;
|
||||
|
||||
}
|
||||
|
||||
if( error )
|
||||
{
|
||||
wchar_t *colon;
|
||||
|
||||
sb_printf( sb_err,
|
||||
_(BUILTIN_SET_PATH_ERROR),
|
||||
argv[0],
|
||||
dir,
|
||||
dest );
|
||||
colon = wcschr( dir, L':' );
|
||||
|
||||
if( colon && *(colon+1) )
|
||||
{
|
||||
show_hint = 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if( show_perror )
|
||||
{
|
||||
builtin_wperror( argv[0] );
|
||||
}
|
||||
|
||||
if( show_hint )
|
||||
{
|
||||
sb_printf( sb_err,
|
||||
_(BUILTIN_SET_PATH_HINT),
|
||||
argv[0],
|
||||
dest,
|
||||
dest,
|
||||
wcschr( dir, L':' )+1);
|
||||
}
|
||||
|
||||
if( error )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if( error )
|
||||
{
|
||||
al_destroy(&values);
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Extract variable name and indexes */
|
||||
|
||||
sb_init(&name_sb);
|
||||
@@ -456,8 +577,7 @@ int builtin_set( wchar_t **argv )
|
||||
if( !retcode )
|
||||
{
|
||||
name = (wchar_t *) name_sb.buff;
|
||||
//fwprintf(stderr, L"Name is %ls\n", name);
|
||||
|
||||
|
||||
al_init(&indexes);
|
||||
retval = parse_fill_indexes(&indexes, dest);
|
||||
if (retval < 0)
|
||||
@@ -474,7 +594,7 @@ int builtin_set( wchar_t **argv )
|
||||
int scope = (local ? ENV_LOCAL : 0) | (global ? ENV_GLOBAL : 0) | (export ? ENV_EXPORT : 0) | (unexport ? ENV_UNEXPORT : 0) | (universal ? ENV_UNIVERSAL:0) | ENV_USER;
|
||||
if( list )
|
||||
{
|
||||
/* Maybe we should issue an error if there are any other arguments */
|
||||
/* Maybe we should issue an error if there are any other arguments? */
|
||||
print_variables(0, 0, scope);
|
||||
finished=1;
|
||||
}
|
||||
@@ -509,7 +629,7 @@ int builtin_set( wchar_t **argv )
|
||||
!erase &&
|
||||
!list )
|
||||
{
|
||||
env_set( name, 0, scope );
|
||||
my_env_set( name, 0, scope );
|
||||
finished = 1;
|
||||
}
|
||||
}
|
||||
@@ -569,7 +689,8 @@ int builtin_set( wchar_t **argv )
|
||||
else
|
||||
{
|
||||
fill_buffer_from_list(&result_sb, &val_l);
|
||||
env_set(name, (wchar_t *) result_sb.buff, scope);
|
||||
|
||||
my_env_set(name, (wchar_t *) result_sb.buff, scope);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -582,7 +703,7 @@ int builtin_set( wchar_t **argv )
|
||||
fill_buffer_from_list( &result_sb,
|
||||
&val_l );
|
||||
|
||||
env_set(name,
|
||||
my_env_set(name,
|
||||
(wchar_t *) result_sb.buff,
|
||||
scope);
|
||||
}
|
||||
@@ -598,7 +719,7 @@ int builtin_set( wchar_t **argv )
|
||||
}
|
||||
|
||||
/* Common cleanup */
|
||||
//fwprintf(stderr, L"Cleanup\n");
|
||||
|
||||
free(dest);
|
||||
sb_destroy(&name_sb);
|
||||
al_destroy( &values );
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
Functions used for implementing the ulimit builtin.
|
||||
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
@@ -12,8 +14,9 @@ Functions used for implementing the ulimit builtin.
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "builtin.h"
|
||||
#include "common.h"
|
||||
#include "wgetopt.h"
|
||||
|
||||
132
common.c
132
common.c
@@ -6,6 +6,7 @@ parts of fish.
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <termios.h>
|
||||
#include <wchar.h>
|
||||
@@ -50,7 +51,9 @@ parts of fish.
|
||||
#include <ncurses/term.h>
|
||||
#endif
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "common.h"
|
||||
#include "expand.h"
|
||||
@@ -297,19 +300,14 @@ char *wcs2str_internal( const wchar_t *in, char *out )
|
||||
{
|
||||
res = wcrtomb( &out[out_pos], in[in_pos], &state );
|
||||
|
||||
switch( res )
|
||||
if( res == (size_t)(-1) )
|
||||
{
|
||||
case (size_t)(-1):
|
||||
{
|
||||
debug( 1, L"Wide character has no narrow representation" );
|
||||
memset( &state, 0, sizeof(state) );
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
out_pos += res;
|
||||
break;
|
||||
}
|
||||
debug( 1, L"Wide character has no narrow representation" );
|
||||
memset( &state, 0, sizeof(state) );
|
||||
}
|
||||
else
|
||||
{
|
||||
out_pos += res;
|
||||
}
|
||||
}
|
||||
in_pos++;
|
||||
@@ -402,119 +400,17 @@ wchar_t **strv2wcsv( const char **in )
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*$OpenBSD: strlcat.c,v 1.11 2003/06/17 21:56:24 millert Exp $*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
size_t
|
||||
wcslcat(wchar_t *dst, const wchar_t *src, size_t siz)
|
||||
{
|
||||
|
||||
register wchar_t *d = dst;
|
||||
register const wchar_t *s = src;
|
||||
register size_t n = siz;
|
||||
size_t dlen;
|
||||
|
||||
/* Find the end of dst and adjust bytes left but don't go past end */
|
||||
while (n-- != 0 && *d != '\0')
|
||||
d++;
|
||||
|
||||
dlen = d - dst;
|
||||
n = siz - dlen;
|
||||
|
||||
if (n == 0)
|
||||
return(dlen + wcslen(s));
|
||||
|
||||
while (*s != '\0')
|
||||
{
|
||||
if (n != 1)
|
||||
{
|
||||
*d++ = *s;
|
||||
n--;
|
||||
}
|
||||
s++;
|
||||
}
|
||||
*d = '\0';
|
||||
|
||||
return(dlen + (s - src));
|
||||
/* count does not include NUL */
|
||||
}
|
||||
|
||||
/*$OpenBSD: strlcpy.c,v 1.8 2003/06/17 21:56:24 millert Exp $*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
size_t
|
||||
wcslcpy(wchar_t *dst, const wchar_t *src, size_t siz)
|
||||
{
|
||||
register wchar_t *d = dst;
|
||||
register const wchar_t *s = src;
|
||||
register size_t n = siz;
|
||||
|
||||
/* Copy as many bytes as will fit */
|
||||
if (n != 0 && --n != 0)
|
||||
{
|
||||
do
|
||||
{
|
||||
if ((*d++ = *s++) == 0)
|
||||
break;
|
||||
}
|
||||
while (--n != 0);
|
||||
}
|
||||
|
||||
/* Not enough room in dst, add NUL and traverse rest of src */
|
||||
if (n == 0)
|
||||
{
|
||||
if (siz != 0)
|
||||
*d = '\0';
|
||||
/* NUL-terminate dst */
|
||||
while (*s++)
|
||||
;
|
||||
}
|
||||
return(s - src - 1);
|
||||
/* count does not include NUL */
|
||||
}
|
||||
|
||||
int wcsvarname( wchar_t *str )
|
||||
wchar_t *wcsvarname( wchar_t *str )
|
||||
{
|
||||
while( *str )
|
||||
{
|
||||
if( (!iswalnum(*str)) && (*str != L'_' ) )
|
||||
{
|
||||
return 0;
|
||||
return str;
|
||||
}
|
||||
str++;
|
||||
}
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1156,6 +1052,7 @@ wchar_t *unescape( const wchar_t * orig, int unescape_special )
|
||||
{
|
||||
switch( in[++in_pos] )
|
||||
{
|
||||
case '\\':
|
||||
case L'\'':
|
||||
{
|
||||
in[out_pos]=in[in_pos];
|
||||
@@ -1213,6 +1110,7 @@ wchar_t *unescape( const wchar_t * orig, int unescape_special )
|
||||
return 0;
|
||||
}
|
||||
|
||||
case '\\':
|
||||
case L'$':
|
||||
case '"':
|
||||
{
|
||||
|
||||
46
common.h
46
common.h
@@ -15,19 +15,6 @@
|
||||
|
||||
#include "util.h"
|
||||
|
||||
/**
|
||||
Under curses, tputs expects an int (*func)(char) as its last
|
||||
parameter, but in ncurses, tputs expects a int (*func)(int) as its
|
||||
last parameter. tputs_arg_t is defined to always be what tputs
|
||||
expects. Hopefully.
|
||||
*/
|
||||
|
||||
#ifdef NCURSES_VERSION
|
||||
typedef int tputs_arg_t;
|
||||
#else
|
||||
typedef char tputs_arg_t;
|
||||
#endif
|
||||
|
||||
/**
|
||||
Maximum number of bytes used by a single utf-8 character
|
||||
*/
|
||||
@@ -147,35 +134,18 @@ wchar_t *wcsdupcat( const wchar_t *a, const wchar_t *b );
|
||||
*/
|
||||
wchar_t *wcsdupcat2( const wchar_t *a, ... );
|
||||
|
||||
|
||||
/**
|
||||
Appends src to string dst of size siz (unlike wcsncat, siz is the
|
||||
full size of dst, not space left). At most siz-1 characters will be
|
||||
copied. Always NUL terminates (unless siz <= wcslen(dst)). Returns
|
||||
wcslen(src) + MIN(siz, wcslen(initial dst)). If retval >= siz,
|
||||
truncation occurred.
|
||||
|
||||
This is the OpenBSD strlcat function, modified for wide characters,
|
||||
and renamed to reflect this change.
|
||||
|
||||
*/
|
||||
size_t wcslcat( wchar_t *dst, const wchar_t *src, size_t siz );
|
||||
|
||||
/**
|
||||
Copy src to string dst of size siz. At most siz-1 characters will
|
||||
be copied. Always NUL terminates (unless siz == 0). Returns
|
||||
wcslen(src); if retval >= siz, truncation occurred.
|
||||
|
||||
This is the OpenBSD strlcpy function, modified for wide characters,
|
||||
and renamed to reflect this change.
|
||||
*/
|
||||
size_t wcslcpy( wchar_t *dst, const wchar_t *src, size_t siz );
|
||||
|
||||
/**
|
||||
Test if the given string is a valid variable name
|
||||
*/
|
||||
|
||||
int wcsvarname( wchar_t *str );
|
||||
|
||||
/**
|
||||
Test if the given string is a valid variable name.
|
||||
|
||||
\return null if this is a valid name, and a pointer to the first invalid character otherwise
|
||||
*/
|
||||
|
||||
wchar_t *wcsvarname( wchar_t *str );
|
||||
|
||||
|
||||
/**
|
||||
|
||||
22
complete.c
22
complete.c
@@ -21,7 +21,10 @@
|
||||
#include <wchar.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "tokenizer.h"
|
||||
#include "wildcard.h"
|
||||
#include "proc.h"
|
||||
@@ -1557,7 +1560,7 @@ static int complete_param( wchar_t *cmd_orig,
|
||||
{
|
||||
use_common &= ((o->result_mode & NO_COMMON )==0);
|
||||
use_files &= ((o->result_mode & NO_FILES )==0);
|
||||
complete_from_args( arg, o->comp, o->desc, comp_out );
|
||||
complete_from_args( arg, o->comp, _(o->desc), comp_out );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1581,7 +1584,7 @@ static int complete_param( wchar_t *cmd_orig,
|
||||
found_old = 1;
|
||||
use_common &= ((o->result_mode & NO_COMMON )==0);
|
||||
use_files &= ((o->result_mode & NO_FILES )==0);
|
||||
complete_from_args( str, o->comp, o->desc, comp_out );
|
||||
complete_from_args( str, o->comp, _(o->desc), comp_out );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1607,7 +1610,7 @@ static int complete_param( wchar_t *cmd_orig,
|
||||
{
|
||||
use_common &= ((o->result_mode & NO_COMMON )==0);
|
||||
use_files &= ((o->result_mode & NO_FILES )==0);
|
||||
complete_from_args( str, o->comp, o->desc, comp_out );
|
||||
complete_from_args( str, o->comp, _(o->desc), comp_out );
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1631,7 +1634,7 @@ static int complete_param( wchar_t *cmd_orig,
|
||||
if( (o->short_opt == L'\0' ) && (o->long_opt[0]==L'\0'))
|
||||
{
|
||||
use_files &= ((o->result_mode & NO_FILES )==0);
|
||||
complete_from_args( str, o->comp, o->desc, comp_out );
|
||||
complete_from_args( str, o->comp, _(o->desc), comp_out );
|
||||
}
|
||||
|
||||
if( wcslen(str) > 0 )
|
||||
@@ -1642,15 +1645,16 @@ static int complete_param( wchar_t *cmd_orig,
|
||||
if( o->short_opt != L'\0' &&
|
||||
short_ok( str, o->short_opt, i->short_opt_str ) )
|
||||
{
|
||||
const wchar_t *desc = _(o->desc );
|
||||
wchar_t *next_opt =
|
||||
malloc( sizeof(wchar_t)*(3 + wcslen(o->desc)));
|
||||
malloc( sizeof(wchar_t)*(3 + wcslen(desc)));
|
||||
if( !next_opt )
|
||||
die_mem();
|
||||
|
||||
next_opt[0]=o->short_opt;
|
||||
next_opt[1]=COMPLETE_SEP;
|
||||
next_opt[2]=L'\0';
|
||||
wcscat( next_opt, o->desc );
|
||||
wcscat( next_opt, desc );
|
||||
al_push( comp_out, next_opt );
|
||||
}
|
||||
|
||||
@@ -1678,7 +1682,7 @@ static int complete_param( wchar_t *cmd_orig,
|
||||
al_push( comp_out,
|
||||
wcsdupcat2( &((wchar_t *)whole_opt.buff)[wcslen(str)],
|
||||
COMPLETE_SEP_STR,
|
||||
o->desc,
|
||||
_(o->desc),
|
||||
(void *)0) );
|
||||
}
|
||||
|
||||
@@ -1688,7 +1692,7 @@ static int complete_param( wchar_t *cmd_orig,
|
||||
wcsdupcat2( &((wchar_t *)whole_opt.buff)[wcslen(str)],
|
||||
L"=",
|
||||
COMPLETE_SEP_STR,
|
||||
o->desc,
|
||||
_(o->desc),
|
||||
(void *)0) );
|
||||
}
|
||||
}
|
||||
@@ -2116,7 +2120,7 @@ void complete_print( string_buffer_t *out )
|
||||
|
||||
append_switch( out,
|
||||
L"description",
|
||||
o->desc );
|
||||
_(o->desc) );
|
||||
|
||||
append_switch( out,
|
||||
L"arguments",
|
||||
|
||||
665
config.guess
vendored
665
config.guess
vendored
File diff suppressed because it is too large
Load Diff
219
config.sub
vendored
219
config.sub
vendored
@@ -1,9 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
|
||||
# Inc.
|
||||
|
||||
timestamp='2003-06-18'
|
||||
timestamp='2006-02-27'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
@@ -21,14 +22,15 @@ timestamp='2003-06-18'
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
# Boston, MA 02111-1307, USA.
|
||||
|
||||
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
|
||||
# Please send patches to <config-patches@gnu.org>. Submit a context
|
||||
# diff and a properly formatted ChangeLog entry.
|
||||
#
|
||||
@@ -70,7 +72,7 @@ Report bugs and patches to <config-patches@gnu.org>."
|
||||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
@@ -83,11 +85,11 @@ Try \`$me --help' for more information."
|
||||
while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
--time-stamp | --time* | -t )
|
||||
echo "$timestamp" ; exit 0 ;;
|
||||
echo "$timestamp" ; exit ;;
|
||||
--version | -v )
|
||||
echo "$version" ; exit 0 ;;
|
||||
echo "$version" ; exit ;;
|
||||
--help | --h* | -h )
|
||||
echo "$usage"; exit 0 ;;
|
||||
echo "$usage"; exit ;;
|
||||
-- ) # Stop option processing
|
||||
shift; break ;;
|
||||
- ) # Use stdin as input.
|
||||
@@ -99,7 +101,7 @@ while test $# -gt 0 ; do
|
||||
*local*)
|
||||
# First pass through any local machine types.
|
||||
echo $1
|
||||
exit 0;;
|
||||
exit ;;
|
||||
|
||||
* )
|
||||
break ;;
|
||||
@@ -118,7 +120,9 @@ esac
|
||||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
|
||||
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
|
||||
storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
@@ -144,7 +148,7 @@ case $os in
|
||||
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
|
||||
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
|
||||
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
|
||||
-apple | -axis)
|
||||
-apple | -axis | -knuth | -cray)
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
@@ -169,6 +173,10 @@ case $os in
|
||||
-hiux*)
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
-sco6)
|
||||
os=-sco5v6
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco5)
|
||||
os=-sco3.2v5
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
@@ -185,6 +193,10 @@ case $os in
|
||||
# Don't forget version if it is 3.2v4 or newer.
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco5v6*)
|
||||
# Don't forget version if it is 3.2v4 or newer.
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco*)
|
||||
os=-sco3.2v2
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
@@ -228,14 +240,16 @@ case $basic_machine in
|
||||
| a29k \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| am33_2.0 \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
|
||||
| bfin \
|
||||
| c4x | clipper \
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
| fr30 | frv \
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
| ip2k \
|
||||
| m32r | m68000 | m68k | m88k | mcore \
|
||||
| ip2k | iq2000 \
|
||||
| m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \
|
||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||
| mips16 \
|
||||
| mips64 | mips64el \
|
||||
@@ -244,31 +258,38 @@ case $basic_machine in
|
||||
| mips64vr4100 | mips64vr4100el \
|
||||
| mips64vr4300 | mips64vr4300el \
|
||||
| mips64vr5000 | mips64vr5000el \
|
||||
| mips64vr5900 | mips64vr5900el \
|
||||
| mipsisa32 | mipsisa32el \
|
||||
| mipsisa32r2 | mipsisa32r2el \
|
||||
| mipsisa64 | mipsisa64el \
|
||||
| mipsisa64r2 | mipsisa64r2el \
|
||||
| mipsisa64sb1 | mipsisa64sb1el \
|
||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||
| mipstx39 | mipstx39el \
|
||||
| mn10200 | mn10300 \
|
||||
| mt \
|
||||
| msp430 \
|
||||
| nios | nios2 \
|
||||
| ns16k | ns32k \
|
||||
| openrisc | or32 \
|
||||
| or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| pyramid \
|
||||
| s390 | s390x \
|
||||
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
|
||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
||||
| strongarm \
|
||||
| tahoe | thumb | tic4x | tic80 | tron \
|
||||
| v850 | v850e \
|
||||
| we32k \
|
||||
| x86 | xscale | xstormy16 | xtensa \
|
||||
| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
|
||||
| z8k)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m32c)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12)
|
||||
# Motorola 68HC11/12.
|
||||
basic_machine=$basic_machine-unknown
|
||||
@@ -276,6 +297,9 @@ case $basic_machine in
|
||||
;;
|
||||
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
|
||||
;;
|
||||
ms1)
|
||||
basic_machine=mt-unknown
|
||||
;;
|
||||
|
||||
# We use `pc' rather than `unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
@@ -296,19 +320,19 @@ case $basic_machine in
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||
| avr-* \
|
||||
| bs2000-* \
|
||||
| bfin-* | bs2000-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
|
||||
| clipper-* | cydra-* \
|
||||
| clipper-* | craynv-* | cydra-* \
|
||||
| d10v-* | d30v-* | dlx-* \
|
||||
| elxsi-* \
|
||||
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
|
||||
| h8300-* | h8500-* \
|
||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||
| i*86-* | i860-* | i960-* | ia64-* \
|
||||
| ip2k-* \
|
||||
| m32r-* \
|
||||
| ip2k-* | iq2000-* \
|
||||
| m32r-* | m32rle-* \
|
||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m88110-* | m88k-* | mcore-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* \
|
||||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||
| mips16-* \
|
||||
| mips64-* | mips64el-* \
|
||||
@@ -317,34 +341,41 @@ case $basic_machine in
|
||||
| mips64vr4100-* | mips64vr4100el-* \
|
||||
| mips64vr4300-* | mips64vr4300el-* \
|
||||
| mips64vr5000-* | mips64vr5000el-* \
|
||||
| mips64vr5900-* | mips64vr5900el-* \
|
||||
| mipsisa32-* | mipsisa32el-* \
|
||||
| mipsisa32r2-* | mipsisa32r2el-* \
|
||||
| mipsisa64-* | mipsisa64el-* \
|
||||
| mipsisa64r2-* | mipsisa64r2el-* \
|
||||
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| mmix-* \
|
||||
| mt-* \
|
||||
| msp430-* \
|
||||
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
|
||||
| nios-* | nios2-* \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| orion-* \
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| pyramid-* \
|
||||
| romp-* | rs6000-* \
|
||||
| s390-* | s390x-* \
|
||||
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
|
||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
|
||||
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
||||
| sparclite-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
|
||||
| tahoe-* | thumb-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||
| tron-* \
|
||||
| v850-* | v850e-* | vax-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
|
||||
| xtensa-* \
|
||||
| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
|
||||
| xstormy16-* | xtensa-* \
|
||||
| ymp-* \
|
||||
| z8k-*)
|
||||
;;
|
||||
m32c-*)
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
386bsd)
|
||||
@@ -361,6 +392,9 @@ case $basic_machine in
|
||||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
;;
|
||||
abacus)
|
||||
basic_machine=abacus-unknown
|
||||
;;
|
||||
adobe68k)
|
||||
basic_machine=m68010-adobe
|
||||
os=-scout
|
||||
@@ -378,6 +412,9 @@ case $basic_machine in
|
||||
amd64)
|
||||
basic_machine=x86_64-pc
|
||||
;;
|
||||
amd64-*)
|
||||
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
amdahl)
|
||||
basic_machine=580-amdahl
|
||||
os=-sysv
|
||||
@@ -437,12 +474,27 @@ case $basic_machine in
|
||||
basic_machine=j90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
craynv)
|
||||
basic_machine=craynv-cray
|
||||
os=-unicosmp
|
||||
;;
|
||||
cr16c)
|
||||
basic_machine=cr16c-unknown
|
||||
os=-elf
|
||||
;;
|
||||
crds | unos)
|
||||
basic_machine=m68k-crds
|
||||
;;
|
||||
crisv32 | crisv32-* | etraxfs*)
|
||||
basic_machine=crisv32-axis
|
||||
;;
|
||||
cris | cris-* | etrax*)
|
||||
basic_machine=cris-axis
|
||||
;;
|
||||
crx)
|
||||
basic_machine=crx-unknown
|
||||
os=-elf
|
||||
;;
|
||||
da30 | da30-*)
|
||||
basic_machine=m68k-da30
|
||||
;;
|
||||
@@ -465,6 +517,10 @@ case $basic_machine in
|
||||
basic_machine=m88k-motorola
|
||||
os=-sysv3
|
||||
;;
|
||||
djgpp)
|
||||
basic_machine=i586-pc
|
||||
os=-msdosdjgpp
|
||||
;;
|
||||
dpx20 | dpx20-*)
|
||||
basic_machine=rs6000-bull
|
||||
os=-bosx
|
||||
@@ -643,10 +699,6 @@ case $basic_machine in
|
||||
mips3*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
|
||||
;;
|
||||
mmix*)
|
||||
basic_machine=mmix-knuth
|
||||
os=-mmixware
|
||||
;;
|
||||
monitor)
|
||||
basic_machine=m68k-rom68k
|
||||
os=-coff
|
||||
@@ -659,6 +711,9 @@ case $basic_machine in
|
||||
basic_machine=i386-pc
|
||||
os=-msdos
|
||||
;;
|
||||
ms1-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
|
||||
;;
|
||||
mvs)
|
||||
basic_machine=i370-ibm
|
||||
os=-mvs
|
||||
@@ -727,10 +782,6 @@ case $basic_machine in
|
||||
np1)
|
||||
basic_machine=np1-gould
|
||||
;;
|
||||
nv1)
|
||||
basic_machine=nv1-cray
|
||||
os=-unicosmp
|
||||
;;
|
||||
nsr-tandem)
|
||||
basic_machine=nsr-tandem
|
||||
;;
|
||||
@@ -738,9 +789,12 @@ case $basic_machine in
|
||||
basic_machine=hppa1.1-oki
|
||||
os=-proelf
|
||||
;;
|
||||
or32 | or32-*)
|
||||
openrisc | openrisc-*)
|
||||
basic_machine=or32-unknown
|
||||
os=-coff
|
||||
;;
|
||||
os400)
|
||||
basic_machine=powerpc-ibm
|
||||
os=-os400
|
||||
;;
|
||||
OSE68000 | ose68000)
|
||||
basic_machine=m68000-ericsson
|
||||
@@ -767,6 +821,12 @@ case $basic_machine in
|
||||
pc532 | pc532-*)
|
||||
basic_machine=ns32k-pc532
|
||||
;;
|
||||
pc98)
|
||||
basic_machine=i386-pc
|
||||
;;
|
||||
pc98-*)
|
||||
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentium | p5 | k5 | k6 | nexgen | viac3)
|
||||
basic_machine=i586-pc
|
||||
;;
|
||||
@@ -823,6 +883,10 @@ case $basic_machine in
|
||||
basic_machine=i586-unknown
|
||||
os=-pw32
|
||||
;;
|
||||
rdos)
|
||||
basic_machine=i386-pc
|
||||
os=-rdos
|
||||
;;
|
||||
rom68k)
|
||||
basic_machine=m68k-rom68k
|
||||
os=-coff
|
||||
@@ -833,6 +897,12 @@ case $basic_machine in
|
||||
rtpc | rtpc-*)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
s390 | s390-*)
|
||||
basic_machine=s390-ibm
|
||||
;;
|
||||
s390x | s390x-*)
|
||||
basic_machine=s390x-ibm
|
||||
;;
|
||||
sa29200)
|
||||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
@@ -956,6 +1026,10 @@ case $basic_machine in
|
||||
tower | tower-32)
|
||||
basic_machine=m68k-ncr
|
||||
;;
|
||||
tpf)
|
||||
basic_machine=s390x-ibm
|
||||
os=-tpf
|
||||
;;
|
||||
udi29k)
|
||||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
@@ -999,6 +1073,10 @@ case $basic_machine in
|
||||
basic_machine=hppa1.1-winbond
|
||||
os=-proelf
|
||||
;;
|
||||
xbox)
|
||||
basic_machine=i686-pc
|
||||
os=-mingw32
|
||||
;;
|
||||
xps | xps100)
|
||||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
@@ -1029,6 +1107,9 @@ case $basic_machine in
|
||||
romp)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
mmix)
|
||||
basic_machine=mmix-knuth
|
||||
;;
|
||||
rs6000)
|
||||
basic_machine=rs6000-ibm
|
||||
;;
|
||||
@@ -1045,13 +1126,10 @@ case $basic_machine in
|
||||
we32k)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||
basic_machine=sh-unknown
|
||||
;;
|
||||
sh64)
|
||||
basic_machine=sh64-unknown
|
||||
;;
|
||||
sparc | sparcv9 | sparcv9b)
|
||||
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
cydra)
|
||||
@@ -1124,19 +1202,23 @@ case $os in
|
||||
| -aos* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
|
||||
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||
| -openbsd* | -solidbsd* \
|
||||
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
||||
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -chorusos* | -chorusrdb* \
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
|
||||
| -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
||||
| -skyos* | -haiku* | -rdos*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
@@ -1154,12 +1236,15 @@ case $os in
|
||||
os=`echo $os | sed -e 's|nto|nto-qnx|'`
|
||||
;;
|
||||
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
|
||||
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
|
||||
| -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
|
||||
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
|
||||
;;
|
||||
-mac*)
|
||||
os=`echo $os | sed -e 's|mac|macos|'`
|
||||
;;
|
||||
-linux-dietlibc)
|
||||
os=-linux-dietlibc
|
||||
;;
|
||||
-linux*)
|
||||
os=`echo $os | sed -e 's|linux|linux-gnu|'`
|
||||
;;
|
||||
@@ -1172,6 +1257,9 @@ case $os in
|
||||
-opened*)
|
||||
os=-openedition
|
||||
;;
|
||||
-os400*)
|
||||
os=-os400
|
||||
;;
|
||||
-wince*)
|
||||
os=-wince
|
||||
;;
|
||||
@@ -1193,6 +1281,9 @@ case $os in
|
||||
-atheos*)
|
||||
os=-atheos
|
||||
;;
|
||||
-syllable*)
|
||||
os=-syllable
|
||||
;;
|
||||
-386bsd)
|
||||
os=-bsd
|
||||
;;
|
||||
@@ -1215,6 +1306,9 @@ case $os in
|
||||
-sinix*)
|
||||
os=-sysv4
|
||||
;;
|
||||
-tpf*)
|
||||
os=-tpf
|
||||
;;
|
||||
-triton*)
|
||||
os=-sysv3
|
||||
;;
|
||||
@@ -1251,6 +1345,9 @@ case $os in
|
||||
-kaos*)
|
||||
os=-kaos
|
||||
;;
|
||||
-zvmoe)
|
||||
os=-zvmoe
|
||||
;;
|
||||
-none)
|
||||
;;
|
||||
*)
|
||||
@@ -1282,9 +1379,9 @@ case $basic_machine in
|
||||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
# This must come before the *-dec entry.
|
||||
pdp10-*)
|
||||
os=-tops20
|
||||
@@ -1328,9 +1425,15 @@ case $basic_machine in
|
||||
*-be)
|
||||
os=-beos
|
||||
;;
|
||||
*-haiku)
|
||||
os=-haiku
|
||||
;;
|
||||
*-ibm)
|
||||
os=-aix
|
||||
;;
|
||||
*-knuth)
|
||||
os=-mmixware
|
||||
;;
|
||||
*-wec)
|
||||
os=-proelf
|
||||
;;
|
||||
@@ -1463,9 +1566,15 @@ case $basic_machine in
|
||||
-mvs* | -opened*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-os400*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-ptx*)
|
||||
vendor=sequent
|
||||
;;
|
||||
-tpf*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-vxsim* | -vxworks* | -windiss*)
|
||||
vendor=wrs
|
||||
;;
|
||||
@@ -1490,7 +1599,7 @@ case $basic_machine in
|
||||
esac
|
||||
|
||||
echo $basic_machine$os
|
||||
exit 0
|
||||
exit
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
|
||||
343
configure.ac
343
configure.ac
@@ -1,14 +1,57 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(fish,1.21.0,fish-users@lists.sf.net)
|
||||
AC_INIT(fish,1.21.6,fish-users@lists.sf.net)
|
||||
|
||||
# If needed, run autoconf to regenerate the configure file
|
||||
AC_MSG_CHECKING([if autoconf needs to be run])
|
||||
if test configure -ot configure.ac; then
|
||||
AC_MSG_RESULT([yes])
|
||||
if which autoconf >/dev/null; then
|
||||
# No need to provide any error messages if autoconf fails, the
|
||||
# shell and autconf should take care of that themselves
|
||||
AC_MSG_NOTICE([running autoconf])
|
||||
if autoconf; then
|
||||
./configure "$@"
|
||||
fi
|
||||
exit
|
||||
else
|
||||
AC_MSG_ERROR( [cannot find the autoconf program in your path.
|
||||
This program needs to be run whenever the configure.ac file is modified.
|
||||
Please install it and try again.])
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
|
||||
# If needed, run autoheader to regenerate config.h.in
|
||||
AC_MSG_CHECKING([if autoheader needs to be run])
|
||||
if test ! -f ./config.h.in -o config.h.in -ot configure.ac; then
|
||||
AC_MSG_RESULT([yes])
|
||||
if which autoheader >/dev/null; then
|
||||
AC_MSG_NOTICE([running autoheader])
|
||||
autoheader
|
||||
else
|
||||
AC_MSG_ERROR( [cannot find the autoheader program in your path.
|
||||
This program needs to be run whenever the configure.ac file is modified.
|
||||
Please install it and try again.])
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
|
||||
# Detect directories which may contain additional headers, libraries
|
||||
# and commands. This needs to be done early - before Autoconf starts
|
||||
# to mess with CFLAGS and all the other environemnt variables.
|
||||
for i in /usr/pkg /sw /opt /opt/local; do
|
||||
|
||||
AC_MSG_CHECKING([for $i/include include directory])
|
||||
if test -d $i/include; then
|
||||
AC_MSG_RESULT(yes)
|
||||
CPPFLAGS="$CPPFLAGS -I$i/include/"
|
||||
CFLAGS="$CFLAGS -I$i/include/"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for $i/lib library directory])
|
||||
@@ -31,22 +74,6 @@ done
|
||||
|
||||
AC_SUBST( optbindirs, $optbindirs )
|
||||
|
||||
# If needed, run autoheader automatically
|
||||
AC_MSG_CHECKING([if autoheader needs to be run])
|
||||
if test ! -f ./config.h.in -o config.h.in -ot configure.ac; then
|
||||
AC_MSG_RESULT([yes])
|
||||
if which autoheader >/dev/null; then
|
||||
AC_MSG_NOTICE([running autoheader])
|
||||
autoheader
|
||||
else
|
||||
AC_MSG_ERROR( [cannot find the autoheader program in your path.
|
||||
This program is needed because the configure.ac file has been modified.
|
||||
Please install it and try again.])
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
# Tell autoconf to create config.h header
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
|
||||
@@ -58,16 +85,17 @@ AC_PROG_INSTALL
|
||||
# Check for doxygen, which is needed to build
|
||||
AC_CHECK_PROG( has_doxygen, [doxygen], "true")
|
||||
|
||||
if ! test $has_doxygen = "true"; then
|
||||
if ! test "$has_doxygen" = "true"; then
|
||||
AC_MSG_ERROR( [cannot find the Doxygen program in your path.
|
||||
This program is needed to build fish.
|
||||
Please install it and try again.])
|
||||
fi
|
||||
|
||||
# Check for seq program. If missing, install fallback shellscript implementation
|
||||
# Check for seq command. If missing, make sure fallback shellscript
|
||||
# implementation is installed
|
||||
AC_CHECK_PROG( SEQ_FALLBACK, seq, [ ], [seq])
|
||||
|
||||
# Optionally drop xsel
|
||||
# Optionally drop xsel command
|
||||
AC_ARG_WITH( xsel,
|
||||
AC_HELP_STRING([--without-xsel],
|
||||
[do not build the xsel program needed for X clipboard integration]),
|
||||
@@ -84,17 +112,114 @@ else
|
||||
AC_SUBST( XSEL_MAN_PATH,[ ])
|
||||
fi
|
||||
|
||||
#
|
||||
# Test if the compiler accepts the -std=c99 flag. If so, using it
|
||||
# increases the odds of correct compilation, since we want to use the
|
||||
# *wprintf functions, which where defined in C99.
|
||||
#
|
||||
|
||||
XCFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -std=c99"
|
||||
AC_MSG_CHECKING(if -std=c99 works)
|
||||
AC_CACHE_VAL(local_cv_has__std_c99,[
|
||||
AC_TRY_RUN([
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}],
|
||||
local_cv_has__std_c99=yes,
|
||||
local_cv_has__std_c99=no,
|
||||
)])
|
||||
AC_MSG_RESULT($local_cv_has__std_c99)
|
||||
case x$local_cv_has__std_c99 in
|
||||
xno) CFLAGS="$XCFLAGS" ;;
|
||||
esac
|
||||
|
||||
#
|
||||
# If we are using gcc, set some flags that increase the odds of the
|
||||
# compiler producing a working binary...
|
||||
#
|
||||
|
||||
if test "$CC" = gcc; then
|
||||
|
||||
#
|
||||
# -fno-optimize-sibling-calls seems to work around a bug where
|
||||
# sending a SIGWINCH to fish on NetBSD causes fish to exit when
|
||||
# compiled with GCC 3.3.3. This is probably either a compiler bug
|
||||
# or a libc bug, but adding this flag seems to fix things for
|
||||
# now. Long term, the real problem should be tracked down and
|
||||
# truly fixed, at which point we can remove this silly flag. This
|
||||
# bug has been verified to not exist on Linux using GCC 3.3.3.
|
||||
#
|
||||
|
||||
CFLAGS="$CFLAGS -fno-optimize-sibling-calls"
|
||||
|
||||
|
||||
#
|
||||
# -Wall is there to keep me on my toes
|
||||
#
|
||||
|
||||
CFLAGS="$CFLAGS -Wall"
|
||||
|
||||
fi
|
||||
|
||||
#
|
||||
# If we are compiling against glibc, set some flags to work around
|
||||
# some rather stupid attempts to hide prototypes for *wprintf
|
||||
# functions, as well as prototypes of various gnu extensions.
|
||||
#
|
||||
|
||||
AC_MSG_CHECKING([if we are compiling against glibc])
|
||||
AC_RUN_IFELSE(
|
||||
[AC_LANG_PROGRAM([
|
||||
#include <stdlib.h>
|
||||
#ifdef __GLIBC__
|
||||
#define STATUS 0
|
||||
#else
|
||||
#define STATUS 1
|
||||
#endif],
|
||||
[return STATUS;])],
|
||||
[glibc=yes],
|
||||
[glibc=no] )
|
||||
|
||||
if test "$glibc" = yes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
|
||||
#
|
||||
# This gives us access to prototypes for gnu extensions and C99
|
||||
# functions if we are compiling agains glibc. All GNU extensions
|
||||
# that are used must have a fallback implementation available in
|
||||
# fallback.h, in order to keep fish working on non-gnu platforms.
|
||||
#
|
||||
|
||||
CFLAGS="$CFLAGS -D _GNU_SOURCE -D _ISOC99_SOURCE"
|
||||
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
# Test cpu for special handling of ppc
|
||||
#
|
||||
# This is used to skip use of tputs on ppc systems, since it seemed to
|
||||
# be broken, at least on older debin-based systems. This is obviously
|
||||
# not the right way to to detect whether this workaround should be
|
||||
# used, since it catches far to many systems, but I do not have the
|
||||
# hardware available to narrow this problem down, and in practice, it
|
||||
# seems that tputs is never really needed.
|
||||
#
|
||||
AC_CANONICAL_TARGET
|
||||
|
||||
if test $target_cpu = powerpc; then
|
||||
AC_DEFINE([TPUTS_KLUDGE],[1],[Evil kludge to get Power based machines to work])
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED([CPU],[L"$target_cpu"],[CPU type])
|
||||
|
||||
|
||||
# Set up installation directories
|
||||
# Set up PREFIX and related preprocessor symbols. Fish needs to know
|
||||
# where it will be installed. One of the reasons for this is so that
|
||||
# it can make sure the fish installation directory is in the path
|
||||
# during startup.
|
||||
if [[ "$prefix" = NONE ]]; then
|
||||
AC_DEFINE_UNQUOTED( [PREFIX], L"/usr/local", [Installation directory])
|
||||
AC_SUBST( PREFIX, /usr/local)
|
||||
@@ -103,7 +228,14 @@ else
|
||||
AC_DEFINE_UNQUOTED( [PREFIX], L"$prefix", [Installation directory])
|
||||
AC_SUBST( PREFIX, [$prefix])
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED( SYSCONFDIR, [L"$(eval echo $sysconfdir)"], [System configuration directory] )
|
||||
AC_DEFINE_UNQUOTED( DATADIR, [L"$(eval echo $datadir)"], [System configuration directory] )
|
||||
AC_SUBST( SYSCONFDIR, ["$(eval echo $sysconfdir)"] )
|
||||
AC_SUBST( DATADIR, ["$(eval echo $datadir)"] )
|
||||
|
||||
|
||||
# Set up the directory where the documentation files should be
|
||||
# installed
|
||||
AC_ARG_VAR( [docdir], [Documentation direcotry] )
|
||||
|
||||
if test -z $docdir; then
|
||||
@@ -111,18 +243,101 @@ if test -z $docdir; then
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED( DOCDIR, [L"$(eval echo $docdir)"], [Documentation directory] )
|
||||
AC_DEFINE_UNQUOTED( SYSCONFDIR, [L"$(eval echo $sysconfdir)"], [System configuration directory] )
|
||||
AC_DEFINE_UNQUOTED( DATADIR, [L"$(eval echo $datadir)"], [System configuration directory] )
|
||||
AC_SUBST( SYSCONFDIR, ["$(eval echo $sysconfdir)"] )
|
||||
AC_SUBST( DATADIR, ["$(eval echo $datadir)"] )
|
||||
|
||||
# Set up locale directory
|
||||
|
||||
# Set up locale directory. This is where the .po files will be
|
||||
# installed.
|
||||
AC_DEFINE_UNQUOTED( [LOCALEDIR], "$(eval echo $datadir)/locale", [Locale directory])
|
||||
AC_SUBST( [LOCALEDIR], [$datadir/locale])
|
||||
|
||||
# See if Linux procfs is present
|
||||
# See if Linux procfs is present. This is used to get extra
|
||||
# information about running processes.
|
||||
AC_CHECK_FILES([/proc/self/stat])
|
||||
|
||||
# This is ued to tell the wgetopt library to translate strings. This
|
||||
# way wgetopt can be dropped into any project without requiring i18n.
|
||||
|
||||
AC_DEFINE([HAVE_TRANSLATE_H], [1],
|
||||
[Define to 1 if the wgettext function should be used for translating strings.])
|
||||
|
||||
# Check for presense of various libraries
|
||||
AC_SEARCH_LIBS( gettext, intl, AC_SUBST( HAVE_GETTEXT, [1] ), AC_SUBST( HAVE_GETTEXT, [0] ) )
|
||||
AC_SEARCH_LIBS( connect, socket, , [AC_MSG_ERROR([Cannot find the socket library, needed to build this package.] )] )
|
||||
AC_SEARCH_LIBS( nanosleep, rt, , [AC_MSG_ERROR([Cannot find the rt library, needed to build this package.] )] )
|
||||
AC_SEARCH_LIBS( setupterm, [ncurses curses], , [AC_MSG_ERROR([Could not find a curses implementation, needed to build fish])] )
|
||||
|
||||
# Check for presense of various header files
|
||||
AC_CHECK_HEADERS([getopt.h termio.h sys/resource.h term.h ncurses/term.h libintl.h ncurses.h curses.h])
|
||||
|
||||
AC_CHECK_HEADER([regex.h],
|
||||
[AC_DEFINE([HAVE_REGEX_H], [1], [Define to 1 if you have the <regex.h> header file.])],
|
||||
[AC_MSG_ERROR([Could not find the header regex.h, needed to build fish])])
|
||||
|
||||
# Check for presense of various functions
|
||||
AC_CHECK_FUNCS( wcsdup wcsndup wcslen wcscasecmp wcsncasecmp gettext fwprintf )
|
||||
AC_CHECK_FUNCS( futimes wcwidth wcswidth getopt_long wcstok fputwc fgetwc )
|
||||
AC_CHECK_FUNCS( wcstol dcgettext wcslcat wcslcpy )
|
||||
|
||||
# Here follows a list of small programs used to test for various
|
||||
# features that Autoconf doesn't tell us about
|
||||
|
||||
# Check if realpath accepts null for its second argument
|
||||
AC_MSG_CHECKING([if realpath accepts null for its second argument])
|
||||
AC_RUN_IFELSE(
|
||||
[AC_LANG_PROGRAM([
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>],
|
||||
[int status; char *res; res = realpath( "somefile", 0 ); status = !(res != 0 || errno == ENOENT); exit( status );])],
|
||||
[have_realpath_null=yes],
|
||||
[have_realpath_null=no] )
|
||||
|
||||
if test "$have_realpath_null" = yes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE_REALPATH_NULL], [1],
|
||||
[Define to 1 if realpath accepts null for its second argument.])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
# If we have a fwprintf in libc, test that it actually works. As of
|
||||
# March 2006, it is broken under Dragonfly BSD.
|
||||
if test "$ac_cv_func_fwprintf" = yes; then
|
||||
|
||||
AC_MSG_CHECKING([if fwprintf is broken])
|
||||
AC_RUN_IFELSE(
|
||||
[AC_LANG_PROGRAM([
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <locale.h>
|
||||
#include <wchar.h>
|
||||
],
|
||||
[
|
||||
setlocale( LC_ALL, "" );
|
||||
fwprintf( stderr, L"%ls%ls", L"", L"fish:" );
|
||||
])],
|
||||
[
|
||||
AC_MSG_RESULT(no)
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([HAVE_BROKEN_FWPRINTF], [1], [Define to 1 one if the implemented fwprintf is broken])
|
||||
] )
|
||||
|
||||
fi
|
||||
|
||||
# Check for RLIMIT_NPROC in sys/resource.h.
|
||||
AC_MSG_CHECKING([for RLIMIT_NPROC in sys/resource.h])
|
||||
AC_TRY_COMPILE([#include <sys/resource.h>],
|
||||
[int tmp; tmp=RLIMIT_NPROC;], have_rlimit_as=yes, have_rlimit_as=no)
|
||||
if test "$have_rlimit_as" = yes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE_RLIMIT_NPROC], [1],
|
||||
[Define to 1 if HAVE_RLIMIT_NPROC is defined in <sys/resource.h>.])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
# Check for RLIMIT_AS in sys/resource.h.
|
||||
AC_MSG_CHECKING([for RLIMIT_AS in sys/resource.h])
|
||||
AC_TRY_COMPILE([#include <sys/resource.h>],
|
||||
@@ -159,62 +374,6 @@ else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
|
||||
# Check for RLIMIT_NPROC in sys/resource.h.
|
||||
AC_MSG_CHECKING([for RLIMIT_NPROC in sys/resource.h])
|
||||
AC_TRY_COMPILE([#include <sys/resource.h>],
|
||||
[int tmp; tmp=RLIMIT_NPROC;], have_rlimit_as=yes, have_rlimit_as=no)
|
||||
if test "$have_rlimit_as" = yes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE_RLIMIT_NPROC], [1],
|
||||
[Define to 1 if HAVE_RLIMIT_NPROC is defined in <sys/resource.h>.])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
# Check if realpath accepts null for its second argument
|
||||
AC_MSG_CHECKING([if realpath accepts null for its second argument])
|
||||
AC_RUN_IFELSE(
|
||||
[AC_LANG_PROGRAM([#include <limits.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>],
|
||||
[int status; char *res; res = realpath( "somefile", 0 ); status = !(res != 0 || errno == ENOENT); exit( status );])],
|
||||
[have_realpath_null=yes],
|
||||
[have_realpath_null=no] )
|
||||
|
||||
if test "$have_realpath_null" = yes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE_REALPATH_NULL], [1],
|
||||
[Define to 1 if realpath accepts null for its second argument.])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
|
||||
# Check for libraries
|
||||
AC_CHECK_LIB(socket, connect)
|
||||
AC_CHECK_LIB(rt, nanosleep)
|
||||
AC_CHECK_LIB(intl, gettext)
|
||||
|
||||
# Check for various header files
|
||||
AC_CHECK_HEADERS([getopt.h termio.h sys/resource.h term.h ncurses/term.h libintl.h ncurses.h curses.h])
|
||||
|
||||
AC_CHECK_HEADER([regex.h],
|
||||
[AC_DEFINE([HAVE_REGEX_H], [1], [Define to 1 if you have the <regex.h> header file.])],
|
||||
[AC_MSG_ERROR([Could not find the header regex.h, needed to build fish])])
|
||||
|
||||
|
||||
# Check for various functions, and insert results into config.h
|
||||
AC_CHECK_FUNCS( wcsdup wcsndup wcslen wcscasecmp wcsncasecmp gettext fwprintf )
|
||||
AC_CHECK_FUNCS( futimes wcwidth wcswidth getopt_long wcstok fputwc fgetwc )
|
||||
AC_CHECK_FUNCS( wcstol dcgettext )
|
||||
|
||||
AC_DEFINE([HAVE_TRANSLATE_H], [1],
|
||||
[Define to 1 if the wgettext function should be used for translating strings.])
|
||||
|
||||
# Check again for gettext library, and insert results into the Makefile
|
||||
AC_CHECK_FUNC(gettext, AC_SUBST(HAVE_GETTEXT,1), AC_SUBST(HAVE_GETTEXT,0) )
|
||||
|
||||
# Check for _nl_msg_cat_cntr symbol
|
||||
AC_MSG_CHECKING([for _nl_msg_cat_cntr symbol])
|
||||
AC_TRY_LINK([#if HAVE_LIBINTL_H]
|
||||
@@ -223,18 +382,16 @@ AC_TRY_LINK([#if HAVE_LIBINTL_H]
|
||||
[extern int _nl_msg_cat_cntr;]
|
||||
[int tmp = _nl_msg_cat_cntr; exit(tmp);], have__nl_msg_cat_cntr=yes, have__nl_msg_cat_cntr=no)
|
||||
if test "$have__nl_msg_cat_cntr" = yes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE__NL_MSG_CAT_CNTR], [1],
|
||||
[Define to 1 if the _nl_msg_cat_cntr symbol is exported.])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
# Check if we have ncurses, and use it rather than curses if possible.
|
||||
AC_SEARCH_LIBS( setupterm, [ncurses curses], [ AC_MSG_NOTICE([Found curses implementation])], [AC_MSG_ERROR([Could not find a curses implementation, needed to build fish])] )
|
||||
|
||||
AC_CONFIG_FILES([Makefile fish.spec doc_src/fish.1 doc_src/Doxyfile etc/fish etc/fish_interactive.fish seq])
|
||||
# Tell the world what we know
|
||||
AC_CONFIG_FILES([Makefile fish.spec doc_src/fish.1 doc_src/Doxyfile etc/fish etc/fish_interactive.fish share/fish seq])
|
||||
AC_OUTPUT
|
||||
|
||||
echo "Now run 'make' and 'make install' to built and install fish."
|
||||
echo "Good luck!"
|
||||
echo "fish is now configured."
|
||||
echo "Use 'make' and 'make install' to built and install fish."
|
||||
|
||||
@@ -11,6 +11,22 @@ wildcarded values. The \c case statement is used together with the \c
|
||||
switch statement in order to determine which block should be
|
||||
performed.
|
||||
|
||||
Each \c case command is given one or more parameter. The first \c case
|
||||
command with a parameter that matches the string specified in the
|
||||
switch command will be evaluated. \c case parameters may contain
|
||||
wildcards. These need to be escaped or quoted in order to avoid
|
||||
regular wildcard expansion using filenames.
|
||||
|
||||
Note that fish does not fall through on case statements. Though the
|
||||
syntax may look a bit like C switch statements, it behaves more like
|
||||
the case stamantes of traditional shells.
|
||||
|
||||
Also note that command substitutions in a case statement will be
|
||||
evaluated even if it's body is not taken. This may seem
|
||||
counterintuitive at first, but it is unavoidable, since it would be
|
||||
impossible to know if a case command will evaluate to true before all
|
||||
forms of parameter expansion have been performed for the case command.
|
||||
|
||||
\subsection case-example Example
|
||||
|
||||
If the variable \$animal contains the name of an animal, the following
|
||||
@@ -27,9 +43,11 @@ switch $animal
|
||||
echo bird
|
||||
case shark trout stingray
|
||||
echo fish
|
||||
case '*'
|
||||
echo I have no idea what a $animal is
|
||||
end
|
||||
</pre>
|
||||
</p>
|
||||
<p>
|
||||
If the above code was run with \$animal set to \c whale, the output would be \c mammal.
|
||||
If the above code was run with \c \$animal set to \c whale, the output would be \c mammal.
|
||||
</p>
|
||||
|
||||
158
doc_src/doc.hdr
158
doc_src/doc.hdr
@@ -33,8 +33,9 @@ the manual page for the echo command by writing:
|
||||
|
||||
<code>man echo</code>
|
||||
|
||||
\c man is a command for displaying a manual page on a given
|
||||
topic. There are manual pages for almost every command on most
|
||||
\c man is a command for displaying a manual page on a given topic. The
|
||||
man command takes the name of the manual page to display as an
|
||||
argument. There are manual pages for almost every command on most
|
||||
computers. There are also manual pages for many other things, such as
|
||||
system libraries and important files.
|
||||
|
||||
@@ -60,6 +61,17 @@ Commands and parameters are separated by the space character
|
||||
the return key) or a semicolon (;). More than one command can be
|
||||
written on the same line by separating them with semicolons.
|
||||
|
||||
A switch is a very common special type of argument. Switches almost
|
||||
always start with one or more hyphens (-) and alter the way a command
|
||||
operates. For example, the \c ls command usually lists all the files
|
||||
and directories in the current working directory, but by using the \c
|
||||
-l switch, the behaviour of ls is changed to not only display the
|
||||
filename, but also the size, permissions, owner and modification time
|
||||
of each file. Switches differ between commands and are documented in
|
||||
the manual page for each command. Some switches are very common
|
||||
though, for example '--help' will usually display a help text, '-i'
|
||||
will often turn on interactive prompting before taking action, while
|
||||
'-f' will turn it off.
|
||||
|
||||
\subsection quotes Quotes
|
||||
|
||||
@@ -72,10 +84,11 @@ quoted string, <a href='#expand-variable'>variable expansion</a> still
|
||||
takes place. Other than that, a quoted parameter will not be parameter
|
||||
expanded, may contain spaces, and escape sequences are ignored. The
|
||||
only backslash escape accepted within single quotes is \\', which
|
||||
escapes a single quote. The only backslash escapes accepted within
|
||||
double quotes are \\", which escapes a double quote, and \\$, which
|
||||
escapes a dollar character. Single quotes have no special meaning
|
||||
withing double quotes and vice versa.
|
||||
escapes a single quote and \\\\, which escapes the backslash
|
||||
symbol. The only backslash escapes accepted within double quotes are
|
||||
\\", which escapes a double quote, \\$, which escapes a dollar
|
||||
character, and \\\\, which escapes the backslash symbol. Single quotes
|
||||
have no special meaning withing double quotes and vice versa.
|
||||
|
||||
Example:
|
||||
|
||||
@@ -199,7 +212,15 @@ When you start a job in \c fish, \c fish itself will pause, and give
|
||||
control of the terminal to the program just started. Sometimes, you
|
||||
want to continue using the commandline, and have the job run in the
|
||||
background. To create a background job, append a \& (ampersand) to
|
||||
your command. This will tell fish to run the job in the background.
|
||||
your command. This will tell fish to run the job in the
|
||||
background. Background jobs are very useful when running programs that
|
||||
have a graphical user interface.
|
||||
|
||||
Example:
|
||||
|
||||
<code>emacs \&</code>
|
||||
|
||||
will start the emacs text editor in the background.
|
||||
|
||||
\subsection syntax-job-control Job control
|
||||
|
||||
@@ -210,16 +231,17 @@ programs and do anything you want. If you then want to go back to the
|
||||
suspended command by using the <a href="builtins.html#fg">fg</a>
|
||||
command.
|
||||
|
||||
If you instead want to put a suspended job into the foreground, use
|
||||
the <a href="builtins.html#fg">fg</a> command.
|
||||
If you instead want to put a suspended job into the background, use
|
||||
the <a href="builtins.html#bg">bg</a> command.
|
||||
|
||||
To get a listing of all currently started jobs, use the <a
|
||||
href="builtins.html#jobs">jobs</a> command.
|
||||
|
||||
\subsection syntax-function Shellscript functions
|
||||
|
||||
Functions are used to group together commands and arguments
|
||||
using a single name. For example, the following is a function
|
||||
Functions are used to group together commands and arguments using a
|
||||
single name. It can also be used to start a specific command with
|
||||
additional arguments. For example, the following is a function
|
||||
definition that calls the command 'ls -l' to print a detailed listing
|
||||
of the contents of the current directory:
|
||||
|
||||
@@ -236,14 +258,14 @@ $argv</code> should be called when ll is invoked. $argv is an array
|
||||
variable, which always contains all arguments sent to the function. In
|
||||
the example above, these are simply passed on to the ls command. For
|
||||
more information on functions, see the documentation for the <a
|
||||
href='builtin.html#function'>function builtin</a>.
|
||||
href='builtin.html#function'>function</a> builtin.
|
||||
|
||||
Functions can be defined on the commandline or in a configuration
|
||||
file, but they can also be automatically loaded. Fish automatically
|
||||
searches through any directories in the array variable
|
||||
\$fish_function_path, and any functions defined are automatically
|
||||
loaded when needed. A function definition file must have a filename
|
||||
consisting of the name of the function and the suffix '.fish'.
|
||||
consisting of the name of the function plus the suffix '.fish'.
|
||||
|
||||
The default value for \$fish_function_path is ~/.fish.d/functions,
|
||||
/etc/fish.d/functions /usr/share/fish/functions. The exact path to the
|
||||
@@ -258,12 +280,13 @@ functions and the last one is for default fish functions.
|
||||
This is a short explanation of some of the commonly used words in fish.
|
||||
|
||||
- argument, a parameter given to a command
|
||||
- builtin, a command that is implemented in the shell
|
||||
- command, a program
|
||||
- function, a block of one or more fish commands that can be called as a single command. By using functions, it is possible to string together multiple smaller commands into one more advanced command.
|
||||
- builtin, a command that is implemented in the shell. Builtins are commands that are so closely tied to the shell that it is impossible to implement them as external commands.
|
||||
- command, a program that the shell can run.
|
||||
- function, a block of commands and arguments that can be called as if they where a single command. By using functions, it is possible to string together multiple smaller commands into one more advanced command.
|
||||
- job, a running pipeline or command
|
||||
- pipeline, a set of commands stringed together so that the output of one command is the input of the next command
|
||||
- redirection, a operation that changes one of the input/output streams associated with a job
|
||||
- switch, a special flag sent as an argument to a command that will alter the behavious of the command. A switch almost always begins with one or two hyphens.
|
||||
|
||||
\section help Help
|
||||
|
||||
@@ -450,22 +473,22 @@ personalized Japanese greeting.
|
||||
|
||||
The {$USER}san syntax might need a bit of an elaboration. Posix
|
||||
shells allow you to specify a variable name using '$VARNAME' or
|
||||
'${VARNAME}'. Fish only supports the former, but has no support
|
||||
whatsoever for the latter or anything remotely like it. So what is
|
||||
'{$VARNAME}' then? Well, '{WHATEVER}' is <a href='#brace'>brace
|
||||
expansion</a>, the same as supported by Posix shells, i.e. 'a{b,c}d'
|
||||
-> 'abd acd' works both in bash and on fish. So '{$VARNAME}' is a
|
||||
bracket-expansion with only a single element, i.e. it becomes
|
||||
expanded to '$VARNAME', which will be variable expanded to the value
|
||||
of the variable 'VARNAME'. So you might think that the brackets don't
|
||||
actually do anything, and that is nearly the truth. The snag is that
|
||||
there once along the way was a '}' in there somewhere, and } is not a
|
||||
valid character in a variable name. So anything after the otherwise
|
||||
pointless bracket expansion becomes NOT a part of the variable name,
|
||||
even if it happens to be a legal variable name character. That's why
|
||||
'{$USER}san' looks for the variable '$USER' and not for the variable
|
||||
'$USERsan'. It's a case of one syntax lending itself nicely to
|
||||
solving an unrelated problem in it's spare time.
|
||||
'${VARNAME}'. Fish supports the former, and has no support whatsoever
|
||||
for the latter or anything like it. So what is '{$VARNAME}' then?
|
||||
Well, '{WHATEVER}' is <a href='#brace'>brace expansion</a>, identical
|
||||
to that supported by Posix shells, i.e. 'a{b,c}d' -> 'abd acd' works
|
||||
both in bash and on fish. So '{$VARNAME}' is a bracket-expansion with
|
||||
only a single element, i.e. it becomes expanded to '$VARNAME', which
|
||||
will be variable expanded to the value of the variable 'VARNAME'. So
|
||||
you might think that the brackets don't actually do anything, and that
|
||||
is nearly the truth. The snag is that there once along the way was a
|
||||
'}' in there somewhere, and } is not a valid character in a variable
|
||||
name. So anything after the otherwise pointless bracket expansion
|
||||
becomes explicitly NOT a part of the variable name, even if it happens
|
||||
to be a legal variable name character. That's why '{$USER}san' looks
|
||||
for the variable '$USER' and not for the variable '$USERsan'. It's
|
||||
simply a case of one syntax lending itself nicely to solving an
|
||||
unrelated problem in it's spare time.
|
||||
|
||||
Variable expansion is the only type of expansion performed on double
|
||||
quoted strings. There is, however, an important difference in how
|
||||
@@ -479,6 +502,29 @@ result in exactly one argument. Undefined variables will expand to the
|
||||
empty string, and array variables will be concatenated using the space
|
||||
character.
|
||||
|
||||
There is one further notable feature of fish variable
|
||||
expansion. Consider the following code snippet:
|
||||
|
||||
<pre>
|
||||
set foo a b c
|
||||
set a 10; set b 20; set c 30
|
||||
for i in (seq (count $$foo))
|
||||
echo $$foo[$i]
|
||||
end
|
||||
# Output is:
|
||||
# 10
|
||||
# 20
|
||||
# 30
|
||||
</pre>
|
||||
|
||||
The above code demonstrates how to use multiple '$' symbols to expand
|
||||
the value of a variable as a variable name. One can simply think of
|
||||
the $-symbol as a variable dereference operator. When using this
|
||||
feature together with array brackets, the brackets will always match
|
||||
the innermost $ dereference. Thus, $$foo[5] will always mean the fift
|
||||
element of the foo variable should be dereferenced and never that the fift
|
||||
element of the doubly dereferenced variable foo. The latter can
|
||||
instead be expressed as $$foo[1][5].
|
||||
|
||||
\subsection expand-home Home directory expansion
|
||||
|
||||
@@ -1021,9 +1067,14 @@ where \c prompt_pwd is a shellscript function that displays a condensed version
|
||||
|
||||
\subsection title Programmable title
|
||||
|
||||
When running in a virtual terminal, the user define the \c fish_title
|
||||
function to print a custom titlebar message. The \c fish_title
|
||||
function is executed and the output is used as a titlebar message.
|
||||
When using most virtual terminals, it is possible to set the message
|
||||
displayed in the titlebar of the terminal window. This can be done
|
||||
automatically in fish by defining the \c fish_title function. The \c
|
||||
fish_title function is executed before and after a new command is
|
||||
executed or put into the foreground and the output is used as a
|
||||
titlebar message. The $_ environment variable will always contain the
|
||||
name of the job to be put into the foreground (Or 'fish' if control is
|
||||
returning to the shell) when the fish_prompt function is called.
|
||||
|
||||
Example:
|
||||
<p>
|
||||
@@ -1137,11 +1188,10 @@ href='fish-users@lists.sf.net'>fish-users@lists.sf.net</a>.
|
||||
\subsection todo-features Missing features
|
||||
|
||||
- Complete vi-mode key bindings
|
||||
- next-history-complete
|
||||
- More completions (for example xterm, vim,
|
||||
konsole, gnome-terminal, dcop, cdrecord, cron, xargs
|
||||
konsole, gnome-terminal, dcop, cron,
|
||||
rlogin, telnet, rsync, arch, finger, nice, locate,
|
||||
bibtex, patch, aspell, xpdf,
|
||||
bibtex, aspell, xpdf,
|
||||
compress, wine, xmms, dig, wine, batch, cron,
|
||||
g++, javac, java, gcj, lpr, doxygen, whois, find)
|
||||
- Undo support
|
||||
@@ -1150,6 +1200,7 @@ g++, javac, java, gcj, lpr, doxygen, whois, find)
|
||||
- Syntax highlighting should mark cd to non-existing directories as an error
|
||||
- wait shellscript
|
||||
- Signal handler to save the history file before exiting from a signal
|
||||
- Support for the screen clipboard
|
||||
|
||||
|
||||
\subsection todo-possible Possible features
|
||||
@@ -1168,16 +1219,16 @@ g++, javac, java, gcj, lpr, doxygen, whois, find)
|
||||
- Do not actually load/parse .fish_history, only mmap it and use some clever string handling. Should save ~150 kB of memory permanently, but is very hard to implement.
|
||||
- command specific wildcarding (use case * instead of case '*', etc.)
|
||||
- show the whole list of commands on using tab on an empty commandline
|
||||
- Automatically move cursor to the end of the current token before completing
|
||||
- Map variables. (export only the values. When expanding with no key specified, expand to all values.)
|
||||
- Descriptions for variables using 'set -d'.
|
||||
- Parse errors should when possible honor IO redirections
|
||||
- Support for writing strings like /u/l/b/foo and have them expand to /usr/local/bin/foo - perhaps through tab expansion
|
||||
|
||||
|
||||
\subsection bugs Known bugs
|
||||
|
||||
- Completion for gcc -\#\#\# option doesn't work.
|
||||
- Yanking weird characters from clipboard prints Unicode escapes
|
||||
- Yanking weird characters from the clipboard prints Unicode escapes
|
||||
- Suspending and then resuming pipelines containing a builtin is broken. How should this be handled?
|
||||
|
||||
If you think you have found a bug not described here, please send a
|
||||
@@ -1233,7 +1284,7 @@ Examples:
|
||||
|
||||
- Here documents are too similar to using echo inside of a pipeline.
|
||||
- Subshells, command substitution and process substitution are strongly related. \c fish only supports command substitution, the others can be achived either using a block or the psub shellscript function.
|
||||
- Having both aliases and functions is confusing, especially since both of them have limitations and problems. \c fish sunctions have none of the drawbacks of either syntax.
|
||||
- Having both aliases and functions is confusing, especially since both of them have limitations and problems. \c fish functions have none of the drawbacks of either syntax.
|
||||
- The many Posix quoting styles are silly, especially \$''.
|
||||
|
||||
|
||||
@@ -1326,14 +1377,14 @@ Examples:
|
||||
|
||||
\subsection disc The law of discoverability
|
||||
|
||||
The shell should implement it's features in a way that makes them as
|
||||
easy as possible for the user to discover for her/himself.
|
||||
A program should be designed to make its features as
|
||||
easy as possible to discover for the user.
|
||||
|
||||
Rationale:
|
||||
|
||||
A program whose features are discoverable makes a new user into an
|
||||
expert in a shorter span of time, since the user will learn how to use
|
||||
the program simply by using it.
|
||||
A program whose features are discoverable turns a new user into an
|
||||
expert in a shorter span of time, since the user will become an expert
|
||||
on the program simply by using it.
|
||||
|
||||
The main benefit of a graphical program over a command line-based
|
||||
program is discoverability. In a graphical program, one can discover
|
||||
@@ -1355,8 +1406,8 @@ Examples:
|
||||
/** \page license Licenses
|
||||
|
||||
Fish Copyright (C) 2005 Axel Liljencrantz. Fish is released under the
|
||||
GNU General Public License. The license agreement is included
|
||||
below.
|
||||
GNU General Public License, version 2. The license agreement is
|
||||
included below.
|
||||
|
||||
Fish contains code under the BSD license, namely versions of the
|
||||
two functions strlcat and strlcpy, modified for use with wide
|
||||
@@ -1365,11 +1416,16 @@ license agreement is included below.
|
||||
|
||||
The XSel command, written and copyrighted by Conrad Parker, is
|
||||
distributed together with, and used by fish. It is released under the MIT
|
||||
license. The license agreement is included below.
|
||||
license. The license agreement is included below.
|
||||
|
||||
The xdgmime library, written and copyrighted by Red Hat, Inc, is used
|
||||
by the mimedb command, which is a part of fish. It is released under
|
||||
the LGPL license. The license agreement is included below.
|
||||
the LGPL. The license agreement is included below.
|
||||
|
||||
Fish contains code from the glibc library, namely the wcstok
|
||||
function. This code is licensed under the LGPL. The license agreement
|
||||
is included below.
|
||||
|
||||
|
||||
<HR>
|
||||
|
||||
@@ -2407,4 +2463,4 @@ href='mailto:fish-users@lists.sf.net'>fish mailing list</a>, and
|
||||
hopefully this can be resolved.
|
||||
|
||||
|
||||
*/
|
||||
*/
|
||||
|
||||
@@ -8,10 +8,13 @@
|
||||
The <tt>read</tt> builtin causes fish to read one line from standard
|
||||
input and store the result in one or more environment variables.
|
||||
|
||||
- <tt>-c CMD</tt> or <tt>--command=CMD</tt> specifies that the initial string in the interactive mode command buffer should be CMD.
|
||||
- <tt>-e</tt> or <tt>--export</tt> specifies that the variables will be exported to subshells.
|
||||
- <tt>-g</tt> or <tt>--global</tt> specifies that the variables will be made global.
|
||||
- <tt>-pPROMPT_CMD</tt> or <tt>--prompt=PROMPT_CMD</tt> specifies that the output of the shell command PROMPT_CMD should be used as the prompt for the interactive mode prompt. The default prompt command is <tt>set_color green; echo read; set_color normal; echo "> "</tt>.
|
||||
- <tt>-cCMD</tt> or <tt>--command=CMD</tt> specifies that the initial string in the interactive mode command buffer should be CMD.
|
||||
- <tt>-p PROMPT_CMD</tt> or <tt>--prompt=PROMPT_CMD</tt> specifies that the output of the shell command PROMPT_CMD should be used as the prompt for the interactive mode prompt. The default prompt command is <tt>set_color green; echo read; set_color normal; echo "> "</tt>.
|
||||
- <code>-u</code> or <code>--unexport</code> causes the specified environment not to be exported to child processes
|
||||
- <code>-U</code> or <code>--universal</code> causes the specified environment variable to be made universal. If this option is supplied, the variable will be shared between all the current users fish instances on the current computer, and will be preserved across restarts of the shell.
|
||||
- <code>-x</code> or <code>--export</code> causes the specified environment variable to be exported to child processes
|
||||
|
||||
Read starts by reading a single line of input from stdin, the line is
|
||||
then tokenized using the <tt>IFS</tt> environment variable. Each variable
|
||||
|
||||
@@ -8,7 +8,19 @@
|
||||
|
||||
The \c switch statement is used to perform one of several blocks of
|
||||
commands depending on whether a specified value equals one of several
|
||||
wildcarded values.
|
||||
wildcarded values. The \c case statement is used together with the \c
|
||||
switch statement in order to determine which block should be
|
||||
performed.
|
||||
|
||||
Each \c case command is given one or more parameter. The first \c case
|
||||
command with a parameter that matches the string specified in the
|
||||
switch command will be evaluated. \c case parameters may contain
|
||||
wildcards. These need to be escaped or quoted in order to avoid
|
||||
regular wildcard expansion using filenames.
|
||||
|
||||
Note that fish does not fall through on case statements. Though the
|
||||
syntax may look a bit like C switch statements, it behaves more like
|
||||
the case stamantes of traditional shells.
|
||||
|
||||
\subsection switch-example Example
|
||||
|
||||
@@ -26,12 +38,14 @@ switch $animal
|
||||
echo bird
|
||||
case shark trout stingray
|
||||
echo fish
|
||||
case '*'
|
||||
echo I have no idea what a $animal is
|
||||
end
|
||||
</pre>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
If the above code was run with \$animal set to \c whale, the output
|
||||
If the above code was run with \c \$animal set to \c whale, the output
|
||||
would be \c mammal.
|
||||
|
||||
</p>
|
||||
|
||||
34
env.c
34
env.c
@@ -33,7 +33,10 @@
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "proc.h"
|
||||
#include "common.h"
|
||||
@@ -101,7 +104,7 @@ typedef struct env_node
|
||||
typedef struct var_entry
|
||||
{
|
||||
int export; /**< Whether the variable should be exported */
|
||||
wchar_t val[0]; /**< The value of the variable */
|
||||
wchar_t val[1]; /**< The value of the variable */
|
||||
}
|
||||
var_entry_t;
|
||||
|
||||
@@ -605,9 +608,9 @@ static env_node_t *env_get_node( const wchar_t *key )
|
||||
return 0;
|
||||
}
|
||||
|
||||
void env_set( const wchar_t *key,
|
||||
const wchar_t *val,
|
||||
int var_mode )
|
||||
int env_set( const wchar_t *key,
|
||||
const wchar_t *val,
|
||||
int var_mode )
|
||||
{
|
||||
int free_val = 0;
|
||||
var_entry_t *entry;
|
||||
@@ -623,7 +626,7 @@ void env_set( const wchar_t *key,
|
||||
if( (var_mode & ENV_USER ) &&
|
||||
hash_get( &env_read_only, key ) )
|
||||
{
|
||||
return;
|
||||
return ENV_PERM;
|
||||
}
|
||||
|
||||
if( wcscmp( key, L"umask" ) == 0)
|
||||
@@ -647,7 +650,7 @@ void env_set( const wchar_t *key,
|
||||
/*
|
||||
Do not actually create a umask variable, on env_get, it will be calculated dynamically
|
||||
*/
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -746,7 +749,7 @@ void env_set( const wchar_t *key,
|
||||
node = top;
|
||||
while( node->next && !node->new_scope )
|
||||
node = node->next;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -806,7 +809,8 @@ void env_set( const wchar_t *key,
|
||||
{
|
||||
handle_locale();
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -817,14 +821,19 @@ void env_set( const wchar_t *key,
|
||||
static int try_remove( env_node_t *n,
|
||||
const wchar_t *key )
|
||||
{
|
||||
const void *old_key_void, *old_val_void;
|
||||
wchar_t *old_key, *old_val;
|
||||
if( n == 0 )
|
||||
return 0;
|
||||
|
||||
hash_remove( &n->env,
|
||||
key,
|
||||
(const void **)&old_key,
|
||||
(const void **)&old_val );
|
||||
&old_key_void,
|
||||
&old_val_void );
|
||||
|
||||
old_key = (wchar_t *)old_key_void;
|
||||
old_val = (wchar_t *)old_val_void;
|
||||
|
||||
if( old_key != 0 )
|
||||
{
|
||||
var_entry_t * v = (var_entry_t *)old_val;
|
||||
@@ -889,7 +898,10 @@ wchar_t *env_get( const wchar_t *key )
|
||||
wchar_t *next = history_get( i-add_current );
|
||||
if( !next )
|
||||
{
|
||||
debug( 1, _( L"No history item at index %d\n" ), i );
|
||||
/*
|
||||
This is not an error - it simply means the user has
|
||||
a short history
|
||||
*/
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
13
env.h
13
env.h
@@ -41,6 +41,11 @@
|
||||
*/
|
||||
#define ENV_UNIVERSAL 32
|
||||
|
||||
/**
|
||||
Error code for trying to alter read-only variable
|
||||
*/
|
||||
#define ENV_PERM 1
|
||||
|
||||
/**
|
||||
Initialize environment variable data
|
||||
*/
|
||||
@@ -61,9 +66,15 @@ void env_destroy();
|
||||
\param val The value
|
||||
\param mode The type of the variable. Can be any combination of ENV_GLOBAL, ENV_LOCAL, ENV_EXPORT and ENV_USER. If mode is zero, the current variable space is searched and the current mode is used. If no current variable with the same name is found, ENV_LOCAL is assumed.
|
||||
|
||||
\returns 0 on suicess or an error code on failiure.
|
||||
|
||||
The current error codes are:
|
||||
|
||||
* ENV_PERM, can only be returned when setting as a user, e.g. ENV_USER is set. This means that the user tried to change a read-only variable.
|
||||
|
||||
*/
|
||||
|
||||
void env_set( const wchar_t *key,
|
||||
int env_set( const wchar_t *key,
|
||||
const wchar_t *val,
|
||||
int mode );
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "config.h"
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
@@ -26,7 +27,9 @@
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "wutil.h"
|
||||
#include "env_universal_common.h"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
@@ -27,7 +28,9 @@
|
||||
#include <signal.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "wutil.h"
|
||||
#include "env_universal_common.h"
|
||||
|
||||
57
etc/fish.in
57
etc/fish.in
@@ -4,11 +4,11 @@
|
||||
# @configure_input@
|
||||
|
||||
#
|
||||
# Set default search paths
|
||||
# Set default search paths for completions and shellscript functions
|
||||
#
|
||||
|
||||
set -g fish_function_path ~/.fish.d/functions @SYSCONFDIR@/fish.d/functions @DATADIR@/functions
|
||||
set -g fish_complete_path ~/.fish.d/completions @SYSCONFDIR@/fish.d/completions @DATADIR@/completions
|
||||
set -g fish_function_path ~/.fish.d/functions @SYSCONFDIR@/fish.d/functions @DATADIR@/fish/functions
|
||||
set -g fish_complete_path ~/.fish.d/completions @SYSCONFDIR@/fish.d/completions @DATADIR@/fish/completions
|
||||
|
||||
#
|
||||
# Set default field separators
|
||||
@@ -17,39 +17,40 @@ set -g fish_complete_path ~/.fish.d/completions @SYSCONFDIR@/fish.d/completions
|
||||
set -g IFS \ \t\n
|
||||
|
||||
#
|
||||
# Add a few common directories to path, if they exists. Note that pure
|
||||
# console programs like makedep sometimes live in /usr/X11R6/bin, so we
|
||||
# want this even for text-only terminals.
|
||||
# Some things should only be done for login terminals
|
||||
#
|
||||
|
||||
set -l path_list /bin /usr/bin /usr/X11R6/bin @PREFIX@/bin @optbindirs@
|
||||
if status --is-login
|
||||
|
||||
# Root should also have the sbin directories in the path
|
||||
if test "$USER" = root
|
||||
set path_list $path_list /sbin /usr/sbin /usr/local/sbin
|
||||
end
|
||||
#
|
||||
# Set some value for LANG if nothing was set before, and this is a
|
||||
# login shell.
|
||||
#
|
||||
|
||||
for i in $path_list
|
||||
if not expr "$PATH" : .\*$i.\* >/dev/null
|
||||
if test -d $i
|
||||
set PATH $PATH $i
|
||||
if not set -q LANG >/dev/null
|
||||
set -gx LANG en_US.UTF-8
|
||||
end
|
||||
|
||||
# Check for i18n information in
|
||||
# /etc/sysconfig/i18n
|
||||
|
||||
if test -f /etc/sysconfig/i18n
|
||||
eval (cat /etc/sysconfig/i18n |sed -ne 's/^\([a-zA-Z]*\)=\(.*\)$/set -gx \1 \2;/p')
|
||||
end
|
||||
|
||||
#
|
||||
# Put linux consoles in unicode mode.
|
||||
#
|
||||
|
||||
if expr "$LANG" : ".*\.[Uu][Tt][Ff].*" >/dev/null
|
||||
if test "$TERM" = linux
|
||||
if which unicode_start >/dev/null
|
||||
unicode_start
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
#
|
||||
# Put linux console in unicode mode. Should this be done in any other
|
||||
# situation as well?
|
||||
#
|
||||
|
||||
if expr "$LANG" : ".*[Uu][Tt][Ff]" >/dev/null
|
||||
if test linux = "$TERM"
|
||||
unicode_start ^/dev/null
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
#
|
||||
# There are variables that contain colons that are not arrays. This
|
||||
# reverts them back to regular strings.
|
||||
|
||||
@@ -42,12 +42,15 @@ end
|
||||
|
||||
|
||||
#
|
||||
# Set various color values
|
||||
# Set various defaults using these throwaway functions
|
||||
#
|
||||
|
||||
function set_default -d "Set an exported universal variable, unless it has already been set"
|
||||
function set_default -d "Set an universal variable, unless it has already been set"
|
||||
if not set -q $argv[1]
|
||||
set -Ux -- $argv
|
||||
set -U -- $argv
|
||||
end
|
||||
if not set -q $argv[1]
|
||||
set -g -- $argv
|
||||
end
|
||||
end
|
||||
|
||||
@@ -55,6 +58,9 @@ function set_exported_default -d "Set an exported universal variable, unless it
|
||||
if not set -q $argv[1]
|
||||
set -Ux -- $argv
|
||||
end
|
||||
if not set -q $argv[1]
|
||||
set -gx -- $argv
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -79,7 +85,10 @@ set_default fish_pager_color_completion normal
|
||||
set_default fish_pager_color_description normal
|
||||
set_default fish_pager_color_progress cyan
|
||||
|
||||
#
|
||||
# Directory history colors
|
||||
#
|
||||
|
||||
set_default fish_color_history_current cyan
|
||||
|
||||
|
||||
@@ -90,7 +99,7 @@ set_default fish_color_history_current cyan
|
||||
set_default CDPATH . ~
|
||||
|
||||
#
|
||||
# Remove temporary functions
|
||||
# Remove temporary functions for setting default variable values
|
||||
#
|
||||
|
||||
functions -e set_exported_default
|
||||
|
||||
3
event.c
3
event.c
@@ -12,7 +12,10 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "function.h"
|
||||
#include "proc.h"
|
||||
|
||||
14
exec.c
14
exec.c
@@ -22,7 +22,10 @@
|
||||
#include <dirent.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "wutil.h"
|
||||
#include "proc.h"
|
||||
@@ -650,8 +653,6 @@ void exec( job_t *j )
|
||||
pid_t pid;
|
||||
int mypipe[2];
|
||||
sigset_t chldset;
|
||||
sigemptyset( &chldset );
|
||||
sigaddset( &chldset, SIGCHLD );
|
||||
int skip_fork;
|
||||
|
||||
io_data_t pipe_read, pipe_write;
|
||||
@@ -664,6 +665,11 @@ void exec( job_t *j )
|
||||
*/
|
||||
int exec_error=0;
|
||||
|
||||
if( no_exec )
|
||||
return;
|
||||
|
||||
sigemptyset( &chldset );
|
||||
sigaddset( &chldset, SIGCHLD );
|
||||
|
||||
debug( 4, L"Exec job '%ls' with id %d", j->command, j->job_id );
|
||||
|
||||
@@ -1203,14 +1209,12 @@ void exec( job_t *j )
|
||||
{
|
||||
proc_last_bg_pid = j->pgid;
|
||||
}
|
||||
|
||||
|
||||
if( !exec_error )
|
||||
{
|
||||
job_continue (j, 0);
|
||||
}
|
||||
|
||||
debug( 3, L"End of exec()" );
|
||||
|
||||
}
|
||||
|
||||
int exec_subshell( const wchar_t *cmd,
|
||||
|
||||
31
expand.c
31
expand.c
@@ -27,7 +27,10 @@ parameter expansion.
|
||||
#endif
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "wutil.h"
|
||||
#include "env.h"
|
||||
@@ -426,7 +429,6 @@ static int find_process( const wchar_t *proc,
|
||||
{
|
||||
result = malloc(sizeof(wchar_t)*16 );
|
||||
swprintf( result, 16, L"%d", j->pgid );
|
||||
//fwprintf( stderr, L"pid %d %ls\n", j->pgid, result );
|
||||
al_push( out, result );
|
||||
found = 1;
|
||||
}
|
||||
@@ -438,12 +440,9 @@ static int find_process( const wchar_t *proc,
|
||||
|
||||
for( j=first_job; j != 0; j=j->next )
|
||||
{
|
||||
// fwprintf( stderr, L"..." );
|
||||
if( j->command == 0 )
|
||||
continue;
|
||||
|
||||
// fwprintf( stderr, L"match '%ls' '%ls'\n\n\n", j->command, proc );
|
||||
|
||||
if( match_pid( j->command, proc, flags ) )
|
||||
{
|
||||
if( flags & ACCEPT_INCOMPLETE )
|
||||
@@ -452,8 +451,6 @@ static int find_process( const wchar_t *proc,
|
||||
COMPLETE_SEP_STR,
|
||||
COMPLETE_JOB_DESC,
|
||||
(void *)0 );
|
||||
// fwprintf( stderr, L"Woot %ls\n", res );
|
||||
|
||||
al_push( out, res );
|
||||
}
|
||||
else
|
||||
@@ -479,12 +476,9 @@ static int find_process( const wchar_t *proc,
|
||||
for( p=j->first_process; p; p=p->next )
|
||||
{
|
||||
|
||||
// fwprintf( stderr, L"..." );
|
||||
if( p->actual_cmd == 0 )
|
||||
continue;
|
||||
|
||||
// fwprintf( stderr, L"match '%ls' '%ls'\n\n\n", j->command, proc );
|
||||
|
||||
if( match_pid( p->actual_cmd, proc, flags ) )
|
||||
{
|
||||
if( flags & ACCEPT_INCOMPLETE )
|
||||
@@ -684,27 +678,22 @@ static int expand_pid( wchar_t *in,
|
||||
}
|
||||
}
|
||||
|
||||
// fwprintf( stderr, L"expand_pid() %ls\n", in );
|
||||
int prev = al_get_count( out );
|
||||
if( !find_process( in+1, flags, out ) )
|
||||
return 0;
|
||||
|
||||
if( prev == al_get_count( out ) )
|
||||
{
|
||||
// fwprintf( stderr, L"no match\n" );
|
||||
|
||||
if( flags & ACCEPT_INCOMPLETE )
|
||||
free( in );
|
||||
else
|
||||
{
|
||||
*in = L'%';
|
||||
// fwprintf( stderr, L"return %ls\n", in );
|
||||
al_push( out, in );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// fwprintf( stderr, L"match\n" );
|
||||
free( in );
|
||||
}
|
||||
|
||||
@@ -964,7 +953,7 @@ static int expand_variables( wchar_t *in, array_list_t *out, int last_idx )
|
||||
else
|
||||
{
|
||||
|
||||
wcsncpy( new_in, in, start_pos-1 );
|
||||
wcslcpy( new_in, in, start_pos );
|
||||
|
||||
if(start_pos>1 && new_in[start_pos-2]!=VARIABLE_EXPAND)
|
||||
{
|
||||
@@ -977,7 +966,6 @@ static int expand_variables( wchar_t *in, array_list_t *out, int last_idx )
|
||||
wcscat( new_in, next );
|
||||
wcscat( new_in, &in[stop_pos] );
|
||||
|
||||
// fwprintf( stderr, L"New value %ls\n", new_in );
|
||||
is_ok &= expand_variables( new_in, out, i );
|
||||
}
|
||||
}
|
||||
@@ -1056,9 +1044,6 @@ static int expand_brackets( wchar_t *in, int flags, array_list_t *out )
|
||||
wchar_t *item_begin;
|
||||
int len1, len2, tot_len;
|
||||
|
||||
// fwprintf( stderr, L"expand %ls\n", in );
|
||||
|
||||
|
||||
for( pos=in;
|
||||
(!bracket_end) && (*pos) && !syntax_error;
|
||||
pos++ )
|
||||
@@ -1150,8 +1135,8 @@ static int expand_brackets( wchar_t *in, int flags, array_list_t *out )
|
||||
int item_len = pos-item_begin;
|
||||
|
||||
whole_item = malloc( sizeof(wchar_t)*(tot_len + item_len + 1) );
|
||||
wcsncpy( whole_item, in, len1 );
|
||||
wcsncpy( whole_item+len1, item_begin, item_len );
|
||||
wcslcpy( whole_item, in, len1+1 );
|
||||
wcslcpy( whole_item+len1, item_begin, item_len+1 );
|
||||
wcscpy( whole_item+len1+item_len, bracket_end+1 );
|
||||
|
||||
expand_brackets( whole_item, flags, out );
|
||||
@@ -1231,7 +1216,7 @@ static int expand_subshell( wchar_t *in, array_list_t *out )
|
||||
return 0;
|
||||
}
|
||||
|
||||
wcsncpy( subcmd, paran_begin+1, paran_end-paran_begin-1 );
|
||||
wcslcpy( subcmd, paran_begin+1, paran_end-paran_begin );
|
||||
subcmd[ paran_end-paran_begin-1]=0;
|
||||
|
||||
if( exec_subshell( subcmd, &sub_res)==-1 )
|
||||
@@ -1307,7 +1292,6 @@ static wchar_t * expand_tilde_internal( wchar_t *in )
|
||||
wchar_t *new_in=0;
|
||||
wchar_t *old_in=0;
|
||||
|
||||
// fwprintf( stderr, L"Tilde expand ~%ls\n", (*ptr)+1 );
|
||||
if( in[1] == '/' || in[1] == '\0' )
|
||||
{
|
||||
/* Current users home directory */
|
||||
@@ -1436,7 +1420,6 @@ int expand_string( void *context,
|
||||
|
||||
// debug( 1, L"Expand %ls", str );
|
||||
|
||||
|
||||
if( (!(flags & ACCEPT_INCOMPLETE)) && is_clean( str ) )
|
||||
{
|
||||
halloc_register( context, str );
|
||||
|
||||
999
fallback.c
Normal file
999
fallback.c
Normal file
@@ -0,0 +1,999 @@
|
||||
/**
|
||||
This file only contains fallback implementations of functions which
|
||||
have been found to be missing or broken by the configuration
|
||||
scripts.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <wchar.h>
|
||||
#include <wctype.h>
|
||||
#include <string.h>
|
||||
#include <dirent.h>
|
||||
#include <stdarg.h>
|
||||
#include <limits.h>
|
||||
|
||||
#if HAVE_NCURSES_H
|
||||
#include <ncurses.h>
|
||||
#else
|
||||
#include <curses.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_TERMIO_H
|
||||
#include <termio.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_TERM_H
|
||||
#include <term.h>
|
||||
#elif HAVE_NCURSES_TERM_H
|
||||
#include <ncurses/term.h>
|
||||
#endif
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
|
||||
#ifdef TPUTS_KLUDGE
|
||||
|
||||
int tputs(const char *str, int affcnt, int (*fish_putc)(tputs_arg_t))
|
||||
{
|
||||
while( *str )
|
||||
{
|
||||
fish_putc( *str++ );
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef HAVE_FWPRINTF
|
||||
#define INTERNAL_FWPRINTF 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BROKEN_FWPRINTF
|
||||
#define INTERNAL_FWPRINTF 1
|
||||
#endif
|
||||
|
||||
#ifdef INTERNAL_FWPRINTF
|
||||
|
||||
void pad( void (*writer)(wchar_t), int count)
|
||||
{
|
||||
|
||||
int i;
|
||||
if( count < 0 )
|
||||
return;
|
||||
|
||||
for( i=0; i<count; i++ )
|
||||
{
|
||||
writer( L' ' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Generic formatting function. All other string formatting functions
|
||||
are secretly a wrapper around this function. vgprintf does not
|
||||
implement all the filters supported by printf, only those that are
|
||||
currently used by fish. vgprintf internally uses snprintf to
|
||||
implement the number outputs, such as %f and %x.
|
||||
|
||||
Currently supported functionality:
|
||||
|
||||
- precision specification, both through .* and .N
|
||||
- Padding through * and N
|
||||
- Right padding using the - prefix
|
||||
- long versions of all filters thorugh l and ll prefix
|
||||
- Character output using %c
|
||||
- String output through %s
|
||||
- Floating point number output through %f
|
||||
- Integer output through %d, %i, %u, %o, %x and %X
|
||||
|
||||
For a full description on the usage of *printf, see use 'man 3 printf'.
|
||||
*/
|
||||
static int vgwprintf( void (*writer)(wchar_t),
|
||||
const wchar_t *filter,
|
||||
va_list va )
|
||||
{
|
||||
const wchar_t *filter_org=filter;
|
||||
int count=0;
|
||||
|
||||
for( ;*filter; filter++)
|
||||
{
|
||||
if(*filter == L'%')
|
||||
{
|
||||
int is_long=0;
|
||||
int width = -1;
|
||||
filter++;
|
||||
int loop=1;
|
||||
int precision=-1;
|
||||
int pad_left = 1;
|
||||
|
||||
if( iswdigit( *filter ) )
|
||||
{
|
||||
width=0;
|
||||
while( (*filter >= L'0') && (*filter <= L'9'))
|
||||
{
|
||||
width=10*width+(*filter++ - L'0');
|
||||
}
|
||||
}
|
||||
|
||||
while( loop )
|
||||
{
|
||||
|
||||
switch(*filter)
|
||||
{
|
||||
case L'l':
|
||||
/* Long variable */
|
||||
is_long++;
|
||||
filter++;
|
||||
break;
|
||||
|
||||
case L'*':
|
||||
/* Set minimum field width */
|
||||
width = va_arg( va, int );
|
||||
filter++;
|
||||
break;
|
||||
|
||||
case L'-':
|
||||
filter++;
|
||||
pad_left=0;
|
||||
break;
|
||||
|
||||
case L'.':
|
||||
/*
|
||||
Set precision.
|
||||
*/
|
||||
filter++;
|
||||
if( *filter == L'*' )
|
||||
{
|
||||
precision = va_arg( va, int );
|
||||
}
|
||||
else
|
||||
{
|
||||
precision=0;
|
||||
while( (*filter >= L'0') && (*filter <= L'9'))
|
||||
{
|
||||
precision=10*precision+(*filter++ - L'0');
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
loop=0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch( *filter )
|
||||
{
|
||||
case L'c':
|
||||
{
|
||||
wchar_t c;
|
||||
|
||||
if( (width >= 0) && pad_left )
|
||||
{
|
||||
pad( writer, width-1 );
|
||||
count += maxi( width-1, 0 );
|
||||
}
|
||||
|
||||
c = is_long?va_arg(va, wint_t):btowc(va_arg(va, int));
|
||||
if( precision != 0 )
|
||||
writer( c );
|
||||
|
||||
|
||||
if( (width >= 0) && !pad_left )
|
||||
{
|
||||
pad( writer, width-1 );
|
||||
count += maxi( width-1, 0 );
|
||||
}
|
||||
|
||||
count++;
|
||||
|
||||
break;
|
||||
}
|
||||
case L's':
|
||||
{
|
||||
|
||||
wchar_t *ss=0;
|
||||
if( is_long )
|
||||
{
|
||||
ss = va_arg(va, wchar_t *);
|
||||
}
|
||||
else
|
||||
{
|
||||
char *ns = va_arg(va, char*);
|
||||
|
||||
if( ns )
|
||||
{
|
||||
ss = str2wcs( ns );
|
||||
}
|
||||
}
|
||||
|
||||
if( !ss )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
if( (width >= 0) && pad_left )
|
||||
{
|
||||
pad( writer, width-wcslen(ss) );
|
||||
count += maxi(width-wcslen(ss), 0);
|
||||
}
|
||||
|
||||
wchar_t *s=ss;
|
||||
int precount = count;
|
||||
|
||||
while( *s )
|
||||
{
|
||||
if( (precision > 0) && (precision <= (count-precount) ) )
|
||||
break;
|
||||
|
||||
writer( *(s++) );
|
||||
count++;
|
||||
}
|
||||
|
||||
if( (width >= 0) && !pad_left )
|
||||
{
|
||||
pad( writer, width-wcslen(ss) );
|
||||
count += maxi( width-wcslen(ss), 0 );
|
||||
}
|
||||
|
||||
if( !is_long )
|
||||
free( ss );
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case L'd':
|
||||
case L'i':
|
||||
case L'o':
|
||||
case L'u':
|
||||
case L'x':
|
||||
case L'X':
|
||||
{
|
||||
char str[33];
|
||||
char *pos;
|
||||
char format[16];
|
||||
int len;
|
||||
|
||||
format[0]=0;
|
||||
strcat( format, "%");
|
||||
if( precision >= 0 )
|
||||
strcat( format, ".*" );
|
||||
switch( is_long )
|
||||
{
|
||||
case 2:
|
||||
strcat( format, "ll" );
|
||||
break;
|
||||
case 1:
|
||||
strcat( format, "l" );
|
||||
break;
|
||||
}
|
||||
|
||||
len = strlen(format);
|
||||
format[len++]=(char)*filter;
|
||||
format[len]=0;
|
||||
|
||||
switch( *filter )
|
||||
{
|
||||
case L'd':
|
||||
case L'i':
|
||||
{
|
||||
|
||||
switch( is_long )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
int d = va_arg( va, int );
|
||||
if( precision >= 0 )
|
||||
snprintf( str, 32, format, precision, d );
|
||||
else
|
||||
snprintf( str, 32, format, d );
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 1:
|
||||
{
|
||||
long d = va_arg( va, long );
|
||||
if( precision >= 0 )
|
||||
snprintf( str, 32, format, precision, d );
|
||||
else
|
||||
snprintf( str, 32, format, d );
|
||||
break;
|
||||
}
|
||||
|
||||
case 2:
|
||||
{
|
||||
long long d = va_arg( va, long long );
|
||||
if( precision >= 0 )
|
||||
snprintf( str, 32, format, precision, d );
|
||||
else
|
||||
snprintf( str, 32, format, d );
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
debug( 0, L"Invalid length modifier in string %ls\n", filter_org );
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
case L'u':
|
||||
case L'o':
|
||||
case L'x':
|
||||
case L'X':
|
||||
{
|
||||
|
||||
switch( is_long )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
unsigned d = va_arg( va, unsigned );
|
||||
if( precision >= 0 )
|
||||
snprintf( str, 32, format, precision, d );
|
||||
else
|
||||
snprintf( str, 32, format, d );
|
||||
break;
|
||||
}
|
||||
|
||||
case 1:
|
||||
{
|
||||
unsigned long d = va_arg( va, unsigned long );
|
||||
if( precision >= 0 )
|
||||
snprintf( str, 32, format, precision, d );
|
||||
else
|
||||
snprintf( str, 32, format, d );
|
||||
break;
|
||||
}
|
||||
|
||||
case 2:
|
||||
{
|
||||
unsigned long long d = va_arg( va, unsigned long long );
|
||||
if( precision >= 0 )
|
||||
snprintf( str, 32, format, precision, d );
|
||||
else
|
||||
snprintf( str, 32, format, d );
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
debug( 0, L"Invalid length modifier in string %ls\n", filter_org );
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
default:
|
||||
debug( 0, L"Invalid filter %ls in string %ls\n", *filter, filter_org );
|
||||
return -1;
|
||||
|
||||
}
|
||||
|
||||
if( (width >= 0) && pad_left )
|
||||
{
|
||||
int l = maxi(width-strlen(str), 0 );
|
||||
pad( writer, l );
|
||||
count += l;
|
||||
}
|
||||
|
||||
pos = str;
|
||||
|
||||
while( *pos )
|
||||
{
|
||||
writer( *(pos++) );
|
||||
count++;
|
||||
}
|
||||
|
||||
if( (width >= 0) && !pad_left )
|
||||
{
|
||||
int l = maxi(width-strlen(str), 0 );
|
||||
pad( writer, l );
|
||||
count += l;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case L'f':
|
||||
{
|
||||
char str[32];
|
||||
char *pos;
|
||||
double val = va_arg( va, double );
|
||||
|
||||
if( precision>= 0 )
|
||||
{
|
||||
if( width>= 0 )
|
||||
{
|
||||
snprintf( str, 32, "%*.*f", width, precision, val );
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf( str, 32, "%.*f", precision, val );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( width>= 0 )
|
||||
{
|
||||
snprintf( str, 32, "%*f", width, val );
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf( str, 32, "%f", val );
|
||||
}
|
||||
}
|
||||
|
||||
pos = str;
|
||||
|
||||
while( *pos )
|
||||
{
|
||||
writer( *(pos++) );
|
||||
count++;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case L'n':
|
||||
{
|
||||
int *n = va_arg( va, int *);
|
||||
|
||||
*n = count;
|
||||
break;
|
||||
}
|
||||
case L'%':
|
||||
{
|
||||
writer('%');
|
||||
count++;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
debug( 0, L"Unknown switch %lc in string %ls\n", *filter, filter_org );
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
writer( *filter );
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
Holds data for swprintf writer
|
||||
*/
|
||||
static struct
|
||||
{
|
||||
int count;
|
||||
int max;
|
||||
wchar_t *pos;
|
||||
}
|
||||
sw_data;
|
||||
|
||||
/**
|
||||
Writers for string output
|
||||
*/
|
||||
static void sw_writer( wchar_t c )
|
||||
{
|
||||
if( sw_data.count < sw_data.max )
|
||||
*(sw_data.pos++)=c;
|
||||
sw_data.count++;
|
||||
}
|
||||
|
||||
int vswprintf( wchar_t *out, size_t n, const wchar_t *filter, va_list va )
|
||||
{
|
||||
int written;
|
||||
|
||||
sw_data.pos=out;
|
||||
sw_data.max=n;
|
||||
sw_data.count=0;
|
||||
written=vgwprintf( &sw_writer,
|
||||
filter,
|
||||
va );
|
||||
if( written < n )
|
||||
{
|
||||
*sw_data.pos = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
written=-1;
|
||||
}
|
||||
|
||||
return written;
|
||||
}
|
||||
|
||||
int swprintf( wchar_t *out, size_t n, const wchar_t *filter, ... )
|
||||
{
|
||||
va_list va;
|
||||
int written;
|
||||
|
||||
va_start( va, filter );
|
||||
written = vswprintf( out, n, filter, va );
|
||||
va_end( va );
|
||||
return written;
|
||||
}
|
||||
|
||||
/**
|
||||
Holds auxiliary data for fwprintf and wprintf writer
|
||||
*/
|
||||
static FILE *fw_data;
|
||||
|
||||
static void fw_writer( wchar_t c )
|
||||
{
|
||||
putwc( c, fw_data );
|
||||
}
|
||||
|
||||
/*
|
||||
Writers for file output
|
||||
*/
|
||||
int vfwprintf( FILE *f, const wchar_t *filter, va_list va )
|
||||
{
|
||||
fw_data = f;
|
||||
return vgwprintf( &fw_writer, filter, va );
|
||||
}
|
||||
|
||||
int fwprintf( FILE *f, const wchar_t *filter, ... )
|
||||
{
|
||||
va_list va;
|
||||
int written;
|
||||
|
||||
va_start( va, filter );
|
||||
written = vfwprintf( f, filter, va );
|
||||
va_end( va );
|
||||
return written;
|
||||
}
|
||||
|
||||
int vwprintf( const wchar_t *filter, va_list va )
|
||||
{
|
||||
return vfwprintf( stdout, filter, va );
|
||||
}
|
||||
|
||||
int wprintf( const wchar_t *filter, ... )
|
||||
{
|
||||
va_list va;
|
||||
int written;
|
||||
|
||||
va_start( va, filter );
|
||||
written=vwprintf( filter, va );
|
||||
va_end( va );
|
||||
return written;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_FGETWC
|
||||
|
||||
wint_t fgetwc(FILE *stream)
|
||||
{
|
||||
wchar_t res=0;
|
||||
mbstate_t state;
|
||||
memset (&state, '\0', sizeof (state));
|
||||
|
||||
while(1)
|
||||
{
|
||||
int b = fgetc( stream );
|
||||
char bb;
|
||||
|
||||
int sz;
|
||||
|
||||
if( b == EOF )
|
||||
return WEOF;
|
||||
|
||||
bb=b;
|
||||
|
||||
sz = mbrtowc( &res, &bb, 1, &state );
|
||||
|
||||
switch( sz )
|
||||
{
|
||||
case -1:
|
||||
memset (&state, '\0', sizeof (state));
|
||||
return WEOF;
|
||||
|
||||
case -2:
|
||||
break;
|
||||
case 0:
|
||||
return 0;
|
||||
default:
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
wint_t getwc(FILE *stream)
|
||||
{
|
||||
return fgetwc( stream );
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_FPUTWC
|
||||
|
||||
wint_t fputwc(wchar_t wc, FILE *stream)
|
||||
{
|
||||
int res;
|
||||
char s[MB_CUR_MAX+1];
|
||||
memset( s, 0, MB_CUR_MAX+1 );
|
||||
wctomb( s, wc );
|
||||
res = fputs( s, stream );
|
||||
return res==EOF?WEOF:wc;
|
||||
}
|
||||
|
||||
wint_t putwc(wchar_t wc, FILE *stream)
|
||||
{
|
||||
return fputwc( wc, stream );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_WCSTOK
|
||||
|
||||
/*
|
||||
Used by fallback wcstok. Borrowed from glibc
|
||||
*/
|
||||
static size_t fish_wcsspn (const wchar_t *wcs,
|
||||
const wchar_t *accept )
|
||||
{
|
||||
register const wchar_t *p;
|
||||
register const wchar_t *a;
|
||||
register size_t count = 0;
|
||||
|
||||
for (p = wcs; *p != L'\0'; ++p)
|
||||
{
|
||||
for (a = accept; *a != L'\0'; ++a)
|
||||
if (*p == *a)
|
||||
break;
|
||||
|
||||
if (*a == L'\0')
|
||||
return count;
|
||||
else
|
||||
++count;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
/*
|
||||
Used by fallback wcstok. Borrowed from glibc
|
||||
*/
|
||||
static wchar_t *fish_wcspbrk (const wchar_t *wcs, const wchar_t *accept)
|
||||
{
|
||||
while (*wcs != L'\0')
|
||||
if (wcschr (accept, *wcs) == NULL)
|
||||
++wcs;
|
||||
else
|
||||
return (wchar_t *) wcs;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
Fallback wcstok implementation. Borrowed from glibc.
|
||||
*/
|
||||
wchar_t *wcstok(wchar_t *wcs, const wchar_t *delim, wchar_t **save_ptr)
|
||||
{
|
||||
wchar_t *result;
|
||||
|
||||
if (wcs == NULL)
|
||||
{
|
||||
if (*save_ptr == NULL)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
wcs = *save_ptr;
|
||||
}
|
||||
|
||||
/* Scan leading delimiters. */
|
||||
wcs += fish_wcsspn (wcs, delim);
|
||||
|
||||
if (*wcs == L'\0')
|
||||
{
|
||||
*save_ptr = NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Find the end of the token. */
|
||||
result = wcs;
|
||||
|
||||
wcs = fish_wcspbrk (result, delim);
|
||||
|
||||
if (wcs == NULL)
|
||||
{
|
||||
/* This token finishes the string. */
|
||||
*save_ptr = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Terminate the token and make *SAVE_PTR point past it. */
|
||||
*wcs = L'\0';
|
||||
*save_ptr = wcs + 1;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_WCSDUP
|
||||
wchar_t *wcsdup( const wchar_t *in )
|
||||
{
|
||||
size_t len=wcslen(in);
|
||||
wchar_t *out = malloc( sizeof( wchar_t)*(len+1));
|
||||
if( out == 0 )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
memcpy( out, in, sizeof( wchar_t)*(len+1));
|
||||
return out;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_WCSLEN
|
||||
size_t wcslen(const wchar_t *in)
|
||||
{
|
||||
const wchar_t *end=in;
|
||||
while( *end )
|
||||
end++;
|
||||
return end-in;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef HAVE_WCSCASECMP
|
||||
int wcscasecmp( const wchar_t *a, const wchar_t *b )
|
||||
{
|
||||
if( *a == 0 )
|
||||
{
|
||||
return (*b==0)?0:-1;
|
||||
}
|
||||
else if( *b == 0 )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
int diff = towlower(*a)-towlower(*b);
|
||||
if( diff != 0 )
|
||||
return diff;
|
||||
else
|
||||
return wcscasecmp( a+1,b+1);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef HAVE_WCSNCASECMP
|
||||
int wcsncasecmp( const wchar_t *a, const wchar_t *b, int count )
|
||||
{
|
||||
if( count == 0 )
|
||||
return 0;
|
||||
|
||||
if( *a == 0 )
|
||||
{
|
||||
return (*b==0)?0:-1;
|
||||
}
|
||||
else if( *b == 0 )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
int diff = towlower(*a)-towlower(*b);
|
||||
if( diff != 0 )
|
||||
return diff;
|
||||
else
|
||||
return wcsncasecmp( a+1,b+1, count-1);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_WCWIDTH
|
||||
int wcwidth( wchar_t c )
|
||||
{
|
||||
if( c < 32 )
|
||||
return 0;
|
||||
if ( c == 127 )
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_WCSNDUP
|
||||
wchar_t *wcsndup( const wchar_t *in, int c )
|
||||
{
|
||||
wchar_t *res = malloc( sizeof(wchar_t)*(c+1) );
|
||||
if( res == 0 )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
wcslcpy( res, in, c+1 );
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
long convert_digit( wchar_t d, int base )
|
||||
{
|
||||
long res=-1;
|
||||
if( (d <= L'9') && (d >= L'0') )
|
||||
{
|
||||
res = d - L'0';
|
||||
}
|
||||
else if( (d <= L'z') && (d >= L'a') )
|
||||
{
|
||||
res = d + 10 - L'a';
|
||||
}
|
||||
else if( (d <= L'Z') && (d >= L'A') )
|
||||
{
|
||||
res = d + 10 - L'A';
|
||||
}
|
||||
if( res >= base )
|
||||
{
|
||||
res = -1;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
#ifndef HAVE_WCSTOL
|
||||
long wcstol(const wchar_t *nptr,
|
||||
wchar_t **endptr,
|
||||
int base)
|
||||
{
|
||||
long long res=0;
|
||||
int is_set=0;
|
||||
if( base > 36 )
|
||||
{
|
||||
errno = EINVAL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
while( 1 )
|
||||
{
|
||||
long nxt = convert_digit( *nptr, base );
|
||||
if( endptr != 0 )
|
||||
*endptr = (wchar_t *)nptr;
|
||||
if( nxt < 0 )
|
||||
{
|
||||
if( !is_set )
|
||||
{
|
||||
errno = EINVAL;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
res = (res*base)+nxt;
|
||||
is_set = 1;
|
||||
if( res > LONG_MAX )
|
||||
{
|
||||
errno = ERANGE;
|
||||
return LONG_MAX;
|
||||
}
|
||||
if( res < LONG_MIN )
|
||||
{
|
||||
errno = ERANGE;
|
||||
return LONG_MIN;
|
||||
}
|
||||
nptr++;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifndef HAVE_WCSLCAT
|
||||
|
||||
/*$OpenBSD: strlcat.c,v 1.11 2003/06/17 21:56:24 millert Exp $*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
size_t
|
||||
wcslcat(wchar_t *dst, const wchar_t *src, size_t siz)
|
||||
{
|
||||
|
||||
register wchar_t *d = dst;
|
||||
register const wchar_t *s = src;
|
||||
register size_t n = siz;
|
||||
size_t dlen;
|
||||
|
||||
/* Find the end of dst and adjust bytes left but don't go past end */
|
||||
while (n-- != 0 && *d != '\0')
|
||||
d++;
|
||||
|
||||
dlen = d - dst;
|
||||
n = siz - dlen;
|
||||
|
||||
if (n == 0)
|
||||
return(dlen + wcslen(s));
|
||||
|
||||
while (*s != '\0')
|
||||
{
|
||||
if (n != 1)
|
||||
{
|
||||
*d++ = *s;
|
||||
n--;
|
||||
}
|
||||
s++;
|
||||
}
|
||||
*d = '\0';
|
||||
|
||||
return(dlen + (s - src));
|
||||
/* count does not include NUL */
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifndef HAVE_WCSLCPY
|
||||
|
||||
/*$OpenBSD: strlcpy.c,v 1.8 2003/06/17 21:56:24 millert Exp $*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
size_t
|
||||
wcslcpy(wchar_t *dst, const wchar_t *src, size_t siz)
|
||||
{
|
||||
register wchar_t *d = dst;
|
||||
register const wchar_t *s = src;
|
||||
register size_t n = siz;
|
||||
|
||||
/* Copy as many bytes as will fit */
|
||||
if (n != 0 && --n != 0)
|
||||
{
|
||||
do
|
||||
{
|
||||
if ((*d++ = *s++) == 0)
|
||||
break;
|
||||
}
|
||||
while (--n != 0);
|
||||
}
|
||||
|
||||
/* Not enough room in dst, add NUL and traverse rest of src */
|
||||
if (n == 0)
|
||||
{
|
||||
if (siz != 0)
|
||||
*d = '\0';
|
||||
/* NUL-terminate dst */
|
||||
while (*s++)
|
||||
;
|
||||
}
|
||||
return(s - src - 1);
|
||||
/* count does not include NUL */
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
265
fallback.h
Normal file
265
fallback.h
Normal file
@@ -0,0 +1,265 @@
|
||||
|
||||
#ifndef FISH_FALLBACK_H
|
||||
#define FISH_FALLBACK_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <wctype.h>
|
||||
#include <wchar.h>
|
||||
#include "common.h"
|
||||
|
||||
/**
|
||||
Under curses, tputs expects an int (*func)(char) as its last
|
||||
parameter, but in ncurses, tputs expects a int (*func)(int) as its
|
||||
last parameter. tputs_arg_t is defined to always be what tputs
|
||||
expects. Hopefully.
|
||||
*/
|
||||
|
||||
#ifdef NCURSES_VERSION
|
||||
typedef int tputs_arg_t;
|
||||
#else
|
||||
typedef char tputs_arg_t;
|
||||
#endif
|
||||
|
||||
#ifdef TPUTS_KLUDGE
|
||||
|
||||
/**
|
||||
Linux on PPC seems to have a tputs implementation that sometimes
|
||||
behaves strangely. This fallback seems to fix things.
|
||||
*/
|
||||
int tputs(const char *str, int affcnt, int (*fish_putc)(tputs_arg_t));
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_FWPRINTF
|
||||
|
||||
/**
|
||||
Print formated string. Some operating systems (Like NetBSD) do not
|
||||
have wide string formating functions. Therefore we implement our
|
||||
own. Not at all complete. Supports wide and narrow characters,
|
||||
strings and decimal numbers, position (%n), field width and
|
||||
precision.
|
||||
*/
|
||||
int fwprintf( FILE *f, const wchar_t *format, ... );
|
||||
|
||||
|
||||
/**
|
||||
Print formated string. Some operating systems (Like NetBSD) do not
|
||||
have wide string formating functions. Therefore we define our
|
||||
own. Not at all complete. Supports wide and narrow characters,
|
||||
strings and decimal numbers, position (%n), field width and
|
||||
precision.
|
||||
*/
|
||||
int swprintf( wchar_t *str, size_t l, const wchar_t *format, ... );
|
||||
|
||||
/**
|
||||
Print formated string. Some operating systems (Like NetBSD) do not
|
||||
have wide string formating functions. Therefore we define our
|
||||
own. Not at all complete. Supports wide and narrow characters,
|
||||
strings and decimal numbers, position (%n), field width and
|
||||
precision.
|
||||
*/
|
||||
int wprintf( const wchar_t *format, ... );
|
||||
|
||||
/**
|
||||
Print formated string. Some operating systems (Like NetBSD) do not
|
||||
have wide string formating functions. Therefore we define our
|
||||
own. Not at all complete. Supports wide and narrow characters,
|
||||
strings and decimal numbers, position (%n), field width and
|
||||
precision.
|
||||
*/
|
||||
int vwprintf( const wchar_t *filter, va_list va );
|
||||
|
||||
/**
|
||||
Print formated string. Some operating systems (Like NetBSD) do not
|
||||
have wide string formating functions. Therefore we define our
|
||||
own. Not at all complete. Supports wide and narrow characters,
|
||||
strings and decimal numbers, position (%n), field width and
|
||||
precision.
|
||||
*/
|
||||
int vfwprintf( FILE *f, const wchar_t *filter, va_list va );
|
||||
|
||||
/**
|
||||
Print formated string. Some operating systems (Like NetBSD) do not
|
||||
have wide string formating functions. Therefore we define our
|
||||
own. Not at all complete. Supports wide and narrow characters,
|
||||
strings and decimal numbers, position (%n), field width and
|
||||
precision.
|
||||
*/
|
||||
int vswprintf( wchar_t *out, size_t n, const wchar_t *filter, va_list va );
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_FGETWC
|
||||
/**
|
||||
Fallback implementation of fgetwc
|
||||
*/
|
||||
wint_t fgetwc(FILE *stream);
|
||||
|
||||
/**
|
||||
Fallback implementation of getwc
|
||||
*/
|
||||
wint_t getwc(FILE *stream);
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_FPUTWC
|
||||
|
||||
/**
|
||||
Fallback implementation of fputwc
|
||||
*/
|
||||
wint_t fputwc(wchar_t wc, FILE *stream);
|
||||
/**
|
||||
Fallback implementation of putwc
|
||||
*/
|
||||
wint_t putwc(wchar_t wc, FILE *stream);
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_WCSTOK
|
||||
|
||||
/**
|
||||
Fallback implementation of wcstok. Uses code borrowed from glibc.
|
||||
*/
|
||||
wchar_t *wcstok(wchar_t *wcs, const wchar_t *delim, wchar_t **ptr);
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_WCWIDTH
|
||||
|
||||
/**
|
||||
Return the number of columns used by a character. This is a libc
|
||||
function, but the prototype for this function is missing in some libc
|
||||
implementations.
|
||||
|
||||
Fish has a fallback implementation in case the implementation is
|
||||
missing altogether. In locales without a native wcwidth, Unicode
|
||||
is probably so broken that it isn't worth trying to implement a
|
||||
real wcwidth. Therefore, the fallback wcwidth assumes any printing
|
||||
character takes up one column and anything else uses 0 columns.
|
||||
*/
|
||||
int wcwidth( wchar_t c );
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_WCSDUP
|
||||
|
||||
/**
|
||||
Create a duplicate string. Wide string version of strdup. Will
|
||||
automatically exit if out of memory.
|
||||
*/
|
||||
wchar_t *wcsdup(const wchar_t *in);
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_WCSLEN
|
||||
|
||||
/**
|
||||
Fallback for wcsen. Returns the length of the specified string.
|
||||
*/
|
||||
size_t wcslen(const wchar_t *in);
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_WCSCASECMP
|
||||
/**
|
||||
Case insensitive string compare function. Wide string version of
|
||||
strcasecmp.
|
||||
|
||||
This implementation of wcscasecmp does not take into account
|
||||
esoteric locales where uppercase and lowercase do not cleanly
|
||||
transform between each other. Hopefully this should be fine since
|
||||
fish only uses this function with one of the strings supplied by
|
||||
fish and guaranteed to be a sane, english word. Using wcscasecmp on
|
||||
a user-supplied string should be considered a bug.
|
||||
*/
|
||||
int wcscasecmp( const wchar_t *a, const wchar_t *b );
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_WCSNCASECMP
|
||||
|
||||
/**
|
||||
Case insensitive string compare function. Wide string version of
|
||||
strncasecmp.
|
||||
|
||||
This implementation of wcsncasecmp does not take into account
|
||||
esoteric locales where uppercase and lowercase do not cleanly
|
||||
transform between each other. Hopefully this should be fine since
|
||||
fish only uses this function with one of the strings supplied by
|
||||
fish and guaranteed to be a sane, english word. Using wcsncasecmp on
|
||||
a user-supplied string should be considered a bug.
|
||||
*/
|
||||
int wcsncasecmp( const wchar_t *a, const wchar_t *b, int count );
|
||||
|
||||
/**
|
||||
Returns a newly allocated wide character string wich is a copy of
|
||||
the string in, but of length c or shorter. The returned string is
|
||||
always null terminated, and the null is not included in the string
|
||||
length.
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_WCSNDUP
|
||||
|
||||
/**
|
||||
Fallback for wcsndup function. Returns a copy of \c in, truncated
|
||||
to a maximum length of \c c.
|
||||
*/
|
||||
wchar_t *wcsndup( const wchar_t *in, int c );
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
Converts from wide char to digit in the specified base. If d is not
|
||||
a valid digit in the specified base, return -1.
|
||||
*/
|
||||
long convert_digit( wchar_t d, int base );
|
||||
|
||||
#ifndef HAVE_WCSTOL
|
||||
|
||||
/**
|
||||
Fallback implementation. Convert a wide character string to a
|
||||
number in the specified base. This functions is the wide character
|
||||
string equivalent of strtol. For bases of 10 or lower, 0..9 are
|
||||
used to represent numbers. For bases below 36, a-z and A-Z are used
|
||||
to represent numbers higher than 9. Higher bases than 36 are not
|
||||
supported.
|
||||
*/
|
||||
long wcstol(const wchar_t *nptr,
|
||||
wchar_t **endptr,
|
||||
int base);
|
||||
|
||||
#endif
|
||||
#ifndef HAVE_WCSLCAT
|
||||
|
||||
/**
|
||||
Appends src to string dst of size siz (unlike wcsncat, siz is the
|
||||
full size of dst, not space left). At most siz-1 characters will be
|
||||
copied. Always NUL terminates (unless siz <= wcslen(dst)). Returns
|
||||
wcslen(src) + MIN(siz, wcslen(initial dst)). If retval >= siz,
|
||||
truncation occurred.
|
||||
|
||||
This is the OpenBSD strlcat function, modified for wide characters,
|
||||
and renamed to reflect this change.
|
||||
|
||||
*/
|
||||
size_t wcslcat( wchar_t *dst, const wchar_t *src, size_t siz );
|
||||
|
||||
#endif
|
||||
#ifndef HAVE_WCSLCPY
|
||||
|
||||
/**
|
||||
Copy src to string dst of size siz. At most siz-1 characters will
|
||||
be copied. Always NUL terminates (unless siz == 0). Returns
|
||||
wcslen(src); if retval >= siz, truncation occurred.
|
||||
|
||||
This is the OpenBSD strlcpy function, modified for wide characters,
|
||||
and renamed to reflect this change.
|
||||
*/
|
||||
size_t wcslcpy( wchar_t *dst, const wchar_t *src, size_t siz );
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,3 +1,5 @@
|
||||
%define xinclude %( if test -d /usr/X11R6/include; then echo /usr/X11R6/include; else echo /usr/include; fi )
|
||||
|
||||
Summary: A friendly interactive shell
|
||||
Name: @PACKAGE_NAME@
|
||||
|
||||
@@ -11,8 +13,9 @@ URL: http://roo.no-ip.org/fish/
|
||||
Source0: http://roo.no-ip.org/%{name}/files/%{version}/%{name}-%{version}.tar.bz2
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: doxygen ncurses-devel xorg-x11-devel
|
||||
|
||||
BuildRequires: doxygen ncurses-devel
|
||||
BuildRequires: %{xinclude}/X11/StringDefs.h, %{xinclude}/X11/Xlib.h
|
||||
BuildRequires: %{xinclude}/X11/Intrinsic.h, %{xinclude}/X11/Xatom.h
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,10 @@
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "common.h"
|
||||
#include "complete.h"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
@@ -26,7 +27,9 @@
|
||||
#include <locale.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "proc.h"
|
||||
#include "reader.h"
|
||||
|
||||
3
fishd.c
3
fishd.c
@@ -41,6 +41,7 @@ time the original barrier request was sent have been received.
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
@@ -61,7 +62,9 @@ time the original barrier request was sent have been received.
|
||||
#include <locale.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "wutil.h"
|
||||
#include "env_universal_common.h"
|
||||
|
||||
11
function.c
11
function.c
@@ -9,10 +9,14 @@
|
||||
#include <signal.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "function.h"
|
||||
#include "proc.h"
|
||||
#include "translate.h"
|
||||
#include "parser.h"
|
||||
#include "common.h"
|
||||
#include "intern.h"
|
||||
@@ -191,14 +195,17 @@ int function_exists( const wchar_t *cmd )
|
||||
void function_remove( const wchar_t *name )
|
||||
{
|
||||
void *key;
|
||||
const void *dv;
|
||||
function_data_t *d;
|
||||
event_t ev;
|
||||
|
||||
hash_remove( &function,
|
||||
name,
|
||||
(const void **) &key,
|
||||
(const void **)&d );
|
||||
&dv );
|
||||
|
||||
d=(function_data_t *)dv;
|
||||
|
||||
if( !key )
|
||||
return;
|
||||
|
||||
@@ -227,7 +234,7 @@ const wchar_t *function_get_desc( const wchar_t *argv )
|
||||
if( data == 0 )
|
||||
return 0;
|
||||
|
||||
return data->desc;
|
||||
return _(data->desc);
|
||||
}
|
||||
|
||||
void function_set_desc( const wchar_t *name, const wchar_t *desc )
|
||||
|
||||
11
halloc.c
11
halloc.c
@@ -8,10 +8,13 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "halloc.h"
|
||||
|
||||
@@ -38,7 +41,7 @@ typedef struct halloc
|
||||
|
||||
static halloc_t *halloc_from_data( void *data )
|
||||
{
|
||||
return (halloc_t *)(data - sizeof( halloc_t ) );
|
||||
return (halloc_t *)(((char *)data) - sizeof( halloc_t ) );
|
||||
}
|
||||
|
||||
static void late_free( void *data)
|
||||
@@ -80,7 +83,7 @@ void *halloc( void *context, size_t size )
|
||||
{
|
||||
res = parent->scratch;
|
||||
parent->scratch_free -= size;
|
||||
parent->scratch += size;
|
||||
parent->scratch = ((char *)parent->scratch)+size;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -95,7 +98,7 @@ void *halloc( void *context, size_t size )
|
||||
alloc_spill += parent->scratch_free;
|
||||
#endif
|
||||
res = calloc( 1, size + HALLOC_BLOCK_SIZE );
|
||||
parent->scratch = res + size;
|
||||
parent->scratch = (char *)res + size;
|
||||
parent->scratch_free = HALLOC_BLOCK_SIZE;
|
||||
}
|
||||
else
|
||||
@@ -118,7 +121,7 @@ void *halloc( void *context, size_t size )
|
||||
#ifdef HALLOC_DEBUG
|
||||
parent_count++;
|
||||
#endif
|
||||
me->scratch = ((void *)me) + sizeof(halloc_t) + size;
|
||||
me->scratch = ((char *)me) + sizeof(halloc_t) + size;
|
||||
me->scratch_free = HALLOC_BLOCK_SIZE;
|
||||
|
||||
al_init( &me->children );
|
||||
|
||||
@@ -8,11 +8,14 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "halloc.h"
|
||||
|
||||
|
||||
@@ -12,7 +12,10 @@
|
||||
#include <signal.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "highlight.h"
|
||||
#include "tokenizer.h"
|
||||
|
||||
@@ -12,7 +12,10 @@
|
||||
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "history.h"
|
||||
#include "common.h"
|
||||
@@ -199,6 +202,10 @@ static void history_to_hash()
|
||||
{
|
||||
history_data *d;
|
||||
|
||||
if( !history_last )
|
||||
return;
|
||||
|
||||
|
||||
d = (history_data *)hash_get( &history_table,
|
||||
mode_name );
|
||||
|
||||
@@ -288,7 +295,7 @@ static void history_save()
|
||||
history_count=0;
|
||||
past_end=1;
|
||||
|
||||
history_load( mode_name );
|
||||
history_load();
|
||||
if( real_pos != 0 )
|
||||
{
|
||||
/*
|
||||
|
||||
15
input.c
15
input.c
@@ -43,7 +43,10 @@ implementation in fish is as of yet incomplete.
|
||||
#include <wctype.h>
|
||||
|
||||
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "reader.h"
|
||||
#include "proc.h"
|
||||
@@ -225,6 +228,8 @@ static int inputrc_block_count=0;
|
||||
*/
|
||||
static int inputrc_error = 0;
|
||||
|
||||
static int is_init = 0;
|
||||
|
||||
wchar_t input_get_code( wchar_t *name )
|
||||
{
|
||||
|
||||
@@ -1343,6 +1348,11 @@ int input_init()
|
||||
{
|
||||
wchar_t *fn;
|
||||
|
||||
if( is_init )
|
||||
return 1;
|
||||
|
||||
is_init = 1;
|
||||
|
||||
input_common_init( &interrupt_handler );
|
||||
|
||||
if( setupterm( 0, STDOUT_FILENO, 0) == ERR )
|
||||
@@ -1421,6 +1431,11 @@ static void destroy_mapping( const void *key, const void *val )
|
||||
|
||||
void input_destroy()
|
||||
{
|
||||
if( !is_init )
|
||||
return;
|
||||
|
||||
is_init=0;
|
||||
|
||||
input_common_destroy();
|
||||
|
||||
hash_foreach( &all_mappings, &destroy_mapping );
|
||||
|
||||
1
input.h
1
input.h
@@ -9,6 +9,7 @@ inputrc information for key bindings.
|
||||
#define FISH_INPUT_H
|
||||
|
||||
#include <wchar.h>
|
||||
#include "input_common.h"
|
||||
|
||||
/**
|
||||
Key codes for inputrc-style keyboard functions that are passed on
|
||||
|
||||
@@ -5,6 +5,7 @@ Implementation file for the low level input library
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -15,7 +16,9 @@ Implementation file for the low level input library
|
||||
#include <wchar.h>
|
||||
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "wutil.h"
|
||||
#include "input_common.h"
|
||||
@@ -86,16 +89,9 @@ static wint_t readb()
|
||||
case EINTR:
|
||||
case EAGAIN:
|
||||
{
|
||||
// wperror( L"select" );
|
||||
if( interrupt_handler )
|
||||
{
|
||||
int res = interrupt_handler();
|
||||
|
||||
/* debug( 0,
|
||||
L"interrupt, %d is %ls",
|
||||
res,
|
||||
(res==R_NULL?L"good": L"Bad") );
|
||||
*/
|
||||
if( res )
|
||||
return res;
|
||||
}
|
||||
@@ -140,6 +136,7 @@ static wint_t readb()
|
||||
return arr[0];
|
||||
}
|
||||
|
||||
|
||||
wchar_t input_common_readch( int timed )
|
||||
{
|
||||
if( lookahead_count == 0 )
|
||||
|
||||
3
intern.c
3
intern.c
@@ -5,12 +5,15 @@
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "common.h"
|
||||
#include "intern.h"
|
||||
|
||||
3
io.c
3
io.c
@@ -5,6 +5,7 @@ Utilities for io redirection.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
@@ -31,7 +32,9 @@ Utilities for io redirection.
|
||||
#include <ncurses/term.h>
|
||||
#endif
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "exec.h"
|
||||
#include "common.h"
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
#include <locale.h>
|
||||
#include <termcap.h>
|
||||
|
||||
#include "fallback.h"
|
||||
|
||||
#include "input_common.h"
|
||||
|
||||
int writestr( char *str )
|
||||
|
||||
3
kill.c
3
kill.c
@@ -18,7 +18,10 @@
|
||||
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "kill.h"
|
||||
#include "proc.h"
|
||||
|
||||
40
main.c
40
main.c
@@ -23,6 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
@@ -40,7 +41,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#include <locale.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "reader.h"
|
||||
#include "builtin.h"
|
||||
@@ -58,6 +61,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#include "output.h"
|
||||
#include "translate.h"
|
||||
#include "halloc_util.h"
|
||||
#include "history.h"
|
||||
|
||||
|
||||
/**
|
||||
Parse init files
|
||||
@@ -66,7 +71,7 @@ static int read_init()
|
||||
{
|
||||
char cwd[4096];
|
||||
wchar_t *wcwd;
|
||||
|
||||
|
||||
if( !getcwd( cwd, 4096 ) )
|
||||
{
|
||||
wperror( L"getcwd" );
|
||||
@@ -74,11 +79,11 @@ static int read_init()
|
||||
}
|
||||
|
||||
env_set( L"__fish_help_dir", DOCDIR, 0);
|
||||
|
||||
|
||||
eval( L"builtin cd " DATADIR L"/fish 2>/dev/null; . fish 2>/dev/null", 0, TOP );
|
||||
eval( L"builtin cd " SYSCONFDIR L" 2>/dev/null; . fish 2>/dev/null", 0, TOP );
|
||||
eval( L"builtin cd 2>/dev/null;. .fish 2>/dev/null", 0, TOP );
|
||||
|
||||
|
||||
if( chdir( cwd ) == -1 )
|
||||
{
|
||||
// fwprintf( stderr, L"Invalid directory: %s\n", cwd );
|
||||
@@ -134,6 +139,10 @@ int main( int argc, char **argv )
|
||||
"login", no_argument, 0, 'l'
|
||||
}
|
||||
,
|
||||
{
|
||||
"no-execute", no_argument, 0, 'n'
|
||||
}
|
||||
,
|
||||
{
|
||||
"profile", required_argument, 0, 'p'
|
||||
}
|
||||
@@ -156,14 +165,14 @@ int main( int argc, char **argv )
|
||||
|
||||
int opt = getopt_long( argc,
|
||||
argv,
|
||||
"hilvc:p:d:",
|
||||
"hilnvc:p:d:",
|
||||
long_options,
|
||||
&opt_index );
|
||||
|
||||
#else
|
||||
int opt = getopt( argc,
|
||||
argv,
|
||||
"hilvc:p:d:" );
|
||||
"hilnvc:p:d:" );
|
||||
#endif
|
||||
if( opt == -1 )
|
||||
break;
|
||||
@@ -206,6 +215,10 @@ int main( int argc, char **argv )
|
||||
is_login=1;
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
no_exec=1;
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
profile = optarg;
|
||||
break;
|
||||
@@ -232,6 +245,15 @@ int main( int argc, char **argv )
|
||||
is_interactive_session &= isatty(STDIN_FILENO);
|
||||
is_interactive_session |= force_interactive;
|
||||
|
||||
/*
|
||||
No-exec is prohibited when in interactive mode
|
||||
*/
|
||||
if( is_interactive_session && no_exec)
|
||||
{
|
||||
debug( 1, _(L"Can not use the no-execute mode when running an interactive session") );
|
||||
no_exec = 0;
|
||||
}
|
||||
|
||||
common_init();
|
||||
halloc_util_init();
|
||||
|
||||
@@ -245,7 +267,8 @@ int main( int argc, char **argv )
|
||||
env_init();
|
||||
complete_init();
|
||||
reader_init();
|
||||
|
||||
history_init();
|
||||
|
||||
if( read_init() )
|
||||
{
|
||||
if( cmd != 0 )
|
||||
@@ -276,10 +299,10 @@ int main( int argc, char **argv )
|
||||
return 1;
|
||||
}
|
||||
|
||||
sb_init( &sb );
|
||||
|
||||
if( *(argv+2))
|
||||
{
|
||||
sb_init( &sb );
|
||||
|
||||
for( i=1,ptr = argv+2; *ptr; i++, ptr++ )
|
||||
{
|
||||
if( i != 1 )
|
||||
@@ -316,6 +339,7 @@ int main( int argc, char **argv )
|
||||
|
||||
proc_fire_event( L"PROCESS_EXIT", EVENT_EXIT, getpid(), res );
|
||||
|
||||
history_destroy();
|
||||
complete_destroy();
|
||||
proc_destroy();
|
||||
env_destroy();
|
||||
|
||||
3
mimedb.c
3
mimedb.c
@@ -21,6 +21,7 @@ license. Read the source code of the library for more information.
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -43,8 +44,10 @@ license. Read the source code of the library for more information.
|
||||
#endif
|
||||
|
||||
#include "xdgmime.h"
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
|
||||
/**
|
||||
Location of the applications .desktop file, relative to a base mime directory
|
||||
*/
|
||||
|
||||
13
output.c
13
output.c
@@ -38,7 +38,10 @@
|
||||
#include <time.h>
|
||||
#include <wchar.h>
|
||||
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "expand.h"
|
||||
#include "common.h"
|
||||
@@ -292,15 +295,7 @@ int writeb( tputs_arg_t b )
|
||||
|
||||
int writembs( char *str )
|
||||
{
|
||||
#ifdef TPUTS_KLUDGE
|
||||
while( *str )
|
||||
{
|
||||
out( *str );
|
||||
}
|
||||
#else
|
||||
tputs(str,1,writeb);
|
||||
#endif
|
||||
return 0;
|
||||
return tputs(str,1,&writeb)==ERR?1:0;
|
||||
}
|
||||
|
||||
int writech( wint_t ch )
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
@@ -17,7 +18,9 @@
|
||||
#include <time.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "common.h"
|
||||
#include "tokenizer.h"
|
||||
|
||||
234
parser.c
234
parser.c
@@ -18,7 +18,10 @@ The fish parser. Contains functions for parsing code.
|
||||
#include <signal.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "wutil.h"
|
||||
#include "proc.h"
|
||||
@@ -98,12 +101,12 @@ The fish parser. Contains functions for parsing code.
|
||||
/**
|
||||
Error message when a non-string token is found when expecting a command name
|
||||
*/
|
||||
#define CMD_OR_ERR_MSG _( L"Expected a command name, got token of type '%ls'. Did you mean 'COMMAND; or COMMAND'? For more information on the 'or' builtin command, see the help section for 'or' by typing 'help or'.")
|
||||
#define CMD_OR_ERR_MSG _( L"Expected a command name, got token of type '%ls'. Did you mean 'COMMAND; or COMMAND'? See the help section for the 'or' builtin command by typing 'help or'.")
|
||||
|
||||
/**
|
||||
Error message when a non-string token is found when expecting a command name
|
||||
*/
|
||||
#define CMD_AND_ERR_MSG _( L"Expected a command name, got token of type '%ls'. Did you mean 'COMMAND; and COMMAND'? For more information on the 'and' builtin command, see the help section for 'and' by typing 'help and'.")
|
||||
#define CMD_AND_ERR_MSG _( L"Expected a command name, got token of type '%ls'. Did you mean 'COMMAND; and COMMAND'? See the help section for the 'and' builtin command by typing 'help and'.")
|
||||
|
||||
/**
|
||||
Error message when encountering an illegal command name
|
||||
@@ -162,7 +165,7 @@ The fish parser. Contains functions for parsing code.
|
||||
|
||||
|
||||
/**
|
||||
Error for wrong token type
|
||||
Error for wrong token type
|
||||
*/
|
||||
#define UNEXPECTED_TOKEN_ERR_MSG _( L"Unexpected token of type '%ls'")
|
||||
|
||||
@@ -173,78 +176,78 @@ The fish parser. Contains functions for parsing code.
|
||||
|
||||
|
||||
/**
|
||||
While block description
|
||||
While block description
|
||||
*/
|
||||
#define WHILE_BLOCK _( L"'while' block" )
|
||||
|
||||
|
||||
/**
|
||||
For block description
|
||||
For block description
|
||||
*/
|
||||
#define FOR_BLOCK _( L"'for' block" )
|
||||
|
||||
|
||||
/**
|
||||
If block description
|
||||
If block description
|
||||
*/
|
||||
#define IF_BLOCK _( L"'if' conditional block" )
|
||||
|
||||
|
||||
/**
|
||||
function definition block description
|
||||
Function definition block description
|
||||
*/
|
||||
#define FUNCTION_DEF_BLOCK _( L"function definition block" )
|
||||
|
||||
|
||||
/**
|
||||
Function invocation block description
|
||||
Function invocation block description
|
||||
*/
|
||||
#define FUNCTION_CALL_BLOCK _( L"function invocation block" )
|
||||
|
||||
|
||||
/**
|
||||
Switch block description
|
||||
Switch block description
|
||||
*/
|
||||
#define SWITCH_BLOCK _( L"'switch' block" )
|
||||
|
||||
|
||||
/**
|
||||
Fake block description
|
||||
Fake block description
|
||||
*/
|
||||
#define FAKE_BLOCK _( L"unexecutable block" )
|
||||
|
||||
|
||||
/**
|
||||
Top block description
|
||||
Top block description
|
||||
*/
|
||||
#define TOP_BLOCK _( L"global root block" )
|
||||
|
||||
|
||||
/**
|
||||
Command substitution block description
|
||||
Command substitution block description
|
||||
*/
|
||||
#define SUBST_BLOCK _( L"command substitution block" )
|
||||
|
||||
|
||||
/**
|
||||
Begin block description
|
||||
Begin block description
|
||||
*/
|
||||
#define BEGIN_BLOCK _( L"'begin' unconditional block" )
|
||||
|
||||
|
||||
/**
|
||||
Source block description
|
||||
Source block description
|
||||
*/
|
||||
#define SOURCE_BLOCK _( L"Block created by the . builtin" )
|
||||
|
||||
/**
|
||||
Source block description
|
||||
Source block description
|
||||
*/
|
||||
#define EVENT_BLOCK _( L"event handler block" )
|
||||
|
||||
|
||||
/**
|
||||
Unknown block description
|
||||
Unknown block description
|
||||
*/
|
||||
#define UNKNOWN_BLOCK _( L"unknown/invalid block" )
|
||||
|
||||
@@ -460,11 +463,7 @@ int parser_is_subcommand( const wchar_t *cmd )
|
||||
(void *)0 );
|
||||
}
|
||||
|
||||
/**
|
||||
Test if the specified string is command that opens a new block
|
||||
*/
|
||||
|
||||
static int parser_is_block( const wchar_t *word)
|
||||
int parser_is_block( const wchar_t *word)
|
||||
{
|
||||
return contains_str( word,
|
||||
L"for",
|
||||
@@ -725,75 +724,85 @@ wchar_t *get_filename( const wchar_t *cmd )
|
||||
else
|
||||
{
|
||||
path = env_get(L"PATH");
|
||||
if( path != 0 )
|
||||
if( path == 0 )
|
||||
{
|
||||
/*
|
||||
Allocate string long enough to hold the whole command
|
||||
*/
|
||||
wchar_t *new_cmd = malloc( sizeof(wchar_t)*(wcslen(cmd)+wcslen(path)+2) );
|
||||
/*
|
||||
We tokenize a copy of the path, since strtok modifies
|
||||
its arguments
|
||||
*/
|
||||
wchar_t *path_cpy = wcsdup( path );
|
||||
wchar_t *nxt_path = path;
|
||||
wchar_t *state;
|
||||
|
||||
if( (new_cmd==0) || (path_cpy==0) )
|
||||
if( contains_str( PREFIX L"/bin", L"/bin", L"/usr/bin", (void *)0 ) )
|
||||
{
|
||||
die_mem();
|
||||
path = L"/bin" ARRAY_SEP_STR L"/usr/bin";
|
||||
}
|
||||
|
||||
for( nxt_path = wcstok( path_cpy, ARRAY_SEP_STR, &state );
|
||||
nxt_path != 0;
|
||||
nxt_path = wcstok( 0, ARRAY_SEP_STR, &state) )
|
||||
else
|
||||
{
|
||||
int path_len = wcslen( nxt_path );
|
||||
wcscpy( new_cmd, nxt_path );
|
||||
if( new_cmd[path_len-1] != L'/' )
|
||||
{
|
||||
new_cmd[path_len++]=L'/';
|
||||
}
|
||||
wcscpy( &new_cmd[path_len], cmd );
|
||||
if( waccess( new_cmd, X_OK )==0 )
|
||||
{
|
||||
struct stat buff;
|
||||
if( wstat( new_cmd, &buff )==-1 )
|
||||
{
|
||||
if( errno != EACCES )
|
||||
{
|
||||
wperror( L"stat" );
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if( S_ISREG(buff.st_mode) )
|
||||
{
|
||||
free( path_cpy );
|
||||
return new_cmd;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch( errno )
|
||||
{
|
||||
case ENOENT:
|
||||
case ENAMETOOLONG:
|
||||
case EACCES:
|
||||
case ENOTDIR:
|
||||
break;
|
||||
default:
|
||||
{
|
||||
debug( 1,
|
||||
MISSING_COMMAND_ERR_MSG,
|
||||
new_cmd );
|
||||
wperror( L"access" );
|
||||
}
|
||||
}
|
||||
}
|
||||
path = L"/bin" ARRAY_SEP_STR L"/usr/bin" ARRAY_SEP_STR PREFIX L"/bin";
|
||||
}
|
||||
free( path_cpy );
|
||||
free( new_cmd );
|
||||
}
|
||||
|
||||
/*
|
||||
Allocate string long enough to hold the whole command
|
||||
*/
|
||||
wchar_t *new_cmd = malloc( sizeof(wchar_t)*(wcslen(cmd)+wcslen(path)+2) );
|
||||
/*
|
||||
We tokenize a copy of the path, since strtok modifies
|
||||
its arguments
|
||||
*/
|
||||
wchar_t *path_cpy = wcsdup( path );
|
||||
wchar_t *nxt_path = path;
|
||||
wchar_t *state;
|
||||
|
||||
if( (new_cmd==0) || (path_cpy==0) )
|
||||
{
|
||||
die_mem();
|
||||
}
|
||||
|
||||
for( nxt_path = wcstok( path_cpy, ARRAY_SEP_STR, &state );
|
||||
nxt_path != 0;
|
||||
nxt_path = wcstok( 0, ARRAY_SEP_STR, &state) )
|
||||
{
|
||||
int path_len = wcslen( nxt_path );
|
||||
wcscpy( new_cmd, nxt_path );
|
||||
if( new_cmd[path_len-1] != L'/' )
|
||||
{
|
||||
new_cmd[path_len++]=L'/';
|
||||
}
|
||||
wcscpy( &new_cmd[path_len], cmd );
|
||||
if( waccess( new_cmd, X_OK )==0 )
|
||||
{
|
||||
struct stat buff;
|
||||
if( wstat( new_cmd, &buff )==-1 )
|
||||
{
|
||||
if( errno != EACCES )
|
||||
{
|
||||
wperror( L"stat" );
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if( S_ISREG(buff.st_mode) )
|
||||
{
|
||||
free( path_cpy );
|
||||
return new_cmd;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch( errno )
|
||||
{
|
||||
case ENOENT:
|
||||
case ENAMETOOLONG:
|
||||
case EACCES:
|
||||
case ENOTDIR:
|
||||
break;
|
||||
default:
|
||||
{
|
||||
debug( 1,
|
||||
MISSING_COMMAND_ERR_MSG,
|
||||
new_cmd );
|
||||
wperror( L"access" );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
free( path_cpy );
|
||||
free( new_cmd );
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -1102,8 +1111,8 @@ int parser_get_lineno()
|
||||
int lineno;
|
||||
|
||||
/* static const wchar_t *prev_str = 0;
|
||||
static int i=0;
|
||||
static int lineno=1;
|
||||
static int i=0;
|
||||
static int lineno=1;
|
||||
*/
|
||||
if( !current_tokenizer )
|
||||
return -1;
|
||||
@@ -1242,8 +1251,8 @@ wchar_t *parser_current_line()
|
||||
|
||||
// debug( 1, L"Current pos %d, line pos %d, file_length %d, is_interactive %d, offset %d\n", current_tokenizer_pos, current_line_pos, wcslen(whole_str), is_interactive, offset);
|
||||
/*
|
||||
Skip printing character position if we are in interactive mode
|
||||
and the error was on the first character of the line.
|
||||
Skip printing character position if we are in interactive mode
|
||||
and the error was on the first character of the line.
|
||||
*/
|
||||
if( !is_interactive || is_function() || (current_line_width!=0) )
|
||||
{
|
||||
@@ -1717,8 +1726,8 @@ static int parse_job( process_t *p,
|
||||
else
|
||||
{
|
||||
error( SYNTAX_ERROR,
|
||||
tok_get_pos( tok ),
|
||||
CMD_ERR_MSG,
|
||||
tok_get_pos( tok ),
|
||||
CMD_ERR_MSG,
|
||||
tok_get_desc( tok_last_type(tok) ) );
|
||||
}
|
||||
|
||||
@@ -1927,8 +1936,8 @@ static int parse_job( process_t *p,
|
||||
if( !p->type || (p->type == INTERNAL_EXEC) )
|
||||
{
|
||||
/*
|
||||
If we are not executing the current block, allow
|
||||
non-existent commands.
|
||||
If we are not executing the current block, allow
|
||||
non-existent commands.
|
||||
*/
|
||||
if( current_block->skip )
|
||||
{
|
||||
@@ -1972,7 +1981,8 @@ static int parse_job( process_t *p,
|
||||
else
|
||||
{
|
||||
int tmp;
|
||||
|
||||
wchar_t *cmd = (wchar_t *)al_get( args, 0 );
|
||||
|
||||
/*
|
||||
We couln't find the specified command.
|
||||
|
||||
@@ -1987,19 +1997,42 @@ static int parse_job( process_t *p,
|
||||
cause the job to silently not execute. We
|
||||
also print an error message.
|
||||
*/
|
||||
if( wcschr( (wchar_t *)al_get( args, 0 ), L'=' ) )
|
||||
if( wcschr( cmd, L'=' ) )
|
||||
{
|
||||
debug( 0,
|
||||
COMMAND_ASSIGN_ERR_MSG,
|
||||
(wchar_t *)al_get( args, 0 ) );
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
else if(cmd[0]==L'$')
|
||||
{
|
||||
wchar_t *val = env_get( cmd+1 );
|
||||
if( val )
|
||||
{
|
||||
debug( 0,
|
||||
_(L"Variables may not be used as commands. Instead, define a function like 'function %ls; %ls $argv; end'. See the help section for the function command by typing 'help function'." ),
|
||||
cmd+1,
|
||||
val,
|
||||
cmd );
|
||||
}
|
||||
else
|
||||
{
|
||||
debug( 0,
|
||||
_(L"Variables may not be used as commands. Instead, define a function. See the help section for the function command by typing 'help function'." ),
|
||||
cmd );
|
||||
}
|
||||
}
|
||||
else if(wcschr( cmd, L'$' ))
|
||||
{
|
||||
debug( 0,
|
||||
_(L"Commands may not contain variables. Use the eval builtin instead, like 'eval %ls'. See the help section for the eval command by typing 'help eval'." ),
|
||||
cmd,
|
||||
cmd );
|
||||
}
|
||||
else
|
||||
{
|
||||
debug( 0,
|
||||
_(L"Unknown command '%ls'"),
|
||||
(wchar_t *)al_get( args, 0 ) );
|
||||
cmd );
|
||||
}
|
||||
|
||||
tmp = current_tokenizer_pos;
|
||||
@@ -2483,7 +2516,7 @@ int eval( const wchar_t *cmd, io_data_t *io, int block_type )
|
||||
}
|
||||
|
||||
/*
|
||||
Restore previous eval state
|
||||
Restore previous eval state
|
||||
*/
|
||||
forbidden_function = prev_forbidden;
|
||||
current_tokenizer=previous_tokenizer;
|
||||
@@ -2498,7 +2531,6 @@ int eval( const wchar_t *cmd, io_data_t *io, int block_type )
|
||||
return code;
|
||||
}
|
||||
|
||||
|
||||
int parser_test( wchar_t * buff,
|
||||
int babble )
|
||||
{
|
||||
@@ -2518,7 +2550,7 @@ int parser_test( wchar_t * buff,
|
||||
current_tokenizer = &tok;
|
||||
|
||||
for( tok_init( &tok, buff, 0 );
|
||||
tok_has_next( &tok ) && !err;
|
||||
tok_has_next( &tok );
|
||||
tok_next( &tok ) )
|
||||
{
|
||||
current_tokenizer_pos = tok_get_pos( &tok );
|
||||
|
||||
6
parser.h
6
parser.h
@@ -259,6 +259,12 @@ int parser_is_subcommand( const wchar_t *cmd );
|
||||
*/
|
||||
int parser_is_reserved( const wchar_t *word );
|
||||
|
||||
/**
|
||||
Test if the specified string is command that opens a new block
|
||||
*/
|
||||
|
||||
int parser_is_block( const wchar_t *word);
|
||||
|
||||
/**
|
||||
Returns a string describing the current parser pisition in the format 'FILENAME (line LINE_NUMBER): LINE'.
|
||||
Example:
|
||||
|
||||
4
po/de.po
4
po/de.po
@@ -1300,11 +1300,11 @@ msgstr "fish"
|
||||
|
||||
#: init/fish_interactive.fish.in:13 init/fish_interactive.fish:13
|
||||
msgid "Welcome to fish, the friendly interactive shell\\n"
|
||||
msgstr "Willkommen zu fish, der Freundlichen Interaktiven SHell"
|
||||
msgstr "Willkommen zu fish, der Freundlichen Interaktiven Shell\\n"
|
||||
|
||||
#: init/fish_interactive.fish.in:14 init/fish_interactive.fish:14
|
||||
msgid "Type %shelp%s for instructions on how to use fish\\n"
|
||||
msgstr "Anweisungen zur fish-Benutzung erhalten Sie über %shelp%s "
|
||||
msgstr "Anweisungen zur fish-Benutzung erhalten Sie über %shelp%s\\n"
|
||||
|
||||
#: init/fish_interactive.fish.in:20 init/fish_interactive.fish:20
|
||||
msgid "Commands to execute when fish exits"
|
||||
|
||||
46
proc.c
46
proc.c
@@ -42,7 +42,10 @@ Some of the code in this file is based on code from the Glibc manual.
|
||||
#include <ncurses/term.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "proc.h"
|
||||
#include "common.h"
|
||||
@@ -87,6 +90,8 @@ int is_event=0;
|
||||
int proc_had_barrier;
|
||||
pid_t proc_last_bg_pid = 0;
|
||||
int job_control_mode = JOB_CONTROL_INTERACTIVE;
|
||||
int no_exec=0;
|
||||
|
||||
|
||||
/**
|
||||
The event variable used to send all process event
|
||||
@@ -189,7 +194,7 @@ job_t *job_create()
|
||||
|
||||
res->job_control = (job_control_mode==JOB_CONTROL_ALL) ||
|
||||
((job_control_mode == JOB_CONTROL_INTERACTIVE) && (is_interactive));
|
||||
|
||||
|
||||
// if( res->job_id > 2 )
|
||||
// fwprintf( stderr, L"Create job %d\n", res->job_id );
|
||||
return res;
|
||||
@@ -260,28 +265,12 @@ int job_is_completed( const job_t *j )
|
||||
{
|
||||
if (!p->completed)
|
||||
{
|
||||
// fwprintf( stderr, L"Process %ls not finished\n", p->argv[0] );
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
Return true if all processes in the job have completed.
|
||||
|
||||
\param j the job to test
|
||||
*/
|
||||
static int job_last_is_completed( const job_t *j )
|
||||
{
|
||||
process_t *p;
|
||||
|
||||
for (p = j->first_process; p->next; p = p->next)
|
||||
;
|
||||
return p->completed;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Store the status of the process pid that was returned by waitpid.
|
||||
Return 0 if all went well, nonzero otherwise.
|
||||
@@ -498,6 +487,11 @@ int job_reap( int interactive )
|
||||
static int locked = 0;
|
||||
|
||||
locked++;
|
||||
|
||||
/*
|
||||
job_read may fire an event handler, we do not want to call
|
||||
ourselves recursively (to avoid infinite recursion).
|
||||
*/
|
||||
if( locked>1 )
|
||||
return 0;
|
||||
|
||||
@@ -506,6 +500,11 @@ int job_reap( int interactive )
|
||||
process_t *p;
|
||||
jnext = j->next;
|
||||
|
||||
/*
|
||||
If we are reaping only jobs who do not need status messages
|
||||
sent to the console, do not consider reaping jobs that need
|
||||
status messages
|
||||
*/
|
||||
if( (!j->skip_notification) && (!interactive) && (!j->fg))
|
||||
{
|
||||
continue;
|
||||
@@ -810,8 +809,7 @@ static void read_try( job_t *j )
|
||||
else
|
||||
{
|
||||
b_append( buff->param2.out_buffer, b, l );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -826,14 +824,14 @@ void job_continue (job_t *j, int cont)
|
||||
j->next = first_job;
|
||||
first_job = j;
|
||||
j->notified = 0;
|
||||
|
||||
|
||||
debug( 4,
|
||||
L"Continue on job %d (%ls), %ls, %ls",
|
||||
L"Continue job %d (%ls), %ls, %ls",
|
||||
j->job_id,
|
||||
j->command,
|
||||
job_is_completed( j )?L"COMPLETED":L"UNCOMPLETED",
|
||||
is_interactive?L"INTERACTIVE":L"NON-INTERACTIVE" );
|
||||
|
||||
|
||||
if( !job_is_completed( j ) )
|
||||
{
|
||||
if( j->terminal && j->fg )
|
||||
@@ -911,7 +909,7 @@ void job_continue (job_t *j, int cont)
|
||||
do
|
||||
{
|
||||
got_signal = 0;
|
||||
quit = job_is_stopped( j ) || job_last_is_completed( j );
|
||||
quit = job_is_stopped( j ) || job_is_completed( j );
|
||||
}
|
||||
while( got_signal && !quit );
|
||||
if( !quit )
|
||||
@@ -1035,7 +1033,7 @@ void proc_sanity_check()
|
||||
/*
|
||||
More than one foreground job?
|
||||
*/
|
||||
if( j->fg && !(job_is_stopped(j) || job_last_is_completed(j) ) )
|
||||
if( j->fg && !(job_is_stopped(j) || job_is_completed(j) ) )
|
||||
{
|
||||
if( fg_job != 0 )
|
||||
{
|
||||
|
||||
6
proc.h
6
proc.h
@@ -231,6 +231,12 @@ extern pid_t proc_last_bg_pid;
|
||||
*/
|
||||
extern int job_control_mode;
|
||||
|
||||
/**
|
||||
If this flag is set, fish will never fork or run execve.
|
||||
*/
|
||||
extern int no_exec;
|
||||
|
||||
|
||||
/**
|
||||
Sets the status of the last process to exit
|
||||
*/
|
||||
|
||||
120
reader.c
120
reader.c
@@ -59,7 +59,10 @@ commence.
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "highlight.h"
|
||||
#include "reader.h"
|
||||
@@ -266,12 +269,6 @@ static struct stat prev_buff_1, prev_buff_2, post_buff_1, post_buff_2;
|
||||
*/
|
||||
static array_list_t prompt_list;
|
||||
|
||||
/**
|
||||
Stores the previous termios mode so we can reset the modes when
|
||||
we execute programs and when the shell exits.
|
||||
*/
|
||||
static struct termios saved_modes;
|
||||
|
||||
|
||||
/**
|
||||
Store the pid of the parent process, so the exit function knows whether it should reset the terminal or not.
|
||||
@@ -292,6 +289,12 @@ static struct termios old_modes;
|
||||
Prototypes for a bunch of functions defined later on.
|
||||
*/
|
||||
|
||||
/**
|
||||
Stores the previous termios mode so we can reset the modes when
|
||||
we execute programs and when the shell exits.
|
||||
*/
|
||||
static struct termios saved_modes;
|
||||
|
||||
static void reader_save_status();
|
||||
static void reader_check_status();
|
||||
static void reader_super_highlight_me_plenty( wchar_t * buff, int *color, int pos, array_list_t *error );
|
||||
@@ -838,6 +841,16 @@ static void write_cmdline()
|
||||
|
||||
void reader_init()
|
||||
{
|
||||
tcgetattr(0,&shell_modes); /* get the current terminal modes */
|
||||
memcpy( &saved_modes,
|
||||
&shell_modes,
|
||||
sizeof(saved_modes)); /* save a copy so we can reset the terminal later */
|
||||
|
||||
shell_modes.c_lflag &= ~ICANON; /* turn off canonical mode */
|
||||
shell_modes.c_lflag &= ~ECHO; /* turn off echo mode */
|
||||
shell_modes.c_cc[VMIN]=1;
|
||||
shell_modes.c_cc[VTIME]=0;
|
||||
|
||||
al_init( ¤t_filename);
|
||||
}
|
||||
|
||||
@@ -851,6 +864,8 @@ void reader_destroy()
|
||||
free( readline_buffer );
|
||||
readline_buffer=0;
|
||||
}
|
||||
tcsetattr(0, TCSANOW, &saved_modes);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1568,18 +1583,6 @@ static int handle_completions( array_list_t *comp )
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Reset the terminal. This function is placed in the list of
|
||||
functions to call when exiting by using the atexit function. It
|
||||
checks whether it is the original parent process that is exiting
|
||||
and not a subshell, and if it is the parent, it restores the
|
||||
terminal.
|
||||
*/
|
||||
static void exit_func()
|
||||
{
|
||||
if( getpid() == original_pid )
|
||||
tcsetattr(0, TCSANOW, &saved_modes);
|
||||
}
|
||||
|
||||
/**
|
||||
Initialize data for interactive use
|
||||
@@ -1628,20 +1631,9 @@ static void reader_interactive_init()
|
||||
|
||||
|
||||
al_init( &prompt_list );
|
||||
history_init();
|
||||
|
||||
common_handle_winch(0);
|
||||
|
||||
tcgetattr(0,&shell_modes); /* get the current terminal modes */
|
||||
memcpy( &saved_modes,
|
||||
&shell_modes,
|
||||
sizeof(saved_modes)); /* save a copy so we can reset the terminal later */
|
||||
|
||||
shell_modes.c_lflag &= ~ICANON; /* turn off canonical mode */
|
||||
shell_modes.c_lflag &= ~ECHO; /* turn off echo mode */
|
||||
shell_modes.c_cc[VMIN]=1;
|
||||
shell_modes.c_cc[VTIME]=0;
|
||||
|
||||
if( tcsetattr(0,TCSANOW,&shell_modes)) /* set the new modes */
|
||||
{
|
||||
wperror(L"tcsetattr");
|
||||
@@ -1654,9 +1646,6 @@ static void reader_interactive_init()
|
||||
*/
|
||||
original_pid = getpid();
|
||||
|
||||
if( atexit( &exit_func ) )
|
||||
debug( 1, _( L"Could not set exit function" ) );
|
||||
|
||||
env_set( L"_", L"fish", ENV_GLOBAL );
|
||||
}
|
||||
|
||||
@@ -1668,7 +1657,6 @@ static void reader_interactive_destroy()
|
||||
kill_destroy();
|
||||
al_foreach( &prompt_list, (void (*)(const void *))&free );
|
||||
al_destroy( &prompt_list );
|
||||
history_destroy();
|
||||
|
||||
writestr( L"\n" );
|
||||
set_color( FISH_COLOR_RESET, FISH_COLOR_RESET );
|
||||
@@ -2275,7 +2263,19 @@ static int read_i()
|
||||
|
||||
if( data->end_loop)
|
||||
{
|
||||
if( !prev_end_loop && first_job != 0 )
|
||||
job_t *j;
|
||||
int has_job=0;
|
||||
|
||||
for( j=first_job; j; j=j->next )
|
||||
{
|
||||
if( !job_is_completed(j) )
|
||||
{
|
||||
has_job = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( !prev_end_loop && has_job )
|
||||
{
|
||||
writestr(_( L"There are stopped jobs\n" ));
|
||||
write_prompt();
|
||||
@@ -2456,15 +2456,21 @@ wchar_t *reader_readline()
|
||||
if( comp_empty )
|
||||
{
|
||||
const wchar_t *begin, *end;
|
||||
const wchar_t *token_begin, *token_end;
|
||||
wchar_t *buffcpy;
|
||||
|
||||
int len;
|
||||
int cursor_steps;
|
||||
|
||||
parse_util_cmdsubst_extent( data->buff, data->buff_pos, &begin, &end );
|
||||
|
||||
int len = data->buff_pos - (data->buff - begin);
|
||||
parse_util_token_extent( begin, data->buff_pos - (begin-data->buff), &token_begin, &token_end, 0, 0 );
|
||||
cursor_steps = token_end - data->buff- data->buff_pos;
|
||||
data->buff_pos += cursor_steps;
|
||||
move_cursor( cursor_steps );
|
||||
|
||||
len = data->buff_pos - (data->buff - begin);
|
||||
buffcpy = wcsndup( begin, len );
|
||||
|
||||
//fwprintf( stderr, L"String is %ls\n", buffcpy );
|
||||
|
||||
reader_save_status();
|
||||
data->complete_func( buffcpy, &comp );
|
||||
reader_check_status();
|
||||
@@ -2473,6 +2479,7 @@ wchar_t *reader_readline()
|
||||
remove_duplicates( &comp );
|
||||
|
||||
free( buffcpy );
|
||||
|
||||
}
|
||||
if( (comp_empty =
|
||||
handle_completions( &comp ) ) )
|
||||
@@ -2493,7 +2500,6 @@ wchar_t *reader_readline()
|
||||
|
||||
|
||||
repaint();
|
||||
// wcscpy(data->search_buff,data->buff);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2513,7 +2519,6 @@ wchar_t *reader_readline()
|
||||
reader_super_highlight_me_plenty( data->buff, data->color, data->buff_pos, 0 );
|
||||
|
||||
repaint();
|
||||
// wcscpy(data->search_buff,data->buff);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2525,7 +2530,6 @@ wchar_t *reader_readline()
|
||||
reader_super_highlight_me_plenty( data->buff, data->color, data->buff_pos, 0 );
|
||||
|
||||
repaint();
|
||||
// wcscpy(data->search_buff,data->buff);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2534,7 +2538,6 @@ wchar_t *reader_readline()
|
||||
{ yank_str = kill_yank();
|
||||
insert_str( yank_str );
|
||||
yank = wcslen( yank_str );
|
||||
// wcscpy(data->search_buff,data->buff);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2697,6 +2700,7 @@ wchar_t *reader_readline()
|
||||
|
||||
/* Move left*/
|
||||
case R_BACKWARD_CHAR:
|
||||
{
|
||||
if( data->buff_pos > 0 )
|
||||
{
|
||||
data->buff_pos--;
|
||||
@@ -2711,8 +2715,9 @@ wchar_t *reader_readline()
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
/* Move right*/
|
||||
}
|
||||
|
||||
/* Move right*/
|
||||
case R_FORWARD_CHAR:
|
||||
{
|
||||
if( data->buff_pos < data->buff_len )
|
||||
@@ -2796,7 +2801,16 @@ wchar_t *reader_readline()
|
||||
if( (!wchar_private(c)) && (c>31) && (c != 127) )
|
||||
insert_char( c );
|
||||
else
|
||||
debug( 0, _( L"Unknown keybinding %d" ), c );
|
||||
{
|
||||
/*
|
||||
Carriage returns happen - they are usually a
|
||||
sign of an incorrectly set terminal, but there
|
||||
really isn't very much we can do at this point,
|
||||
so we ignore them.
|
||||
*/
|
||||
if( c != 13 )
|
||||
debug( 0, _( L"Unknown keybinding %d" ), c );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2870,7 +2884,7 @@ static int read_ni( int fd )
|
||||
_( L"Error while reading commands" ) );
|
||||
|
||||
/*
|
||||
Reset buffer. We won't evaluate incomplete files.
|
||||
Reset buffer on error. We won't evaluate incomplete files.
|
||||
*/
|
||||
acc.used=0;
|
||||
break;
|
||||
@@ -2891,13 +2905,10 @@ static int read_ni( int fd )
|
||||
res = 1;
|
||||
}
|
||||
|
||||
// fwprintf( stderr, L"Woot is %d chars\n", wcslen( acc.buff ) );
|
||||
|
||||
if( str )
|
||||
{
|
||||
if( !parser_test( str, 1 ) )
|
||||
{
|
||||
//fwprintf( stderr, L"We parse it\n" );
|
||||
eval( str, 0, TOP );
|
||||
}
|
||||
else
|
||||
@@ -2940,19 +2951,20 @@ static int read_ni( int fd )
|
||||
int reader_read( int fd )
|
||||
{
|
||||
int res;
|
||||
|
||||
/*
|
||||
If reader_read is called recursively through the '.' builtin,
|
||||
we need to preserve is_interactive, so we save the
|
||||
original state. We also update the signal handlers.
|
||||
If reader_read is called recursively through the '.' builtin, we
|
||||
need to preserve is_interactive. This, and signal handler setup
|
||||
is handled by proc_push_interactive/proc_pop_interactive.
|
||||
*/
|
||||
|
||||
proc_push_interactive( ((fd == 0) && isatty(STDIN_FILENO)));
|
||||
|
||||
|
||||
res= is_interactive?read_i():read_ni( fd );
|
||||
|
||||
/*
|
||||
If the exit command was called in a script, only exit the
|
||||
script, not the program
|
||||
script, not the program.
|
||||
*/
|
||||
if( data )
|
||||
data->end_loop = 0;
|
||||
|
||||
3
sanity.c
3
sanity.c
@@ -14,7 +14,10 @@
|
||||
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "sanity.h"
|
||||
#include "proc.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "config.h"
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#apm
|
||||
complete -f -c apm -s V -l version -d (_ "Display version and exit")
|
||||
complete -f -c apm -s v -l verbose -d (_ "Print APM info")
|
||||
complete -f -c apm -s m -l minutes -d (_ "Print time remaining")
|
||||
complete -f -c apm -s M -l monitor -d (_ "Monitor status info")
|
||||
complete -f -c apm -s S -l standby -d (_ "Request APM standby mode")
|
||||
complete -f -c apm -s s -l suspend -d (_ "Request APM suspend mode")
|
||||
complete -f -c apm -s d -l debug -d (_ "APM status debugging info")
|
||||
complete -f -c apm -s V -l version -d (N_ "Display version and exit")
|
||||
complete -f -c apm -s v -l verbose -d (N_ "Print APM info")
|
||||
complete -f -c apm -s m -l minutes -d (N_ "Print time remaining")
|
||||
complete -f -c apm -s M -l monitor -d (N_ "Monitor status info")
|
||||
complete -f -c apm -s S -l standby -d (N_ "Request APM standby mode")
|
||||
complete -f -c apm -s s -l suspend -d (N_ "Request APM suspend mode")
|
||||
complete -f -c apm -s d -l debug -d (N_ "APM status debugging info")
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
function __fish_complete_apropos
|
||||
if test (commandline -ct)
|
||||
set str (commandline -ct)
|
||||
apropos $str|sed -e "s/^\(.*$str\([^ ]*\).*\)$/$str\2\t\1/"
|
||||
apropos $str|sed -e "s/^\(.*$str\([^ ]*\).*\)$/$str\2"\t"\1/"
|
||||
end
|
||||
end
|
||||
|
||||
complete -xc apropos -a '(__fish_complete_apropos)' -d (_ "whatis entry")
|
||||
complete -xc apropos -a '(__fish_complete_apropos)' -d (N_ "whatis entry")
|
||||
|
||||
complete -c apropos -s h -l help -d (_ "Display help and exit")
|
||||
complete -f -c apropos -s d -l debug -d (_ "Print debugging info")
|
||||
complete -f -c apropos -s v -l verbose -d (_ "Verbose mode")
|
||||
complete -f -c apropos -s r -l regex -d (_ "Keyword as regex")
|
||||
complete -f -c apropos -s w -l wildcard -d (_ "Keyword as wildcards")
|
||||
complete -f -c apropos -s e -l exact -d (_ "Keyword as exactly match")
|
||||
complete -x -c apropos -s m -l system -d (_ "Search for other system")
|
||||
complete -x -c apropos -s M -l manpath -a '(echo $MANPATH)' -d (_ "Specify man path")
|
||||
complete -x -c apropos -s C -l config-file -d (_ "Specify a configuration file")
|
||||
complete -f -c apropos -s V -l version -d (_ "Display version and exit")
|
||||
complete -c apropos -s h -l help -d (N_ "Display help and exit")
|
||||
complete -f -c apropos -s d -l debug -d (N_ "Print debugging info")
|
||||
complete -f -c apropos -s v -l verbose -d (N_ "Verbose mode")
|
||||
complete -f -c apropos -s r -l regex -d (N_ "Keyword as regex")
|
||||
complete -f -c apropos -s w -l wildcard -d (N_ "Keyword as wildcards")
|
||||
complete -f -c apropos -s e -l exact -d (N_ "Keyword as exactly match")
|
||||
complete -x -c apropos -s m -l system -d (N_ "Search for other system")
|
||||
complete -x -c apropos -s M -l manpath -a '(echo $MANPATH)' -d (N_ "Specify man path")
|
||||
complete -x -c apropos -s C -l config-file -d (N_ "Specify a configuration file")
|
||||
complete -f -c apropos -s V -l version -d (N_ "Display version and exit")
|
||||
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
|
||||
#apt-build
|
||||
complete -c apt-build -l help -d (_ "Display help and exit")
|
||||
complete -f -c apt-build -a update -d (_ "Update list of packages")
|
||||
complete -f -c apt-build -a upgrade -d (_ "Upgrade packages")
|
||||
complete -f -c apt-bulid -a world -d (_ "Rebuild your system")
|
||||
complete -x -c apt-build -a install -d (_ "Build and install a new package")
|
||||
complete -x -c apt-build -a source -d (_ "Download and extract a source")
|
||||
complete -x -c apt-build -a info -d (_ "Info on a package")
|
||||
complete -x -c apt-build -a remove -d (_ "Remove packages")
|
||||
complete -x -c apt-build -a clean-build -d (_ "Erase built packages")
|
||||
complete -x -c apt-build -a build-source -d (_ "Build source without install")
|
||||
complete -x -c apt-build -a clean-sources -d (_ "Clean source directories")
|
||||
complete -x -c apt-build -a update-source -d (_ "Update source and rebuild")
|
||||
complete -x -c apt-build -a update-repository -d (_ "Update the repository")
|
||||
complete -f -c apt-build -l nowrapper -d (_ "Do not use gcc wrapper")
|
||||
complete -f -c apt-build -l remove-builddep -d (_ "Remove build-dep")
|
||||
complete -f -c apt-build -l no-source -d (_ "Do not download source")
|
||||
complete -f -c apt-build -l build-dir -d (_ "Specify build-dir")
|
||||
complete -f -c apt-build -l rebuild -d (_ "Rebuild a package")
|
||||
complete -f -c apt-build -l reinstall -d (_ "Rebuild and install an installed package")
|
||||
complete -r -f -c apt-build -l build-command -d (_ "Use <command> to build")
|
||||
complete -r -c apt-build -l patch -d (_ "Apply <file> patch")
|
||||
complete -c apt-build -s p -l patch-strip -d (_ "Prefix to strip on patch")
|
||||
complete -c apt-build -s y -l yes -d (_ "Assume yes to all questions")
|
||||
complete -c apt-build -l purge -d (_ "Use purge instead of remove")
|
||||
complete -c apt-build -l noupdate -d (_ "Do not run update")
|
||||
complete -r -c apt-build -l source-list -d (_ "Specify sources.list file")
|
||||
complete -f -c apt-build -s v -l version -d (_ "Display version and exit")
|
||||
complete -c apt-build -l help -d (N_ "Display help and exit")
|
||||
complete -f -c apt-build -a update -d (N_ "Update list of packages")
|
||||
complete -f -c apt-build -a upgrade -d (N_ "Upgrade packages")
|
||||
complete -f -c apt-bulid -a world -d (N_ "Rebuild your system")
|
||||
complete -x -c apt-build -a install -d (N_ "Build and install a new package")
|
||||
complete -x -c apt-build -a source -d (N_ "Download and extract a source")
|
||||
complete -x -c apt-build -a info -d (N_ "Info on a package")
|
||||
complete -x -c apt-build -a remove -d (N_ "Remove packages")
|
||||
complete -x -c apt-build -a clean-build -d (N_ "Erase built packages")
|
||||
complete -x -c apt-build -a build-source -d (N_ "Build source without install")
|
||||
complete -x -c apt-build -a clean-sources -d (N_ "Clean source directories")
|
||||
complete -x -c apt-build -a update-source -d (N_ "Update source and rebuild")
|
||||
complete -x -c apt-build -a update-repository -d (N_ "Update the repository")
|
||||
complete -f -c apt-build -l nowrapper -d (N_ "Do not use gcc wrapper")
|
||||
complete -f -c apt-build -l remove-builddep -d (N_ "Remove build-dep")
|
||||
complete -f -c apt-build -l no-source -d (N_ "Do not download source")
|
||||
complete -f -c apt-build -l build-dir -d (N_ "Specify build-dir")
|
||||
complete -f -c apt-build -l rebuild -d (N_ "Rebuild a package")
|
||||
complete -f -c apt-build -l reinstall -d (N_ "Rebuild and install an installed package")
|
||||
complete -r -f -c apt-build -l build-command -d (N_ "Use <command> to build")
|
||||
complete -r -c apt-build -l patch -d (N_ "Apply <file> patch")
|
||||
complete -c apt-build -s p -l patch-strip -d (N_ "Prefix to strip on patch")
|
||||
complete -c apt-build -s y -l yes -d (N_ "Assume yes to all questions")
|
||||
complete -c apt-build -l purge -d (N_ "Use purge instead of remove")
|
||||
complete -c apt-build -l noupdate -d (N_ "Do not run update")
|
||||
complete -r -c apt-build -l source-list -d (N_ "Specify sources.list file")
|
||||
complete -f -c apt-build -s v -l version -d (N_ "Display version and exit")
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
#apt-cache
|
||||
complete -c apt-cache -s h -l help -d (_ "Display help and exit")
|
||||
complete -f -c apt-cache -a gencaches -d (_ "Build apt cache")
|
||||
complete -x -c apt-cache -a showpkg -d (_ "Show package info")
|
||||
complete -f -c apt-cache -a stats -d (_ "Show cache statistics")
|
||||
complete -x -c apt-cache -a showsrc -d (_ "Show source package")
|
||||
complete -f -c apt-cache -a dump -d (_ "Show packages in cache")
|
||||
complete -f -c apt-cache -a dumpavail -d (_ "Print available list")
|
||||
complete -f -c apt-cache -a unmet -d (_ "List unmet dependencies in cache")
|
||||
complete -x -c apt-cache -a show -d (_ "Display package record")
|
||||
complete -x -c apt-cache -a search -d (_ "Search packagename by REGEX")
|
||||
complete -c apt-cache -l full -a search -d (_ "Search full package name")
|
||||
complete -x -c apt-cache -l names-only -a search -d (_ "Search packagename only")
|
||||
complete -x -c apt-cache -a depends -d (_ "List dependencies for the package")
|
||||
complete -x -c apt-cache -a rdepends -d (_ "List reverse dependencies for the package")
|
||||
complete -x -c apt-cache -a pkgnames -d (_ "Print package name by prefix")
|
||||
complete -x -c apt-cache -a dotty -d (_ "Generate dotty output for packages")
|
||||
complete -x -c apt-cache -a policy -d (_ "Debug preferences file")
|
||||
complete -r -c apt-cache -s p -l pkg-cache -d (_ "Select file to store package cache")
|
||||
complete -r -c apt-cache -s s -l src-cache -d (_ "Select file to store source cache")
|
||||
complete -f -c apt-cache -s q -l quiet -d (_ "Quiet mode")
|
||||
complete -f -c apt-cache -s i -l important -d (_ "Print important dependencies")
|
||||
complete -f -c apt-cache -s a -l all-versions -d (_ "Print full records")
|
||||
complete -f -c apt-cache -s g -l generate -d (_ "Auto-gen package cache")
|
||||
complete -f -c apt-cache -l all-names -d (_ "Print all names")
|
||||
complete -f -c apt-cache -l recurse -d (_ "Dep and rdep recursive")
|
||||
complete -f -c apt-cache -l installed -d (_ "Limit to installed")
|
||||
complete -f -c apt-cache -s v -l version -d (_ "Display version and exit")
|
||||
complete -r -c apt-cache -s c -l config-file -d (_ "Specify config file")
|
||||
complete -x -c apt-cache -s o -l option -d (_ "Specify options")
|
||||
complete -c apt-cache -s h -l help -d (N_ "Display help and exit")
|
||||
complete -f -c apt-cache -a gencaches -d (N_ "Build apt cache")
|
||||
complete -x -c apt-cache -a showpkg -d (N_ "Show package info")
|
||||
complete -f -c apt-cache -a stats -d (N_ "Show cache statistics")
|
||||
complete -x -c apt-cache -a showsrc -d (N_ "Show source package")
|
||||
complete -f -c apt-cache -a dump -d (N_ "Show packages in cache")
|
||||
complete -f -c apt-cache -a dumpavail -d (N_ "Print available list")
|
||||
complete -f -c apt-cache -a unmet -d (N_ "List unmet dependencies in cache")
|
||||
complete -x -c apt-cache -a show -d (N_ "Display package record")
|
||||
complete -x -c apt-cache -a search -d (N_ "Search packagename by REGEX")
|
||||
complete -c apt-cache -l full -a search -d (N_ "Search full package name")
|
||||
complete -x -c apt-cache -l names-only -a search -d (N_ "Search packagename only")
|
||||
complete -x -c apt-cache -a depends -d (N_ "List dependencies for the package")
|
||||
complete -x -c apt-cache -a rdepends -d (N_ "List reverse dependencies for the package")
|
||||
complete -x -c apt-cache -a pkgnames -d (N_ "Print package name by prefix")
|
||||
complete -x -c apt-cache -a dotty -d (N_ "Generate dotty output for packages")
|
||||
complete -x -c apt-cache -a policy -d (N_ "Debug preferences file")
|
||||
complete -r -c apt-cache -s p -l pkg-cache -d (N_ "Select file to store package cache")
|
||||
complete -r -c apt-cache -s s -l src-cache -d (N_ "Select file to store source cache")
|
||||
complete -f -c apt-cache -s q -l quiet -d (N_ "Quiet mode")
|
||||
complete -f -c apt-cache -s i -l important -d (N_ "Print important dependencies")
|
||||
complete -f -c apt-cache -s a -l all-versions -d (N_ "Print full records")
|
||||
complete -f -c apt-cache -s g -l generate -d (N_ "Auto-gen package cache")
|
||||
complete -f -c apt-cache -l all-names -d (N_ "Print all names")
|
||||
complete -f -c apt-cache -l recurse -d (N_ "Dep and rdep recursive")
|
||||
complete -f -c apt-cache -l installed -d (N_ "Limit to installed")
|
||||
complete -f -c apt-cache -s v -l version -d (N_ "Display version and exit")
|
||||
complete -r -c apt-cache -s c -l config-file -d (N_ "Specify config file")
|
||||
complete -x -c apt-cache -s o -l option -d (N_ "Specify options")
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#apt-cdrom
|
||||
complete -c apt-cdrom -s h -l help -d (_ "Display help and exit")
|
||||
complete -r -c apt-cdrom -a add -d (_ "Add new disc to source list")
|
||||
complete -x -c apt-cdrom -a ident -d (_ "Report identity of disc")
|
||||
complete -r -c apt-cdrom -s d -l cdrom -d (_ "Mount point")
|
||||
complete -f -c apt-cdrom -s r -l rename -d (_ "Rename a disc")
|
||||
complete -f -c apt-cdrom -s m -l no-mount -d (_ "No mounting")
|
||||
complete -f -c apt-cdrom -s f -l fast -d (_ "Fast copy")
|
||||
complete -f -c apt-cdrom -s a -l thorough -d (_ "Thorough package scan")
|
||||
complete -f -c apt-cdrom -s n -l no-act -d (_ "No changes")
|
||||
complete -f -c apt-cdrom -s v -l version -d (_ "Display version and exit")
|
||||
complete -r -c apt-cdrom -s c -l config-file -d (_ "Specify config file")
|
||||
complete -x -c apt-cdrom -s o -l option -d (_ "Specify options")
|
||||
complete -c apt-cdrom -s h -l help -d (N_ "Display help and exit")
|
||||
complete -r -c apt-cdrom -a add -d (N_ "Add new disc to source list")
|
||||
complete -x -c apt-cdrom -a ident -d (N_ "Report identity of disc")
|
||||
complete -r -c apt-cdrom -s d -l cdrom -d (N_ "Mount point")
|
||||
complete -f -c apt-cdrom -s r -l rename -d (N_ "Rename a disc")
|
||||
complete -f -c apt-cdrom -s m -l no-mount -d (N_ "No mounting")
|
||||
complete -f -c apt-cdrom -s f -l fast -d (N_ "Fast copy")
|
||||
complete -f -c apt-cdrom -s a -l thorough -d (N_ "Thorough package scan")
|
||||
complete -f -c apt-cdrom -s n -l no-act -d (N_ "No changes")
|
||||
complete -f -c apt-cdrom -s v -l version -d (N_ "Display version and exit")
|
||||
complete -r -c apt-cdrom -s c -l config-file -d (N_ "Specify config file")
|
||||
complete -x -c apt-cdrom -s o -l option -d (N_ "Specify options")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#apt-config
|
||||
complete -c apt-config -s h -l help -d (_ "Display help and exit")
|
||||
complete -c apt-config -a shell -d (_ "Access config file from shell")
|
||||
complete -f -c apt-config -a dump -d (_ "Dump contents of config file")
|
||||
complete -f -c apt-config -s v -l version -d (_ "Display version and exit")
|
||||
complete -r -c apt-config -s c -l config-file -d (_ "Specify config file")
|
||||
complete -x -c apt-config -s o -l option -d (_ "Specify options")
|
||||
complete -c apt-config -s h -l help -d (N_ "Display help and exit")
|
||||
complete -c apt-config -a shell -d (N_ "Access config file from shell")
|
||||
complete -f -c apt-config -a dump -d (N_ "Dump contents of config file")
|
||||
complete -f -c apt-config -s v -l version -d (N_ "Display version and exit")
|
||||
complete -r -c apt-config -s c -l config-file -d (N_ "Specify config file")
|
||||
complete -x -c apt-config -s o -l option -d (N_ "Specify options")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
#apt-extracttemplates
|
||||
complete -c apt-extracttemplates -s h -l help -d (_ "Display help and exit")
|
||||
complete -r -c apt-extracttemplates -s t -d (_ "Set temp dir")
|
||||
complete -r -c apt-extracttemplates -s c -d (_ "Specifiy config file")
|
||||
complete -r -c apt-extracttemplates -s o -d (_ "Specify options")
|
||||
complete -c apt-extracttemplates -s h -l help -d (N_ "Display help and exit")
|
||||
complete -r -c apt-extracttemplates -s t -d (N_ "Set temp dir")
|
||||
complete -r -c apt-extracttemplates -s c -d (N_ "Specifiy config file")
|
||||
complete -r -c apt-extracttemplates -s o -d (N_ "Specify options")
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
#apt-file
|
||||
complete -c apt-file -s h -l help -d (_ "Display help and exit")
|
||||
complete -x -c apt-file -a update -d (_ "Resync package contents from source")
|
||||
complete -r -c apt-file -a search -d (_ "Search package containing pattern")
|
||||
complete -r -c apt-file -a list -d (_ "List contents of a package matching pattern")
|
||||
complete -x -c apt-file -a purge -d (_ "Remove all gz files from cache")
|
||||
complete -r -c apt-file -s c -l cache -d (_ "Set cache dir")
|
||||
complete -f -c apt-file -s v -l verbose -d (_ "Verbose mode")
|
||||
complete -c apt-file -s d -l cdrom-mount -d (_ "Use cdrom-mount-point")
|
||||
complete -f -c apt-file -s i -l ignore-case -d (_ "Do not expand pattern")
|
||||
complete -f -c apt-file -s x -l regexp -d (_ "Pattern is regexp")
|
||||
complete -f -c apt-file -s V -l version -d (_ "Display version and exit")
|
||||
complete -f -c apt-file -s a -l architecture -d (_ "Set arch")
|
||||
complete -r -c apt-file -s s -l sources-list -a "(ls /etc/apt)" -d (_ "Set sources.list file")
|
||||
complete -f -c apt-file -s l -l package-only -d (_ "Only display package name")
|
||||
complete -f -c apt-file -s F -l fixed-string -d (_ "Do not expand pattern")
|
||||
complete -f -c apt-file -s y -l dummy -d (_ "Run in dummy mode")
|
||||
complete -c apt-file -s h -l help -d (N_ "Display help and exit")
|
||||
complete -x -c apt-file -a update -d (N_ "Resync package contents from source")
|
||||
complete -r -c apt-file -a search -d (N_ "Search package containing pattern")
|
||||
complete -r -c apt-file -a list -d (N_ "List contents of a package matching pattern")
|
||||
complete -x -c apt-file -a purge -d (N_ "Remove all gz files from cache")
|
||||
complete -r -c apt-file -s c -l cache -d (N_ "Set cache dir")
|
||||
complete -f -c apt-file -s v -l verbose -d (N_ "Verbose mode")
|
||||
complete -c apt-file -s d -l cdrom-mount -d (N_ "Use cdrom-mount-point")
|
||||
complete -f -c apt-file -s i -l ignore-case -d (N_ "Do not expand pattern")
|
||||
complete -f -c apt-file -s x -l regexp -d (N_ "Pattern is regexp")
|
||||
complete -f -c apt-file -s V -l version -d (N_ "Display version and exit")
|
||||
complete -f -c apt-file -s a -l architecture -d (N_ "Set arch")
|
||||
complete -r -c apt-file -s s -l sources-list -a "(ls /etc/apt)" -d (N_ "Set sources.list file")
|
||||
complete -f -c apt-file -s l -l package-only -d (N_ "Only display package name")
|
||||
complete -f -c apt-file -s F -l fixed-string -d (N_ "Do not expand pattern")
|
||||
complete -f -c apt-file -s y -l dummy -d (N_ "Run in dummy mode")
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
#apt-ftparchive
|
||||
complete -c apt-ftparchive -s h -l help -d (_ "Display help and exit")
|
||||
complete -f -c apt-ftparchive -a packages -d (_ "Generate package from source")
|
||||
complete -f -c apt-ftparchive -a sources -d (_ "Generate source index file")
|
||||
complete -f -c apt-ftparchive -a contents -d (_ "Generate contents file")
|
||||
complete -f -c apt-ftparchive -a release -d (_ "Generate release file")
|
||||
complete -f -c apt-ftparchive -a clean -d (_ "Remove records")
|
||||
complete -f -c apt-ftparchive -l md5 -d (_ "Generate MD5 sums")
|
||||
complete -f -c apt-ftparchive -s d -l db -d (_ "Use a binary db")
|
||||
complete -f -c apt-ftparchive -s q -l quiet -d (_ "Quiet mode")
|
||||
complete -f -c apt-ftparchive -l delink -d (_ "Perform delinking")
|
||||
complete -f -c apt-ftparchive -l contents -d (_ "Perform contents generation")
|
||||
complete -c apt-ftparchive -s s -l source-override -d (_ "Use source override")
|
||||
complete -f -c apt-ftparchive -l readonly -d (_ "Make caching db readonly")
|
||||
complete -f -c apt-ftparchive -s v -l version -d (_ "Display version and exit")
|
||||
complete -r -c apt-ftparchive -s c -l config-file -d (_ "Use config file")
|
||||
complete -r -c apt-ftparchive -s o -l option -d (_ "Set config options")
|
||||
complete -c apt-ftparchive -s h -l help -d (N_ "Display help and exit")
|
||||
complete -f -c apt-ftparchive -a packages -d (N_ "Generate package from source")
|
||||
complete -f -c apt-ftparchive -a sources -d (N_ "Generate source index file")
|
||||
complete -f -c apt-ftparchive -a contents -d (N_ "Generate contents file")
|
||||
complete -f -c apt-ftparchive -a release -d (N_ "Generate release file")
|
||||
complete -f -c apt-ftparchive -a clean -d (N_ "Remove records")
|
||||
complete -f -c apt-ftparchive -l md5 -d (N_ "Generate MD5 sums")
|
||||
complete -f -c apt-ftparchive -s d -l db -d (N_ "Use a binary db")
|
||||
complete -f -c apt-ftparchive -s q -l quiet -d (N_ "Quiet mode")
|
||||
complete -f -c apt-ftparchive -l delink -d (N_ "Perform delinking")
|
||||
complete -f -c apt-ftparchive -l contents -d (N_ "Perform contents generation")
|
||||
complete -c apt-ftparchive -s s -l source-override -d (N_ "Use source override")
|
||||
complete -f -c apt-ftparchive -l readonly -d (N_ "Make caching db readonly")
|
||||
complete -f -c apt-ftparchive -s v -l version -d (N_ "Display version and exit")
|
||||
complete -r -c apt-ftparchive -s c -l config-file -d (N_ "Use config file")
|
||||
complete -r -c apt-ftparchive -s o -l option -d (N_ "Set config options")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#completion for apt-get
|
||||
|
||||
function __fish_apt_no_subcommand -d (_ 'Test if apt has yet to be given the subcommand')
|
||||
function __fish_apt_no_subcommand -d (N_ 'Test if apt has yet to be given the subcommand')
|
||||
for i in (commandline -opc)
|
||||
if contains -- $i update upgrade dselect-upgrade dist-upgrade install remove source build-dep check clean autoclean
|
||||
return 1
|
||||
@@ -9,7 +9,7 @@ function __fish_apt_no_subcommand -d (_ 'Test if apt has yet to be given the sub
|
||||
return 0
|
||||
end
|
||||
|
||||
function __fish_apt_use_package -d (_ 'Test if apt command should have packages as potential completion')
|
||||
function __fish_apt_use_package -d (N_ 'Test if apt command should have packages as potential completion')
|
||||
for i in (commandline -opc)
|
||||
if contains -- $i contains install remove build-dep
|
||||
return 0
|
||||
@@ -18,47 +18,47 @@ function __fish_apt_use_package -d (_ 'Test if apt command should have packages
|
||||
return 1
|
||||
end
|
||||
|
||||
complete -c apt-get -n '__fish_apt_use_package' -a '(__fish_print_packages)' -d (_ 'Package')
|
||||
complete -c apt-get -n '__fish_apt_use_package' -a '(__fish_print_packages)' -d (N_ 'Package')
|
||||
|
||||
complete -c apt-get -s h -l help -d (_ 'Display help and exit')
|
||||
complete -f -n '__fish_apt_no_subcommand' -c apt-get -a 'update' -d (_ 'Update sources')
|
||||
complete -f -n '__fish_apt_no_subcommand' -c apt-get -a 'upgrade' -d (_ 'Upgrade or install newest packages')
|
||||
complete -f -n '__fish_apt_no_subcommand' -c apt-get -a 'dselect-upgrade' -d (_ 'Use with dselect front-end')
|
||||
complete -f -n '__fish_apt_no_subcommand' -c apt-get -a 'dist-upgrade' -d (_ 'Distro upgrade')
|
||||
complete -f -n '__fish_apt_no_subcommand' -c apt-get -a 'install' -d (_ 'Install one or more packages')
|
||||
complete -f -n '__fish_apt_no_subcommand' -c apt-get -a 'remove' -d (_ 'Remove one or more packages')
|
||||
complete -f -n '__fish_apt_no_subcommand' -c apt-get -a 'source' -d (_ 'Fetch source packages')
|
||||
complete -f -n '__fish_apt_no_subcommand' -c apt-get -a 'build-dep' -d (_ 'Install/remove packages for dependencies')
|
||||
complete -f -n '__fish_apt_no_subcommand' -c apt-get -a 'check' -d (_ 'Update cache and check dependencies')
|
||||
complete -f -n '__fish_apt_no_subcommand' -c apt-get -a 'clean' -d (_ 'Clean local caches and packages')
|
||||
complete -f -n '__fish_apt_no_subcommand' -c apt-get -a 'autoclean' -d (_ 'Clean packages no longer be downloaded')
|
||||
complete -c apt-get -s d -l download-only -d (_ 'Download Only')
|
||||
complete -c apt-get -s f -l fix-broken -d (_ 'Correct broken dependencies')
|
||||
complete -c apt-get -s m -l fix-missing -d (_ 'Ignore missing packages')
|
||||
complete -c apt-get -l no-download -d (_ 'Disable downloading packages')
|
||||
complete -c apt-get -s q -l quiet -d (_ 'Quiet mode')
|
||||
complete -c apt-get -s s -l simulate -d (_ 'Perform a simulation')
|
||||
complete -c apt-get -s y -l assume-yes -d (_ 'Automatic yes to prompts')
|
||||
complete -c apt-get -s u -l show-upgraded -d (_ 'Show upgraded packages')
|
||||
complete -c apt-get -s V -l verbose-versions -d (_ 'Show full versions for packages')
|
||||
complete -c apt-get -s b -l compile -d (_ 'Compile source packages')
|
||||
complete -c apt-get -s b -l build -d (_ 'Compile source packages')
|
||||
complete -c apt-get -l ignore-hold -d (_ 'Ignore package Holds')
|
||||
complete -c apt-get -l no-upgrade -d (_ "Do not upgrade packages")
|
||||
complete -c apt-get -l force-yes -d (_ 'Force yes')
|
||||
complete -c apt-get -l print-uris -d (_ 'Print the URIs')
|
||||
complete -c apt-get -l purge -d (_ 'Use purge instead of remove')
|
||||
complete -c apt-get -l reinstall -d (_ 'Reinstall packages')
|
||||
complete -c apt-get -l list-cleanup -d (_ 'Erase obsolete files')
|
||||
complete -c apt-get -s t -l target-release -d (_ 'Control default input to the policy engine')
|
||||
complete -c apt-get -l trivial-only -d (_ 'Only perform operations that are trivial')
|
||||
complete -c apt-get -l no-remove -d (_ 'Abort if any packages are to be removed')
|
||||
complete -c apt-get -l only-source -d (_ 'Only accept source packages')
|
||||
complete -c apt-get -l diff-only -d (_ 'Download only diff file')
|
||||
complete -c apt-get -l tar-only -d (_ 'Download only tar file')
|
||||
complete -c apt-get -l arch-only -d (_ 'Only process arch-dependant build-dependencies')
|
||||
complete -c apt-get -l allow-unauthenticated -d (_ 'Ignore non-authenticated packages')
|
||||
complete -c apt-get -s v -l version -d (_ 'Display version and exit')
|
||||
complete -r -c apt-get -s c -l config-file -d (_ 'Specify a config file')
|
||||
complete -r -c apt-get -s o -l option -d (_ 'Set a config option')
|
||||
complete -c apt-get -s h -l help -d (N_ 'Display help and exit')
|
||||
complete -f -n '__fish_apt_no_subcommand' -c apt-get -a 'update' -d (N_ 'Update sources')
|
||||
complete -f -n '__fish_apt_no_subcommand' -c apt-get -a 'upgrade' -d (N_ 'Upgrade or install newest packages')
|
||||
complete -f -n '__fish_apt_no_subcommand' -c apt-get -a 'dselect-upgrade' -d (N_ 'Use with dselect front-end')
|
||||
complete -f -n '__fish_apt_no_subcommand' -c apt-get -a 'dist-upgrade' -d (N_ 'Distro upgrade')
|
||||
complete -f -n '__fish_apt_no_subcommand' -c apt-get -a 'install' -d (N_ 'Install one or more packages')
|
||||
complete -f -n '__fish_apt_no_subcommand' -c apt-get -a 'remove' -d (N_ 'Remove one or more packages')
|
||||
complete -f -n '__fish_apt_no_subcommand' -c apt-get -a 'source' -d (N_ 'Fetch source packages')
|
||||
complete -f -n '__fish_apt_no_subcommand' -c apt-get -a 'build-dep' -d (N_ 'Install/remove packages for dependencies')
|
||||
complete -f -n '__fish_apt_no_subcommand' -c apt-get -a 'check' -d (N_ 'Update cache and check dependencies')
|
||||
complete -f -n '__fish_apt_no_subcommand' -c apt-get -a 'clean' -d (N_ 'Clean local caches and packages')
|
||||
complete -f -n '__fish_apt_no_subcommand' -c apt-get -a 'autoclean' -d (N_ 'Clean packages no longer be downloaded')
|
||||
complete -c apt-get -s d -l download-only -d (N_ 'Download Only')
|
||||
complete -c apt-get -s f -l fix-broken -d (N_ 'Correct broken dependencies')
|
||||
complete -c apt-get -s m -l fix-missing -d (N_ 'Ignore missing packages')
|
||||
complete -c apt-get -l no-download -d (N_ 'Disable downloading packages')
|
||||
complete -c apt-get -s q -l quiet -d (N_ 'Quiet mode')
|
||||
complete -c apt-get -s s -l simulate -d (N_ 'Perform a simulation')
|
||||
complete -c apt-get -s y -l assume-yes -d (N_ 'Automatic yes to prompts')
|
||||
complete -c apt-get -s u -l show-upgraded -d (N_ 'Show upgraded packages')
|
||||
complete -c apt-get -s V -l verbose-versions -d (N_ 'Show full versions for packages')
|
||||
complete -c apt-get -s b -l compile -d (N_ 'Compile source packages')
|
||||
complete -c apt-get -s b -l build -d (N_ 'Compile source packages')
|
||||
complete -c apt-get -l ignore-hold -d (N_ 'Ignore package Holds')
|
||||
complete -c apt-get -l no-upgrade -d (N_ "Do not upgrade packages")
|
||||
complete -c apt-get -l force-yes -d (N_ 'Force yes')
|
||||
complete -c apt-get -l print-uris -d (N_ 'Print the URIs')
|
||||
complete -c apt-get -l purge -d (N_ 'Use purge instead of remove')
|
||||
complete -c apt-get -l reinstall -d (N_ 'Reinstall packages')
|
||||
complete -c apt-get -l list-cleanup -d (N_ 'Erase obsolete files')
|
||||
complete -c apt-get -s t -l target-release -d (N_ 'Control default input to the policy engine')
|
||||
complete -c apt-get -l trivial-only -d (N_ 'Only perform operations that are trivial')
|
||||
complete -c apt-get -l no-remove -d (N_ 'Abort if any packages are to be removed')
|
||||
complete -c apt-get -l only-source -d (N_ 'Only accept source packages')
|
||||
complete -c apt-get -l diff-only -d (N_ 'Download only diff file')
|
||||
complete -c apt-get -l tar-only -d (N_ 'Download only tar file')
|
||||
complete -c apt-get -l arch-only -d (N_ 'Only process arch-dependant build-dependencies')
|
||||
complete -c apt-get -l allow-unauthenticated -d (N_ 'Ignore non-authenticated packages')
|
||||
complete -c apt-get -s v -l version -d (N_ 'Display version and exit')
|
||||
complete -r -c apt-get -s c -l config-file -d (N_ 'Specify a config file')
|
||||
complete -r -c apt-get -s o -l option -d (N_ 'Set a config option')
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#apt-key
|
||||
complete -r -c apt-key -a add -d (_ "Add a new key")
|
||||
complete -f -c apt-key -a del -d (_ "Remove a key")
|
||||
complete -f -c apt-key -a list -d (_ "List trusted keys")
|
||||
complete -r -c apt-key -a add -d (N_ "Add a new key")
|
||||
complete -f -c apt-key -a del -d (N_ "Remove a key")
|
||||
complete -f -c apt-key -a list -d (N_ "List trusted keys")
|
||||
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
#apt-listbugs
|
||||
complete -c apt-listbugs -s h -l help -d (_ "Display help and exit")
|
||||
complete -f -c apt-listbugs -s s -l severity -a "critical grave" -d (_ "Set severity")
|
||||
complete -f -c apt-listbugs -s T -l tag -d (_ "Tags you want to see")
|
||||
complete -f -c apt-listbugs -s S -l stats -a "outstanding 'pending upload' resolved done open" -d (_ "Bug-status you want to see")
|
||||
complete -f -c apt-listbugs -s l -l showless -d (_ "Ignore bugs in your system")
|
||||
complete -f -c apt-listbugs -s g -l showgreater -d (_ "Ignore newer bugs than upgrade packages")
|
||||
complete -f -c apt-listbugs -s D -l show-downgrade -d (_ "Bugs for downgrade packages")
|
||||
complete -f -c apt-listbugs -s H -l hostname -a "osdn.debian.or.jp" -d (_ "Bug Tracking system")
|
||||
complete -f -c apt-listbugs -s p -l port -d (_ "Specify port for web interface")
|
||||
complete -f -c apt-listbugs -s R -l release-critical -d (_ "Use daily bug report")
|
||||
complete -f -c apt-listbugs -s I -l index -d (_ "Use the raw index.db")
|
||||
complete -f -c apt-listbugs -s X -l indexdir -d (_ "Specify index dir")
|
||||
complete -f -c apt-listbugs -s P -l pin-priority -d (_ "Specify Pin-Priority value")
|
||||
complete -f -c apt-listbugs -l title -d (_ "Specify the title of rss")
|
||||
complete -f -c apt-listbugs -s f -l force-download -d (_ "Retrieve fresh bugs")
|
||||
complete -f -c apt-listbugs -s q -l quiet -d (_ "Do not display progress bar")
|
||||
complete -f -c apt-listbugs -s c -l cache-dir -a "/var/cache/apt-listbugs/" -d (_ "Specify local cache dir")
|
||||
complete -f -c apt-listbugs -s t -l timer -d (_ "Specify the expire cache timer")
|
||||
complete -c apt-listbugs -s C -l aptconf -d (_ "Specify apt config file")
|
||||
complete -f -c apt-listbugs -s y -l force-yes -d (_ "Assume yes to all questions")
|
||||
complete -f -c apt-listbugs -s n -l force-no -d (_ "Assume no to all questions")
|
||||
complete -c apt-listbugs -a list -d (_ "List bugs from packages")
|
||||
complete -c apt-listbugs -a rss -d (_ "List bugs in rss format")
|
||||
complete -c apt-listbugs -s h -l help -d (N_ "Display help and exit")
|
||||
complete -f -c apt-listbugs -s s -l severity -a "critical grave" -d (N_ "Set severity")
|
||||
complete -f -c apt-listbugs -s T -l tag -d (N_ "Tags you want to see")
|
||||
complete -f -c apt-listbugs -s S -l stats -a "outstanding 'pending upload' resolved done open" -d (N_ "Bug-status you want to see")
|
||||
complete -f -c apt-listbugs -s l -l showless -d (N_ "Ignore bugs in your system")
|
||||
complete -f -c apt-listbugs -s g -l showgreater -d (N_ "Ignore newer bugs than upgrade packages")
|
||||
complete -f -c apt-listbugs -s D -l show-downgrade -d (N_ "Bugs for downgrade packages")
|
||||
complete -f -c apt-listbugs -s H -l hostname -a "osdn.debian.or.jp" -d (N_ "Bug Tracking system")
|
||||
complete -f -c apt-listbugs -s p -l port -d (N_ "Specify port for web interface")
|
||||
complete -f -c apt-listbugs -s R -l release-critical -d (N_ "Use daily bug report")
|
||||
complete -f -c apt-listbugs -s I -l index -d (N_ "Use the raw index.db")
|
||||
complete -f -c apt-listbugs -s X -l indexdir -d (N_ "Specify index dir")
|
||||
complete -f -c apt-listbugs -s P -l pin-priority -d (N_ "Specify Pin-Priority value")
|
||||
complete -f -c apt-listbugs -l title -d (N_ "Specify the title of rss")
|
||||
complete -f -c apt-listbugs -s f -l force-download -d (N_ "Retrieve fresh bugs")
|
||||
complete -f -c apt-listbugs -s q -l quiet -d (N_ "Do not display progress bar")
|
||||
complete -f -c apt-listbugs -s c -l cache-dir -a "/var/cache/apt-listbugs/" -d (N_ "Specify local cache dir")
|
||||
complete -f -c apt-listbugs -s t -l timer -d (N_ "Specify the expire cache timer")
|
||||
complete -c apt-listbugs -s C -l aptconf -d (N_ "Specify apt config file")
|
||||
complete -f -c apt-listbugs -s y -l force-yes -d (N_ "Assume yes to all questions")
|
||||
complete -f -c apt-listbugs -s n -l force-no -d (N_ "Assume no to all questions")
|
||||
complete -c apt-listbugs -a list -d (N_ "List bugs from packages")
|
||||
complete -c apt-listbugs -a rss -d (N_ "List bugs in rss format")
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#apt-listchanges
|
||||
complete -c apt-listchanges -l help -d (_ "Display help and exit")
|
||||
complete -c apt-listchanges -l apt -d (_ "Read filenames from pipe")
|
||||
complete -f -c apt-listchanges -s v -l verbose -d (_ "Verbose mode")
|
||||
complete -f -c apt-listchanges -s f -l frontend -a "pager browser xterm-pager xterm-browser text mail none" -d (_ "Select frontend interface")
|
||||
complete -r -f -c apt-listchanges -l email-address -d (_ "Specify email address")
|
||||
complete -f -c apt-listchanges -s c -l confirm -d (_ "Ask confirmation")
|
||||
complete -f -c apt-listchanges -s a -l all -d (_ "Display all changelogs")
|
||||
complete -r -c apt-listchanges -l save_seen -d (_ "Avoid changelogs from db in named file")
|
||||
complete -r -f -c apt-listchanges -l which -a "news changelogs both" -d (_ "Select display")
|
||||
complete -f -c apt-listchanges -s h -l headers -d (_ "Insert header")
|
||||
complete -f -c apt-listchanges -l debug -d (_ "Display debug info")
|
||||
complete -r -c apt-listchanges -l profile -d (_ "Select an option profile")
|
||||
complete -c apt-listchanges -l help -d (N_ "Display help and exit")
|
||||
complete -c apt-listchanges -l apt -d (N_ "Read filenames from pipe")
|
||||
complete -f -c apt-listchanges -s v -l verbose -d (N_ "Verbose mode")
|
||||
complete -f -c apt-listchanges -s f -l frontend -a "pager browser xterm-pager xterm-browser text mail none" -d (N_ "Select frontend interface")
|
||||
complete -r -f -c apt-listchanges -l email-address -d (N_ "Specify email address")
|
||||
complete -f -c apt-listchanges -s c -l confirm -d (N_ "Ask confirmation")
|
||||
complete -f -c apt-listchanges -s a -l all -d (N_ "Display all changelogs")
|
||||
complete -r -c apt-listchanges -l save_seen -d (N_ "Avoid changelogs from db in named file")
|
||||
complete -r -f -c apt-listchanges -l which -a "news changelogs both" -d (N_ "Select display")
|
||||
complete -f -c apt-listchanges -s h -l headers -d (N_ "Insert header")
|
||||
complete -f -c apt-listchanges -l debug -d (N_ "Display debug info")
|
||||
complete -r -c apt-listchanges -l profile -d (N_ "Select an option profile")
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
#apt-move
|
||||
complete -c apt-move -a get -d (_ "Generate master file")
|
||||
complete -c apt-move -a getlocal -d (_ "Alias for 'get'")
|
||||
complete -f -c apt-move -a move -d (_ "Move packages to local tree")
|
||||
complete -f -c apt-move -a delete -d (_ "Delete obsolete package files")
|
||||
complete -f -c apt-move -a packages -d (_ "Build new local files")
|
||||
complete -f -c apt-move -a fsck -d (_ "Rebuild index files")
|
||||
complete -f -c apt-move -a update -d (_ "Move packages from cache to local mirror")
|
||||
complete -f -c apt-move -a local -d (_ "Alias for 'move delete packages'")
|
||||
complete -f -c apt-move -a localupdate -d (_ "Alias for 'update'")
|
||||
complete -f -c apt-move -a mirror -d (_ "Download package missing from mirror")
|
||||
complete -f -c apt-move -a sync -d (_ "Sync packages installed")
|
||||
complete -c apt-move -a get -d (N_ "Generate master file")
|
||||
complete -c apt-move -a getlocal -d (N_ "Alias for 'get'")
|
||||
complete -f -c apt-move -a move -d (N_ "Move packages to local tree")
|
||||
complete -f -c apt-move -a delete -d (N_ "Delete obsolete package files")
|
||||
complete -f -c apt-move -a packages -d (N_ "Build new local files")
|
||||
complete -f -c apt-move -a fsck -d (N_ "Rebuild index files")
|
||||
complete -f -c apt-move -a update -d (N_ "Move packages from cache to local mirror")
|
||||
complete -f -c apt-move -a local -d (N_ "Alias for 'move delete packages'")
|
||||
complete -f -c apt-move -a localupdate -d (N_ "Alias for 'update'")
|
||||
complete -f -c apt-move -a mirror -d (N_ "Download package missing from mirror")
|
||||
complete -f -c apt-move -a sync -d (N_ "Sync packages installed")
|
||||
complete -f -c apt-move -a exclude -d 'test $LOCALDIR/.exclude file'
|
||||
complete -c apt-move -a movefile -d (_ "Move file specified on commandline")
|
||||
complete -f -c apt-move -a listbin -d (_ "List packages that may serve as input to mirrorbin or mirrorsource" )
|
||||
complete -f -c apt-move -a mirrorbin -d (_ "Fetch package from STDIN")
|
||||
complete -f -c apt-move -a mirrorsrc -d (_ "Fetch source package from STDIN")
|
||||
complete -f -c apt-move -s a -d (_ "Process all packages")
|
||||
complete -c apt-move -s c -d (_ "Use specific conffile")
|
||||
complete -f -c apt-move -s f -d (_ "Force deletion")
|
||||
complete -f -c apt-move -s q -d (_ "Suppresses normal output")
|
||||
complete -f -c apt-move -s t -d (_ "Test run")
|
||||
complete -c apt-move -a movefile -d (N_ "Move file specified on commandline")
|
||||
complete -f -c apt-move -a listbin -d (N_ "List packages that may serve as input to mirrorbin or mirrorsource" )
|
||||
complete -f -c apt-move -a mirrorbin -d (N_ "Fetch package from STDIN")
|
||||
complete -f -c apt-move -a mirrorsrc -d (N_ "Fetch source package from STDIN")
|
||||
complete -f -c apt-move -s a -d (N_ "Process all packages")
|
||||
complete -c apt-move -s c -d (N_ "Use specific conffile")
|
||||
complete -f -c apt-move -s f -d (N_ "Force deletion")
|
||||
complete -f -c apt-move -s q -d (N_ "Suppresses normal output")
|
||||
complete -f -c apt-move -s t -d (N_ "Test run")
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#apt-proxy-import
|
||||
complete -c apt-proxy-import -s h -l help -d (_ 'Display help and exit')
|
||||
complete -f -c apt-proxy-import -s V -l version -d (_ 'Display version and exit')
|
||||
complete -f -c apt-proxy-import -s v -l verbose -d (_ 'Verbose mode')
|
||||
complete -f -c apt-proxy-import -s q -l quiet -d (_ 'No message to STDOUT')
|
||||
complete -f -c apt-proxy-import -s r -l recursive -d (_ 'Recurse into subdir')
|
||||
complete -r -c apt-proxy-import -s i -l import-dir -a '(ls -Fp|grep /$)' -d (_ 'Dir to import')
|
||||
complete -r -c apt-proxy-import -s u -l user -a '(__fish_complete_users)' -d (_ 'Change to user')
|
||||
complete -r -c apt-proxy-import -s d -l debug -d (_ 'Debug level[default 0]')
|
||||
complete -c apt-proxy-import -s h -l help -d (N_ 'Display help and exit')
|
||||
complete -f -c apt-proxy-import -s V -l version -d (N_ 'Display version and exit')
|
||||
complete -f -c apt-proxy-import -s v -l verbose -d (N_ 'Verbose mode')
|
||||
complete -f -c apt-proxy-import -s q -l quiet -d (N_ 'No message to STDOUT')
|
||||
complete -f -c apt-proxy-import -s r -l recursive -d (N_ 'Recurse into subdir')
|
||||
complete -r -c apt-proxy-import -s i -l import-dir -a '(ls -Fp|grep /$)' -d (N_ 'Dir to import')
|
||||
complete -r -c apt-proxy-import -s u -l user -a '(__fish_complete_users)' -d (N_ 'Change to user')
|
||||
complete -r -c apt-proxy-import -s d -l debug -d (N_ 'Debug level[default 0]')
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#apt-rdepends
|
||||
complete -c apt-rdepends -l help -d (_ "Display help and exit")
|
||||
complete -f -c apt-rdepends -s b -l build-depends -d (_ "Show build dependencies")
|
||||
complete -f -c apt-rdepends -s d -l dotty -d (_ "Generate a dotty graph")
|
||||
complete -f -c apt-rdepends -s p -l print-state -d (_ "Show state of dependencies")
|
||||
complete -f -c apt-rdepends -s r -l reverse -d (_ "List packages depending on")
|
||||
complete -r -f -c apt-rdepends -s f -l follow -d (_ "Comma-separated list of dependancy types to follow recursively")
|
||||
complete -r -f -c apt-rdepends -s s -l show -d (_ "Comma-separated list of dependancy types to show")
|
||||
complete -r -f -c apt-rdepends -l state-follow -d (_ "Comma-separated list of package installation states to follow recursively")
|
||||
complete -r -f -c apt-rdepends -l state-show -d (_ "Comma-separated list of package installation states to show")
|
||||
complete -f -c apt-rdepends -l man -d (_ "Display man page")
|
||||
complete -f -c apt-rdepends -l version -d (_ "Display version and exit")
|
||||
complete -c apt-rdepends -l help -d (N_ "Display help and exit")
|
||||
complete -f -c apt-rdepends -s b -l build-depends -d (N_ "Show build dependencies")
|
||||
complete -f -c apt-rdepends -s d -l dotty -d (N_ "Generate a dotty graph")
|
||||
complete -f -c apt-rdepends -s p -l print-state -d (N_ "Show state of dependencies")
|
||||
complete -f -c apt-rdepends -s r -l reverse -d (N_ "List packages depending on")
|
||||
complete -r -f -c apt-rdepends -s f -l follow -d (N_ "Comma-separated list of dependancy types to follow recursively")
|
||||
complete -r -f -c apt-rdepends -s s -l show -d (N_ "Comma-separated list of dependancy types to show")
|
||||
complete -r -f -c apt-rdepends -l state-follow -d (N_ "Comma-separated list of package installation states to follow recursively")
|
||||
complete -r -f -c apt-rdepends -l state-show -d (N_ "Comma-separated list of package installation states to show")
|
||||
complete -f -c apt-rdepends -l man -d (N_ "Display man page")
|
||||
complete -f -c apt-rdepends -l version -d (N_ "Display version and exit")
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#apt-setup
|
||||
complete -c apt-setup -a probe -d (_ "Probe a CD")
|
||||
complete -c apt-setup -s N -d (_ "Run in noninteractive mode")
|
||||
complete -c apt-setup -a probe -d (N_ "Probe a CD")
|
||||
complete -c apt-setup -s N -d (N_ "Run in noninteractive mode")
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#apt-show-source
|
||||
complete -c apt-show-source -s h -l help -d (_ 'Display help and exit')
|
||||
complete -r -c apt-show-source -l status-file -d (_ 'Read package from file') -f
|
||||
complete -r -c apt-show-source -o stf -d (_ 'Read package from file') -f
|
||||
complete -r -c apt-show-source -l list-dir -a '(ls -Fp .|grep /$) /var/lib/apt/lists' -d (_ 'Specify APT list dir')
|
||||
complete -r -c apt-show-source -o ld -a '(ls -Fp .|grep /$) /var/lib/apt/lists' -d (_ 'Specify APT list dir')
|
||||
complete -r -c apt-show-source -s p -l package -a '(apt-cache pkgnames)' -d (_ 'List PKG info')
|
||||
complete -f -c apt-show-source -l version-only -d (_ 'Display version and exit')
|
||||
complete -f -c apt-show-source -s a -l all -d (_ 'Print all source packages with version')
|
||||
complete -f -c apt-show-source -s v -l verbose -d (_ 'Verbose mode')
|
||||
complete -c apt-show-source -s h -l help -d (N_ 'Display help and exit')
|
||||
complete -r -c apt-show-source -l status-file -d (N_ 'Read package from file') -f
|
||||
complete -r -c apt-show-source -o stf -d (N_ 'Read package from file') -f
|
||||
complete -r -c apt-show-source -l list-dir -a '(ls -Fp .|grep /$) /var/lib/apt/lists' -d (N_ 'Specify APT list dir')
|
||||
complete -r -c apt-show-source -o ld -a '(ls -Fp .|grep /$) /var/lib/apt/lists' -d (N_ 'Specify APT list dir')
|
||||
complete -r -c apt-show-source -s p -l package -a '(apt-cache pkgnames)' -d (N_ 'List PKG info')
|
||||
complete -f -c apt-show-source -l version-only -d (N_ 'Display version and exit')
|
||||
complete -f -c apt-show-source -s a -l all -d (N_ 'Print all source packages with version')
|
||||
complete -f -c apt-show-source -s v -l verbose -d (N_ 'Verbose mode')
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#apt-show-versions
|
||||
complete -c apt-show-source -s h -l help -d (_ 'Display help and exit')
|
||||
complete -r -c apt-show-versions -s p -l packages -a '(apt-cache pkgnames)' -d (_ 'Print PKG versions')
|
||||
complete -f -c apt-show-versions -s r -l regex -d (_ 'Using regex')
|
||||
complete -f -c apt-show-versions -s u -l upgradeable -d (_ 'Print only upgradeable packages')
|
||||
complete -f -c apt-show-versions -s a -l allversions -d (_ 'Print all versions')
|
||||
complete -f -c apt-show-versions -s b -l brief -d (_ 'Print package name/distro')
|
||||
complete -f -c apt-show-versions -s v -l verbose -d (_ 'Print verbose info')
|
||||
complete -f -c apt-show-versions -s i -l initialize -d (_ 'Init or update cache only')
|
||||
complete -r -c apt-show-versions -l status-file -d (_ 'Read package from file')
|
||||
complete -r -c apt-show-versions -o stf -d (_ 'Read package from file')
|
||||
complete -r -c apt-show-versions -l list-dir -a '(ls -Fp .|grep /$) /var/lib/apt/lists /var/state/apt/lists' -d (_ 'Specify APT list dir')
|
||||
complete -r -c apt-show-versions -o ld -a '(ls -Fp .|grep /$) /var/lib/apt/lists /var/state/apt/lists' -d (_ 'Specify APT list dir')
|
||||
complete -c apt-show-source -s h -l help -d (N_ 'Display help and exit')
|
||||
complete -r -c apt-show-versions -s p -l packages -a '(apt-cache pkgnames)' -d (N_ 'Print PKG versions')
|
||||
complete -f -c apt-show-versions -s r -l regex -d (N_ 'Using regex')
|
||||
complete -f -c apt-show-versions -s u -l upgradeable -d (N_ 'Print only upgradeable packages')
|
||||
complete -f -c apt-show-versions -s a -l allversions -d (N_ 'Print all versions')
|
||||
complete -f -c apt-show-versions -s b -l brief -d (N_ 'Print package name/distro')
|
||||
complete -f -c apt-show-versions -s v -l verbose -d (N_ 'Print verbose info')
|
||||
complete -f -c apt-show-versions -s i -l initialize -d (N_ 'Init or update cache only')
|
||||
complete -r -c apt-show-versions -l status-file -d (N_ 'Read package from file')
|
||||
complete -r -c apt-show-versions -o stf -d (N_ 'Read package from file')
|
||||
complete -r -c apt-show-versions -l list-dir -a '(ls -Fp .|grep /$) /var/lib/apt/lists /var/state/apt/lists' -d (N_ 'Specify APT list dir')
|
||||
complete -r -c apt-show-versions -o ld -a '(ls -Fp .|grep /$) /var/lib/apt/lists /var/state/apt/lists' -d (N_ 'Specify APT list dir')
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#apt-sortpkgs
|
||||
complete -c apt-sortpkgs -s h -l help -d (_ "Display help and exit")
|
||||
complete -f -c apt-sortpkgs -s s -l source -d (_ "Use source index field")
|
||||
complete -f -c apt-sortpkgs -s v -l version -d (_ "Display version and exit")
|
||||
complete -r -c apt-sortpkgs -s c -l conf-file -d (_ "Specify conffile")
|
||||
complete -r -f -c apt-sortpkgs -s o -l option -d (_ "Set config options")
|
||||
complete -c apt-sortpkgs -s h -l help -d (N_ "Display help and exit")
|
||||
complete -f -c apt-sortpkgs -s s -l source -d (N_ "Use source index field")
|
||||
complete -f -c apt-sortpkgs -s v -l version -d (N_ "Display version and exit")
|
||||
complete -r -c apt-sortpkgs -s c -l conf-file -d (N_ "Specify conffile")
|
||||
complete -r -f -c apt-sortpkgs -s o -l option -d (N_ "Set config options")
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
#apt-spy
|
||||
complete -c apt-spy -s h -d (_ "Display help and exit")
|
||||
complete -f -c apt-spy -s d -a "stable testing unstable" -d (_ "Debian distribution")
|
||||
complete -f -c apt-spy -s a -a "Africa Asia Europe North-America Oceania South-America" -d (_ "Servers in the areas")
|
||||
complete -c apt-spy -s c -d (_ "Conf file")
|
||||
complete -f -c apt-spy -s e -d (_ "Finish after number of servers")
|
||||
complete -c apt-spy -s f -d (_ "File to grab servers")
|
||||
complete -c apt-spy -s i -d (_ "File as input")
|
||||
complete -c apt-spy -s m -d (_ "Mirror-list file")
|
||||
complete -c apt-spy -s o -d (_ "Output sources.list file")
|
||||
complete -f -c apt-spy -s p -d (_ "Use proxy server")
|
||||
complete -f -c apt-spy -s s -d (_ "Comma separated country list")
|
||||
complete -f -c apt-spy -s t -d (_ "How long in sec to download")
|
||||
complete -f -c apt-spy -s u -d (_ "Custom URL to get mirror list")
|
||||
complete -c apt-spy -s w -d (_ "Write top servers to file")
|
||||
complete -f -c apt-spy -s n -d (_ "Number of top servers")
|
||||
complete -f -c apt-spy -a "update" -d (_ "Update mirror list")
|
||||
complete -f -c apt-spy -s v -d (_ "Version number")
|
||||
complete -c apt-spy -s h -d (N_ "Display help and exit")
|
||||
complete -f -c apt-spy -s d -a "stable testing unstable" -d (N_ "Debian distribution")
|
||||
complete -f -c apt-spy -s a -a "Africa Asia Europe North-America Oceania South-America" -d (N_ "Servers in the areas")
|
||||
complete -c apt-spy -s c -d (N_ "Conf file")
|
||||
complete -f -c apt-spy -s e -d (N_ "Finish after number of servers")
|
||||
complete -c apt-spy -s f -d (N_ "File to grab servers")
|
||||
complete -c apt-spy -s i -d (N_ "File as input")
|
||||
complete -c apt-spy -s m -d (N_ "Mirror-list file")
|
||||
complete -c apt-spy -s o -d (N_ "Output sources.list file")
|
||||
complete -f -c apt-spy -s p -d (N_ "Use proxy server")
|
||||
complete -f -c apt-spy -s s -d (N_ "Comma separated country list")
|
||||
complete -f -c apt-spy -s t -d (N_ "How long in sec to download")
|
||||
complete -f -c apt-spy -s u -d (N_ "Custom URL to get mirror list")
|
||||
complete -c apt-spy -s w -d (N_ "Write top servers to file")
|
||||
complete -f -c apt-spy -s n -d (N_ "Number of top servers")
|
||||
complete -f -c apt-spy -a "update" -d (N_ "Update mirror list")
|
||||
complete -f -c apt-spy -s v -d (N_ "Version number")
|
||||
|
||||
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
#apt-src
|
||||
complete -c apt-src -s h -l help -d (_ "Display help and exit")
|
||||
complete -f -c apt-src -a "update" -d (_ "Update list of source packages")
|
||||
complete -f -c apt-src -a "install" -d (_ "Install source packages")
|
||||
complete -f -c apt-src -a "upgrade" -d (_ "Upgrade source packages")
|
||||
complete -f -c apt-src -a "remove" -d (_ "Remove source packages")
|
||||
complete -f -c apt-src -a "build" -d (_ "Build source packages")
|
||||
complete -f -c apt-src -a "clean" -d (_ "Clean source packages")
|
||||
complete -f -c apt-src -a "import" -d (_ "Detect known source tree")
|
||||
complete -f -c apt-src -a "list" -d (_ "List installed source package\(s\)")
|
||||
complete -f -c apt-src -a "location" -d (_ "Root source tree")
|
||||
complete -f -c apt-src -a "version" -d (_ "Version of source package")
|
||||
complete -f -c apt-src -a "name" -d (_ "Name of the source package")
|
||||
complete -f -c apt-src -s b -l build -d (_ "Build source packages")
|
||||
complete -f -c apt-src -s i -l installdebs -d (_ "Install after build")
|
||||
complete -f -c apt-src -s p -l patch -d (_ "Patch local changes")
|
||||
complete -r -c apt-src -s l -l location -d (_ "Specify a dir")
|
||||
complete -c apt-src -s c -l here -d (_ "Run on current dir")
|
||||
complete -f -c apt-src -l upstream-version -d (_ "Omit debian version")
|
||||
complete -f -c apt-src -s k -l keep-built -d (_ "Do not del built files")
|
||||
complete -f -c apt-src -s n -l no-delete-source -d (_ "Do not del source files")
|
||||
complete -f -c apt-src -l version -d (_ "Source tree version")
|
||||
complete -f -c apt-src -s q -l quiet -d (_ "Output to /dev/null")
|
||||
complete -f -c apt-src -s t -l trace -d (_ "Output trace")
|
||||
complete -c apt-src -s h -l help -d (N_ "Display help and exit")
|
||||
complete -f -c apt-src -a "update" -d (N_ "Update list of source packages")
|
||||
complete -f -c apt-src -a "install" -d (N_ "Install source packages")
|
||||
complete -f -c apt-src -a "upgrade" -d (N_ "Upgrade source packages")
|
||||
complete -f -c apt-src -a "remove" -d (N_ "Remove source packages")
|
||||
complete -f -c apt-src -a "build" -d (N_ "Build source packages")
|
||||
complete -f -c apt-src -a "clean" -d (N_ "Clean source packages")
|
||||
complete -f -c apt-src -a "import" -d (N_ "Detect known source tree")
|
||||
complete -f -c apt-src -a "list" -d (N_ "List installed source package\(s\)")
|
||||
complete -f -c apt-src -a "location" -d (N_ "Root source tree")
|
||||
complete -f -c apt-src -a "version" -d (N_ "Version of source package")
|
||||
complete -f -c apt-src -a "name" -d (N_ "Name of the source package")
|
||||
complete -f -c apt-src -s b -l build -d (N_ "Build source packages")
|
||||
complete -f -c apt-src -s i -l installdebs -d (N_ "Install after build")
|
||||
complete -f -c apt-src -s p -l patch -d (N_ "Patch local changes")
|
||||
complete -r -c apt-src -s l -l location -d (N_ "Specify a dir")
|
||||
complete -c apt-src -s c -l here -d (N_ "Run on current dir")
|
||||
complete -f -c apt-src -l upstream-version -d (N_ "Omit debian version")
|
||||
complete -f -c apt-src -s k -l keep-built -d (N_ "Do not del built files")
|
||||
complete -f -c apt-src -s n -l no-delete-source -d (N_ "Do not del source files")
|
||||
complete -f -c apt-src -l version -d (N_ "Source tree version")
|
||||
complete -f -c apt-src -s q -l quiet -d (N_ "Output to /dev/null")
|
||||
complete -f -c apt-src -s t -l trace -d (N_ "Output trace")
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#apt-zip-inst
|
||||
complete -c apt-zip-inst -s h -l help -d (_ "Display help and exit")
|
||||
complete -f -c apt-zip-inst -s V -l version -d (_ "Display version and exit")
|
||||
complete -c apt-zip-inst -s m -l medium -d (_ "Removable medium")
|
||||
complete -f -c apt-zip-inst -s a -l aptgetaction -a "dselect-upgrade upgrade dist-upgrade" -d (_ "Select an action")
|
||||
complete -c apt-zip-inst -s p -l packages -d (_ "List of packages to install")
|
||||
complete -f -c apt-zip-inst -s f -l fix-broken -d (_ "Fix broken option")
|
||||
complete -c apt-zip-inst -l skip-mount -d (_ "Specify a non-mountpoint dir")
|
||||
complete -c apt-zip-inst -s h -l help -d (N_ "Display help and exit")
|
||||
complete -f -c apt-zip-inst -s V -l version -d (N_ "Display version and exit")
|
||||
complete -c apt-zip-inst -s m -l medium -d (N_ "Removable medium")
|
||||
complete -f -c apt-zip-inst -s a -l aptgetaction -a "dselect-upgrade upgrade dist-upgrade" -d (N_ "Select an action")
|
||||
complete -c apt-zip-inst -s p -l packages -d (N_ "List of packages to install")
|
||||
complete -f -c apt-zip-inst -s f -l fix-broken -d (N_ "Fix broken option")
|
||||
complete -c apt-zip-inst -l skip-mount -d (N_ "Specify a non-mountpoint dir")
|
||||
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#apt-zip-list
|
||||
complete -c apt-zip-list -s h -l help -d (_ "Display help and exit")
|
||||
complete -f -c apt-zip-list -s V -l version -d (_ "Display version and exit")
|
||||
complete -c apt-zip-list -s m -l medium -d (_ "Removable medium")
|
||||
complete -f -c apt-zip-list -s a -l aptgetaction -a "dselect-upgrade upgrade dist-upgrade" -d (_ "Select an action")
|
||||
complete -c apt-zip-list -s p -l packages -d (_ "List of packages to install")
|
||||
complete -f -c apt-zip-list -s f -l fix-broken -d (_ "Fix broken option")
|
||||
complete -c apt-zip-list -l skip-mount -d (_ "Specify a non-mountpoint dir")
|
||||
complete -c apt-zip-list -s M -l method -d (_ "Select a method")
|
||||
complete -c apt-zip-list -s o -l options -a "tar restart" -d (_ "Specify options")
|
||||
complete -c apt-zip-list -s A -l accept -a "http ftp" -d (_ "Accept protocols")
|
||||
complete -c apt-zip-list -s R -l reject -a "http ftp" -d (_ "Reject protocols")
|
||||
complete -c apt-zip-list -s h -l help -d (N_ "Display help and exit")
|
||||
complete -f -c apt-zip-list -s V -l version -d (N_ "Display version and exit")
|
||||
complete -c apt-zip-list -s m -l medium -d (N_ "Removable medium")
|
||||
complete -f -c apt-zip-list -s a -l aptgetaction -a "dselect-upgrade upgrade dist-upgrade" -d (N_ "Select an action")
|
||||
complete -c apt-zip-list -s p -l packages -d (N_ "List of packages to install")
|
||||
complete -f -c apt-zip-list -s f -l fix-broken -d (N_ "Fix broken option")
|
||||
complete -c apt-zip-list -l skip-mount -d (N_ "Specify a non-mountpoint dir")
|
||||
complete -c apt-zip-list -s M -l method -d (N_ "Select a method")
|
||||
complete -c apt-zip-list -s o -l options -a "tar restart" -d (N_ "Specify options")
|
||||
complete -c apt-zip-list -s A -l accept -a "http ftp" -d (N_ "Accept protocols")
|
||||
complete -c apt-zip-list -s R -l reject -a "http ftp" -d (N_ "Reject protocols")
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#completion for arp
|
||||
complete -c arp -s v -l verbose -d (_ "Verbose mode")
|
||||
complete -c arp -s n -l numeric -d (_ "Numerical address")
|
||||
complete -x -c arp -s H -l tw-type -a "ether arcnet pronet ax25 netrom" -d (_ "Class of hw type")
|
||||
complete -c arp -s a -l display -x -a "(__fish_print_hostnames)" -d (_ "Show arp entries")
|
||||
complete -x -c arp -s d -l delete -a "(__fish_print_hostnames)" -d (_ "Remove an entry for hostname")
|
||||
complete -c arp -s D -l use-device -d (_ "Use hardware address")
|
||||
complete -x -c arp -s i -l device -a "(__fish_print_interfaces)" -d (_ "Select interface")
|
||||
complete -x -c arp -s s -l set -d (_ "Manually create ARP address") -a "(__fish_print_hostnames)"
|
||||
complete -f -c arp -s f -l file -d (_ "Take addr from filename, default /etc/ethers")
|
||||
complete -c arp -s v -l verbose -d (N_ "Verbose mode")
|
||||
complete -c arp -s n -l numeric -d (N_ "Numerical address")
|
||||
complete -x -c arp -s H -l tw-type -a "ether arcnet pronet ax25 netrom" -d (N_ "Class of hw type")
|
||||
complete -c arp -s a -l display -x -a "(__fish_print_hostnames)" -d (N_ "Show arp entries")
|
||||
complete -x -c arp -s d -l delete -a "(__fish_print_hostnames)" -d (N_ "Remove an entry for hostname")
|
||||
complete -c arp -s D -l use-device -d (N_ "Use hardware address")
|
||||
complete -x -c arp -s i -l device -a "(__fish_print_interfaces)" -d (N_ "Select interface")
|
||||
complete -x -c arp -s s -l set -d (N_ "Manually create ARP address") -a "(__fish_print_hostnames)"
|
||||
complete -f -c arp -s f -l file -d (N_ "Take addr from filename, default /etc/ethers")
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#at
|
||||
complete -f -c at -s V -d (_ "Display version and exit")
|
||||
complete -f -c at -s q -d (_ "Use specified queue")
|
||||
complete -f -c at -s m -d (_ "Send mail to user")
|
||||
complete -c at -s f -x -a "(__fish_complete_suffix (commandline -ct) '' 'At job')" -d (_ "Read job from file")
|
||||
complete -f -c at -s l -d (_ "Alias for atq")
|
||||
complete -f -c at -s d -d (_ "Alias for atrm")
|
||||
complete -f -c at -s v -d (_ "Show the time")
|
||||
complete -f -c at -s c -d (_ "Print the jobs listed")
|
||||
complete -f -c at -s V -d (N_ "Display version and exit")
|
||||
complete -f -c at -s q -d (N_ "Use specified queue")
|
||||
complete -f -c at -s m -d (N_ "Send mail to user")
|
||||
complete -c at -s f -x -a "(__fish_complete_suffix (commandline -ct) '' 'At job')" -d (N_ "Read job from file")
|
||||
complete -f -c at -s l -d (N_ "Alias for atq")
|
||||
complete -f -c at -s d -d (N_ "Alias for atrm")
|
||||
complete -f -c at -s v -d (N_ "Show the time")
|
||||
complete -f -c at -s c -d (N_ "Print the jobs listed")
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#atd
|
||||
complete -f -c atd -s l -d (_ "Limiting load factor")
|
||||
complete -f -c atd -s b -d (_ "Minimum interval in seconds")
|
||||
complete -f -c atd -s d -d (_ "Debug mode")
|
||||
complete -f -c atd -s s -d (_ "Process at queue only once")
|
||||
complete -f -c atd -s l -d (N_ "Limiting load factor")
|
||||
complete -f -c atd -s b -d (N_ "Minimum interval in seconds")
|
||||
complete -f -c atd -s d -d (N_ "Debug mode")
|
||||
complete -f -c atd -s s -d (N_ "Process at queue only once")
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#atq
|
||||
complete -f -c atq -s V -d (_ "Display version and exit")
|
||||
complete -f -c atq -s q -d (_ "Use specified queue")
|
||||
complete -f -c atq -s V -d (N_ "Display version and exit")
|
||||
complete -f -c atq -s q -d (N_ "Use specified queue")
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#atrm
|
||||
complete -f -c atrm -s V -d (_ "Display version and exit")
|
||||
complete -f -c atrm -s V -d (N_ "Display version and exit")
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# Completions for the binary calculator
|
||||
|
||||
complete -c bc -s i -l interactive -d (_ "Force interactive mode")
|
||||
complete -c bc -s l -l math-lib -d (_ "Define math library")
|
||||
complete -c bc -s w -l warn -d (_ "Give warnings for extensions to POSIX bc")
|
||||
complete -c bc -s s -l standard -d (_ "Process exactly POSIX bc")
|
||||
complete -c bc -s q -l quiet -d (_ "Do not print the GNU welcome")
|
||||
complete -c bc -s v -l version -d (_ "Display version and exit")
|
||||
complete -c bc -s h -l help -d (_ "Display help and exit")
|
||||
complete -c bc -s i -l interactive -d (N_ "Force interactive mode")
|
||||
complete -c bc -s l -l math-lib -d (N_ "Define math library")
|
||||
complete -c bc -s w -l warn -d (N_ "Give warnings for extensions to POSIX bc")
|
||||
complete -c bc -s s -l standard -d (N_ "Process exactly POSIX bc")
|
||||
complete -c bc -s q -l quiet -d (N_ "Do not print the GNU welcome")
|
||||
complete -c bc -s v -l version -d (N_ "Display version and exit")
|
||||
complete -c bc -s h -l help -d (N_ "Display help and exit")
|
||||
|
||||
@@ -6,10 +6,10 @@ complete -c bunzip2 -x -a "(
|
||||
)
|
||||
"
|
||||
|
||||
complete -c bunzip2 -s c -l stdout -d (_ "Decompress to stdout")
|
||||
complete -c bunzip2 -s f -l force -d (_ "Overwrite")
|
||||
complete -c bunzip2 -s k -l keep -d (_ "Do not overwrite")
|
||||
complete -c bunzip2 -s s -l small -d (_ "Reduce memory usage")
|
||||
complete -c bunzip2 -s v -l verbose -d (_ "Print compression ratios")
|
||||
complete -c bunzip2 -s L -l license -d (_ "Print license")
|
||||
complete -c bunzip2 -s V -l version -d (_ "Display version and exit")
|
||||
complete -c bunzip2 -s c -l stdout -d (N_ "Decompress to stdout")
|
||||
complete -c bunzip2 -s f -l force -d (N_ "Overwrite")
|
||||
complete -c bunzip2 -s k -l keep -d (N_ "Do not overwrite")
|
||||
complete -c bunzip2 -s s -l small -d (N_ "Reduce memory usage")
|
||||
complete -c bunzip2 -s v -l verbose -d (N_ "Print compression ratios")
|
||||
complete -c bunzip2 -s L -l license -d (N_ "Print license")
|
||||
complete -c bunzip2 -s V -l version -d (N_ "Display version and exit")
|
||||
|
||||
@@ -5,4 +5,4 @@ complete -c bzcat -x -a "(
|
||||
__fish_complete_suffix (commandline -ct) .tbz2 'Compressed archive'
|
||||
)
|
||||
"
|
||||
complete -c bzcat -s s -l small -d (_ "Reduce memory usage")
|
||||
complete -c bzcat -s s -l small -d (N_ "Reduce memory usage")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
complete -c bzip2 -s c -l stdout -d (_ "Compress to stdout")
|
||||
complete -c bzip2 -s c -l stdout -d (N_ "Compress to stdout")
|
||||
complete -c bzip2 -s d -l decompress -x -a "(
|
||||
__fish_complete_suffix (commandline -ct) .bz 'Compressed file'
|
||||
__fish_complete_suffix (commandline -ct) .bz2 'Compressed file'
|
||||
@@ -6,14 +6,14 @@ complete -c bzip2 -s d -l decompress -x -a "(
|
||||
__fish_complete_suffix (commandline -ct) .tbz2 'Compressed archive'
|
||||
)
|
||||
"
|
||||
complete -c bzip2 -s z -l compress -d (_ "Compress file")
|
||||
complete -c bzip2 -s t -l test -d (_ "Check integrity")
|
||||
complete -c bzip2 -s f -l force -d (_ "Overwrite")
|
||||
complete -c bzip2 -s k -l keep -d (_ "Do not overwrite")
|
||||
complete -c bzip2 -s s -l small -d (_ "Reduce memory usage")
|
||||
complete -c bzip2 -s q -l quiet -d (_ "Supress errors")
|
||||
complete -c bzip2 -s v -l verbose -d (_ "Print compression ratios")
|
||||
complete -c bzip2 -s L -l license -d (_ "Print license")
|
||||
complete -c bzip2 -s V -l version -d (_ "Display version and exit")
|
||||
complete -c bzip2 -s 1 -l fast -d (_ "Small block size")
|
||||
complete -c bzip2 -s 9 -l best -d (_ "Large block size")
|
||||
complete -c bzip2 -s z -l compress -d (N_ "Compress file")
|
||||
complete -c bzip2 -s t -l test -d (N_ "Check integrity")
|
||||
complete -c bzip2 -s f -l force -d (N_ "Overwrite")
|
||||
complete -c bzip2 -s k -l keep -d (N_ "Do not overwrite")
|
||||
complete -c bzip2 -s s -l small -d (N_ "Reduce memory usage")
|
||||
complete -c bzip2 -s q -l quiet -d (N_ "Supress errors")
|
||||
complete -c bzip2 -s v -l verbose -d (N_ "Print compression ratios")
|
||||
complete -c bzip2 -s L -l license -d (N_ "Print license")
|
||||
complete -c bzip2 -s V -l version -d (N_ "Display version and exit")
|
||||
complete -c bzip2 -s 1 -l fast -d (N_ "Small block size")
|
||||
complete -c bzip2 -s 9 -l best -d (N_ "Large block size")
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
complete -c cat -s A -l show-all -d (_ "Escape all non-printing characters")
|
||||
complete -c cat -s b -l number-nonblank -d (_ "Number nonblank lines")
|
||||
complete -c cat -s e -d (_ "Escape non-printing characters except tab")
|
||||
complete -c cat -s E -l show-ends -d (_ "Display \$ at end of line")
|
||||
complete -c cat -s n -l number -d (_ "Number all lines")
|
||||
complete -c cat -s s -l squeeze-blank -d (_ "Never more than single blank line")
|
||||
complete -c cat -s t -d (_ "Escape non-printing characters except newline")
|
||||
complete -c cat -s T -l show-tabs -d (_ "Escape tab")
|
||||
complete -c cat -s v -d (_ "Escape non-printing except newline and tab")
|
||||
complete -c cat -l help -d (_ "Display help and exit")
|
||||
complete -c cat -l version -d (_ "Display version and exit")
|
||||
complete -c cat -s A -l show-all -d (N_ "Escape all non-printing characters")
|
||||
complete -c cat -s b -l number-nonblank -d (N_ "Number nonblank lines")
|
||||
complete -c cat -s e -d (N_ "Escape non-printing characters except tab")
|
||||
complete -c cat -s E -l show-ends -d (N_ "Display \$ at end of line")
|
||||
complete -c cat -s n -l number -d (N_ "Number all lines")
|
||||
complete -c cat -s s -l squeeze-blank -d (N_ "Never more than single blank line")
|
||||
complete -c cat -s t -d (N_ "Escape non-printing characters except newline")
|
||||
complete -c cat -s T -l show-tabs -d (N_ "Escape tab")
|
||||
complete -c cat -s v -d (N_ "Escape non-printing except newline and tab")
|
||||
complete -c cat -l help -d (N_ "Display help and exit")
|
||||
complete -c cat -l version -d (N_ "Display version and exit")
|
||||
|
||||
|
||||
92
share/completions/cdrecord.fish
Normal file
92
share/completions/cdrecord.fish
Normal file
@@ -0,0 +1,92 @@
|
||||
#
|
||||
# Completions for Cdrecord
|
||||
#
|
||||
|
||||
complete -c cdrecord -o version -d (N_ "Display version and exit")
|
||||
complete -c cdrecord -s v -d (N_ "Increment the level of general verbosity by one")
|
||||
complete -c cdrecord -s V -d (N_ "Increment the verbose level in respect of SCSI command transport by one")
|
||||
complete -c cdrecord -a "debug={1,2,3,4,5}" -d (N_ "Set the misc debug value to #")
|
||||
complete -c cdrecord -s d -d (N_ "Increment the misc debug level by one") -a "1 2 3 4 5"
|
||||
complete -c cdrecord -s s -o silent -d (N_ "Do not print out a status report for failed SCSI commands")
|
||||
complete -c cdrecord -o force -d (N_ "Force to continue on some errors")
|
||||
complete -c cdrecord -o immed -d (N_ "Tell cdrecord to set the SCSI IMMED flag in certain commands")
|
||||
complete -c cdrecord -a "minbuf={25,35,45,55,65,75,85,95}" -d (N_ "Defines the minimum drive buffer fill ratio for the experimental ATAPI wait mode intended to free the IDE bus to allow hard disk and CD/DVD writer on the same IDE cable")
|
||||
complete -c cdrecord -o dummy -d (N_ "Complete CD/DVD-Recorder recording process with the laser turned off")
|
||||
complete -c cdrecord -o clone -d (N_ "Tells cdrecord to handle images created by readcd -clone")
|
||||
complete -c cdrecord -o dao
|
||||
complete -c cdrecord -o sao -d (N_ "Set SAO (Session At Once) mode, usually called Disk At Once mode")
|
||||
complete -c cdrecord -o tao -d (N_ "Set TAO (Track At Once) writing mode")
|
||||
complete -c cdrecord -o raw -d (N_ "Set RAW writing mode")
|
||||
complete -c cdrecord -o raw96r -d (N_ "Select Set RAW writing, the preferred raw writing mode")
|
||||
complete -c cdrecord -o raw96p -d (N_ "Select Set RAW writing, the less preferred raw writing mode")
|
||||
complete -c cdrecord -o raw16 -d (N_ "Select Set RAW writing, the preferred raw writing mode if raw96r is not supported")
|
||||
complete -c cdrecord -o multi -d (N_ "Allow multi session CDs to be made")
|
||||
complete -c cdrecord -o msinfo -d (N_ "Retrieve multi session info in a form suitable for mkisofs-1.10 or later")
|
||||
complete -c cdrecord -o toc -d (N_ "Retrieve and print out the table of content or PMA of a CD")
|
||||
complete -c cdrecord -o atip -d (N_ "Retrieve and print out the ATIP (absolute Time in Pre-groove) info")
|
||||
complete -c cdrecord -o fix -d (N_ "The disk will only be fixated")
|
||||
complete -c cdrecord -o nofix -d (N_ "Do not fixate the disk after writing the tracks")
|
||||
complete -c cdrecord -o waiti -d (N_ "Wait for input to become available on standard input before trying to open the SCSI driver")
|
||||
complete -c cdrecord -o load -d (N_ "Load the media and exit")
|
||||
complete -c cdrecord -o lock -d (N_ "Load the media, lock the door and exit")
|
||||
complete -c cdrecord -o eject -d (N_ "Eject disk after doing the work")
|
||||
complete -c cdrecord -a "speed={0,150,172,1385}" -d (N_ "Set the speed factor of the writing process to #")
|
||||
complete -c cdrecord -a "blank={help,all,fast,track,unreserve,trtail,unclose,session}" -d (N_ "Blank a CD-RW and exit or blank a CD-RW before writing")
|
||||
complete -c cdrecord -o format -d (N_ "Format a CD-RW/DVD-RW/DVD+RW disc")
|
||||
complete -c cdrecord -a "fs=" -d (N_ "Set the FIFO (ring buffer) size to #")
|
||||
complete -c cdrecord -a "ts=" -d (N_ "Set the maximum transfer size for a single SCSI command to #")
|
||||
complete -c cdrecord -a "dev=" -d (N_ "Sets the SCSI target for the CD/DVD-Recorder")
|
||||
complete -c cdrecord -a "gracetime=" -d (N_ "Set the grace time before starting to write to ># seconds")
|
||||
complete -c cdrecord -a "timeout=" -d (N_ "Set the default SCSI command timeout value to # seconds")
|
||||
complete -c cdrecord -a "driver={help,mmc_cd,mmc_cd_dvd,mmc_cdr,mmc_cdr_sony,mmc_dvd,mmc_dvdplus,mmc_dvdplusr,mmc_dvdplusrw,cw_7501,kodak_pcd_600,philips_cdd521,philips_cdd521_old,philips_cdd522,philips_dumb,pioneer_dws114x,plasmon_rf4100,ricoh_ro1060c,ricoh_ro1420c,scsi2_cd,sony_cdu924,teac_cdr50,tyuden_ew50,yamaha_cdr100,cdr_simul,dvd_simul}" -d (N_ "Allows the user to manually select a driver for the device")
|
||||
|
||||
# TODO: This argument accepts a comma separated list of arguments
|
||||
|
||||
complete -c cdrecord -a "driveropts=" -d (N_ "Set driver specific options")
|
||||
complete -c cdrecord -o setdropts -d (N_ "Set the driveropts specified by driveropts=option list, the speed of the drive and the dummy flag and exit")
|
||||
complete -c cdrecord -o checkdrive -d (N_ "Checks if a driver for the current drive is present and exit")
|
||||
complete -c cdrecord -o prcap -d (N_ "Print the drive capabilities for SCSI-3/mmc compliant drives as obtained from mode page 0x2A")
|
||||
complete -c cdrecord -o inq -d (N_ "Do an inquiry for the drive, print the inquiry info and exit")
|
||||
complete -c cdrecord -o scanbus -d (N_ "Scan all SCSI devices on all SCSI busses and print the inquiry strings")
|
||||
complete -c cdrecord -o reset -d (N_ "Try to reset the SCSI bus where the CD recorder is located")
|
||||
complete -c cdrecord -o abort -d (N_ "Try to send an abort sequence to the drive")
|
||||
complete -c cdrecord -o overburn -d (N_ "Allow cdrecord to write more than the official size of a medium")
|
||||
complete -c cdrecord -o ignsize -d (N_ "Ignore the known size of the medium, use for debugging only")
|
||||
complete -c cdrecord -o useinfo -d (N_ "Use *.inf files to overwrite audio options")
|
||||
complete -c cdrecord -a "defpregap=" -d (N_ "Set the default pre-gap size for all tracks except track nr 1")
|
||||
complete -c cdrecord -o packet -d (N_ "Set Packet writing mode (experimental interface)")
|
||||
complete -c cdrecord -a "pktsize=" -d (N_ "Set the packet size to #, forces fixed packet mode (experimental)")
|
||||
complete -c cdrecord -o noclose -d (N_ "Do not close the current track, only when in packet writing mode (experimental)")
|
||||
complete -c cdrecord -a "mcn=" -d (N_ "Set the Media Catalog Number of the CD")
|
||||
complete -c cdrecord -o text -d (N_ "Write CD-Text info based on info taken from a file that contains ascii info for the text strings")
|
||||
complete -c cdrecord -a "textfile=" -d (N_ "Write CD-Text based on info found in the binary file filename")
|
||||
complete -c cdrecord -a "cuefile=" -d (N_ "Take all recording related info from a CDRWIN compliant CUE sheet file")
|
||||
|
||||
# These completions are TRACK OPTIONS
|
||||
|
||||
complete -c cdrecord -a "isrc=" -d (N_ "Set the International Standard Recording Number for the next track")
|
||||
complete -c cdrecord -a "index=" -d (N_ "Sets an index list for the next track")
|
||||
complete -c cdrecord -o audio -d (N_ "All subsequent tracks are written in CD-DA audio format")
|
||||
complete -c cdrecord -o swab -d (N_ "Audio data is assumed to be in byte-swapped (little-endian) order")
|
||||
complete -c cdrecord -o data -d (N_ "All subsequent tracks are written in CD-ROM mode 1 (Yellow Book) format")
|
||||
complete -c cdrecord -o mode2 -d (N_ "All subsequent tracks are written in CD-ROM mode 2 format")
|
||||
complete -c cdrecord -o xa -d (N_ "All subsequent tracks are written in CD-ROM XA mode 2 form 1 format")
|
||||
complete -c cdrecord -o xa1 -d (N_ "All subsequent tracks are written in CD-ROM XA mode 2 form 1 format")
|
||||
complete -c cdrecord -o xa2 -d (N_ "All subsequent tracks are written in CD-ROM XA mode 2 form 2 format")
|
||||
complete -c cdrecord -o xamix -d (N_ "All subsequent tracks are written in a way that allows a mix of CD-ROM XA mode 2 form 1/2 format")
|
||||
complete -c cdrecord -o cdi -d (N_ "The TOC type for the disk is set to CDI, with XA only")
|
||||
complete -c cdrecord -o isosize -d (N_ "Use the ISO-9660 file system size as the size of the next track")
|
||||
complete -c cdrecord -o pad -d (N_ "15 sectors of zeroed data will be added to the end of this and each subsequent data track")
|
||||
complete -c cdrecord -a "padsize=" -d (N_ "Set the amount of data to be appended as padding to the next track")
|
||||
complete -c cdrecord -o nopad -d (N_ "Do not pad the following tracks - the default")
|
||||
complete -c cdrecord -o shorttrack -d (N_ "Allow all subsequent tracks to violate the Red Book track length standard (min 4 s)")
|
||||
complete -c cdrecord -o noshorttrack -d (N_ "Re-enforce the Red Book track length standard (min 4 s)")
|
||||
complete -c cdrecord -a "pregap=" -d (N_ "Set the pre-gap size for the next track")
|
||||
complete -c cdrecord -o preemp -d (N_ "All TOC entries for subsequent audio tracks will indicate that the audio data has been sampled with 50/15 microsec pre-emphasis")
|
||||
complete -c cdrecord -o nopreemp -d (N_ "All TOC entries for subsequent audio tracks will indicate that the audio data has been mastered with linear data")
|
||||
complete -c cdrecord -o copy -d (N_ "All TOC entries for subsequent audio tracks of the resulting CD will indicate that the audio data has permission to be copied without limit")
|
||||
complete -c cdrecord -o nocopy -d (N_ "All TOC entries for subsequent audio tracks of the resulting CD will indicate that the audio data has permission to be copied only once for personal use")
|
||||
complete -c cdrecord -o scms -d (N_ "All TOC entries for subsequent audio tracks of the resulting CD will indicate that the audio data has no permission to be copied")
|
||||
complete -c cdrecord -a "tsize=" -d (N_ "If the master image for the next track has been stored on a raw disk, use this option to specify the valid amount of data on this disk")
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
|
||||
complete -c chgrp -s c -l changes -d (_ "Output diagnostic for changed files")
|
||||
complete -c chgrp -l dereference -d (_ "Dereferense symbolic links")
|
||||
complete -c chgrp -s h -l no-dereference -d (_ "Do not dereference symbolic links")
|
||||
complete -c chgrp -l from -d (_ "Change from owner/group")
|
||||
complete -c chgrp -s f -l silent -d (_ "Supress errors")
|
||||
complete -c chgrp -l reference -d (_ "Use same owner/group as file") -r
|
||||
complete -c chgrp -s R -l recursive -d (_ "Operate recursively")
|
||||
complete -c chgrp -s v -l verbose -d (_ "Output diagnostic for every file")
|
||||
complete -c chgrp -s h -l help -d (_ "Display help and exit")
|
||||
complete -c chgrp -l version -d (_ "Display version and exit")
|
||||
complete -c chgrp -s c -l changes -d (N_ "Output diagnostic for changed files")
|
||||
complete -c chgrp -l dereference -d (N_ "Dereferense symbolic links")
|
||||
complete -c chgrp -s h -l no-dereference -d (N_ "Do not dereference symbolic links")
|
||||
complete -c chgrp -l from -d (N_ "Change from owner/group")
|
||||
complete -c chgrp -s f -l silent -d (N_ "Supress errors")
|
||||
complete -c chgrp -l reference -d (N_ "Use same owner/group as file") -r
|
||||
complete -c chgrp -s R -l recursive -d (N_ "Operate recursively")
|
||||
complete -c chgrp -s v -l verbose -d (N_ "Output diagnostic for every file")
|
||||
complete -c chgrp -s h -l help -d (N_ "Display help and exit")
|
||||
complete -c chgrp -l version -d (N_ "Display version and exit")
|
||||
complete -c chgrp -d Group -a "(__fish_complete_groups)"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
complete -c chown -s c -l changes -d (_ "Output diagnostic for changed files")
|
||||
complete -c chown -l dereference -d (_ "Dereferense symbolic links")
|
||||
complete -c chown -s h -l no-dereference -d (_ "Do not dereference symbolic links")
|
||||
complete -c chown -l from -d (_ "Change from owner/group")
|
||||
complete -c chown -s f -l silent -d (_ "Supress errors")
|
||||
complete -c chown -l reference -d (_ "Use same owner/group as file") -r
|
||||
complete -c chown -s R -l recursive -d (_ "Operate recursively")
|
||||
complete -c chown -s v -l verbose -d (_ "Output diagnostic for every file")
|
||||
complete -c chown -s h -l help -d (_ "Display help and exit")
|
||||
complete -c chown -l version -d (_ "Display version and exit")
|
||||
complete -c chown -d (_ "Username") -a "(__fish_print_users):"
|
||||
complete -c chown -d (_ "Username") -a "(echo (commandline -ct)|grep -o '.*:')(cat /etc/group |cut -d : -f 1)"
|
||||
complete -c chown -s c -l changes -d (N_ "Output diagnostic for changed files")
|
||||
complete -c chown -l dereference -d (N_ "Dereferense symbolic links")
|
||||
complete -c chown -s h -l no-dereference -d (N_ "Do not dereference symbolic links")
|
||||
complete -c chown -l from -d (N_ "Change from owner/group")
|
||||
complete -c chown -s f -l silent -d (N_ "Supress errors")
|
||||
complete -c chown -l reference -d (N_ "Use same owner/group as file") -r
|
||||
complete -c chown -s R -l recursive -d (N_ "Operate recursively")
|
||||
complete -c chown -s v -l verbose -d (N_ "Output diagnostic for every file")
|
||||
complete -c chown -s h -l help -d (N_ "Display help and exit")
|
||||
complete -c chown -l version -d (N_ "Display version and exit")
|
||||
complete -c chown -d (N_ "Username") -a "(__fish_print_users):"
|
||||
complete -c chown -d (N_ "Username") -a "(echo (commandline -ct)|grep -o '.*:')(cat /etc/group |cut -d : -f 1)"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
complete -c commandline -s a -l append -d (_ "Add text to the end of the selected area")
|
||||
complete -c commandline -s i -l insert -d (_ "Add text at cursor")
|
||||
complete -c commandline -s r -l replace -d (_ "Replace selected part")
|
||||
complete -c commandline -s a -l append -d (N_ "Add text to the end of the selected area")
|
||||
complete -c commandline -s i -l insert -d (N_ "Add text at cursor")
|
||||
complete -c commandline -s r -l replace -d (N_ "Replace selected part")
|
||||
|
||||
complete -c commandline -s j -l current-job -d (_ "Select job under cursor")
|
||||
complete -c commandline -s p -l current-process -d (_ "Select process under cursor")
|
||||
complete -c commandline -s t -l current-token -d (_ "Select token under cursor")
|
||||
complete -c commandline -s b -l current-buffer -d (_ "Select entire command line (default)")
|
||||
complete -c commandline -s j -l current-job -d (N_ "Select job under cursor")
|
||||
complete -c commandline -s p -l current-process -d (N_ "Select process under cursor")
|
||||
complete -c commandline -s t -l current-token -d (N_ "Select token under cursor")
|
||||
complete -c commandline -s b -l current-buffer -d (N_ "Select entire command line (default)")
|
||||
|
||||
complete -c commandline -s c -l cut-at-cursor -d (_ "Only return that part of the command line before the cursor")
|
||||
complete -c commandline -s f -l function -d (_ "Inject readline functions to reader")
|
||||
complete -c commandline -s c -l cut-at-cursor -d (N_ "Only return that part of the command line before the cursor")
|
||||
complete -c commandline -s f -l function -d (N_ "Inject readline functions to reader")
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
complete -c complete -s c -l command -d (_ "Command to add completion to") -r
|
||||
complete -c complete -s p -l path -d (_ "Path to add completion to")
|
||||
complete -c complete -s s -l short-option -d (_ "Posix-style option to complete")
|
||||
complete -c complete -s l -l long-option -d (_ "GNU-style option to complete")
|
||||
complete -c complete -s o -l old-option -d (_ "Old style long option to complete")
|
||||
complete -c complete -s f -l no-files -d (_ "Do not use file completion")
|
||||
complete -c complete -s r -l require-parameter -d (_ "Require parameter")
|
||||
complete -c complete -s x -l exclusive -d (_ "Require parameter and do not use file completion")
|
||||
complete -c complete -s a -l arguments -d (_ "A list of possible arguments")
|
||||
complete -c complete -s d -l description -d (_ "Description of this completions")
|
||||
complete -c complete -s u -l unauthorative -d (_ "Option list is not complete")
|
||||
complete -c complete -s e -l erase -d (_ "Remove completion")
|
||||
complete -c complete -s h -l help -d (_ "Display help and exit")
|
||||
complete -c complete -s C -l do-complete -d (_ "Print all completions for the specified commandline")
|
||||
complete -c complete -s c -l command -d (N_ "Command to add completion to") -r
|
||||
complete -c complete -s p -l path -d (N_ "Path to add completion to")
|
||||
complete -c complete -s s -l short-option -d (N_ "Posix-style option to complete")
|
||||
complete -c complete -s l -l long-option -d (N_ "GNU-style option to complete")
|
||||
complete -c complete -s o -l old-option -d (N_ "Old style long option to complete")
|
||||
complete -c complete -s f -l no-files -d (N_ "Do not use file completion")
|
||||
complete -c complete -s r -l require-parameter -d (N_ "Require parameter")
|
||||
complete -c complete -s x -l exclusive -d (N_ "Require parameter and do not use file completion")
|
||||
complete -c complete -s a -l arguments -d (N_ "A list of possible arguments")
|
||||
complete -c complete -s d -l description -d (N_ "Description of this completions")
|
||||
complete -c complete -s u -l unauthorative -d (N_ "Option list is not complete")
|
||||
complete -c complete -s e -l erase -d (N_ "Remove completion")
|
||||
complete -c complete -s h -l help -d (N_ "Display help and exit")
|
||||
complete -c complete -s C -l do-complete -d (N_ "Print all completions for the specified commandline")
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
complete -c configure -s h -l help -x -a "short recursive" -d (_ "Display help and exit")
|
||||
complete -c configure -s V -l version -d (_ "Display version and exit")
|
||||
complete -c configure -s q -l quiet -d (_ "Quiet mode")
|
||||
complete -c configure -l cache-file -f -d (_ "Cache test results in specified file")
|
||||
complete -c configure -s C -l config-cache -d (_ "Cache test results in file config.cache")
|
||||
complete -c configure -s n -l no-create -d (_ "Do not create output files")
|
||||
complete -c configure -l srcdir -d (_ "Set source directory") -a "__fish_complete_directory (commandline -ct)" -x
|
||||
complete -c configure -l prefix -d (_ "Architecture-independent install directory") -a "__fish_complete_directory (commandline -ct)" -x
|
||||
complete -c configure -l exec-prefix -d (_ "Architecture-dependent install directory") -a "__fish_complete_directory (commandline -ct)" -x
|
||||
complete -c configure -l build -d (_ "Configure for building on BUILD") -x
|
||||
complete -c configure -l host -d (_ "Cross-compile to build programs to run on HOST") -x
|
||||
complete -c configure -l target -d (_ "Configure for building compilers for TARGET") -x -u
|
||||
complete -c configure -s h -l help -x -a "short recursive" -d (N_ "Display help and exit")
|
||||
complete -c configure -s V -l version -d (N_ "Display version and exit")
|
||||
complete -c configure -s q -l quiet -d (N_ "Quiet mode")
|
||||
complete -c configure -l cache-file -f -d (N_ "Cache test results in specified file")
|
||||
complete -c configure -s C -l config-cache -d (N_ "Cache test results in file config.cache")
|
||||
complete -c configure -s n -l no-create -d (N_ "Do not create output files")
|
||||
complete -c configure -l srcdir -d (N_ "Set source directory") -a "__fish_complete_directory (commandline -ct)" -x
|
||||
complete -c configure -l prefix -d (N_ "Architecture-independent install directory") -a "__fish_complete_directory (commandline -ct)" -x
|
||||
complete -c configure -l exec-prefix -d (N_ "Architecture-dependent install directory") -a "__fish_complete_directory (commandline -ct)" -x
|
||||
complete -c configure -l build -d (N_ "Configure for building on BUILD") -x
|
||||
complete -c configure -l host -d (N_ "Cross-compile to build programs to run on HOST") -x
|
||||
complete -c configure -l target -d (N_ "Configure for building compilers for TARGET") -x -u
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
complete -c cut -s b -l bytes -x -d (_ "Output byte range")
|
||||
complete -c cut -s c -l characters -x -d (_ "Output character range")
|
||||
complete -c cut -s d -l delimiter -x -d (_ "Select field delimiter")
|
||||
complete -c cut -s d -l fields -x -d (_ "Select fields")
|
||||
complete -c cut -s n -d (_ "Dont split mutibyte characters")
|
||||
complete -c cut -s s -l only-delimited -d (_ "Do not print lines without delimiter")
|
||||
complete -c cut -l output-delimiter -d (_ "Select output delimiter")
|
||||
complete -c cut -l help -d (_ "Display help and exit")
|
||||
complete -c cut -l version -d (_ "Display version and exit")
|
||||
complete -c cut -s b -l bytes -x -d (N_ "Output byte range")
|
||||
complete -c cut -s c -l characters -x -d (N_ "Output character range")
|
||||
complete -c cut -s d -l delimiter -x -d (N_ "Select field delimiter")
|
||||
complete -c cut -s d -l fields -x -d (N_ "Select fields")
|
||||
complete -c cut -s n -d (N_ "Dont split mutibyte characters")
|
||||
complete -c cut -s s -l only-delimited -d (N_ "Do not print lines without delimiter")
|
||||
complete -c cut -l output-delimiter -d (N_ "Select output delimiter")
|
||||
complete -c cut -l help -d (N_ "Display help and exit")
|
||||
complete -c cut -l version -d (N_ "Display version and exit")
|
||||
|
||||
|
||||
@@ -56,40 +56,40 @@ complete -c cvs -n '__fish_no_cvs_subcommand' -xa 'watchers\t"'(_ "See who is wa
|
||||
# cvs_options switches, which must be specified before a command.
|
||||
#
|
||||
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -x -l allow-root -d (_ "Specify legal cvsroot directory." )
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -s a -d (_ "Authenticate all net traffic")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -r -s T -d (_ "Use "tmpdir" for temporary files")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -x -s d -d (_ "Overrides $CVSROOT as the root of the CVS tree")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -x -s e -d (_ "Use "editor" for editing log information")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -s f -d (_ "Do not use the ~/.cvsrc file")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -s H -d (_ "Displays usage information for command")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -s n -d (_ "Do not change any files")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -s Q -d (_ "Cause CVS to be really quiet")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -s R -d (_ "Read-only repository mode")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -s q -d (_ "Cause CVS to be somewhat quiet")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -s r -d (_ "Make checked-out files read-only")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -x -s s -d (_ "Set CVS user variable")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -s t -d (_ "Show trace of program execution -- try with -n")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -x -s v -d (_ "Display version and exit")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -s w -d (_ "Make checked-out files read-write (default)")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -s x -d (_ "Encrypt all net traffic")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -x -s z -d (_ "Compression level for net traffic") -a '1 2 3 4 5 6 7 8 9'
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -x -l allow-root -d (N_ "Specify legal cvsroot directory." )
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -s a -d (N_ "Authenticate all net traffic")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -r -s T -d (N_ "Use "tmpdir" for temporary files")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -x -s d -d (N_ "Overrides $CVSROOT as the root of the CVS tree")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -x -s e -d (N_ "Use "editor" for editing log information")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -s f -d (N_ "Do not use the ~/.cvsrc file")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -s H -d (N_ "Displays usage information for command")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -s n -d (N_ "Do not change any files")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -s Q -d (N_ "Cause CVS to be really quiet")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -s R -d (N_ "Read-only repository mode")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -s q -d (N_ "Cause CVS to be somewhat quiet")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -s r -d (N_ "Make checked-out files read-only")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -x -s s -d (N_ "Set CVS user variable")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -s t -d (N_ "Show trace of program execution -- try with -n")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -x -s v -d (N_ "Display version and exit")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -s w -d (N_ "Make checked-out files read-write (default)")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -s x -d (N_ "Encrypt all net traffic")
|
||||
complete -c cvs -n '__fish_no_cvs_subcommand' -x -s z -d (N_ "Compression level for net traffic") -a '1 2 3 4 5 6 7 8 9'
|
||||
|
||||
#
|
||||
# Universal cvs options, which can be applied to any cvs command.
|
||||
#
|
||||
|
||||
complete -c cvs -n '__fish_seen_subcommand_from checkout diff export history rdiff rtag update' -x -s D -d (_ "Use the most recent revision no later than date")
|
||||
complete -c cvs -n '__fish_seen_subcommand_from annotate export rdiff rtag update' -s f -d (_ "Retrieve files even when no match for tag/date")
|
||||
complete -c cvs -n '__fish_seen_subcommand_from add checkout diff import update' -x -s k -d (_ "Alter default keyword processing")
|
||||
complete -c cvs -n '__fish_seen_subcommand_from annotate checkout commit diff edit editors export log rdiff remove rtag status tag unedit update watch watchers' -s l -d (_ "Don't recurse")
|
||||
complete -c cvs -n '__fish_seen_subcommand_from add commit import' -x -s m -d (_ "Specify log message instead of invoking editor")
|
||||
complete -c cvs -n '__fish_seen_subcommand_from checkout commit export rtag' -s n -d (_ "Don't run any tag programs")
|
||||
complete -c cvs -n 'not __fish_no_cvs_subcommand' -s P -d (_ "Prune empty directories")
|
||||
complete -c cvs -n '__fish_seen_subcommand_from checkout update' -s p -d (_ "Pipe files to stdout")
|
||||
complete -c cvs -n '__fish_seen_subcommand_from annotate checkout commit diff edit editors export rdiff remove rtag status tag unedit update watch watchers' -s R -d (_ "Process directories recursively")
|
||||
complete -c cvs -n '__fish_seen_subcommand_from annotate checkout commit diff history export rdiff rtag update' -x -s r -d (_ "Use a specified tag")
|
||||
complete -c cvs -n '__fish_seen_subcommand_from import update' -r -s W -d (_ "Specify filenames to be filtered")
|
||||
complete -c cvs -n '__fish_seen_subcommand_from checkout diff export history rdiff rtag update' -x -s D -d (N_ "Use the most recent revision no later than date")
|
||||
complete -c cvs -n '__fish_seen_subcommand_from annotate export rdiff rtag update' -s f -d (N_ "Retrieve files even when no match for tag/date")
|
||||
complete -c cvs -n '__fish_seen_subcommand_from add checkout diff import update' -x -s k -d (N_ "Alter default keyword processing")
|
||||
complete -c cvs -n '__fish_seen_subcommand_from annotate checkout commit diff edit editors export log rdiff remove rtag status tag unedit update watch watchers' -s l -d (N_ "Don't recurse")
|
||||
complete -c cvs -n '__fish_seen_subcommand_from add commit import' -x -s m -d (N_ "Specify log message instead of invoking editor")
|
||||
complete -c cvs -n '__fish_seen_subcommand_from checkout commit export rtag' -s n -d (N_ "Don't run any tag programs")
|
||||
complete -c cvs -n 'not __fish_no_cvs_subcommand' -s P -d (N_ "Prune empty directories")
|
||||
complete -c cvs -n '__fish_seen_subcommand_from checkout update' -s p -d (N_ "Pipe files to stdout")
|
||||
complete -c cvs -n '__fish_seen_subcommand_from annotate checkout commit diff edit editors export rdiff remove rtag status tag unedit update watch watchers' -s R -d (N_ "Process directories recursively")
|
||||
complete -c cvs -n '__fish_seen_subcommand_from annotate checkout commit diff history export rdiff rtag update' -x -s r -d (N_ "Use a specified tag")
|
||||
complete -c cvs -n '__fish_seen_subcommand_from import update' -r -s W -d (N_ "Specify filenames to be filtered")
|
||||
|
||||
#
|
||||
# cvs options for admin. Note that all options marked as "useless", "might not
|
||||
@@ -97,90 +97,90 @@ complete -c cvs -n '__fish_seen_subcommand_from import update' -r -s W -d (_ "Sp
|
||||
#
|
||||
|
||||
set -l admin_opt -c cvs -n 'contains admin (commandline -poc)'
|
||||
complete $admin_opt -x -s k -d (_ "Set the default keyword substitution")
|
||||
complete $admin_opt -s l -d (_ "Lock a revision")
|
||||
complete $admin_opt -x -s m -d (_ "Replace a log message")
|
||||
complete $admin_opt -x -s n -d (_ "Force name/rev association")
|
||||
complete $admin_opt -x -s N -d (_ "Make a name/rev association")
|
||||
complete $admin_opt -s q -d (_ "Run quietly")
|
||||
complete $admin_opt -x -s s -d (_ "Set a state attribute for a revision")
|
||||
complete $admin_opt -s t -d (_ "Write descriptive text from a file into RCS")
|
||||
complete $admin_opt -x -o t- -d (_ "Write descriptive text into RCS")
|
||||
complete $admin_opt -x -s l -d (_ "Unlock a revision")
|
||||
complete $admin_opt -x -s k -d (N_ "Set the default keyword substitution")
|
||||
complete $admin_opt -s l -d (N_ "Lock a revision")
|
||||
complete $admin_opt -x -s m -d (N_ "Replace a log message")
|
||||
complete $admin_opt -x -s n -d (N_ "Force name/rev association")
|
||||
complete $admin_opt -x -s N -d (N_ "Make a name/rev association")
|
||||
complete $admin_opt -s q -d (N_ "Run quietly")
|
||||
complete $admin_opt -x -s s -d (N_ "Set a state attribute for a revision")
|
||||
complete $admin_opt -s t -d (N_ "Write descriptive text from a file into RCS")
|
||||
complete $admin_opt -x -o t- -d (N_ "Write descriptive text into RCS")
|
||||
complete $admin_opt -x -s l -d (N_ "Unlock a revision")
|
||||
|
||||
#
|
||||
# cvs options for annotate.
|
||||
#
|
||||
|
||||
set -l annotate_opt -c cvs -n 'contains annotate (commandline -poc)'
|
||||
complete $annotate_opt -s f -d (_ "Annotate binary files")
|
||||
complete $annotate_opt -s f -d (N_ "Annotate binary files")
|
||||
|
||||
#
|
||||
# cvs options for checkout.
|
||||
#
|
||||
|
||||
set -l checkout_opt -c cvs -n 'contains checkout (commandline -poc)'
|
||||
complete $checkout_opt -s A -d (_ "Reset sticky tags/dates/k-opts")
|
||||
complete $checkout_opt -s c -d (_ "Copy module file to stdout")
|
||||
complete $checkout_opt -x -s d -d (_ "Name directory for working files")
|
||||
complete $checkout_opt -x -s j -d (_ "Merge revisions")
|
||||
complete $checkout_opt -s N -d (_ "For -d. Don't shorten paths")
|
||||
complete $checkout_opt -s A -d (N_ "Reset sticky tags/dates/k-opts")
|
||||
complete $checkout_opt -s c -d (N_ "Copy module file to stdout")
|
||||
complete $checkout_opt -x -s d -d (N_ "Name directory for working files")
|
||||
complete $checkout_opt -x -s j -d (N_ "Merge revisions")
|
||||
complete $checkout_opt -s N -d (N_ "For -d. Don't shorten paths")
|
||||
|
||||
#
|
||||
# cvs options for commit.
|
||||
#
|
||||
|
||||
set -l commit_opt -c cvs -n 'contains commit (commandline -poc)'
|
||||
complete $commit_opt -r -s F -d (_ "Read log message from file")
|
||||
complete $commit_opt -s f -d (_ "Force new revision")
|
||||
complete $commit_opt -r -s F -d (N_ "Read log message from file")
|
||||
complete $commit_opt -s f -d (N_ "Force new revision")
|
||||
|
||||
#
|
||||
# cvs options for diff.
|
||||
#
|
||||
|
||||
set -l diff_opt -c cvs -n 'contains diff (commandline -poc)'
|
||||
complete $diff_opt -s a -l text -d (_ "Treat all files as text")
|
||||
complete $diff_opt -s b -l ignore-space-change -d (_ "Treat all whitespace as one space")
|
||||
complete $diff_opt -s B -l ignore-blank-lines -d (_ "Ignore blank line only changes")
|
||||
complete $diff_opt -l binary -d (_ "Binary mode")
|
||||
complete $diff_opt -l brief -d (_ "Report only whether files differ")
|
||||
complete $diff_opt -s c -d (_ "Use context format")
|
||||
complete $diff_opt -r -s C -d (_ "Set context size")
|
||||
complete $diff_opt -l context -d (_ "Set context format and, optionally, size")
|
||||
complete $diff_opt -l changed-group-format -d (_ "Set line group format")
|
||||
complete $diff_opt -s d -l minimal -d (_ "Try to find a smaller set of changes")
|
||||
complete $diff_opt -s e -l ed -d (_ "Make output a valid ed script")
|
||||
complete $diff_opt -s t -l expand-tabs -d (_ "Expand tabs to spaces")
|
||||
complete $diff_opt -s f -l forward-ed -d (_ "Output that looks like an ed script")
|
||||
complete $diff_opt -x -s F -d (_ "Set regexp for context, unified formats")
|
||||
complete $diff_opt -s H -l speed-large-files -d (_ "Speed handling of large files with small changes")
|
||||
complete $diff_opt -x -l horizon-lines -d (_ "Set horizon lines")
|
||||
complete $diff_opt -s i -l ignore-case -d (_ "Ignore changes in case")
|
||||
complete $diff_opt -x -s I -l ignore-matching-lines -d (_ "Ignore changes matching regexp")
|
||||
complete $diff_opt -x -l ifdef -d (_ "Make ifdef from diff")
|
||||
complete $diff_opt -s w -l ignore-all-space -d (_ "Ignore whitespace")
|
||||
complete $diff_opt -s T -l initial-tab -d (_ "Start lines with a tab")
|
||||
complete $diff_opt -x -s L -l label -d (_ "Use label instead of filename in output")
|
||||
complete $diff_opt -l left-column -d (_ "Print only left column")
|
||||
complete $diff_opt -x -l line-format -d (_ "Use format to produce if-then-else output")
|
||||
complete $diff_opt -s n -l rcs -d (_ "Produce RCS-style diffs")
|
||||
complete $diff_opt -s N -l new-file -d (_ "Treat files absent from one dir as empty")
|
||||
complete $diff_opt -l new-group-format -l new-line-format -l old-group-format -l old-line-format -d (_ "Specifies line formatting")
|
||||
complete $diff_opt -s p -l show-c-function -d (_ "Identify the C function each change is in")
|
||||
complete $diff_opt -s s -l report-identical-files -d (_ "Report identical files")
|
||||
complete $diff_opt -s y -l side-by-side -d (_ "Use side-by-side format")
|
||||
complete $diff_opt -l suppress-common-lines -d (_ "Suppress common lines in side-by-side")
|
||||
complete $diff_opt -s u -l unified -d (_ "Use unified format")
|
||||
complete $diff_opt -x -s U -d (_ "Set context size in unified")
|
||||
complete $diff_opt -x -s W -l width -d (_ "Set column width for side-by-side format")
|
||||
complete $diff_opt -s a -l text -d (N_ "Treat all files as text")
|
||||
complete $diff_opt -s b -l ignore-space-change -d (N_ "Treat all whitespace as one space")
|
||||
complete $diff_opt -s B -l ignore-blank-lines -d (N_ "Ignore blank line only changes")
|
||||
complete $diff_opt -l binary -d (N_ "Binary mode")
|
||||
complete $diff_opt -l brief -d (N_ "Report only whether files differ")
|
||||
complete $diff_opt -s c -d (N_ "Use context format")
|
||||
complete $diff_opt -r -s C -d (N_ "Set context size")
|
||||
complete $diff_opt -l context -d (N_ "Set context format and, optionally, size")
|
||||
complete $diff_opt -l changed-group-format -d (N_ "Set line group format")
|
||||
complete $diff_opt -s d -l minimal -d (N_ "Try to find a smaller set of changes")
|
||||
complete $diff_opt -s e -l ed -d (N_ "Make output a valid ed script")
|
||||
complete $diff_opt -s t -l expand-tabs -d (N_ "Expand tabs to spaces")
|
||||
complete $diff_opt -s f -l forward-ed -d (N_ "Output that looks like an ed script")
|
||||
complete $diff_opt -x -s F -d (N_ "Set regexp for context, unified formats")
|
||||
complete $diff_opt -s H -l speed-large-files -d (N_ "Speed handling of large files with small changes")
|
||||
complete $diff_opt -x -l horizon-lines -d (N_ "Set horizon lines")
|
||||
complete $diff_opt -s i -l ignore-case -d (N_ "Ignore changes in case")
|
||||
complete $diff_opt -x -s I -l ignore-matching-lines -d (N_ "Ignore changes matching regexp")
|
||||
complete $diff_opt -x -l ifdef -d (N_ "Make ifdef from diff")
|
||||
complete $diff_opt -s w -l ignore-all-space -d (N_ "Ignore whitespace")
|
||||
complete $diff_opt -s T -l initial-tab -d (N_ "Start lines with a tab")
|
||||
complete $diff_opt -x -s L -l label -d (N_ "Use label instead of filename in output")
|
||||
complete $diff_opt -l left-column -d (N_ "Print only left column")
|
||||
complete $diff_opt -x -l line-format -d (N_ "Use format to produce if-then-else output")
|
||||
complete $diff_opt -s n -l rcs -d (N_ "Produce RCS-style diffs")
|
||||
complete $diff_opt -s N -l new-file -d (N_ "Treat files absent from one dir as empty")
|
||||
complete $diff_opt -l new-group-format -l new-line-format -l old-group-format -l old-line-format -d (N_ "Specifies line formatting")
|
||||
complete $diff_opt -s p -l show-c-function -d (N_ "Identify the C function each change is in")
|
||||
complete $diff_opt -s s -l report-identical-files -d (N_ "Report identical files")
|
||||
complete $diff_opt -s y -l side-by-side -d (N_ "Use side-by-side format")
|
||||
complete $diff_opt -l suppress-common-lines -d (N_ "Suppress common lines in side-by-side")
|
||||
complete $diff_opt -s u -l unified -d (N_ "Use unified format")
|
||||
complete $diff_opt -x -s U -d (N_ "Set context size in unified")
|
||||
complete $diff_opt -x -s W -l width -d (N_ "Set column width for side-by-side format")
|
||||
|
||||
#
|
||||
# cvs export options.
|
||||
#
|
||||
|
||||
set -l export_opt -c cvs -n 'contains export (commandline -poc)'
|
||||
complete $export_opt -x -s d -d (_ "Name directory for working files")
|
||||
complete $export_opt -s N -d (_ "For -d. Don't shorten paths")
|
||||
complete $export_opt -x -s d -d (N_ "Name directory for working files")
|
||||
complete $export_opt -s N -d (N_ "For -d. Don't shorten paths")
|
||||
|
||||
#
|
||||
# cvs history options.
|
||||
@@ -188,64 +188,64 @@ complete $export_opt -s N -d (_ "For -d. Don't shorten paths")
|
||||
#
|
||||
|
||||
set -l history_opt -c cvs -n 'contains history (commandline -poc)'
|
||||
complete $history_opt -s c -d (_ "Report on each commit")
|
||||
complete $history_opt -s e -d (_ "Report on everything")
|
||||
complete $history_opt -x -s m -d (_ "Report on a module")
|
||||
complete $history_opt -s o -d (_ "Report on checked-out modules")
|
||||
complete $history_opt -s T -d (_ "Report on all tags")
|
||||
complete $history_opt -x -s x -d (_ "Specify record type") -a "F\trelease O\tcheckout E\texport T\trtag C\tcollisions G\tmerge U\t'Working file copied from repository' P\t'Working file patched to repository' W\t'Working copy deleted during update' A\t'New file added' M\t'File modified' R\t'File removed.'"
|
||||
complete $history_opt -s a -d (_ "Show history for all users")
|
||||
complete $history_opt -s l -d (_ "Show last modification only")
|
||||
complete $history_opt -s w -d (_ "Show only records for this directory")
|
||||
complete $history_opt -s c -d (N_ "Report on each commit")
|
||||
complete $history_opt -s e -d (N_ "Report on everything")
|
||||
complete $history_opt -x -s m -d (N_ "Report on a module")
|
||||
complete $history_opt -s o -d (N_ "Report on checked-out modules")
|
||||
complete $history_opt -s T -d (N_ "Report on all tags")
|
||||
complete $history_opt -x -s x -d (N_ "Specify record type") -a "F\trelease O\tcheckout E\texport T\trtag C\tcollisions G\tmerge U\t'Working file copied from repository' P\t'Working file patched to repository' W\t'Working copy deleted during update' A\t'New file added' M\t'File modified' R\t'File removed.'"
|
||||
complete $history_opt -s a -d (N_ "Show history for all users")
|
||||
complete $history_opt -s l -d (N_ "Show last modification only")
|
||||
complete $history_opt -s w -d (N_ "Show only records for this directory")
|
||||
|
||||
#
|
||||
# cvs import options.
|
||||
#
|
||||
|
||||
set -l import_opt -c cvs -n 'contains import (commandline -poc)'
|
||||
complete $import_opt -x -s b -d (_ "Multiple vendor branch")
|
||||
complete $import_opt -r -s I -d (_ "Files to ignore during import")
|
||||
complete $import_opt -x -s b -d (N_ "Multiple vendor branch")
|
||||
complete $import_opt -r -s I -d (N_ "Files to ignore during import")
|
||||
|
||||
#
|
||||
# cvs log options.
|
||||
#
|
||||
|
||||
set -l log_opt -c cvs -n 'contains log (commandline -poc)'
|
||||
complete $log_opt -s b -d (_ "Print info about revision on default branch")
|
||||
complete $log_opt -x -s d -d (_ "Specify date range for query")
|
||||
complete $log_opt -s h -d (_ "Print only file info")
|
||||
complete $log_opt -s N -d (_ "Do not print tags")
|
||||
complete $log_opt -s R -d (_ "Print only rcs filename")
|
||||
complete $log_opt -x -s r -d (_ "Print only given revisions")
|
||||
complete $log_opt -s S -d (_ "Suppress header if no revisions found")
|
||||
complete $log_opt -x -s s -d (_ "Specify revision states")
|
||||
complete $log_opt -s t -d (_ "Same as -h, plus descriptive text")
|
||||
complete $log_opt -x -s w -d (_ "Specify users for query")
|
||||
complete $log_opt -s b -d (N_ "Print info about revision on default branch")
|
||||
complete $log_opt -x -s d -d (N_ "Specify date range for query")
|
||||
complete $log_opt -s h -d (N_ "Print only file info")
|
||||
complete $log_opt -s N -d (N_ "Do not print tags")
|
||||
complete $log_opt -s R -d (N_ "Print only rcs filename")
|
||||
complete $log_opt -x -s r -d (N_ "Print only given revisions")
|
||||
complete $log_opt -s S -d (N_ "Suppress header if no revisions found")
|
||||
complete $log_opt -x -s s -d (N_ "Specify revision states")
|
||||
complete $log_opt -s t -d (N_ "Same as -h, plus descriptive text")
|
||||
complete $log_opt -x -s w -d (N_ "Specify users for query")
|
||||
|
||||
#
|
||||
# cvs rdiff options.
|
||||
#
|
||||
|
||||
set -l rdiff_opt -c cvs -n 'contains rdiff (commandline -poc)'
|
||||
complete $rdiff_opt -s c -d (_ "Use context diff format")
|
||||
complete $rdiff_opt -s s -d (_ "Create summary change report")
|
||||
complete $rdiff_opt -s t -d (_ "diff top two revisions")
|
||||
complete $rdiff_opt -s u -d (_ "Use unidiff format")
|
||||
complete $rdiff_opt -s c -d (N_ "Use context diff format")
|
||||
complete $rdiff_opt -s s -d (N_ "Create summary change report")
|
||||
complete $rdiff_opt -s t -d (N_ "diff top two revisions")
|
||||
complete $rdiff_opt -s u -d (N_ "Use unidiff format")
|
||||
|
||||
#
|
||||
# cvs release options.
|
||||
#
|
||||
|
||||
complete -c cvs -n 'contains release (commandline -poc)' -s d -d (_ "Delete working copy if release succeeds")
|
||||
complete -c cvs -n 'contains release (commandline -poc)' -s d -d (N_ "Delete working copy if release succeeds")
|
||||
|
||||
#
|
||||
# cvs update options.
|
||||
#
|
||||
|
||||
set -l update_opt -c cvs -n 'contains update (commandline -poc)'
|
||||
complete $update_opt -s A -d (_ "Reset sticky tags, dates, and k-opts")
|
||||
complete $update_opt -s C -d (_ "Overwrite modified files with clean copies")
|
||||
complete $update_opt -s d -d (_ "Create any missing directories")
|
||||
complete $update_opt -x -s I -d (_ "Specify files to ignore")
|
||||
complete $update_opt -x -s j -d (_ "Merge revisions")
|
||||
complete $update_opt -s A -d (N_ "Reset sticky tags, dates, and k-opts")
|
||||
complete $update_opt -s C -d (N_ "Overwrite modified files with clean copies")
|
||||
complete $update_opt -s d -d (N_ "Create any missing directories")
|
||||
complete $update_opt -x -s I -d (N_ "Specify files to ignore")
|
||||
complete $update_opt -x -s j -d (N_ "Merge revisions")
|
||||
|
||||
|
||||
@@ -58,179 +58,179 @@ complete -c darcs -n '__fish_use_subcommand' -xa 'repair\t"'(_ "Repair the corru
|
||||
#
|
||||
# These switches are universal
|
||||
#
|
||||
complete -c darcs -s h -l help -d (_ "Shows brief description of command and its arguments")
|
||||
complete -c darcs -l disable -d (_ "Disable this command")
|
||||
complete -c darcs -l repodir -d (_ "Specify the repository directory in which to run") -x -a '(__fish_complete_directory (commandline -ct))'
|
||||
complete -c darcs -s v -l verbose -d (_ "Verbose mode")
|
||||
complete -c darcs -l standard-verbosity -d (_ "Neither verbose nor quiet output")
|
||||
complete -c darcs -s h -l help -d (N_ "Shows brief description of command and its arguments")
|
||||
complete -c darcs -l disable -d (N_ "Disable this command")
|
||||
complete -c darcs -l repodir -d (N_ "Specify the repository directory in which to run") -x -a '(__fish_complete_directory (commandline -ct))'
|
||||
complete -c darcs -s v -l verbose -d (N_ "Verbose mode")
|
||||
complete -c darcs -l standard-verbosity -d (N_ "Neither verbose nor quiet output")
|
||||
|
||||
#
|
||||
# Here follows a huge list of subcommand-specific completions. These are incomplete.
|
||||
#
|
||||
|
||||
set -l record_opt -c darcs -n 'contains record (commandline -poc)'
|
||||
complete $record_opt -s m -l patch-name -d (_ "Name of patch") -x
|
||||
complete $record_opt -s A -l author -d (_ "Specify author id") -x
|
||||
complete $record_opt -l logfile -d (_ "Give patch name and comment in file") -r
|
||||
complete $record_opt -s a -l all -d (_ "Answer yes to all patches")
|
||||
complete $record_opt -s l -l look-for-adds -d (_ "In addition to modifications, look for files that are not boring, and thus are potentially pending addition")
|
||||
complete $record_opt -l delete-logfile -d (_ "Delete the logfile when done")
|
||||
complete $record_opt -l no-test -d (_ "Don't run the test script")
|
||||
complete $record_opt -l test -d (_ "Run the test script")
|
||||
complete $record_opt -l leave-test-directory -d (_ "Don't remove the test directory")
|
||||
complete $record_opt -l remove-test-directory -d (_ "Remove the test directory")
|
||||
complete $record_opt -l compress -d (_ "Create compressed patches")
|
||||
complete $record_opt -l dont-compress -d (_ "Don't create compressed patches")
|
||||
complete $record_opt -l pipe -d (_ "Expect to receive input from a pipe")
|
||||
complete $record_opt -l interactive -d (_ "Prompt user interactively")
|
||||
complete $record_opt -l ask-deps -d (_ "Ask for extra dependencies")
|
||||
complete $record_opt -l no-ask-deps -d (_ "Don't ask for extra dependencies")
|
||||
complete $record_opt -l edit-long-comment -d (_ "Edit the long comment by default")
|
||||
complete $record_opt -l skip-long-comment -d (_ "Don't give a long comment")
|
||||
complete $record_opt -l prompt-long-comment -d (_ "Prompt for whether to edit the long comment")
|
||||
complete $record_opt -l ignore-times -d (_ "Don't trust the file modification times")
|
||||
complete $record_opt -l dont-look-for-adds -d (_ "Don't look for any files or directories that could be added, and don't add them automatically")
|
||||
complete $record_opt -s m -l patch-name -d (N_ "Name of patch") -x
|
||||
complete $record_opt -s A -l author -d (N_ "Specify author id") -x
|
||||
complete $record_opt -l logfile -d (N_ "Give patch name and comment in file") -r
|
||||
complete $record_opt -s a -l all -d (N_ "Answer yes to all patches")
|
||||
complete $record_opt -s l -l look-for-adds -d (N_ "In addition to modifications, look for files that are not boring, and thus are potentially pending addition")
|
||||
complete $record_opt -l delete-logfile -d (N_ "Delete the logfile when done")
|
||||
complete $record_opt -l no-test -d (N_ "Don't run the test script")
|
||||
complete $record_opt -l test -d (N_ "Run the test script")
|
||||
complete $record_opt -l leave-test-directory -d (N_ "Don't remove the test directory")
|
||||
complete $record_opt -l remove-test-directory -d (N_ "Remove the test directory")
|
||||
complete $record_opt -l compress -d (N_ "Create compressed patches")
|
||||
complete $record_opt -l dont-compress -d (N_ "Don't create compressed patches")
|
||||
complete $record_opt -l pipe -d (N_ "Expect to receive input from a pipe")
|
||||
complete $record_opt -l interactive -d (N_ "Prompt user interactively")
|
||||
complete $record_opt -l ask-deps -d (N_ "Ask for extra dependencies")
|
||||
complete $record_opt -l no-ask-deps -d (N_ "Don't ask for extra dependencies")
|
||||
complete $record_opt -l edit-long-comment -d (N_ "Edit the long comment by default")
|
||||
complete $record_opt -l skip-long-comment -d (N_ "Don't give a long comment")
|
||||
complete $record_opt -l prompt-long-comment -d (N_ "Prompt for whether to edit the long comment")
|
||||
complete $record_opt -l ignore-times -d (N_ "Don't trust the file modification times")
|
||||
complete $record_opt -l dont-look-for-adds -d (N_ "Don't look for any files or directories that could be added, and don't add them automatically")
|
||||
|
||||
|
||||
set -l pull_opt -c darcs -n 'contains pull (commandline -poc)'
|
||||
complete $pull_opt -s p -l patches -d (_ "Select patches matching REGEXP") -x
|
||||
complete $pull_opt -s t -l tags -d (_ "Select tags matching REGEXP") -x
|
||||
complete $pull_opt -s a -l all -d (_ "Answer yes to all patches")
|
||||
complete $pull_opt -s s -l summary -d (_ "Summarize changes")
|
||||
complete $pull_opt -s q -l quiet -d (_ "Suppress informational output")
|
||||
complete $pull_opt -l matches -d (_ "Select patches matching PATTERN") -x
|
||||
complete $pull_opt -l external-merge -d (_ "Use external tool to merge conflicts") -x
|
||||
complete $pull_opt -l interactive -d (_ "Prompt user interactively")
|
||||
complete $pull_opt -l compress -d (_ "Create compressed patches")
|
||||
complete $pull_opt -l dont-compress -d (_ "Don't create compressed patches")
|
||||
complete $pull_opt -l test -d (_ "Run the test script")
|
||||
complete $pull_opt -l no-test -d (_ "Don't run the test script")
|
||||
complete $pull_opt -l dry-run -d (_ "Don't actually take the action")
|
||||
complete $pull_opt -l no-summary -d (_ "Don't summarize changes")
|
||||
complete $pull_opt -l ignore-times -d (_ "Don't trust the file modification times")
|
||||
complete $pull_opt -l no-deps -d (_ "Don't automatically fulfill dependencies")
|
||||
complete $pull_opt -l set-default -d (_ "Set default repository [DEFAULT]")
|
||||
complete $pull_opt -l no-set-default -d (_ "Don't set default repository")
|
||||
complete $pull_opt -l set-scripts-executable -d (_ "Make scripts executable")
|
||||
complete $pull_opt -l dont-set-scripts-executable -d (_ "Don't make scripts executable")
|
||||
complete $pull_opt -s p -l patches -d (N_ "Select patches matching REGEXP") -x
|
||||
complete $pull_opt -s t -l tags -d (N_ "Select tags matching REGEXP") -x
|
||||
complete $pull_opt -s a -l all -d (N_ "Answer yes to all patches")
|
||||
complete $pull_opt -s s -l summary -d (N_ "Summarize changes")
|
||||
complete $pull_opt -s q -l quiet -d (N_ "Suppress informational output")
|
||||
complete $pull_opt -l matches -d (N_ "Select patches matching PATTERN") -x
|
||||
complete $pull_opt -l external-merge -d (N_ "Use external tool to merge conflicts") -x
|
||||
complete $pull_opt -l interactive -d (N_ "Prompt user interactively")
|
||||
complete $pull_opt -l compress -d (N_ "Create compressed patches")
|
||||
complete $pull_opt -l dont-compress -d (N_ "Don't create compressed patches")
|
||||
complete $pull_opt -l test -d (N_ "Run the test script")
|
||||
complete $pull_opt -l no-test -d (N_ "Don't run the test script")
|
||||
complete $pull_opt -l dry-run -d (N_ "Don't actually take the action")
|
||||
complete $pull_opt -l no-summary -d (N_ "Don't summarize changes")
|
||||
complete $pull_opt -l ignore-times -d (N_ "Don't trust the file modification times")
|
||||
complete $pull_opt -l no-deps -d (N_ "Don't automatically fulfill dependencies")
|
||||
complete $pull_opt -l set-default -d (N_ "Set default repository [DEFAULT]")
|
||||
complete $pull_opt -l no-set-default -d (N_ "Don't set default repository")
|
||||
complete $pull_opt -l set-scripts-executable -d (N_ "Make scripts executable")
|
||||
complete $pull_opt -l dont-set-scripts-executable -d (N_ "Don't make scripts executable")
|
||||
|
||||
|
||||
set -l apply_opt -c darcs -n 'contains apply (commandline -poc)'
|
||||
complete $apply_opt -s a -l all -d (_ "Answer yes to all patches")
|
||||
complete $apply_opt -l verify -d (_ "Verify that the patch was signed by a key in PUBRING") -r
|
||||
complete $apply_opt -l verify-ssl -d (_ "Verify using openSSL with authorized keys from specified file") -r
|
||||
complete $apply_opt -l sendmail-command -d (_ "Specify sendmail command") -r
|
||||
complete $apply_opt -l reply -d (_ "Reply to email-based patch using FROM address") -x
|
||||
complete $apply_opt -l cc -d (_ "Mail results to additional EMAIL(s). Requires --reply") -x
|
||||
complete $apply_opt -l external-merge -d (_ "Use external tool to merge conflicts") -r
|
||||
complete $apply_opt -l no-verify -d (_ "Don't verify patch signature")
|
||||
complete $apply_opt -l ignore-times -d (_ "Don't trust the file modification times")
|
||||
complete $apply_opt -l compress -d (_ "Create compressed patches")
|
||||
complete $apply_opt -l dont-compress -d (_ "Don't create compressed patches")
|
||||
complete $apply_opt -l interactive -d (_ "Prompt user interactively")
|
||||
complete $apply_opt -l mark-conflicts -d (_ "Mark conflicts")
|
||||
complete $apply_opt -l allow-conflicts -d (_ "Allow conflicts, but don't mark them")
|
||||
complete $apply_opt -l dont-allow-conflicts -d (_ "Fail on patches that create conflicts [DEFAULT]")
|
||||
complete $apply_opt -l no-test -d (_ "Don't run the test script")
|
||||
complete $apply_opt -l test -d (_ "Run the test script")
|
||||
complete $apply_opt -l happy-forwarding -d (_ "Forward unsigned messages without extra header")
|
||||
complete $apply_opt -l leave-test-directory -d (_ "Don't remove the test directory")
|
||||
complete $apply_opt -l remove-test-directory -d (_ "Remove the test directory")
|
||||
complete $apply_opt -l set-scripts-executable -d (_ "Make scripts executable")
|
||||
complete $apply_opt -l dont-set-scripts-executable -d (_ "Don't make scripts executable")
|
||||
complete $apply_opt -s a -l all -d (N_ "Answer yes to all patches")
|
||||
complete $apply_opt -l verify -d (N_ "Verify that the patch was signed by a key in PUBRING") -r
|
||||
complete $apply_opt -l verify-ssl -d (N_ "Verify using openSSL with authorized keys from specified file") -r
|
||||
complete $apply_opt -l sendmail-command -d (N_ "Specify sendmail command") -r
|
||||
complete $apply_opt -l reply -d (N_ "Reply to email-based patch using FROM address") -x
|
||||
complete $apply_opt -l cc -d (N_ "Mail results to additional EMAIL(s). Requires --reply") -x
|
||||
complete $apply_opt -l external-merge -d (N_ "Use external tool to merge conflicts") -r
|
||||
complete $apply_opt -l no-verify -d (N_ "Don't verify patch signature")
|
||||
complete $apply_opt -l ignore-times -d (N_ "Don't trust the file modification times")
|
||||
complete $apply_opt -l compress -d (N_ "Create compressed patches")
|
||||
complete $apply_opt -l dont-compress -d (N_ "Don't create compressed patches")
|
||||
complete $apply_opt -l interactive -d (N_ "Prompt user interactively")
|
||||
complete $apply_opt -l mark-conflicts -d (N_ "Mark conflicts")
|
||||
complete $apply_opt -l allow-conflicts -d (N_ "Allow conflicts, but don't mark them")
|
||||
complete $apply_opt -l dont-allow-conflicts -d (N_ "Fail on patches that create conflicts [DEFAULT]")
|
||||
complete $apply_opt -l no-test -d (N_ "Don't run the test script")
|
||||
complete $apply_opt -l test -d (N_ "Run the test script")
|
||||
complete $apply_opt -l happy-forwarding -d (N_ "Forward unsigned messages without extra header")
|
||||
complete $apply_opt -l leave-test-directory -d (N_ "Don't remove the test directory")
|
||||
complete $apply_opt -l remove-test-directory -d (N_ "Remove the test directory")
|
||||
complete $apply_opt -l set-scripts-executable -d (N_ "Make scripts executable")
|
||||
complete $apply_opt -l dont-set-scripts-executable -d (N_ "Don't make scripts executable")
|
||||
|
||||
|
||||
set -l check_opt -c darcs -n 'contains check (commandline -poc)'
|
||||
complete $check_opt -s v -l verbose -d (_ "Verbose mode")
|
||||
complete $check_opt -s q -l quiet -d (_ "Suppress informational output")
|
||||
complete $check_opt -l complete -d (_ "Check the entire repository")
|
||||
complete $check_opt -l partial -d (_ "Check patches since latest checkpoint")
|
||||
complete $check_opt -l no-test -d (_ "Don't run the test script")
|
||||
complete $check_opt -l test -d (_ "Run the test script")
|
||||
complete $check_opt -l leave-test-directory -d (_ "Don't remove the test directory")
|
||||
complete $check_opt -l remove-test-directory -d (_ "Remove the test directory")
|
||||
complete $check_opt -s v -l verbose -d (N_ "Verbose mode")
|
||||
complete $check_opt -s q -l quiet -d (N_ "Suppress informational output")
|
||||
complete $check_opt -l complete -d (N_ "Check the entire repository")
|
||||
complete $check_opt -l partial -d (N_ "Check patches since latest checkpoint")
|
||||
complete $check_opt -l no-test -d (N_ "Don't run the test script")
|
||||
complete $check_opt -l test -d (N_ "Run the test script")
|
||||
complete $check_opt -l leave-test-directory -d (N_ "Don't remove the test directory")
|
||||
complete $check_opt -l remove-test-directory -d (N_ "Remove the test directory")
|
||||
|
||||
|
||||
set -l mv_opt -c darcs -n 'contains mv (commandline -poc)'
|
||||
complete $mv_opt -s v -l verbose -d (_ "Verbose mode")
|
||||
complete $mv_opt -l case-ok -d (_ "Don't refuse to add files differing only in case")
|
||||
complete $mv_opt -s v -l verbose -d (N_ "Verbose mode")
|
||||
complete $mv_opt -l case-ok -d (N_ "Don't refuse to add files differing only in case")
|
||||
|
||||
|
||||
set -l send_opt -c darcs -n 'contains send (commandline -poc)'
|
||||
complete $send_opt -s v -l verbose -d (_ "Verbose mode")
|
||||
complete $send_opt -s q -l quiet -d (_ "Suppress informational output")
|
||||
complete $send_opt -xs p -l patches -d (_ "Select patches matching REGEXP")
|
||||
complete $send_opt -xs t -l tags -d (_ "Select tags matching REGEXP")
|
||||
complete $send_opt -s a -l all -d (_ "Answer yes to all patches")
|
||||
complete $send_opt -xs A -l author -d (_ "Specify author id")
|
||||
complete $send_opt -rs o -l output -d (_ "Specify output filename")
|
||||
complete $send_opt -s u -l unified -d (_ "Output patch in a darcs-specific format similar to diff -u")
|
||||
complete $send_opt -s s -l summary -d (_ "Summarize changes")
|
||||
complete $send_opt -xl matches -d (_ "Select patches matching PATTERN")
|
||||
complete $send_opt -l interactive -d (_ "Prompt user interactively")
|
||||
complete $send_opt -xl from -d (_ "Specify email address")
|
||||
complete $send_opt -xl to -d (_ "Specify destination email")
|
||||
complete $send_opt -xl cc -d (_ "Mail results to additional EMAIL(s). Requires --reply")
|
||||
complete $send_opt -l sign -d (_ "Sign the patch with your gpg key")
|
||||
complete $send_opt -xl sign-as -d (_ "Sign the patch with a given keyid")
|
||||
complete $send_opt -rl sign-ssl -d (_ "Sign the patch using openssl with a given private key")
|
||||
complete $send_opt -l dont-sign -d (_ "Do not sign the patch")
|
||||
complete $send_opt -l dry-run -d (_ "Don't actually take the action")
|
||||
complete $send_opt -l no-summary -d (_ "Don't summarize changes")
|
||||
complete $send_opt -rl context -d (_ "Send to context stored in FILENAME")
|
||||
complete $send_opt -l edit-description -d (_ "Edit the patch bundle description")
|
||||
complete $send_opt -l set-default -d (_ "Set default repository [DEFAULT]")
|
||||
complete $send_opt -l no-set-default -d (_ "Don't set default repository")
|
||||
complete $send_opt -rl sendmail-command -d (_ "Specify sendmail command")
|
||||
complete $send_opt -s v -l verbose -d (N_ "Verbose mode")
|
||||
complete $send_opt -s q -l quiet -d (N_ "Suppress informational output")
|
||||
complete $send_opt -xs p -l patches -d (N_ "Select patches matching REGEXP")
|
||||
complete $send_opt -xs t -l tags -d (N_ "Select tags matching REGEXP")
|
||||
complete $send_opt -s a -l all -d (N_ "Answer yes to all patches")
|
||||
complete $send_opt -xs A -l author -d (N_ "Specify author id")
|
||||
complete $send_opt -rs o -l output -d (N_ "Specify output filename")
|
||||
complete $send_opt -s u -l unified -d (N_ "Output patch in a darcs-specific format similar to diff -u")
|
||||
complete $send_opt -s s -l summary -d (N_ "Summarize changes")
|
||||
complete $send_opt -xl matches -d (N_ "Select patches matching PATTERN")
|
||||
complete $send_opt -l interactive -d (N_ "Prompt user interactively")
|
||||
complete $send_opt -xl from -d (N_ "Specify email address")
|
||||
complete $send_opt -xl to -d (N_ "Specify destination email")
|
||||
complete $send_opt -xl cc -d (N_ "Mail results to additional EMAIL(s). Requires --reply")
|
||||
complete $send_opt -l sign -d (N_ "Sign the patch with your gpg key")
|
||||
complete $send_opt -xl sign-as -d (N_ "Sign the patch with a given keyid")
|
||||
complete $send_opt -rl sign-ssl -d (N_ "Sign the patch using openssl with a given private key")
|
||||
complete $send_opt -l dont-sign -d (N_ "Do not sign the patch")
|
||||
complete $send_opt -l dry-run -d (N_ "Don't actually take the action")
|
||||
complete $send_opt -l no-summary -d (N_ "Don't summarize changes")
|
||||
complete $send_opt -rl context -d (N_ "Send to context stored in FILENAME")
|
||||
complete $send_opt -l edit-description -d (N_ "Edit the patch bundle description")
|
||||
complete $send_opt -l set-default -d (N_ "Set default repository [DEFAULT]")
|
||||
complete $send_opt -l no-set-default -d (N_ "Don't set default repository")
|
||||
complete $send_opt -rl sendmail-command -d (N_ "Specify sendmail command")
|
||||
|
||||
|
||||
set -l init_opt -c darcs -n 'contains initialize (commandline -poc)'
|
||||
complete $init_opt -l plain-pristine-tree -d (_ "Use a plain pristine tree [DEFAULT]")
|
||||
complete $init_opt -l no-pristine-tree -d (_ "Use no pristine tree")
|
||||
complete $init_opt -l plain-pristine-tree -d (N_ "Use a plain pristine tree [DEFAULT]")
|
||||
complete $init_opt -l no-pristine-tree -d (N_ "Use no pristine tree")
|
||||
|
||||
|
||||
set -l annotate_opt -c darcs -n 'contains annotate (commandline -poc)'
|
||||
complete $annotate_opt -s s -l summary -d (_ "Summarize changes")
|
||||
complete $annotate_opt -l no-summary -d (_ "Don't summarize changes")
|
||||
complete $annotate_opt -s u -l unified -d (_ "Output patch in a darcs-specific format similar to diff -u")
|
||||
complete $annotate_opt -l human-readable -d (_ "Give human readable output")
|
||||
complete $annotate_opt -l xml-output -d (_ "Generate XML formatted output")
|
||||
complete $annotate_opt -l match -x -d (_ "Select patch matching PATTERN")
|
||||
complete $annotate_opt -s p -l patch -x -d (_ "Select patch matching REGEXP")
|
||||
complete $annotate_opt -s t -l tag -x -d (_ "Select tag matching REGEXP")
|
||||
complete $annotate_opt -l creator-hash -x -d (_ "Specify hash of creator patch (see docs)")
|
||||
complete $annotate_opt -s s -l summary -d (N_ "Summarize changes")
|
||||
complete $annotate_opt -l no-summary -d (N_ "Don't summarize changes")
|
||||
complete $annotate_opt -s u -l unified -d (N_ "Output patch in a darcs-specific format similar to diff -u")
|
||||
complete $annotate_opt -l human-readable -d (N_ "Give human readable output")
|
||||
complete $annotate_opt -l xml-output -d (N_ "Generate XML formatted output")
|
||||
complete $annotate_opt -l match -x -d (N_ "Select patch matching PATTERN")
|
||||
complete $annotate_opt -s p -l patch -x -d (N_ "Select patch matching REGEXP")
|
||||
complete $annotate_opt -s t -l tag -x -d (N_ "Select tag matching REGEXP")
|
||||
complete $annotate_opt -l creator-hash -x -d (N_ "Specify hash of creator patch (see docs)")
|
||||
|
||||
|
||||
set -l changes_opt -c darcs -n 'contains changes (commandline -poc)'
|
||||
complete $changes_opt -l to-match -x -d (_ "Select changes up to a patch matching PATTERN")
|
||||
complete $changes_opt -l to-patch -x -d (_ "Select changes up to a patch matching REGEXP")
|
||||
complete $changes_opt -l to-tag -x -d (_ "Select changes up to a tag matching REGEXP")
|
||||
complete $changes_opt -l from-match -x -d (_ "Select changes starting with a patch matching PATTERN")
|
||||
complete $changes_opt -l from-patch -x -d (_ "Select changes starting with a patch matching REGEXP")
|
||||
complete $changes_opt -l from-tag -x -d (_ "Select changes starting with a tag matching REGEXP")
|
||||
complete $changes_opt -l last -x -d (_ "Select the last NUMBER patches")
|
||||
complete $changes_opt -l matches -x -d (_ "Select patches matching PATTERN")
|
||||
complete $changes_opt -s p -l patches -x -d (_ "Select patches matching REGEXP")
|
||||
complete $changes_opt -s t -l tags -x -d (_ "Select tags matching REGEXP")
|
||||
complete $changes_opt -l context -d (_ "Give output suitable for get --context")
|
||||
complete $changes_opt -l xml-output -d (_ "Generate XML formatted output")
|
||||
complete $changes_opt -l human-readable -d (_ "Give human-readable output")
|
||||
complete $changes_opt -s s -l summary -d (_ "Summarize changes")
|
||||
complete $changes_opt -l no-summary -d (_ "Don't summarize changes")
|
||||
complete $changes_opt -s q -l quiet -d (_ "Suppress informational output")
|
||||
complete $changes_opt -l reverse -d (_ "Show changes in reverse order")
|
||||
complete $changes_opt -l repo -x -d (_ "Specify the repository URL")
|
||||
complete $changes_opt -l to-match -x -d (N_ "Select changes up to a patch matching PATTERN")
|
||||
complete $changes_opt -l to-patch -x -d (N_ "Select changes up to a patch matching REGEXP")
|
||||
complete $changes_opt -l to-tag -x -d (N_ "Select changes up to a tag matching REGEXP")
|
||||
complete $changes_opt -l from-match -x -d (N_ "Select changes starting with a patch matching PATTERN")
|
||||
complete $changes_opt -l from-patch -x -d (N_ "Select changes starting with a patch matching REGEXP")
|
||||
complete $changes_opt -l from-tag -x -d (N_ "Select changes starting with a tag matching REGEXP")
|
||||
complete $changes_opt -l last -x -d (N_ "Select the last NUMBER patches")
|
||||
complete $changes_opt -l matches -x -d (N_ "Select patches matching PATTERN")
|
||||
complete $changes_opt -s p -l patches -x -d (N_ "Select patches matching REGEXP")
|
||||
complete $changes_opt -s t -l tags -x -d (N_ "Select tags matching REGEXP")
|
||||
complete $changes_opt -l context -d (N_ "Give output suitable for get --context")
|
||||
complete $changes_opt -l xml-output -d (N_ "Generate XML formatted output")
|
||||
complete $changes_opt -l human-readable -d (N_ "Give human-readable output")
|
||||
complete $changes_opt -s s -l summary -d (N_ "Summarize changes")
|
||||
complete $changes_opt -l no-summary -d (N_ "Don't summarize changes")
|
||||
complete $changes_opt -s q -l quiet -d (N_ "Suppress informational output")
|
||||
complete $changes_opt -l reverse -d (N_ "Show changes in reverse order")
|
||||
complete $changes_opt -l repo -x -d (N_ "Specify the repository URL")
|
||||
|
||||
|
||||
set -l add_opt -c darcs -n 'contains add (commandline -poc)'
|
||||
complete $add_opt -l boring -d (_ "Don't skip boring files")
|
||||
complete $add_opt -l case-ok -d (_ "Don't refuse to add files differing only in case")
|
||||
complete $add_opt -s r -l recursive -d (_ "Add contents of subdirectories")
|
||||
complete $add_opt -l not-recursive -d (_ "Don't add contents of subdirectories")
|
||||
complete $add_opt -l date-trick -d (_ "Add files with date appended to avoid conflict. [EXPERIMENTAL]")
|
||||
complete $add_opt -l no-date-trick -d (_ "Don't use experimental date appending trick. [DEFAULT]")
|
||||
complete $add_opt -s q -l quiet -d (_ "Suppress informational output")
|
||||
complete $add_opt -l dry-run -d (_ "Don't actually take the action")
|
||||
complete $add_opt -s q -l quiet -d (_ "Suppress informational output")
|
||||
complete $add_opt -l boring -d (N_ "Don't skip boring files")
|
||||
complete $add_opt -l case-ok -d (N_ "Don't refuse to add files differing only in case")
|
||||
complete $add_opt -s r -l recursive -d (N_ "Add contents of subdirectories")
|
||||
complete $add_opt -l not-recursive -d (N_ "Don't add contents of subdirectories")
|
||||
complete $add_opt -l date-trick -d (N_ "Add files with date appended to avoid conflict. [EXPERIMENTAL]")
|
||||
complete $add_opt -l no-date-trick -d (N_ "Don't use experimental date appending trick. [DEFAULT]")
|
||||
complete $add_opt -s q -l quiet -d (N_ "Suppress informational output")
|
||||
complete $add_opt -l dry-run -d (N_ "Don't actually take the action")
|
||||
complete $add_opt -s q -l quiet -d (N_ "Suppress informational output")
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user