Skip to content

Commit

Permalink
Create common function for listing available character encodings, mak…
Browse files Browse the repository at this point in the history
…e sure it is used in all relevant places.

darcs-hash:20070921211051-75c98-5ff21df5b29e8a66ef0c4488afb96acfdb6f74a2.gz
  • Loading branch information
liljencrantz committed Sep 21, 2007
1 parent dab7e6c commit 048f903
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions share/completions/gcc.fish
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions share/completions/iconv.fish
@@ -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"
Expand Down
5 changes: 1 addition & 4 deletions share/completions/xterm.fish
@@ -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'
Expand Down Expand Up @@ -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'
Expand Down
3 changes: 3 additions & 0 deletions share/functions/__fish_print_encodings.fish
@@ -0,0 +1,3 @@
function __fish_print_encodings -d "Complete using available character encodings"
iconv --list|sed -e 's|//||'
end

0 comments on commit 048f903

Please sign in to comment.