From 023d9d12f26f1a8809f7307c61bbe9ff45cfbad6 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 22 Feb 2014 00:24:42 +0100 Subject: move completion into src and build its output scripts to bin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- .gitignore | 1 - Makefile | 23 +++++++++++++---------- completion | 20 -------------------- src/completion | 20 ++++++++++++++++++++ 4 files changed, 33 insertions(+), 31 deletions(-) delete mode 100644 completion create mode 100644 src/completion diff --git a/.gitignore b/.gitignore index ec0c588..9d86dcf 100644 --- a/.gitignore +++ b/.gitignore @@ -21,5 +21,4 @@ __pycache__/ *.gz *.bz2 *.xz -/blueshift.*sh diff --git a/Makefile b/Makefile index 2e87f52..d261389 100644 --- a/Makefile +++ b/Makefile @@ -65,13 +65,13 @@ command: $(foreach C,$(CBINDINGS),bin/$(C)) bin/blueshift shell: bash zsh fish .PHONY: bash -bash: blueshift.bash +bash: bin/blueshift.bash .PHONY: zsh -zsh: blueshift.zsh +zsh: bin/blueshift.zsh .PHONY: fish -fish: blueshift.fish +fish: bin/blueshift.fish bin/blueshift: obj/blueshift.zip @@ -126,13 +126,16 @@ obj/%.c: src/%.pyx mv obj/$@ $@ -blueshift.bash: completion +bin/blueshift.bash: src/completion + @mkdir -p bin auto-auto-complete bash --output $@ --source $< -blueshift.zsh: completion +bin/blueshift.zsh: src/completion + @mkdir -p bin auto-auto-complete zsh --output $@ --source $< -blueshift.fish: completion +bin/blueshift.fish: src/completion + @mkdir -p bin auto-auto-complete fish --output $@ --source $< @@ -192,17 +195,17 @@ install-dvi: blueshift.dvi install-shell: install-bash install-zsh install-fish .PHONY: install-bash -install-bash: blueshift.bash +install-bash: bin/blueshift.bash install -dm755 -- "$(DESTDIR)$(DATADIR)/bash-completion/completions" install -m644 $< -- "$(DESTDIR)$(DATADIR)/bash-completion/completions/$(COMMAND)" .PHONY: install-zsh -install-zsh: blueshift.zsh +install-zsh: bin/blueshift.zsh install -dm755 -- "$(DESTDIR)$(DATADIR)/zsh/site-functions" install -m644 $< -- "$(DESTDIR)$(DATADIR)/zsh/site-functions/_$(COMMAND)" .PHONY: install-fish -install-fish: blueshift.fish +install-fish: bin/blueshift.fish install -dm755 -- "$(DESTDIR)$(DATADIR)/fish/completions" install -m644 $< -- "$(DESTDIR)$(DATADIR)/fish/completions/$(COMMAND).fish" @@ -236,5 +239,5 @@ uninstall: .PHONY: all clean: - -rm -r bin obj src/blueshift_randr.c src/blueshift_vidmode.c blueshift.{ba,z,fi}sh + -rm -r bin obj src/blueshift_randr.c src/blueshift_vidmode.c diff --git a/completion b/completion deleted file mode 100644 index e63d1af..0000000 --- a/completion +++ /dev/null @@ -1,20 +0,0 @@ -(blueshift - (multiple unargumented - ((options -p --panic-gate --panicgate) (complete --panicgate) (desc 'Applies the settings directly instead of transitioning into the initial settings')) - ((options -h -? --help) (complete --help) (desc 'Prints help information')) - ((options -C --copying --copyright) (complete --copyright) (desc 'Prints copyright information')) - ((options -W --warranty) (complete --warranty) (desc 'Prints non-warranty information')) - ((options -v --version) (complete --version) (desc 'Prints the name version of the program')) - ((options -r --reset) (complete --reset) (desc 'Transition from the specified settings to clean settings')) - ) - (multiple argumented - ((options -c --configurations) (complete --configurations) (arg SCRIPT) (files -f) (desc 'Select configuration script')) - ((options -g --gamma) (complete --gamma) (arg RGB|R:G:B) (files -0) (desc 'Apply gamma correction to the colour curves')) - ((options -b --brightness) (complete --brightness) (arg RGB|R:G:B) (files -0) (desc 'Change brightness using sRGB')) - ((options +b ++brightness) (complete ++brightness) (arg Y) (files -0) (desc 'Change brightness using CIE xyY')) - ((options -t --temperature) (complete --temperature) (arg KELVIN) (files -0) (desc 'Change colour temperature')) - ((options -l --location) (complete --location) (arg LAT:LON) (files -0) (desc 'Specify your geographical location')) - ((options -o --output --crtc) (complete --output) (arg CRTC) (files -0) (desc 'Select CRTC to apply changes to')) - ) -) - diff --git a/src/completion b/src/completion new file mode 100644 index 0000000..e63d1af --- /dev/null +++ b/src/completion @@ -0,0 +1,20 @@ +(blueshift + (multiple unargumented + ((options -p --panic-gate --panicgate) (complete --panicgate) (desc 'Applies the settings directly instead of transitioning into the initial settings')) + ((options -h -? --help) (complete --help) (desc 'Prints help information')) + ((options -C --copying --copyright) (complete --copyright) (desc 'Prints copyright information')) + ((options -W --warranty) (complete --warranty) (desc 'Prints non-warranty information')) + ((options -v --version) (complete --version) (desc 'Prints the name version of the program')) + ((options -r --reset) (complete --reset) (desc 'Transition from the specified settings to clean settings')) + ) + (multiple argumented + ((options -c --configurations) (complete --configurations) (arg SCRIPT) (files -f) (desc 'Select configuration script')) + ((options -g --gamma) (complete --gamma) (arg RGB|R:G:B) (files -0) (desc 'Apply gamma correction to the colour curves')) + ((options -b --brightness) (complete --brightness) (arg RGB|R:G:B) (files -0) (desc 'Change brightness using sRGB')) + ((options +b ++brightness) (complete ++brightness) (arg Y) (files -0) (desc 'Change brightness using CIE xyY')) + ((options -t --temperature) (complete --temperature) (arg KELVIN) (files -0) (desc 'Change colour temperature')) + ((options -l --location) (complete --location) (arg LAT:LON) (files -0) (desc 'Specify your geographical location')) + ((options -o --output --crtc) (complete --output) (arg CRTC) (files -0) (desc 'Select CRTC to apply changes to')) + ) +) + -- cgit v1.2.3-70-g09d2