Create common function for listing available character encodings, make sure it is used in all relevant places.

darcs-hash:20070921211051-75c98-5ff21df5b29e8a66ef0c4488afb96acfdb6f74a2.gz
This commit is contained in:
liljencrantz 2007-09-22 07:10:51 +10:00
parent dab7e6c7b9
commit 048f903a9d
4 changed files with 9 additions and 9 deletions

View file

@ -464,9 +464,9 @@ complete -c gcc -o fdollars-in-identifiers --description '@anchor{fdollars-in-id
complete -c gcc -o fextended-identifiers --description 'Accept universal character names in identifiers'
complete -c gcc -o fpreprocessed --description 'Indicate to the preprocessor that the input file has already been preprocessed'
complete -c gcc -o ftabstop --description 'Set the distance between tab stops'
complete -c gcc -o fexec-charset --description 'Set the execution character set, used for string and character constants' -a "(iconv --list|sed -e 's|//||')"
complete -c gcc -o fwide-exec-charset --description 'Set the wide execution character set, used for wide string and character constants' -a "(iconv --list|sed -e 's|//||')"
complete -c gcc -o finput-charset --description 'Set the input character set, used for translation from the character set of the input file to the source character set used by GCC' -a "(iconv --list|sed -e 's|//||')"
complete -c gcc -o fexec-charset --description 'Set the execution character set, used for string and character constants' -a "(__fish_print_encodings)"
complete -c gcc -o fwide-exec-charset --description 'Set the wide execution character set, used for wide string and character constants' -a "(__fish_print_encodings)"
complete -c gcc -o finput-charset --description 'Set the input character set, used for translation from the character set of the input file to the source character set used by GCC' -a "(__fish_print_encodings)"
complete -c gcc -o fworking-directory --description 'Enable generation of linemarkers in the preprocessor output that will let the compiler know the current working directory at the time of preprocessing'
complete -c gcc -o fno-show-column --description 'Do not print column numbers in diagnostics'
complete -c gcc -s A --description 'Make an assertion with the predicate predicate and answer answer'

View file

@ -1,7 +1,7 @@
complete -c iconv -s f -l from-code --description "Convert from specified encoding" -x -a "(iconv --list|sed -e 's|//||')"
complete -c iconv -s t -l to-code --description "Convert to specified encoding" -x -a "(iconv --list|sed -e 's|//||')"
complete -c iconv -s f -l from-code --description "Convert from specified encoding" -x -a "(__fish_print_encodings)"
complete -c iconv -s t -l to-code --description "Convert to specified encoding" -x -a "(__fish_print_encodings)"
complete -c iconv -l list --description "List known coded character sets"
complete -c iconv -s o -l output --description "Output file" -r
complete -c iconv -l verbose --description "Print progress information"

View file

@ -1,8 +1,5 @@
# completion for xterm
function __fish_complete_xterm_encoding -d "Complete encoding information for xterm"
iconv --list|sed -e 's|//||'
end
complete -c xterm -n '__fish_test_arg "+*"' -a +ah --description 'Never highlight the text cursor'
complete -c xterm -n '__fish_test_arg "+*"' -a +ai --description 'Enable active icon support'
@ -107,7 +104,7 @@ complete -r -c xterm -o bcf --description 'Blinking cursor will be off for that
complete -r -c xterm -o bcn --description 'Blinking cursor will be on for that many milliseconds'
complete -r -c xterm -o class --description 'Override xterm resource class'
complete -r -c xterm -o cr --description 'Color for the text cursor'
complete -r -c xterm -o en -xa "(__fish_complete_xterm_encoding )" --description 'xterm encoding'
complete -r -c xterm -o en -xa "(__fish_print_encodings)" --description 'xterm encoding'
complete -r -c xterm -o fb --description 'Bold font'
complete -r -c xterm -o fa --description 'FreeType font pattern'
complete -r -c xterm -o fd --description 'FreeType double-width font pattern'

View file

@ -0,0 +1,3 @@
function __fish_print_encodings -d "Complete using available character encodings"
iconv --list|sed -e 's|//||'
end