From 8a3641f5453f368f56941e28998a85abb70cbb34 Mon Sep 17 00:00:00 2001 From: Yuan Yiyang Date: Thu, 14 May 2015 02:10:48 +0800 Subject: [PATCH 1/7] fix command line parameter passing command line parameters (file names) were not passed into the executable. now fixed. --- subl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/subl b/subl index b14e51a..6a7a73a 100755 --- a/subl +++ b/subl @@ -1,2 +1,4 @@ #!/bin/sh -exec sh -c 'LD_PRELOAD=/opt/sublime_text/sublime_zh/libsublime_imfix.so /opt/sublime_text/sublime_text' %F + +export LD_PRELOAD=/opt/sublime_text/libsublime-imfix.so +exec /opt/sublime_text/sublime_text "$@" From feae0135b826da729cfd601bf9c2c5f828a42a79 Mon Sep 17 00:00:00 2001 From: Yuan Yiyang Date: Sun, 17 May 2015 07:43:49 +0800 Subject: [PATCH 2/7] fix typo in path --- subl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/subl b/subl index 6a7a73a..73ff81f 100755 --- a/subl +++ b/subl @@ -1,4 +1,3 @@ #!/bin/sh - -export LD_PRELOAD=/opt/sublime_text/libsublime-imfix.so +export LD_PRELOAD=/opt/sublime_text/sublime_zh/libsublime-imfix.so exec /opt/sublime_text/sublime_text "$@" From ce2c9fbaacb060c49b4e96054a5f95eafb9f1067 Mon Sep 17 00:00:00 2001 From: Yuan Yiyang Date: Sun, 17 May 2015 07:56:07 +0800 Subject: [PATCH 3/7] fix right click action at unity panel --- sublime_text.desktop | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sublime_text.desktop b/sublime_text.desktop index 7435464..734cdd8 100755 --- a/sublime_text.desktop +++ b/sublime_text.desktop @@ -14,10 +14,10 @@ Actions=Window;Document; [Desktop Action Window] Name=New Window -Exec=sh -c 'LD_PRELOAD=/opt/sublime_text/sublime_zh/libsublime_imfix.so /opt/sublime_text/sublime_text' -n +Exec=sh -c 'LD_PRELOAD=/opt/sublime_text/sublime_zh/libsublime_imfix.so /opt/sublime_text/sublime_text -n' OnlyShowIn=Unity; [Desktop Action Document] Name=New File -Exec=sh -c 'LD_PRELOAD=/opt/sublime_text/sublime_zh/libsublime_imfix.so /opt/sublime_text/sublime_text' --command new_file +Exec=sh -c 'LD_PRELOAD=/opt/sublime_text/sublime_zh/libsublime_imfix.so /opt/sublime_text/sublime_text --command new_file' OnlyShowIn=Unity; From b6f591ca5a482990af351f998b9e3e1dd7bfcb15 Mon Sep 17 00:00:00 2001 From: Yuan Yiyang Date: Sun, 17 May 2015 08:13:20 +0800 Subject: [PATCH 4/7] fix right click open function --- sublime_text.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sublime_text.desktop b/sublime_text.desktop index 734cdd8..566ccbb 100755 --- a/sublime_text.desktop +++ b/sublime_text.desktop @@ -4,7 +4,7 @@ Type=Application Name=Sublime Text GenericName=Text Editor Comment=Sophisticated text editor for code, markup and prose -Exec=sh -c 'LD_PRELOAD=/opt/sublime_text/sublime_zh/libsublime_imfix.so /opt/sublime_text/sublime_text' %F +Exec=sh -c 'LD_PRELOAD=/opt/sublime_text/sublime_zh/libsublime_imfix.so /opt/sublime_text/sublime_text "%F"' Terminal=false MimeType=text/plain; Icon=sublime-text From 710927ee2cff63efde57e4d69b5e6127b369666d Mon Sep 17 00:00:00 2001 From: Yuan Yiyang Date: Sun, 17 May 2015 08:14:11 +0800 Subject: [PATCH 5/7] revert to simpler sh -c line --- subl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/subl b/subl index 73ff81f..0b96d63 100755 --- a/subl +++ b/subl @@ -1,3 +1,2 @@ #!/bin/sh -export LD_PRELOAD=/opt/sublime_text/sublime_zh/libsublime-imfix.so -exec /opt/sublime_text/sublime_text "$@" +sh -c 'LD_PRELOAD=/opt/sublime_text/sublime_zh/libsublime_imfix.so /opt/sublime_text/sublime_text "%F"' \ No newline at end of file From 5d8f0f7b10714746758b0c1254ed33beacfea2c4 Mon Sep 17 00:00:00 2001 From: Yuan Yiyang Date: Sun, 17 May 2015 08:14:38 +0800 Subject: [PATCH 6/7] add installation instruction --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 67f6e9d..794660d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ # sublime_zh_patch ---- A patch of [Sublime Text 3] for supporting chinese input with Fcitx + +Installation +---- +sudo ./setup.sh \ No newline at end of file From 91819745be7f14d357902b7b2dbfc7ee4777a58b Mon Sep 17 00:00:00 2001 From: Yuan Yiyang Date: Sun, 17 May 2015 08:36:27 +0800 Subject: [PATCH 7/7] fix subl command line argument passing --- subl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subl b/subl index 0b96d63..7e49993 100755 --- a/subl +++ b/subl @@ -1,2 +1,2 @@ #!/bin/sh -sh -c 'LD_PRELOAD=/opt/sublime_text/sublime_zh/libsublime_imfix.so /opt/sublime_text/sublime_text "%F"' \ No newline at end of file +sh -c "LD_PRELOAD=/opt/sublime_text/sublime_zh/libsublime_imfix.so /opt/sublime_text/sublime_text \"$@\""