Skip to content

Commit

Permalink
split configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
joseluisq committed Apr 11, 2019
1 parent 309f76d commit 2bf5b5b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 15 deletions.
22 changes: 9 additions & 13 deletions conf.d/gitnow.fish
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
# GitNow — Speed up your Git workflow. 🐠
# https://github.com/joseluisq/gitnow
#
#
# NOTE:
# Fish 2.2.0 doesn't include native snippet support.
# Upgrade to Fish >= 2.3.0 or append the following code to your ~/.config/fish/config.fish

set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
set -q fish_config; or set -g fish_config $XDG_CONFIG_HOME/fish
set -q gitnow_path; or set -g gitnow_path $fish_config

source "$gitnow_path/functions/__gitnow_functions.fish"
source "$gitnow_path/functions/__gitnow_manual.fish"

function gitnow -d "Gitnow: Speed up your Git workflow. 🐠"
__gitnow_manual | less -r

commandline -f repaint;
function gitnow -d "Gitnow: Speed up your Git workflow. 🐠" -a xversion
if [ "$xversion" = "-v" ]; or [ "$xversion" = "--version" ]
echo "GitNow version $gitnow_version"
else
__gitnow_manual | command less -r
commandline -f repaint;
end
end

function state -d "Gitnow: Show the working tree status in compact way"
Expand Down Expand Up @@ -201,7 +197,7 @@ function logs -d "Gitnow: Shows logs in a fancy way"
set args $argv
end

command git log $args --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit | command less -r
command git log $args --color --graph --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset" --abbrev-commit | command less -r

commandline -f repaint;
end
Expand Down
15 changes: 15 additions & 0 deletions conf.d/gitnow_config.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# GitNow — Speed up your Git workflow. 🐠
# https://github.com/joseluisq/gitnow
#
# NOTE:
# Fish 2.2.0 doesn't include native snippet support.
# Upgrade to Fish >= 2.3.0 or append the following code to your ~/.config/fish/config.fish

set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
set -q fish_config; or set -g fish_config $XDG_CONFIG_HOME/fish
set -q fish_functions; or set -g fish_functions "$fish_config/functions"

set -g gitnow_version 2.0.4

source "$fish_functions/__gitnow_functions.fish"
source "$fish_functions/__gitnow_manual.fish"
2 changes: 0 additions & 2 deletions functions/__gitnow_manual.fish
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
# Upgrade to Fish >= 2.3.0 or append the following code to your ~/.config/fish/config.fish

function __gitnow_manual -d "Gitnow: Manual page like"
set -l gitnow_version "v2.0.4"

echo (set_color white --bold)"NAME"(set_color normal)
echo " GitNow — Speed up your Git workflow. 🐠"
echo
Expand Down

0 comments on commit 2bf5b5b

Please sign in to comment.