Skip to content

Commit a348045

Browse files
committed
refactor: skip out .gitnow file parsing if doesn't exist
1 parent 3c608ad commit a348045

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

functions/__gitnow_config_file.fish

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@ set -g gitnow_xpaste
66
set -g gitnow_commands 'all' 'assume' 'bitbucket' 'bugfix' 'commit' 'feature' 'github' 'gitnow' 'hotfix' 'logs' 'merge' 'move' 'pull' 'push' 'release' 'show' 'stage' 'state' 'tag' 'unstage' 'untracked' 'upstream'
77

88
function __gitnow_read_config -d "Reads the GitNow config file"
9-
# sets a clipboard program
9+
# Sets a clipboard program
1010
set gitnow_xpaste (__gitnow_get_clip_program)
1111

12-
# config file path used by default
12+
# Config file path used by default
1313
set -l config_file "$fish_snippets/.gitnow"
1414

15-
# download the default .gitnow file
16-
# used as workaround for Fisher. see https://github.com/jorgebucaran/fisher/pull/573
15+
# Download the default .gitnow file
16+
# Used as workaround for Fisher. see https://github.com/jorgebucaran/fisher/pull/573
1717
if not test -e $config_file
1818
curl -sSo $config_file https://raw.githubusercontent.com/joseluisq/gitnow/master/conf.d/.gitnow
1919
end
2020

21-
# prefer custom config file if it exists
21+
# Prefer custom config file if it exists
2222
if test -e $GITNOW_CONFIG_FILE
2323
set config_file $GITNOW_CONFIG_FILE
2424
else if not test -e $config_file
25-
# otherwise checks if default `.gitnow` file exists
26-
# TODO: think about to if we could make this file optional
27-
echo "Gitnow: the default .gitnow file is not found or inaccessible!"
25+
# Otherwise checks if default `.gitnow` file exists,
26+
# if doesn't then skip out file parsing
27+
return
2828
end
2929

3030
# Parse `.gitnow` file content

0 commit comments

Comments
 (0)