Skip to content
Permalink
Browse files

[spellcheck] generated command only replace whole words

  • Loading branch information
3nids committed Dec 19, 2016
1 parent 6b56e4f commit 2a0f72527d3244f80d558eb9a37f82d5fa240063
@@ -39,8 +39,8 @@ if [[ ! -z $OUTPUT ]]; then
echo "****"
# < ---------- get files + error ---------------------------------------------------------------------->
ag --smart-case --only-matching --nogroup --nonumbers --all-text --word-regexp -p $AGIGNORE "$RE" $FILES | \
# <-- generate sed command .... <------------------------------ get correction word -----------------> <------------------------------- match case -------------------------------------------> <-----replace : by / ------> ...finalize sed command>
sed -e 's/\(\S*\):\([[:alnum:]]*\)$/ echo "sed -i s\/"$( echo "\2:$(ag --nonumbers --ignore-case \2 scripts\/spelling.dat | cut -d: -f2)" | sed -r \x27s\/([A-Z]+):(.*)\/\\1:\\U\\2\/; s\/([A-Z][a-z]+):([a-z])\/\\1:\\U\\2\\L\/\x27 | sed -e \x27s\/:\/\\\/\/\x27)"\/ \1" /e' | \
# <-- generate sed command .... <------------------------------ get correction word -----------------------------> <------------------------------- match case -------------------------------------------> <-----replace : by / and add word boundary------> ...finalize sed command>
sed -e 's/\(\S*\):\([[:alnum:]]*\)$/ echo "sed -i \x27s\/"$( echo "\2:$(ag --nonumbers --ignore-case --word-regexp \2 scripts\/spelling.dat | cut -d: -f2)" | sed -r \x27s\/([A-Z]+):(.*)\/\\1:\\U\\2\/; s\/([A-Z][a-z]+):([a-z])\/\\1:\\U\\2\\L\/\x27 | sed -r \x27s\/(\\S\*):\/\\\\b\\1\\\\b\\\/\/\x27)"\/g\x27 \1" /e' | \
# remove duplicate line
sort -u
echo "****"
@@ -64,6 +64,7 @@ asuming:assuming
atomatically:automatically
attemps:attempts
attemtps:attempts
attribut:attribute
attruibutes:attributes
authentification:authentication
automaticly:automatically
@@ -200,7 +200,7 @@ QgsTipFactory::QgsTipFactory() : QObject()
// by yjacolin
myTip.setTitle( tr( "Copy, paste and cut in QGIS" ) );
myTip.setContent( tr( "Copy, paste, and cut work as in another applications in QGIS. Select a "
"feature (a geometry or an attribut row in the attribute table) and use "
"feature (a geometry or an attribute row in the attribute table) and use "
"one of these shortcuts: Ctrl+C to copy, Ctrl+X to cut, and Ctrl+V to paste."
) );
addGuiTip( myTip );
@@ -27,13 +27,13 @@
#%end
#%option G_OPT_V_MAP
#% key: input
#% description: Input vector map (attribut table required)
#% description: Input vector map (attribute table required)
#% required: yes
#% multiple: no
#%end
#%option G_OPT_V_MAP
#% key: training
#% description: Training vector map (attribut table required)
#% description: Training vector map (attribute table required)
#% required: yes
#% multiple: no
#%end

0 comments on commit 2a0f725

Please sign in to comment.
You can’t perform that action at this time.